@progress/kendo-charts 1.19.1 → 1.20.0-dev.202111121622

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.
Files changed (61) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/chart/chart.js +15 -6
  4. package/dist/es/chart/constants.js +3 -1
  5. package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +8 -4
  6. package/dist/es/chart/selection.js +41 -1
  7. package/dist/es/common/mousewheel-delta.js +4 -7
  8. package/dist/es/core/axis.js +47 -0
  9. package/dist/es/core/category-axis.js +62 -20
  10. package/dist/es/core/date-category-axis.js +26 -38
  11. package/dist/es/core/date-value-axis.js +37 -40
  12. package/dist/es/core/logarithmic-axis.js +62 -88
  13. package/dist/es/core/numeric-axis.js +57 -81
  14. package/dist/es/main.js +1 -0
  15. package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +103 -0
  16. package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +51 -0
  17. package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +12 -0
  18. package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +49 -0
  19. package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +50 -0
  20. package/dist/es/qrcode/encodings/encoders/iso-encoder.js +29 -0
  21. package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +91 -0
  22. package/dist/es/qrcode/encodings/encoding-result.js +16 -0
  23. package/dist/es/qrcode/encodings/encoding.js +701 -0
  24. package/dist/es/qrcode/encodings/free-cell-visitor.js +57 -0
  25. package/dist/es/qrcode/encodings/version-codewords.js +1289 -0
  26. package/dist/es/qrcode/qrcode.js +403 -0
  27. package/dist/es/qrcode/utils.js +28 -0
  28. package/dist/es/qrcode.js +1 -0
  29. package/dist/es/stock/navigator.js +3 -2
  30. package/dist/es2015/chart/chart.js +15 -6
  31. package/dist/es2015/chart/constants.js +3 -1
  32. package/dist/es2015/chart/pan-and-zoom/mousewheel-zoom.js +6 -4
  33. package/dist/es2015/chart/selection.js +40 -1
  34. package/dist/es2015/common/mousewheel-delta.js +4 -7
  35. package/dist/es2015/core/axis.js +39 -0
  36. package/dist/es2015/core/category-axis.js +56 -18
  37. package/dist/es2015/core/date-category-axis.js +27 -36
  38. package/dist/es2015/core/date-value-axis.js +35 -40
  39. package/dist/es2015/core/logarithmic-axis.js +52 -83
  40. package/dist/es2015/core/numeric-axis.js +47 -78
  41. package/dist/es2015/main.js +1 -0
  42. package/dist/es2015/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +91 -0
  43. package/dist/es2015/qrcode/encodings/data-modes/byte-data-mode.js +41 -0
  44. package/dist/es2015/qrcode/encodings/data-modes/data-mode-instances.js +13 -0
  45. package/dist/es2015/qrcode/encodings/data-modes/numeric-data-mode.js +39 -0
  46. package/dist/es2015/qrcode/encodings/data-modes/qr-data-mode.js +44 -0
  47. package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +19 -0
  48. package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +83 -0
  49. package/dist/es2015/qrcode/encodings/encoding-result.js +10 -0
  50. package/dist/es2015/qrcode/encodings/encoding.js +701 -0
  51. package/dist/es2015/qrcode/encodings/free-cell-visitor.js +49 -0
  52. package/dist/es2015/qrcode/encodings/version-codewords.js +1289 -0
  53. package/dist/es2015/qrcode/qrcode.js +395 -0
  54. package/dist/es2015/qrcode/utils.js +28 -0
  55. package/dist/es2015/qrcode.js +1 -0
  56. package/dist/es2015/stock/navigator.js +3 -2
  57. package/dist/npm/main.d.ts +1 -0
  58. package/dist/npm/main.js +3172 -283
  59. package/dist/npm/qrcode.d.ts +5 -0
  60. package/dist/systemjs/kendo-charts.js +1 -1
  61. package/package.json +1 -1
@@ -1 +1 @@
1
- System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(Xd){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var i,r;i=[function(t,e){t.exports=n},function(t,e,i){"use strict";i.r(e);var o={};i.d(o,"NAVIGATOR_AXIS",function(){return Ul}),i.d(o,"NAVIGATOR_PANE",function(){return Fl});var d="arc",r="#000",w="bottom",A="center",u="circle",y="date",g=10,s=/\{\d+:?/,S="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,n="none",k="right",f="string",P="top",h="value",a="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function p(t,e){for(var i=x(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var b=/\s+/g;function _(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(b," "))}var C=i(0);function T(t){var e=.5;t.options.stroke&&C.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 M(t,e){return-t.x*e.y+t.y*e.x<0}function R(t){return"number"==typeof t&&!isNaN(t)}function O(t){return typeof t===f}function B(t){return R(t)||O(t)&&isFinite(t)}function I(t){return"function"==typeof t}var V="object",j="undefined";function L(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r=i[o],n=typeof r,s=void 0;(s=n===V&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):I(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===V&&s||{},t(e[o],r)):n!==j&&(e[o]=r)}return e}(t,e[o]);return t}function z(t){return"object"==typeof t}function E(t){return R(t)?t+"px":t}var F=/width|height|top|left|bottom|right/i;function U(t,e){var i=O(e)?[e]:e;if(x(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=F.test(s)?parseFloat(r[s]):r[s]}return o}if(z(e))for(var a in e)t.style[a]=E(e[a])}function D(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[P]=i[k]=i[w]=i[S]=t:(i[P]=t[P]||e,i[k]=t[k]||e,i[w]=t[w]||e,i[S]=t[S]||e),i}var H={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},G=function(){},N={implementation:{configurable:!0}};G.register=function(t){H=t},N.implementation.get=function(){return H},Object.defineProperties(G,N);var W=G,X=/\{(\d+)(:[^\}]+)?\}/g,Y=function(t){this._intlService=t},q={intl:{configurable:!0}};q.intl.get=function(){return this._intlService||W.implementation},q.intl.set=function(t){this._intlService=t},Y.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return O(t)&&t.match(s)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},Y.prototype.localeAuto=function(t,o,r){var n=this.intl;return O(t)&&t.match(s)?t.replace(X,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(Y.prototype,q);var Z=Y,K=function(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Z(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},$={intl:{configurable:!0}};$.intl.get=function(){return this._intlService||W.implementation},$.intl.set=function(t){this._intlService=t,this.format.intl=t},K.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},K.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(K.prototype,$);var Q,J=K,tt=function(){};tt.register=function(t){Q=t},tt.create=function(t,e){if(Q)return Q.create(t,e)};var et=tt,it={compile:function(t){return t}},ot=function(){};ot.register=function(t){it=t},ot.compile=function(t){return it.compile(t)};var rt=ot;function nt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=rt.compile(t.template):I(t.content)&&(e=t.content),e}var st=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,at={};function pt(t){if(at[t])return at[t];var r=[];return t.replace(st,function(t,e,i,o){r.push(C.drawing.util.defined(e)?e:i||o)}),at[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e},at[t]}function ht(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function lt(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}at[void 0]=function(t){return t};var ct=function(){this._map={}};ct.prototype.get=function(t){return this._map[this._key(t)]},ct.prototype.set=function(t,e){this._map[this._key(t)]=e},ct.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ut=ct;function dt(t,e){if(e)return-1!==e.indexOf(t)}function ft(t,e,i){return C.drawing.util.round(t+(e-t)*i,3)}var gt=function(t,e){this.observer=t,this.handlerMap=L({},this.handlerMap,e)};gt.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},gt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},gt.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 yt=gt;function vt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);C.drawing.util.defined(n)&&o.push(n)}return o}function mt(t){var e=0;return t.wheelDelta&&(e=0<(e=-t.wheelDelta/120)?Math.ceil(e):Math.floor(e)),e=t.detail?C.drawing.util.round(t.detail/3):e}function xt(){}var bt=C.drawing.util,_t=bt.append,wt=bt.bindEvents,At=bt.defined,St=bt.deg,kt=bt.elementOffset,Pt=bt.elementSize,Ct=bt.eventElement,Tt=bt.eventCoordinates,Mt=bt.last,Rt=bt.limitValue,Ot=bt.objectKey,Bt=bt.rad,It=bt.round,Vt=bt.unbindEvents,jt=bt.valueOrDefault;xt.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,xt.fetchFonts(e,o,r),r.depth--))})},xt.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){Object(C.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},xt.preloadFonts=function(t,e){var i=[];xt.fetchFonts(t,i),xt.loadFonts(i,e)};var Lt=xt;function zt(t,e){t=t.prototype;t.options?t.options=L({},t.options,e):t.options=e}function Et(t){for(var e=l,i=c,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===l?void 0:e,max:i===c?void 0:i}}function Ft(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Ut=C.geometry.Matrix,Dt=/matrix\((.*)\)/;function Ht(t){var e=getComputedStyle(t).transform;return"none"===e?Ut.unit():function(){var t=e.match(Dt);if(null===t||2!==t.length)return Ut.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Ut,[null].concat(t)))}()}function Gt(t){if(!t)return Ut.unit();for(var e=Ht(t),i=t.parentElement;i;)var o=Ht(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}function Nt(t){return new C.Color(t).isDark()?a:r}function Wt(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}var Xt={},Yt={size:{configurable:!0}};Wt.prototype.values=function(){return this._values.filter(function(t){return t!==Xt})},Wt.prototype.has=function(t){return void 0!==this._index[t]},Wt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Wt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Xt,delete this._index[t])},Wt.prototype.clear=function(){this._index={},this._values=[]},Yt.size.get=function(){return this._values.length},Object.defineProperties(Wt.prototype,Yt);function qt(t){this._set=new Set(t)}var Zt={size:{configurable:!0}};qt.prototype.values=function(){return Array.from(this._set)},qt.prototype.has=function(t){return this._set.has(t)},qt.prototype.add=function(t){this._set.add(t)},qt.prototype.delete=function(t){this._set.delete(t)},qt.prototype.clear=function(){this._set.clear()},Zt.size.get=function(){return this._set.size},Object.defineProperties(qt.prototype,Zt);function Kt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?qt:Wt)(t);var e}function $t(t,e){t=It(e-t,9);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=It(t/e,g);return It(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}var Qt,Jt=((Qt=C.Class)&&(te.__proto__=Qt),((te.prototype=Object.create(Qt&&Qt.prototype)).constructor=te).prototype.clone=function(){return new te(this.x,this.y)},te.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},te.prototype.rotate=function(t,e){var i=Bt(e),o=Math.cos(i),r=Math.sin(i),n=t.x,e=t.y,i=this.x,t=this.y;return this.x=It(n+(i-n)*o+(t-e)*r,3),this.y=It(e+(t-e)*o-(i-n)*r,3),this},te.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},te.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},te.onCircle=function(t,e,i){e=Bt(e);return new te(t.x-i*Math.cos(e),t.y-i*Math.sin(e))},te);function te(t,e){Qt.call(this),this.x=t||0,this.y=e||0}function ee(t,e,i,o,r){r=Bt(r);return new Jt(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}var ie,oe=((ie=C.Class)&&(re.__proto__=ie),((re.prototype=Object.create(ie&&ie.prototype)).constructor=re).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},re.prototype.width=function(){return this.x2-this.x1},re.prototype.height=function(){return this.y2-this.y1},re.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},re.prototype.move=function(t,e){var i=this.height(),o=this.width();return At(t)&&(this.x1=t,this.x2=this.x1+o),At(e)&&(this.y1=e,this.y2=this.y1+i),this},re.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},re.prototype.wrapPoint=function(t){var e=x(t),i=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new re(i,t,i,t)),this},re.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},re.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===P||e===w?m:v,a=s==m?r:n;return e===A?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===P||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},re.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},re.prototype.expand=function(t,e){return this.shrink(-t,-e),this},re.prototype.pad=function(t){t=D(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},re.prototype.unpad=function(t){t=D(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},re.prototype.clone=function(){return new re(this.x1,this.y1,this.x2,this.y2)},re.prototype.center=function(){return new Jt(this.x1+this.width()/2,this.y1+this.height()/2)},re.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},re.prototype.points=function(){return[new Jt(this.x1,this.y1),new Jt(this.x2,this.y1),new Jt(this.x2,this.y2),new Jt(this.x1,this.y2)]},re.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},re.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},re.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=ee(0,0,r,n,t),a=ee(e,0,r,n,t),o=ee(e,i,r,n,t),t=ee(0,i,r,n,t),e=Math.max(s.x,a.x,o.x,t.x)-Math.min(s.x,a.x,o.x,t.x),i=Math.max(s.y,a.y,o.y,t.y)-Math.min(s.y,a.y,o.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+i,this},re.prototype.toRect=function(){return new C.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},re.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},re.prototype.align=function(t,e,i){var o=e+1,r=e+2,n=e===v?"width":"height",e=this[n]();dt(i,[S,P])?(this[o]=t[o],this[r]=this[o]+e):dt(i,[k,w])?(this[r]=t[r],this[o]=this[r]-e):i===A&&(this[o]=t[o]+(t[n]()-e)/2,this[r]=this[o]+e)},re);function re(t,e,i,o){ie.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function ne(t,e){return t-e}var se,ae,pe,he=((pe=C.Class)&&(fe.__proto__=pe),((fe.prototype=Object.create(pe&&pe.prototype)).constructor=fe).prototype.clone=function(){return new fe(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},fe.prototype.middle=function(){return this.startAngle+this.angle/2},fe.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},fe.prototype.point=function(t,e){var i=Bt(t),t=Math.cos(i),i=Math.sin(i),e=e?this.innerRadius:this.radius,t=It(this.center.x-t*e,3),e=It(this.center.y-i*e,3);return new Jt(t,e)},fe.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,t=Math.sin(Bt(r)),o=Math.cos(Bt(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-o/Math.abs(o)),Math.abs(o)<.9&&(n+=a*-t/Math.abs(t)),new oe(r,n,r+e,n+i)},fe.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,t=new Jt(s,a),r=this.point(r),r=new Jt(r.x-e.x,r.y-e.y),n=this.point(n),e=new Jt(n.x-e.x,n.y-e.y),a=It(s*s+a*a,3);return(r.equals(t)||M(r,t))&&!M(e,t)&&i*i<=a&&a<=o*o},fe.prototype.getBBox=function(){for(var t=new oe(l,l,c,c),e=It(this.startAngle%360),i=It((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(ne),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,o)}return o||t.wrapPoint(this.center),t},fe.prototype.expand=function(t){return this.radius+=t,this},fe),le=((ae=he)&&(de.__proto__=ae),((de.prototype=Object.create(ae&&ae.prototype)).constructor=de).prototype.expand=function(t){return ae.prototype.expand.call(this,t)},de.prototype.clone=function(){return new de(this.center,this.radius,this.startAngle,this.angle)},de.prototype.setRadius=function(t){return this.radius=t,this},de),ce=((se=C.Class)&&(ue.__proto__=se),((ue.prototype=Object.create(se&&se.prototype)).constructor=ue).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;0<t.angle&&i===o&&(o+=.001);var r=new C.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new C.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=C.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},ue);function ue(){se.apply(this,arguments)}function de(t,e,i,o){ae.call(this,t,0,e,i,o)}function fe(t,e,i,o,r){pe.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}ce.current=new ce;var ge,ye=ce,ve=((ge=C.Class)&&(me.__proto__=ge),((me.prototype=Object.create(ge&&ge.prototype)).constructor=me).prototype.initUserOptions=function(t){return t},me.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},me.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},me.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},me.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},me.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},me.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},me.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},me.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},me.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},me.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},me.prototype.createVisual=function(){this.visual=new C.drawing.Group({zIndex:this.options.zIndex,visible:jt(this.options.visible,!0)})},me.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=C.drawing.Animation.create(this.visual,this.options.animation))},me.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):At(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},me.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},me.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},me.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(jt(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},me.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)}},me.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},me.prototype.renderComplete=function(){},me.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},me.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,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);At(n.options.zIndex)||(n.options.zIndex=jt(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},me.prototype.createGradientOverlay=function(t,e,i){e=new C.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},me.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},me.prototype.supportsPointInactiveOpacity=function(){return!0},me);function me(t){ge.call(this),this.children=[],this.options=L({},this.options,this.initUserOptions(t))}ve.prototype.options={};var xe,be=ve,_e=((xe=be)&&(we.__proto__=xe),((we.prototype=Object.create(xe&&xe.prototype)).constructor=we).prototype.reflow=function(t){function e(){o.align(t,v,r.align),o.align(t,m,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)}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=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),xe.prototype.reflow.call(this,u),i=p?this.box=new oe(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=i.clone(),i.pad(l).pad(c).pad(h),e()),this.translateChildren(i.x1-u.x1+h.left+c+l.left,i.y1-u.y1+h.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},we.prototype.align=function(t,e,i){this.box.align(t,e,i)},we.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},we.prototype.createVisual=function(){xe.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(C.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},we.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:jt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},we);function we(t){xe.call(this,t),this.options.margin=D(this.options.margin),this.options.padding=D(this.options.padding)}zt(_e,{align:S,vAlign:P,margin:{},padding:{},border:{color:r,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Ae,Se=_e,ke=((Ae=Se)&&(Pe.__proto__=Ae),((Pe.prototype=Object.create(Ae&&Ae.prototype)).constructor=Pe).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,p=this.visualStyle();return i===u?a=new C.drawing.Circle(new C.geometry.Circle([It(e.x1+n,3),It(e.y1+s,3)],Math.min(n,s)),p):"triangle"===i?a=C.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close():"cross"===i?((a=new C.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(e=e.toRect(),"roundedRect"===i&&(i=jt(t.borderRadius,e.width()/5),e.setCornerRadius(i)),a=C.drawing.Path.fromRect(e,p)),o&&a.transform(C.geometry.transform().rotate(-o,[r.x,r.y])),a.options.zIndex=t.zIndex,a},Pe.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()},Pe.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}},Pe.prototype.createVisual=function(){this.visual=this.createElement()},Pe);function Pe(t,e){Ae.call(this,t),this.pointData=e}zt(ke,{type:u,align:A,vAlign:A});var Ce=ke,Te={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};var Me,N=((Me=be)&&(Re.__proto__=Me),((Re.prototype=Object.create(Me&&Me.prototype)).constructor=Re).prototype.reflow=function(){var t=this.options,e=this.children,i=new oe(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=function(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 oe(o,s,r,a),l[1]=new oe(i,a,o,p),l[2]=new oe(r,a,n,p),l[3]=new oe(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(l[4]=new oe(i,s,o,a),l[5]=new oe(r,p,n,h)):(l[4]=new oe(r,s,n,a),l[5]=new oe(i,p,o,h)),ht(l,function(t){return 0<t.height()&&0<t.width()})[0]}(i,e[o].box)||new oe},Re.prototype.createVisual=function(){this.visual=new C.drawing.Group,this.createBackground()},Re.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),t=C.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(t)},Re.prototype.getRoot=function(){return this},Re.prototype.createGradient=function(t){var e,s,i=this.gradients,o=Ot(t),r=Te[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new C.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o}()),(e=new C.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},Re.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Re.prototype.size=function(){var t=this.options;return new oe(0,0,t.width,t.height)},Re);function Re(t){Me.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}zt(N,{width:600,height:400,background:a,border:{color:r,width:0},margin:D(5),zIndex:-2});var Oe,Be=N,G=((Oe=be)&&(Ie.__proto__=Oe),((Ie.prototype=Object.create(Oe&&Oe.prototype)).constructor=Ie).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Ie.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ie.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,n=t[i+1]+this.alignStart(a,t[r]());if(h){for(var l=n,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=t[e+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),b=new oe;b[i+1]=x,b[i+2]=x+m[r],b[e+1]=f,b[e+2]=f+m[o],v.reflow(b),f+=m[o]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[i+1]=n,t[i+2]=n+a,t[e+2]=t[e+1]+p}},Ie.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===k||o===w?i=e-t:o===A&&(i=(e-t)/2),i},Ie.prototype.groupOptions=function(){for(var t=this.box,e=this.children,i=this.elementSizeField,o=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=It(t[i]()),a=e.length,p=[],h=0,l=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&&It(l+r+y[i])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,l=h=0,d=[]),h=Math.max(h,y[o]),0<l&&(l+=r),l+=y[i],d.push(g)}return p.push({groupElements:d,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},Ie.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ie.prototype.createVisual=function(){},Ie);function Ie(t){Oe.call(this,t),this._initDirection()}zt(G,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Ve,je=G,Le=C.drawing.Text,q=((Ve=be)&&(ze.__proto__=Ve),((ze.prototype=Object.create(Ve&&Ve.prototype)).constructor=ze).prototype.reflow=function(t){var e=this.options,e=e.size=C.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new oe(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},ze.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,t=t.cursor;this.visual=new Le(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:t})},ze);function ze(t,e){Ve.call(this,e),this.content=t,this.reflow(new oe)}zt(q,{font:"12px sans-serif",color:r});var Ee=q;function Fe(t){var e=t.origin,t=t.bottomRight();return new oe(e.x,e.y,t.x,t.y)}var Ue,De,He=/\n/m,Ge=((De=Se)&&(We.__proto__=De),((We.prototype=Object.create(De&&De.prototype)).constructor=We).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(He),i=new je({vertical:!0,align:t.align,wrap:!1}),o=L({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new Ee(e[r].trim(),o);i.append(n)}},We.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=Fe(o.clippedBBox()||new C.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(De.prototype.reflow.call(this,t),i.rotation&&(e=D(i.margin),i=this.box.unpad(e),this.targetBox=t,this.normalBox=i.clone(),(i=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=i.clone(),i.pad(e)))},We.prototype.createVisual=function(){var t=this.options;this.visual=new C.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=C.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},We.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!At(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):De.prototype.renderVisual.call(this))},We.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},We.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},We.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},We.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,e=this.rotatedBox.center();return C.geometry.transform().translate(e.x-i,e.y-o).rotate(t,[i,o])},We),Y=((Ue=be)&&(Ne.__proto__=Ue),((Ne.prototype=Object.create(Ue&&Ue.prototype)).constructor=Ne).prototype.reflow=function(t){Ue.prototype.reflow.call(this,t),this.box.snapTo(t,v)},Ne.buildTitle=function(t,e,i){var o,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},i,t))&&t.visible&&t.text&&(o=new Ne(t),e.append(o)),o},Ne);function Ne(t){Ue.call(this,t),this.append(new Ge(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function We(t,e,i){De.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new oe)}zt(Y,{color:r,position:P,align:A,margin:D(5),padding:D(5)});var Xe,Ye=Y,$=((Xe=Ge)&&(qe.__proto__=Xe),((qe.prototype=Object.create(Xe&&Xe.prototype)).constructor=qe).prototype.visualContext=function(t){t=Xe.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},qe.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Ct(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},qe.prototype.rotate=function(){var t,e;return this.options.alignRotation!==A?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Fe(t.bbox(e.matrix()))):Xe.prototype.rotate.call(this),this.box},qe.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===A)return Xe.prototype.rotationTransform.call(this);var i=C.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||P,s=n===P||n===w?v:m,a=n===P||n===w?m:v,p=n===P||n===S?r.origin:r.bottomRight(),h=o.topLeft().transformCopy(i),l=o.topRight().transformCopy(i),t=o.bottomRight().transformCopy(i),n=o.bottomLeft().transformCopy(i),o=C.geometry.Rect.fromPoints(h,l,t,n),i={};i[a]=r.origin[a]-o.origin[a];var o=Math.abs(h[a]+i[a]-p[a]),a=Math.abs(l[a]+i[a]-p[a]),n=It(o,g)===It(a,g)?(c=h,l):a<o?(c=l,t):(c=h,n),c=c[s]+(n[s]-c[s])/2;return i[s]=r.center()[s]-c,C.geometry.transform().translate(i.x,i.y).rotate(e)},qe);function qe(t,e,i,o,r){Xe.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new oe)}zt($,{_autoReflow:!1});var Ze,Ke=$,K=((Ze=Se)&&($e.__proto__=Ze),(($e.prototype=Object.create(Ze&&Ze.prototype)).constructor=$e).prototype.hide=function(){this.options.visible=!1},$e.prototype.show=function(){this.options.visible=!0},$e.prototype.render=function(){var t,e,i,o,r,n,s,a,p=this,h=this.options;h.visible&&(i=h.label,a=h.icon,o=new oe,r=function(){return p},n=a.size,s=this.fields.text,At(i)&&i.visible&&((h=nt(i))?s=h(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color="inside"===i.position?"#fff":a.background),this.label=new Ge(s,L({},i)),this.label.aliasFor=r,"inside"!==i.position||At(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new Ce(L({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new oe),this.wrapperBox=o.wrap(a.box))},$e.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(dt(l,[S,k])?l===S?(o=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[o.x2,p.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[o.x1,p.y]],i=o.clone().wrapPoint(e))):l===w?(o=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},$e.prototype.createVisual=function(){Ze.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},$e.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):Ze.prototype.renderVisual.call(this)},$e.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(T(t=C.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},$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){e=this.eventArgs(e);t.trigger("noteLeave",e)},$e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Ct(t),text:At(e.label)?e.label.text:"",visual:this.visual})},$e);function $e(t,e,i){Ze.call(this,e),this.fields=t,this.chartService=i,this.render()}zt(K,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:A,vAlign:A},line:{visible:!0},visible:!0,position:P,zIndex:2});var Qe=K;function Je(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new C.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),T(n),n}function ti(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new C.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),T(e),e}var ei,tt=((ei=be)&&(ii.__proto__=ei),((ii.prototype=Object.create(ei&&ei.prototype)).constructor=ii).prototype.initFields=function(){},ii.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},ii.prototype.normalizeLabelRotation=function(t){var e=t.rotation;z(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},ii.prototype.createLabels=function(){var t=this.options,e=t.vertical?k:A,i=L({},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},s=this.createAxisLabel(n,i,s);s&&(this.append(s),this.labels.push(s))}}},ii.prototype.clearLabels=function(){this.children=ht(this.children,function(t){return!(t instanceof Ke)}),this.labels=[]},ii.prototype.clearTitle=function(){var e=this;this.title&&(this.children=ht(this.children,function(t){return t!==e.title}),this.title=void 0)},ii.prototype.clear=function(){this.clearLabels(),this.clearTitle()},ii.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new oe(r,e.y1,r,e.y2-t):new oe(e.x1,o,e.x2-t,o)},ii.prototype.createTitle=function(){var t=this.options,t=L({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Ge(t.text,t),this.append(t),this.title=t)},ii.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=L({},e,i[o]);r.value=this.parseNoteValue(r.value);r=new Qe({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(At(r.options.position)?t.vertical&&!dt(r.options.position,[S,k])?r.options.position=t.reverse?S:k:t.vertical||dt(r.options.position,[P,w])||(r.options.position=t.reverse?w:P):t.vertical?r.options.position=t.reverse?S:k:r.options.position=t.reverse?w:P,this.append(r),this.notes.push(r))}},ii.prototype.parseNoteValue=function(t){return t},ii.prototype.renderVisual=function(){ei.prototype.renderVisual.call(this),this.createPlotBands()},ii.prototype.createVisual=function(){ei.prototype.createVisual.call(this),this.createBackground(),this.createLine()},ii.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new C.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},ii.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function i(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)At(i)&&n%i==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(Je(h,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},ii.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new C.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&T(e),(t=this._lineGroup=new C.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},ii.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},ii.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=C.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},ii.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),s=ht(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var p=i[a],h=void 0,l=void 0,c=p.label,u=void 0,l=o?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,p,new oe(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(l=new C.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),p=C.drawing.Path.fromRect(l,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(p),u&&n.append(u))}this.appendVisual(n)}},ii.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;return At(t)&&t.visible&&((o=nt(t))?r=o({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(t=new Ge(r,t)).reflow(i),t.renderVisual(),t.visual},ii.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(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 s=It(t[n]);dt(s,l)||n%i==0||a&&p===s||(h.position=s,c.append(ti(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},ii.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",o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=i[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new oe(t.x1,t.y1,t.x1+h+a,t.y2):new oe(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},ii.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},ii.prototype.labelTickIndex=function(t){return t.index},ii.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,p=void 0,p=o?u=i?l+(c-l)/2-h/2:l-h/2:i?(u=l,c):(u=l-h/2)+h;this.positionLabel(a,r,u,p)}},ii.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,a=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=S):(n-=r+t.box.width(),t.options.rotationOrigin=k),t.box.move(n,i)):(a=s.y1,e?(a-=r+t.box.height(),t.options.rotationOrigin=w):(a+=r,t.options.rotationOrigin=P),new oe(i,a,o,a+t.box.height()));t.reflow(a)},ii.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},ii.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,n=this.autoRotateLabelAngle(s,n);if(-90===(o=0!==n?n:o))break}if(0!==o){for(var a=0;a<e.length;a++)e[a].options.rotation=o,e[a].reflow(new oe);return!0}},ii.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=i?k:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?P:w),e.reflow(this.box))},ii.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;At(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},ii.prototype.noteSlot=function(t){return this.getSlot(t)},ii.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,t=i?m:v;this.box.snapTo(e,t),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},ii.prototype.axisLabelText=function(t,e,i){function o(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=nt(e),i=n?n(Object.assign({},i,{get text(){return o()},value:t,format:e.format,culture:e.culture})):o();return i},ii.prototype.slot=function(t,e,i){i=this.getSlot(t,e,i);if(i)return i.toRect()},ii.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),i[t+1]-=e.start,i[t+2]+=e.end):(o[0].options.visible&&i.wrap(o[0].box),(o=o[o.length-1]).options.visible&&i.wrap(o.box))),i},ii.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;i?(d=o[u+s],f=o[u+a]):d=f=o[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-f)}return{start:p,end:h}},ii.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!At(n.min)||n.min<=i)||o<e&&0<r&&(!At(n.max)||o<=n.max))return null;if(e<i&&0<r||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<i&&r<0?(a=Rt(t,i,o),n=Rt(t+s,i+s,o)):o<e&&0<r&&(n=Rt(e,i,o),a=Rt(e-s,i,o-s)),{min:a,max:n}},ii.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},ii.prototype.labelsBetweenTicks=function(){return!this.options.justified},ii.prototype.prepareUserOptions=function(){},ii);function ii(t,e){void 0===e&&(e=new J),ei.call(this,t),this.chartService=e,this.options.visible||(this.options=L({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=L({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==n},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=L({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==n},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}zt(tt,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:r,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:n,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:r,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var oi=tt,ri="milliseconds",ni="seconds",si="minutes",ai="hours",pi="days",hi="weeks",li="months",ci="years",ui=1e3,di=60*ui,fi=60*di,gi=24*fi,yi=7*gi,vi=31*gi,mi=365*gi,xi={years:mi,months:vi,weeks:yi,days:gi,hours:fi,minutes:di,seconds:ui,milliseconds:1};function bi(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*di}function _i(t,e){return new Date(t.getTime()+e)}function wi(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Ai(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function Si(t,e,i,r){var o,n,s,a=t;return t&&(s=(o=wi(t)).getHours(),i===ci?Ai(a=new Date(o.getFullYear()+e,0,1),0):i===li?Ai(a=new Date(o.getFullYear(),o.getMonth()+e,1),s):i===hi?Ai(a=Si(function(t,e){void 0===r&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return _i(t,-i*gi)}(o,r),7*e,pi),s):i===pi?Ai(a=new Date(o.getFullYear(),o.getMonth(),o.getDate()+e),s):i===ai?(n=o,t=e,(s=new Date(n)).setMinutes(0,0,0),a=_i(s,(n.getTimezoneOffset()-s.getTimezoneOffset())*di+t*fi)):i===si?0<(a=_i(o,e*di)).getSeconds()&&a.setSeconds(0):i===ni?a=_i(o,e*ui):i===ri&&(a=_i(o,e)),i!==ri&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function ki(t,e,i){return Si(wi(t),0,e,i)}function Pi(t,e,i){t=wi(t);return t&&ki(t,e,i).getTime()===t.getTime()?t:Si(t,1,e,i)}function Ci(t,e){return t&&e?t.getTime()-e.getTime():-1}function Ti(t,e){return t.getTime()-e}function Mi(t){if(x(t)){for(var e=[],i=0;i<t.length;i++)e.push(Mi(t[i]));return e}if(t)return wi(t).getTime()}function Ri(t,e){return t&&e?Mi(t)===Mi(e):t===e}function Oi(t,e,i){return bi(t,e)/xi[i]}function Bi(t,e,i,o){var r=wi(t),t=wi(e);return(i===li?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+Oi(r,new Date(r.getFullYear(),r.getMonth()),pi)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===ci?r.getFullYear()-t.getFullYear()+Bi(r,new Date(r.getFullYear(),0),li,1)/12:i===pi||i===hi?Oi(r,t,i):Ti(r,e)/xi[i])/o}function Ii(t,e,i){return i===ci?e.getFullYear()-t.getFullYear():i===li?12*Ii(t,e,ci)+e.getMonth()-t.getMonth():i===pi?Math.floor(Ti(e,t)/gi):Math.floor(Ti(e,t)/xi[i])}function Vi(t,e){return O(e)&&t.parseDate(e)||wi(e)}function ji(t,e){if(x(e)){for(var i=[],o=0;o<e.length;o++)i.push(Vi(t,e[o]));return i}return Vi(t,e)}function Li(t,e){return R(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var zi,ot=((zi=oi)&&(Ei.__proto__=zi),((Ei.prototype=Object.create(zi&&zi.prototype)).constructor=Ei).prototype.initFields=function(){this._ticks={}},Ei.prototype.categoriesHash=function(){return""},Ei.prototype.clone=function(){var t=new Ei(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Ei.prototype.initUserOptions=function(t){var e=t.categories||[],i=At(t.min),o=At(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,e=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,e)),t},Ei.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:R(t.min)?t.min%1:0,max:R(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Ei.prototype.totalRangeIndices=function(t){var e=this.options,i=R(e.min)?e.min:0;return e=R(e.max)?e.max:R(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=Rt(i,0,t.max),e=Rt(e,0,t.max)),{min:i,max:e}},Ei.prototype.range=function(){var t=this.options;return{min:R(t.min)?t.min:0,max:(R(t.max)?t:this.totalRange()).max}},Ei.prototype.roundedRange=function(){return this.range()},Ei.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Ei.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(i-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:i}},Ei.prototype.arrangeLabels=function(){zi.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Ei.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;0<r.length&&(e=o[(t=this.options.vertical?m:v)+1],i=o[t+2],o=r[0],r=Mt(r),(o.box[t+1]>i||o.box[t+2]<e)&&(o.options.visible=!1),(r.box[t+1]>i||r.box[t+2]<e)&&(r.options.visible=!1))},Ei.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Ei.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Ei.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Ei.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,e=e.max,o=Math.ceil(e),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},Ei.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(i?m:v)+(o?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+It(n*(p[l]-s),3));return h},Ei.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},Ei.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?m:v,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])&&0<=s;)s--;return t.slice(n,s+1)},Ei.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?m:v,u=h[c+(r?2:1)],o=h.clone(),a=!At(e),s=jt(t,0),t=jt(e,s),t=Math.max(t-1,s),e=u+(s-l)*p,p=u+((t=Math.max(s,t))+1-l)*p;return a&&n&&(p=e),i&&(e=Rt(e,h[c+1],h[c+2]),p=Rt(p,h[c+1],h[c+2])),o[c+1]=r?p:e,o[c+2]=r?e:p,o},Ei.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,i=this.lineBox(),o=t.clone();return o[e+1]=Rt(t[e+1],i[e+1],i[e+2]),o[e+2]=Rt(t[e+2],i[e+1],i[e+2]),o},Ei.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):R(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):R(e)&&(e-=o),zi.prototype.slot.call(this,t,e,i)},Ei.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,e=n.max,n=a[r+1],a=a[r+2],r=t[r];if(r<n||a<r)return null;n=(i?e:p)+(r-n)/s,s=n%1;return o?n=Math.round(n):0==s&&0<n&&n--,Math.floor(n)},Ei.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Ei.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Ei.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},Ei.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Ei.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,i=It(t/(i/e),g);return{min:i,max:e+i}},Ei.prototype.zoomRange=function(t){var e=this.totalRangeIndices(),i=this.totalRange(),o=i.min,r=i.max,i=Rt(e.min+t,o,r),r=Rt(e.max-t,o,r);if(0<r-i)return{min:i,max:r}},Ei.prototype.scaleRange=function(t){var e=this.options.categories.length,t=t*e;return{min:-t,max:e+t}},Ei.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Ei.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.totalRangeIndices(!0),r=o.min,n=o.max,o=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-o,max:(t.categories.length?n+(e?1:0):0)-o}},Ei.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,o=jt(o.categories[t],"");i.dataItem=r;i=this.axisLabelText(o,e,i);return new Ke(o,i,t,r,e)},Ei.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Ei.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},Ei.prototype.arrangeNotes=function(){zi.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Ei.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?m:v,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()}},Ei.prototype.pan=function(t){var e=this.totalRangeIndices(!0),i=this.scaleOptions().scale,o=It(t/i,g),t=this.totalRange(),i=e.min+o,e=e.max+o;return this.limitRange(i,e,0,t.max,o)},Ei.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),i=s.scale,o=s.box[r+(o?2:1)],t=t[r]-o,o=e[r]-o,t=n.min+t/i,o=n.min+o/i,i=Math.min(t,o),o=Math.max(t,o);if(.01<=o-i)return{min:i,max:o}},Ei.prototype.valueRange=function(){return this.range()},Ei.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(Ri(e[o],t))return o;return-1}return e.indexOf(t)}(t,e.srcCategories)},Ei.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=R(t.min)?Math.floor(t.min):e,max:R(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Ei.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ut,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},Ei.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},Ei);function Ei(){zi.apply(this,arguments)}zt(ot,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:r},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Fi=ot,ct={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"},Ui=[ri,ni,si,ai,pi,hi,li,ci],Di="fit";function Hi(t){var e=t._range;return e||((e=t._range=Et(t)).min=wi(e.min),e.max=wi(e.max)),e}function Gi(t){this.options=t}Gi.prototype.displayIndices=function(){return{min:0,max:1}},Gi.prototype.displayRange=function(){return{}},Gi.prototype.total=function(){return{}},Gi.prototype.valueRange=function(){return{}},Gi.prototype.valueIndex=function(){return-1},Gi.prototype.values=function(){return[]},Gi.prototype.totalIndex=function(){return-1},Gi.prototype.valuesCount=function(){return 0},Gi.prototype.totalCount=function(){return 0},Gi.prototype.dateAt=function(){return null};function Ni(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=Si(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Ri(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,(t=i.max)?(a=!r&&Ri(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,a),this.displayEnd=o?this.roundToTotalStep(t,!r):i.max):(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 Wi(t,e,i){for(var o,r,n,s=Hi(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===Di,c=e?Ui.indexOf(e):0,u=l?Ui[c++]:t.baseUnit,d=a/xi[u],f=d;!r||h<=d;){for(o=o||p[u].slice(0);(n=o.shift())&&e===u&&n<i;);if(n)d=f/(r=n);else{if(u===Mt(Ui)){r=Math.ceil(f/h);break}if(!l){h<d&&(r=Math.ceil(f/h));break}u=Ui[c++]||Mt(Ui),f=a/xi[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function Xi(t){var e=(t.baseUnit||"").toLowerCase();return e===Di||dt(e,Ui)||function(t){for(var e,i,o=t.categories,r=At(o)?o.length:0,n=l,s=0;s<r;s++){var a,p=o[s];p&&e&&(0<(a=bi(p,e))&&(i=(n=Math.min(n,a))>=mi?ci:vi-3*gi<=n?li:yi<=n?hi:gi<=n?pi:fi<=n?ai:di<=n?si:ni)),e=p}t.baseUnit=i||pi}(t),e!==Di&&"auto"!==t.baseUnitStep||Wi(t),t}Ni.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ni.prototype.displayIndices=function(){var t,e,i;return this._indices||(t=(e=this.options).baseUnit,i=e.baseUnitStep,e=Bi(this.displayStart,this.valueStart,t,i),i=Bi(this.displayEnd,this.valueStart,t,i),this._indices={min:e,max:i}),this._indices},Ni.prototype.total=function(){return{min:this.start,max:this.end}},Ni.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ni.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ni.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Bi(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ni.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Bi(t,this.start,e.baseUnit,e.baseUnitStep))},Ni.prototype.dateIndex=function(t){var e=this.options;return Bi(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ni.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ni.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=Si(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ni.prototype.dateAt=function(t,e){var i=this.options;return Si(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},Ni.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,o=this.start,t=Bi(t,o,r,n),t=e?Math.ceil(t):Math.floor(t);return i&&(t+=i),Si(o,t*n,r,s)};var Yi,gt=((Yi=Fi)&&(qi.__proto__=Yi),((qi.prototype=Object.create(Yi&&Yi.prototype)).constructor=qi).prototype.clone=function(){var t=new qi(Object.assign({},this.options),this.chartService);return t.createLabels(),t},qi.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},qi.prototype.initUserOptions=function(t){return t},qi.prototype.initFields=function(){Yi.prototype.initFields.call(this);var t=this.chartService,e=t.intl,i=this.options,o=i.categories||[];o._parsed||((o=ji(e,o))._parsed=!0),i=L({roundToBaseUnit:!0},i,{categories:o,min:Vi(e,i.min),max:Vi(e,i.max),weekStartDay:Li(i,e)}),t.panning&&t.isPannable(i.vertical?m:v)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,0<((this.options=i).srcCategories=o).length?(e=Hi(o),t=i.maxDivisions,this.dataRange=new Ni(e.min,e.max,Xi(i)),t?(o=this.dataRange.displayRange(),Wi(o=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:o.min,max:o.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Ni(e.min,e.max,o)):this.divisionRange=this.dataRange):(i.baseUnit=i.baseUnit||pi,this.dataRange=this.divisionRange=new Gi(i)),this.rangeLabels=[]},qi.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return Yi.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&(a=r.length-1,r.splice(p,0,r[a-1]+(r[a]-r[a-1])*t));return r},qi.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=Ci(t,e.min)&&Ci(t,e.max)<=0&&i.length},qi.prototype.parseNoteValue=function(t){return Vi(this.chartService.intl,t)},qi.prototype.noteSlot=function(t){return this.getSlot(t)},qi.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=It(t/r,g);return n.min&&n.max&&(r=_i(e.min||n.min,t),t=_i(e.max||n.max,t),n={min:Si(r,0,i,o),max:Si(t,0,i,o)}),n},qi.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=Ti(o,r),n=Math.round(.1*n),r=t<0?(o=_i(o,n),_i(r,-n)):(o=_i(o,-n),_i(r,n));i={min:o,max:r}}return i},qi.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},qi.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,i=r.max,r=this.dataRange.total(),o=It(t/(o/(i-n)),g)*(e.reverse?-1:1),n=_i(n,o),i=_i(i,o),o=this.limitRange(Mi(n),Mi(i),Mi(r.min),Mi(r.max),o);return o?(o.min=wi(o.min),o.max=wi(o.max),o.baseUnit=e.baseUnit,o.baseUnitStep=e.baseUnitStep||1,o.userSetBaseUnit=e.userSetBaseUnit,o.userSetBaseUnitStep=e.userSetBaseUnitStep,o):void 0},qi.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var i=Yi.prototype.pointsRange.call(this,t,e),o=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=Ti(o.max,o.min)/(t.max-t.min),t=this.options;return{min:_i(o.min,i.min*e),max:_i(o.min,i.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},qi.prototype.zoomRange=function(t){if(this.isEmpty())return null;var e=this.options,i=e.userSetBaseUnit===Di,o=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.options,p=a.weekStartDay,h=a.baseUnit,r=a.baseUnitStep,a=Si(n,t*r,h,p),t=Si(s,-t*r,h,p);if(i){var l,c,u=e.autoBaseUnitSteps,r=e.maxDateGroups,p=Mt(u[h])*r*xi[h],d=Ti(s,n),i=Ti(t,a),f=Ui.indexOf(h);if(i<xi[h]&&h!==ri)h=Ui[f-1],a=_i(n,c=(d-(r-1)*(l=Mt(u[h]))*xi[h])/2),t=_i(s,-c);else if(p<i&&h!==ci){var g=0;do{for(h=Ui[++f],g=0,c=2*xi[h];l=u[h][g],++g<u[h].length&&c*l<d;);}while(h!==ci&&c*l<d);0<(c=(c*l-d)/2)&&(a=_i(n,-c),t=_i(s,c),a=_i(a,Rt(t,o.min,o.max)-t),t=_i(t,Rt(a,o.min,o.max)-a))}}return a<o.min&&(a=o.min),t>o.max&&(t=o.max),a&&t&&0<Ti(t,a)?{min:a,max:t,baseUnit:e.userSetBaseUnit||e.baseUnit,baseUnitStep:e.userSetBaseUnitStep||e.baseUnitStep}:void 0},qi.prototype.range=function(){return this.dataRange.displayRange()},qi.prototype.createLabels=function(){Yi.prototype.createLabels.call(this),this.createRangeLabels()},qi.prototype.clearLabels=function(){Yi.prototype.clearLabels.call(this),this.rangeLabels=[]},qi.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Yi.prototype.arrangeLabels.call(this)},qi.prototype.arrangeRangeLabels=function(){var t,e,i,o,r=this.options,n=this.rangeLabels;0!==n.length&&(o=this.lineBox(),t=r.vertical,e=r.rangeLabels.mirror||r.labels.mirror,(i=n[0])&&(r=t?o.y1-i.box.height()/2:o.x1,this.positionLabel(i,e,r)),(n=n[1])&&(o=t?o.y2-n.box.height()/2:o.x2,this.positionLabel(n,e,o)))},qi.prototype.autoRotateLabels=function(){Yi.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},qi.prototype.hideOutOfRangeLabels=function(){Yi.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},qi.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&&s(i,e[o]);o++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return(!e.options.visible||e.box.overlaps(t.box))&&(e.options.visible=!1,1)}},qi.prototype.contentBox=function(){for(var t=Yi.prototype.contentBox.call(this),e=this.rangeLabels,i=0;i<e.length;i++){var o=e[i];o.options.visible&&t.wrap(o.box)}return t},qi.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),o=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||o,i.dataItem=r;i=this.axisLabelText(n,e,i);if(i)return new Ke(n,i,t,r,e)},qi.prototype.createRangeLabels=function(){var o=this,t=this.divisionRange,e=t.displayStart,i=t.displayEnd,t=this.options,r=Object.assign({},t.labels,t.rangeLabels,{align:A,zIndex:t.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=A,"auto"===r.rotation&&(r.rotation=0,t.autoRotateRangeLabels=!0),t=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||t,(t=function(t,e,i){i&&(t=new Ke(e,i,t,null,r),o.append(t),o.rangeLabels.push(t))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),t(1,i,this.axisLabelText(i,r,{index:1,count:2})))},qi.prototype.autoRotateRangeLabels=function(){var t,e,o=this,i=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===i.length&&(t=function(t,e,i){i=2*Math.abs(e[i+1]-e[i]),i=o.autoRotateLabelAngle(t.box,i);0!==i&&(t.options.rotation=i,t.reflow(new oe))},e=this.getMajorTickPositions(),t(i[0],e,0),t(i[1],e,e.length-2))},qi.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},qi.prototype.slot=function(t,e,i){var o=this.dataRange,t=t,e=e;t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e));i=this.getSlot(t,e,i);if(i)return i.toRect()},qi.prototype.getSlot=function(t,e,i){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),Yi.prototype.getSlot.call(this,t,e,i)},qi.prototype.valueRange=function(){var t=Hi(this.options.srcCategories);return{min:wi(t.min),max:wi(t.max)}},qi.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},qi.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},qi.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},qi.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},qi.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},qi.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},qi.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},qi.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},qi.prototype.totalRange=function(){return this.dataRange.total()},qi.prototype.totalCount=function(){return this.dataRange.totalCount()},qi.prototype.isEmpty=function(){return!this.options.srcCategories.length},qi.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Hi(t.srcCategories);return new Ni(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},qi);function qi(){Yi.apply(this,arguments)}zt(gt,{type:y,labels:{dateFormats:ct},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 Zi=gt;function Ki(t,e){return It(Math.floor(t/e)*e,g)}function $i(t,e){return It(Math.ceil(t/e)*e,g)}function Qi(t){return Math.max(Math.min(t,3e5),-3e5)}var Ji,to=Math.pow(10,-9),bt=((Ji=oi)&&(eo.__proto__=Ji),((eo.prototype=Object.create(Ji&&Ji.prototype)).constructor=eo).prototype.initUserOptions=function(t){var i,e,o,r,n,s,a,n=(a=t.seriesMin,i=t.seriesMax,o=(e=t).narrowRange,r=function(t){if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e}(a),n=function(t,e,i){if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;o=Math.min(0,o-(t-o)/2)}else o=e;return o}(a,i,o),s=$t(r,n),!(a={majorUnit:s})!==e.roundToMajorUnit&&(r<0&&io(r,s,1/3)&&(r-=s),0<n&&io(n,s,1/3)&&(n+=s)),a.min=Ki(r,s),a.max=$i(n,s),a);return this.totalOptions=(s=n,{min:At((a=t).min)?Math.min(s.min,a.min):s.min,max:At(a.max)?Math.max(s.max,a.max):s.max,majorUnit:s.majorUnit}),function(t,e){var i,o,r,n=e;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=At(e.min),o=At(e.max),(r=i||o)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=Ki(t.min,e.majorUnit),t.max=$i(t.max,e.majorUnit)):r&&(n=L(t,e),t.majorUnit=$t(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=L(t,n);return n.min>=n.max&&(i&&!o?n.max=n.min+n.majorUnit:!i&&o&&(n.min=n.max-n.majorUnit)),n}(n,t)},eo.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},eo.prototype.clone=function(){return new eo(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},eo.prototype.startValue=function(){return 0},eo.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},eo.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(It(e/t,3))+1},eo.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?m:v)+(1==p?1:2)],c=0;e&&(c=e/t);for(var u=0;u<a;u++)u%c!=0&&h.push(It(l,3)),l+=s*p;return h},eo.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},eo.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},eo.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o,r=this.options,n=r.vertical,s=r.reverse,a=n?m:v,p=this.lineBox(),h=p[a+(s?2:1)],l=(s?-1:1)*((n?p.height():p.width())/(r.max-r.min)),p=new oe(p.x1,p.y1,p.x1,p.y1),t=t,e=e;return At(t)||(t=e||0),At(e)||(e=t||0),i&&(t=Math.max(Math.min(t,r.max),r.min),e=Math.max(Math.min(e,r.max),r.min)),r=n?(o=r.max-Math.max(t,e),r.max-Math.min(t,e)):(o=Math.min(t,e)-r.min,Math.max(t,e)-r.min),p[a+1]=Qi(h+l*(s?r:o)),p[a+2]=Qi(h+l*(s?o:r)),p},eo.prototype.getValue=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=Number(e.max),n=Number(e.min),s=i?m:v,a=this.lineBox(),e=a[s+(o?2:1)],a=i?a.height():a.width(),s=(o?-1:1)*(t[s]-e),e=(r-n)/a*s;return s<0||a<s?null:It(i?r-e:n+e,g)},eo.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,e=this.lineBox(),e=i?e.height():e.width(),e=It(t/(e/(r-n)),g);return{min:n+(e=!(!i&&!o||i&&o)?-e:e),max:r+e,offset:e}},eo.prototype.scaleRange=function(t){var e=this.options,t=-t*e.majorUnit;return{min:e.min-t,max:e.max+t}},eo.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},eo.prototype.createAxisLabel=function(t,e,i){var o=this.options,o=It(o.min+t*o.majorUnit,g),i=this.axisLabelText(o,e,i);return new Ke(o,i,t,null,e)},eo.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},eo.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},eo.prototype.pointsRange=function(t,e){var i=this.getValue(t),t=this.getValue(e),e=Math.min(i,t),t=Math.max(i,t);if(this.isValidRange(e,t))return{min:e,max:t}},eo.prototype.zoomRange=function(t){var e=this.totalMin,i=this.totalMax,o=this.scaleRange(t),t=Rt(o.min,e,i),i=Rt(o.max,e,i);if(this.isValidRange(t,i))return{min:t,max:i}},eo.prototype.isValidRange=function(t,e){return to<e-t},eo);function eo(t,e,i,o){Ji.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function io(t,e,i){t=It(Math.abs(t%e),g);return 0===t||e*(1-i)<t}zt(bt,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},labels:{format:"#.####################"},zIndex:1});var oo,ro=bt,Yt=((oo=oi)&&(no.__proto__=oo),((no.prototype=Object.create(oo&&oo.prototype)).constructor=no).prototype.clone=function(){return new no(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},no.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},no.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Ii(e.min,e.max,e.baseUnit)/t+1)},no.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?m:v)+(1==r?1:2)],s=this.getDivisions(t),a=Ti(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+Ti(Si(e.min,c*t,e.baseUnit,h),e.min)*p*r;l.push(It(u,3))}return l},no.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},no.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},no.prototype.getSlot=function(t,e,i){return ro.prototype.getSlot.call(this,Vi(this.intlService,t),Vi(this.intlService,e),i)},no.prototype.getValue=function(t){t=ro.prototype.getValue.call(this,t);return null!==t?wi(t):null},no.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},no.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min;0<r&&(s=Si(s,r,o.baseUnit,n));o=e.dateFormats[o.baseUnit];e.format=e.format||o;i=this.axisLabelText(s,e,i);return new Ke(s,i,t,null,e)},no.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(),n=this.range(),n=s/Ti(n.max,n.min),t=It(t/n,g)*(i.reverse?-1:1),n=_i(i.min,t),i=_i(i.max,t);return e||(n=Si(n,0,o,r),i=Si(i,0,o,r)),{min:n,max:i,offset:t}},no.prototype.scaleRange=function(t){for(var e=this.options,i=e.min,o=e.max,r=Math.abs(t);r--;)var n=Ti(i,o),n=Math.round(.1*n),o=t<0?(i=_i(i,n),_i(o,-n)):(i=_i(i,-n),_i(o,n));return{min:i,max:o}},no.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Ci(t,e.min)&&Ci(t,e.max)<=0},no.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Mi(t.min),Mi(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:wi(t.min),max:wi(t.max)}},no.prototype.pointsRange=function(t,e){var i=this.getValue(t),t=this.getValue(e),e=Math.min(i,t),t=Math.max(i,t);return{min:wi(e),max:wi(t)}},no.prototype.zoomRange=function(t){t=this.scaleRange(t);return{min:wi(Rt(Mi(t.min),this.totalMin,this.totalMax)),max:wi(Rt(Mi(t.max),this.totalMin,this.totalMax))}},no);function no(t,e,i,o){var r,n,s,a,p,h=wi(t),l=wi(e),c=o.intl,u=i||{};r=h,n=l,s=u=L(u||{},{min:Vi(c,u.min),max:Vi(c,u.max),axisCrossingValue:ji(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:Li(u,c)}),t=s.min||r,e=s.max||n,i=s.baseUnit||(e&&t?(a=bi(e,t),p=ai,mi<=a?p=ci:vi<=a?p=li:yi<=a?p=hi:gi<=a&&(p=pi),p):ai),r=xi[i],n=s.weekStartDay||0,a=ki(Mi(t)-1,i,n)||wi(e),p=Pi(Mi(e)+1,i,n),t=s.majorUnit||$i($t(a.getTime(),p.getTime()),r)/r,e=Ii(a,p,i),r=$i(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||i,s.min=s.min||Si(a,-e,i,n),s.max=s.max||Si(p,r,i,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,oo.call(this,u=s,o),this.intlService=c,this.seriesMin=h,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=Mi(ki(Mi(h)-1,u.baseUnit,c)),this.totalMax=Mi(Pi(Mi(l)+1,u.baseUnit,c))}zt(Yt,{type:y,majorGridLines:{visible:!0,width:1,color:r},labels:{dateFormats:ct}});var so,ao=Yt,Zt=((so=oi)&&(po.__proto__=so),((po.prototype=Object.create(so&&so.prototype)).constructor=po).prototype.clone=function(){return new po(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},po.prototype.startValue=function(){return this.options.min},po.prototype.getSlot=function(t,e,i){var o,r=this.options,n=this.logMin,s=this.logMax,a=r.reverse,p=r.vertical,h=r.majorUnit,l=p?m:v,c=this.lineBox(),u=c[l+(a?2:1)],d=(p?c.height():c.width())/(s-n)*(a?-1:1),c=new oe(c.x1,c.y1,c.x1,c.y1),t=t,e=e;return At(t)||(t=e||1),At(e)||(e=t||1),t<=0||e<=0?null:(i&&(t=Math.max(Math.min(t,r.max),r.min),e=Math.max(Math.min(e,r.max),r.min)),t=lo(t,h),e=lo(e,h),n=p?(o=s-Math.max(t,e),s-Math.min(t,e)):(o=Math.min(t,e)-n,Math.max(t,e)-n),c[l+1]=Qi(u+d*(a?n:o)),c[l+2]=Qi(u+d*(a?o:n)),c)},po.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,e=1==p?1:2,r=n?a.height():a.width(),n=n?m:v,e=a[n+e],e=p*(t[n]-e);return e<0||r<e?null:It(Math.pow(s,i+e*((o-i)/r)),g)},po.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},po.prototype.scaleRange=function(t){var e=this.options.majorUnit,t=-t;return{min:Math.pow(e,this.logMin-t),max:Math.pow(e,this.logMax+t)}},po.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=It(t/(e/(o-i)),g);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,i+e),max:Math.pow(s,o+e),offset:e}},po.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},po.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},po.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(Je(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),o.visible&&this.traverseMinorTicksPositions(p,o),[]},po.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){dt(t,n)||(r.position=t,s.append(ti(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},po.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(It(o+r*(a-n),g),e)},po.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this._lineOptions(),a=i.lineStart,p=i.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;o<=f&&t(It(a+p*(lo(f,s)-h),g),e)}},po.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,o),i=this.axisLabelText(o,e,i);return new Ke(o,i,t,null,e)},po.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},po.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},po.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},po.prototype.zoomRange=function(t){var e=this.options,i=this.totalMin,o=this.totalMax,r=this.scaleRange(t),n=Rt(r.min,i,o),s=Rt(r.max,i,o),t=e.majorUnit,r=n<s&&e.min&&e.max&&It(lo(e.max,t)-lo(e.min,t),g)<1,t=!(e.min===i&&e.max===o)&&1<=It(lo(s,t)-lo(n,t),g);if(r||t)return{min:n,max:s}},po.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,e=Math.pow(o,t);return{value:e,minorStep:(Math.pow(o,t+1)-e)/i}},po.prototype._lineOptions=function(){var t=this.options,e=t.reverse,i=t.vertical,o=i?m:v,r=this.lineBox(),t=i===e?1:-1,e=1==t?1:2;return{step:t*((i?r.height():r.width())/(this.logMax-this.logMin)),lineStart:r[o+e],lineBox:r}},po);function po(t,e,i,o){var r,n,s,a,p,h,l,c=L({majorUnit:10,min:t,max:e},i),u=c.majorUnit,d=(l=It(lo(p=e,h=u),g)%1,p<=0?h:0!=l&&(l<.3||.9<l)?Math.pow(h,lo(p,h)+.2):Math.pow(h,Math.ceil(lo(p,h)))),l=(r=t,s=(n=c).majorUnit,(a=r)<=0?a=e<=1?Math.pow(s,-2):1:n.narrowRange||(a=Math.pow(s,Math.floor(lo(r,s)))),a),a=(p=l,h=d,n=i,s=(r=c).min,a=r.max,At(r.axisCrossingValue)&&r.axisCrossingValue<=0&&ho(),At(n.max)?n.max<=0&&ho():a=h,At(n.min)?n.min<=0&&ho():s=p,{min:s,max:a});c.max=a.max,c.min=a.min,c.minorUnit=i.minorUnit||It(u-1,g),so.call(this,c,o),this.totalMin=At(i.min)?Math.min(l,i.min):l,this.totalMax=At(i.max)?Math.max(d,i.max):d,this.logMin=It(lo(a.min,u),g),this.logMax=It(lo(a.max,u),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function ho(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function lo(t,e){return Math.log(t)/Math.log(e)}zt(Zt,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},zIndex:1,_deferLabels:!0});var co,uo=Zt,ce={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),_t(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){r=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,r)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new C.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new C.drawing.Path(r);o&&(n.radius=o(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,r=this.intervals(e,i,o,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return vt(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},ve=((co=Fi)&&(fo.__proto__=co),((fo.prototype=Object.create(co&&co.prototype)).constructor=fo).prototype.range=function(){return{min:0,max:this.options.categories.length}},fo.prototype.reflow=function(t){this.box=t,this.reflowLabels()},fo.prototype.lineBox=function(){return this.box},fo.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new oe,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()))}},fo.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=i||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=It(r,3)%360,o&&dt(r,o)||h.push(r);return h},fo.prototype.majorIntervals=function(){return this.intervals(1)},fo.prototype.minorIntervals=function(){return this.intervals(.5)},fo.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},fo.prototype.majorAngles=function(){var e=this;return vt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},fo.prototype.createLine=function(){return[]},fo.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},fo.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,i=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,i)},fo.prototype.radiusCallback=function(e,t,i){if(t.options.type!==d){var t=Bt(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles();return function(t){return!i&&dt(t,r)?e:o}}},fo.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new C.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;o=ye.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(o)}this.appendVisual(e)},fo.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},fo.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;i.reverse&&!o&&(t=(t+1)%s);n=n[t=Rt(Math.floor(t),0,s-1)];o&&(n-=a/2)<0&&(n+=360);t=a*(Rt(Math.ceil(e||t),t,s-1)-t+1);return new he(r.center(),0,r.height()/2,n,t)},fo.prototype.slot=function(t,e){var i=this.getSlot(t,e),t=i.startAngle+180,e=t+i.angle;return new C.geometry.Arc([i.center.x,i.center.y],{startAngle:t,endAngle:e,radiusX:i.radius,radiusY:i.radius})},fo.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},fo);function fo(){co.apply(this,arguments)}zt(ve,{startAngle:90,labels:{margin:D(10)},majorGridLines:{visible:!0},justified:!0}),L(ve.prototype,ce);var go,yo=ve,_e=((go=oi)&&(vo.__proto__=go),((vo.prototype=Object.create(go&&go.prototype)).constructor=vo).prototype.getDivisions=function(t){return ro.prototype.getDivisions.call(this,t)-1},vo.prototype.reflow=function(t){this.box=t,this.reflowLabels()},vo.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new oe,n=this.intervals(t.majorUnit,o,i),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},vo.prototype.lineBox=function(){return this.box},vo.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&&dt(h,o)||s.push(h)}return s},vo.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},vo.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},vo.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},vo.prototype.createLine=function(){return[]},vo.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},vo.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,r=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,r)},vo.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},vo.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=Rt(t,i.min,i.max),e=Rt(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new he(o.center(),0,o.height()/2,t,e-t)},vo.prototype.slot=function(t,e){var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),e=Math.max(t,e),n=i.reverse?(s=n,e):(s=360-e,360-n),s=(s+o)%360;return new C.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n=(n+o)%360,radiusX:r.radius,radiusY:r.radius})},vo.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,i=t.y-i.y,i=Math.round(St(Math.atan2(i,o))),o=e.startAngle;return e.reverse||(i*=-1,o*=-1),(i+o+360)%360},vo.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},vo);function vo(t,e){go.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}zt(_e,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:D(10)},majorGridLines:{color:r,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),L(_e.prototype,ce,{createPlotBands:yo.prototype.createPlotBands,majorAngles:yo.prototype.majorAngles,range:ro.prototype.range,labelsCount:ro.prototype.labelsCount,createAxisLabel:ro.prototype.createAxisLabel});var mo=_e;function xo(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var bo,ke={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},h=this.getSlot(a.from,a.to,!0),a=new he(r,r.y-h.y2,r.y-h.y1,0,360),h=e===d?ye.current.createRing(a,p):C.drawing.Path.fromPoints(this.plotBandPoints(a,o),p).close();n.append(h)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new C.geometry.Circle(r,t.innerRadius),s=new C.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(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),_t(t,this.renderGridLines(r,i,o,e.minorGridLines))),t},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip;void 0===n&&(n=0);var s=o.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new C.geometry.Circle([t.x,t.y],h);if(o.type===d)a.append(new C.drawing.Circle(l,r));else{for(var c=new C.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(l.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var i,e=this.lineBox(),o=this.plotArea.polarAxis,r=o.majorAngles(),n=o.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(o=t.x-n.x,n=t.y-n.y,i=(St(Math.atan2(n,o))+540)%360,r.sort(function(t,e){return xo(t,i)-xo(e,i)}),o=90-xo(r[0],r[1])/2,r=180-xo(i,r[0])-o,a=s*(Math.sin(Bt(r))/Math.sin(Bt(o)))),this.axisType().prototype.getValue.call(this,new Jt(e.x1,e.y2-a))}},N=((bo=ro)&&(_o.__proto__=bo),((_o.prototype=Object.create(bo&&bo.prototype)).constructor=_o).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},_o.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},_o.prototype.axisType=function(){return bo},_o);function _o(){bo.apply(this,arguments)}L(N.prototype,ke);var wo,Ao=N,G=((wo=uo)&&(So.__proto__=wo),((So.prototype=Object.create(wo&&wo.prototype)).constructor=So).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},So.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},So.prototype.axisType=function(){return wo},So);function So(){wo.apply(this,arguments)}L(G.prototype,ke);var ko=G;function Po(t){return t<=0?-1:1}var Co,To,Mo=((To=C.Class)&&(Bo.__proto__=To),((Bo.prototype=Object.create(To&&To.prototype)).constructor=Bo).prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s=e[0],a=e[1],p=e[2];for(i.push(new C.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return Mt(i).controlOut(this.firstControlPoint(t,s,a,v,m)),i.push(new C.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),i}o?(s=e[r-1],a=e[0],p=e[1],l=(n=this.controlPoints(s,a,p))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var h,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],p=e[d+2],h=this.controlPoints(s,a,p),Mt(i).controlOut(u),u=h[1],h=h[0],i.push(new C.geometry.Segment(a,h)));return o?(s=e[r-2],a=e[r-1],p=e[0],l=this.controlPoints(s,a,p),Mt(i).controlOut(u),i.push(new C.geometry.Segment(a,l[0])),Mt(i).controlOut(l[1]),i.push(new C.geometry.Segment(p,c))):(c=this.tangent(a,p,v,m),Mt(i).controlOut(u),i.push(new C.geometry.Segment(p,this.secondControlPoint(c,a,p,v,m)))),i},Bo.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)},Bo.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},Bo.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||It(o,1)===It(i.y,1)},Bo.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Bo.prototype.controlPoints=function(t,e,i){var o,r=v,n=m,s=!1,a=!1;this.isLine(t,e,i)?o=this.tangent(t,e,v,m):(p={x:this.isMonotonicByField(t,e,i,v),y:this.isMonotonicByField(t,e,i,m)}).x&&p.y?(o=this.tangent(t,i,v,m),s=!0):(this.invertAxis(t,e,i)&&(r=m,n=v),p[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Po((i[n]-t[n])*(e[r]-t[r])):-Po((i[r]-t[r])*(e[n]-t[n]))),a=!0));var p=this.secondControlPoint(o,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,p,o),this.restrictControlPoint(e,i,n,o)),[p,n]},Bo.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)},Bo.prototype.tangent=function(t,e,i,o){i=e[i]-t[i],o=e[o]-t[o];return 0==i?0:o/i},Bo.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},Bo.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},Bo.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],e=i[o],n=.333*(e-n);return this.point(e-n,i[r]-n*t,o,r)},Bo.prototype.point=function(t,e,i,o){var r=new C.geometry.Point;return r[i]=t,r[o]=e,r},Bo.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},Bo),Ro=((Co=C.Class)&&(Oo.__proto__=Co),((Oo.prototype=Object.create(Co&&Co.prototype)).constructor=Oo).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Oo.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},Oo.prototype.range=function(){return this._axis.range()},Oo.prototype.valueRange=function(){return this._axis.valueRange()},Oo);function Oo(t){Co.call(this),this._axis=t,this.options=t.options}function Bo(t){To.call(this),this.closed=t}function Io(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Ro(e[i])}q=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};q.prototype.findAxisByName=function(t){return Io(t,this._pane.axes)};var Vo,jo=q,Lo=((Vo=C.Class)&&(zo.__proto__=Vo),(zo.prototype=Object.create(Vo&&Vo.prototype)).constructor=zo);function zo(t){Vo.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Eo(t){for(var e=t.length,i=0,o=0;o<e;o++)R(t[o])&&i++;return i}var Fo={min:function(t){for(var e=t.length,i=l,o=0;o<e;o++){var r=t[o];R(r)&&(i=Math.min(i,r))}return i===l?t[0]:i},max:function(t){for(var e=t.length,i=c,o=0;o<e;o++){var r=t[o];R(r)&&(i=Math.max(i,r))}return i===c?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];R(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return e=Eo(t)?Fo.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&At(r)&&i++}return i},avg:function(t){var e=Eo(t),i=t[0];return i=0<e?Fo.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&At(o))return o}return t[0]}},Uo=Fo;function Do(t,e){return null===e?e:pt(t)(e)}var Ho,Y=((Ho=C.Class)&&(Go.__proto__=Ho),((Go.prototype=Object.create(Ho&&Ho.prototype)).constructor=Go).prototype.register=function(t,e,i){void 0===e&&(e=[h]),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)}},Go.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Go.prototype.valueFields=function(t){return this._valueFields[t.type]||[h]},Go.prototype.otherFields=function(t){return this._otherFields[t.type]||[h]},Go.prototype.bindPoint=function(t,e,i){var o,r,n,s=t.data,a=At(i)?i:s[e],p={valueFields:{value:a}},i=this.valueFields(t),s=this._otherFields[t.type];return null===a?o=this._nullValue[t.type]:At(a)?Array.isArray(a)?(n=a.slice(i.length),o=this._bindFromArray(a,i),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,i),n=this.sourceFields(t,s),o=this._bindFromObject(a,i,e),r=this._bindFromObject(a,s,n)):o=this._undefinedValue[t.type],At(o)&&(1===i.length?p.valueFields.value=o[i[0]]:p.valueFields=o),p.fields=r||{},p},Go.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},Go.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},Go.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]=Do(a,t))}return o},Go.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===h?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},Go);function Go(){Ho.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Y.current=new Y;var No,Wo,Xo=Y,Yo=/percent(?:\w*)\((\d+)\)/,qo=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Zo=((Wo=C.Class)&&(cr.__proto__=Wo),((cr.prototype=Object.create(Wo&&Wo.prototype)).constructor=cr).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,p=qo.exec(t);p?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),p=p[1]?parseFloat(p[1]):1,n={low:o.value-r*p,high:o.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},cr.prototype.createValueGetter=function(t,e){var i,o=t.data,r=Xo.current,n=r.valueFields(t),o=At(o[0])?o[0]:{};return x(o)?i=pt("["+(e?n.indexOf(e):0)+"]"):R(o)?i=pt():"object"==typeof o&&(i=pt(r.sourceFields(t,n)[n.indexOf(e)])),i},cr.prototype.getErrorRange=function(t,e){if(!At(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))o=t-e[0],r=t+e[1];else if(R(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Yo.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var i=t*(parseFloat(i[1])/100),o=t-Math.abs(i),r=t+Math.abs(i)}return{low:o,high:r}},cr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},cr.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);R(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},cr.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);R(n)&&(i+=n,o++)}return{value:i/o,count:o}},cr),Ko=(C.support.browser||{}).msie?.001:0,$o="zero",Qo="interpolate",Jo="bar",tr="column",er="line",ir="pie",or="verticalLine",rr=[Jo,tr,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],nr="drag",sr="dragEnd",ar="zoom",pr="zoomEnd",hr="DOMMouseScroll mousewheel",$=((No=be)&&(lr.__proto__=No),((lr.prototype=Object.create(No&&No.prototype)).constructor=lr).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,t=a-s,s=a+s;o?(e=[new Jt(n.x,r.y1),new Jt(n.x,r.y2)],i&&e.push(new Jt(t,r.y1),new Jt(s,r.y1),new Jt(t,r.y2),new Jt(s,r.y2)),this.box=new oe(t,r.y1,s,r.y2)):(e=[new Jt(r.x1,n.y),new Jt(r.x2,n.y)],i&&e.push(new Jt(r.x1,t),new Jt(r.x1,s),new Jt(r.x2,t),new Jt(r.x2,s)),this.box=new oe(r.x1,t,r.x2,s)),this.linePoints=e},lr.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},lr.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},lr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};No.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new C.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);T(r),this.visual.append(r)}},lr);function lr(t,e,i,o,r,n){No.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}function cr(t,e,i){Wo.call(this),this.initGlobalRanges(t,e,i)}zt($,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var ur,dr=$,fr=((ur=dr)&&(gr.__proto__=ur),((gr.prototype=Object.create(ur&&ur.prototype)).constructor=gr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},gr);function gr(){ur.apply(this,arguments)}function yr(t,e,i,o){void 0===o&&(o=!1);var r,n,s=(i=void 0===i?{}:i).defaults=i.defaults||{},a=i.depth=i.depth||0,p=!1;if(i.excluded=i.excluded||[],5<a)return null;for(r in t)!dt(r,i.excluded)&&t.hasOwnProperty(r)&&(I(n=t[r])?(p=!0,o||(t[r]=jt(n(e),s[r]))):z(n)&&(o||(i.defaults=s[r]),i.depth++,p=yr(n,e,i,o)||p,i.depth--));return p}function vr(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var mr,K=((mr=be)&&(xr.__proto__=mr),((xr.prototype=Object.create(mr&&mr.prototype)).constructor=xr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},xr.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=L({},i,{vertical:!this.options.invertAxes},t)),o},xr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&R(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,p=i[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||R(p.value)&&(r+=Math.abs(p.value),o.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},xr.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=0<=o,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(typeof h===f&&h!==l)continue;if(h.group&&h.group!==l.group)continue}p=this.plotValue(p);(0<=p&&r||p<0&&!r)&&(n+=p,o+=p,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,B(t.value)?t.value:e]},xr.prototype.stackLimits=function(t,e){for(var i=l,o=c,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];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],At(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},xr.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];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,Et(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,Et(n.positive).max))),p.min!==l||p.max!==c?o[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},xr.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,e=e.fields.errorHigh;R(p)&&R(e)?o={low:p,high:e}:a&&At(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Zo(a.value,n,h),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},xr.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(this.updateRange({value:s},e={categoryIx:e,series:n}),this.updateRange({value:a},e));r=new fr(s,a,o,this,n,r);t.errorBars=[r],t.append(r)},xr.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,i=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<i&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,i)),{low:o,high:i}},xr.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=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,At(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},xr.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];At(a)||(this._evalSeries[n]=a=yr(t,{},s,!0));n=t;return a&&yr(n=L({},t),{value:e,category:i,index:o,series:r,dataItem:r.data[o]},s),n},xr.prototype.updateRange=function(t,e){var i=e.series.axis,e=t.value,t=this.valueAxisRanges[i];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[i]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},xr.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(!e)throw new Error("Unable to locate value axis with name "+t);return e},xr.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var i=e.categoryIx,o=e.series,r=s.seriesValueAxis(o),n=p[l++],e=a[i];e||(a[i]=e=s.categorySlot(h,i,r)),n&&(o=s.plotRange(n,r.startValue()),(i=s.valueSlot(r,o))?(i=s.pointSlot(e,i),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=o[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,i)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},xr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},xr.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Mt(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},xr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},xr.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},xr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},xr.prototype.reflowPoint=function(t,e){t.reflow(e)},xr.prototype.reflowCategories=function(){},xr.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,e=i?t:e;return new oe(o.x1,e.y1,o.x2,e.y2)},xr.prototype.categorySlot=function(t,e){return t.getSlot(e)},xr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=vr(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)},xr.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];r&&(e=r.categoryIx,o(this._bindPoint(t,i,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:i,dataItem:r.item}))},xr.prototype._bindPoint=function(t,e,i,o){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[i]||(r[i]=Xo.current.bindPoint(t,i,o))},xr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},xr.prototype.pointValue=function(t){return t.valueFields.value},xr);function xr(t,e){mr.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}zt(K,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var br,_r=K,wr={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:Ct(t),originalEvent:t,point:this}}},tt={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&At(e)&&null!==e&&(this.note=new Qe({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},ot=((br=be)&&(Ar.__proto__=br),((Ar.prototype=Object.create(br&&br.prototype)).constructor=Ar).prototype.render=function(){var t,e=this.options,i=e.markers,o=e.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(t=nt(o),e=this.pointData(),i=this.value,t?i=t(e):o.format&&(i=this.formatValue(o.format)),this.label=new Ge(i,L({align:A,vAlign:A,margin:{left:5,right:5},zIndex:jt(o.zIndex,this.series.zIndex)},o),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ar.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=L({color:this.color},t.border);return At(t.color)||(t.color=new C.Color(e).brightness(.8).toHex()),t},Ar.prototype.createVisual=function(){},Ar.prototype.createMarker=function(){var t=this.options.markers;return new Ce({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:jt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ar.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ar.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render();var r=(this.box=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);this.note&&(i=this.markerBox(),e.markers.visible&&e.markers.size||(e=i.center(),i=new oe(e.x,e.y,e.x,e.y)),this.note.reflow(i))},Ar.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e="below"===(e="above"===e?P:e)?w:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},Ar.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),t=new Ce({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:jt(t.border.opacity,1)},opacity:jt(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},Ar.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ar.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(i=(e=this.options.markers.size)/2,r=this.box.center(),o=new C.geometry.Rect([r.x-i,r.y-i],[e,e])),{options:this.options,rect:o,visual:t}},Ar.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o=t.x2+5,e=S,t=this.aboveAxis?(i=t.y1,w):(i=t.y2,P);return{point:new Jt(o,i),align:{horizontal:e,vertical:t}}}},Ar.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ar.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ar.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ar.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ar);function Ar(t,e){br.call(this),this.value=t,this.options=e,this.aboveAxis=jt(this.options.aboveAxis,!0),this.tooltipTracking=!0}ot.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:D(3),padding:D(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},L(ot.prototype,wr),L(ot.prototype,tt);var Sr,kr=ot,gt=((Sr=be)&&(Pr.__proto__=Sr),((Pr.prototype=Object.create(Sr&&Sr.prototype)).constructor=Pr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Pr.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},Pr.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&&!At(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Pr.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;I(i)&&o&&(i=o.color);e=C.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},Pr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Pr);function Pr(t,e,i){Sr.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}zt(gt,{closed:!1});var Cr=gt;function Tr(t,e,i,o,r){var n=t.box,t=new C.geometry.Point;return t[e]=n[e+i],t[o]=n[o+r],t}var Mr,bt={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?v:m,n=o?m:v,s=e?2:1,a=s,p=Tr(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=Tr(t[l],r,s,n,a);p[r]!==u[r]&&((c=new C.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return i?p!==Mt(h)&&h.push(p):h.push(Tr(Mt(t),r,s,n,e?1:2)),h}},ct=((Mr=Cr)&&(Rr.__proto__=Mr),((Rr.prototype=Object.create(Mr&&Mr.prototype)).constructor=Rr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Rr);function Rr(){Mr.apply(this,arguments)}L(ct.prototype,bt);var Or,Br,Ir=ct,Vr=((Br=Cr)&&(Lr.__proto__=Br),((Lr.prototype=Object.create(Br&&Br.prototype)).constructor=Lr).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;I(i)&&e&&(i=e.color);e=new Mo(this.options.closed).process(this.points()),t=new C.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},Lr),Yt={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):this.seriesMissingValues(s)!==Qo&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(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){t=t.missingValues;return!t&&this.options.isStacked?$o:t||Qo},getNearestPoint:function(t,e,i){for(var o,r=new Jt(t,e),n=this.seriesPoints[i],s=l,a=0;a<n.length;a++){var p,h=n[a];h&&At(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(o=h,s=p))}return o}},Zt=((Or=C.drawing.Animation)&&(jr.__proto__=Or),((jr.prototype=Object.create(Or&&Or.prototype)).constructor=jr).prototype.setup=function(){this._setEnd(this.options.box.x1)},jr.prototype.step=function(t){var e=this.options.box;this._setEnd(ft(e.x1,e.x2,t))},jr.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},jr);function jr(){Or.apply(this,arguments)}function Lr(){Br.apply(this,arguments)}zt(Zt,{duration:600}),C.drawing.AnimationFactory.current.register("clip",Zt);var zr=Zt;function Er(t){for(var e=0;e<t.length;e++)if(At(t[e].zIndex))return!0}var Fr,ve={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=C.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new zr(e,{box:t}),Er(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&At(o.visual.options.zIndex)&&o.visual.clip(t)}}},ce=((Fr=_r)&&(Ur.__proto__=Fr),((Ur.prototype=Object.create(Fr&&Fr.prototype)).constructor=Ur).prototype.render=function(){Fr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Ur.prototype.pointType=function(){return kr},Ur.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!At(e)||null===e){if(s!==$o)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,o,i,r,n),t=t.fields.color||r.color;I(r.color)&&(t=s.color);s=new kr(e,s);return s.color=t,this.append(s),s},Ur.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]},Ur.prototype.createSegment=function(t,e,i){var o=e.style;return new("step"===o?Ir:"smooth"===o?Vr:Cr)(t,e,i)},Ur.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)},Ur.prototype.supportsPointInactiveOpacity=function(){return!1},Ur);function Ur(){Fr.apply(this,arguments)}L(ce.prototype,Yt,ve);var Dr,Hr,Gr=ce,Nr=((Hr=Cr)&&(Xr.__proto__=Hr),((Xr.prototype=Object.create(Hr&&Hr.prototype)).constructor=Xr).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;I(o)&&e&&(o=e.color),this.visual=new C.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:L({color:o,opacity:t.opacity,lineCap:"butt"},i)})},Xr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Xr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Xr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Xr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Xr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new C.geometry.Segment(t)})},Xr.prototype.createStroke=function(t){t=new C.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Xr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Xr.prototype.createFill=function(t){var e,i=this.strokeSegments(),o=i.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),_t(o,e));t=new C.drawing.Path(t);t.segments.push.apply(t.segments,o),!r&&1<i.length&&this.fillToAxes(t),this.visual.append(t)},Xr.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),e=o.getSlot(r,r,!0),o=this.strokeSegments(),r=o[0].anchor(),o=Mt(o).anchor(),e=i?e.x1:e.y1;i?t.lineTo(e,o.y).lineTo(e,r.y):t.lineTo(o.x,e).lineTo(r.x,e)},Xr),_e=((Dr=Nr)&&(Wr.__proto__=Dr),((Wr.prototype=Object.create(Dr&&Dr.prototype)).constructor=Wr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Wr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Wr);function Wr(){Dr.apply(this,arguments)}function Xr(t,e,i,o,r){Hr.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}L(_e.prototype,bt);var Yr,qr,Zr,Kr,$r=_e,Qr=((Kr=Nr)&&(nn.__proto__=Kr),((nn.prototype=Object.create(Kr&&Kr.prototype)).constructor=nn).prototype.createStrokeSegments=function(){var t=new Mo(this.options.closed),e=this.points();return t.process(e)},nn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new C.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},nn),Jr=((Zr=Gr)&&(rn.__proto__=Zr),((rn.prototype=Object.create(Zr&&Zr.prototype)).constructor=rn).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new("step"===a?$r:"smooth"===a?Qr:Nr)(t,e,i,r,n)},rn.prototype.reflow=function(t){Zr.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},rn.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=o[--c][l],0<c&&!u;);u?("step"!==i&&r<p&&!o[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),"step"!==i&&p+1<n&&!o[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},rn.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},rn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new kr(0,e);return e.categoryIx=t,e.series={},e},rn.prototype.seriesMissingValues=function(t){return t.missingValues||$o},rn.prototype.supportsPointInactiveOpacity=function(){return!1},rn),tn=((qr=C.Class)&&(on.__proto__=qr),((on.prototype=Object.create(qr&&qr.prototype)).constructor=on).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:l,max:c},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},on.prototype.reset=function(t){this.axisRanges[t]=void 0},on.prototype.query=function(t){return this.axisRanges[t]},on),N=((Yr=be)&&(en.__proto__=Yr),((en.prototype=Object.create(Yr&&Yr.prototype)).constructor=en).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},en.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=i?A:S,n.vAlign=i?P:A,"insideEnd"===e.position?i?(n.vAlign=P,!o&&s.height()<t.height()&&(n.vAlign=w)):n.align=o?k:S:e.position===A?(n.vAlign=A,n.align=A):"insideBase"===e.position?i?n.vAlign=o?w:P:n.align=o?S:k:"outsideEnd"===e.position&&(p=i?o?new oe(t.x1,t.y1-s.height(),t.x2,t.y1):new oe(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=A,o?new oe(t.x2,t.y1,t.x2+s.width(),t.y2):new oe(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},en.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,i=e+"1",o=e+"2",r=this.children[0],e=this.parent.box;(e[i]<t[i]||t[o]<e[o])&&((r=r.paddingBox.clone())[i]=Math.max(e[i],t[i]),r[o]=Math.min(e[o],t[o]),this.reflow(r))},en);function en(t,e,i){Yr.call(this,e),this.textBox=new Ge(t,this.options,i),this.append(this.textBox)}function on(){qr.call(this),this.axisRanges={}}function rn(){Zr.apply(this,arguments)}function nn(){Kr.apply(this,arguments)}zt(N,{position:"outsideEnd",margin:D(3),padding:D(4),color:r,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var sn=N;function an(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var pn,ke=((pn=be)&&(hn.__proto__=pn),((hn.prototype=Object.create(pn&&pn.prototype)).constructor=hn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},hn.prototype.createLabel=function(){var t,e,i=this.options,o=i.labels;o.visible&&(t=this.pointData(),e=(e=nt(o))?e(t):this.formatValue(o.format),this.label=new sn(e,L({vertical:i.vertical},o),t),this.append(this.label))},hn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},hn.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)},hn.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(pn.prototype.createVisual.call(this),o?(i=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new C.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},hn.prototype.createRect=function(t){var e=this.options,i=e.border,o=(At(i.opacity)?i:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=C.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(T(r),(o<1||i<1)&&(r.options.stroke.lineJoin="round")),t.append(r),an(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},L({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},hn.prototype.createHighlight=function(t){return T(C.drawing.Path.fromRect(this.box.toRect(),t))},hn.prototype.highlightVisual=function(){return this.rectVisual},hn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},hn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return e=!At(e)?new C.Color(t).brightness(i).toHex():e},hn.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=S,h=P;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),h=w)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(h=w,t=s?(p=k,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,p=k),Math.max(n.y1,a.y1))),{point:new Jt(t,o),align:{horizontal:p,vertical:h}}},hn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},hn.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}},hn);function hn(t,e){pn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=jt(this.options.aboveAxis,!0),this.value=t}L(ke.prototype,wr),L(ke.prototype,tt),ke.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var ln=ke;function cn(t,e){t.forEach(e)}function un(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}var dn,G=((dn=be)&&(fn.__proto__=dn),((fn.prototype=Object.create(dn&&dn.prototype)).constructor=fn).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+i+r*(s-1),p=(e?o.height():o.width())/t,h=o[a+1]+i/2*p;this.forEach(n,function(t,e){var i=(t.box||o).clone();i[a+1]=h,i[a+2]=h+p,t.reflow(i),e<s-1&&(h+=p*r),h+=p})},fn);function fn(t){dn.call(this,t),this.forEach=t.rtl?un:cn}zt(G,{vertical:!1,gap:0,spacing:0});var gn,yn=G,q=((gn=be)&&(vn.__proto__=gn),((vn.prototype=Object.create(gn&&gn.prototype)).constructor=vn).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,i=this.children,o=i.length,r=this.box=new oe,n=0;n<o;n++){var s,a=i[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},vn);function vn(){gn.apply(this,arguments)}zt(q,{vertical:!0});var mn,xn=q,Y=((mn=_r)&&(bn.__proto__=mn),((bn.prototype=Object.create(mn&&mn.prototype)).constructor=bn).prototype.render=function(){mn.prototype.render.call(this),this.updateStackRange()},bn.prototype.pointType=function(){return ln},bn.prototype.clusterType=function(){return yn},bn.prototype.stackType=function(){return xn},bn.prototype.stackLimits=function(t,e){return mn.prototype.stackLimits.call(this,t,e)},bn.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),e=l.labels;p&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=p;t=t.fields.color||r.color;h<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,h,o,i,r,n),I(r.color)&&(t=l.color);l=new(this.pointType())(h,l);l.color=t;i=a[i];return i||(i=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),(p?this.getStackWrap(r,i):i).append(l),l},bn.prototype.getStackWrap=function(t,e){var i,t=t.stack,o=t&&t.group||t,r=e.children;if(typeof o===f){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}}else i=r[0];return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},bn.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(e=i.getSlot(e,e,!0),t[(o=o.invertAxes?v:m)+1]=t[o+2]=e[o+1]),t},bn.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},bn.prototype.createAnimation=function(){this._setAnimationOptions(),mn.prototype.createAnimation.call(this),Er(this.options.series)&&this._setChildrenAnimation()},bn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&At(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},bn.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new C.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},bn);function bn(){mn.apply(this,arguments)}zt(Y,{animation:{type:Jo}});var _n,wn=Y,$=((_n=be)&&(An.__proto__=_n),((An.prototype=Object.create(_n&&_n.prototype)).constructor=An).prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),e=o.getSlot(i.open,i.close),o=o.getSlot(i.low,i.high);e.x1=o.x1=t.x1,e.x2=o.x2=t.x2,this.realBody=e;i=o.center().x,t=[];t.push([[i,o.y1],[i,e.y1]]),t.push([[i,e.y2],[i,o.y2]]),this.lines=t,this.box=o.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},An.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},An.prototype.createVisual=function(){_n.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},An.prototype.mainVisual=function(t){var e=new C.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},An.prototype.createBody=function(t,e){var i=C.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:jt(e.border.opacity,e.opacity)}),T(i),t.append(i),an(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},L({end:e.vertical?void 0:[0,1]},e.overlay)))},An.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},An.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:jt(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=C.drawing.Path.fromPoints(i[n],r);T(s),t.append(s)}},An.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=!At(e)?new C.Color(this.color).brightness(t._brightness).toHex():e},An.prototype.createOverlay=function(){var t=C.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},An.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(L({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,t},An.prototype.highlightVisual=function(){return this._mainVisual},An.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},An.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Jt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:P}}},An.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},An.prototype.overlapsBox=function(t){return this.box.overlaps(t)},An);function An(t,e){_n.call(this,e),this.value=t}zt($,{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:{}}}),L($.prototype,wr),L($.prototype,tt);var Sn=$;function kn(t){return Eo(t)===t.length}var Pn,K=((Pn=_r)&&(Cn.__proto__=Pn),((Cn.prototype=Object.create(Pn&&Pn.prototype)).constructor=Cn).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Cn.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=kn(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));a=a[o];a||(a=new yn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),i&&(this.updateRange(h,e),a.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)},Cn.prototype.pointType=function(){return Sn},Cn.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=L({},r),e=t.fields.color||r.color,p=this.evalPointOptions(p,a,o,i,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),I(r.color)&&(e=p.color),p.vertical=!this.options.invertAxes;p=new s(a,p);return p.color=e,p},Cn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Cn.prototype.updateRange=function(t,e){var i=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[i],t=this.valueAxisRanges[i]=t||{min:l,max:c};this.valueAxisRanges[i]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},Cn.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)},Cn.prototype.animationPoints=function(){return this.points},Cn);function Cn(){Pn.apply(this,arguments)}L(K.prototype,ve);var Tn,Mn=K,ot=((Tn=Sn)&&(Rn.__proto__=Tn),((Rn.prototype=Object.create(Tn&&Tn.prototype)).constructor=Rn).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);o=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,o),this.box=e.clone().wrap(i),this.reflowNote()},Rn.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Rn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Rn.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rn.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]]]},Rn.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rn.prototype.renderOutliers=function(t){for(var e,i=this.value,o=i.outliers||[],r=3*Math.abs(i.q3-i.q1),n=[],s=(t.markers,0);s<o.length;s++){var a=o[s],p=L({},(e=a<i.q3+r&&a>i.q1-r?t.outliers:t.extremes).border);At(p.color)||(At(this.color)?p.color=this.color:p.color=new C.Color(e.background).brightness(.8).toHex());p=new Ce({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:p,opacity:e.opacity});p.value=a,n.push(p)}return this.reflowOutliers(n),n},Rn.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,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},Rn.prototype.mainVisual=function(t){for(var e=Tn.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},Rn.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)},Rn.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Tn.prototype.getBorderColor.call(this)},Rn);function Rn(t,e){Tn.call(this,t,e),this.createNote()}zt(ot,{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:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:a,border:{width:2,opacity:1},opacity:0}}),L(ot.prototype,wr);var On,Bn,In,Vn=ot,jn=((In=Vn)&&(Un.__proto__=In),((Un.prototype=Object.create(In&&In.prototype)).constructor=Un).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Un.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Un.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Un.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]]]},Un.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Un),Ln=((Bn=Mn)&&(Fn.__proto__=Bn),((Fn.prototype=Object.create(Bn&&Bn.prototype)).constructor=Fn).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=kn(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));a=a[o];a||(a=new yn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),i&&(this.updateRange(h,e),a.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)},Fn.prototype.pointType=function(){return this.options.invertAxes?jn:Vn},Fn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Fn.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.valueAxisRanges[i],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));At(t.mean)&&(e=e.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:l,max:c},this.valueAxisRanges[i]={min:Math.min.apply(Math,e.concat([o.min])),max:Math.max.apply(Math,e.concat([o.max]))}},Fn.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)},Fn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];At(r)&&null!==r&&i.push(r)}return i},Fn.prototype.supportsPointInactiveOpacity=function(){return!1},Fn),zn=((On=dr)&&(En.__proto__=On),((En.prototype=Object.create(On&&On.prototype)).constructor=En).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},En);function En(){On.apply(this,arguments)}function Fn(){Bn.apply(this,arguments)}function Un(){In.apply(this,arguments)}function Dn(t){return At(t)&&null!==t}var Hn,gt=((Hn=be)&&(Gn.__proto__=Hn),((Gn.prototype=Object.create(Hn&&Hn.prototype)).constructor=Gn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Gn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Gn.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=i.seriesIx,a=i.series,p=t.options.errorBars,h=i[e+"ErrorLow"],i=i[e+"ErrorHigh"];R(r)&&(R(h)&&R(i)&&(o={low:h,high:i}),p&&At(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Zo(p[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),o&&this.addPointErrorBar(o,t,e))},Gn.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===m,t={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];s=new zn(o,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[i]=o,this.updateRange(t,n),t[i]=r,this.updateRange(t,n)},Gn.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n],t=t;(t=!Dn(o)||!Dn(r)?this.createMissingValue(t,s):t)&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,v,e),this.addErrorBar(i,m,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Gn.prototype.seriesMissingValues=function(t){return t.missingValues},Gn.prototype.createMissingValue=function(){},Gn.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[o],t=this.yAxisRanges[r];Dn(n)&&(e=this.xAxisRanges[o]=e||{min:l,max:c},O(n)&&(n=Vi(i,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Dn(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},O(s)&&(s=Vi(i,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},Gn.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];At(s)||(this._evalSeries[r]=s=yr(t,{},n,!0));r=t;return s&&yr(r=L({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Gn.prototype.pointType=function(){return kr},Gn.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=L({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Gn.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);I(i.color)&&(r=o.color);o=new kr(t,o);return o.color=r,this.append(o),o},Gn.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,t=e?o.namedXAxes[e]:o.axisX,o=i?o.namedYAxes[i]:o.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!o)throw new Error("Unable to locate Y axis with name "+i);return{x:t,y:o}},Gn.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],o=r.seriesAxes(e.series),e=o.x.getSlot(t.x,t.x,s),t=o.y.getSlot(t.y,t.y,s);i&&(e&&t?(t=r.pointSlot(e,t),i.reflow(t)):i.visible=!1)}),this.box=t},Gn.prototype.pointSlot=function(t,e){return new oe(t.x1,e.y1,t.x2,e.y2)},Gn.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,s=s.fields;t(a,L({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s))}}},Gn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Gn.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},Gn);function Gn(t,e){Hn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}zt(gt,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),L(gt.prototype,ve,{_bindPoint:_r.prototype._bindPoint});var Nn,Wn=gt,ct=((Nn=kr)&&(Xn.__proto__=Nn),((Xn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Xn).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 C.drawing.Group,s=new C.drawing.Circle(new C.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}]})}),t=new C.drawing.Circle(new C.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new C.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,t),n},Xn);function Xn(t,e){Nn.call(this,t,e),this.category=t.category}ct.prototype.defaults=L({},ct.prototype.defaults,{labels:{position:A},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),ct.prototype.defaults.highlight.zIndex=void 0;var Yn,qn=ct,Zt=((Yn=Wn)&&(Zn.__proto__=Yn),((Zn.prototype=Object.create(Yn&&Yn.prototype)).constructor=Zn).prototype._initFields=function(){this._maxSize=c,Yn.prototype._initFields.call(this)},Zn.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),Yn.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Zn.prototype.reflow=function(t){this.updateBubblesSize(t),Yn.prototype.reflow.call(this,t)},Zn.prototype.pointType=function(){return qn},Zn.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"},o=e.color||i.color;t.size<0&&i.negativeValues.visible&&(o=jt(i.negativeValues.color,o));n=L({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:u,border:i.border,opacity:i.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);I(i.color)&&(o=n.color),n.markers.background=o;n=new qn(t,n);return n.color=o,this.append(n),n},Zn.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,u,d=n[l];d&&(u=Math.abs(d.value.size)*h,c=Math.sqrt((p+u)/Math.PI),u=jt(d.options.zIndex,0)+(1-c/a),L(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Zn.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},Zn.prototype.createAnimation=function(){},Zn.prototype.createVisual=function(){},Zn);function Zn(){Yn.apply(this,arguments)}zt(Zt,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Kn,$n=Zt,ce=((Kn=Ce)&&(Qn.__proto__=Kn),(Qn.prototype=Object.create(Kn&&Kn.prototype)).constructor=Qn);function Qn(){Kn.apply(this,arguments)}L(ce.prototype,wr);var Jn,ts=ce,_e=((Jn=be)&&(es.__proto__=Jn),((es.prototype=Object.create(Jn&&Jn.prototype)).constructor=es).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,At(this.value.target)&&(this.target=new ts({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:P,align:k}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},es.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),o=n.getSlot(this.value.target),n=r?o:s,o=r?s:o;i&&(o=new oe(n.x1,o.y1,n.x2,o.y2),i.options.height=r?o.height():e.target.line.width,i.options.width=r?e.target.line.width:o.width(),i.reflow(o)),this.note&&this.note.reflow(t),this.box=t},es.prototype.createVisual=function(){Jn.prototype.createVisual.call(this);var t=this.options,e=C.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:jt(t.border.opacity,t.opacity)}),T(this.bodyVisual=e),this.visual.append(e)},es.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=C.drawing.Animation.create(this.bodyVisual,this.options.animation))},es.prototype.createHighlight=function(t){return C.drawing.Path.fromRect(this.box.toRect(),t)},es.prototype.highlightVisual=function(){return this.bodyVisual},es.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},es.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},es);function es(t,e){Jn.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}_e.prototype.tooltipAnchor=ln.prototype.tooltipAnchor,zt(_e,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),L(_e.prototype,wr),L(_e.prototype,tt);var is,os=_e,N=((is=_r)&&(rs.__proto__=is),((rs.prototype=Object.create(is&&is.prototype)).constructor=rs).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},rs.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},rs.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,e=L({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,p,o,i,r,n);I(r.color)&&(t=e.color);e=new os(p,e);e.color=t;i=a[i];return i||(i=new yn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),i.append(e),e},rs.prototype.updateRange=function(t,e){var i=t.current,o=t.target,t=e.series.axis,e=this.valueAxisRanges[t];At(i)&&!isNaN(i)&&At(o&&!isNaN(o))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,i,o),e.max=Math.max(e.max,i,o))},rs.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},rs.prototype.pointValue=function(t){return t.valueFields.current},rs.prototype.aboveAxis=function(t){return 0<t.value.current},rs.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()}},rs);function rs(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var i=t[e],o=i.data;!o||x(o[0])||z(o[0])||(i.data=[o])}}(),is.call(this,t,r)}N.prototype._setAnimationOptions=wn.prototype._setAnimationOptions,zt(N,{animation:{type:Jo}});var ns,ss=N,ke=((ns=C.Class)&&(as.__proto__=ns),((as.prototype=Object.create(ns&&ns.prototype)).constructor=as).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;e&&(r=e.color||e.options.color,i=jt(i,r),o=jt(o,r));var r=D(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:E(t.border.width),paddingTop:E(r.top),paddingBottom:E(r.bottom),paddingLeft:E(r.left),paddingRight:E(r.right)}},as.prototype.show=function(t,e,i){t.format=e.format;i=this.getStyle(e,i);t.style=i;i=new C.Color(i.backgroundColor);At(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},as.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},as.prototype.destroy=function(){delete this.chartService},as);function as(t,e){ns.call(this),this.chartService=t,this.options=L({},this.options,e)}zt(ke,{border:{width:1},opacity:1});var ps,G=ke,q=((ps=G)&&(hs.__proto__=ps),((hs.prototype=Object.create(ps&&ps.prototype)).constructor=hs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},hs.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===y&&(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)},hs.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},hs.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,n=o.padding,o=!i.axis.options.vertical,i=i.line.bbox(),n=o?(t=A,r===w?(e=P,i.bottomLeft().translate(0,n)):(e=w,i.topLeft().translate(0,-n))):(e=A,r===S?(t=k,i.topLeft().translate(-n,0)):(t=S,i.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},hs);function hs(t,e,i){ps.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}zt(q,{padding:10});var ls,cs=q,Y=((ls=be)&&(us.__proto__=ls),((us.prototype=Object.create(ls&&ls.prototype)).constructor=us).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},us.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},us.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?m:v,n=new C.geometry.Point(o.x1,o.y1),i=i?new C.geometry.Point(o.x2,o.y1):new C.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},us.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),e=r?v:m,s=0;s<o;s++){var a=i[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},us.prototype.createVisual=function(){ls.prototype.createVisual.call(this);var t=this.options;this.line=new C.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},us.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ls.prototype.destroy.call(this)},us);function us(t,e,i){ls.call(this,i),this.axis=e,this.stickyMode=e instanceof Fi;e=this.options.tooltip;e.visible&&(this.tooltip=new cs(t,this,L({},e,{stickyMode:this.stickyMode})))}zt(Y,{color:r,width:2,zIndex:-1,tooltip:{visible:!1}});var ds,fs=Y,$=((ds=be)&&(gs.__proto__=ds),((gs.prototype=Object.create(ds&&ds.prototype)).constructor=gs).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},gs.prototype._clipBox=function(){return this.pane.chartsBox()},gs.prototype.createVisual=function(){var t;this.visual=new C.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),T(t=C.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},gs.prototype.stackRoot=function(){return this},gs.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,a=o[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},gs.prototype.destroy=function(){ds.prototype.destroy.call(this),delete this.parent},gs);function gs(t,e){ds.call(this,t),this.pane=e}$.prototype.isStackRoot=!0;var ys,vs=$,K=((ys=Se)&&(xs.__proto__=ys),((xs.prototype=Object.create(ys&&ys.prototype)).constructor=xs).prototype.createTitle=function(){var t=this.options.title;z(t)&&(t=L({},t,{align:t.position,position:P})),this.title=Ye.buildTitle(t,this,xs.prototype.options.title)},xs.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},xs.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},xs.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},xs.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=[]},xs.prototype.reflow=function(t){var e;Mt(this.children)===this.content&&(e=this.children.pop()),ys.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},xs.prototype.visualStyle=function(){var t=ys.prototype.visualStyle.call(this);return t.zIndex=-10,t},xs.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},xs.prototype.stackRoot=function(){return this},xs.prototype.clipRoot=function(){return this},xs.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?o:r,h=0;h<i.length;h++)0!==p.length||a!==(t=i[h]).options.vertical&&_t(p,s.createGridLines(t))},xs.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},xs.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new oe,o=0;o<e;o++){var r=t[o],n=r.options.vertical?m:v,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),i.x1=h.x1,i.x2=h.x2)}return i},xs.prototype.clipBox=function(){return this.chartContainer.clipBox},xs.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new jo(this),index:this.paneIndex,name:this.options.name})},xs),ms=1;function xs(t){ys.call(this,t),this.id="pane"+ms++,this.createTitle(),this.content=new be,this.chartContainer=new vs({},this),this.append(this.content),this.axes=[],this.charts=[]}K.prototype.isStackRoot=!0,zt(K,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});var bs=K;function _s(t,e){null!==e&&t.push(e)}function ws(t,e,i){e=e.visible;if(At(e))return e;t=t.pointVisibility;return t?t[i]:void 0}function As(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=Xo.current.bindPoint(t,n),a=s.valueFields.value;R(a=O(a)?parseFloat(a):a)?(s.visible=!1!==ws(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 Ss(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function ks(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];dt(n.type,o)&&i.push(n)}return i}function Ps(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=Vi(i,pt(t)(e)),e[o]=r),r}function Cs(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ss(t,y)}function Ts(t){return 1===t.length?t[0]:t}var Ms=/area/i;function Rs(t,e){var i,o=Xo.current.bindPoint(t,null,e).valueFields;for(i in o)if(B(o[i]))return!0}function Os(t){for(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;p(l+=r)&&(e=Rs(h,(i=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return i}function Bs(t,e,i,o,r){var n,s,a,p=e.min,h=e.max,l=0<p&&p<i,c=h+1<i;(l||c)&&(((e=t).missingValues||(Ms.test(e.type)||e.stack?$o:Qo))!==Qo?(l&&(n=o(p-1)),c&&(s=o(h+1))):(l&&(n=Rs(t,(a=o(p-1)).item)?a:Os({start:p,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Rs(t,(a=o(h+1)).item)?a:Os({start:h,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var Is,ot=((Is=be)&&(Vs.__proto__=Is),((Vs.prototype=Object.create(Is&&Is.prototype)).constructor=Vs).prototype.initFields=function(){},Vs.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Vs.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=L({title:{color:t.color}},e),s=0;s<o;s++){var a=L({},n,i[s]);O(a.title)&&(a.title=L({text:a.title},n.title));a=new bs(a);a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Vs.prototype.crosshairOptions=function(t){return t.options.crosshair},Vs.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);n&&n.visible&&(n=new fs(this.chartService,r,n),this.crosshairs.push(n),i.content.append(n))}},Vs.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},Vs.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Vs.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]},Vs.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},Vs.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Vs.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},Vs.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Vs.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},Vs.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,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&nt(n)||nt(o))&&(p=l({text:Dn(p)?p:"",series:u})),c=u._defaults,I(h=u.color)&&c&&(h=c.color),c=l=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Dn(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}_t(i.items,s)},Vs.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:e).push(s)}return{x:e,y:i,any:e.concat(i)}},Vs.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},Vs.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},Vs.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=D(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},Vs.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=this.getRoot();t&&t.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var o=0;o<e.length;o++)e[o].refresh()},Vs.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},Vs.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,i=e.getSlot(o,o,!0),o=e.options.reverse?2:1,n=t.box.translate(i[v+o]-r[v+n],i[m+o]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},Vs.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,g=Ls(t,u)||i,u=r;g!==i&&(u=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[l],u[l]),c.options._overlap||(It(c.lineBox().x1)===It(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),f&&(s[d]=c)),It(c.lineBox().x2)===It(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,k).translate(c.options.margin,0)),f&&(a[d]=c)),0!==l&&o.pane===c.pane&&(c.alignTo(o),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,b=!1!==v.options.visible,_=Ls(e,m)||o,m=n;_!==o&&(m=this.axisCrossingValues(_,t)),this.alignAxisTo(v,_,r[y],m[y]),v.options._overlap||(It(v.lineBox().y1)===It(_.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,_,r[y],m[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,P).translate(0,-v.options.margin)),b&&(p[x]=v)),It(v.lineBox().y2,3)===It(_.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,w).translate(0,v.options.margin)),b&&(h[x]=v)),0!==y&&(v.alignTo(i),v.reflow(v.box)))}},Vs.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=js(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(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))}},Vs.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,js(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},Vs.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(0<n.length)for(var r=js(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),i=Math.max(i,s.x1-r.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(i,0))}},Vs.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);0<e.x.length&&0<e.y.length&&(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))},Vs.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=zs(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]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},Vs.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},Vs.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&&!dt(n,t)||e[r].reflow(o)}},Vs.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;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var h=0;h<i;h++){var l=e[h];l.options.height||(l.options.height=o/r)}for(var c=0;c<i;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},Vs.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},Vs.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},Vs.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(C.drawing.Path.fromRect(e[i].toRect()))},Vs.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},Vs.prototype.createVisual=function(){Is.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border;void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&At(i)||(i=a,e=0);t=this._bgVisual=new C.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},Vs.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&&At(s.value)&&null!==s.value&&i.push(s)}}return i},Vs.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Vs.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Vs.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},Vs.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}},Vs.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}},Vs.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Vs.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=Ls(e,n)||e[0],s=this.createLabelAxis(r,o+i,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},Vs.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n=o.visible;if("end"!==r&&"start"!==r||!1===n)return null;o=this.groupAxes(this.panes),n=i.options.vertical?o.x:o.y,o=this.axisCrossingValues(i,n),n="end"===r,r=i.range(),n=n?r.max:r.min;if(Rt(o[e],r.min,r.max)-n==0)return null;o.splice(e+1,0,n),i.options.axisCrossingValues=o;o=t.clone();return t.clear(),o.options.name=void 0,o.options.line.visible=!1,o.options.crosshair=void 0,o.options.notes=void 0,o.options.plotBands=void 0,o},Vs);function Vs(t,e,i){Is.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function js(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new oe}function Ls(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var zs=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};zt(ot,{series:[],plotArea:{margin:{}},background:"",border:{color:r,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Es=ot,Fs={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var Us,Ds,Hs=((Ds=C.Class)&&(Ns.__proto__=Ds),((Ns.prototype=Object.create(Ds&&Ds.prototype)).constructor=Ns).prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||R(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<o.length;a++){var p=o[a],h=this._bindField(r.values,p.canonicalName),h=p.transform(h,i,r.dataItems,e);if(!(null===h||!z(h)||At(h.length)||h instanceof Date)){s=h;break}At(h)&&function(t,e,i){var o=e,r=t;if(-1<t.indexOf(".")){for(var n=t.split(".");1<n.length;)r=n.shift(),At(o[r])||(o[r]={}),o=o[r];r=n.shift()}o[r]=i}(p.name,s,h)}return s},Ns.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}},Ns.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,a=(At(s[e])?s:n.fields)[e];i.push(a)}return i},Ns),gt=((Us=C.Class)&&(Gs.__proto__=Us),((Gs.prototype=Object.create(Us&&Us.prototype)).constructor=Gs).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Gs.prototype.query=function(t){return this._defaults[t]},Gs);function Gs(){Us.call(this),this._defaults={}}function Ns(t,e,i){Ds.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var p=0;p<o.length;p++){var h=o[p],l=void 0;if(z(a))l=a[h];else{if(0!==p&&!dt(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:I(l)?l:Uo[l]})}}gt.current=new gt;var Ws,Xs=gt,ct=((Ws=ln)&&(Ys.__proto__=Ws),((Ys.prototype=Object.create(Ws&&Ws.prototype)).constructor=Ys).prototype.createLabel=function(){var t=this.options.labels,e=L({},t,t.from),t=L({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},Ys.prototype._createLabel=function(t){var e=nt(t),i=this.pointData(),e=e?e(i):this.formatValue(t.format);return new sn(e,L({vertical:this.options.vertical},t),i)},Ys.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)},Ys);function Ys(){Ws.apply(this,arguments)}ct.prototype.defaults=L({},ct.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var qs,Zs=ct,Zt=((qs=wn)&&(Ks.__proto__=qs),((Ks.prototype=Object.create(qs&&qs.prototype)).constructor=Ks).prototype.pointType=function(){return Zs},Ks.prototype.pointValue=function(t){return t.valueFields},Ks.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)},Ks.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Ks.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,e=this.valueAxisRanges[i];null!==t&&R(o)&&R(r)&&((e=this.valueAxisRanges[i]=e||{min:l,max:c}).min=Math.min(e.min,o),e.max=Math.max(e.max,o),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},Ks.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Ks);function Ks(){qs.apply(this,arguments)}Zt.prototype.plotLimits=_r.prototype.plotLimits;var $s,Qs,Js=Zt,ta=((Qs=kr)&&(ia.__proto__=Qs),((ia.prototype=Object.create(Qs&&Qs.prototype)).constructor=ia).prototype.aliasFor=function(){return this.parent},ia),ce=(($s=be)&&(ea.__proto__=$s),((ea.prototype=Object.create($s&&$s.prototype)).constructor=ea).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,o=(i=this.options).markers,t=i.labels,e=this.value,i=this.fromPoint=new ta(e,L({},this.options,{labels:t.from,markers:o.from})),o=this.toPoint=new ta(e,L({},this.options,{labels:t.to,markers:o.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},ea.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},ea.prototype.createHighlight=function(){var t=new C.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},ea.prototype.highlightVisual=function(){return this.visual},ea.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},ea.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o=this.box,r=o.center(),t=S,r=this.options.vertical?(e=r.x,i=o.y1-5,w):(e=o.x2+5,i=r.y,A);return{point:new Jt(e,i),align:{horizontal:t,vertical:r}}}},ea.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ea.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ea.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},ea.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}"})))},ea.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels,o=o.vertical;"auto"===r.position&&(t=o?e.y1<=t.y1?(i="above","below"):(i="below","above"):e.x1<=t.x1?(i=S,k):(i=k,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},ea.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},ea);function ea(t,e){$s.call(this),this.value=t,this.options=e,this.aboveAxis=jt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function ia(){Qs.apply(this,arguments)}L(ce.prototype,wr),L(ce.prototype,tt),ce.prototype.defaults={markers:{visible:!1,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:D(3),padding:D(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var oa,ra,na,sa=ce,aa=((na=Nr)&&(ca.__proto__=na),((ca.prototype=Object.create(na&&na.prototype)).constructor=ca).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ca.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse())):t},ca.prototype.createStroke=function(t){var e=new C.drawing.Path(t),t=new C.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},ca.prototype.hasStackSegment=function(){return!0},ca.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ca.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ca),pa=((ra=aa)&&(la.__proto__=ra),((la.prototype=Object.create(ra&&ra.prototype)).constructor=la).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},la.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.createCurveSegments(this.fromPoints().reverse()):t},la.prototype.createCurveSegments=function(t){return(new Mo).process(this.toGeometryPoints(t))},la),_e=((oa=aa)&&(ha.__proto__=oa),((ha.prototype=Object.create(oa&&oa.prototype)).constructor=ha).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ha.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},ha);function ha(){oa.apply(this,arguments)}function la(){ra.apply(this,arguments)}function ca(){na.apply(this,arguments)}L(_e.prototype,bt);var ua,da=_e,N=((ua=_r)&&(fa.__proto__=ua),((fa.prototype=Object.create(ua&&ua.prototype)).constructor=fa).prototype.render=function(){ua.prototype.render.call(this),this.renderSegments()},fa.prototype.pointType=function(){return sa},fa.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Dn(s.from)&&!Dn(s.to)){if(this.seriesMissingValues(r)!==$o)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,o,i,r,n),t=t.fields.color||r.color;I(r.color)&&(t=e.color);e=new sa(s,e);return e.color=t,this.append(e),e},fa.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?pa:"step"===o?da:aa)(t,e,i)},fa.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},fa.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(i&&e)return{from:i,to:e}},fa.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,e=this.options.invertAxes?(i=new oe(o.x1,t.y1,o.x2,t.y2),new oe(e.x1,t.y1,e.x2,t.y2)):(i=new oe(t.x1,o.y1,t.x2,o.y2),new oe(t.x1,e.y1,t.x2,e.y2));return{from:i,to:e}},fa.prototype.addValue=function(t,e){var i=t.valueFields;R(i.from)||(i.from=i.to),R(i.to)||(i.to=i.from),ua.prototype.addValue.call(this,t,e)},fa.prototype.updateRange=function(t,e){var i;null!==t&&R(t.from)&&R(t.to)&&(i=e.series.axis,e=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:l,max:c},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},fa.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},fa.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)},fa);function fa(){ua.apply(this,arguments)}L(N.prototype,Yt,ve);var ga,ya,va,ma=N,xa=((va=Sn)&&(Aa.__proto__=va),((Aa.prototype=Object.create(va&&va.prototype)).constructor=Aa).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),e=o.getSlot(i.open,i.open),i=o.getSlot(i.close,i.close);e.x1=i.x1=a.x1=t.x1,e.x2=i.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,i.y1]),n.push([i.x2,i.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(i)),this.reflowNote()},Aa.prototype.createBody=function(){},Aa),ba=((ya=Mn)&&(wa.__proto__=ya),((wa.prototype=Object.create(ya&&ya.prototype)).constructor=wa).prototype.pointType=function(){return xa},wa),ke=((ga=be)&&(_a.__proto__=ga),((_a.prototype=Object.create(ga&&ga.prototype)).constructor=_a).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(e=e.aboveAxis?i.x2:i.x1,r.push([e,i.y1],[e,o.y2])),r},_a.prototype.createVisual=function(){ga.prototype.createVisual.call(this);var t=this.series.line||{},t=C.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});T(t),this.visual.append(t)},_a);function _a(t,e,i){ga.call(this),this.from=t,this.to=e,this.series=i}function wa(){ya.apply(this,arguments)}function Aa(){va.apply(this,arguments)}zt(ke,{animation:{type:"fadeIn",delay:600}});var Sa,ka,Pa=ke,Ca=((ka=wn)&&(Oa.__proto__=ka),((Oa.prototype=Object.create(ka&&ka.prototype)).constructor=Oa).prototype.render=function(){ka.prototype.render.call(this),this.createSegments()},Oa.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=vr(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=Xo.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):R(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},Oa.prototype.updateRange=function(t,e){ka.prototype.updateRange.call(this,{value:e.to},e)},Oa.prototype.aboveAxis=function(t){return 0<=t.value},Oa.prototype.plotRange=function(t){return[t.from,t.to]},Oa.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,h=n[a];h&&s&&(p=new Pa(s,h,r),i.push(p),this.append(p)),s=h}}},Oa),Ta=["area","verticalArea","rangeArea","verticalRangeArea"],Ma=[er,or].concat(Ta),q=((Sa=Es)&&(Ra.__proto__=Sa),((Ra.prototype=Object.create(Sa&&Sa.prototype)).constructor=Ra).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new tn,0<t.length){this.invertAxes=dt(t[0].type,[Jo,"bullet",or,"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}}}},Ra.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)},Ra.prototype.removeAxis=function(t){var e=t.options.name;Sa.prototype.removeAxis.call(this,t),t instanceof Fi?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Ra.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);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],o)}},Ra.prototype.createChartGroup=function(t,e){this.createAreaChart(ks(t,["area","verticalArea"]),e),this.createRangeAreaChart(ks(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(ks(t,[tr,Jo]),e),this.createRangeBarChart(ks(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(ks(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(ks(t,"candlestick"),e),this.createBoxPlotChart(ks(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(ks(t,"ohlc"),e),this.createWaterfallChart(ks(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(ks(t,[er,or]),e)},Ra.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=(Ss(n.options.type,y)||r.categoryField)&&dt(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},Ra.prototype.filterSeries=function(e,i){var t=(e.data||{}).length;if(i._seriesMax=Math.max(i._seriesMax||0,t),!R(i.options.min)&&!R(i.options.max))return e;var o=i.currentRangeIndices(),r=dt(e.type,Ma),n=L({},e);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&Bs(n,o,t,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return At(e.data[t])}),n},Ra.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Ra.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,o=Ss(o.type,y),n=t.data,s=o?Ps:Do,a=[];o||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];At(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[i]=a},Ra.prototype.aggregateSeries=function(t,o){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,o),e=L({},t),n=new Hs(L({},t),Xo.current,Xs.current),i=e.data=[],s=o.options.dataItems||[],a=o.currentRangeIndices(),p=function(t){var e=t-a.min,i=r[t];return(i=i||(r[t]={})).categoryIx=e,i.item||(t=o.categoryAt(t,!0),i.category=t,i.item=n.aggregatePoints(i.items,t)),i},h=a.min;h<=a.max;h++){var l=p(h);i[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return dt(e.type,Ma)&&Bs(e,a,o.totalCount(),p,function(t){return r[t]}),o.options.dataItems=s,e},Ra.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,vr(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Sa.prototype.appendChart.call(this,t,e)},Ra.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=ht([].concat(e.valueAxis),function(t){return t.name===i})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Ra.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},Ra.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Ra.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=function(t,e,i){return ht(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Ra.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new wn(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(i,e))),this.appendChart(i,e))},Ra.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Js(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(i,e))},Ra.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new ss(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},Ra.prototype.createLineChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Gr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e))),this.appendChart(i,e))},Ra.prototype.createAreaChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Jr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e))),this.appendChart(i,e))},Ra.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new ma(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},Ra.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new ba(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},Ra.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Mn(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},Ra.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Ln(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},Ra.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Ca(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(i,e))},Ra.prototype.axisRequiresRounding=function(t,e){for(var i=ks(this.series,rr),o=0;o<this.series.length;o++){var r,n=this.series[o];!dt(n.type,Ta)||(r=n.line)&&"step"===r.style&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},Ra.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}},Ra.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Fi&&t[e].createLabels()},Ra.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(dt(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=L({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?l:0},n),At(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0,p=new(Cs(n,a[0])?Zi:Fi)(n,this.chartService);if(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},Ra.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!dt(t[e].type,Ta))return!1;return!0},Ra.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(dt(this.findPane(p.pane),t)){var h=p.name,l=Ss(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||i||l;0===a&&l&&i&&(l.min=Math.min(l.min,i.min),l.max=Math.max(l.max,i.max));p=new(Ss(p.type,"log")?uo:ro)(l.min,l.max,L({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},Ra.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Jt(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?_s(s,h.getValue(r)):_s(n,h.getCategory(r))}0===n.length&&_s(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:Ct(e),originalEvent:e,category:Ts(n),value:Ts(s)})}},Ra.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}},Ra.prototype.updateAxisOptions=function(t,e){Ba(this.options,t,e),Ba(this.originalOptions,t,e)},Ra);function Ra(){Sa.apply(this,arguments)}function Oa(){ka.apply(this,arguments)}function Ba(t,e,i){L([].concat(e instanceof Fi?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}zt(q,{categoryAxis:{},valueAxis:{}}),L(q.prototype,Fs);var Ia=q;function Va(){this._defaultPrevented=!0}var ja,La=((ja=C.Class)&&(za.__proto__=ja),((za.prototype=Object.create(ja&&ja.prototype)).constructor=za).prototype.destroy=function(){this._points=[]},za.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))}},za.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o?(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Va,visual:t.highlightVisual(),show:e}),o._defaultPrevented||t.toggleHighlight(e,i)):t.toggleHighlight(e,i)},za.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},za.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1},za);function za(){ja.call(this),this._points=[]}function Ea(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Fa(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 Ua,Y=((Ua=C.Class)&&(Da.__proto__=Ua),((Da.prototype=Object.create(Ua&&Ua.prototype)).constructor=Da).prototype.start=function(t){return this._active=Ea(t,this.options.key),this._active},Da.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));if(t.length)return Fa(this.axisRanges=t)}},Da.prototype.end=function(){var t=this._active;return this._active=!1,t},Da.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)}},Da.prototype.destroy=function(){delete this.plotArea},Da.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,p=n[s];!(e===v&&!p.options.vertical||e===m&&p.options.vertical)||(a=p.pan(o))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},Da);function Da(t,e){Ua.call(this),this.plotArea=t,this.options=L({},this.options,e)}Y.prototype.options={key:"none",lock:"none"};var Ha,Ga=Y,$=((Ha=C.Class)&&(Na.__proto__=Ha),((Na.prototype=Object.create(Ha&&Ha.prototype)).constructor=Na).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)},Na.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Na.prototype.setStyles=function(t){U(this._marquee,t)},Na.prototype.start=function(t){if(Ea(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i){e=this._elementOffset();return i.translate(e.left,e.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},Na.prototype._elementOffset=function(){var t=this.chart.element,e=U(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=kt(t);return{left:i+t.left,top:e+t.top}},Na.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Na.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Fa(this.axisRanges)}},Na.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)}},Na.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Na.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;i===v&&!a||i===m&&a||!At(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},Na.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),t=Math.abs(i.y-r);return n===v&&(s=e.x1,p=e.width()),n===m&&(a=e.y1,t=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(t=e.y2-i.y),r<e.y1&&(t=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:t}},Na);function Na(t,e){Ha.call(this),this.chart=t,this.options=L({},this.options,e),this.createElement()}$.prototype.options={key:"shift",lock:"none"};var Wa,Xa,Ya,qa,Za=$,Ka=((qa=C.Class)&&(op.__proto__=qa),((op.prototype=Object.create(qa&&qa.prototype)).constructor=op).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;e===v&&!s||e===m&&s||!n.zoomRange||(s=n.zoomRange(-t))&&i.push({axis:n,range:s})}return Fa(this.axisRanges=i)},op.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)}},op.prototype.destroy=function(){delete this.chart},op),$a=((Ya=be)&&(ip.__proto__=Ya),((ip.prototype=Object.create(Ya&&Ya.prototype)).constructor=ip).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new C.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 oe),r.renderVisual()}},ip.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Fe(t):new oe},ip.prototype.renderVisual=function(){this.addVisual()},ip.prototype.createVisual=function(){},ip),Qa=((Xa=Se)&&(ep.__proto__=Xa),((ep.prototype=Object.create(Xa&&Xa.prototype)).constructor=ep).prototype.createContainer=function(){this.container=new je({vertical:!1,wrap:!1,align:A,spacing:this.options.spacing}),this.append(this.container)},ep.prototype.createMarker=function(){this.container.append(new Ce(this.markerOptions()))},ep.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return L({},t.markers,{background:e,border:{color:e}})},ep.prototype.createLabel=function(){var t=this.options,e=L({},t.labels);this.container.append(new Ge(t.text,e))},ep.prototype.renderComplete=function(){Xa.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=C.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},ep.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger("legendItemClick",i)&&e&&"contextmenu"===e.type&&e.preventDefault()},ep.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},ep.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},ep.prototype.eventArgs=function(t){var e=this.options;return{element:Ct(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},ep.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):Xa.prototype.renderVisual.call(this)},ep),Ja="custom",K=((Wa=be)&&(tp.__proto__=Wa),((tp.prototype=Object.create(Wa&&Wa.prototype)).constructor=tp).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=A;e===Ja?o=S:dt(e,[P,w])?(o="start"===i?S:"end"===i?k:A,r=e):i&&("start"===i?r=P:"end"===i&&(r=w)),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)},tp.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new $a({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];o.append(new Qa(L({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}o.render(),this.itemsContainer.append(o)},tp.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Ja&&"horizontal"!==e||(At(e)?"horizontal"!==e:dt(t,[S,k]))},tp.prototype.hasItems=function(){return 0<this.container.children[0].children.length},tp.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Ja?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new oe(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},tp.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===P||o===w?v:m,a=this.isVertical(),p=t.clone(),h=t.clone();o!==S&&o!==k||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,m,i.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,v,i.options.align)),i.reflow(h);p=(h=i.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),i.reflow(h)),p[s+1]=t[s+1],p[s+2]=t[s+2],this.box=p},tp.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),i.reflow(t),t=i.box,i.reflow(new oe(o,r,o+t.width(),r+t.height()))},tp.prototype.renderVisual=function(){this.hasItems()&&Wa.prototype.renderVisual.call(this)},tp.prototype.createLegendTitle=function(t){var e=L({},{color:r,position:P,align:A},t),i=e.text;t&&!1!==t.visible&&(At(e)&&e.visible&&((t=nt(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new Ge(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},tp.prototype.createTitleLayout=function(){this.layout=new je({vertical:!0,wrap:!1}),this.container.append(this.layout)},tp.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},tp.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},tp);function tp(t,e){void 0===e&&(e={}),Wa.call(this,t),this.chartService=e,dt(this.options.position,[P,k,w,S,Ja])||(this.options.position=k),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function ep(t){Xa.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function ip(t,e){Ya.call(this,t),this.chartService=e}function op(t,e){qa.call(this),this.chart=t,this.options=L({},this.options,e)}zt(K,{position:k,items:[],offsetX:0,offsetY:0,margin:D(5),padding:D(5),border:{color:r,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:S,vAlign:A}});var rp,np=K,ot=((rp=C.Class)&&(sp.__proto__=rp),((sp.prototype=Object.create(rp&&rp.prototype)).constructor=sp).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},sp.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(0<(o=ks(t,a.seriesTypes)).length){n=a;break}}return new n.type(o,e,i)},sp);function sp(){rp.call(this),this._registry=[]}ot.current=new ot;var ap=ot;function pp(t){var e=document.createElement("div");return t&&(e.className=t),e}function hp(t){for(var e=t;e&&!lt(e,"k-handle");)e=e.parentNode;return e}var lp,gt=((lp=C.Class)&&(cp.__proto__=lp),((cp.prototype=Object.create(lp&&lp.prototype)).constructor=cp).prototype.onPane=function(t){return this.categoryAxis.pane===t},cp.prototype.createElements=function(){var t=this.options,e=this.wrapper=pp("k-selector");U(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=pp("k-selection");this.leftMask=pp("k-mask"),this.rightMask=pp("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(pp("k-selection-bg"));var o=this.leftHandle=pp("k-handle k-left-handle"),r=this.rightHandle=pp("k-handle k-right-handle");o.appendChild(pp()),r.appendChild(pp()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=U(i,["borderLeftWidth","borderRightWidth","height"]),s=U(o,"height").height,i=U(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},U(o,{top:(n.height-s)/2}),U(r,{top:(n.height-i)/2}),e.style.cssText=e.style.cssText},cp.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),wt(this.wrapper,((t={})[hr]=this._mousewheelHandler,t))),this._domEvents=et.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)})},cp.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&L(t,{min:Vi(i,t.min),max:Vi(i,t.max),from:Vi(i,t.from),to:Vi(i,t.to)});var o=U(this.chartElement,["paddingLeft","paddingTop"]),i=o.paddingLeft,o=o.paddingTop;this.options=L({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:o},offset:{left:e.x1+i,top:e.y1+o},from:t.min,to:t.max},t)},cp.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Vt(this.wrapper,((t={})[hr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},cp.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},cp.prototype._start=function(t){var e=this.options,i=Ct(t);!this._state&&i&&(this.chart._unsetActivePoint(),this._state={moveTarget:hp(i)||i,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},cp.prototype._press=function(t){(t=this._state?this._state.moveTarget:hp(Ct(t)))&&p(t,"k-handle-active")},cp.prototype._move=function(t){var e,i,o,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,h=this.options,c=this.categoryAxis,e=l.range,i=l.moveTarget,o=c.options.reverse,r=this._index(h.from),n=this._index(h.to),s=this._index(h.min),a=this._index(h.max),u=l.startLocation-t.x.location,p=e.from,h=e.to,l=e.to-e.from,t=U(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(o?-1:1),i&&(u=lt(i,"k-left-handle"),t=lt(i,"k-right-handle"),lt(i,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!o||t&&o?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&o||t&&!o)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===p&&e.to===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},cp.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&_(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},cp.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new Jt(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),o=s-n,e={},s=3===t.event.which,r=Math.round(n+o/2-r);this._state||s||(this.chart._unsetActivePoint(),i.options.justified||r--,e.from=Math.min(Math.max(a,n-r),p-o),e.to=Math.min(e.from+o,p),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},cp.prototype._mousewheel=function(t){var e,i=this,o=mt(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(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(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},cp.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},cp.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},cp.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,i=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,i),i=Math.max(s,i);t.preventDefault(),n.from=r.pointCategoryIndex(new Jt(e))||o.min,n.to=r.pointCategoryIndex(new Jt(i))||o.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},cp.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},cp.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},cp.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},cp.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?t:e,p="x"+(o?2:1),e=this._slot(o?e:t),t=It(e[p]-r.left+n.left);U(this.leftMask,{width:t}),U(this.selection,{left:t});e=this._slot(a),r=It(i.width-(e[p]-r.left+n.left));U(this.rightMask,{width:r});n=i.width-r;n!==i.width&&(n+=s.right),U(this.rightMask,{left:n}),U(this.selection,{width:Math.max(i.width-(t+r)-s.right,0)})},cp.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),o=Rt(this._index(t),o,r),r=Rt(this._index(e),o+1,r);i.visible&&this.move(o,r),i.from=this._value(o),i.to=this._value(r)},cp.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},e=L({},a);if(this._state&&(a=this._state.range),r!==k&&(a.from=Rt(Rt(n-t,0,s-1),i,o)),r!==S&&(a.to=Rt(Rt(s+t,a.from+1,o),i,o)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},cp.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},cp);function cp(t,e,i,o){lp.call(this);var r=t.element;this.options=L({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Zi,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}zt(gt,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var up,dp,fp=gt,gp=((dp=G)&&(vp.__proto__=dp),((vp.prototype=Object.create(dp&&dp.prototype)).constructor=vp).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=L({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,dp.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},vp.prototype.hide=function(){delete this._current,dp.prototype.hide.call(this)},vp),ct=((up=G)&&(yp.__proto__=up),((yp.prototype=Object.create(up&&up.prototype)).constructor=yp).prototype.showAt=function(t,e){var i,o=ht(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(i=o[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),o=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:o,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},yp.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},yp.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,i=i.center(),e=e.center();return{point:t?new Jt(i.x,e.y):new Jt(e.x,i.y),align:{horizontal:"center",vertical:"center"}}},yp);function yp(t,e){up.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function vp(){dp.apply(this,arguments)}zt(ct,{categoryFormat:"{0:d}"});var mp,xp=ct,Zt=((mp=C.drawing.Animation)&&(bp.__proto__=mp),((bp.prototype=Object.create(mp&&mp.prototype)).constructor=bp).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,t=i.vertical?m:v,(i=this.fromScale=new C.geometry.Point(1,1))[t]=Ko,e.transform(C.geometry.transform().scale(i.x,i.y))):this.abort()},bp.prototype.step=function(t){var e=ft(this.fromScale.x,1,t),t=ft(this.fromScale.y,1,t);this.element.transform(C.geometry.transform().scale(e,t,this.origin))},bp.prototype.abort=function(){mp.prototype.abort.call(this),this.element.transform(null)},bp);function bp(){mp.apply(this,arguments)}zt(Zt,{duration:600}),C.drawing.AnimationFactory.current.register(Jo,Zt);var _p,ce=((_p=C.drawing.Animation)&&(wp.__proto__=_p),((wp.prototype=Object.create(_p&&_p.prototype)).constructor=wp).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(C.geometry.transform().scale(Ko,Ko,t))},wp.prototype.step=function(t){this.element.transform(C.geometry.transform().scale(t,t,this.center))},wp);function wp(){_p.apply(this,arguments)}zt(ce,{easing:"easeOutElastic"}),C.drawing.AnimationFactory.current.register("bubble",ce);var Ap,bt=((Ap=C.drawing.Animation)&&(Sp.__proto__=Ap),((Sp.prototype=Object.create(Ap&&Ap.prototype)).constructor=Sp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Sp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},Sp);function Sp(){Ap.apply(this,arguments)}zt(bt,{duration:200,easing:"linear"}),C.drawing.AnimationFactory.current.register("fadeIn",bt);var kp,_e=((kp=C.drawing.Animation)&&(Pp.__proto__=kp),((Pp.prototype=Object.create(kp&&kp.prototype)).constructor=Pp).prototype.setup=function(){this.element.transform(C.geometry.transform().scale(Ko,Ko,this.options.center))},Pp.prototype.step=function(t){this.element.transform(C.geometry.transform().scale(t,t,this.options.center))},Pp);function Pp(){kp.apply(this,arguments)}zt(_e,{easing:"easeOutElastic",duration:600}),C.drawing.AnimationFactory.current.register(ir,_e);var Cp,Tp=_e,ve=((Cp=Wn)&&(Mp.__proto__=Cp),((Mp.prototype=Object.create(Cp&&Cp.prototype)).constructor=Mp).prototype.render=function(){Cp.prototype.render.call(this),this.renderSegments()},Mp.prototype.createSegment=function(t,e,i){return new("smooth"===e.style?Vr:Cr)(t,e,i)},Mp.prototype.animationPoints=function(){return Cp.prototype.animationPoints.call(this).concat(this._segments)},Mp.prototype.createMissingValue=function(t,e){if(e===$o){t={x:t.x,y:t.y};return Dn(t.x)||(t.x=0),Dn(t.y)||(t.y=0),t}},Mp);function Mp(){Cp.apply(this,arguments)}L(ve.prototype,Yt);var Rp,Op=ve,N=((Rp=Es)&&(Bp.__proto__=Rp),((Bp.prototype=Object.create(Rp&&Rp.prototype)).constructor=Bp).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new tn,this.yAxisRangeTracker=new tn},Bp.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);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(ks(r,"scatter"),o),this.createScatterLineChart(ks(r,"scatterLine"),o),this.createBubbleChart(ks(r,"bubble"),o))}this.createAxes(t)},Bp.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Rp.prototype.appendChart.call(this,t,e)},Bp.prototype.removeAxis=function(t){var e=t.options.name;Rp.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},Bp.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=ht([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=ht([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Bp.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Wn(this,{series:t,clip:e.options.clip}),e)},Bp.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Op(this,{series:t,clip:e.options.clip}),e)},Bp.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new $n(this,{series:t,clip:e.options.clip}),e)},Bp.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=L({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ss(a.type,"log"),h=s.query(),t=p?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||h||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===i&&!f){d=Xo.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===i&&h&&(t.min=Math.min(t.min,h.min),t.max=Math.max(t.max,h.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){o=!0;break}t=new(Ss(a.type,y)||!a.type&&o?ao:p?uo:ro)(t.min,t.max,a,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t},Bp.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++)dt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)dt(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]},Bp.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Jt(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,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(i,{element:Ct(e),originalEvent:e,x:Ts(a),y:Ts(p)})},Bp.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),t=(i?o.y:o.x).indexOf(t);Ip(this.options,t,i,e),Ip(this.originalOptions,t,i,e)},Bp);function Bp(){Rp.apply(this,arguments)}function Ip(t,e,i,o){L([].concat(i?t.yAxis:t.xAxis)[e],o)}zt(N,{xAxis:{},yAxis:{}}),L(N.prototype,Fs);var Vp,jp=N,ke=((Vp=be)&&(Ep.__proto__=Vp),((Ep.prototype=Object.create(Vp&&Vp.prototype)).constructor=Ep).prototype.render=function(){var t,e,i=this.options.labels,o=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,t=nt(i),e=this.pointData(),t?r=t(e):i.format&&(r=o.format.auto(i.format,r)),i.visible&&(r||0===r)&&(i.position===A||"insideEnd"===i.position?(i.color||(i.color=Nt(this.options.color)),i.background||(i.background=this.options.color)):(o=o.theme.seriesDefaults.labels,i.color=i.color||o.color,i.background=i.background||o.background),this.label=new Ge(r,L({},i,{align:A,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),e),this.append(this.label)))},Ep.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Ep.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===A?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new oe(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new oe(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(o=t.x+i,n.orientation=k):(o=t.x-i,n.orientation=S),n.reflow(new oe(o,t.y-e,t.x,t.y))))},Ep.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;Vp.prototype.createVisual.call(this),this.value&&(o.visual?(t=(i.startAngle+180)%360,(o=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new C.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new C.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(o)):this.createSegmentVisual(this.visual))},Ep.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,o={color:n,opacity:i.opacity},r=this.createSegment(e,L({fill:o,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(r),an(i)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:o},L({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Ep.prototype.createSegment=function(t,e){return e.singleSegment?new C.drawing.Circle(new C.geometry.Circle(new C.geometry.Point(t.center.x,t.center.y),t.radius),e):ye.current.createRing(t,e)},Ep.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;L(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Vp.prototype.createAnimation.call(this)},Ep.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,L({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Ep.prototype.highlightVisual=function(){return this.visual.children[0]},Ep.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new C.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Ep.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Bt(e+180),e=It(Math.sin(t),g),t=It(Math.cos(t),g),{horizontal:Math.abs(e)>zp?A:t<0?k:S,vertical:Math.abs(e)<Lp?A:e<0?w:P})}},Ep.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ep.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Ep),Lp=It(Bt(30),g),zp=It(Bt(60),g);function Ep(t,e,i){Vp.call(this,i),this.value=t,this.sector=e}zt(ke,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:D(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:ir},highlight:{visible:!0,border:{width:1}},visible:!0}),L(ke.prototype,wr);var Fp,Up=ke,Dp={createLegendItem:function(t,e,i){var o,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},p=a.labels||{};i&&!1!==i.visibleInLegend&&(n=!(r=!1!==i.visible)&&nt(p)||nt(s),s=i.category,n&&(s=n({text:s,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=r?(o={},e.color):(o={color:p.color,font:p.font},(a.markers||{}).color),Dn(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:i.index,text:s,series:i.series,markerColor:a,labels:o}))}},q=((Fp=be)&&(Hp.__proto__=Fp),((Hp.prototype=Object.create(Fp&&Fp.prototype)).constructor=Hp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Hp.prototype.traverseDataPoints=function(t){for(var e=this.options,i=this.plotArea.options.seriesColors,o=(i=void 0===i?[]:i).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=As(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0;isFinite(u)||(d=360/h);var f=void 0,f=(At(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=A);for(var g=0;g<c.length;g++){var y,v,m,x,b,_=c[g];_&&(y=_.fields,v=_.value,m=_.visible,x=0!==v?d||v*u:0,b=1!==p.length&&Boolean(y.explode),I(a.color)||(a.color=y.color||i[g%o]),t(_.valueFields.value,new he(null,0,0,f,x),{owner:this,category:At(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:p[g],percentage:0!==l?v/l:0,explode:b,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==m&&(f+=x))}}},Hp.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;yr(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle"]})},Hp.prototype.addValue=function(t,e,i){var o=L({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(o=new Up(t,e,o),Object.assign(o,i),this.append(o),this.points.push(o))},Hp.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 oe(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],p=jt(e.padding,p);this.targetBox=t,p=a-5<p?a-5:p,h.translate(n.x-s.x,n.y-s.y);for(var d=a-p,f=new Jt(d+h.x1+p,d+h.y1+p),g=0;g<r;g++){var y,v=i[g],m=v.sector,x=v.seriesIx;m.radius=d,m.center=f,o.length&&(y=o[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(h);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===k?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Hp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Hp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Hp.prototype.distanceBetweenLabels=function(t){var e=Mt(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=It(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var p=t[a+1].box,n=t[a].box,s=It(p.y1-n.y2);r.push(s)}return s=It(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Hp.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;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Hp.prototype._takeDistance=function(t,e,i,o){var r=o;return 0<t[i]&&(r-=o=Math.min(t[i],r),t[i]-=o,t[e]+=o),r},Hp.prototype.reflowLabels=function(t,e){var i,o=Mt(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var l=e[h],c=l.box;p+=t[h],i=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===k),l.orientation===k?(n.align!==u&&(i=r.radius+r.center.x+a),l.reflow(new oe(i+c.width(),p,i,p))):(n.align!==u&&(i=r.center.x-r.radius-a),l.reflow(new oe(i-c.width(),p,i,p))),p+=c.height()}},Hp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;Fp.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,p,h,l,c=e[o],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(r=new C.drawing.Path({stroke:{color:g,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(f),a=new Jt(n.x1,n.center().y),g=h=p=void 0,l=u.clone().expand(t.padding).point(f),r.moveTo(l.x,l.y),d.orientation===k?(g=Gp(s,l,a,h=new Jt(n.x1-t.padding,n.center().y)),a=new Jt(h.x-4,h.y),(g=g||a).x=Math.min(g.x,a.x),this.pointInCircle(g,u.center,u.radius+4)||g.x<u.center.x?(p=u.center.x+u.radius+4,c.options.labels.align===tr||p<a.x?r.lineTo(p,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,h.y)):(g.y=h.y,r.lineTo(g.x,g.y))):(g=Gp(s,l,a,h=new Jt(n.x2+t.padding,n.center().y)),a=new Jt(h.x+4,h.y),(g=g||a).x=Math.max(g.x,a.x),this.pointInCircle(g,u.center,u.radius+4)||g.x>u.center.x?(p=u.center.x-u.radius-4,c.options.labels.align===tr||p>a.x?r.lineTo(p,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,h.y)):(g.y=h.y,r.lineTo(g.x,g.y))),r.lineTo(h.x,h.y),this._connectorLines.push(r),this.visual.append(r)))}},Hp.prototype.renderVisual=function(){var t,e,i,o;Fp.prototype.renderVisual.call(this),Ft(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(i=this.visual.bbox())&&(o=i.bottomRight(),(o=Math.min((e.y-t.y1)/(e.y-i.origin.y),(t.y2-e.y)/(o.y-e.y),(e.x-t.x1)/(e.x-i.origin.x),(t.x2-e.x)/(o.x-e.x)))<1&&this.visual.transform(C.geometry.transform().scale(o,o,[e.x,e.y]))))},Hp.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Hp.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,e=s.x,s=s.y,o=Math.min(Math.abs(s-i),Math.abs(s-o));return n<o?t:e+Math.sqrt(n*n-o*o)*(r?1:-1)},Hp.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)},Hp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Hp.prototype.animationDelay=function(t){return 70*t},Hp.prototype.stackRoot=function(){return this},Hp);function Hp(t,e){Fp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Gp(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),i=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return r=0!=i?new Jt(t.x+(i=n/i)*(e.x-t.x),t.y+i*(e.y-t.y)):r}zt(q,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),L(q.prototype,Dp),q.prototype.isStackRoot=!0;var Np,Wp,Xp=q,Yp=((Wp=Es)&&(Zp.__proto__=Wp),((Zp.prototype=Object.create(Wp&&Wp.prototype)).constructor=Zp).prototype.render=function(){this.createPieChart(this.series)},Zp.prototype.createPieChart=function(t){var e=t[0],e=new Xp(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},Zp.prototype.appendChart=function(t,e){Wp.prototype.appendChart.call(this,t,e),_t(this.options.legend.items,t.legendItems)},Zp),Y=((Np=Up)&&(qp.__proto__=Np),((qp.prototype=Object.create(Np&&Np.prototype)).constructor=qp).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===A?(o.radius-=(o.radius-o.innerRadius)/2,r=o.point(r),i.reflow(new oe(r.x,r.y-t/2,r.x,r.y))):Np.prototype.reflowLabel.call(this))},qp.prototype.createSegment=function(t,e){return ye.current.createRing(t,e)},qp);function qp(){Np.apply(this,arguments)}function Zp(){Wp.apply(this,arguments)}zt(Y,{overlay:{gradient:"roundedGlass"},labels:{position:A},animation:{type:ir}}),L(Y.prototype,wr);var Kp,$p=Y,$=((Kp=Xp)&&(Qp.__proto__=Kp),((Qp.prototype=Object.create(Kp&&Kp.prototype)).constructor=Qp).prototype.addValue=function(t,e,i){var o=L({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible&&(o=new $p(t,e,o),Object.assign(o,i),this.append(o),this.points.push(o))},Qp.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),r=Math.min(o.width(),o.height()),o=r/2,n=i.series,s=n.length,r=jt(i.padding,r-.85*r),a=o-(r=o-5<r?o-5:r),p=0,h=0;h<s;h++){var l=n[h];0===h&&At(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),At(l.size)?a-=l.size:p++,At(l.margin)&&h!==s-1&&(a-=l.margin)}At(e)||(a-=e=(o-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+jt(f.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Kp.prototype.reflow.call(this,t)},Qp.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},Qp);function Qp(){Kp.apply(this,arguments)}zt($,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Jp,th,eh,ih=$,oh=((eh=Yp)&&(sh.__proto__=eh),((sh.prototype=Object.create(eh&&eh.prototype)).constructor=sh).prototype.render=function(){this.createDonutChart(this.series)},sh.prototype.createDonutChart=function(t){var e=t[0],e=new ih(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},sh),K=((th=Es)&&(nh.__proto__=th),((nh.prototype=Object.create(th&&th.prototype)).constructor=nh).prototype.initFields=function(){this.valueAxisRangeTracker=new tn},nh.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},nh.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,e=t.getSlot(i),i=this.polarAxis.getSlot(0).center,e=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(e)},nh.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,i=e.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===o.type?(t=ko,{min:.1,max:1}):(t=Ao,{min:0,max:1}),r=e.query(name)||i||r;r&&i&&(r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max));o=new t(r.min,r.max,o,this.chartService);this.valueAxis=o,this.appendAxis(o)},nh.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()),r=D(t.padding||{},r),o=o.clone().unpad(r),r=o.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(o,m,A);o=r.clone().shrink(0,r.height()/2);i.reflow(r),e.reflow(o);o=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:o})),this.axisBox=r,this.alignAxes(r)},nh.prototype.backgroundBox=function(){return this.box},nh.prototype.detachLabels=function(){},nh),ot=((Jp=Wn)&&(rh.__proto__=Jp),((rh.prototype=Object.create(Jp&&Jp.prototype)).constructor=rh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Jt.onCircle(t.center,t.startAngle,e);return new oe(e.x,e.y,e.x,e.y)},rh);function rh(){Jp.apply(this,arguments)}function nh(){th.apply(this,arguments)}function sh(){eh.apply(this,arguments)}zt(ot,{clip:!1});var ah,ph=ot,gt=((ah=Op)&&(hh.__proto__=ah),(hh.prototype=Object.create(ah&&ah.prototype)).constructor=hh);function hh(){ah.apply(this,arguments)}gt.prototype.pointSlot=ph.prototype.pointSlot,zt(gt,{clip:!1});var lh,ch,uh=gt,dh=((ch=Qr)&&(yh.__proto__=ch),((yh.prototype=Object.create(ch&&ch.prototype)).constructor=yh).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},yh.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},yh.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new Mo(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o},yh),fh=((lh=Nr)&&(gh.__proto__=lh),((gh.prototype=Object.create(lh&&lh.prototype)).constructor=gh).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new C.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},gh);function gh(){lh.apply(this,arguments)}function yh(){ch.apply(this,arguments)}function vh(t,e){return t.value.x-e.value.x}var mh,xh,bh=((xh=uh)&&(wh.__proto__=xh),((wh.prototype=Object.create(xh&&xh.prototype)).constructor=wh).prototype.createSegment=function(t,e,i){return new("smooth"===(e.line||{}).style?dh:fh)(t,e,i)},wh.prototype.createMissingValue=function(t,e){var i;return Dn(t.x)&&e!==Qo&&(i={x:t.x,y:t.y},e===$o&&(i.y=0)),i},wh.prototype.seriesMissingValues=function(t){return t.missingValues||$o},wh.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},wh.prototype.sortPoints=function(t){if(t.sort(vh),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];i&&(Dn(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e])}return t},wh),G=((mh=K)&&(_h.__proto__=mh),((_h.prototype=Object.create(mh&&mh.prototype)).constructor=_h).prototype.createPolarAxis=function(){var t=new mo(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},_h.prototype.valueAxisOptions=function(t){return L(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},_h.prototype.createValueAxis=function(){mh.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},_h.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Es.prototype.appendChart.call(this,t,e)},_h.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(ks(t,["polarLine"]),e),this.createScatterChart(ks(t,["polarScatter"]),e),this.createAreaChart(ks(t,["polarArea"]),e)},_h.prototype.createLineChart=function(t,e){0!==t.length&&(t=new uh(this,{series:t}),this.appendChart(t,e))},_h.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new ph(this,{series:t}),this.appendChart(t,e))},_h.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new bh(this,{series:t}),this.appendChart(t,e))},_h.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Jt(o.x,o.y),o=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==o&&null!==r&&t.trigger(i,{element:Ct(e),x:o,y:r})},_h.prototype.createCrosshairs=function(){},_h);function _h(){mh.apply(this,arguments)}function wh(){xh.apply(this,arguments)}zt(G,{xAxis:{},yAxis:{}}),L(G.prototype,Fs);var Ah,ct=G,Zt=((Ah=Gr)&&(Sh.__proto__=Ah),((Sh.prototype=Object.create(Ah&&Ah.prototype)).constructor=Sh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Jt.onCircle(t.center,t.middle(),e);return new oe(e.x,e.y,e.x,e.y)},Sh.prototype.renderSegments=function(){if(Ah.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=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),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],o=Mt(n),r=Mt(o.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o&&r&&Mt(n).linePoints.push(i))}},Sh.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?Vr:Cr)(t,e,i),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==Qo||(o.options.closed=!0),o},Sh);function Sh(){Ah.apply(this,arguments)}zt(Zt,{clip:!1,limitPoints:!1});var kh,Ph,Ch,Th,Mh=Zt,Rh=((Th=Qr)&&(Lh.__proto__=Th),((Lh.prototype=Object.create(Th&&Th.prototype)).constructor=Lh).prototype.fillToAxes=function(){},Lh),Oh=((Ch=Nr)&&(jh.__proto__=Ch),((jh.prototype=Object.create(Ch&&Ch.prototype)).constructor=jh).prototype.fillToAxes=function(){},jh),Bh=((Ph=Mh)&&(Vh.__proto__=Ph),((Vh.prototype=Object.create(Ph&&Ph.prototype)).constructor=Vh).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),"smooth"===p?(s=new Rh(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new Oh(t,e,i,r,n)),s},Vh.prototype.seriesMissingValues=function(t){return t.missingValues||$o},Vh),ce=((kh=$p)&&(Ih.__proto__=kh),(Ih.prototype=Object.create(kh&&kh.prototype)).constructor=Ih);function Ih(t,e){kh.call(this,t,null,e)}function Vh(){Ph.apply(this,arguments)}function jh(){Ch.apply(this,arguments)}function Lh(){Th.apply(this,arguments)}zt(ce,{overlay:{gradient:"none"},labels:{distance:10}});var zh,Eh=ce,bt=((zh=be)&&(Fh.__proto__=zh),((Fh.prototype=Object.create(zh&&zh.prototype)).constructor=Fh).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,n=i.angle/(t+o+r*(t-1)),s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Fh);function Fh(t){zh.call(this,t),this.forEach=t.rtl?un:cn}zt(bt,{gap:1,spacing:0});var Uh,Dh,Hh=bt,Gh=((Dh=be)&&(Wh.__proto__=Dh),((Wh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Wh).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 oe;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Wh),_e=((Uh=wn)&&(Nh.__proto__=Uh),((Nh.prototype=Object.create(Uh&&Uh.prototype)).constructor=Nh).prototype.pointType=function(){return Eh},Nh.prototype.clusterType=function(){return Hh},Nh.prototype.stackType=function(){return Gh},Nh.prototype.categorySlot=function(t,e){return t.getSlot(e)},Nh.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Nh.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Nh.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Uh.prototype.createAnimation.call(this)},Nh);function Nh(){Uh.apply(this,arguments)}function Wh(){Dh.apply(this,arguments)}_e.prototype.reflow=_r.prototype.reflow,zt(_e,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Xh,Yh=_e,Yt=((Xh=K)&&(qh.__proto__=Xh),((qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=qh).prototype.createPolarAxis=function(){var t=new yo(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},qh.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&L(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&L(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),L(t,this.options.valueAxis)},qh.prototype.aggregateCategories=function(){Ia.prototype.aggregateCategories.call(this,this.panes)},qh.prototype.createCategoryAxesLabels=function(){Ia.prototype.createCategoryAxesLabels.call(this,this.panes)},qh.prototype.filterSeries=function(t){return t},qh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(ks(t,["radarArea"]),e),this.createLineChart(ks(t,["radarLine"]),e),this.createBarChart(ks(t,["radarColumn"]),e)},qh.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},qh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Bh(this,this.chartOptions(t)),this.appendChart(t,e))},qh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Mh(this,this.chartOptions(t)),this.appendChart(t,e))},qh.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],(t=this.chartOptions(t)).gap=i.gap,t.spacing=i.spacing,t=new Yh(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},qh.prototype.seriesCategoryAxis=function(){return this.categoryAxis},qh.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Jt(o.x,o.y),o=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==o&&null!==r&&t.trigger(i,{element:Ct(e),category:o,value:r})},qh.prototype.createCrosshairs=function(){},qh);function qh(){Xh.apply(this,arguments)}L(Yt.prototype,Fs,{appendChart:Ia.prototype.appendChart,aggregateSeries:Ia.prototype.aggregateSeries,seriesSourcePoints:Ia.prototype.seriesSourcePoints}),zt(Yt,{categoryAxis:{categories:[]},valueAxis:{}});var Zh,ve=Yt,N=((Zh=be)&&(Kh.__proto__=Zh),((Kh.prototype=Object.create(Zh&&Zh.prototype)).constructor=Kh).prototype.reflow=function(t){var e=this.points,i=this.children[0];this.box=new oe(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new oe(t.x1,e[0].y,t.x2,e[2].y))},Kh.prototype.createVisual=function(){var t=this,e=this.options;Zh.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},Kh.prototype.createPath=function(){var t=this.options,e=t.border;return C.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Kh.prototype.createHighlight=function(t){return C.drawing.Path.fromPoints(this.points,t)},Kh.prototype.highlightVisual=function(){return this.visual.children[0]},Kh.prototype.highlightVisualArgs=function(){var t=C.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Kh.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Jt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Kh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Kh);function Kh(t,e,i){Zh.call(this,e),this.value=t,this.options.index=i.index}zt(N,{color:a,border:{width:1}}),L(N.prototype,wr);var $h,Qh=N,ke=(($h=be)&&(Jh.__proto__=$h),((Jh.prototype=Object.create($h&&$h.prototype)).constructor=Jh).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Jh.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 t=As(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(p=h.fields,I(i.color)||(i.color=p.color||e[s%e.length]),p=L({index:s,owner:this,series:i,dataItem:o[s],percentage:h.value/r},p,{visible:h.visible}),a=h.valueFields.value,h=this.createSegment(a,p),p=this.createLabel(a,p),h&&p&&h.append(p))}},Jh.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;yr(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual"]})},Jh.prototype.createSegment=function(t,e){var i=L({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){i=new Qh(t,i,e);return Object.assign(i,e),this.append(i),this.points.push(i),i}},Jh.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=L({},this.options.labels,i.labels),n=t;if(r.visible){var s=nt(r),o={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};s?n=s(o):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=Nt(i.color),r.background||(r.background=i.color)),this.evalSegmentOptions(r,t,e);o=new Ge(n,L({vAlign:r.position},r),o);return this.labels.push(o),o}},Jh.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==A&&(o=t[i].box.width(),r===S?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Jh.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 d=r[u].percentage,f=r[u+1],g=f?f.percentage:d,y=r[u].points=[],v=o.dynamicHeight?i*d:i/n,f=Rt(d?(e-h*(g/d))/2:g?0:e/2,0,e);y.push(new C.geometry.Point(t.x1+l,t.y1+c)),y.push(new C.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new C.geometry.Point(t.x1+e-f,t.y1+v+c)),y.push(new C.geometry.Point(t.x1+f,t.y1+v+c)),c+=v+o.segmentSpacing,h=Rt(e-2*(l=f),0,e)}},Jh.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=[],d=r[c].percentage,f=o.dynamicHeight?h*d:h/n,d=o.dynamicHeight?i*d:i/n;u.push(new C.geometry.Point(t.x1+p,t.y1+l)),u.push(new C.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new C.geometry.Point(t.x1+e-p-f,t.y1+d+l)),u.push(new C.geometry.Point(t.x1+p+f,t.y1+d+l)),p+=f,l+=d+o.segmentSpacing}},Jh.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)}},Jh);function Jh(t,e){$h.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}zt(ke,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:A,position:A,zIndex:1}}),L(ke.prototype,Dp);var tl,el,il=ke,q=((el=Es)&&(rl.__proto__=el),((rl.prototype=Object.create(el&&el.prototype)).constructor=rl).prototype.render=function(){this.createFunnelChart(this.series)},rl.prototype.createFunnelChart=function(t){var e=t[0],e=new il(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(e)},rl.prototype.appendChart=function(t,e){el.prototype.appendChart.call(this,t,e),_t(this.options.legend.items,t.legendItems)},rl),Y=((tl=be)&&(ol.__proto__=tl),((ol.prototype=Object.create(tl&&tl.prototype)).constructor=ol).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},ol.prototype.createLabel=function(){var t,e,i,o=this.options.labels;o.visible&&(t=this.pointData(),e=nt(o),i=o.color,e=e?e(t):this.formatValue(o.format),i=i||Nt(this.color),this.label=new Ge(e,L({align:A,vAlign:A,margin:{left:5,right:5},zIndex:jt(o.zIndex,this.series.zIndex)},o,{color:i}),t),this.append(this.label))},ol.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ol.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())},ol.prototype.markerBox=function(){var t=this.options.markers,e=t.border,i=this.box.toRect(),o="roundedRect"===jt(t.type,"rect"),r=jt(e.width,o?1:0),e=Math.round(r/2);return t.size&&(o=i.center(),i.size.width=i.size.height=t.size,i.origin.x=Math.round(o.x-i.size.width/2),i.origin.y=Math.round(o.y-i.size.height/2)),i.size.width-=r,i.size.height-=r,i.origin.y+=e+.5,i.origin.x+=e+.5,Fe(i)},ol.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=jt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},ol.prototype.createMarker=function(){var t=this.options,e=t.markers,t=new Ce({type:jt(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:jt(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=t,this.append(t)},ol.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,e=new Ce({type:jt(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:jt(e.zIndex,this.series.zIndex)});e.reflow(this.markerBox());e=e.getElement();return e.options.fill=t.fill,e.options.stroke=t.stroke,e},ol.prototype.highlightVisual=function(){return this.rectVisual},ol.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},ol.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Jt(t,e),align:{horizontal:A,vertical:w}}},ol.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ol.prototype.unclipElements=function(){},ol.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},ol);function ol(t,e){tl.call(this),this.options=e,this.color=e.color||a,this.value=t}function rl(){el.apply(this,arguments)}L(Y.prototype,wr),L(Y.prototype,tt),Y.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var nl,sl=Y,$=((nl=be)&&(al.__proto__=nl),((al.prototype=Object.create(nl&&nl.prototype)).constructor=al).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:l,max:c},this._evalSeries=[]},al.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},al.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)}},al.prototype.addValue=function(t,e){var i;t&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},al.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];At(s)||(this._evalSeries[r]=s=yr(t,{},n,!0));r=t;return s&&yr(r=L({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},al.prototype.pointType=function(){return sl},al.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=L({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},al.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),r=I(i.color)?o.color:function(t,e){void 0===e&&(e=.05);var o=Object(C.parseColor)(t),r=1-e;return function(t){var e=o.toHSL(),i=100-e.l;return e.l+=Math.min((r-t)*i,i),e.toCss()}}(r)(t.value/this.valueRange.max),o=new sl(t,o);return o.color=r,this.append(o),o},al.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,t=e?o.namedXAxes[e]:o.axisX,o=i?o.namedYAxes[i]:o.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!o)throw new Error("Unable to locate Y axis with name "+i);return{xAxis:t,yAxis:o}},al.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var i=s[p++],o=n.seriesAxes(e.series),r=o.xAxis,e=o.yAxis,o=r.categoryIndex(t.x),t=e.categoryIndex(t.y),o=r.getSlot(o,o,a),t=e.getSlot(t,t,a);i&&(o&&t?(t=n.pointSlot(o,t),i.reflow(t)):i.visible=!1)}),this.box=t},al.prototype.pointSlot=function(t,e){return new oe(t.x1,e.y1,t.x2,e.y2)},al.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,d=n.totalIndex(c.x),l=s.totalIndex(c.y),d=a.min<=d&&d<=a.max,l=p.min<=l&&l<=p.max;d&&l&&t(c,L({pointIx:h,series:o,seriesIx:i,dataItem:o.data[h],owner:this},u))}},al.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},al.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},al);function al(t,e){nl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}zt($,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),L($.prototype,{_bindPoint:_r.prototype._bindPoint});var pl,hl=$,ot=((pl=Es)&&(ll.__proto__=pl),((ll.prototype=Object.create(pl&&pl.prototype)).constructor=ll).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},ll.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},ll.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,r=r.yAxis,s=Kt(n.categories||[]),a=Kt(r.categories||[]),p=0;p<o.length;p++){var h=Xo.current.bindPoint(i,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},ll.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);r=this.filterVisibleSeries(r);r&&this.createHeatmapChart(ks(r,["heatmap"]),o)}},ll.prototype.createHeatmapChart=function(t,e){t=new hl(this,{series:t});this.appendChart(t,e)},ll.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=ht([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=ht([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},ll.prototype.seriesAxes=function(t){var e=this.options,i=[].concat(e.xAxis),o=t.xAxis,i=o?i.find(function(t){return t.name===o}):i[0],e=[].concat(e.yAxis),r=t.yAxis,e=r?e.find(function(t){return t.name===r}):e[0];if(!i)throw new Error("Unable to locate X axis with name "+o);if(!e)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:i,yAxis:e}},ll.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},ll.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}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===i&&!c){l=Xo.current.bindPoint(l,0).valueFields;a.push(l[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){o=!0;break}t=new(Ss(s.type,y)||!s.type&&o?Zi:Fi)(s,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.mapCategories(),t},ll.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++)dt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)dt(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]},ll.prototype.removeAxis=function(t){var e=t.options.name;pl.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},ll.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Jt(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];_s(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(i,{element:Ct(e),originalEvent:e,x:Ts(a),y:Ts(p)})},ll.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),t=(i?o.y:o.x).indexOf(t);cl(this.options,t,i,e),cl(this.originalOptions,t,i,e)},ll.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},ll);function ll(){pl.apply(this,arguments)}function cl(t,e,i,o){L([].concat(i?t.yAxis:t.xAxis)[e],o)}zt(ot,{xAxis:{},yAxis:{}}),L(ot.prototype,Fs);gt=ot,G="color",Zt="first",ce="max";ap.current.register(Ia,[Jo,tr,er,or,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),ap.current.register(jp,["scatter","scatterLine","bubble"]),ap.current.register(Yp,[ir]),ap.current.register(oh,["donut"]),ap.current.register(q,["funnel"]),ap.current.register(ct,["polarArea","polarLine","polarScatter"]),ap.current.register(ve,["radarArea","radarColumn","radarLine"]),ap.current.register(gt,["heatmap"]),Xo.current.register([Jo,tr,er,or,"area","verticalArea"],[h],["category",G,"noteText","errorLow","errorHigh"]),Xo.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",G,"noteText"]),Xo.current.register(["waterfall","horizontalWaterfall"],[h],["category",G,"noteText","summary"]),Xo.current.register(["polarArea","polarLine","polarScatter"],[v,m],[G]),Xo.current.register(["radarArea","radarColumn","radarLine"],[h],[G]),Xo.current.register(["funnel"],[h],["category",G,"visibleInLegend","visible"]),Xs.current.register([Jo,tr,er,or,"area","verticalArea","waterfall","horizontalWaterfall"],{value:ce,color:Zt,noteText:Zt,errorLow:"min",errorHigh:ce}),Xs.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:ce,color:Zt,noteText:Zt}),Xs.current.register(["radarArea","radarColumn","radarLine"],{value:ce,color:Zt}),Xo.current.register(["scatter","scatterLine","bubble"],[v,m],[G,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Xo.current.register(["bubble"],[v,m,"size"],[G,"category","noteText"]),Xo.current.register(["heatmap"],[v,m,h],[G,"noteText"]),Xo.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",G,"downColor","noteText"]),Xs.current.register(["candlestick","ohlc"],{open:ce,high:ce,low:"min",close:ce,color:Zt,downColor:Zt,noteText:Zt}),Xo.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",G,"noteText"]),Xs.current.register(["boxPlot","verticalBoxPlot"],{lower:ce,q1:ce,median:ce,q3:ce,upper:ce,mean:ce,outliers:Zt,color:Zt,noteText:Zt}),Xo.current.register(["bullet","verticalBullet"],["current","target"],["category",G,"visibleInLegend","noteText"]),Xs.current.register(["bullet","verticalBullet"],{current:ce,target:ce,color:Zt,noteText:Zt}),Xo.current.register([ir,"donut"],[h],["category",G,"explode","visibleInLegend","visible"]);var ul,dl=["category",h,v,m],bt=((ul=C.Class)&&(fl.__proto__=ul),((fl.prototype=Object.create(ul&&ul.prototype)).constructor=fl).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},fl.prototype._setElementClass=function(t){p(t,"k-chart")},fl.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=dl,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=L({},e,t),this.applySeriesColors()},fl.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)}},fl.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;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&&Ft(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},fl.prototype._resize=function(){this._noTransitionsRedraw()},fl.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},fl.prototype.getAxis=function(t){return Io(t,this._plotArea.axes)},fl.prototype.findAxisByName=function(t){return this.getAxis(t)},fl.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new jo(e[i])},fl.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new jo(e[t])},fl.prototype.plotArea=function(){return new Lo(this._plotArea)},fl.prototype.toggleHighlight=function(t,e){var i,o=this._plotArea,r=(o.srcSeries||o.series||[])[0],n=I(e)?o.filterPoints(e):(z(e)?(n=e.series,i=e.category):n=i=e,"donut"===r.type?gl(o.pointsBySeriesName(n),i):r.type===ir||"funnel"===r.type?gl((o.charts[0]||{}).points,i):o.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},fl.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},fl.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;I(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&At(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(i=this._plotArea.pointsByCategoryIndex(i),r.showAt(i)):e&&r.show(e)},fl.prototype.hideTooltip=function(){this._tooltip.hide()},fl.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&Pt(e,{width:i.width}),i.height&&Pt(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=C.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},fl.prototype._surfaceWrap=function(){return this.element},fl.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 La,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),bl(this._plotArea.panes),this._navState||this._cancelDomEvents()},fl.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(e=this.options,i=L({},t.options,{chartArea:{width:t.width,height:t.height}}),xl(this._originalOptions,i),this.options=L({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories(),(i=this._getModel()).renderVisual(),bl(i._plotArea.panes),i=i.visual,this.options=e):i=this.surface.exportVisual(),i},fl.prototype._sharedTooltip=function(){return this._plotArea instanceof Ia&&this.options.tooltip&&this.options.tooltip.shared},fl.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ga(this._plotArea,t.pannable))},fl.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Za(this,e))},fl.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Ka(this,e))},fl.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,i=!(t||!1!==e&&!1!==i||this.requiresHandlers(["dragStart",nr,sr])),e=(!1===e||!1===o)&&!this.requiresHandlers(["zoomStart",ar,pr]),o=this.element;this._dragZoomEnabled&&i&&e?(o.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||i&&e||(o.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!i,!e)},fl.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},fl.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new gp(this.chartService,t)},fl.prototype._createSharedTooltip=function(t){return new xp(this._plotArea,t)},fl.prototype.applyDefaults=function(t,a){!function(t){var i,o,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||o.color,t=L({},r,r[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[i],t}for(var s=0;s<dl.length;s++)o=t.axisDefaults||{},e=(e=[].concat(t[i=dl[s]+"Axis"])).map(n),t[i]=1<e.length?e:e[0]}(t),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=L({},t.seriesDefaults),s=e?L({},e.seriesDefaults):{},a=L({},s);yl(n),yl(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,h=L({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=h,i[p]=L({},h,i[p]),i[p].data=i[p].data||[]}}(t,a)},fl.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)}},fl.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new Be(this._modelOptions());return i.chart=this,i._plotArea=e,Ye.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new np(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},fl.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return L({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},fl.prototype._createPlotArea=function(t){var e=this.options;return ap.current.create(t?[]:e.series,e,this.chartService)},fl.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof Fi&&n.select&&!n.vertical&&(o=r.range(),n=new fp(this,r,L({min:o.min,max:o.max},n.select)),e.push(n))}},fl.prototype._selectStart=function(t){return this.trigger("selectStart",t)},fl.prototype._select=function(t){return this.trigger("select",t)},fl.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},fl.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(C.throttle)(this._mousemove.bind(this),20)},fl.prototype.addObserver=function(t){t&&this.observers.push(t)},fl.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},fl.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},fl.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var i=(e.sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},fl.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,wt(e,((t={}).contextmenu=this._clickHandler,t[hr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&wt(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=et.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()},fl.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},fl.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},fl.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},fl.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(pr,{}))},fl.prototype._gesturechange=function(t){var e,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,t={delta:e,axisRanges:vl(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger("zoomStart",t)||(this._zooming||(this._zooming=!0),(t.axisRanges=i.updateRanges(e))&&!this.trigger(ar,t)&&i.zoom())))},fl.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},fl.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",nr,sr])&&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:vl(this._plotArea.axes),originalEvent:t}))},fl.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(nr,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];!p.options.name||0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(nr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},fl.prototype._end=function(t){var e,i;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(sr,{axisRanges:vl(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,sr),this._zoomSelection&&(i=this._zoomSelection.end(t))&&!this.trigger(ar,{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(pr,{axisRanges:i,originalEvent:t})))},fl.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},fl.prototype._mousewheel=function(t){var e=this,i=mt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:vl(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(ar,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(pr,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=!o&&!this._startNavigation(t,r,"zoomStart")?this._navState:o){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s))}this.trigger(ar,{delta:i,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,pr)},150)}}},fl.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),e=o.axes.slice(0);r&&(o=vl(e),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:o,pane:r,axes:e}))},fl.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},fl.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},fl.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))),o=i&&(o=o.closest(i))&&o.aliasFor?o.aliasFor():o},fl.prototype._eventCoordinates=function(t){t=Tt(t);return this._toModelCoordinates(t.x,t.y)},fl.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=U(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},fl.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=kt(this.element);return{left:It(t.x+e.left+i.left),top:It(t.y+e.top+i.top)}},fl.prototype._toModelCoordinates=function(t,e){var i=this.element,o=kt(i),r=this._elementPadding(),i=Gt(i).invert(),i=new C.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new Jt(i.x,i.y)},fl.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)},fl.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},fl.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},fl.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 Es)}),o=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover?(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),t?this._displayInactiveOpacity(i,r):this._highlight.show(i))):!i&&t&&(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},fl.prototype._displayTooltip=function(t){L({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},fl.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);o&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(o=this._getInactivePoints(t,o))&&o.length&&this._highlight.show(o,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},fl.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},fl.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},fl.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).over(this,e)},fl.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))}},fl.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},fl.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},fl.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},fl.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},fl.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},fl.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),wt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},fl.prototype._mouseMoveTracking=function(t){var e,i=this.options,o=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(L({},i.tooltip,e.options.tooltip).visible&&o.show(e),r.show(e)))):(Vt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},fl.prototype._mousemove=function(t){var e,i=this._eventCoordinates(t),o=this._plotArea;this._trackCrosshairs(i),o.hover&&((e=o.backgroundContainsPoint(i))?(o.hovered=!0,this._plotArea.hover(this,t)):o.hovered&&!e&&(this.trigger("plotAreaLeave"),o.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(i,t)},fl.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()}},fl.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,p,h;this._suppressHover||(o=this.options.tooltip,h=this._plotArea,p=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,h.backgroundContainsPoint(t)?(s=p.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&i?((h=(p=(a=h.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger("seriesHover",h)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},fl.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},fl.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()},fl.prototype._deferRedraw=function(){this._redraw()},fl.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},fl.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)}},fl.prototype.bindCategoryAxisFromSeries=function(t,e){for(var i,o,r=this.options.series,n=r.length,s=new ut,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var f=(i=Cs(t,Do(l.categoryField,u[0])))?Ps:Do,g=0;g<d;g++){var y=u[g],v=f(l.categoryField,y,this.chartService.intl);!i&&s.get(v)||(a.push([v,y]),i||s.set(v,!0))}}0<a.length?(o=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}(a=i?function(t){for(var e=function(t,e){void 0===e&&(e=Ci);for(var i=1,o=t.length;i<o;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}(a,t=void 0===t?Ci:t),i=e.length,o=0<i?[e[0]]:[],r=1;r<i;r++)0!==t(e[r],Mt(o))&&o.push(e[r]);return o}(function(t,e){return Ci(t[0],e[0])}):a),t.categories=o[0]):p&&(t.categories=[])},fl.prototype._isBindable=function(t){for(var e=Xo.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===h?r="field":r+="Field",!At(t[r])){i=!1;break}}return i},fl.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},fl.prototype._legendItemHover=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=dt(r.type,[ir,"donut","funnel"])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},fl.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},fl.prototype.updateMouseMoveHandler=function(){var t;Vt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&wt(this.element,((t={}).mousemove=this._mousemove,t))},fl.prototype.applyOptions=function(t,e){xl(this._originalOptions,t),this._originalOptions=L(this._originalOptions,t),this.options=L({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},fl.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},fl.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},fl.prototype.setIntlService=function(t){this.chartService.intl=t},fl.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},fl.prototype.destroy=function(){var t;this._destroyed=!0,Vt(this.element,((t={}).contextmenu=this._clickHandler,t[hr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Vt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},fl.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},fl.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},fl.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)},fl);function fl(t,e,i,o){var r=this;void 0===o&&(o={}),ul.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new J(this,o),this.chartService.theme=i,this._initElement(t);t=L({},this.options,e);this._originalOptions=L({},t),this._theme=i,this._initTheme(t,i),this._initHandlers(),this._initSurface(),this.bindCategories(),Lt.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function gl(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function yl(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 vl(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 ml=["data","categories"];function xl(t,e){for(var i in e){var o,r,n;!dt(i,ml)&&e.hasOwnProperty(i)&&(o=e[i],r=t[i],At(r)&&((n=null===o)||!At(o)?(delete t[i],n&&delete e[i]):r&&z(o)&&z(r)&&xl(r,o)))}}function bl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}zt(bt,{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 _l,wl=bt,Al=((_l=xp)&&(kl.__proto__=_l),((kl.prototype=Object.create(_l&&_l.prototype)).constructor=kl).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 Jt(this.plotArea.box.x2,e.center().y):new Jt(e.center().x,-2),align:o}},kl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},kl),Sl=[Jo,"bullet"];function kl(){_l.apply(this,arguments)}function Pl(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 Cl(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function Tl(t){return R(t)?[t]:t}var Ml,_e=((Ml=wl)&&(Rl.__proto__=Ml),((Rl.prototype=Object.create(Ml&&Ml.prototype)).constructor=Rl).prototype._setElementClass=function(t){p(t,"k-sparkline")},Rl.prototype._initElement=function(t){Ml.prototype._initElement.call(this,t),this._initialWidth=Math.floor(Pt(t).width)},Rl.prototype._resize=function(){var t=this.element,e=Pl(t.childNodes);this._initialWidth=Math.floor(Pt(t).width),Cl(t.childNodes,e),Ml.prototype._resize.call(this)},Rl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Pl(e.childNodes),o=document.createElement("span");o.innerHTML="&nbsp;",e.appendChild(o);t=L({width:this._autoWidth,height:Pt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Pt(e,{width:t.width,height:t.height}),e.removeChild(o),Cl(e.childNodes,i),this.surface&&this.surface.resize(),t},Rl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Rl.prototype._createPlotArea=function(t){t=Ml.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Rl.prototype._calculateWidth=function(t){for(var e=this.options,i=D(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===Jo)return 150;if("bullet"===p.type)return 150;if(p.type===ir)return Pt(r).height;var h=a.categoryAxis;h&&(a=h.categoriesCount()*(!a.options.isStacked&&dt(p.type,[tr,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=i.left+i.right),e},Rl.prototype._createSharedTooltip=function(t){return new Al(this._plotArea,t)},Rl.normalizeOptions=function(t){t=Tl(t);return(t=x(t)?{seriesDefaults:{data:t}}:L({},t)).series||(t.series=[{data:Tl(t.data)}]),L(t,{seriesDefaults:{type:t.type}}),t=dt(t.series[0].type,Sl)||dt(t.seriesDefaults.type,Sl)?L({},{categoryAxis:{crosshair:{visible:!1}}},t):t},Rl);function Rl(){Ml.apply(this,arguments)}zt(_e,{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 Ol,Bl=_e,Il=((Ol=C.drawing.Animation)&&(Vl.__proto__=Ol),((Vl.prototype=Object.create(Ol&&Ol.prototype)).constructor=Vl).prototype.setup=function(){this._initialOpacity=parseFloat(U(this.element,"opacity").opacity)},Vl.prototype.step=function(t){U(this.element,{opacity:String(ft(this._initialOpacity,0,t))})},Vl.prototype.abort=function(){Ol.prototype.abort.call(this),U(this.element,{display:"none",opacity:String(this._initialOpacity)})},Vl.prototype.cancel=function(){Ol.prototype.abort.call(this),U(this.element,{opacity:String(this._initialOpacity)})},Vl);function Vl(){Ol.apply(this,arguments)}function jl(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var Ll,K=((Ll=C.Class)&&(zl.__proto__=Ll),((zl.prototype=Object.create(Ll&&Ll.prototype)).constructor=zl).prototype.createElements=function(){var t=this.element=jl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=jl("k-tooltip k-chart-tooltip"),i=this.scroll=jl("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},zl.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=wi(Mi(t)+Mi(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,a=this.chartService.intl.format(r.format,t,e),r=nt(r);this.clearHideTimeout(),this._visible||(U(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,U(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});s=U(s,["marginTop","borderTopWidth","height"]);U(n,{width:p,left:h+c*l,top:i.y1+s.marginTop+s.borderTopWidth+s.height/2}),U(o,{visibility:"visible"})},zl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},zl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Il(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},zl.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},zl);function zl(t,e,i){Ll.call(this),this.options=L({},this.options,i),this.container=t,this.chartService=e;e=U(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}zt(K,{format:"{0:d} - {1:d}",hideDelay:500});var El=K,Fl="_navigator",Ul=Fl;function Dl(){}var Hl,Gl,Nl=((Gl=C.Class)&&(Xl.__proto__=Gl),((Xl.prototype=Object.create(Gl&&Gl.prototype)).constructor=Xl).prototype.parseDate=function(t){return Vi(this.chart.chartService.intl,t)},Xl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Xl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Xl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Xl.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,n=o.max,s=e.select,a=s.from,p=s.to,o=s.mousewheel,s=(Dl.prototype=i,new Dl);0!==i.categoriesCount()&&(this.clean(),s.box=i.box,this.selection=new fp(t,s,{min:r,max:n,from:a||r,to:p||n,mousewheel:jt(o,{zoom:"left"}),visible:e.visible},new yt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new El(t.element,t.chartService,{min:r,max:n,template:nt(e.hint),format:e.hint.format})))},Xl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Ul].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},r=o.from||e,t=o.to||i;this.options.select=L({},o,{from:r=r<e?e:r,to:t=i<t?i:t}),this.filterAxes()},Xl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Mt(e.panes),t)},Xl.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)},Xl.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),o=r.pane.box.containsPoint(o),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!o&&i&&(e=e.from&&e.to?Mi(e.to)-Mi(e.from):Mi(i.options.to)-Mi(i.options.from),t=wi(Rt(Mi(t.min),n.min,Mi(n.max)-e)),n=wi(Rt(Mi(t)+e,Mi(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(t,n),this.showHint(t,n))},Xl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Xl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,t=this.options.select;t.from=e,t.to=i},Xl.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,i=(t=void 0===t?{}:t).from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Fl&&(n.min=i,n.max=o)}},Xl.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:o.from,to:o.to},"category"!==t.options.type&&(i=new Zi(L({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,e.from=Si(i.min,-i.baseUnitStep,i.baseUnit),e.to=Si(i.max,i.baseUnitStep,i.baseUnit)),this.chart.trigger("navigatorFilter",e))},Xl.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;i&&(o=s.categoryIndex(i.options.from),s=s.categoryIndex(i.options.to),t.originalEvent.preventDefault(),1<Math.abs(a)&&(a*=3),1<s-o?(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))},Xl.prototype._zoomEnd=function(t){this._dragEnd(t)},Xl.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},Xl.prototype._selectStart=function(t){return this.chart._selectStart(t)},Xl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Xl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Xl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Ul]},Xl.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}},Xl.setup=function(t,e){var i,o,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,i=L({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=L({},i.pane,{name:Fl}),i.visible||(r.visible=!1,r.height=.1),o.push(r),Xl.attachAxes(t,i),Xl.attachSeries(t,i,e))},Xl.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),t=0===ks(i,rr).length,i=L({type:"date",pane:Fl,roundToBaseUnit:!t,justified:t,_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]}}),t=e.categoryAxis;o.push(L({},i,{maxDateGroups:200},t,{name:Ul,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),L({},i,t,{name:Ul+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),L({},i,t,{name:Ul+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(L({name:Ul,pane:Fl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Xl.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(L({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Ul,categoryAxis:Ul,autoBind:e.autoBindElements}))},Xl),Yt=((Hl=wl)&&(Wl.__proto__=Hl),((Wl.prototype=Object.create(Hl&&Hl.prototype)).constructor=Wl).prototype.applyDefaults=function(t,e){var i=Pt(this.element).width||600,e=e,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&L({},e,i);Nl.setup(t,e),Hl.prototype.applyDefaults.call(this,t,e)},Wl.prototype._setElementClass=function(t){p(t,"k-chart k-stockchart")},Wl.prototype.setOptions=function(t){this.destroyNavigator(),Hl.prototype.setOptions.call(this,t)},Wl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Wl.prototype._resize=function(){this.noTransitionsRedraw()},Wl.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Wl.prototype._dirty=function(){var t=this.options,e=ht([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},Wl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Nl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Hl.prototype._redraw.call(this),t.initSelection()},Wl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Fl?this._unsetActivePoint():Hl.prototype._trackSharedTooltip.call(this,t)},Wl.prototype.bindCategories=function(){Hl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Wl.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===Ul?t=o.categories:t&&o.pane===Fl&&(o.categories=t)}},Wl.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Wl.prototype.destroy=function(){this.destroyNavigator(),Hl.prototype.destroy.call(this)},Wl.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Hl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Fl},Wl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Wl);function Wl(){Hl.apply(this,arguments)}function Xl(t){Gl.call(this),this.chart=t;var e=this.options=L({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),At(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new yt(this,((e={})[nr]="_drag",e[sr]="_dragEnd",e[ar]="_zoom",e[pr]="_zoomEnd",e)),t.addObserver(this.chartObserver)}zt(Yt,{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 Yl=Yt,ql=Math.PI/180;function Zl(t,e){var i=t.getOrigin(),o=t.getSize(),e=D(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var Kl=C.drawing.Group,$l=C.drawing.Path,Ql=C.drawing.Text;function Jl(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=$l.fromRect(new C.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),o=new Ql(t.text,new C.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),e=Zl(o.bbox().clone(),e.padding),r=$l.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new Kl;return n.append(i),n.append(r),n.append(o),n}function tc(t,e,i){var o=At(t.from)?t.from:c,r=At(t.to)?t.to:l;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function ec(t,e){e=D(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Zl(t,e)}var ic,oc=C.drawing.Path,rc=C.drawing.Surface,N=((ic=C.Class)&&(nc.__proto__=ic),((nc.prototype=Object.create(ic&&ic.prototype)).constructor=nc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},nc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},nc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},nc.prototype.exportVisual=function(){return this._visuals},nc.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(x(t))for(var r=0;r<t.length;r++)R(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},nc.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]},nc.prototype.resize=function(){this.noTransitionsRedraw()},nc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},nc.prototype.redraw=function(){var t=this._surfaceSize(),t=new C.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=ec(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},nc.prototype.setOptions=function(t,e){this._originalOptions=L(this._originalOptions,t),this.options=L({},this._originalOptions),this._initTheme(e),this.redraw()},nc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},nc.prototype.setIntlService=function(t){this.contextService.intl=t},nc.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=L({},e,this.options);var t=this.options,i=t.pointer;if(x(i)){for(var o=[],r=0;r<i.length;r++)o.push(L({},e.pointer,i[r]));t.pointer=o}},nc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new C.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=ec(e,i.width)),oc.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},nc.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();Pt(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=rc.create(i,{type:t.renderAs}))},nc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&L(e,t.gaugeArea),e},nc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},nc.prototype.getSize=function(){return this._getSize()},nc.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},nc.prototype._defaultSize=function(){return{width:200,height:200}},nc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},nc);function nc(t,e,i,o){void 0===o&&(o={}),ic.call(this),this.element=t,this.theme=i,this.contextService=new J(this,o),this._originalOptions=L({},this.options,e),this.options=L({},this._originalOptions),this._initTheme(i),this.redraw()}zt(N,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var sc=N,ac=C.drawing.Path,pc=C.drawing.Group,hc=C.geometry.Point;function lc(t,e,i,o){var r,n,s,a,p,h=e.length;if(o.visible)for(var l=i.mirror,c=i.lineBox,u=o.skip;u<h;u+=o.step)u%o.skipUnit!=0&&(i.tickX=l?c.x2:c.x2-o.size,i.tickY=l?c.y1-o.size:c.y1,i.position=e[u],t.append((r=o,a=s=n=void 0,p=void 0,s=i.position,a=i.tickX,p=i.tickY,p=i.vertical?(n=new hc(a,s),new hc(a+r.size,s)):(n=new hc(s,p),new hc(s,p+r.size)),new ac({stroke:{color:r.color,width:r.width}}).moveTo(n).lineTo(p))))}var cc,ke=((cc=ro)&&(uc.__proto__=cc),((uc.prototype=Object.create(cc&&cc.prototype)).constructor=uc).prototype.initUserOptions=function(t){t=L({},this.options,t);return(t=L({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||$t(t.min,t.max),t},uc.prototype.initFields=function(){},uc.prototype.render=function(){var t=this.elements=new pc,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},uc.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 pc,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=tc(n[h],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(ac.fromRect(new C.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},uc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new pc,o=0;o<t.length;o++)i.append(Jl(t[o],e.labels));return i},uc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new pc;return 0<t.width&&t.visible&&((t=new ac({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},uc.prototype.renderTicks=function(){var t=new pc,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return lc(t,this.getMajorTickPositions(),o,e.majorTicks),lc(t,this.getMinorTickPositions(),o,L({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},uc);function uc(t,e){t=t||{};!At(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),cc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}zt(ke,{min:0,max:50,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var dc,fc=ke,tt=((dc=C.Class)&&(gc.__proto__=dc),((gc.prototype=Object.create(dc&&dc.prototype)).constructor=gc).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=At(e._oldValue)?e.value:i,e.value=Rt(t,i,o),this.elements&&this.repaint()},gc);function gc(t,e){dc.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=L({},this.options,e);e.fill=e.color,this.scale=t,At(e.value)?e.value=Rt(e.value,o,i):e.value=o}zt(tt,{color:r});var yc,Y=tt,$=((yc=Y)&&(vc.__proto__=yc),((vc.prototype=Object.create(yc&&yc.prototype)).constructor=vc).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,n=o.size/2,r=D(o.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(i=new oe(p.x1+r,p.y1,p.x1+r,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new oe(p.x2+r,p.y1-n,p.x2+r,p.y2+n))):(i=new oe(p.x1,p.y1-r,p.x2,p.y1-r),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new oe(p.x1-n,p.y1-r,p.x2+n,p.y1-r))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},vc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:At(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},vc.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,t=i.mirror,i=i.vertical,e=D(e.margin);return i?e[t?"left":"right"]:e[t?"bottom":"top"]},vc);function vc(t,e){yc.call(this,t,e),this.options=L({track:{visible:At(e.track)}},this.options)}zt($,{shape:"barPointer",track:{border:{width:1}},color:r,border:{width:1},opacity:1,margin:D(3),animation:{type:"barPointer"},visible:!0});var mc,xc=$,ot=((mc=C.drawing.Animation)&&(bc.__proto__=mc),((bc.prototype=Object.create(mc&&mc.prototype)).constructor=bc).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);i=this.fromScale=new C.geometry.Point(i.x1,i.y1),o=this.toScale=new C.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(i.distanceTo(o)/t.duration*1e3,1))},bc.prototype.step=function(t){var e=ft(this.fromScale.x,this.toScale.x,t),t=ft(this.fromScale.y,this.toScale.y,t);this.element.transform(C.geometry.transform().translate(e,t))},bc);function bc(){mc.apply(this,arguments)}zt(ot,{easing:"linear",duration:250}),C.drawing.AnimationFactory.current.register("arrowPointer",ot);var _c,wc,Ac=ot,Sc=C.geometry.Point,kc=C.drawing.Path,Pc=((wc=xc)&&(Tc.__proto__=wc),((Tc.prototype=Object.create(wc&&wc.prototype)).constructor=Tc).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 Sc(0,0-i),new Sc(0-o*e,0),new Sc(0,0+i)]:[new Sc(0-i,0),new Sc(0,0+o*e),new Sc(0+i,0)]},Tc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ac(this.elements,L(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&&(t.options.duration=0),t.setup(),t.play()},Tc.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type="arrowPointer";o=new kc({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),e=t.getSlot(e.value);return o.transform(C.geometry.transform().translate(e.x1,e.y1)),this.elements=o},Tc),q=((_c=C.drawing.Animation)&&(Cc.__proto__=_c),((Cc.prototype=Object.create(_c&&_c.prototype)).constructor=Cc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},Cc.prototype.step=function(t){t=ft(this.from,this.to,t);this._set(t)},Cc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},Cc);function Cc(){_c.apply(this,arguments)}function Tc(t,e){wc.call(this,t,e),At(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}zt(q,{easing:"linear",speed:250}),C.drawing.AnimationFactory.current.register("barPointer",q);var Mc,Rc,Oc=q,Bc=C.drawing.Group,Ic=C.drawing.Path,Vc=((Rc=xc)&&(zc.__proto__=Rc),((zc.prototype=Object.create(Rc&&Rc.prototype)).constructor=zc).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,o=e.getSlot(e.options.min),r=e.getSlot(t),i=n?m:v,e=n?v:m,t=this._margin()*s,s=new C.geometry.Point;s[i]=o[i+"1"],s[e]=o[e+"1"];o=new C.geometry.Point;o[i]=r[i+"1"],o[e]=r[e+"1"],n?(s.translate(t,0),o.translate(t,0)):(s.translate(0,t),o.translate(0,t));e=o.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,o,e,t]},zc.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();i=new Oc(o,L(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},zc.prototype.render=function(){var t=new Bc,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new Ic({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},zc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new Ic.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},zc),jc=C.drawing.Group,ct=((Mc=sc)&&(Lc.__proto__=Mc),((Lc.prototype=Object.create(Mc&&Mc.prototype)).constructor=Lc).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,t=new oe(i,o,i+t.width(),o+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Lc.prototype._buildVisual=function(){var t=new jc,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},Lc.prototype._createModel=function(){var t=this.options,e=this.scale=new fc(t.scale,this.contextService);this.pointers=[];for(var i=x(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=L({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Pc:Vc;this.pointers.push(new n(e,r))}},Lc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Lc.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 n=i.options.vertical?(e=n.width()/2,new oe(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new oe(t.x1,r.y-e,t.x2,r.y+e))},Lc.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 oe(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new oe(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},Lc.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},Lc.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)},Lc);function Lc(){Mc.apply(this,arguments)}function zc(t,e){Rc.call(this,t,e),At(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}zt(ct,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Ec=ct,Fc=C.drawing.Arc,Uc=C.drawing.Path,Dc=C.drawing.Group;function Hc(t,e,i,o){var r=new Dc,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 C.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new Uc({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(h))}return r}function Gc(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var Nc,ve=((Nc=ro)&&(Wc.__proto__=Nc),((Wc.prototype=Object.create(Nc&&Nc.prototype)).constructor=Wc).prototype.initUserOptions=function(t){t=L({},this.options,t);return t.majorUnit=t.majorUnit||$t(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Wc.prototype.initFields=function(){},Wc.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Wc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!At(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Wc.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,e=s-n;return(r?s-(t-i)/(o-i)*e:(t-i)/(o-i)*e+n)+180},Wc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Wc.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,t=0;return e.visible&&(t=e.size),t=i.visible?Math.max(i.size,t):t},Wc.prototype.labelsCount=function(){var t=Nc.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Wc.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 Dc,s=.05*i;At(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=At(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,a=D(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=o[f],x=(m-180)*ql,b=e.pointAt(m),m=b.x+Math.cos(x)*(y+u)*(p?1:-1),x=b.y+Math.sin(x)*(v+d)*(p?1:-1);g.reflow(new oe(m-y,x-v,m+y,x+v));m=new C.geometry.Point(g.box.x1,g.box.y1),y=void 0;h?(x=(y=this.labelElements.children[f]).bbox().origin,(v=y.transform()||C.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=Jl(g,t.labels),n.append(y)),this.bbox=C.geometry.Rect.union(this.bbox,y.bbox())}return n},Wc.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,o=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=o+i);for(var r=e+o/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=C.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Wc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Dc;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&i.append(this.createRange(h,l,s,p))}}return i},Wc.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,e=new C.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new Fc(e,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},Wc.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(Gc(r,n,s));for(var a=0;a<i;a++)for(var p=tc(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(Gc(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(Gc(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},Wc.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},Wc.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new C.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},Wc.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Hc(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new Dc;o.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=i.getRadiusX(),i.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Hc(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},Wc.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},Wc.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),360<=n&&i.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(It(a,3)),a+=p;return It(a)<=t.endAngle&&h.push(a),h},Wc.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)},Wc.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,p=a.y-p[0].anchor().y;t[s].transform((new C.geometry.transform).translate(h,p))}},Wc);function Wc(t,e){Nc.call(this,0,1,t,e)}zt(ve,{min:0,max:100,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Xc,Yc=ve,gt=((Xc=C.drawing.Animation)&&(qc.__proto__=Xc),((qc.prototype=Object.create(Xc&&Xc.prototype)).constructor=qc).prototype.step=function(t){var e=this.options,t=ft(e.oldAngle,e.newAngle,t);this.element.transform(C.geometry.transform().rotate(t,e.center))},qc);function qc(t,e){Xc.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}zt(gt,{easing:"linear",duration:150}),C.drawing.AnimationFactory.current.register("radialPointer",gt);var Zc,Kc=gt,$c=C.drawing.Circle,Qc=C.drawing.Group,Jc=C.drawing.Path,ce=((Zc=Y)&&(tu.__proto__=Zc),((tu.prototype=Object.create(Zc&&Zc.prototype)).constructor=tu).prototype.setAngle=function(t){this.elements.transform(C.geometry.transform().rotate(t,this.center))},tu.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new Kc(this.elements,L(e.animation,{oldAngle:i,newAngle:t})).play()},tu.prototype.render=function(){var t=this.scale,e=this.options,i=new Qc;return!1!==e.animation&&L(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(ql),i},tu.prototype.reflow=function(t){var e=this.center=t.center,i=Rt(this.options.length||1,.1,1.5),i=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(i*this.options.cap.size);this.bbox=C.geometry.Rect.fromPoints(new C.geometry.Point(e.x-i,e.y-i),new C.geometry.Point(e.x+i,e.y+i))},tu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Jc({fill:{color:i},stroke:{color:i,width:.5}});return i.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(),i},tu.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,t=new C.geometry.Circle(this.center,this.capSize);return new $c(t,{fill:{color:e},stroke:{color:e}})},tu);function tu(){Zc.apply(this,arguments)}zt(ce,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var eu,iu=ce,ou=C.drawing.Group,Zt=((eu=sc)&&(ru.__proto__=eu),((ru.prototype=Object.create(eu&&eu.prototype)).constructor=ru).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=C.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},ru.prototype._buildVisual=function(t,e,i){var o=this._visuals=new ou;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},ru.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)}},ru.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=It(a,3),h=It(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===o?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(o=this.getPlotBox(h,t,s))&&o<=2||(r=0<e&&0<o?2*p:e<0&&o<0?2*h:It((p+h)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(h=r,o=i):(p=r,e=i)},ru.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=C.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},ru.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},ru.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,i=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=i,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=C.geometry.Rect.union(r.bbox,n[s].bbox)},ru.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Yc(t.scale,this.contextService);this.pointers=[];for(var o=x(e)?e:[e],r=0;r<o.length;r++){var n=new iu(i,L({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},ru);function ru(){eu.apply(this,arguments)}zt(Zt,{transitions:!0,gaugeArea:{background:""}});var nu,su=Zt,G=((nu=Yc)&&(au.__proto__=nu),((au.prototype=Object.create(nu&&nu.prototype)).constructor=au).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},au.prototype.hasRanges=function(){return!0},au.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},au.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),e=this.slotAngle(o?t:e),i=this.createRange(r,e,this.getRangeRadius(),i);return this.ranges.append(i),i},au);function au(){nu.apply(this,arguments)}zt(G,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var pu,hu=G,bt=((pu=C.drawing.Animation)&&(lu.__proto__=pu),((lu.prototype=Object.create(pu&&pu.prototype)).constructor=lu).prototype.step=function(t){var e=this.options,i=this.startColor,o=this.color,r=ft(e.oldAngle,e.newAngle,t);this.element.angle(r),o&&(e=It(ft(i.r,o.r,t)),r=It(ft(i.g,o.g,t)),t=It(ft(i.b,o.b,t)),this.element.stroke(new C.Color(e,r,t).toHex()))},lu);function lu(t,e){pu.call(this,t,e);var i=this.options,e=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3;i.duration=Rt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new C.Color(e),this.color=new C.Color(t))}zt(bt,{easing:"linear",duration:150}),C.drawing.AnimationFactory.current.register("radialRangePointer",bt);var cu,uu=bt,_e=((cu=Y)&&(du.__proto__=cu),((du.prototype=Object.create(cu&&cu.prototype)).constructor=du).prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new uu(this,L(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},du.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},du.prototype.stroke=function(t){this.elements.stroke(t)},du.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&L(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}))},du.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,t=o.color,o=o.value,n=R(o)?o:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],p=a.color,h=a.from;void 0===h&&(h=e);a=a.to;if(void 0===a&&(a=i),h<=n&&n<=a)return p}return t},du.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},du);function du(){cu.apply(this,arguments)}zt(_e,{animation:{type:"radialRangePointer",duration:150}});var fu,gu,yu,vu=_e,mu=((yu=su)&&(wu.__proto__=yu),((wu.prototype=Object.create(yu&&yu.prototype)).constructor=wu).prototype._initTheme=function(t){yu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},wu.prototype._createModel=function(){var t=this.options,e=this.scale=new hu(t.scale,this.contextService),t=new vu(e,L({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},wu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},wu.prototype._setValueOptions=function(t){this.options.value=t},wu.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},wu.prototype.centerLabelPosition=function(t,e){var i,o=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<o.width&&(i=n+t,n=Math.max(n,0),i>o.width&&(n-=i-o.width)),e<o.height&&(o=(i=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,i.origin.y),o<e&&(r-=e-o)),{left:n,top:r}},wu),xu=((gu=mu)&&(_u.__proto__=gu),((_u.prototype=Object.create(gu&&gu.prototype)).constructor=_u).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,gu.prototype._createModel.call(this)},_u),K=((fu=C.Class)&&(bu.__proto__=fu),((bu.prototype=Object.create(fu&&fu.prototype)).constructor=bu).prototype.initProperties=function(){},bu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},bu.prototype.encode=function(t,e,i){t=At(t)?String(t):t;return this.initValue(t,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},bu.prototype.initValue=function(){},bu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},bu.prototype.addData=function(){},bu.prototype.invalidCharacterError=function(t){throw new Error("Character '"+t+"' is not valid for symbology "+this.name)},bu);function bu(t){fu.call(this),this.setOptions(t),this.initProperties()}function _u(){gu.apply(this,arguments)}function wu(){yu.apply(this,arguments)}zt(K,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Au,Su=Object.assign,Yt=((Au=K)&&(ku.__proto__=Au),((ku.prototype=Object.create(Au&&Au.prototype)).constructor=ku).prototype.initProperties=function(){Au.prototype.initProperties.call(this),Su(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"})},ku.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},ku.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()},ku.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},ku.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength&&(e=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=e,this.addPattern(this.characterMap[e]))},ku.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},ku.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},ku.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},ku.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},ku.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},ku);function ku(){Au.apply(this,arguments)}zt(Yt,{addCheckSum:!0});var Pu,Cu,Tu=Object.assign,N=((Cu=K)&&(Ru.__proto__=Cu),((Ru.prototype=Object.create(Cu&&Cu.prototype)).constructor=Ru).prototype.initProperties=function(){Cu.prototype.initProperties.call(this),Tu(this,{minBaseUnitLength:.7})},Ru.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()},Ru.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Ru.prototype.addBase=function(){},Ru),ke=((Pu=N)&&(Mu.__proto__=Pu),((Mu.prototype=Object.create(Pu&&Pu.prototype)).constructor=Mu).prototype.initProperties=function(){Pu.prototype.initProperties.call(this),Tu(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"}}})},Mu.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Mu.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&&i<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){o=Math.ceil(this.getBaseWidth(i)*e);throw new Error("Insufficient width. The minimum width for value: "+this.value+" is: "+o)}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))},Mu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Mu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Mu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Mu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Mu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Mu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Mu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Mu);function Mu(){Pu.apply(this,arguments)}function Ru(){Cu.apply(this,arguments)}zt(ke,{addCheckSum:!1});var Ou,Bu,Iu,Vu,ju,Lu,zu,Eu,Fu,Uu,Du,Hu={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?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;if(this.specialAsciiCodes[t])for(var i=[],o=0;o<this.specialAsciiCodes[t].length;o++)i.push(this.characterMap[this.shiftCharacters[3]]),i.push(this.characterMap[this.specialAsciiCodes[t][o]]);else e=6*Math.floor(t/32)+(t-27)%32+64,i=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return i}],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"]},tt=((Lu=ke)&&(ed.__proto__=Lu),((ed.prototype=Object.create(Lu&&Lu.prototype)).constructor=ed).prototype.initProperties=function(){Lu.prototype.initProperties.call(this),L(this,Hu,{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}}})},ed),Gu=Object.assign,$=((ju=N)&&(td.__proto__=ju),((td.prototype=Object.create(ju&&ju.prototype)).constructor=td).prototype.initProperties=function(){ju.prototype.initProperties.call(this),Gu(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"}})},td.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},td.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")},td.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},td.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},td.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},td.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},td.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)},td.prototype._getCheckValues=function(){for(var t,e=this.values,i=e.length,o=0,r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r,this.cCheckSumTotal);for(t=o%this.checkSumMod,o=this.weightedValue(t,1,this.kCheckSumTotal),r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r+1,this.kCheckSumTotal);return[t,o%this.checkSumMod]},td.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},td.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},td.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},td),ot=((Vu=$)&&(Ju.__proto__=Vu),((Ju.prototype=Object.create(Vu&&Vu.prototype)).constructor=Ju).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),L(this,Hu,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,i=0;i<t.length;i++)e=t[i],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},Ju),Nu=/^\d+$/,Wu=Object.assign,q=((Iu=K)&&(Qu.__proto__=Iu),((Qu.prototype=Object.create(Iu&&Iu.prototype)).constructor=Qu).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),Wu(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},Qu.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()},Qu.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()},Qu.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},Qu.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},Qu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},Qu.prototype.validate=function(t){if(Nu.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!dt(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(","))},Qu.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)},Qu),Xu=/^\d+$/,Yu=/^[a-z0-9]+$/i,qu=Object.assign,ct=((Bu=C.Class)&&($u.__proto__=Bu),(($u.prototype=Object.create(Bu&&Bu.prototype)).constructor=$u).prototype.initProperties=function(){},$u.prototype.addStart=function(){},$u.prototype.is=function(){},$u.prototype.isCode=function(){return!1},$u.prototype.move=function(){},$u.prototype.pushState=function(){},$u),ve=((Ou=ct)&&(Ku.__proto__=Ou),((Ku.prototype=Object.create(Ou&&Ou.prototype)).constructor=Ku).prototype.initProperties=function(){Ou.prototype.initProperties.call(this),L(this,{FNC4:"FNC4",SHIFT:98})},Ku.prototype.addStart=function(){this.encoding.addPattern(this.START)},Ku.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},Ku.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Ku.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;for(!dt("C",i)||(i=o.substr(t.index).match(/\d{4,}/g))&&(r=o.indexOf(i[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Ku.prototype._initMoves=function(t){this._moves=[],dt(this.FNC4,t)&&this._moves.push(this._moveFNC),dt(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Ku.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Ku.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},Ku.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Ku),Zu={};function Ku(t,e){Ou.call(this,t),this.states=e,this._initMoves(e)}function $u(t){Bu.call(this),this.encoding=t,this.initProperties()}function Qu(){Iu.apply(this,arguments)}function Ju(){Vu.apply(this,arguments)}function td(){ju.apply(this,arguments)}function ed(){Lu.apply(this,arguments)}function id(t,e){zu.call(this,t),this.states=e}function od(t,e){Eu.call(this,t),this._initSubStates(e)}function rd(){Fu.apply(this,arguments)}function nd(){Uu.apply(this,arguments)}function sd(){Du.apply(this,arguments)}Zu.A=((Du=ve)&&(sd.__proto__=Du),((sd.prototype=Object.create(Du&&Du.prototype)).constructor=sd).prototype.initProperties=function(){Du.prototype.initProperties.call(this),qu(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},sd.prototype.isCode=function(t){return 0<=t&&t<96},sd.prototype.getValue=function(t){return t<32?t+64:t-32},sd),Zu.B=((Uu=ve)&&(nd.__proto__=Uu),((nd.prototype=Object.create(Uu&&Uu.prototype)).constructor=nd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),qu(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},nd.prototype.isCode=function(t){return 32<=t&&t<128},nd.prototype.getValue=function(t){return t-32},nd),Zu.C=((Fu=ct)&&(rd.__proto__=Fu),((rd.prototype=Object.create(Fu&&Fu.prototype)).constructor=rd).prototype.initProperties=function(){Fu.prototype.initProperties.call(this),qu(this,{key:"C",MOVE:99,START:105})},rd.prototype.addStart=function(){this.encoding.addPattern(this.START)},rd.prototype.is=function(t,e){var i=xd(t,e,4);return(e+4<=t.length||2===t.length)&&Xu.test(i)},rd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},rd.prototype.pushState=function(t){for(var e;(e=xd(t.value,t.index,2))&&Xu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},rd.prototype.getValue=function(t){return t},rd),Zu.FNC4=((Eu=ct)&&(od.__proto__=Eu),((od.prototype=Object.create(Eu&&Eu.prototype)).constructor=od).prototype.initProperties=function(){Eu.prototype.initProperties.call(this),qu(this,{key:"FNC4",dependentStates:["A","B"]})},od.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},od.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},od.prototype.isCode=function(t){return 128<=t&&t<256},od.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},od.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},od.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},od.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)dt(t[e],this.dependentStates)&&this.subStates.push(t[e])},od.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]},od.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},od),Zu.FNC1=((zu=ct)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.prototype.initProperties.call(this),qu(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})},id.prototype.addStart=function(){this.encoding[this.startState].addStart()},id.prototype.is=function(){return dt(this.key,this.states)},id.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};for(r.addPattern(this.START);;){if((e=(p.index=0)<(o=n.charAt(a)===this.startAI?2: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},id.prototype.validate=function(t,e){var i=e.substr(t.id.length),e=t.ai;if(!e.type&&!Xu.test(i))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===e.type&&!Yu.test(i))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(e.length&&e.length!==i.length)throw new Error("Application identifier "+t.id+" must be "+e.length+" characters long.");if(e.min&&e.min>i.length)throw new Error("Application identifier "+t.id+" must be at least "+e.min+" characters long.");if(e.max&&e.max<i.length)throw new Error("Application identifier "+t.id+" must be at most "+e.max+" characters long.")},id.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=xd(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},id.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},id.prototype.getBySeparator=function(t,e){var i=t.indexOf(this.startAI,e),e=t.indexOf(this.endAI,i),i=t.substring(i+1,e),e=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substr(i.length-1));return e||this.unsupportedAIError(i),{ai:e,id:i}},id.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&&dt(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}},id);var ad,pd,hd,ld,cd,ud,gt=((ud=K)&&(md.__proto__=ud),((md.prototype=Object.create(ud&&ud.prototype)).constructor=md).prototype.initProperties=function(){ud.prototype.initProperties.call(this),qu(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})},md.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Zu[this.states[t]](this,this.states)},md.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},md.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())},md.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var i;t.shifted?(i=t.state,t.state=t.previousState,t.previousState=i,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},md.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},md.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},md.prototype.addStop=function(){this.addPattern(this.STOP)},md.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},md.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++},md.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))},md),ce=((cd=gt)&&(vd.__proto__=cd),((vd.prototype=Object.create(cd&&cd.prototype)).constructor=vd).prototype.initProperties=function(){cd.prototype.initProperties.call(this),qu(this,{name:"Code 128 A",states:["A"]})},vd),Zt=((ld=gt)&&(yd.__proto__=ld),((yd.prototype=Object.create(ld&&ld.prototype)).constructor=yd).prototype.initProperties=function(){ld.prototype.initProperties.call(this),qu(this,{name:"Code 128 B",states:["B"]})},yd),G=((hd=gt)&&(gd.__proto__=hd),((gd.prototype=Object.create(hd&&hd.prototype)).constructor=gd).prototype.initProperties=function(){hd.prototype.initProperties.call(this),qu(this,{name:"Code 128 C",states:["C"]})},gd),bt=((pd=gt)&&(fd.__proto__=pd),((fd.prototype=Object.create(pd&&pd.prototype)).constructor=fd).prototype.initProperties=function(){pd.prototype.initProperties.call(this),qu(this,{name:"Code 128",states:["C","B","A","FNC4"]})},fd),Y=((ad=gt)&&(dd.__proto__=ad),((dd.prototype=Object.create(ad&&ad.prototype)).constructor=dd).prototype.initProperties=function(){ad.prototype.initProperties.call(this),qu(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},dd);function dd(){ad.apply(this,arguments)}function fd(){pd.apply(this,arguments)}function gd(){hd.apply(this,arguments)}function yd(){ld.apply(this,arguments)}function vd(){cd.apply(this,arguments)}function md(t){ud.call(this,t),this._initStates()}function xd(t,e,i){return t.substring(e,e+i)}var bd,_d,wd,Ad,Sd,kd,Pd,Cd=Object.assign,_e=((Pd=K)&&(Ed.__proto__=Pd),((Ed.prototype=Object.create(Pd&&Pd.prototype)).constructor=Ed).prototype.initProperties=function(){Pd.prototype.initProperties.call(this),Cd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Td})},Ed.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Ed.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Ed.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()},Ed.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Ed.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Ed.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]])},Ed),N=((kd=_e)&&(zd.__proto__=kd),((zd.prototype=Object.create(kd&&kd.prototype)).constructor=zd).prototype.initProperties=function(){kd.prototype.initProperties.call(this),Cd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},zd),ve=((Sd=_e)&&(Ld.__proto__=Sd),((Ld.prototype=Object.create(Sd&&Sd.prototype)).constructor=Ld).prototype.initProperties=function(){Sd.prototype.initProperties.call(this),Cd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Ld),ct=((Ad=_e)&&(jd.__proto__=Ad),((jd.prototype=Object.create(Ad&&Ad.prototype)).constructor=jd).prototype.initProperties=function(){Ad.prototype.initProperties.call(this),Cd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},jd),gt=((wd=_e)&&(Vd.__proto__=wd),((Vd.prototype=Object.create(wd&&wd.prototype)).constructor=Vd).prototype.initProperties=function(){wd.prototype.initProperties.call(this),Cd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Vd),Td={Modulo10:function(t){for(var e,i,o=[0,""],r=t.length%2,n=0;n<t.length;n++)o[(n+r)%2]+=parseInt(t.charAt(n),10);for(i=o[0],e=(2*o[1]).toString(),n=0;n<e.length;n++)i+=parseInt(e.charAt(n),10);return[(10-i%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=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Md=Object.assign,_e=((_d=K)&&(Id.__proto__=_d),((Id.prototype=Object.create(_d&&_d.prototype)).constructor=Id).prototype.initProperties=function(){_d.prototype.initProperties.call(this),Md(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]}})},Id.prototype.initValue=function(t,e,i){t=String(t);if(12!==t.length||/\D/.test(t))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=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},Id.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)},Id.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)},Id.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])},Id.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},Id),Rd=Object.assign,K=((bd=_e)&&(Bd.__proto__=bd),((Bd.prototype=Object.create(bd&&bd.prototype)).constructor=Bd).prototype.initProperties=function(){bd.prototype.initProperties.call(this),Rd(this,{name:"EAN 8"})},Bd.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)},Bd),Od={code11:Yt,code39:ke,code39extended:tt,code93:$,code93extended:ot,code128:bt,code128a:ce,code128b:Zt,code128c:G};function Bd(){bd.apply(this,arguments)}function Id(){_d.apply(this,arguments)}function Vd(){wd.apply(this,arguments)}function jd(){Ad.apply(this,arguments)}function Ld(){Sd.apply(this,arguments)}function zd(){kd.apply(this,arguments)}function Ed(){Pd.apply(this,arguments)}Od["gs1-128"]=Y,Od.msimod10=N,Od.msimod11=ve,Od.msimod1010=ct,Od.msimod1110=gt,Od.postnet=q,Od.ean8=K,Od.ean13=_e;var Fd,_e=((Fd=C.Class)&&(Ud.__proto__=Fd),((Ud.prototype=Object.create(Fd&&Fd.prototype)).constructor=Ud).prototype.destroy=function(){this._destroySurface()},Ud.prototype._initElement=function(){p(this.element,"k-barcode"),this.element.style.display="block"},Ud.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Ud.prototype._createSurface=function(){return C.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Ud.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Ud.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Ud.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Ud.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},Ud.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)},Ud.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Ud.prototype._resize=function(){this.redraw()},Ud.prototype.createVisual=function(){this.visual=this._render()},Ud.prototype._render=function(){var t=this.options,e=t.value,i=t.text,o=D(i.margin),r=this._getSize(),n=t.border||{},s=this.encoding,a=new oe(0,0,r.width,r.height).unpad(n.width).unpad(t.padding),p=a.height(),n=new C.drawing.Group;return this.contentBox=a,n.append(this._getBackground(r)),i.visible&&(p-=C.drawing.util.measureText(e,{font:i.font}).height+o.top+o.bottom),a=s.encode(e,a.width(),p),i.visible&&(e=e,t.checksum&&At(s.checksum)&&(e+=" "+s.checksum),n.append(this._getText(e))),this.barHeight=p,this._bandsGroup=this._getBands(a.pattern,a.baseUnit),n.append(this._bandsGroup),n},Ud.prototype.exportVisual=function(){return this._render()},Ud.prototype._getSize=function(){var t=this.element,e=t.clientWidth,i=t.clientHeight,t=new C.geometry.Size(300,100);return 0<e&&(t.width=e),i&&(t.height=i),this.options.width&&(t.width=this.options.width),this.options.height&&(t.height=this.options.height),t},Ud.prototype.value=function(t){if(!At(t))return this.options.value;this.options.value=String(t),this.redraw()},Ud.prototype._getBands=function(t,e){for(var i=this.contentBox,o=i.x1,r=new C.drawing.Group,n=0;n<t.length;n++){var s,a=(s=z(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=C.geometry.Rect.fromPoints(new C.geometry.Point(o,s.y1+i.y1),new C.geometry.Point(o+a,s.y2+i.y1)),s=C.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),o+=a}return r},Ud.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new oe(0,0,t.width,t.height).unpad(i.width/2);return C.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},Ud.prototype._getText=function(t){var e=this.options.text,e=this._textbox=new Ge(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return e.reflow(this.contentBox),e.renderVisual(),e.visual},Ud.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),!Od[this.type])throw new Error("Encoding "+this.type+" is not supported.");this.encoding=new Od[this.type],this.options=L({},this.options,t)},Ud);function Ud(t,e){Fd.call(this),this.options=L({},this.options,e),this.element=t,this._initElement(),this._initSurface(),this._setOptions(e),e&&At(e.value)&&this.redraw()}zt(_e,{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}});function Dd(){return{icon:{border:{width:1}},label:{font:Nd,padding:3},line:{length:10,width:2},visible:!0}}function Hd(t){return{axisDefaults:{labels:{font:Nd},notes:Dd(),title:{font:Wd,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:(t=void 0===t?{}: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:Dd(),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}},title:{font:Wd},legend:{labels:{font:Nd}}}}var Gd=_e,_e="Arial, Helvetica, sans-serif",Nd="12px "+_e,Wd="16px "+_e;i.d(e,"autoMajorUnit",function(){return $t}),i.d(e,"Point",function(){return Jt}),i.d(e,"Box",function(){return oe}),i.d(e,"Ring",function(){return he}),i.d(e,"Sector",function(){return le}),i.d(e,"ShapeBuilder",function(){return ye}),i.d(e,"ShapeElement",function(){return Ce}),i.d(e,"ChartElement",function(){return be}),i.d(e,"BoxElement",function(){return Se}),i.d(e,"RootElement",function(){return Be}),i.d(e,"FloatElement",function(){return je}),i.d(e,"Text",function(){return Ee}),i.d(e,"TextBox",function(){return Ge}),i.d(e,"Title",function(){return Ye}),i.d(e,"AxisLabel",function(){return Ke}),i.d(e,"Axis",function(){return oi}),i.d(e,"Note",function(){return Qe}),i.d(e,"CategoryAxis",function(){return Fi}),i.d(e,"DateCategoryAxis",function(){return Zi}),i.d(e,"DateValueAxis",function(){return ao}),i.d(e,"NumericAxis",function(){return ro}),i.d(e,"LogarithmicAxis",function(){return uo}),i.d(e,"PolarAxis",function(){return mo}),i.d(e,"RadarCategoryAxis",function(){return yo}),i.d(e,"RadarNumericAxis",function(){return Ao}),i.d(e,"RadarLogarithmicAxis",function(){return ko}),i.d(e,"CurveProcessor",function(){return Mo}),i.d(e,"Gradients",function(){return Te}),i.d(e,"rectToBox",function(){return Fe}),i.d(e,"Aggregates",function(){return Uo}),i.d(e,"AreaChart",function(){return Jr}),i.d(e,"AreaSegment",function(){return Nr}),i.d(e,"AxisGroupRangeTracker",function(){return tn}),i.d(e,"Bar",function(){return ln}),i.d(e,"BarChart",function(){return wn}),i.d(e,"BarLabel",function(){return sn}),i.d(e,"BoxPlotChart",function(){return Ln}),i.d(e,"BoxPlot",function(){return Vn}),i.d(e,"BubbleChart",function(){return $n}),i.d(e,"Bullet",function(){return os}),i.d(e,"BulletChart",function(){return ss}),i.d(e,"CandlestickChart",function(){return Mn}),i.d(e,"Candlestick",function(){return Sn}),i.d(e,"CategoricalChart",function(){return _r}),i.d(e,"CategoricalErrorBar",function(){return fr}),i.d(e,"CategoricalPlotArea",function(){return Ia}),i.d(e,"Chart",function(){return wl}),i.d(e,"ChartContainer",function(){return vs}),i.d(e,"ClipAnimation",function(){return zr}),i.d(e,"ClusterLayout",function(){return yn}),i.d(e,"Crosshair",function(){return fs}),i.d(e,"CrosshairTooltip",function(){return cs}),i.d(e,"DefaultAggregates",function(){return Xs}),i.d(e,"DonutChart",function(){return ih}),i.d(e,"DonutPlotArea",function(){return oh}),i.d(e,"DonutSegment",function(){return $p}),i.d(e,"ErrorBarBase",function(){return dr}),i.d(e,"ErrorRangeCalculator",function(){return Zo}),i.d(e,"Highlight",function(){return La}),i.d(e,"SharedTooltip",function(){return xp}),i.d(e,"Legend",function(){return np}),i.d(e,"LegendItem",function(){return Qa}),i.d(e,"LegendLayout",function(){return $a}),i.d(e,"LineChart",function(){return Gr}),i.d(e,"LinePoint",function(){return kr}),i.d(e,"LineSegment",function(){return Cr}),i.d(e,"Pane",function(){return bs}),i.d(e,"PieAnimation",function(){return Tp}),i.d(e,"PieChart",function(){return Xp}),i.d(e,"PieChartMixin",function(){return Dp}),i.d(e,"PiePlotArea",function(){return Yp}),i.d(e,"PieSegment",function(){return Up}),i.d(e,"PlotAreaBase",function(){return Es}),i.d(e,"PlotAreaEventsMixin",function(){return Fs}),i.d(e,"PlotAreaFactory",function(){return ap}),i.d(e,"PointEventsMixin",function(){return wr}),i.d(e,"RangeBar",function(){return Zs}),i.d(e,"RangeBarChart",function(){return Js}),i.d(e,"RangeAreaPoint",function(){return sa}),i.d(e,"RangeAreaChart",function(){return ma}),i.d(e,"ScatterChart",function(){return Wn}),i.d(e,"ScatterErrorBar",function(){return zn}),i.d(e,"ScatterLineChart",function(){return Op}),i.d(e,"Selection",function(){return fp}),i.d(e,"SeriesAggregator",function(){return Hs}),i.d(e,"SeriesBinder",function(){return Xo}),i.d(e,"SplineSegment",function(){return Vr}),i.d(e,"SplineAreaSegment",function(){return Qr}),i.d(e,"StackWrap",function(){return xn}),i.d(e,"Tooltip",function(){return gp}),i.d(e,"OHLCChart",function(){return ba}),i.d(e,"OHLCPoint",function(){return xa}),i.d(e,"WaterfallChart",function(){return Ca}),i.d(e,"WaterfallSegment",function(){return Pa}),i.d(e,"XYPlotArea",function(){return jp}),i.d(e,"MousewheelZoom",function(){return Ka}),i.d(e,"ZoomSelection",function(){return Za}),i.d(e,"Pannable",function(){return Ga}),i.d(e,"ChartAxis",function(){return Ro}),i.d(e,"ChartPane",function(){return jo}),i.d(e,"ChartPlotArea",function(){return Lo}),i.d(e,"findAxisByName",function(){return Io}),i.d(e,"anyHasZIndex",function(){return Er}),i.d(e,"appendIfNotNull",function(){return _s}),i.d(e,"areNumbers",function(){return kn}),i.d(e,"bindSegments",function(){return As}),i.d(e,"categoriesCount",function(){return vr}),i.d(e,"countNumbers",function(){return Eo}),i.d(e,"equalsIgnoreCase",function(){return Ss}),i.d(e,"evalOptions",function(){return yr}),i.d(e,"filterSeriesByType",function(){return ks}),i.d(e,"getDateField",function(){return Ps}),i.d(e,"getField",function(){return Do}),i.d(e,"hasGradientOverlay",function(){return an}),i.d(e,"hasValue",function(){return Dn}),i.d(e,"isDateAxis",function(){return Cs}),i.d(e,"segmentVisible",function(){return ws}),i.d(e,"singleItemOrArray",function(){return Ts}),i.d(e,"createOutOfRangePoints",function(){return Bs}),i.d(e,"ChartService",function(){return J}),i.d(e,"DomEventsBuilder",function(){return et}),i.d(e,"FormatService",function(){return Z}),i.d(e,"IntlService",function(){return W}),i.d(e,"TemplateService",function(){return rt}),i.d(e,"Sparkline",function(){return Bl}),i.d(e,"Navigator",function(){return Nl}),i.d(e,"NavigatorHint",function(){return El}),i.d(e,"StockChart",function(){return Yl}),i.d(e,"constants",function(){return o}),i.d(e,"Gauge",function(){return sc}),i.d(e,"LinearGauge",function(){return Ec}),i.d(e,"LinearPointer",function(){return xc}),i.d(e,"ArrowLinearPointer",function(){return Pc}),i.d(e,"BarLinearPointer",function(){return Vc}),i.d(e,"LinearScale",function(){return fc}),i.d(e,"RadialGauge",function(){return su}),i.d(e,"RadialPointer",function(){return iu}),i.d(e,"RadialScale",function(){return Yc}),i.d(e,"ArcGauge",function(){return mu}),i.d(e,"RangePointer",function(){return vu}),i.d(e,"ArcScale",function(){return hu}),i.d(e,"CircularGauge",function(){return xu}),i.d(e,"Barcode",function(){return Gd}),i.d(e,"addClass",function(){return p}),i.d(e,"removeClass",function(){return _}),i.d(e,"alignPathToPixel",function(){return T}),i.d(e,"clockwise",function(){return M}),i.d(e,"convertableToNumber",function(){return B}),i.d(e,"deepExtend",function(){return L}),i.d(e,"elementStyles",function(){return U}),i.d(e,"getSpacing",function(){return D}),i.d(e,"getTemplate",function(){return nt}),i.d(e,"getter",function(){return pt}),i.d(e,"grep",function(){return ht}),i.d(e,"hasClasses",function(){return lt}),i.d(e,"HashMap",function(){return ut}),i.d(e,"inArray",function(){return dt}),i.d(e,"interpolateValue",function(){return ft}),i.d(e,"InstanceObserver",function(){return yt}),i.d(e,"isArray",function(){return x}),i.d(e,"isFunction",function(){return I}),i.d(e,"isNumber",function(){return R}),i.d(e,"isObject",function(){return z}),i.d(e,"isString",function(){return O}),i.d(e,"map",function(){return vt}),i.d(e,"mousewheelDelta",function(){return mt}),i.d(e,"FontLoader",function(){return Lt}),i.d(e,"setDefaultOptions",function(){return zt}),i.d(e,"sparseArrayLimits",function(){return Et}),i.d(e,"styleValue",function(){return E}),i.d(e,"find",function(){return Ft}),i.d(e,"elementScale",function(){return Gt}),i.d(e,"autoTextColor",function(){return Nt}),i.d(e,"createHashSet",function(){return Kt}),i.d(e,"append",function(){return _t}),i.d(e,"bindEvents",function(){return wt}),i.d(e,"Class",function(){return C.Class}),i.d(e,"defined",function(){return At}),i.d(e,"deg",function(){return St}),i.d(e,"elementOffset",function(){return kt}),i.d(e,"elementSize",function(){return Pt}),i.d(e,"eventElement",function(){return Ct}),i.d(e,"eventCoordinates",function(){return Tt}),i.d(e,"last",function(){return Mt}),i.d(e,"limitValue",function(){return Rt}),i.d(e,"logToConsole",function(){return C.logToConsole}),i.d(e,"objectKey",function(){return Ot}),i.d(e,"rad",function(){return Bt}),i.d(e,"round",function(){return It}),i.d(e,"unbindEvents",function(){return Vt}),i.d(e,"valueOrDefault",function(){return jt}),i.d(e,"chartBaseTheme",function(){return Hd}),function(t){for(var e in t)Xd(e,t[e])}(e)}],r={},o.m=i,o.c=r,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=1)}}});
1
+ System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(pf){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o,r;o=[function(t,e){t.exports=n},function(t,e,o){"use strict";o.r(e);var i={};o.d(i,"NAVIGATOR_AXIS",function(){return Hl}),o.d(i,"NAVIGATOR_PANE",function(){return El});var d="arc",r="#000",_="bottom",A="center",u="circle",y="date",f=10,s=/\{\d+:?/,C="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,n="none",S="right",g="string",k="top",h="value",a="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function p(t,e){for(var o=x(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var w=/\s+/g;function b(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(w," "))}var P=o(0);function M(t){var e=.5;t.options.stroke&&P.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 T(t,e){return-t.x*e.y+t.y*e.x<0}function B(t){return"number"==typeof t&&!isNaN(t)}function R(t){return typeof t===g}function O(t){return B(t)||R(t)&&isFinite(t)}function I(t){return"function"==typeof t}var L="object",V="undefined";function j(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r=o[i],n=typeof r,s=void 0;(s=n===L&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[i]=new Date(r.getTime()):I(r.clone)?e[i]=r.clone():(s=e[i],e[i]=typeof s===L&&s||{},t(e[i],r)):n!==V&&(e[i]=r)}return e}(t,e[i]);return t}function D(t){return"object"==typeof t}function z(t){return B(t)?t+"px":t}var E=/width|height|top|left|bottom|right/i;function H(t,e){var o=R(e)?[e]:e;if(x(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=E.test(s)?parseFloat(r[s]):r[s]}return i}if(D(e))for(var a in e)t.style[a]=z(e[a])}function U(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[k]=o[S]=o[_]=o[C]=t:(o[k]=t[k]||e,o[S]=t[S]||e,o[_]=t[_]||e,o[C]=t[C]||e),o}var F={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},G=function(){},N={implementation:{configurable:!0}};G.register=function(t){F=t},N.implementation.get=function(){return F},Object.defineProperties(G,N);var W=G,X=/\{(\d+)(:[^\}]+)?\}/g,Y=function(t){this._intlService=t},q={intl:{configurable:!0}};q.intl.get=function(){return this._intlService||W.implementation},q.intl.set=function(t){this._intlService=t},Y.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return R(t)&&t.match(s)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Y.prototype.localeAuto=function(t,i,r){var n=this.intl;return R(t)&&t.match(s)?t.replace(X,function(t,e,o){e=i[parseInt(e,10)];return n.toString(e,o?o.substring(1):"",r)}):n.toString(i[0],t,r)},Object.defineProperties(Y.prototype,q);var Q=Y,Z=function(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Q(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},K={intl:{configurable:!0}};K.intl.get=function(){return this._intlService||W.implementation},K.intl.set=function(t){this._intlService=t,this.format.intl=t},Z.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Z.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Z.prototype,K);var $,J=Z,tt=function(){};tt.register=function(t){$=t},tt.create=function(t,e){if($)return $.create(t,e)};var et=tt,ot={compile:function(t){return t}},it=function(){};it.register=function(t){ot=t},it.compile=function(t){return ot.compile(t)};var rt=it;function nt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=rt.compile(t.template):I(t.content)&&(e=t.content),e}var st=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,at={};function pt(t){if(at[t])return at[t];var r=[];return t.replace(st,function(t,e,o,i){r.push(P.drawing.util.defined(e)?e:o||i)}),at[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},at[t]}function ht(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function lt(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(-1!==t.className.indexOf(o[i]))return!0}at[void 0]=function(t){return t};var ct=function(){this._map={}};ct.prototype.get=function(t){return this._map[this._key(t)]},ct.prototype.set=function(t,e){this._map[this._key(t)]=e},ct.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ut=ct;function dt(t,e){if(e)return-1!==e.indexOf(t)}function gt(t,e,o){return P.drawing.util.round(t+(e-t)*o,3)}var ft=function(t,e){this.observer=t,this.handlerMap=j({},this.handlerMap,e)};ft.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i.trigger&&(o=this.callObserver("trigger",t,e)),o},ft.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},ft.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 yt=ft;function vt(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);P.drawing.util.defined(n)&&i.push(n)}return i}function mt(t){var e=0;return t.wheelDelta?e=-t.wheelDelta/120:t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function xt(){}var wt=P.drawing.util,bt=wt.append,_t=wt.bindEvents,At=wt.defined,Ct=wt.deg,St=wt.elementOffset,kt=wt.elementSize,Pt=wt.eventElement,Mt=wt.eventCoordinates,Tt=wt.last,Bt=wt.limitValue,Rt=wt.objectKey,Ot=wt.rad,It=wt.round,Lt=wt.unbindEvents,Vt=wt.valueOrDefault;xt.fetchFonts=function(o,i,r){void 0===r&&(r={depth:0}),!o||5<r.depth||!document.fonts||Object.keys(o).forEach(function(t){var e=o[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?i.push(e):"object"==typeof e&&(r.depth++,xt.fetchFonts(e,i,r),r.depth--))})},xt.loadFonts=function(t,e){var o=[];if(0<t.length&&document.fonts){try{o=t.map(function(t){return document.fonts.load(t)})}catch(t){Object(P.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},xt.preloadFonts=function(t,e){var o=[];xt.fetchFonts(t,o),xt.loadFonts(o,e)};var jt=xt;function Dt(t,e){t=t.prototype;t.options?t.options=j({},t.options,e):t.options=e}function zt(t){for(var e=l,o=c,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===l?void 0:e,max:o===c?void 0:o}}function Et(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Ht=P.geometry.Matrix,Ut=/matrix\((.*)\)/;function Ft(t){var e=getComputedStyle(t).transform;return"none"===e?Ht.unit():function(){var t=e.match(Ut);if(null===t||2!==t.length)return Ht.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Ht,[null].concat(t)))}()}function Gt(t){if(!t)return Ht.unit();for(var e=Ft(t),o=t.parentElement;o;)var i=Ft(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Nt(t){return new P.Color(t).isDark()?a:r}function Wt(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}var Xt={},Yt={size:{configurable:!0}};Wt.prototype.values=function(){return this._values.filter(function(t){return t!==Xt})},Wt.prototype.has=function(t){return void 0!==this._index[t]},Wt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Wt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Xt,delete this._index[t])},Wt.prototype.clear=function(){this._index={},this._values=[]},Yt.size.get=function(){return this._values.length},Object.defineProperties(Wt.prototype,Yt);function qt(t){this._set=new Set(t)}var Qt={size:{configurable:!0}};qt.prototype.values=function(){return Array.from(this._set)},qt.prototype.has=function(t){return this._set.has(t)},qt.prototype.add=function(t){this._set.add(t)},qt.prototype.delete=function(t){this._set.delete(t)},qt.prototype.clear=function(){this._set.clear()},Qt.size.get=function(){return this._set.size},Object.defineProperties(qt.prototype,Qt);function Zt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?qt:Wt)(t);var e}function Kt(t,e){t=It(e-t,9);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=It(t/e,f);return It(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),f)}var $t,Jt=(($t=P.Class)&&(te.__proto__=$t),((te.prototype=Object.create($t&&$t.prototype)).constructor=te).prototype.clone=function(){return new te(this.x,this.y)},te.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},te.prototype.rotate=function(t,e){var o=Ot(e),i=Math.cos(o),r=Math.sin(o),n=t.x,e=t.y,o=this.x,t=this.y;return this.x=It(n+(o-n)*i+(t-e)*r,3),this.y=It(e+(t-e)*i-(o-n)*r,3),this},te.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},te.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},te.onCircle=function(t,e,o){e=Ot(e);return new te(t.x-o*Math.cos(e),t.y-o*Math.sin(e))},te);function te(t,e){$t.call(this),this.x=t||0,this.y=e||0}function ee(t,e,o,i,r){r=Ot(r);return new Jt(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}var oe,ie=((oe=P.Class)&&(re.__proto__=oe),((re.prototype=Object.create(oe&&oe.prototype)).constructor=re).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},re.prototype.width=function(){return this.x2-this.x1},re.prototype.height=function(){return this.y2-this.y1},re.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},re.prototype.move=function(t,e){var o=this.height(),i=this.width();return At(t)&&(this.x1=t,this.x2=this.x1+i),At(e)&&(this.y1=e,this.y2=this.y1+o),this},re.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},re.prototype.wrapPoint=function(t){var e=x(t),o=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new re(o,t,o,t)),this},re.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},re.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===_?m:v,a=s==m?r:n;return e===A?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===k||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},re.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},re.prototype.expand=function(t,e){return this.shrink(-t,-e),this},re.prototype.pad=function(t){t=U(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},re.prototype.unpad=function(t){t=U(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},re.prototype.clone=function(){return new re(this.x1,this.y1,this.x2,this.y2)},re.prototype.center=function(){return new Jt(this.x1+this.width()/2,this.y1+this.height()/2)},re.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},re.prototype.points=function(){return[new Jt(this.x1,this.y1),new Jt(this.x2,this.y1),new Jt(this.x2,this.y2),new Jt(this.x1,this.y2)]},re.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},re.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},re.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=ee(0,0,r,n,t),a=ee(e,0,r,n,t),i=ee(e,o,r,n,t),t=ee(0,o,r,n,t),e=Math.max(s.x,a.x,i.x,t.x)-Math.min(s.x,a.x,i.x,t.x),o=Math.max(s.y,a.y,i.y,t.y)-Math.min(s.y,a.y,i.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},re.prototype.toRect=function(){return new P.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},re.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},re.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===v?"width":"height",e=this[n]();dt(o,[C,k])?(this[i]=t[i],this[r]=this[i]+e):dt(o,[S,_])?(this[r]=t[r],this[i]=this[r]-e):o===A&&(this[i]=t[i]+(t[n]()-e)/2,this[r]=this[i]+e)},re);function re(t,e,o,i){oe.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function ne(t,e){return t-e}var se,ae,pe,he=((pe=P.Class)&&(ge.__proto__=pe),((ge.prototype=Object.create(pe&&pe.prototype)).constructor=ge).prototype.clone=function(){return new ge(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},ge.prototype.middle=function(){return this.startAngle+this.angle/2},ge.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},ge.prototype.point=function(t,e){var o=Ot(t),t=Math.cos(o),o=Math.sin(o),e=e?this.innerRadius:this.radius,t=It(this.center.x-t*e,3),e=It(this.center.y-o*e,3);return new Jt(t,e)},ge.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,t=Math.sin(Ot(r)),i=Math.cos(Ot(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-i/Math.abs(i)),Math.abs(i)<.9&&(n+=a*-t/Math.abs(t)),new ie(r,n,r+e,n+o)},ge.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,t=new Jt(s,a),r=this.point(r),r=new Jt(r.x-e.x,r.y-e.y),n=this.point(n),e=new Jt(n.x-e.x,n.y-e.y),a=It(s*s+a*a,3);return(r.equals(t)||T(r,t))&&!T(e,t)&&o*o<=a&&a<=i*i},ge.prototype.getBBox=function(){for(var t=new ie(l,l,c,c),e=It(this.startAngle%360),o=It((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(ne),n=r.indexOf(e),s=r.indexOf(o),a=e===o?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,i)}return i||t.wrapPoint(this.center),t},ge.prototype.expand=function(t){return this.radius+=t,this},ge),le=((ae=he)&&(de.__proto__=ae),((de.prototype=Object.create(ae&&ae.prototype)).constructor=de).prototype.expand=function(t){return ae.prototype.expand.call(this,t)},de.prototype.clone=function(){return new de(this.center,this.radius,this.startAngle,this.angle)},de.prototype.setRadius=function(t){return this.radius=t,this},de),ce=((se=P.Class)&&(ue.__proto__=se),((ue.prototype=Object.create(se&&se.prototype)).constructor=ue).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;0<t.angle&&o===i&&(i+=.001);var r=new P.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new P.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=P.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(i),e.lineTo(n.x,n.y),e.arc(i,o,t,t,!0)):e.lineTo(r.x,r.y),e},ue);function ue(){se.apply(this,arguments)}function de(t,e,o,i){ae.call(this,t,0,e,o,i)}function ge(t,e,o,i,r){pe.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}ce.current=new ce;var fe,ye=ce,ve=((fe=P.Class)&&(me.__proto__=fe),((me.prototype=Object.create(fe&&fe.prototype)).constructor=me).prototype.initUserOptions=function(t){return t},me.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},me.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},me.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},me.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},me.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},me.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},me.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},me.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},me.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},me.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},me.prototype.createVisual=function(){this.visual=new P.drawing.Group({zIndex:this.options.zIndex,visible:Vt(this.options.visible,!0)})},me.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=P.drawing.Animation.create(this.visual,this.options.animation))},me.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):At(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},me.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},me.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},me.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,o=this.visual.children,i=o.length,r=0;r<i;r++){var n=o[r];if(Vt(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},me.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},me.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},me.prototype.renderComplete=function(){},me.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},me.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(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);At(n.options.zIndex)||(n.options.zIndex=Vt(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},me.prototype.createGradientOverlay=function(t,e,o){e=new P.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},me.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},me.prototype.supportsPointInactiveOpacity=function(){return!0},me);function me(t){fe.call(this),this.children=[],this.options=j({},this.options,this.initUserOptions(t))}ve.prototype.options={};var xe,we=ve,be=((xe=we)&&(_e.__proto__=xe),((_e.prototype=Object.create(xe&&xe.prototype)).constructor=_e).prototype.reflow=function(t){function e(){i.align(t,v,r.align),i.align(t,m,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(c)}var o,i=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=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),xe.prototype.reflow.call(this,u),o=p?this.box=new ie(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(h),e()),this.translateChildren(o.x1-u.x1+h.left+c+l.left,o.y1-u.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var f=d[g];f.reflow(f.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(){xe.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(P.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:Vt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},_e);function _e(t){xe.call(this,t),this.options.margin=U(this.options.margin),this.options.padding=U(this.options.padding)}Dt(be,{align:C,vAlign:k,margin:{},padding:{},border:{color:r,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Ae,Ce=be,Se=((Ae=Ce)&&(ke.__proto__=Ae),((ke.prototype=Object.create(Ae&&Ae.prototype)).constructor=ke).prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,p=this.visualStyle();return o===u?a=new P.drawing.Circle(new P.geometry.Circle([It(e.x1+n,3),It(e.y1+s,3)],Math.min(n,s)),p):"triangle"===o?a=P.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close():"cross"===o?((a=new P.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(e=e.toRect(),"roundedRect"===o&&(o=Vt(t.borderRadius,e.width()/5),e.setCornerRadius(o)),a=P.drawing.Path.fromRect(e,p)),i&&a.transform(P.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},ke.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()},ke.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}},ke.prototype.createVisual=function(){this.visual=this.createElement()},ke);function ke(t,e){Ae.call(this,t),this.pointData=e}Dt(Se,{type:u,align:A,vAlign:A});var Pe=Se,Me={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};var Te,N=((Te=we)&&(Be.__proto__=Te),((Be.prototype=Object.create(Te&&Te.prototype)).constructor=Be).prototype.reflow=function(){var t=this.options,e=this.children,o=new ie(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=function(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),i=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 ie(i,s,r,a),l[1]=new ie(o,a,i,p),l[2]=new ie(r,a,n,p),l[3]=new ie(i,p,r,h),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new ie(o,s,i,a),l[5]=new ie(r,p,n,h)):(l[4]=new ie(r,s,n,a),l[5]=new ie(o,p,i,h)),ht(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new ie},Be.prototype.createVisual=function(){this.visual=new P.drawing.Group,this.createBackground()},Be.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),t=P.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(t)},Be.prototype.getRoot=function(){return this},Be.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Rt(t),r=Me[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new P.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,o=t.length,i=[],r=0;r<o;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,i.push(n)}return i}()),(e=new P.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Be.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Be.prototype.size=function(){var t=this.options;return new ie(0,0,t.width,t.height)},Be);function Be(t){Te.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}Dt(N,{width:600,height:400,background:a,border:{color:r,width:0},margin:U(5),zIndex:-2});var Re,Oe=N,G=((Re=we)&&(Ie.__proto__=Re),((Ie.prototype=Object.create(Re&&Re.prototype)).constructor=Ie).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Ie.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ie.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,o=this.groupAxis,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,n=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=n,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,g=t[e+1],f=d.length,y=0;y<f;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),w=new ie;w[o+1]=x,w[o+2]=x+m[r],w[e+1]=g,w[e+2]=g+m[i],v.reflow(w),g+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=n,t[o+2]=n+a,t[e+2]=t[e+1]+p}},Ie.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===_?o=e-t:i===A&&(o=(e-t)/2),o},Ie.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=It(t[o]()),a=e.length,p=[],h=0,l=0,c=0,u=0,d=[],g=0;g<a;g++){var f=e[g];f.box||f.reflow(t);var y=this.elementSize(f);this.options.wrap&&It(l+r+y[o])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,l=h=0,d=[]),h=Math.max(h,y[i]),0<l&&(l+=r),l+=y[o],d.push(f)}return p.push({groupElements:d,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},Ie.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ie.prototype.createVisual=function(){},Ie);function Ie(t){Re.call(this,t),this._initDirection()}Dt(G,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Le,Ve=G,je=P.drawing.Text,q=((Le=we)&&(De.__proto__=Le),((De.prototype=Object.create(Le&&Le.prototype)).constructor=De).prototype.reflow=function(t){var e=this.options,e=e.size=P.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new ie(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},De.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new je(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},De);function De(t,e){Le.call(this,e),this.content=t,this.reflow(new ie)}Dt(q,{font:"12px sans-serif",color:r});var ze=q;function Ee(t){var e=t.origin,t=t.bottomRight();return new ie(e.x,e.y,t.x,t.y)}var He,Ue,Fe=/\n/m,Ge=((Ue=Ce)&&(We.__proto__=Ue),((We.prototype=Object.create(Ue&&Ue.prototype)).constructor=We).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Fe),o=new Ve({vertical:!0,align:t.align,wrap:!1}),i=j({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new ze(e[r].trim(),i);o.append(n)}},We.prototype.reflow=function(t){var e,o=this.options,i=o.visual;this.container.options.align=o.align,i&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(i=this.visual=i(this.visualContext(e)))&&(e=Ee(i.clippedBBox()||new P.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Ue.prototype.reflow.call(this,t),o.rotation&&(e=U(o.margin),o=this.box.unpad(e),this.targetBox=t,this.normalBox=o.clone(),(o=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=o.clone(),o.pad(e)))},We.prototype.createVisual=function(){var t=this.options;this.visual=new P.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},We.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!At(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Ue.prototype.renderVisual.call(this))},We.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},We.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},We.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},We.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,e=this.rotatedBox.center();return P.geometry.transform().translate(e.x-o,e.y-i).rotate(t,[o,i])},We),Y=((He=we)&&(Ne.__proto__=He),((Ne.prototype=Object.create(He&&He.prototype)).constructor=Ne).prototype.reflow=function(t){He.prototype.reflow.call(this,t),this.box.snapTo(t,v)},Ne.buildTitle=function(t,e,o){var i,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},o,t))&&t.visible&&t.text&&(i=new Ne(t),e.append(i)),i},Ne);function Ne(t){He.call(this,t),this.append(new Ge(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function We(t,e,o){Ue.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new ie)}Dt(Y,{color:r,position:k,align:A,margin:U(5),padding:U(5)});var Xe,Ye=Y,K=((Xe=Ge)&&(qe.__proto__=Xe),((qe.prototype=Object.create(Xe&&Xe.prototype)).constructor=qe).prototype.visualContext=function(t){t=Xe.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},qe.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Pt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},qe.prototype.rotate=function(){var t,e;return this.options.alignRotation!==A?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ee(t.bbox(e.matrix()))):Xe.prototype.rotate.call(this),this.box},qe.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===A)return Xe.prototype.rotationTransform.call(this);var o=P.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||k,s=n===k||n===_?v:m,a=n===k||n===_?m:v,p=n===k||n===C?r.origin:r.bottomRight(),h=i.topLeft().transformCopy(o),l=i.topRight().transformCopy(o),t=i.bottomRight().transformCopy(o),n=i.bottomLeft().transformCopy(o),i=P.geometry.Rect.fromPoints(h,l,t,n),o={};o[a]=r.origin[a]-i.origin[a];var i=Math.abs(h[a]+o[a]-p[a]),a=Math.abs(l[a]+o[a]-p[a]),n=It(i,f)===It(a,f)?(c=h,l):a<i?(c=l,t):(c=h,n),c=c[s]+(n[s]-c[s])/2;return o[s]=r.center()[s]-c,P.geometry.transform().translate(o.x,o.y).rotate(e)},qe);function qe(t,e,o,i,r){Xe.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new ie)}Dt(K,{_autoReflow:!1});var Qe,Ze=K,Z=((Qe=Ce)&&(Ke.__proto__=Qe),((Ke.prototype=Object.create(Qe&&Qe.prototype)).constructor=Ke).prototype.hide=function(){this.options.visible=!1},Ke.prototype.show=function(){this.options.visible=!0},Ke.prototype.render=function(){var t,e,o,i,r,n,s,a,p=this,h=this.options;h.visible&&(o=h.label,a=h.icon,i=new ie,r=function(){return p},n=a.size,s=this.fields.text,At(o)&&o.visible&&((h=nt(o))?s=h(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color="inside"===o.position?"#fff":a.background),this.label=new Ge(s,j({},o)),this.label.aliasFor=r,"inside"!==o.position||At(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new Pe(j({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new ie),this.wrapperBox=i.wrap(a.box))},Ke.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(dt(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):l===_?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},Ke.prototype.createVisual=function(){Qe.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Ke.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;t.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):Qe.prototype.renderVisual.call(this)},Ke.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(M(t=P.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Ke.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},Ke.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},Ke.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Ke.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Pt(t),text:At(e.label)?e.label.text:"",visual:this.visual})},Ke);function Ke(t,e,o){Qe.call(this,e),this.fields=t,this.chartService=o,this.render()}Dt(Z,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:A,vAlign:A},line:{visible:!0},visible:!0,position:k,zIndex:2});var $e=Z;function Je(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new P.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),M(n),n}function to(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(o,r).lineTo(i,r):e.moveTo(r,o).lineTo(r,i),M(e),e}var eo,tt=((eo=we)&&(oo.__proto__=eo),((oo.prototype=Object.create(eo&&eo.prototype)).constructor=oo).prototype.initFields=function(){},oo.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},oo.prototype.normalizeLabelRotation=function(t){var e=t.rotation;D(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},oo.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:A,o=j({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},s=this.createAxisLabel(n,o,s);s&&(this.append(s),this.labels.push(s))}}},oo.prototype.clearLabels=function(){this.children=ht(this.children,function(t){return!(t instanceof Ze)}),this.labels=[]},oo.prototype.clearTitle=function(){var e=this;this.title&&(this.children=ht(this.children,function(t){return t!==e.title}),this.title=void 0)},oo.prototype.clear=function(){this.clearLabels(),this.clearTitle()},oo.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,i=i?e.y2:e.y1,t=t.line.width||0;return o?new ie(r,e.y1,r,e.y2-t):new ie(e.x1,i,e.x2-t,i)},oo.prototype.createTitle=function(){var t=this.options,t=j({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Ge(t.text,t),this.append(t),this.title=t)},oo.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=j({},e,o[i]);r.value=this.parseNoteValue(r.value);r=new $e({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(At(r.options.position)?t.vertical&&!dt(r.options.position,[C,S])?r.options.position=t.reverse?C:S:t.vertical||dt(r.options.position,[k,_])||(r.options.position=t.reverse?_:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?_:k,this.append(r),this.notes.push(r))}},oo.prototype.parseNoteValue=function(t){return t},oo.prototype.renderVisual=function(){eo.prototype.renderVisual.call(this),this.createPlotBands()},oo.prototype.createVisual=function(){eo.prototype.createVisual.call(this),this.createBackground(),this.createLine()},oo.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new P.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},oo.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)At(o)&&n%o==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(Je(h,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},oo.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&M(e),(t=this._lineGroup=new P.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},oo.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},oo.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=P.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},oo.prototype.createPlotBands=function(){var e=this,t=this.options,o=t.plotBands||[],i=t.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),s=ht(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var p=o[a],h=void 0,l=void 0,c=p.label,u=void 0,l=i?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new ie(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(l=new P.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),p=P.drawing.Path.fromRect(l,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(p),u&&n.append(u))}this.appendVisual(n)}},oo.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return At(t)&&t.visible&&((i=nt(t))?r=i({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(t=new Ge(r,t)).reflow(o),t.renderVisual(),t.visual},oo.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=It(t[n]);dt(s,l)||n%o==0||a&&p===s||(h.position=s,c.append(to(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},oo.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new ie(t.x1,t.y1,t.x1+h+a,t.y2):new ie(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},oo.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},oo.prototype.labelTickIndex=function(t){return t.index},oo.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),l=n[p],c=n[p+1],u=void 0,p=void 0,p=i?u=o?l+(c-l)/2-h/2:l-h/2:o?(u=l,c):(u=l-h/2)+h;this.positionLabel(a,r,u,p)}},oo.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,a=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=S),t.box.move(n,o)):(a=s.y1,e?(a-=r+t.box.height(),t.options.rotationOrigin=_):(a+=r,t.options.rotationOrigin=k),new ie(o,a,i,a+t.box.height()));t.reflow(a)},oo.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},oo.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),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,n=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==n?n:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new ie);return!0}},oo.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?S:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?k:_),e.reflow(this.box))},oo.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;At(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},oo.prototype.noteSlot=function(t){return this.getSlot(t)},oo.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,t=o?m:v;this.box.snapTo(e,t),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},oo.prototype.axisLabelText=function(t,e,o){function i(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=nt(e),o=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return o},oo.prototype.slot=function(t,e,o){o=this.getSlot(t,e,o);if(o)return o.toRect()},oo.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),o[t+1]-=e.start,o[t+2]+=e.end):(i[0].options.visible&&o.wrap(i[0].box),(i=i[i.length-1]).options.visible&&o.wrap(i.box))),o},oo.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,g=void 0;o?(d=i[u+s],g=i[u+a]):d=g=i[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-g)}return{start:p,end:h}},oo.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!At(n.min)||n.min<=o)||i<e&&0<r&&(!At(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<o&&r<0?(a=Bt(t,o,i),n=Bt(t+s,o+s,i)):i<e&&0<r&&(n=Bt(e,o,i),a=Bt(e-s,o,i-s)),{min:a,max:n}},oo.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},oo.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},oo.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),i=t?m:v,r=this.lineDir(),t=i+(1===r?1:2).toString();return{axis:i,axisOrigin:t,axisDir:r,lineBox:e,lineSize:o,lineStart:e[t]}},oo.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<i?t[o]-n[r]:n[r]-t[o])/e},oo.prototype.labelsBetweenTicks=function(){return!this.options.justified},oo.prototype.prepareUserOptions=function(){},oo);function oo(t,e){void 0===e&&(e=new J),eo.call(this,t),this.chartService=e,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:this.options.minorTickType!==n},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:this.options.majorTickType!==n},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}Dt(tt,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:r,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:n,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:r,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var io=tt,ro="milliseconds",no="seconds",so="minutes",ao="hours",po="days",ho="weeks",lo="months",co="years",uo=1e3,go=60*uo,fo=60*go,yo=24*fo,vo=7*yo,mo=31*yo,xo=365*yo,wo={years:xo,months:mo,weeks:vo,days:yo,hours:fo,minutes:go,seconds:uo,milliseconds:1};function bo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*go}function _o(t,e){return new Date(t.getTime()+e)}function Ao(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Co(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function So(t,e,o,r){var i,n,s,a=t;return t&&(s=(i=Ao(t)).getHours(),o===co?Co(a=new Date(i.getFullYear()+e,0,1),0):o===lo?Co(a=new Date(i.getFullYear(),i.getMonth()+e,1),s):o===ho?Co(a=So(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return _o(t,-o*yo)}(i,r),7*e,po),s):o===po?Co(a=new Date(i.getFullYear(),i.getMonth(),i.getDate()+e),s):o===ao?(n=i,t=e,(s=new Date(n)).setMinutes(0,0,0),a=_o(s,(n.getTimezoneOffset()-s.getTimezoneOffset())*go+t*fo)):o===so?0<(a=_o(i,e*go)).getSeconds()&&a.setSeconds(0):o===no?a=_o(i,e*uo):o===ro&&(a=_o(i,e)),o!==ro&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function ko(t,e,o){return So(Ao(t),0,e,o)}function Po(t,e,o){t=Ao(t);return t&&ko(t,e,o).getTime()===t.getTime()?t:So(t,1,e,o)}function Mo(t,e){return t&&e?t.getTime()-e.getTime():-1}function To(t,e){return t.getTime()-e}function Bo(t){if(x(t)){for(var e=[],o=0;o<t.length;o++)e.push(Bo(t[o]));return e}if(t)return Ao(t).getTime()}function Ro(t,e){return t&&e?Bo(t)===Bo(e):t===e}function Oo(t,e,o){return bo(t,e)/wo[o]}function Io(t,e,o,i){var r=Ao(t),t=Ao(e);return(o===lo?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+Oo(r,new Date(r.getFullYear(),r.getMonth()),po)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===co?r.getFullYear()-t.getFullYear()+Io(r,new Date(r.getFullYear(),0),lo,1)/12:o===po||o===ho?Oo(r,t,o):To(r,e)/wo[o])/i}function Lo(t,e,o){return o===co?e.getFullYear()-t.getFullYear():o===lo?12*Lo(t,e,co)+e.getMonth()-t.getMonth():o===po?Math.floor(To(e,t)/yo):Math.floor(To(e,t)/wo[o])}function Vo(t,e){return R(e)&&t.parseDate(e)||Ao(e)}function jo(t,e){if(x(e)){for(var o=[],i=0;i<e.length;i++)o.push(Vo(t,e[i]));return o}return Vo(t,e)}function Do(t,e){return B(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var zo,it=((zo=io)&&(Eo.__proto__=zo),((Eo.prototype=Object.create(zo&&zo.prototype)).constructor=Eo).prototype.initFields=function(){this._ticks={}},Eo.prototype.categoriesHash=function(){return""},Eo.prototype.clone=function(){var t=new Eo(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Eo.prototype.initUserOptions=function(t){var e=t.categories||[],o=At(t.min),i=At(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,e=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,e)),t},Eo.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:B(t.min)?t.min%1:0,max:B(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Eo.prototype.totalRangeIndices=function(t){var e=this.options,o=B(e.min)?e.min:0;return e=B(e.max)?e.max:B(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=Bt(o,0,t.max),e=Bt(e,0,t.max)),{min:o,max:e}},Eo.prototype.range=function(){var t=this.options;return{min:B(t.min)?t.min:0,max:(B(t.max)?t:this.totalRange()).max}},Eo.prototype.roundedRange=function(){return this.range()},Eo.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Eo.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(o-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:o}},Eo.prototype.arrangeLabels=function(){zo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Eo.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?m:v)+1],o=i[t+2],i=r[0],r=Tt(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),(r.box[t+1]>o||r.box[t+2]<e)&&(r.options.visible=!1))},Eo.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Eo.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Eo.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Eo.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,e=e.max,i=Math.ceil(e),r=Math.floor(o),n=[];r<=i;)n.push(r),r+=t;return n},Eo.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(o?m:v)+(i?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+It(n*(p[l]-s),3));return h},Eo.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),o=i.getHash()+o.min+","+o.max+t.reverse+t.justified;return e._hash!==o&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=o,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]),e},Eo.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?m:v,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&0<=s;)s--;return t.slice(n,s+1)},Eo.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),t=e?m:v,e=o?-1:1,o=t+(1==e?1:2).toString();return{axis:t,axisOrigin:o,axisDir:e,lineBox:i,lineSize:r,lineStart:i[o]}},Eo.prototype.lineDir=function(){return this.options.reverse?-1:1},Eo.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,n=i.justified,s=this.scaleOptions(),a=s.scale,p=s.box,h=s.min,l=this.lineInfo(),c=l.axis,u=l.lineStart,i=p.clone(),s=!At(e),l=Vt(t,0),t=Vt(e,l),t=Math.max(t-1,l),e=u+(l-h)*a,a=u+((t=Math.max(l,t))+1-h)*a;return s&&n&&(a=e),o&&(e=Bt(e,p[c+1],p[c+2]),a=Bt(a,p[c+1],p[c+2])),i[c+1]=r?a:e,i[c+2]=r?e:a,i},Eo.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,o=this.lineBox(),i=t.clone();return i[e+1]=Bt(t[e+1],o[e+1],o[e+2]),i[e+2]=Bt(t[e+2],o[e+1],o[e+2]),i},Eo.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):B(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):B(e)&&(e-=i),zo.prototype.slot.call(this,t,e,o)},Eo.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,e=n.max,n=a[r+1],a=a[r+2],r=t[r];if(r<n||a<r)return null;n=(o?e:p)+(r-n)/s,s=n%1;return i?n=Math.round(n):0==s&&0<n&&n--,Math.floor(n)},Eo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Eo.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Eo.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},Eo.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Eo.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,o=It(t/(o/e),f);return{min:o,max:e+o}},Eo.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.totalRangeIndices(),e=(i.max-i.min)*Math.min(1,t),t=i.min+o*e,e=i.max-(1-o)*e;return{min:t,max:e=e-t<.1?t+.1:e}},Eo.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,e=this.scaleRange(t,e);return{min:Bt(e.min,i,o),max:Bt(e.max,i,o)}},Eo.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Eo.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,n=i.max,i=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-i,max:(t.categories.length?n+(e?1:0):0)-i}},Eo.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=Vt(i.categories[t],"");o.dataItem=r;o=this.axisLabelText(i,e,o);return new Ze(i,o,t,r,e)},Eo.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Eo.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},Eo.prototype.arrangeNotes=function(){zo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Eo.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?m:v,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},Eo.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,i=It(t/o,f),t=this.totalRange(),o=e.min+i,e=e.max+i;return this.limitRange(o,e,0,t.max,i)},Eo.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),o=s.scale,i=s.box[r+(i?2:1)],t=t[r]-i,i=e[r]-i,t=n.min+t/o,i=n.min+i/o,o=Math.min(t,i),i=Math.max(t,i);if(.01<=i-o)return{min:o,max:i}},Eo.prototype.valueRange=function(){return this.range()},Eo.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,i=0;i<o;i++)if(Ro(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories)},Eo.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=B(t.min)?Math.floor(t.min):e,max:B(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Eo.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ut,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},Eo.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},Eo);function Eo(){zo.apply(this,arguments)}Dt(it,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:r},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Ho=it,ct={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"},Uo=[ro,no,so,ao,po,ho,lo,co],Fo="fit";function Go(t){var e=t._range;return e||((e=t._range=zt(t)).min=Ao(e.min),e.max=Ao(e.max)),e}function No(t){this.options=t}No.prototype.displayIndices=function(){return{min:0,max:1}},No.prototype.displayRange=function(){return{}},No.prototype.total=function(){return{}},No.prototype.valueRange=function(){return{}},No.prototype.valueIndex=function(){return-1},No.prototype.values=function(){return[]},No.prototype.totalIndex=function(){return-1},No.prototype.valuesCount=function(){return 0},No.prototype.totalCount=function(){return 0},No.prototype.dateAt=function(){return null};function Wo(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=So(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Ro(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=i?this.valueStart:a,(t=o.max)?(a=!r&&Ro(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,a),this.displayEnd=i?this.roundToTotalStep(t,!r):o.max):(this.valueEnd=n,this.displayEnd=i||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 Xo(t,e,o){for(var i,r,n,s=Go(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===Fo,c=e?Uo.indexOf(e):0,u=l?Uo[c++]:t.baseUnit,d=a/wo[u],g=d;!r||h<=d;){for(i=i||p[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=g/(r=n);else{if(u===Tt(Uo)){r=Math.ceil(g/h);break}if(!l){h<d&&(r=Math.ceil(g/h));break}u=Uo[c++]||Tt(Uo),g=a/wo[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function Yo(t){var e=(t.baseUnit||"").toLowerCase();return e===Fo||dt(e,Uo)||function(t){for(var e,o,i=t.categories,r=At(i)?i.length:0,n=l,s=0;s<r;s++){var a,p=i[s];p&&e&&(0<(a=bo(p,e))&&(o=(n=Math.min(n,a))>=xo?co:mo-3*yo<=n?lo:vo<=n?ho:yo<=n?po:fo<=n?ao:go<=n?so:no)),e=p}t.baseUnit=o||po}(t),e!==Fo&&"auto"!==t.baseUnitStep||Xo(t),t}Wo.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Wo.prototype.displayIndices=function(){var t,e,o;return this._indices||(t=(e=this.options).baseUnit,o=e.baseUnitStep,e=Io(this.displayStart,this.valueStart,t,o),o=Io(this.displayEnd,this.valueStart,t,o),this._indices={min:e,max:o}),this._indices},Wo.prototype.total=function(){return{min:this.start,max:this.end}},Wo.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Wo.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Wo.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Io(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Wo.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Io(t,this.start,e.baseUnit,e.baseUnitStep))},Wo.prototype.dateIndex=function(t){var e=this.options;return Io(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Wo.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Wo.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=So(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Wo.prototype.dateAt=function(t,e){var o=this.options;return So(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Wo.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,i=this.start,t=Io(t,i,r,n),t=e?Math.ceil(t):Math.floor(t);return o&&(t+=o),So(i,t*n,r,s)};var qo,ft=((qo=Ho)&&(Qo.__proto__=qo),((Qo.prototype=Object.create(qo&&qo.prototype)).constructor=Qo).prototype.clone=function(){var t=new Qo(Object.assign({},this.options),this.chartService);return t.createLabels(),t},Qo.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},Qo.prototype.initUserOptions=function(t){return t},Qo.prototype.initFields=function(){qo.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=jo(e,i))._parsed=!0),o=j({roundToBaseUnit:!0},o,{categories:i,min:Vo(e,o.min),max:Vo(e,o.max),weekStartDay:Do(o,e)}),t.panning&&t.isPannable(o.vertical?m:v)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=Go(i),t=o.maxDivisions,this.dataRange=new Wo(e.min,e.max,Yo(o)),t?(i=this.dataRange.displayRange(),Xo(i=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:i.min,max:i.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Wo(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||po,this.dataRange=this.divisionRange=new No(o)),this.rangeLabels=[]},Qo.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return qo.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&(a=r.length-1,r.splice(p,0,r[a-1]+(r[a]-r[a-1])*t));return r},Qo.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Mo(t,e.min)&&Mo(t,e.max)<=0&&o.length},Qo.prototype.parseNoteValue=function(t){return Vo(this.chartService.intl,t)},Qo.prototype.noteSlot=function(t){return this.getSlot(t)},Qo.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=It(t/r,f);return n.min&&n.max&&(r=_o(e.min||n.min,t),t=_o(e.max||n.max,t),n={min:So(r,0,o,i),max:So(t,0,o,i)}),n},Qo.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},Qo.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,o=r.max,r=this.dataRange.total(),i=It(t/(i/(o-n)),f)*(e.reverse?-1:1),n=_o(n,i),o=_o(o,i),i=this.limitRange(Bo(n),Bo(o),Bo(r.min),Bo(r.max),i);return i?(i.min=Ao(i.min),i.max=Ao(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},Qo.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var o=qo.prototype.pointsRange.call(this,t,e),i=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=To(i.max,i.min)/(t.max-t.min),t=this.options;return{min:_o(i.min,o.min*e),max:_o(i.min,o.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},Qo.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Fo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),n=(a-s)*t,e=Math.round(p*n),t=Math.round((1-p)*n),h=this.dataRange.options.baseUnit,p=new Date(s.getTime()+e),n=new Date(a.getTime()-t);if(i){var l,c,u=o.autoBaseUnitSteps,e=o.maxDateGroups,t=Tt(u[h])*e*wo[h],d=To(a,s),i=To(n,p),g=Uo.indexOf(h);if(i<wo[h]&&h!==ro)h=Uo[g-1],p=_o(s,c=(d-(e-1)*(l=Tt(u[h]))*wo[h])/2),n=_o(a,-c);else if(t<i&&h!==co){var f=0;do{for(h=Uo[++g],f=0,c=2*wo[h];l=u[h][f],++f<u[h].length&&c*l<d;);}while(h!==co&&c*l<d);0<(c=(c*l-d)/2)&&(p=_o(s,-c),n=_o(a,c),p=_o(p,Bt(n,r.min,r.max)-n),n=_o(n,Bt(p,r.min,r.max)-p))}}return p&&n&&0<To(n,p)?{min:p,max:n,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},Qo.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),e=this.scaleRange(t,e);return e&&(e.min<o.min&&(e.min=o.min),e.max>o.max&&(e.max=o.max)),e},Qo.prototype.range=function(){return this.dataRange.displayRange()},Qo.prototype.createLabels=function(){qo.prototype.createLabels.call(this),this.createRangeLabels()},Qo.prototype.clearLabels=function(){qo.prototype.clearLabels.call(this),this.rangeLabels=[]},Qo.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),qo.prototype.arrangeLabels.call(this)},Qo.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(i=this.lineBox(),t=r.vertical,e=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(r=t?i.y1-o.box.height()/2:i.x1,this.positionLabel(o,e,r)),(n=n[1])&&(i=t?i.y2-n.box.height()/2:i.x2,this.positionLabel(n,e,i)))},Qo.prototype.autoRotateLabels=function(){qo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},Qo.prototype.hideOutOfRangeLabels=function(){qo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},Qo.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 i=0;i<e.length&&s(o,e[i]);i++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return(!e.options.visible||e.box.overlaps(t.box))&&(e.options.visible=!1,1)}},Qo.prototype.contentBox=function(){for(var t=qo.prototype.contentBox.call(this),e=this.rangeLabels,o=0;o<e.length;o++){var i=e[o];i.options.visible&&t.wrap(i.box)}return t},Qo.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,r=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,n=this.divisionRange.dateAt(t),i=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||i,o.dataItem=r;o=this.axisLabelText(n,e,o);if(o)return new Ze(n,o,t,r,e)},Qo.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,o=t.displayEnd,t=this.options,r=Object.assign({},t.labels,t.rangeLabels,{align:A,zIndex:t.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=A,"auto"===r.rotation&&(r.rotation=0,t.autoRotateRangeLabels=!0),t=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||t,(t=function(t,e,o){o&&(t=new Ze(e,o,t,null,r),i.append(t),i.rangeLabels.push(t))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),t(1,o,this.axisLabelText(o,r,{index:1,count:2})))},Qo.prototype.autoRotateRangeLabels=function(){var t,e,i=this,o=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===o.length&&(t=function(t,e,o){o=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,o);0!==o&&(t.options.rotation=o,t.reflow(new ie))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},Qo.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},Qo.prototype.slot=function(t,e,o){var i=this.dataRange,t=t,e=e;t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e));o=this.getSlot(t,e,o);if(o)return o.toRect()},Qo.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),qo.prototype.getSlot.call(this,t,e,o)},Qo.prototype.valueRange=function(){var t=Go(this.options.srcCategories);return{min:Ao(t.min),max:Ao(t.max)}},Qo.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},Qo.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},Qo.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},Qo.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},Qo.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},Qo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},Qo.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},Qo.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},Qo.prototype.totalRange=function(){return this.dataRange.total()},Qo.prototype.totalCount=function(){return this.dataRange.totalCount()},Qo.prototype.isEmpty=function(){return!this.options.srcCategories.length},Qo.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Go(t.srcCategories);return new Wo(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},Qo);function Qo(){qo.apply(this,arguments)}Dt(ft,{type:y,labels:{dateFormats:ct},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 Zo=ft;function Ko(t,e){return It(Math.floor(t/e)*e,f)}function $o(t,e){return It(Math.ceil(t/e)*e,f)}function Jo(t){return Math.max(Math.min(t,3e5),-3e5)}var ti,ei=Math.pow(10,-9),wt=((ti=io)&&(oi.__proto__=ti),((oi.prototype=Object.create(ti&&ti.prototype)).constructor=oi).prototype.initUserOptions=function(t){var o,e,i,r,n,s,a,n=(a=t.seriesMin,o=t.seriesMax,i=(e=t).narrowRange,r=function(t){if(!t&&!o)return 0;if(0<=t&&0<=o){var e=t===o?0:t;if(!1===i||!i&&.2<(o-e)/o)return 0;e=Math.max(0,e-(o-e)/2)}else e=t;return e}(a),n=function(t,e,o){if(!t&&!e)return 1;if(t<=0&&e<=0){var i=t===e?0:e,r=Math.abs((i-t)/i);if(!1===o||!o&&.2<r)return 0;i=Math.min(0,i-(t-i)/2)}else i=e;return i}(a,o,i),s=Kt(r,n),!(a={majorUnit:s})!==e.roundToMajorUnit&&(r<0&&ii(r,s,1/3)&&(r-=s),0<n&&ii(n,s,1/3)&&(n+=s)),a.min=Ko(r,s),a.max=$o(n,s),a);return this.totalOptions=(s=n,{min:At((a=t).min)?Math.min(s.min,a.min):s.min,max:At(a.max)?Math.max(s.max,a.max):s.max,majorUnit:s.majorUnit}),function(t,e){var o,i,r,n=e;e&&(function(t,e){for(var o=0;o<e.length;o++){var i=e[o];null===t[i]&&(t[i]=void 0)}}(e,["min","max"]),o=At(e.min),i=At(e.max),(r=o||i)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=Ko(t.min,e.majorUnit),t.max=$o(t.max,e.majorUnit)):r&&(n=j(t,e),t.majorUnit=Kt(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=j(t,n);return n.min>=n.max&&(o&&!i?n.max=n.min+n.majorUnit:!o&&i&&(n.min=n.max-n.majorUnit)),n}(n,t)},oi.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},oi.prototype.clone=function(){return new oi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},oi.prototype.startValue=function(){return 0},oi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},oi.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(It(e/t,3))+1},oi.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&h.push(It(l,3)),l+=a*r;return h},oi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},oi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},oi.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,h=r.lineStart,r=s*(p/(i.max-i.min)),p=Vt(t,e||0),t=Vt(e,t||0);o&&(p=Bt(p,i.min,i.max),t=Bt(t,i.min,i.max));o=Math.min(p,t)-i.min,i=Math.max(p,t)-i.min,a=new ie(a.x1,a.y1,a.x1,a.y1);return a[n+1]=Jo(h+r*(0<s?o:i)),a[n+2]=Jo(h+r*(0<s?i:o)),a},oi.prototype.getValue=function(t){var e=this.options,o=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:It(e+t*(o-e),f)},oi.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,e=this.lineInfo().lineSize,e=It(t/(e/(r-n)),f);return{min:n+(e=!(!o&&!i||o&&i)?-e:e),max:r+e,offset:e}},oi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},oi.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=It(i.min+t*i.majorUnit,f),o=this.axisLabelText(i,e,o);return new Ze(i,o,t,null,e)},oi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},oi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},oi.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);if(this.isValidRange(e,t))return{min:e,max:t}},oi.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=(this.options.max-this.options.min)*Math.min(1,t),t=this.options.min+o*e,e=this.options.max-(1-o)*e;return{min:t,max:e=e-t<ei?t+ei:e}},oi.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,e=this.scaleRange(t,e);return{min:Bt(e.min,o,i),max:Bt(e.max,o,i)}},oi.prototype.isValidRange=function(t,e){return ei<e-t},oi);function oi(t,e,o,i){ti.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function ii(t,e,o){t=It(Math.abs(t%e),f);return 0===t||e*(1-o)<t}Dt(wt,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},labels:{format:"#.####################"},zIndex:1});var ri,ni=wt,Yt=((ri=io)&&(si.__proto__=ri),((si.prototype=Object.create(ri&&ri.prototype)).constructor=si).prototype.clone=function(){return new si(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},si.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},si.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Lo(e.min,e.max,e.baseUnit)/t+1)},si.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/To(e.max,e.min),p=e.weekStartDay||0,h=[n],l=1;l<s;l++){var c=n+To(So(e.min,l*t,e.baseUnit,p),e.min)*a*i;h.push(It(c,3))}return h},si.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},si.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},si.prototype.getSlot=function(t,e,o){return ni.prototype.getSlot.call(this,Vo(this.intlService,t),Vo(this.intlService,e),o)},si.prototype.getValue=function(t){t=ni.prototype.getValue.call(this,t);return null!==t?Ao(t):null},si.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},si.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;0<r&&(s=So(s,r,i.baseUnit,n));i=e.dateFormats[i.baseUnit];e.format=e.format||i;o=this.axisLabelText(s,e,o);return new Ze(s,o,t,null,e)},si.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),o=this.range(),o=n/To(o.max,o.min),o=It(t/o,f);return{min:_o(e.min,o=!(!i&&!r||i&&r)?-o:o),max:_o(e.max,o),offset:o}},si.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Mo(t,e.min)&&Mo(t,e.max)<=0},si.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Bo(t.min),Bo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Ao(t.min),max:Ao(t.max)}},si.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);return{min:Ao(e),max:Ao(t)}},si.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=(this.options.max-this.options.min)*Math.min(1,t),t=o*e,e=(1-o)*e,t=Ao(Bo(this.options.min)+t),e=Ao(Bo(this.options.max)-e);return{min:t,max:e=e-t<1e3?Ao(Bo(t)+1e3):e}},si.prototype.zoomRange=function(t,e){e=this.scaleRange(t,e);return{min:Ao(Bt(Bo(e.min),this.totalMin,this.totalMax)),max:Ao(Bt(Bo(e.max),this.totalMin,this.totalMax))}},si);function si(t,e,o,i){var r,n,s,a,p,h=Ao(t),l=Ao(e),c=i.intl,u=o||{};r=h,n=l,s=u=j(u||{},{min:Vo(c,u.min),max:Vo(c,u.max),axisCrossingValue:jo(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:Do(u,c)}),t=s.min||r,e=s.max||n,o=s.baseUnit||(e&&t?(a=bo(e,t),p=ao,xo<=a?p=co:mo<=a?p=lo:vo<=a?p=ho:yo<=a&&(p=po),p):ao),r=wo[o],n=s.weekStartDay||0,a=ko(Bo(t)-1,o,n)||Ao(e),p=Po(Bo(e)+1,o,n),t=s.majorUnit||$o(Kt(a.getTime(),p.getTime()),r)/r,e=Lo(a,p,o),r=$o(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||o,s.min=s.min||So(a,-e,o,n),s.max=s.max||So(p,r,o,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,ri.call(this,u=s,i),this.intlService=c,this.seriesMin=h,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=Bo(ko(Bo(h)-1,u.baseUnit,c)),this.totalMax=Bo(Po(Bo(l)+1,u.baseUnit,c))}Dt(Yt,{type:y,majorGridLines:{visible:!0,width:1,color:r},labels:{dateFormats:ct}});var ai,pi=Yt,Qt=((ai=io)&&(hi.__proto__=ai),((hi.prototype=Object.create(ai&&ai.prototype)).constructor=hi).prototype.clone=function(){return new hi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},hi.prototype.startValue=function(){return this.options.min},hi.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,p=i.max,h=this.lineInfo(),l=h.axis,c=h.axisDir,u=h.lineBox,i=h.lineSize,h=h.lineStart,i=c*(i/(n-r)),n=Vt(t,e||1),t=Vt(e,t||1);if(n<=0||t<=0)return null;o&&(n=Bt(n,a,p),t=Bt(t,a,p));n=ci(n,s),t=ci(t,s),s=Math.min(n,t)-r,r=Math.max(n,t)-r,u=new ie(u.x1,u.y1,u.x1,u.y1);return u[l+1]=Jo(h+i*(0<c?s:r)),u[l+2]=Jo(h+i*(0<c?r:s)),u},hi.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,e=n.lineStart,n=n.lineSize,e=a*(t[s]-e);return e<0||n<e?null:It(Math.pow(r,o+e*((i-o)/n)),f)},hi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},hi.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=It(t/(e/(i-o)),f);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,o+e),max:Math.pow(s,i+e),offset:e}},hi.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},hi.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},hi.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(Je(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),i.visible&&this.traverseMinorTicksPositions(p,i),[]},hi.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){dt(t,n)||(r.position=t,s.append(to(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},hi.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(It(i+r*(a-n),f),e)},hi.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,p=o.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var g=u.value+d*u.minorStep;if(r<g)break;i<=g&&t(It(a+p*(ci(g,s)-h),f),e)}},hi.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new Ze(i,o,t,null,e)},hi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},hi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},hi.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},hi.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=ci(this.options.min,o),r=ci(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=(r-i)*Math.min(1,t),i=Math.pow(o,i+e*t),t=Math.pow(o,r-(1-e)*t);return{min:i,max:t=t-i<1e-6?i+1e-6:t}},hi.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),t=this.totalMin,e=this.totalMax;return{min:Bt(o.min,t,e),max:Bt(o.max,t,e)}},hi.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,e=Math.pow(i,t);return{value:e,minorStep:(Math.pow(i,t+1)-e)/o}},hi.prototype.lineInfo=function(){var t=ai.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},hi);function hi(t,e,o,i){var r,n,s,a,p,h,l,c=j({majorUnit:10,min:t,max:e},o),u=c.majorUnit,d=(l=It(ci(p=e,h=u),f)%1,p<=0?h:0!=l&&(l<.3||.9<l)?Math.pow(h,ci(p,h)+.2):Math.pow(h,Math.ceil(ci(p,h)))),l=(r=t,s=(n=c).majorUnit,(a=r)<=0?a=e<=1?Math.pow(s,-2):1:n.narrowRange||(a=Math.pow(s,Math.floor(ci(r,s)))),a),a=(p=l,h=d,n=o,s=(r=c).min,a=r.max,At(r.axisCrossingValue)&&r.axisCrossingValue<=0&&li(),At(n.max)?n.max<=0&&li():a=h,At(n.min)?n.min<=0&&li():s=p,{min:s,max:a});c.max=a.max,c.min=a.min,c.minorUnit=o.minorUnit||It(u-1,f),ai.call(this,c,i),this.totalMin=At(o.min)?Math.min(l,o.min):l,this.totalMax=At(o.max)?Math.max(d,o.max):d,this.logMin=It(ci(a.min,u),f),this.logMax=It(ci(a.max,u),f),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function li(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function ci(t,e){return Math.log(t)/Math.log(e)}Dt(Qt,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},zIndex:1,_deferLabels:!0});var ui,di=Qt,ce={createGridLines:function(t){var e,o=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,i,o.majorGridLines)),o.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),bt(r,this.renderMinorGridLines(e,i,o.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){r=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,r)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},o=this.box.center(),n=new P.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new P.drawing.Path(r);i&&(n.radius=i(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,r=this.intervals(e,o,i,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return vt(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},ve=((ui=Ho)&&(gi.__proto__=ui),((gi.prototype=Object.create(ui&&ui.prototype)).constructor=gi).prototype.range=function(){return{min:0,max:this.options.categories.length}},gi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},gi.prototype.lineBox=function(){return this.box},gi.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new ie,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},gi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=o||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=It(r,3)%360,i&&dt(r,i)||h.push(r);return h},gi.prototype.majorIntervals=function(){return this.intervals(1)},gi.prototype.minorIntervals=function(){return this.intervals(.5)},gi.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},gi.prototype.majorAngles=function(){var e=this;return vt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},gi.prototype.createLine=function(){return[]},gi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},gi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,o=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,o)},gi.prototype.radiusCallback=function(e,t,o){if(t.options.type!==d){var t=Ot(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles();return function(t){return!o&&dt(t,r)?e:i}}},gi.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from);r.startAngle+=s*n.angle;var a=Math.ceil(i.to)-i.to;r.angle-=(a+s)*n.angle;i=ye.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(i)}this.appendVisual(e)},gi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},gi.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;o.reverse&&!i&&(t=(t+1)%s);n=n[t=Bt(Math.floor(t),0,s-1)];i&&(n-=a/2)<0&&(n+=360);t=a*(Bt(Math.ceil(e||t),t,s-1)-t+1);return new he(r.center(),0,r.height()/2,n,t)},gi.prototype.slot=function(t,e){var o=this.getSlot(t,e),t=o.startAngle+180,e=t+o.angle;return new P.geometry.Arc([o.center.x,o.center.y],{startAngle:t,endAngle:e,radiusX:o.radius,radiusY:o.radius})},gi.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++)if(this.getSlot(i).containsPoint(t)){o=i;break}return o},gi);function gi(){ui.apply(this,arguments)}Dt(ve,{startAngle:90,labels:{margin:U(10)},majorGridLines:{visible:!0},justified:!0}),j(ve.prototype,ce);var fi,yi=ve,be=((fi=io)&&(vi.__proto__=fi),((vi.prototype=Object.create(fi&&fi.prototype)).constructor=vi).prototype.getDivisions=function(t){return ni.prototype.getDivisions.call(this,t)-1},vi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},vi.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,o=o.step||1,r=new ie,n=this.intervals(t.majorUnit,i,o),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},vi.prototype.lineBox=function(){return this.box},vi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&dt(h,i)||s.push(h)}return s},vi.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},vi.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},vi.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},vi.prototype.createLine=function(){return[]},vi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},vi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,r=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,r)},vi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},vi.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=Bt(t,o.min,o.max),e=Bt(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new he(i.center(),0,i.height()/2,t,e-t)},vi.prototype.slot=function(t,e){var o=this.options,i=360-o.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),e=Math.max(t,e),n=o.reverse?(s=n,e):(s=360-e,360-n),s=(s+i)%360;return new P.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n=(n+i)%360,radiusX:r.radius,radiusY:r.radius})},vi.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,o=t.y-o.y,o=Math.round(Ct(Math.atan2(o,i))),i=e.startAngle;return e.reverse||(o*=-1,i*=-1),(o+i+360)%360},vi.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},vi);function vi(t,e){fi.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}Dt(be,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:U(10)},majorGridLines:{color:r,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),j(be.prototype,ce,{createPlotBands:yi.prototype.createPlotBands,majorAngles:yi.prototype.majorAngles,range:ni.prototype.range,labelsCount:ni.prototype.labelsCount,createAxisLabel:ni.prototype.createAxisLabel});var mi=be;function xi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var wi,Se={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var t=this.plotArea.polarAxis,i=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},h=this.getSlot(a.from,a.to,!0),a=new he(r,r.y-h.y2,r.y-h.y1,0,360),h=e===d?ye.current.createRing(a,p):P.drawing.Path.fromPoints(this.plotBandPoints(a,i),p).close();n.append(h)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new P.geometry.Circle(r,t.innerRadius),s=new P.geometry.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),r=t.box.center(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),bt(t,this.renderGridLines(r,o,i,e.minorGridLines))),t},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip;void 0===n&&(n=0);var s=i.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new P.geometry.Circle([t.x,t.y],h);if(i.type===d)a.append(new P.drawing.Circle(l,r));else{for(var c=new P.drawing.Path(r),u=0;u<o.length;u++)c.lineTo(l.pointAt(o[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var o,e=this.lineBox(),i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(i=t.x-n.x,n=t.y-n.y,o=(Ct(Math.atan2(n,i))+540)%360,r.sort(function(t,e){return xi(t,o)-xi(e,o)}),i=90-xi(r[0],r[1])/2,r=180-xi(o,r[0])-i,a=s*(Math.sin(Ot(r))/Math.sin(Ot(i)))),this.axisType().prototype.getValue.call(this,new Jt(e.x1,e.y2-a))}},N=((wi=ni)&&(bi.__proto__=wi),((bi.prototype=Object.create(wi&&wi.prototype)).constructor=bi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},bi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},bi.prototype.axisType=function(){return wi},bi);function bi(){wi.apply(this,arguments)}j(N.prototype,Se);var _i,Ai=N,G=((_i=di)&&(Ci.__proto__=_i),((Ci.prototype=Object.create(_i&&_i.prototype)).constructor=Ci).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ci.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ci.prototype.axisType=function(){return _i},Ci);function Ci(){_i.apply(this,arguments)}j(G.prototype,Se);var Si=G;function ki(t){return t<=0?-1:1}var Pi,Mi,Ti=((Mi=P.Class)&&(Oi.__proto__=Mi),((Oi.prototype=Object.create(Mi&&Mi.prototype)).constructor=Oi).prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return o;var n,s=e[0],a=e[1],p=e[2];for(o.push(new P.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return Tt(o).controlOut(this.firstControlPoint(t,s,a,v,m)),o.push(new P.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),o}i?(s=e[r-1],a=e[0],p=e[1],l=(n=this.controlPoints(s,a,p))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var h,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],p=e[d+2],h=this.controlPoints(s,a,p),Tt(o).controlOut(u),u=h[1],h=h[0],o.push(new P.geometry.Segment(a,h)));return i?(s=e[r-2],a=e[r-1],p=e[0],l=this.controlPoints(s,a,p),Tt(o).controlOut(u),o.push(new P.geometry.Segment(a,l[0])),Tt(o).controlOut(l[1]),o.push(new P.geometry.Segment(p,c))):(c=this.tangent(a,p,v,m),Tt(o).controlOut(u),o.push(new P.geometry.Segment(p,this.secondControlPoint(c,a,p,v,m)))),o},Oi.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)},Oi.prototype.invertAxis=function(t,e,o){var i,r=!1;return t.x===e.x?r=!0:e.x===o.x?(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0):(i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x),t.y<=e.y&&o.y<=i||e.y<=t.y&&o.y>=i||(r=!0)),r},Oi.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||It(i,1)===It(o.y,1)},Oi.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Oi.prototype.controlPoints=function(t,e,o){var i,r=v,n=m,s=!1,a=!1;this.isLine(t,e,o)?i=this.tangent(t,e,v,m):(p={x:this.isMonotonicByField(t,e,o,v),y:this.isMonotonicByField(t,e,o,m)}).x&&p.y?(i=this.tangent(t,o,v,m),s=!0):(this.invertAxis(t,e,o)&&(r=m,n=v),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?ki((o[n]-t[n])*(e[r]-t[r])):-ki((o[r]-t[r])*(e[n]-t[n]))),a=!0));var p=this.secondControlPoint(i,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,p,i),this.restrictControlPoint(e,o,n,i)),[p,n]},Oi.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},Oi.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],i=e[i]-t[i];return 0==o?0:i/o},Oi.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Oi.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],o=.333*(o[i]-n);return this.point(n+o,e[r]+o*t,i,r)},Oi.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],e=o[i],n=.333*(e-n);return this.point(e-n,o[r]-n*t,i,r)},Oi.prototype.point=function(t,e,o,i){var r=new P.geometry.Point;return r[o]=t,r[i]=e,r},Oi.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i},Oi),Bi=((Pi=P.Class)&&(Ri.__proto__=Pi),((Ri.prototype=Object.create(Pi&&Pi.prototype)).constructor=Ri).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Ri.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Ri.prototype.range=function(){return this._axis.range()},Ri.prototype.valueRange=function(){return this._axis.valueRange()},Ri);function Ri(t){Pi.call(this),this._axis=t,this.options=t.options}function Oi(t){Mi.call(this),this.closed=t}function Ii(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Bi(e[o])}q=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};q.prototype.findAxisByName=function(t){return Ii(t,this._pane.axes)};var Li,Vi=q,ji=((Li=P.Class)&&(Di.__proto__=Li),(Di.prototype=Object.create(Li&&Li.prototype)).constructor=Di);function Di(t){Li.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function zi(t){for(var e=t.length,o=0,i=0;i<e;i++)B(t[i])&&o++;return o}var Ei={min:function(t){for(var e=t.length,o=l,i=0;i<e;i++){var r=t[i];B(r)&&(o=Math.min(o,r))}return o===l?t[0]:o},max:function(t){for(var e=t.length,o=c,i=0;i<e;i++){var r=t[i];B(r)&&(o=Math.max(o,r))}return o===c?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];B(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=zi(t)?Ei.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&At(r)&&o++}return o},avg:function(t){var e=zi(t),o=t[0];return o=0<e?Ei.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&At(i))return i}return t[0]}},Hi=Ei;function Ui(t,e){return null===e?e:pt(t)(e)}var Fi,Y=((Fi=P.Class)&&(Gi.__proto__=Fi),((Gi.prototype=Object.create(Fi&&Fi.prototype)).constructor=Gi).prototype.register=function(t,e,o){void 0===e&&(e=[h]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Gi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Gi.prototype.valueFields=function(t){return this._valueFields[t.type]||[h]},Gi.prototype.otherFields=function(t){return this._otherFields[t.type]||[h]},Gi.prototype.bindPoint=function(t,e,o){var i,r,n,s=t.data,a=At(o)?o:s[e],p={valueFields:{value:a}},o=this.valueFields(t),s=this._otherFields[t.type];return null===a?i=this._nullValue[t.type]:At(a)?Array.isArray(a)?(n=a.slice(o.length),i=this._bindFromArray(a,o),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,o),n=this.sourceFields(t,s),i=this._bindFromObject(a,o,e),r=this._bindFromObject(a,s,n)):i=this._undefinedValue[t.type],At(i)&&(1===o.length?p.valueFields.value=i[o[0]]:p.valueFields=i),p.fields=r||{},p},Gi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Gi.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},Gi.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=Ui(a,t))}return i},Gi.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===h?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},Gi);function Gi(){Fi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Y.current=new Y;var Ni,Wi,Xi=Y,Yi=/percent(?:\w*)\((\d+)\)/,qi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Qi=((Wi=P.Class)&&(cr.__proto__=Wi),((cr.prototype=Object.create(Wi&&Wi.prototype)).constructor=cr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,p=qi.exec(t);p?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),p=p[1]?parseFloat(p[1]):1,n={low:i.value-r*p,high:i.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},cr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Xi.current,n=r.valueFields(t),i=At(i[0])?i[0]:{};return x(i)?o=pt("["+(e?n.indexOf(e):0)+"]"):B(i)?o=pt():"object"==typeof i&&(o=pt(r.sourceFields(t,n)[n.indexOf(e)])),o},cr.prototype.getErrorRange=function(t,e){if(!At(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))i=t-e[0],r=t+e[1];else if(B(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Yi.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var o=t*(parseFloat(o[1])/100),i=t-Math.abs(o),r=t+Math.abs(o)}return{low:i,high:r}},cr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},cr.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,o=o?e.count-1:e.count,r=0,n=0;n<i;n++){var s=this.valueGetter(t[n]);B(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},cr.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);B(n)&&(o+=n,i++)}return{value:o/i,count:i}},cr),Zi=(P.support.browser||{}).msie?.001:0,Ki="zero",$i="interpolate",Ji="bar",tr="column",er="line",or="pie",ir="verticalLine",rr=[Ji,tr,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],nr="drag",sr="dragEnd",ar="zoom",pr="zoomEnd",hr="DOMMouseScroll mousewheel",K=((Ni=we)&&(lr.__proto__=Ni),((lr.prototype=Object.create(Ni&&Ni.prototype)).constructor=lr).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,i),a=i?n.x:n.y,t=a-s,s=a+s;i?(e=[new Jt(n.x,r.y1),new Jt(n.x,r.y2)],o&&e.push(new Jt(t,r.y1),new Jt(s,r.y1),new Jt(t,r.y2),new Jt(s,r.y2)),this.box=new ie(t,r.y1,s,r.y2)):(e=[new Jt(r.x1,n.y),new Jt(r.x2,n.y)],o&&e.push(new Jt(r.x1,t),new Jt(r.x1,s),new Jt(r.x2,t),new Jt(r.x2,s)),this.box=new ie(r.x1,t,r.x2,s)),this.linePoints=e},lr.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},lr.prototype.createVisual=function(){var e=this,t=this.options,o=t.visual;o?this.visual=o({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},lr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Ni.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new P.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);M(r),this.visual.append(r)}},lr);function lr(t,e,o,i,r,n){Ni.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function cr(t,e,o){Wi.call(this),this.initGlobalRanges(t,e,o)}Dt(K,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var ur,dr=K,gr=((ur=dr)&&(fr.__proto__=ur),((fr.prototype=Object.create(ur&&ur.prototype)).constructor=fr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},fr);function fr(){ur.apply(this,arguments)}function yr(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,p=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!dt(r,o.excluded)&&t.hasOwnProperty(r)&&(I(n=t[r])?(p=!0,i||(t[r]=Vt(n(e),s[r]))):D(n)&&(i||(o.defaults=s[r]),o.depth++,p=yr(n,e,o,i)||p,o.depth--));return p}function vr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var mr,Z=((mr=we)&&(xr.__proto__=mr),((xr.prototype=Object.create(mr&&mr.prototype)).constructor=xr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},xr.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=j({},o,{vertical:!this.options.invertAxes},t)),i},xr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&B(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,p=o[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||B(p.value)&&(r+=Math.abs(p.value),i.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},xr.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===g&&h!==l)continue;if(h.group&&h.group!==l.group)continue}p=this.plotValue(p);(0<=p&&r||p<0&&!r)&&(n+=p,i+=p,s=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return s&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,O(t.value)?t.value:e]},xr.prototype.stackLimits=function(t,e){for(var o=l,i=c,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];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],At(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},xr.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,zt(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,zt(n.positive).max))),p.min!==l||p.max!==c?i[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},xr.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,e=e.fields.errorHigh;B(p)&&B(e)?i={low:p,high:e}:a&&At(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Qi(a.value,n,h),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},xr.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},e={categoryIx:e,series:n}),this.updateRange({value:a},e));r=new gr(s,a,i,this,n,r);t.errorBars=[r],t.append(r)},xr.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,o=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),0<o&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,o)),{low:i,high:o}},xr.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,At(r.dataItem)||(r.dataItem=i.data[o]),this.addErrorBar(r,t,o)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},xr.prototype.evalPointOptions=function(t,e,o,i,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];At(a)||(this._evalSeries[n]=a=yr(t,{},s,!0));n=t;return a&&yr(n=j({},t),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},xr.prototype.updateRange=function(t,e){var o=e.series.axis,e=t.value,t=this.valueAxisRanges[o];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[o]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},xr.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(!e)throw new Error("Unable to locate value axis with name "+t);return e},xr.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o=e.categoryIx,i=e.series,r=s.seriesValueAxis(i),n=p[l++],e=a[o];e||(a[o]=e=s.categorySlot(h,o,r)),n&&(i=s.plotRange(n,r.startValue()),(o=s.valueSlot(r,i))?(o=s.pointSlot(e,o),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=i[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,o)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},xr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},xr.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Tt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},xr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},xr.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},xr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},xr.prototype.reflowPoint=function(t,e){t.reflow(e)},xr.prototype.reflowCategories=function(){},xr.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,e=o?t:e;return new ie(i.x1,e.y1,i.x2,e.y2)},xr.prototype.categorySlot=function(t,e){return t.getSlot(e)},xr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=vr(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;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 h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},xr.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];r&&(e=r.categoryIx,i(this._bindPoint(t,o,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:o,dataItem:r.item}))},xr.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[o]||(r[o]=Xi.current.bindPoint(t,o,i))},xr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},xr.prototype.pointValue=function(t){return t.valueFields.value},xr);function xr(t,e){mr.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}Dt(Z,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var wr,br=Z,_r={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:Pt(t),originalEvent:t,point:this}}},tt={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&At(e)&&null!==e&&(this.note=new $e({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},it=((wr=we)&&(Ar.__proto__=wr),((Ar.prototype=Object.create(wr&&wr.prototype)).constructor=Ar).prototype.render=function(){var t,e=this.options,o=e.markers,i=e.labels;this._rendered||(this._rendered=!0,o.visible&&o.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible&&(t=nt(i),e=this.pointData(),o=this.value,t?o=t(e):i.format&&(o=this.formatValue(i.format)),this.label=new Ge(o,j({align:A,vAlign:A,margin:{left:5,right:5},zIndex:Vt(i.zIndex,this.series.zIndex)},i),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ar.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=j({color:this.color},t.border);return At(t.color)||(t.color=new P.Color(e).brightness(.8).toHex()),t},Ar.prototype.createVisual=function(){},Ar.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:Vt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ar.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ar.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical;this.render();var r=(this.box=t).clone();if(i?o?r.y1-=r.height():r.y2+=r.height():o?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);this.note&&(o=this.markerBox(),e.markers.visible&&e.markers.size||(e=o.center(),o=new ie(e.x,e.y,e.x,e.y)),this.note.reflow(o))},Ar.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?k:e)?_:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Ar.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),t=new Pe({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Vt(t.border.opacity,1)},opacity:Vt(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},Ar.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ar.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(o=(e=this.options.markers.size)/2,r=this.box.center(),i=new P.geometry.Rect([r.x-o,r.y-o],[e,e])),{options:this.options,rect:i,visual:t}},Ar.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i=t.x2+5,e=C,t=this.aboveAxis?(o=t.y1,_):(o=t.y2,k);return{point:new Jt(i,o),align:{horizontal:e,vertical:t}}}},Ar.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ar.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ar.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ar.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ar);function Ar(t,e){wr.call(this),this.value=t,this.options=e,this.aboveAxis=Vt(this.options.aboveAxis,!0),this.tooltipTracking=!0}it.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},j(it.prototype,_r),j(it.prototype,tt);var Cr,Sr=it,ft=((Cr=we)&&(kr.__proto__=Cr),((kr.prototype=Object.create(Cr&&Cr.prototype)).constructor=kr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},kr.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},kr.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&&!At(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},kr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;I(o)&&i&&(o=i.color);e=P.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},kr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},kr);function kr(t,e,o){Cr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}Dt(ft,{closed:!1});var Pr=ft;function Mr(t,e,o,i,r){var n=t.box,t=new P.geometry.Point;return t[e]=n[e+o],t[i]=n[i+r],t}var Tr,wt={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?v:m,n=i?m:v,s=e?2:1,a=s,p=Mr(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=Mr(t[l],r,s,n,a);p[r]!==u[r]&&((c=new P.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return o?p!==Tt(h)&&h.push(p):h.push(Mr(Tt(t),r,s,n,e?1:2)),h}},ct=((Tr=Pr)&&(Br.__proto__=Tr),((Br.prototype=Object.create(Tr&&Tr.prototype)).constructor=Br).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Br);function Br(){Tr.apply(this,arguments)}j(ct.prototype,wt);var Rr,Or,Ir=ct,Lr=((Or=Pr)&&(jr.__proto__=Or),((jr.prototype=Object.create(Or&&Or.prototype)).constructor=jr).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;I(o)&&e&&(o=e.color);e=new Ti(this.options.closed).process(this.points()),t=new P.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},jr),Yt={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==$i&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(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){t=t.missingValues;return!t&&this.options.isStacked?Ki:t||$i},getNearestPoint:function(t,e,o){for(var i,r=new Jt(t,e),n=this.seriesPoints[o],s=l,a=0;a<n.length;a++){var p,h=n[a];h&&At(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(i=h,s=p))}return i}},Qt=((Rr=P.drawing.Animation)&&(Vr.__proto__=Rr),((Vr.prototype=Object.create(Rr&&Rr.prototype)).constructor=Vr).prototype.setup=function(){this._setEnd(this.options.box.x1)},Vr.prototype.step=function(t){var e=this.options.box;this._setEnd(gt(e.x1,e.x2,t))},Vr.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),o=o[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)},Vr);function Vr(){Rr.apply(this,arguments)}function jr(){Or.apply(this,arguments)}Dt(Qt,{duration:600}),P.drawing.AnimationFactory.current.register("clip",Qt);var Dr=Qt;function zr(t){for(var e=0;e<t.length;e++)if(At(t[e].zIndex))return!0}var Er,ve={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=P.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new Dr(e,{box:t}),zr(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&At(i.visual.options.zIndex)&&i.visual.clip(t)}}},ce=((Er=br)&&(Hr.__proto__=Er),((Hr.prototype=Object.create(Er&&Er.prototype)).constructor=Hr).prototype.render=function(){Er.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Hr.prototype.pointType=function(){return Sr},Hr.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!At(e)||null===e){if(s!==Ki)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,i,o,r,n),t=t.fields.color||r.color;I(r.color)&&(t=s.color);s=new Sr(e,s);return s.color=t,this.append(s),s},Hr.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},Hr.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Ir:"smooth"===i?Lr:Pr)(t,e,o)},Hr.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)},Hr.prototype.supportsPointInactiveOpacity=function(){return!1},Hr);function Hr(){Er.apply(this,arguments)}j(ce.prototype,Yt,ve);var Ur,Fr,Gr=ce,Nr=((Fr=Pr)&&(Xr.__proto__=Fr),((Xr.prototype=Object.create(Fr&&Fr.prototype)).constructor=Xr).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;I(i)&&e&&(i=e.color),this.visual=new P.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:j({color:i,opacity:t.opacity,lineCap:"butt"},o)})},Xr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Xr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Xr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Xr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Xr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new P.geometry.Segment(t)})},Xr.prototype.createStroke=function(t){t=new P.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Xr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Xr.prototype.createFill=function(t){var e,o=this.strokeSegments(),i=o.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),bt(i,e));t=new P.drawing.Path(t);t.segments.push.apply(t.segments,i),!r&&1<o.length&&this.fillToAxes(t),this.visual.append(t)},Xr.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),e=i.getSlot(r,r,!0),i=this.strokeSegments(),r=i[0].anchor(),i=Tt(i).anchor(),e=o?e.x1:e.y1;o?t.lineTo(e,i.y).lineTo(e,r.y):t.lineTo(i.x,e).lineTo(r.x,e)},Xr),be=((Ur=Nr)&&(Wr.__proto__=Ur),((Wr.prototype=Object.create(Ur&&Ur.prototype)).constructor=Wr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Wr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Wr);function Wr(){Ur.apply(this,arguments)}function Xr(t,e,o,i,r){Fr.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}j(be.prototype,wt);var Yr,qr,Qr,Zr,Kr=be,$r=((Zr=Nr)&&(nn.__proto__=Zr),((nn.prototype=Object.create(Zr&&Zr.prototype)).constructor=nn).prototype.createStrokeSegments=function(){var t=new Ti(this.options.closed),e=this.points();return t.process(e)},nn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new P.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},nn),Jr=((Qr=Gr)&&(rn.__proto__=Qr),((rn.prototype=Object.create(Qr&&Qr.prototype)).constructor=rn).prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<o&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new("step"===a?Kr:"smooth"===a?$r:Nr)(t,e,o,r,n)},rn.prototype.reflow=function(t){Qr.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var o=0;o<e.length;o++){var i=e[o],r=this.categoryAxis.getSlot(i.categoryIx);i.reflow(r)}},rn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<p&&!i[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),"step"!==o&&p+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},rn.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;0<s&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},rn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Sr(0,e);return e.categoryIx=t,e.series={},e},rn.prototype.seriesMissingValues=function(t){return t.missingValues||Ki},rn.prototype.supportsPointInactiveOpacity=function(){return!1},rn),tn=((qr=P.Class)&&(on.__proto__=qr),((on.prototype=Object.create(qr&&qr.prototype)).constructor=on).prototype.update=function(t){var e,o=this.axisRanges;for(e in t){var i=t[e],r=o[e];o[e]=r=r||{min:l,max:c},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},on.prototype.reset=function(t){this.axisRanges[t]=void 0},on.prototype.query=function(t){return this.axisRanges[t]},on),N=((Yr=we)&&(en.__proto__=Yr),((en.prototype=Object.create(Yr&&Yr.prototype)).constructor=en).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},en.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?A:C,n.vAlign=o?k:A,"insideEnd"===e.position?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=_)):n.align=i?S:C:e.position===A?(n.vAlign=A,n.align=A):"insideBase"===e.position?o?n.vAlign=i?_:k:n.align=i?C:S:"outsideEnd"===e.position&&(p=o?i?new ie(t.x1,t.y1-s.height(),t.x2,t.y1):new ie(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=A,i?new ie(t.x2,t.y1,t.x2+s.width(),t.y2):new ie(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},en.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,o=e+"1",i=e+"2",r=this.children[0],e=this.parent.box;(e[o]<t[o]||t[i]<e[i])&&((r=r.paddingBox.clone())[o]=Math.max(e[o],t[o]),r[i]=Math.min(e[i],t[i]),this.reflow(r))},en);function en(t,e,o){Yr.call(this,e),this.textBox=new Ge(t,this.options,o),this.append(this.textBox)}function on(){qr.call(this),this.axisRanges={}}function rn(){Qr.apply(this,arguments)}function nn(){Zr.apply(this,arguments)}Dt(N,{position:"outsideEnd",margin:U(3),padding:U(4),color:r,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var sn=N;function an(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var pn,Se=((pn=we)&&(hn.__proto__=pn),((hn.prototype=Object.create(pn&&pn.prototype)).constructor=hn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},hn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=nt(i))?e(t):this.formatValue(i.format),this.label=new sn(e,j({vertical:o.vertical},i),t),this.append(this.label))},hn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},hn.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)},hn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(pn.prototype.createVisual.call(this),i?(o=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:t.toRect(),createVisual:function(){var t=new P.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},hn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(At(o.opacity)?o:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=P.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}}),i=this.box.width(),o=this.box.height();6<(e.vertical?i:o)&&(M(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),an(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},hn.prototype.createHighlight=function(t){return M(P.drawing.Path.fromRect(this.box.toRect(),t))},hn.prototype.highlightVisual=function(){return this.rectVisual},hn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},hn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=!At(e)?new P.Color(t).brightness(o).toHex():e},hn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=C,h=k;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),h=_)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(h=_,t=s?(p=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,p=S),Math.max(n.y1,a.y1))),{point:new Jt(t,i),align:{horizontal:p,vertical:h}}},hn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},hn.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}},hn);function hn(t,e){pn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=Vt(this.options.aboveAxis,!0),this.value=t}j(Se.prototype,_r),j(Se.prototype,tt),Se.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var ln=Se;function cn(t,e){t.forEach(e)}function un(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}var dn,G=((dn=we)&&(gn.__proto__=dn),((gn.prototype=Object.create(dn&&dn.prototype)).constructor=gn).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+o+r*(s-1),p=(e?i.height():i.width())/t,h=i[a+1]+o/2*p;this.forEach(n,function(t,e){var o=(t.box||i).clone();o[a+1]=h,o[a+2]=h+p,t.reflow(o),e<s-1&&(h+=p*r),h+=p})},gn);function gn(t){dn.call(this,t),this.forEach=t.rtl?un:cn}Dt(G,{vertical:!1,gap:0,spacing:0});var fn,yn=G,q=((fn=we)&&(vn.__proto__=fn),((vn.prototype=Object.create(fn&&fn.prototype)).constructor=vn).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,o=this.children,i=o.length,r=this.box=new ie,n=0;n<i;n++){var s,a=o[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},vn);function vn(){fn.apply(this,arguments)}Dt(q,{vertical:!0});var mn,xn=q,Y=((mn=br)&&(wn.__proto__=mn),((wn.prototype=Object.create(mn&&mn.prototype)).constructor=wn).prototype.render=function(){mn.prototype.render.call(this),this.updateStackRange()},wn.prototype.pointType=function(){return ln},wn.prototype.clusterType=function(){return yn},wn.prototype.stackType=function(){return xn},wn.prototype.stackLimits=function(t,e){return mn.prototype.stackLimits.call(this,t,e)},wn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=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),e=l.labels;p&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=p;t=t.fields.color||r.color;h<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,h,i,o,r,n),I(r.color)&&(t=l.color);l=new(this.pointType())(h,l);l.color=t;o=a[o];return o||(o=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),(p?this.getStackWrap(r,o):o).append(l),l},wn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===g){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}}else o=r[0];return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},wn.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(e=o.getSlot(e,e,!0),t[(i=i.invertAxes?v:m)+1]=t[i+2]=e[i+1]),t},wn.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},wn.prototype.createAnimation=function(){this._setAnimationOptions(),mn.prototype.createAnimation.call(this),zr(this.options.series)&&this._setChildrenAnimation()},wn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&At(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},wn.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),o.origin=new P.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},wn);function wn(){mn.apply(this,arguments)}Dt(Y,{animation:{type:Ji}});var bn,_n=Y,K=((bn=we)&&(An.__proto__=bn),((An.prototype=Object.create(bn&&bn.prototype)).constructor=An).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),e=i.getSlot(o.open,o.close),i=i.getSlot(o.low,o.high);e.x1=i.x1=t.x1,e.x2=i.x2=t.x2,this.realBody=e;o=i.center().x,t=[];t.push([[o,i.y1],[o,e.y1]]),t.push([[o,e.y2],[o,i.y2]]),this.lines=t,this.box=i.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},An.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},An.prototype.createVisual=function(){bn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},An.prototype.mainVisual=function(t){var e=new P.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},An.prototype.createBody=function(t,e){var o=P.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Vt(e.border.opacity,e.opacity)}),M(o),t.append(o),an(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)))},An.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},An.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:Vt(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=P.drawing.Path.fromPoints(o[n],r);M(s),t.append(s)}},An.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=!At(e)?new P.Color(this.color).brightness(t._brightness).toHex():e},An.prototype.createOverlay=function(){var t=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},An.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(j({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,t},An.prototype.highlightVisual=function(){return this._mainVisual},An.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},An.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Jt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},An.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},An.prototype.overlapsBox=function(t){return this.box.overlaps(t)},An);function An(t,e){bn.call(this,e),this.value=t}Dt(K,{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(K.prototype,_r),j(K.prototype,tt);var Cn=K;function Sn(t){return zi(t)===t.length}var kn,Z=((kn=br)&&(Pn.__proto__=kn),((Pn.prototype=Object.create(kn&&kn.prototype)).constructor=Pn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Pn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Sn(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new yn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(h,e),a.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},Pn.prototype.pointType=function(){return Cn},Pn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=j({},r),e=t.fields.color||r.color,p=this.evalPointOptions(p,a,i,o,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),I(r.color)&&(e=p.color),p.vertical=!this.options.invertAxes;p=new s(a,p);return p.color=e,p},Pn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Pn.prototype.updateRange=function(t,e){var o=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[o],t=this.valueAxisRanges[o]=t||{min:l,max:c};this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},Pn.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)},Pn.prototype.animationPoints=function(){return this.points},Pn);function Pn(){kn.apply(this,arguments)}j(Z.prototype,ve);var Mn,Tn=Z,it=((Mn=Cn)&&(Bn.__proto__=Mn),((Bn.prototype=Object.create(Mn&&Mn.prototype)).constructor=Bn).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,n=this.owner.seriesValueAxis(i);this.boxSlot=o=n.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);i=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,i),this.box=e.clone().wrap(o),this.reflowNote()},Bn.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Bn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Bn.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Bn.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]]]},Bn.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Bn.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],p=j({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border);At(p.color)||(At(this.color)?p.color=this.color:p.color=new P.Color(e.background).brightness(.8).toHex());p=new Pe({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:p,opacity:e.opacity});p.value=a,n.push(p)}return this.reflowOutliers(n),n},Bn.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,r=e.getSlot(r);this.options.vertical?r.move(o.x):r.move(void 0,o.y),this.box=this.box.wrap(r),t[i].reflow(r)}},Bn.prototype.mainVisual=function(t){for(var e=Mn.prototype.mainVisual.call(this,t),o=this.renderOutliers(t),i=0;i<o.length;i++){var r=o[i].getElement();r&&e.append(r)}return e},Bn.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)},Bn.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Mn.prototype.getBorderColor.call(this)},Bn);function Bn(t,e){Mn.call(this,t,e),this.createNote()}Dt(it,{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:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:a,border:{width:2,opacity:1},opacity:0}}),j(it.prototype,_r);var Rn,On,In,Ln=it,Vn=((In=Ln)&&(Hn.__proto__=In),((Hn.prototype=Object.create(In&&In.prototype)).constructor=Hn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Hn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Hn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Hn.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]]]},Hn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Hn),jn=((On=Tn)&&(En.__proto__=On),((En.prototype=Object.create(On&&On.prototype)).constructor=En).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Sn(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new yn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(h,e),a.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},En.prototype.pointType=function(){return this.options.invertAxes?Vn:Ln},En.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},En.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.valueAxisRanges[o],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));At(t.mean)&&(e=e.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:l,max:c},this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([i.min])),max:Math.max.apply(Math,e.concat([i.max]))}},En.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)},En.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];At(r)&&null!==r&&o.push(r)}return o},En.prototype.supportsPointInactiveOpacity=function(){return!1},En),Dn=((Rn=dr)&&(zn.__proto__=Rn),((zn.prototype=Object.create(Rn&&Rn.prototype)).constructor=zn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},zn);function zn(){Rn.apply(this,arguments)}function En(){On.apply(this,arguments)}function Hn(){In.apply(this,arguments)}function Un(t){return At(t)&&null!==t}var Fn,ft=((Fn=we)&&(Gn.__proto__=Fn),((Gn.prototype=Object.create(Fn&&Fn.prototype)).constructor=Gn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Gn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Gn.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,p=t.options.errorBars,h=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];B(r)&&(B(h)&&B(o)&&(i={low:h,high:o}),p&&At(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Qi(p[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),i&&this.addPointErrorBar(i,t,e))},Gn.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===m,t={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];s=new Dn(i,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[o]=i,this.updateRange(t,n),t[o]=r,this.updateRange(t,n)},Gn.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n],t=t;(t=!Un(i)||!Un(r)?this.createMissingValue(t,s):t)&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,v,e),this.addErrorBar(o,m,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},Gn.prototype.seriesMissingValues=function(t){return t.missingValues},Gn.prototype.createMissingValue=function(){},Gn.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[i],t=this.yAxisRanges[r];Un(n)&&(e=this.xAxisRanges[i]=e||{min:l,max:c},R(n)&&(n=Vo(o,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Un(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},R(s)&&(s=Vo(o,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},Gn.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];At(s)||(this._evalSeries[r]=s=yr(t,{},n,!0));r=t;return s&&yr(r=j({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Gn.prototype.pointType=function(){return Sr},Gn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(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)),i},Gn.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e);I(o.color)&&(r=i.color);i=new Sr(t,i);return i.color=r,this.append(i),i},Gn.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{x:t,y:i}},Gn.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var o=n[a++],i=r.seriesAxes(e.series),e=i.x.getSlot(t.x,t.x,s),t=i.y.getSlot(t.y,t.y,s);o&&(e&&t?(t=r.pointSlot(e,t),o.reflow(t)):o.visible=!1)}),this.box=t},Gn.prototype.pointSlot=function(t,e){return new ie(t.x1,e.y1,t.x2,e.y2)},Gn.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,s=s.fields;t(a,j({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},Gn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Gn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},Gn);function Gn(t,e){Fn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}Dt(ft,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),j(ft.prototype,ve,{_bindPoint:br.prototype._bindPoint});var Nn,Wn=ft,ct=((Nn=Sr)&&(Xn.__proto__=Nn),((Xn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Xn).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new P.drawing.Group,s=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y+r/5+e.width/2],r+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}]})}),t=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new P.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,t),n},Xn);function Xn(t,e){Nn.call(this,t,e),this.category=t.category}ct.prototype.defaults=j({},ct.prototype.defaults,{labels:{position:A},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),ct.prototype.defaults.highlight.zIndex=void 0;var Yn,qn=ct,Qt=((Yn=Wn)&&(Qn.__proto__=Yn),((Qn.prototype=Object.create(Yn&&Yn.prototype)).constructor=Qn).prototype._initFields=function(){this._maxSize=c,Yn.prototype._initFields.call(this)},Qn.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),Yn.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Qn.prototype.reflow=function(t){this.updateBubblesSize(t),Yn.prototype.reflow.call(this,t)},Qn.prototype.pointType=function(){return qn},Qn.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(600/i),n={delay:r,duration:600-r,type:"bubble"},i=e.color||o.color;t.size<0&&o.negativeValues.visible&&(i=Vt(o.negativeValues.color,i));n=j({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:u,border:o.border,opacity:o.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);I(o.color)&&(i=n.color),n.markers.background=i;n=new qn(t,n);return n.color=i,this.append(n),n},Qn.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(u=Math.abs(d.value.size)*h,c=Math.sqrt((p+u)/Math.PI),u=Vt(d.options.zIndex,0)+(1-c/a),j(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Qn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},Qn.prototype.createAnimation=function(){},Qn.prototype.createVisual=function(){},Qn);function Qn(){Yn.apply(this,arguments)}Dt(Qt,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Zn,Kn=Qt,ce=((Zn=Pe)&&($n.__proto__=Zn),($n.prototype=Object.create(Zn&&Zn.prototype)).constructor=$n);function $n(){Zn.apply(this,arguments)}j(ce.prototype,_r);var Jn,ts=ce,be=((Jn=we)&&(es.__proto__=Jn),((es.prototype=Object.create(Jn&&Jn.prototype)).constructor=es).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,At(this.value.target)&&(this.target=new ts({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:k,align:S}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},es.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),s=i.categorySlot(i.categoryAxis,e.categoryIx,n),i=n.getSlot(this.value.target),n=r?i:s,i=r?s:i;o&&(i=new ie(n.x1,i.y1,n.x2,i.y2),o.options.height=r?i.height():e.target.line.width,o.options.width=r?e.target.line.width:i.width(),o.reflow(i)),this.note&&this.note.reflow(t),this.box=t},es.prototype.createVisual=function(){Jn.prototype.createVisual.call(this);var t=this.options,e=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:Vt(t.border.opacity,t.opacity)}),M(this.bodyVisual=e),this.visual.append(e)},es.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=P.drawing.Animation.create(this.bodyVisual,this.options.animation))},es.prototype.createHighlight=function(t){return P.drawing.Path.fromRect(this.box.toRect(),t)},es.prototype.highlightVisual=function(){return this.bodyVisual},es.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},es.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},es);function es(t,e){Jn.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}be.prototype.tooltipAnchor=ln.prototype.tooltipAnchor,Dt(be,{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(be.prototype,_r),j(be.prototype,tt);var os,is=be,N=((os=br)&&(rs.__proto__=os),((rs.prototype=Object.create(os&&os.prototype)).constructor=rs).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},rs.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},rs.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,e=j({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,p,i,o,r,n);I(r.color)&&(t=e.color);e=new is(p,e);e.color=t;o=a[o];return o||(o=new yn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},rs.prototype.updateRange=function(t,e){var o=t.current,i=t.target,t=e.series.axis,e=this.valueAxisRanges[t];At(o)&&!isNaN(o)&&At(i&&!isNaN(i))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,o,i),e.max=Math.max(e.max,o,i))},rs.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},rs.prototype.pointValue=function(t){return t.valueFields.current},rs.prototype.aboveAxis=function(t){return 0<t.value.current},rs.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()}},rs);function rs(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var o=t[e],i=o.data;!i||x(i[0])||D(i[0])||(o.data=[i])}}(),os.call(this,t,r)}N.prototype._setAnimationOptions=_n.prototype._setAnimationOptions,Dt(N,{animation:{type:Ji}});var ns,ss=N,Se=((ns=P.Class)&&(as.__proto__=ns),((as.prototype=Object.create(ns&&ns.prototype)).constructor=as).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;e&&(r=e.color||e.options.color,o=Vt(o,r),i=Vt(i,r));var r=U(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:z(t.border.width),paddingTop:z(r.top),paddingBottom:z(r.bottom),paddingLeft:z(r.left),paddingRight:z(r.right)}},as.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o);t.style=o;o=new P.Color(o.backgroundColor);At(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},as.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},as.prototype.destroy=function(){delete this.chartService},as);function as(t,e){ns.call(this),this.chartService=t,this.options=j({},this.options,e)}Dt(Se,{border:{width:1},opacity:1});var ps,G=Se,q=((ps=G)&&(hs.__proto__=ps),((hs.prototype=Object.create(ps&&ps.prototype)).constructor=hs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},hs.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},hs.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},hs.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,n=i.padding,i=!o.axis.options.vertical,o=o.line.bbox(),n=i?(t=A,r===_?(e=k,o.bottomLeft().translate(0,n)):(e=_,o.topLeft().translate(0,-n))):(e=A,r===C?(t=S,o.topLeft().translate(-n,0)):(t=C,o.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},hs);function hs(t,e,o){ps.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}Dt(q,{padding:10});var ls,cs=q,Y=((ls=we)&&(us.__proto__=ls),((us.prototype=Object.create(ls&&ls.prototype)).constructor=us).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},us.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},us.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?m:v,n=new P.geometry.Point(i.x1,i.y1),o=o?new P.geometry.Point(i.x2,i.y1):new P.geometry.Point(i.x1,i.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=o[r]=t.center()[r]):n[r]=o[r]=e[r]),this.box=i,this.line.moveTo(n).lineTo(o)},us.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),e=r?v:m,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},us.prototype.createVisual=function(){ls.prototype.createVisual.call(this);var t=this.options;this.line=new P.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},us.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ls.prototype.destroy.call(this)},us);function us(t,e,o){ls.call(this,o),this.axis=e,this.stickyMode=e instanceof Ho;e=this.options.tooltip;e.visible&&(this.tooltip=new cs(t,this,j({},e,{stickyMode:this.stickyMode})))}Dt(Y,{color:r,width:2,zIndex:-1,tooltip:{visible:!1}});var ds,gs=Y,K=((ds=we)&&(fs.__proto__=ds),((fs.prototype=Object.create(ds&&ds.prototype)).constructor=fs).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},fs.prototype._clipBox=function(){return this.pane.chartsBox()},fs.prototype.createVisual=function(){var t;this.visual=new P.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),M(t=P.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},fs.prototype.stackRoot=function(){return this},fs.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s,a=i[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},fs.prototype.destroy=function(){ds.prototype.destroy.call(this),delete this.parent},fs);function fs(t,e){ds.call(this,t),this.pane=e}K.prototype.isStackRoot=!0;var ys,vs=K,Z=((ys=Ce)&&(xs.__proto__=ys),((xs.prototype=Object.create(ys&&ys.prototype)).constructor=xs).prototype.createTitle=function(){var t=this.options.title;D(t)&&(t=j({},t,{align:t.position,position:k})),this.title=Ye.buildTitle(t,this,xs.prototype.options.title)},xs.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},xs.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},xs.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},xs.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=[]},xs.prototype.reflow=function(t){var e;Tt(this.children)===this.content&&(e=this.children.pop()),ys.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},xs.prototype.visualStyle=function(){var t=ys.prototype.visualStyle.call(this);return t.zIndex=-10,t},xs.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},xs.prototype.stackRoot=function(){return this},xs.prototype.clipRoot=function(){return this},xs.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?i:r,h=0;h<o.length;h++)0!==p.length||a!==(t=o[h]).options.vertical&&bt(p,s.createGridLines(t))},xs.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},xs.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new ie,i=0;i<e;i++){var r=t[i],n=r.options.vertical?m:v,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),o.x1=h.x1,o.x2=h.x2)}return o},xs.prototype.clipBox=function(){return this.chartContainer.clipBox},xs.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Vi(this),index:this.paneIndex,name:this.options.name})},xs),ms=1;function xs(t){ys.call(this,t),this.id="pane"+ms++,this.createTitle(),this.content=new we,this.chartContainer=new vs({},this),this.append(this.content),this.axes=[],this.charts=[]}Z.prototype.isStackRoot=!0,Dt(Z,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});var ws=Z;function bs(t,e){null!==e&&t.push(e)}function _s(t,e,o){e=e.visible;if(At(e))return e;t=t.pointVisibility;return t?t[o]:void 0}function As(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Xi.current.bindPoint(t,n),a=s.valueFields.value;B(a=R(a)?parseFloat(a):a)?(s.visible=!1!==_s(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function Cs(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Ss(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];dt(n.type,i)&&o.push(n)}return o}function ks(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Vo(o,pt(t)(e)),e[i]=r),r}function Ps(t,e){t=t.type,e=e instanceof Date;return!t&&e||Cs(t,y)}function Ms(t){return 1===t.length?t[0]:t}var Ts=/area/i;function Bs(t,e){var o,i=Xi.current.bindPoint(t,null,e).valueFields;for(o in i)if(O(i[o]))return!0}function Rs(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=i;p(l+=r)&&(e=Bs(h,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Os(t,e,o,i,r){var n,s,a,p=e.min,h=e.max,l=0<p&&p<o,c=h+1<o;(l||c)&&(((e=t).missingValues||(Ts.test(e.type)||e.stack?Ki:$i))!==$i?(l&&(n=i(p-1)),c&&(s=i(h+1))):(l&&(n=Bs(t,(a=i(p-1)).item)?a:Rs({start:p,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Bs(t,(a=i(h+1)).item)?a:Rs({start:h,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var Is,it=((Is=we)&&(Ls.__proto__=Is),((Ls.prototype=Object.create(Is&&Is.prototype)).constructor=Ls).prototype.initFields=function(){},Ls.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Ls.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=j({title:{color:t.color}},e),s=0;s<i;s++){var a=j({},n,o[s]);R(a.title)&&(a.title=j({text:a.title},n.title));a=new ws(a);a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Ls.prototype.crosshairOptions=function(t){return t.options.crosshair},Ls.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);n&&n.visible&&(n=new gs(this.chartService,r,n),this.crosshairs.push(n),o.content.append(n))}},Ls.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;0<=i;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},Ls.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Ls.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},Ls.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];break}return e},Ls.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Ls.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},Ls.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Ls.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},Ls.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&nt(n)||nt(i))&&(p=l({text:Un(p)?p:"",series:u})),c=u._defaults,I(h=u.color)&&c&&(h=c.color),c=l=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Un(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}bt(o.items,s)},Ls.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?o:e).push(s)}return{x:e,y:o,any:e.concat(o)}},Ls.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},Ls.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},Ls.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=U(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},Ls.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=this.getRoot();t&&t.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 i=0;i<e.length;i++)e[i].refresh()},Ls.prototype.axisCrossingValues=function(t,e){for(var t=t.options,o=[].concat(t.axisCrossingValues||t.axisCrossingValue),i=e.length-o.length,r=o[0]||0,n=0;n<i;n++)o.push(r);return o},Ls.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,o=e.getSlot(i,i,!0),i=e.options.reverse?2:1,n=t.box.translate(o[v+i]-r[v+n],o[m+i]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},Ls.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,g=!1!==c.options.visible,f=js(t,u)||o,u=r;f!==o&&(u=this.axisCrossingValues(f,e)),this.alignAxisTo(c,f,n[l],u[l]),c.options._overlap||(It(c.lineBox().x1)===It(f.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),g&&(s[d]=c)),It(c.lineBox().x2)===It(f.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,f,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,S).translate(c.options.margin,0)),g&&(a[d]=c)),0!==l&&i.pane===c.pane&&(c.alignTo(i),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,w=!1!==v.options.visible,b=js(e,m)||i,m=n;b!==i&&(m=this.axisCrossingValues(b,t)),this.alignAxisTo(v,b,r[y],m[y]),v.options._overlap||(It(v.lineBox().y1)===It(b.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,b,r[y],m[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,k).translate(0,-v.options.margin)),w&&(p[x]=v)),It(v.lineBox().y2,3)===It(b.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,_).translate(0,v.options.margin)),w&&(h[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},Ls.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Vs(e),i=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},Ls.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Vs(r).height()-i.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},Ls.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,s=r.contentBox;if(0<n.length)for(var r=Vs(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),o=Math.max(o,s.x1-r.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},Ls.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);0<e.x.length&&0<e.y.length&&(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))},Ls.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Ds(o),r=0;r<i.length;r++)i[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},Ls.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(0<o)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},Ls.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!dt(n,t)||e[r].reflow(i)}},Ls.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var h=0;h<o;h++){var l=e[h];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},Ls.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,o=0;o<e;o++)for(var i=t[o],r=0;r<e;r++){var n,s=t[r];i.options.vertical!==s.options.vertical&&(s=i.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},Ls.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},Ls.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(P.drawing.Path.fromRect(e[o].toRect()))},Ls.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},Ls.prototype.createVisual=function(){Is.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border;void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&At(o)||(o=a,e=0);t=this._bgVisual=new P.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},Ls.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var i=0;i<e.length;i++)if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&At(s.value)&&null!==s.value&&o.push(s)}}return o},Ls.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Ls.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Ls.prototype.filterPoints=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},Ls.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},Ls.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},Ls.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Ls.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=js(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},Ls.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n=i.visible;if("end"!==r&&"start"!==r||!1===n)return null;i=this.groupAxes(this.panes),n=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,n),n="end"===r,r=o.range(),n=n?r.max:r.min;if(Bt(i[e],r.min,r.max)-n==0)return null;i.splice(e+1,0,n),o.options.axisCrossingValues=i;i=t.clone();return t.clear(),i.options.name=void 0,i.options.line.visible=!1,i.options.crosshair=void 0,i.options.notes=void 0,i.options.plotBands=void 0,i},Ls);function Ls(t,e,o){Is.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function Vs(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new ie}function js(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Ds=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};Dt(it,{series:[],plotArea:{margin:{}},background:"",border:{color:r,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var zs=it,Es={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var Hs,Us,Fs=((Us=P.Class)&&(Ns.__proto__=Us),((Ns.prototype=Object.create(Us&&Us.prototype)).constructor=Ns).prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||B(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<i.length;a++){var p=i[a],h=this._bindField(r.values,p.canonicalName),h=p.transform(h,o,r.dataItems,e);if(!(null===h||!D(h)||At(h.length)||h instanceof Date)){s=h;break}At(h)&&function(t,e,o){var i=e,r=t;if(-1<t.indexOf(".")){for(var n=t.split(".");1<n.length;)r=n.shift(),At(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}(p.name,s,h)}return s},Ns.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},Ns.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,a=(At(s[e])?s:n.fields)[e];o.push(a)}return o},Ns),ft=((Hs=P.Class)&&(Gs.__proto__=Hs),((Gs.prototype=Object.create(Hs&&Hs.prototype)).constructor=Gs).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Gs.prototype.query=function(t){return this._defaults[t]},Gs);function Gs(){Hs.call(this),this._defaults={}}function Ns(t,e,o){Us.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var p=0;p<i.length;p++){var h=i[p],l=void 0;if(D(a))l=a[h];else{if(0!==p&&!dt(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:I(l)?l:Hi[l]})}}ft.current=new ft;var Ws,Xs=ft,ct=((Ws=ln)&&(Ys.__proto__=Ws),((Ys.prototype=Object.create(Ws&&Ws.prototype)).constructor=Ys).prototype.createLabel=function(){var t=this.options.labels,e=j({},t,t.from),t=j({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},Ys.prototype._createLabel=function(t){var e=nt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new sn(e,j({vertical:this.options.vertical},t),o)},Ys.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},Ys);function Ys(){Ws.apply(this,arguments)}ct.prototype.defaults=j({},ct.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var qs,Qs=ct,Qt=((qs=_n)&&(Zs.__proto__=qs),((Zs.prototype=Object.create(qs&&qs.prototype)).constructor=Zs).prototype.pointType=function(){return Qs},Zs.prototype.pointValue=function(t){return t.valueFields},Zs.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)},Zs.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Zs.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.from,r=t.to,e=this.valueAxisRanges[o];null!==t&&B(i)&&B(r)&&((e=this.valueAxisRanges[o]=e||{min:l,max:c}).min=Math.min(e.min,i),e.max=Math.max(e.max,i),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},Zs.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Zs);function Zs(){qs.apply(this,arguments)}Qt.prototype.plotLimits=br.prototype.plotLimits;var Ks,$s,Js=Qt,ta=(($s=Sr)&&(oa.__proto__=$s),((oa.prototype=Object.create($s&&$s.prototype)).constructor=oa).prototype.aliasFor=function(){return this.parent},oa),ce=((Ks=we)&&(ea.__proto__=Ks),((ea.prototype=Object.create(Ks&&Ks.prototype)).constructor=ea).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,i=(o=this.options).markers,t=o.labels,e=this.value,o=this.fromPoint=new ta(e,j({},this.options,{labels:t.from,markers:i.from})),i=this.toPoint=new ta(e,j({},this.options,{labels:t.to,markers:i.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},ea.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},ea.prototype.createHighlight=function(){var t=new P.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},ea.prototype.highlightVisual=function(){return this.visual},ea.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},ea.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i=this.box,r=i.center(),t=C,r=this.options.vertical?(e=r.x,o=i.y1-5,_):(e=i.x2+5,o=r.y,A);return{point:new Jt(e,o),align:{horizontal:t,vertical:r}}}},ea.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ea.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ea.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},ea.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}"})))},ea.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(t=i?e.y1<=t.y1?(o="above","below"):(o="below","above"):e.x1<=t.x1?(o=C,S):(o=S,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},ea.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},ea);function ea(t,e){Ks.call(this),this.value=t,this.options=e,this.aboveAxis=Vt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function oa(){$s.apply(this,arguments)}j(ce.prototype,_r),j(ce.prototype,tt),ce.prototype.defaults={markers:{visible:!1,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var ia,ra,na,sa=ce,aa=((na=Nr)&&(ca.__proto__=na),((ca.prototype=Object.create(na&&na.prototype)).constructor=ca).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ca.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse())):t},ca.prototype.createStroke=function(t){var e=new P.drawing.Path(t),t=new P.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},ca.prototype.hasStackSegment=function(){return!0},ca.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ca.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ca),pa=((ra=aa)&&(la.__proto__=ra),((la.prototype=Object.create(ra&&ra.prototype)).constructor=la).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},la.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.createCurveSegments(this.fromPoints().reverse()):t},la.prototype.createCurveSegments=function(t){return(new Ti).process(this.toGeometryPoints(t))},la),be=((ia=aa)&&(ha.__proto__=ia),((ha.prototype=Object.create(ia&&ia.prototype)).constructor=ha).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ha.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},ha);function ha(){ia.apply(this,arguments)}function la(){ra.apply(this,arguments)}function ca(){na.apply(this,arguments)}j(be.prototype,wt);var ua,da=be,N=((ua=br)&&(ga.__proto__=ua),((ga.prototype=Object.create(ua&&ua.prototype)).constructor=ga).prototype.render=function(){ua.prototype.render.call(this),this.renderSegments()},ga.prototype.pointType=function(){return sa},ga.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Un(s.from)&&!Un(s.to)){if(this.seriesMissingValues(r)!==Ki)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,i,o,r,n),t=t.fields.color||r.color;I(r.color)&&(t=e.color);e=new sa(s,e);return e.color=t,this.append(e),e},ga.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?pa:"step"===i?da:aa)(t,e,o)},ga.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},ga.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(o&&e)return{from:o,to:e}},ga.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,e=this.options.invertAxes?(o=new ie(i.x1,t.y1,i.x2,t.y2),new ie(e.x1,t.y1,e.x2,t.y2)):(o=new ie(t.x1,i.y1,t.x2,i.y2),new ie(t.x1,e.y1,t.x2,e.y2));return{from:o,to:e}},ga.prototype.addValue=function(t,e){var o=t.valueFields;B(o.from)||(o.from=o.to),B(o.to)||(o.to=o.from),ua.prototype.addValue.call(this,t,e)},ga.prototype.updateRange=function(t,e){var o;null!==t&&B(t.from)&&B(t.to)&&(o=e.series.axis,e=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:l,max:c},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},ga.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},ga.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},ga);function ga(){ua.apply(this,arguments)}j(N.prototype,Yt,ve);var fa,ya,va,ma=N,xa=((va=Cn)&&(Aa.__proto__=va),((Aa.prototype=Object.create(va&&va.prototype)).constructor=Aa).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=i.getSlot(o.low,o.high),e=i.getSlot(o.open,o.open),o=i.getSlot(o.close,o.close);e.x1=o.x1=a.x1=t.x1,e.x2=o.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,o.y1]),n.push([o.x2,o.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(o)),this.reflowNote()},Aa.prototype.createBody=function(){},Aa),wa=((ya=Tn)&&(_a.__proto__=ya),((_a.prototype=Object.create(ya&&ya.prototype)).constructor=_a).prototype.pointType=function(){return xa},_a),Se=((fa=we)&&(ba.__proto__=fa),((ba.prototype=Object.create(fa&&fa.prototype)).constructor=ba).prototype.linePoints=function(){var t,e=this.from,o=this.from.box,i=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?o.y1:o.y2,r.push([o.x1,t],[i.x2,t])):(e=e.aboveAxis?o.x2:o.x1,r.push([e,o.y1],[e,i.y2])),r},ba.prototype.createVisual=function(){fa.prototype.createVisual.call(this);var t=this.series.line||{},t=P.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});M(t),this.visual.append(t)},ba);function ba(t,e,o){fa.call(this),this.from=t,this.to=e,this.series=o}function _a(){ya.apply(this,arguments)}function Aa(){va.apply(this,arguments)}Dt(Se,{animation:{type:"fadeIn",delay:600}});var Ca,Sa,ka=Se,Pa=((Sa=_n)&&(Ra.__proto__=Sa),((Ra.prototype=Object.create(Sa&&Sa.prototype)).constructor=Ra).prototype.render=function(){Sa.prototype.render.call(this),this.createSegments()},Ra.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=vr(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=Xi.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):B(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},Ra.prototype.updateRange=function(t,e){Sa.prototype.updateRange.call(this,{value:e.to},e)},Ra.prototype.aboveAxis=function(t){return 0<=t.value},Ra.prototype.plotRange=function(t){return[t.from,t.to]},Ra.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new ka(s,h,r),o.push(p),this.append(p)),s=h}}},Ra),Ma=["area","verticalArea","rangeArea","verticalRangeArea"],Ta=[er,ir].concat(Ma),q=((Ca=zs)&&(Ba.__proto__=Ca),((Ba.prototype=Object.create(Ca&&Ca.prototype)).constructor=Ba).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new tn,0<t.length){this.invertAxes=dt(t[0].type,[Ji,"bullet",ir,"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}}}},Ba.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)},Ba.prototype.removeAxis=function(t){var e=t.options.name;Ca.prototype.removeAxis.call(this,t),t instanceof Ho?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Ba.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},Ba.prototype.createChartGroup=function(t,e){this.createAreaChart(Ss(t,["area","verticalArea"]),e),this.createRangeAreaChart(Ss(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Ss(t,[tr,Ji]),e),this.createRangeBarChart(Ss(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Ss(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Ss(t,"candlestick"),e),this.createBoxPlotChart(Ss(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Ss(t,"ohlc"),e),this.createWaterfallChart(Ss(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Ss(t,[er,ir]),e)},Ba.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(Cs(n.options.type,y)||r.categoryField)&&dt(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},Ba.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!B(o.options.min)&&!B(o.options.max))return e;var i=o.currentRangeIndices(),r=dt(e.type,Ta),n=j({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Os(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return At(e.data[t])}),n},Ba.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Ba.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 i=e.options,r=i.srcCategories,i=Cs(i.type,y),n=t.data,s=i?ks:Ui,a=[];i||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];At(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[o]=a},Ba.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=j({},t),n=new Fs(j({},t),Xi.current,Xs.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),p=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(t=i.categoryAt(t,!0),o.category=t,o.item=n.aggregatePoints(o.items,t)),o},h=a.min;h<=a.max;h++){var l=p(h);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return dt(e.type,Ta)&&Os(e,a,i.totalCount(),p,function(t){return r[t]}),i.options.dataItems=s,e},Ba.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,vr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Ca.prototype.appendChart.call(this,t,e)},Ba.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=ht([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Ba.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},Ba.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Ba.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,o){return ht(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Ba.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new _n(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ba.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Js(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Ba.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ss(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ba.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Gr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ba.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Jr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ba.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new ma(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new wa(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ba.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Tn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ba.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new jn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ba.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Pa(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Ba.prototype.axisRequiresRounding=function(t,e){for(var o=Ss(this.series,rr),i=0;i<this.series.length;i++){var r,n=this.series[i];!dt(n.type,Ma)||(r=n.line)&&"step"===r.style&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},Ba.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},Ba.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Ho&&t[e].createLabels()},Ba.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(dt(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?l:0},n),At(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0,p=new(Ps(n,a[0])?Zo:Ho)(n,this.chartService);if(o[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,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},Ba.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!dt(t[e].type,Ma))return!1;return!0},Ba.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].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<i.length;a++){var p=i[a];if(dt(this.findPane(p.pane),t)){var h=p.name,l=Cs(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||l;0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max));p=new(Cs(p.type,"log")?di:ni)(l.min,l.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]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},Ba.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Jt(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?bs(s,h.getValue(r)):bs(n,h.getCategory(r))}0===n.length&&bs(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Pt(e),originalEvent:e,category:Ms(n),value:Ms(s)})}},Ba.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},Ba.prototype.updateAxisOptions=function(t,e){Oa(this.options,t,e),Oa(this.originalOptions,t,e)},Ba);function Ba(){Ca.apply(this,arguments)}function Ra(){Sa.apply(this,arguments)}function Oa(t,e,o){j([].concat(e instanceof Ho?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}Dt(q,{categoryAxis:{},valueAxis:{}}),j(q.prototype,Es);var Ia=q;function La(){this._defaultPrevented=!0}var Va,ja=((Va=P.Class)&&(Da.__proto__=Va),((Da.prototype=Object.create(Va&&Va.prototype)).constructor=Da).prototype.destroy=function(){this._points=[]},Da.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Da.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;i?(i(i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:La,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},Da.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Da.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1},Da);function Da(){Va.call(this),this._points=[]}function za(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ea(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}var Ha,Y=((Ha=P.Class)&&(Ua.__proto__=Ha),((Ua.prototype=Object.create(Ha&&Ha.prototype)).constructor=Ua).prototype.start=function(t){return this._active=za(t,this.options.key),this._active},Ua.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));if(t.length)return Ea(this.axisRanges=t)}},Ua.prototype.end=function(){var t=this._active;return this._active=!1,t},Ua.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},Ua.prototype.destroy=function(){delete this.plotArea},Ua.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,p=n[s];!(e===v&&!p.options.vertical||e===m&&p.options.vertical)||(a=p.pan(i))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},Ua);function Ua(t,e){Ha.call(this),this.plotArea=t,this.options=j({},this.options,e)}Y.prototype.options={key:"none",lock:"none"};var Fa,Ga=Y,K=((Fa=P.Class)&&(Na.__proto__=Fa),((Na.prototype=Object.create(Fa&&Fa.prototype)).constructor=Na).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)},Na.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Na.prototype.setStyles=function(t){H(this._marquee,t)},Na.prototype.start=function(t){if(za(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(o),o=e?e.chartsBox().clone():null;if(e&&o){e=this._elementOffset();return o.translate(e.left,e.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},Na.prototype._elementOffset=function(){var t=this.chart.element,e=H(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=St(t);return{left:o+t.left,top:e+t.top}},Na.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Na.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Ea(this.axisRanges)}},Na.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},Na.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Na.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===v&&!a||o===m&&a||!At(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Na.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,i),a=Math.min(o.y,r),p=Math.abs(o.x-i),t=Math.abs(o.y-r);return n===v&&(s=e.x1,p=e.width()),n===m&&(a=e.y1,t=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(t=e.y2-o.y),r<e.y1&&(t=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:t}},Na);function Na(t,e){Fa.call(this),this.chart=t,this.options=j({},this.options,e),this.createElement()}K.prototype.options={key:"shift",lock:"none"};var Wa,Xa,Ya,qa,Qa=K,Za=((qa=P.Class)&&(ip.__proto__=qa),((ip.prototype=Object.create(qa&&qa.prototype)).constructor=ip).prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===v&&!a||o===m&&a||!s.zoomRange||(a=s.zoomRange(-t*this.options.rate,e))&&i.push({axis:s,range:a})}return Ea(this.axisRanges=i)},ip.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 i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},ip.prototype.destroy=function(){delete this.chart},ip),Ka=((Ya=we)&&(op.__proto__=Ya),((op.prototype=Object.create(Ya&&Ya.prototype)).constructor=op).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new P.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 i=0;i<t.length;i++){var r=t[i];r.reflow(new ie),r.renderVisual()}},op.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ee(t):new ie},op.prototype.renderVisual=function(){this.addVisual()},op.prototype.createVisual=function(){},op),$a=((Xa=Ce)&&(ep.__proto__=Xa),((ep.prototype=Object.create(Xa&&Xa.prototype)).constructor=ep).prototype.createContainer=function(){this.container=new Ve({vertical:!1,wrap:!1,align:A,spacing:this.options.spacing}),this.append(this.container)},ep.prototype.createMarker=function(){this.container.append(new Pe(this.markerOptions()))},ep.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return j({},t.markers,{background:e,border:{color:e}})},ep.prototype.createLabel=function(){var t=this.options,e=j({},t.labels);this.container.append(new Ge(t.text,e))},ep.prototype.renderComplete=function(){Xa.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=P.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},ep.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},ep.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},ep.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},ep.prototype.eventArgs=function(t){var e=this.options;return{element:Pt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},ep.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;o?(this.visual=o({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):Xa.prototype.renderVisual.call(this)},ep),Ja="custom",Z=((Wa=we)&&(tp.__proto__=Wa),((tp.prototype=Object.create(Wa&&Wa.prototype)).constructor=tp).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=A;e===Ja?i=C:dt(e,[k,_])?(i="start"===o?C:"end"===o?S:A,r=e):o&&("start"===o?r=k:"end"===o&&(r=_)),this.container=new Ce({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Ce({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},tp.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new Ka({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];i.append(new $a(j({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},tp.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Ja&&"horizontal"!==e||(At(e)?"horizontal"!==e:dt(t,[C,S]))},tp.prototype.hasItems=function(){return 0<this.container.children[0].children.length},tp.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Ja?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new ie(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},tp.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===_?v:m,a=this.isVertical(),p=t.clone(),h=t.clone();i!==C&&i!==S||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,m,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,v,o.options.align)),o.reflow(h);p=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),p[s+1]=t[s+1],p[s+2]=t[s+2],this.box=p},tp.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new ie(i,r,i+t.width(),r+t.height()))},tp.prototype.renderVisual=function(){this.hasItems()&&Wa.prototype.renderVisual.call(this)},tp.prototype.createLegendTitle=function(t){var e=j({},{color:r,position:k,align:A},t),o=e.text;t&&!1!==t.visible&&(At(e)&&e.visible&&((t=nt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new Ge(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},tp.prototype.createTitleLayout=function(){this.layout=new Ve({vertical:!0,wrap:!1}),this.container.append(this.layout)},tp.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},tp.prototype.appendTitleLayoutContent=function(){this.options.title.position===_?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},tp);function tp(t,e){void 0===e&&(e={}),Wa.call(this,t),this.chartService=e,dt(this.options.position,[k,S,_,C,Ja])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function ep(t){Xa.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function op(t,e){Ya.call(this,t),this.chartService=e}function ip(t,e){qa.call(this),this.chart=t,this.options=j({rate:.3},this.options,e)}Dt(Z,{position:S,items:[],offsetX:0,offsetY:0,margin:U(5),padding:U(5),border:{color:r,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 rp,np=Z,it=((rp=P.Class)&&(sp.__proto__=rp),((sp.prototype=Object.create(rp&&rp.prototype)).constructor=sp).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},sp.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(i=Ss(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},sp);function sp(){rp.call(this),this._registry=[]}it.current=new it;var ap=it;function pp(t){var e=document.createElement("div");return t&&(e.className=t),e}function hp(t){for(var e=t;e&&!lt(e,"k-handle");)e=e.parentNode;return e}var lp,ft=((lp=P.Class)&&(cp.__proto__=lp),((cp.prototype=Object.create(lp&&lp.prototype)).constructor=cp).prototype.onPane=function(t){return this.categoryAxis.pane===t},cp.prototype.createElements=function(){var t=this.options,e=this.wrapper=pp("k-selector");H(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=pp("k-selection");this.leftMask=pp("k-mask"),this.rightMask=pp("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(pp("k-selection-bg"));var i=this.leftHandle=pp("k-handle k-left-handle"),r=this.rightHandle=pp("k-handle k-right-handle");i.appendChild(pp()),r.appendChild(pp()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=H(o,["borderLeftWidth","borderRightWidth","height"]),s=H(i,"height").height,o=H(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},H(i,{top:(n.height-s)/2}),H(r,{top:(n.height-o)/2}),e.style.cssText=e.style.cssText},cp.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),_t(this.wrapper,((t={})[hr]=this._mousewheelHandler,t))),this._domEvents=et.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)})},cp.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&j(t,{min:Vo(o,t.min),max:Vo(o,t.max),from:Vo(o,t.from),to:Vo(o,t.to)});var i=H(this.chartElement,["paddingLeft","paddingTop"]),o=i.paddingLeft,i=i.paddingTop;this.options=j({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},cp.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Lt(this.wrapper,((t={})[hr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},cp.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},cp.prototype._start=function(t){var e=this.options,o=Pt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:hp(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},cp.prototype._press=function(t){(t=this._state?this._state.moveTarget:hp(Pt(t)))&&p(t,"k-handle-active")},cp.prototype._move=function(t){var e,o,i,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,h=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(h.from),n=this._index(h.to),s=this._index(h.min),a=this._index(h.max),u=l.startLocation-t.x.location,p=e.from,h=e.to,l=e.to-e.from,t=H(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(i?-1:1),o&&(u=lt(o,"k-left-handle"),t=lt(o,"k-right-handle"),lt(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!i||t&&i?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&i||t&&!i)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===p&&e.to===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},cp.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&b(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},cp.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new Jt(i.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),i=s-n,e={},s=3===t.event.which,r=Math.round(n+i/2-r);this._state||s||(this.chart._unsetActivePoint(),o.options.justified||r--,e.from=Math.min(Math.max(a,n-r),p-i),e.to=Math.min(e.from+i,p),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},cp.prototype._mousewheel=function(t){var e,o=this,i=mt(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(i)&&(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(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){o._end()},150))},cp.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},cp.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},cp.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,o=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,o),o=Math.max(s,o);t.preventDefault(),n.from=r.pointCategoryIndex(new Jt(e))||i.min,n.to=r.pointCategoryIndex(new Jt(o))||i.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},cp.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},cp.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},cp.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},cp.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,p="x"+(i?2:1),e=this._slot(i?e:t),t=It(e[p]-r.left+n.left);H(this.leftMask,{width:t}),H(this.selection,{left:t});e=this._slot(a),r=It(o.width-(e[p]-r.left+n.left));H(this.rightMask,{width:r});n=o.width-r;n!==o.width&&(n+=s.right),H(this.rightMask,{left:n}),H(this.selection,{width:Math.max(o.width-(t+r)-s.right,0)})},cp.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),i=Bt(this._index(t),i,r),r=Bt(this._index(e),i+1,r);o.visible&&this.move(i,r),o.from=this._value(i),o.to=this._value(r)},cp.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},e=j({},a);if(this._state&&(a=this._state.range),r!==S&&(a.from=Bt(Bt(n-t,0,s-1),o,i)),r!==C&&(a.to=Bt(Bt(s+t,a.from+1,i),o,i)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},cp.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},p=j({},a),h=this.categoryAxis.options.reverse,o=v+(h?"2":"1"),h=this.categoryAxis.lineBox(),e=Math.abs(h[o]-e.x),h=h.width(),e=It(e/h,2),h=It(e*t),t=It((1-e)*t);if((a=this._state?this._state.range:a).from=Bt(Bt(n-h,0,s-1),i,r),a.to=Bt(Bt(s+t,a.from+1,r),i,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},cp.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},cp);function cp(t,e,o,i){lp.call(this);var r=t.element;this.options=j({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Zo,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}Dt(ft,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var up,dp,gp=ft,fp=((dp=G)&&(vp.__proto__=dp),((vp.prototype=Object.create(dp&&dp.prototype)).constructor=vp).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=j({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,dp.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},vp.prototype.hide=function(){delete this._current,dp.prototype.hide.call(this)},vp),ct=((up=G)&&(yp.__proto__=up),((yp.prototype=Object.create(up&&up.prototype)).constructor=yp).prototype.showAt=function(t,e){var o,i=ht(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(o=i[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),i=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:i,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},yp.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},yp.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,o=o.center(),e=e.center();return{point:t?new Jt(o.x,e.y):new Jt(e.x,o.y),align:{horizontal:"center",vertical:"center"}}},yp);function yp(t,e){up.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function vp(){dp.apply(this,arguments)}Dt(ct,{categoryFormat:"{0:d}"});var mp,xp=ct,Qt=((mp=P.drawing.Animation)&&(wp.__proto__=mp),((wp.prototype=Object.create(mp&&mp.prototype)).constructor=wp).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,t=o.vertical?m:v,(o=this.fromScale=new P.geometry.Point(1,1))[t]=Zi,e.transform(P.geometry.transform().scale(o.x,o.y))):this.abort()},wp.prototype.step=function(t){var e=gt(this.fromScale.x,1,t),t=gt(this.fromScale.y,1,t);this.element.transform(P.geometry.transform().scale(e,t,this.origin))},wp.prototype.abort=function(){mp.prototype.abort.call(this),this.element.transform(null)},wp);function wp(){mp.apply(this,arguments)}Dt(Qt,{duration:600}),P.drawing.AnimationFactory.current.register(Ji,Qt);var bp,ce=((bp=P.drawing.Animation)&&(_p.__proto__=bp),((_p.prototype=Object.create(bp&&bp.prototype)).constructor=_p).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(P.geometry.transform().scale(Zi,Zi,t))},_p.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.center))},_p);function _p(){bp.apply(this,arguments)}Dt(ce,{easing:"easeOutElastic"}),P.drawing.AnimationFactory.current.register("bubble",ce);var Ap,wt=((Ap=P.drawing.Animation)&&(Cp.__proto__=Ap),((Cp.prototype=Object.create(Ap&&Ap.prototype)).constructor=Cp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Cp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},Cp);function Cp(){Ap.apply(this,arguments)}Dt(wt,{duration:200,easing:"linear"}),P.drawing.AnimationFactory.current.register("fadeIn",wt);var Sp,be=((Sp=P.drawing.Animation)&&(kp.__proto__=Sp),((kp.prototype=Object.create(Sp&&Sp.prototype)).constructor=kp).prototype.setup=function(){this.element.transform(P.geometry.transform().scale(Zi,Zi,this.options.center))},kp.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.options.center))},kp);function kp(){Sp.apply(this,arguments)}Dt(be,{easing:"easeOutElastic",duration:600}),P.drawing.AnimationFactory.current.register(or,be);var Pp,Mp=be,ve=((Pp=Wn)&&(Tp.__proto__=Pp),((Tp.prototype=Object.create(Pp&&Pp.prototype)).constructor=Tp).prototype.render=function(){Pp.prototype.render.call(this),this.renderSegments()},Tp.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Lr:Pr)(t,e,o)},Tp.prototype.animationPoints=function(){return Pp.prototype.animationPoints.call(this).concat(this._segments)},Tp.prototype.createMissingValue=function(t,e){if(e===Ki){t={x:t.x,y:t.y};return Un(t.x)||(t.x=0),Un(t.y)||(t.y=0),t}},Tp);function Tp(){Pp.apply(this,arguments)}j(ve.prototype,Yt);var Bp,Rp=ve,N=((Bp=zs)&&(Op.__proto__=Bp),((Op.prototype=Object.create(Bp&&Bp.prototype)).constructor=Op).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new tn,this.yAxisRangeTracker=new tn},Op.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(Ss(r,"scatter"),i),this.createScatterLineChart(Ss(r,"scatterLine"),i),this.createBubbleChart(Ss(r,"bubble"),i))}this.createAxes(t)},Op.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Bp.prototype.appendChart.call(this,t,e)},Op.prototype.removeAxis=function(t){var e=t.options.name;Bp.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},Op.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=ht([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=ht([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Op.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Wn(this,{series:t,clip:e.options.clip}),e)},Op.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Rp(this,{series:t,clip:e.options.clip}),e)},Op.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Kn(this,{series:t,clip:e.options.clip}),e)},Op.prototype.createXYAxis=function(t,e,o){for(var i,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=Cs(a.type,"log"),h=s.query(),t=p?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||h||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],g=d[e?"yAxis":"xAxis"];if(g===a.name||0===o&&!g){d=Xi.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===o&&h&&(t.min=Math.min(t.min,h.min),t.max=Math.max(t.max,h.max));for(var f=0;f<l.length;f++)if(l[f]instanceof Date){i=!0;break}t=new(Cs(a.type,y)||!a.type&&i?pi:p?di:ni)(t.min,t.max,a,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t},Op.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)dt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)dt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},Op.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Jt(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(o,{element:Pt(e),originalEvent:e,x:Ms(a),y:Ms(p)})},Op.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);Ip(this.options,t,o,e),Ip(this.originalOptions,t,o,e)},Op);function Op(){Bp.apply(this,arguments)}function Ip(t,e,o,i){j([].concat(o?t.yAxis:t.xAxis)[e],i)}Dt(N,{xAxis:{},yAxis:{}}),j(N.prototype,Es);var Lp,Vp=N,Se=((Lp=we)&&(zp.__proto__=Lp),((zp.prototype=Object.create(Lp&&Lp.prototype)).constructor=zp).prototype.render=function(){var t,e,o=this.options.labels,i=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,t=nt(o),e=this.pointData(),t?r=t(e):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===A||"insideEnd"===o.position?(o.color||(o.color=Nt(this.options.color)),o.background||(o.background=this.options.color)):(i=i.theme.seriesDefaults.labels,o.color=o.color||i.color,o.background=o.background||i.background),this.label=new Ge(r,j({},o,{align:A,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),e),this.append(this.label)))},zp.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},zp.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===A?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new ie(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new ie(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(i=t.x+o,n.orientation=S):(i=t.x-o,n.orientation=C),n.reflow(new ie(i,t.y-e,t.x,t.y))))},zp.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Lp.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(i=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new P.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:t,endAngle:t+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new P.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(i)):this.createSegmentVisual(this.visual))},zp.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},r=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,i={color:n,opacity:o.opacity},r=this.createSegment(e,j({fill:i,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(r),an(o)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:i},j({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},zp.prototype.createSegment=function(t,e){return e.singleSegment?new P.drawing.Circle(new P.geometry.Circle(new P.geometry.Point(t.center.x,t.center.y),t.radius),e):ye.current.createRing(t,e)},zp.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;j(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Lp.prototype.createAnimation.call(this)},zp.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,j({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},zp.prototype.highlightVisual=function(){return this.visual.children[0]},zp.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new P.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},zp.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Ot(e+180),e=It(Math.sin(t),f),t=It(Math.cos(t),f),{horizontal:Math.abs(e)>Dp?A:t<0?S:C,vertical:Math.abs(e)<jp?A:e<0?_:k})}},zp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},zp.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},zp),jp=It(Ot(30),f),Dp=It(Ot(60),f);function zp(t,e,o){Lp.call(this,o),this.value=t,this.sector=e}Dt(Se,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:U(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:or},highlight:{visible:!0,border:{width:1}},visible:!0}),j(Se.prototype,_r);var Ep,Hp=Se,Up={createLegendItem:function(t,e,o){var i,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},p=a.labels||{};o&&!1!==o.visibleInLegend&&(n=!(r=!1!==o.visible)&&nt(p)||nt(s),s=o.category,n&&(s=n({text:s,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:p.color,font:p.font},(a.markers||{}).color),Un(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:o.index,text:s,series:o.series,markerColor:a,labels:i}))}},q=((Ep=we)&&(Fp.__proto__=Ep),((Fp.prototype=Object.create(Ep&&Ep.prototype)).constructor=Fp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Fp.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=As(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0;isFinite(u)||(d=360/h);var g=void 0,g=(At(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=A);for(var f=0;f<c.length;f++){var y,v,m,x,w,b=c[f];b&&(y=b.fields,v=b.value,m=b.visible,x=0!==v?d||v*u:0,w=1!==p.length&&Boolean(y.explode),I(a.color)||(a.color=y.color||o[f%i]),t(b.valueFields.value,new he(null,0,0,g,x),{owner:this,category:At(y.category)?y.category:"",index:f,series:a,seriesIx:s,dataItem:p[f],percentage:0!==l?v/l:0,explode:w,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(f,s,n)}),!1!==m&&(g+=x))}}},Fp.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;yr(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Fp.prototype.addValue=function(t,e,o){var i=j({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(i=new Hp(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},Fp.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs;void 0===i&&(i=[]);var r=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new ie(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],p=Vt(e.padding,p);this.targetBox=t,p=a-5<p?a-5:p,h.translate(n.x-s.x,n.y-s.y);for(var d=a-p,g=new Jt(d+h.x1+p,d+h.y1+p),f=0;f<r;f++){var y,v=o[f],m=v.sector,x=v.seriesIx;m.radius=d,m.center=g,i.length&&(y=i[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(h);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===S?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Fp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Fp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Fp.prototype.distanceBetweenLabels=function(t){var e=Tt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=It(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var p=t[a+1].box,n=t[a].box,s=It(p.y1-n.y2);r.push(s)}return s=It(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Fp.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;0<r&&(0<=o||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},Fp.prototype._takeDistance=function(t,e,o,i){var r=i;return 0<t[o]&&(r-=i=Math.min(t[o],r),t[o]-=i,t[e]+=i),r},Fp.prototype.reflowLabels=function(t,e){var o,i=Tt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var l=e[h],c=l.box;p+=t[h],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===S),l.orientation===S?(n.align!==u&&(o=r.radius+r.center.x+a),l.reflow(new ie(o+c.width(),p,o,p))):(n.align!==u&&(o=r.center.x-r.radius-a),l.reflow(new ie(o-c.width(),p,o,p))),p+=c.height()}},Fp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Ep.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,p,h,l,c=e[i],u=c.sector,d=c.label,g=u.middle(),f=(c.options.connectors||{}).color||t.color;d&&(r=new P.drawing.Path({stroke:{color:f,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(g),a=new Jt(n.x1,n.center().y),f=h=p=void 0,l=u.clone().expand(t.padding).point(g),r.moveTo(l.x,l.y),d.orientation===S?(f=Gp(s,l,a,h=new Jt(n.x1-t.padding,n.center().y)),a=new Jt(h.x-4,h.y),(f=f||a).x=Math.min(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x<u.center.x?(p=u.center.x+u.radius+4,c.options.labels.align===tr||p<a.x?r.lineTo(p,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))):(f=Gp(s,l,a,h=new Jt(n.x2+t.padding,n.center().y)),a=new Jt(h.x+4,h.y),(f=f||a).x=Math.max(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x>u.center.x?(p=u.center.x-u.radius-4,c.options.labels.align===tr||p>a.x?r.lineTo(p,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))),r.lineTo(h.x,h.y),this._connectorLines.push(r),this.visual.append(r)))}},Fp.prototype.renderVisual=function(){var t,e,o,i;Ep.prototype.renderVisual.call(this),Et(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(o=this.visual.bbox())&&(i=o.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1&&this.visual.transform(P.geometry.transform().scale(i,i,[e.x,e.y]))))},Fp.prototype.labelComparator=function(t){var o=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*o}},Fp.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,e=s.x,s=s.y,i=Math.min(Math.abs(s-o),Math.abs(s-i));return n<i?t:e+Math.sqrt(n*n-i*i)*(r?1:-1)},Fp.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)},Fp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Fp.prototype.animationDelay=function(t){return 70*t},Fp.prototype.stackRoot=function(){return this},Fp);function Fp(t,e){Ep.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Gp(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),o=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return r=0!=o?new Jt(t.x+(o=n/o)*(e.x-t.x),t.y+o*(e.y-t.y)):r}Dt(q,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),j(q.prototype,Up),q.prototype.isStackRoot=!0;var Np,Wp,Xp=q,Yp=((Wp=zs)&&(Qp.__proto__=Wp),((Qp.prototype=Object.create(Wp&&Wp.prototype)).constructor=Qp).prototype.render=function(){this.createPieChart(this.series)},Qp.prototype.createPieChart=function(t){var e=t[0],e=new Xp(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},Qp.prototype.appendChart=function(t,e){Wp.prototype.appendChart.call(this,t,e),bt(this.options.legend.items,t.legendItems)},Qp),Y=((Np=Hp)&&(qp.__proto__=Np),((qp.prototype=Object.create(Np&&Np.prototype)).constructor=qp).prototype.reflowLabel=function(){var t,e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();o&&(t=o.box.height(),e.position===A?(i.radius-=(i.radius-i.innerRadius)/2,r=i.point(r),o.reflow(new ie(r.x,r.y-t/2,r.x,r.y))):Np.prototype.reflowLabel.call(this))},qp.prototype.createSegment=function(t,e){return ye.current.createRing(t,e)},qp);function qp(){Np.apply(this,arguments)}function Qp(){Wp.apply(this,arguments)}Dt(Y,{overlay:{gradient:"roundedGlass"},labels:{position:A},animation:{type:or}}),j(Y.prototype,_r);var Zp,Kp=Y,K=((Zp=Xp)&&($p.__proto__=Zp),(($p.prototype=Object.create(Zp&&Zp.prototype)).constructor=$p).prototype.addValue=function(t,e,o){var i=j({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(i=new Kp(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},$p.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),r=Math.min(i.width(),i.height()),i=r/2,n=o.series,s=n.length,r=Vt(o.padding,r-.85*r),a=i-(r=i-5<r?i-5:r),p=0,h=0;h<s;h++){var l=n[h];0===h&&At(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),At(l.size)?a-=l.size:p++,At(l.margin)&&h!==s-1&&(a-=l.margin)}At(e)||(a-=e=(i-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var g=n[d],f=(c+=u)+Vt(g.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:f}),u=g.margin||0,c=f}Zp.prototype.reflow.call(this,t)},$p.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},$p);function $p(){Zp.apply(this,arguments)}Dt(K,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Jp,th,eh,oh=K,ih=((eh=Yp)&&(sh.__proto__=eh),((sh.prototype=Object.create(eh&&eh.prototype)).constructor=sh).prototype.render=function(){this.createDonutChart(this.series)},sh.prototype.createDonutChart=function(t){var e=t[0],e=new oh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},sh),Z=((th=zs)&&(nh.__proto__=th),((nh.prototype=Object.create(th&&th.prototype)).constructor=nh).prototype.initFields=function(){this.valueAxisRangeTracker=new tn},nh.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},nh.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,e=t.getSlot(o),o=this.polarAxis.getSlot(0).center,e=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(e)},nh.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=Si,{min:.1,max:1}):(t=Ai,{min:0,max:1}),r=e.query(name)||o||r;r&&o&&(r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max));i=new t(r.min,r.max,i,this.chartService);this.valueAxis=i,this.appendAxis(i)},nh.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),r=U(t.padding||{},r),i=i.clone().unpad(r),r=i.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(i,m,A);i=r.clone().shrink(0,r.height()/2);o.reflow(r),e.reflow(i);i=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:i})),this.axisBox=r,this.alignAxes(r)},nh.prototype.backgroundBox=function(){return this.box},nh.prototype.detachLabels=function(){},nh),it=((Jp=Wn)&&(rh.__proto__=Jp),((rh.prototype=Object.create(Jp&&Jp.prototype)).constructor=rh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Jt.onCircle(t.center,t.startAngle,e);return new ie(e.x,e.y,e.x,e.y)},rh);function rh(){Jp.apply(this,arguments)}function nh(){th.apply(this,arguments)}function sh(){eh.apply(this,arguments)}Dt(it,{clip:!1});var ah,ph=it,ft=((ah=Rp)&&(hh.__proto__=ah),(hh.prototype=Object.create(ah&&ah.prototype)).constructor=hh);function hh(){ah.apply(this,arguments)}ft.prototype.pointSlot=ph.prototype.pointSlot,Dt(ft,{clip:!1});var lh,ch,uh=ft,dh=((ch=$r)&&(yh.__proto__=ch),((yh.prototype=Object.create(ch&&ch.prototype)).constructor=yh).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},yh.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},yh.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Ti(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},yh),gh=((lh=Nr)&&(fh.__proto__=lh),((fh.prototype=Object.create(lh&&lh.prototype)).constructor=fh).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new P.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},fh);function fh(){lh.apply(this,arguments)}function yh(){ch.apply(this,arguments)}function vh(t,e){return t.value.x-e.value.x}var mh,xh,wh=((xh=uh)&&(_h.__proto__=xh),((_h.prototype=Object.create(xh&&xh.prototype)).constructor=_h).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?dh:gh)(t,e,o)},_h.prototype.createMissingValue=function(t,e){var o;return Un(t.x)&&e!==$i&&(o={x:t.x,y:t.y},e===Ki&&(o.y=0)),o},_h.prototype.seriesMissingValues=function(t){return t.missingValues||Ki},_h.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},_h.prototype.sortPoints=function(t){if(t.sort(vh),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Un(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t},_h),G=((mh=Z)&&(bh.__proto__=mh),((bh.prototype=Object.create(mh&&mh.prototype)).constructor=bh).prototype.createPolarAxis=function(){var t=new mi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},bh.prototype.valueAxisOptions=function(t){return j(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},bh.prototype.createValueAxis=function(){mh.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},bh.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),zs.prototype.appendChart.call(this,t,e)},bh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Ss(t,["polarLine"]),e),this.createScatterChart(Ss(t,["polarScatter"]),e),this.createAreaChart(Ss(t,["polarArea"]),e)},bh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new uh(this,{series:t}),this.appendChart(t,e))},bh.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new ph(this,{series:t}),this.appendChart(t,e))},bh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new wh(this,{series:t}),this.appendChart(t,e))},bh.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Jt(i.x,i.y),i=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:Pt(e),x:i,y:r})},bh.prototype.createCrosshairs=function(){},bh);function bh(){mh.apply(this,arguments)}function _h(){xh.apply(this,arguments)}Dt(G,{xAxis:{},yAxis:{}}),j(G.prototype,Es);var Ah,ct=G,Qt=((Ah=Gr)&&(Ch.__proto__=Ah),((Ch.prototype=Object.create(Ah&&Ah.prototype)).constructor=Ch).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Jt.onCircle(t.center,t.middle(),e);return new ie(e.x,e.y,e.x,e.y)},Ch.prototype.renderSegments=function(){if(Ah.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),e=0;e<t.length;e++){var o,i,r,n=t[e];n&&1<n.length&&(o=n[0].linePoints[0],i=Tt(n),r=Tt(i.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&Tt(n).linePoints.push(o))}},Ch.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?Lr:Pr)(t,e,o),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==$i||(i.options.closed=!0),i},Ch);function Ch(){Ah.apply(this,arguments)}Dt(Qt,{clip:!1,limitPoints:!1});var Sh,kh,Ph,Mh,Th=Qt,Bh=((Mh=$r)&&(jh.__proto__=Mh),((jh.prototype=Object.create(Mh&&Mh.prototype)).constructor=jh).prototype.fillToAxes=function(){},jh),Rh=((Ph=Nr)&&(Vh.__proto__=Ph),((Vh.prototype=Object.create(Ph&&Ph.prototype)).constructor=Vh).prototype.fillToAxes=function(){},Vh),Oh=((kh=Th)&&(Lh.__proto__=kh),((Lh.prototype=Object.create(kh&&kh.prototype)).constructor=Lh).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===p?(s=new Bh(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Rh(t,e,o,r,n)),s},Lh.prototype.seriesMissingValues=function(t){return t.missingValues||Ki},Lh),ce=((Sh=Kp)&&(Ih.__proto__=Sh),(Ih.prototype=Object.create(Sh&&Sh.prototype)).constructor=Ih);function Ih(t,e){Sh.call(this,t,null,e)}function Lh(){kh.apply(this,arguments)}function Vh(){Ph.apply(this,arguments)}function jh(){Mh.apply(this,arguments)}Dt(ce,{overlay:{gradient:"none"},labels:{distance:10}});var Dh,zh=ce,wt=((Dh=we)&&(Eh.__proto__=Dh),((Eh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Eh).prototype.reflow=function(o){var t=this.options,e=this.children,i=t.gap,r=t.spacing,t=e.length,n=o.angle/(t+i+r*(t-1)),s=o.startAngle+i/2*n;this.forEach(e,function(t){var e=o.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Eh);function Eh(t){Dh.call(this,t),this.forEach=t.rtl?un:cn}Dt(wt,{gap:1,spacing:0});var Hh,Uh,Fh=wt,Gh=((Uh=we)&&(Wh.__proto__=Uh),((Wh.prototype=Object.create(Uh&&Uh.prototype)).constructor=Wh).prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new ie;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Wh),be=((Hh=_n)&&(Nh.__proto__=Hh),((Nh.prototype=Object.create(Hh&&Hh.prototype)).constructor=Nh).prototype.pointType=function(){return zh},Nh.prototype.clusterType=function(){return Fh},Nh.prototype.stackType=function(){return Gh},Nh.prototype.categorySlot=function(t,e){return t.getSlot(e)},Nh.prototype.pointSlot=function(t,e){var o=t.clone(),t=t.center.y;return o.radius=t-e.y1,o.innerRadius=t-e.y2,o},Nh.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Nh.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Hh.prototype.createAnimation.call(this)},Nh);function Nh(){Hh.apply(this,arguments)}function Wh(){Uh.apply(this,arguments)}be.prototype.reflow=br.prototype.reflow,Dt(be,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Xh,Yh=be,Yt=((Xh=Z)&&(qh.__proto__=Xh),((qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=qh).prototype.createPolarAxis=function(){var t=new yi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},qh.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&j(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&j(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),j(t,this.options.valueAxis)},qh.prototype.aggregateCategories=function(){Ia.prototype.aggregateCategories.call(this,this.panes)},qh.prototype.createCategoryAxesLabels=function(){Ia.prototype.createCategoryAxesLabels.call(this,this.panes)},qh.prototype.filterSeries=function(t){return t},qh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Ss(t,["radarArea"]),e),this.createLineChart(Ss(t,["radarLine"]),e),this.createBarChart(Ss(t,["radarColumn"]),e)},qh.prototype.chartOptions=function(t){var e={series:t},o=t[0];return o&&(t=this.filterVisibleSeries(t),o=o.stack,e.isStacked=o&&1<t.length,e.isStacked100=o&&"100%"===o.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},qh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Oh(this,this.chartOptions(t)),this.appendChart(t,e))},qh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Th(this,this.chartOptions(t)),this.appendChart(t,e))},qh.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,t=new Yh(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},qh.prototype.seriesCategoryAxis=function(){return this.categoryAxis},qh.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Jt(i.x,i.y),i=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:Pt(e),category:i,value:r})},qh.prototype.createCrosshairs=function(){},qh);function qh(){Xh.apply(this,arguments)}j(Yt.prototype,Es,{appendChart:Ia.prototype.appendChart,aggregateSeries:Ia.prototype.aggregateSeries,seriesSourcePoints:Ia.prototype.seriesSourcePoints}),Dt(Yt,{categoryAxis:{categories:[]},valueAxis:{}});var Qh,ve=Yt,N=((Qh=we)&&(Zh.__proto__=Qh),((Zh.prototype=Object.create(Qh&&Qh.prototype)).constructor=Zh).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new ie(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new ie(t.x1,e[0].y,t.x2,e[2].y))},Zh.prototype.createVisual=function(){var t=this,e=this.options;Qh.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},Zh.prototype.createPath=function(){var t=this.options,e=t.border;return P.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Zh.prototype.createHighlight=function(t){return P.drawing.Path.fromPoints(this.points,t)},Zh.prototype.highlightVisual=function(){return this.visual.children[0]},Zh.prototype.highlightVisualArgs=function(){var t=P.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Zh.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Jt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Zh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Zh);function Zh(t,e,o){Qh.call(this,e),this.value=t,this.options.index=o.index}Dt(N,{color:a,border:{width:1}}),j(N.prototype,_r);var Kh,$h=N,Se=((Kh=we)&&(Jh.__proto__=Kh),((Jh.prototype=Object.create(Kh&&Kh.prototype)).constructor=Jh).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Jh.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var t=As(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(p=h.fields,I(o.color)||(o.color=p.color||e[s%e.length]),p=j({index:s,owner:this,series:o,dataItem:i[s],percentage:h.value/r},p,{visible:h.visible}),a=h.valueFields.value,h=this.createSegment(a,p),p=this.createLabel(a,p),h&&p&&h.append(p))}},Jh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;yr(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},Jh.prototype.createSegment=function(t,e){var o=j({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){o=new $h(t,o,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},Jh.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=j({},this.options.labels,o.labels),n=t;if(r.visible){var s=nt(r),i={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(i):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=Nt(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);i=new Ge(n,j({vAlign:r.position},r),i);return this.labels.push(i),i}},Jh.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i,r=t[o].options.align;r!==A&&(i=t[o].box.width(),r===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},Jh.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=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 d=r[u].percentage,g=r[u+1],f=g?g.percentage:d,y=r[u].points=[],v=i.dynamicHeight?o*d:o/n,g=Bt(d?(e-h*(f/d))/2:f?0:e/2,0,e);y.push(new P.geometry.Point(t.x1+l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-g,t.y1+v+c)),y.push(new P.geometry.Point(t.x1+g,t.y1+v+c)),c+=v+i.segmentSpacing,h=Bt(e-2*(l=g),0,e)}},Jh.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,p=s?0:(e-e/i.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,g=i.dynamicHeight?h*d:h/n,d=i.dynamicHeight?o*d:o/n;u.push(new P.geometry.Point(t.x1+p,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-p-g,t.y1+d+l)),u.push(new P.geometry.Point(t.x1+p+g,t.y1+d+l)),p+=g,l+=d+i.segmentSpacing}},Jh.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},Jh);function Jh(t,e){Kh.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}Dt(Se,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:A,position:A,zIndex:1}}),j(Se.prototype,Up);var tl,el,ol=Se,q=((el=zs)&&(rl.__proto__=el),((rl.prototype=Object.create(el&&el.prototype)).constructor=rl).prototype.render=function(){this.createFunnelChart(this.series)},rl.prototype.createFunnelChart=function(t){var e=t[0],e=new ol(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(e)},rl.prototype.appendChart=function(t,e){el.prototype.appendChart.call(this,t,e),bt(this.options.legend.items,t.legendItems)},rl),Y=((tl=we)&&(il.__proto__=tl),((il.prototype=Object.create(tl&&tl.prototype)).constructor=il).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},il.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=nt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Nt(this.color),this.label=new Ge(e,j({align:A,vAlign:A,margin:{left:5,right:5},zIndex:Vt(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},il.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},il.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())},il.prototype.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i="roundedRect"===Vt(t.type,"rect"),r=Vt(e.width,i?1:0),e=Math.round(r/2);return t.size&&(i=o.center(),o.size.width=o.size.height=t.size,o.origin.x=Math.round(i.x-o.size.width/2),o.origin.y=Math.round(i.y-o.size.height/2)),o.size.width-=r,o.size.height-=r,o.origin.y+=e+.5,o.origin.x+=e+.5,Ee(o)},il.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=Vt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},il.prototype.createMarker=function(){var t=this.options,e=t.markers,t=new Pe({type:Vt(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:Vt(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=t,this.append(t)},il.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,e=new Pe({type:Vt(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:Vt(e.zIndex,this.series.zIndex)});e.reflow(this.markerBox());e=e.getElement();return e.options.fill=t.fill,e.options.stroke=t.stroke,e},il.prototype.highlightVisual=function(){return this.rectVisual},il.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},il.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Jt(t,e),align:{horizontal:A,vertical:_}}},il.prototype.overlapsBox=function(t){return this.box.overlaps(t)},il.prototype.unclipElements=function(){},il.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},il);function il(t,e){tl.call(this),this.options=e,this.color=e.color||a,this.value=t}function rl(){el.apply(this,arguments)}j(Y.prototype,_r),j(Y.prototype,tt),Y.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var nl,sl=Y,K=((nl=we)&&(al.__proto__=nl),((al.prototype=Object.create(nl&&nl.prototype)).constructor=al).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:l,max:c},this._evalSeries=[]},al.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},al.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value)}},al.prototype.addValue=function(t,e){var o;t&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},al.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r];At(s)||(this._evalSeries[r]=s=yr(t,{},n,!0));r=t;return s&&yr(r=j({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},al.prototype.pointType=function(){return sl},al.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(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)),i},al.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),r=I(o.color)?i.color:function(t,e){void 0===e&&(e=.05);var i=Object(P.parseColor)(t),r=1-e;return function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}}(r)(t.value/this.valueRange.max),i=new sl(t,i);return i.color=r,this.append(i),i},al.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:t,yAxis:i}},al.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var o=s[p++],i=n.seriesAxes(e.series),r=i.xAxis,e=i.yAxis,i=r.categoryIndex(t.x),t=e.categoryIndex(t.y),i=r.getSlot(i,i,a),t=e.getSlot(t,t,a);o&&(i&&t?(t=n.pointSlot(i,t),o.reflow(t)):o.visible=!1)}),this.box=t},al.prototype.pointSlot=function(t,e){return new ie(t.x1,e.y1,t.x2,e.y2)},al.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var l=this._bindPoint(i,o,h),c=l.valueFields,u=l.fields,d=n.totalIndex(c.x),l=s.totalIndex(c.y),d=a.min<=d&&d<=a.max,l=p.min<=l&&l<=p.max;d&&l&&t(c,j({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},u))}},al.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},al.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},al);function al(t,e){nl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}Dt(K,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),j(K.prototype,{_bindPoint:br.prototype._bindPoint});var pl,hl=K,it=((pl=zs)&&(ll.__proto__=pl),((ll.prototype=Object.create(pl&&pl.prototype)).constructor=ll).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},ll.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},ll.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=Zt(n.categories||[]),a=Zt(r.categories||[]),p=0;p<i.length;p++){var h=Xi.current.bindPoint(o,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},ll.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&this.createHeatmapChart(Ss(r,["heatmap"]),i)}},ll.prototype.createHeatmapChart=function(t,e){t=new hl(this,{series:t});this.appendChart(t,e)},ll.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=ht([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=ht([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},ll.prototype.seriesAxes=function(t){var e=this.options,o=[].concat(e.xAxis),i=t.xAxis,o=i?o.find(function(t){return t.name===i}):o[0],e=[].concat(e.yAxis),r=t.yAxis,e=r?e.find(function(t){return t.name===r}):e[0];if(!o)throw new Error("Unable to locate X axis with name "+i);if(!e)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:o,yAxis:e}},ll.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},ll.prototype.createXYAxis=function(t,e,o){for(var i,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}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){l=Xi.current.bindPoint(l,0).valueFields;a.push(l[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(Cs(s.type,y)||!s.type&&i?Zo:Ho)(s,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.mapCategories(),t},ll.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)dt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)dt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},ll.prototype.removeAxis=function(t){var e=t.options.name;pl.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},ll.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Jt(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];bs(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(o,{element:Pt(e),originalEvent:e,x:Ms(a),y:Ms(p)})},ll.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);cl(this.options,t,o,e),cl(this.originalOptions,t,o,e)},ll.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},ll);function ll(){pl.apply(this,arguments)}function cl(t,e,o,i){j([].concat(o?t.yAxis:t.xAxis)[e],i)}Dt(it,{xAxis:{},yAxis:{}}),j(it.prototype,Es);ft=it,G="color",Qt="first",ce="max";ap.current.register(Ia,[Ji,tr,er,ir,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),ap.current.register(Vp,["scatter","scatterLine","bubble"]),ap.current.register(Yp,[or]),ap.current.register(ih,["donut"]),ap.current.register(q,["funnel"]),ap.current.register(ct,["polarArea","polarLine","polarScatter"]),ap.current.register(ve,["radarArea","radarColumn","radarLine"]),ap.current.register(ft,["heatmap"]),Xi.current.register([Ji,tr,er,ir,"area","verticalArea"],[h],["category",G,"noteText","errorLow","errorHigh"]),Xi.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",G,"noteText"]),Xi.current.register(["waterfall","horizontalWaterfall"],[h],["category",G,"noteText","summary"]),Xi.current.register(["polarArea","polarLine","polarScatter"],[v,m],[G]),Xi.current.register(["radarArea","radarColumn","radarLine"],[h],[G]),Xi.current.register(["funnel"],[h],["category",G,"visibleInLegend","visible"]),Xs.current.register([Ji,tr,er,ir,"area","verticalArea","waterfall","horizontalWaterfall"],{value:ce,color:Qt,noteText:Qt,errorLow:"min",errorHigh:ce}),Xs.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:ce,color:Qt,noteText:Qt}),Xs.current.register(["radarArea","radarColumn","radarLine"],{value:ce,color:Qt}),Xi.current.register(["scatter","scatterLine","bubble"],[v,m],[G,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Xi.current.register(["bubble"],[v,m,"size"],[G,"category","noteText"]),Xi.current.register(["heatmap"],[v,m,h],[G,"noteText"]),Xi.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",G,"downColor","noteText"]),Xs.current.register(["candlestick","ohlc"],{open:ce,high:ce,low:"min",close:ce,color:Qt,downColor:Qt,noteText:Qt}),Xi.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",G,"noteText"]),Xs.current.register(["boxPlot","verticalBoxPlot"],{lower:ce,q1:ce,median:ce,q3:ce,upper:ce,mean:ce,outliers:Qt,color:Qt,noteText:Qt}),Xi.current.register(["bullet","verticalBullet"],["current","target"],["category",G,"visibleInLegend","noteText"]),Xs.current.register(["bullet","verticalBullet"],{current:ce,target:ce,color:Qt,noteText:Qt}),Xi.current.register([or,"donut"],[h],["category",G,"explode","visibleInLegend","visible"]);var ul,dl=["category",h,v,m],wt=((ul=P.Class)&&(gl.__proto__=ul),((gl.prototype=Object.create(ul&&ul.prototype)).constructor=gl).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},gl.prototype._setElementClass=function(t){p(t,"k-chart")},gl.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o,function(t){for(var e=dl,o=0;o<e.length;o++){var i=e[o]+"Axes";t[i]&&(t[e[o]+"Axis"]=t[i],delete t[i])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=j({},e,t),this.applySeriesColors()},gl.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)}},gl.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=0<e.width||0<e.height;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&Et(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},gl.prototype._resize=function(){this._noTransitionsRedraw()},gl.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},gl.prototype.getAxis=function(t){return Ii(t,this._plotArea.axes)},gl.prototype.findAxisByName=function(t){return this.getAxis(t)},gl.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Vi(e[o])},gl.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Vi(e[t])},gl.prototype.plotArea=function(){return new ji(this._plotArea)},gl.prototype.toggleHighlight=function(t,e){var o,i=this._plotArea,r=(i.srcSeries||i.series||[])[0],n=I(e)?i.filterPoints(e):(D(e)?(n=e.series,o=e.category):n=o=e,"donut"===r.type?fl(i.pointsBySeriesName(n),o):r.type===or||"funnel"===r.type?fl((i.charts[0]||{}).points,o):i.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},gl.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},gl.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;I(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&At(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(o=this._plotArea.pointsByCategoryIndex(o),r.showAt(o)):e&&r.show(e)},gl.prototype.hideTooltip=function(){this._tooltip.hide()},gl.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&kt(e,{width:o.width}),o.height&&kt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=P.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},gl.prototype._surfaceWrap=function(){return this.element},gl.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 ja,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),wl(this._plotArea.panes),this._navState||this._cancelDomEvents()},gl.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(e=this.options,o=j({},t.options,{chartArea:{width:t.width,height:t.height}}),xl(this._originalOptions,o),this.options=j({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories(),(o=this._getModel()).renderVisual(),wl(o._plotArea.panes),o=o.visual,this.options=e):o=this.surface.exportVisual(),o},gl.prototype._sharedTooltip=function(){return this._plotArea instanceof Ia&&this.options.tooltip&&this.options.tooltip.shared},gl.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ga(this._plotArea,t.pannable))},gl.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Qa(this,e))},gl.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Za(this,e))},gl.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,o=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart",nr,sr])),e=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",ar,pr]),i=this.element;this._dragZoomEnabled&&o&&e?(i.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||o&&e||(i.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!o,!e)},gl.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},gl.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new fp(this.chartService,t)},gl.prototype._createSharedTooltip=function(t){return new xp(this._plotArea,t)},gl.prototype.applyDefaults=function(t,a){!function(t){var o,i,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||i.color,t=j({},r,r[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[o],t}for(var s=0;s<dl.length;s++)i=t.axisDefaults||{},e=(e=[].concat(t[o=dl[s]+"Axis"])).map(n),t[o]=1<e.length?e:e[0]}(t),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=j({},t.seriesDefaults),s=e?j({},e.seriesDefaults):{},a=j({},s);yl(n),yl(a);for(var p=0;p<i;p++){var h=o[p].type||t.seriesDefaults.type,h=j({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);o[p]._defaults=h,o[p]=j({},h,o[p]),o[p].data=o[p].data||[]}}(t,a)},gl.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},gl.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Oe(this._modelOptions());return o.chart=this,o._plotArea=e,Ye.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new np(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},gl.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)},gl.prototype._createPlotArea=function(t){var e=this.options;return ap.current.create(t?[]:e.series,e,this.chartService)},gl.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof Ho&&n.select&&!n.vertical&&(i=r.range(),n=new gp(this,r,j({min:i.min,max:i.max},n.select)),e.push(n))}},gl.prototype._selectStart=function(t){return this.trigger("selectStart",t)},gl.prototype._select=function(t){return this.trigger("select",t)},gl.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},gl.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(P.throttle)(this._mousemove.bind(this),20)},gl.prototype.addObserver=function(t){t&&this.observers.push(t)},gl.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},gl.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},gl.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var o=(e.sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},gl.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,_t(e,((t={}).contextmenu=this._clickHandler,t[hr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&_t(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=et.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()},gl.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},gl.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},gl.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},gl.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(pr,{}))},gl.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),o=this._gestureDistance,e=-t.distance/o+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,o={delta:e,axisRanges:vl(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger("zoomStart",o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(ar,o)&&i.zoom())))},gl.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},gl.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",nr,sr])&&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:vl(this._plotArea.axes),originalEvent:t}))},gl.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger(nr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];!p.options.name||0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(nr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},gl.prototype._end=function(t){var e,o;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(sr,{axisRanges:vl(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,sr),this._zoomSelection&&(o=this._zoomSelection.end(t))&&!this.trigger(ar,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(pr,{axisRanges:o,originalEvent:t})))},gl.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),o=this._plotArea.paneByPoint(t);if(o)for(var i=0;i<e.length;i++)if(e[i].onPane(o))return!0},gl.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Vt(t.rate,.3)},gl.prototype._mousewheel=function(t){var e=this,o=mt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:vl(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=i.updateRanges(o,r),n.axisRanges&&!this.trigger(ar,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(pr,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=!i&&!this._startNavigation(t,r,"zoomStart")?this._navState:i){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(ar,{delta:o,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,pr)},150)}}},gl.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),e=i.axes.slice(0);r&&(i=vl(e),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:r,axes:e}))},gl.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},gl.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},gl.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),i=o&&(i=i.closest(o))&&i.aliasFor?i.aliasFor():i},gl.prototype._eventCoordinates=function(t){t=Mt(t);return this._toModelCoordinates(t.x,t.y)},gl.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=H(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},gl.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=St(this.element);return{left:It(t.x+e.left+o.left),top:It(t.y+e.top+o.top)}},gl.prototype._toModelCoordinates=function(t,e){var o=this.element,i=St(o),r=this._elementPadding(),o=Gt(o).invert(),o=new P.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new Jt(o.x,o.y)},gl.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},gl.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},gl.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},gl.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 zs)}),i=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),t?this._displayInactiveOpacity(o,r):this._highlight.show(o))):!o&&t&&(r&&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},gl.prototype._displayTooltip=function(t){j({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},gl.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);i&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t)):i.supportsPointInactiveOpacity()?(i=this._getInactivePoints(t,i))&&i.length&&this._highlight.show(i,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},gl.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},gl.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},gl.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).over(this,e)},gl.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.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))}},gl.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||i;a&&(a.highlight||{}).visible&&s.visual&&(n=(i||s.series).opacity,a===e&&!o||s.visual.opacity(o?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,o,s.series)}},gl.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},gl.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},gl.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},gl.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},gl.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),_t(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},gl.prototype._mouseMoveTracking=function(t){var e,o=this.options,i=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(j({},o.tooltip,e.options.tooltip).visible&&i.show(e),r.show(e)))):(Lt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},gl.prototype._mousemove=function(t){var e,o=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(o),i.hover&&((e=i.backgroundContainsPoint(o))?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!e&&(this.trigger("plotAreaLeave"),i.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(o,t)},gl.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},gl.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,p,h;this._suppressHover||(i=this.options.tooltip,h=this._plotArea,p=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,h.backgroundContainsPoint(t)?(s=p.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((h=(p=(a=h.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger("seriesHover",h)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},gl.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},gl.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()},gl.prototype._deferRedraw=function(){this._redraw()},gl.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},gl.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},gl.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new ut,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var g=(o=Ps(t,Ui(l.categoryField,u[0])))?ks:Ui,f=0;f<d;f++){var y=u[f],v=g(l.categoryField,y,this.chartService.intl);!o&&s.get(v)||(a.push([v,y]),o||s.set(v,!0))}}0<a.length?(i=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(a=o?function(t){for(var e=function(t,e){void 0===e&&(e=Mo);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(a,t=void 0===t?Mo:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],Tt(i))&&i.push(e[r]);return i}(function(t,e){return Mo(t[0],e[0])}):a),t.categories=i[0]):p&&(t.categories=[])},gl.prototype._isBindable=function(t){for(var e=Xi.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===h?r="field":r+="Field",!At(t[r])){o=!1;break}}return o},gl.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},gl.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=dt(r.type,[or,"donut","funnel"])?t.findPoint(function(t){return t.series.index===e&&t.index===o}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):i.show(n)},gl.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},gl.prototype.updateMouseMoveHandler=function(){var t;Lt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&_t(this.element,((t={}).mousemove=this._mousemove,t))},gl.prototype.applyOptions=function(t,e){xl(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()},gl.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},gl.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},gl.prototype.setIntlService=function(t){this.chartService.intl=t},gl.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},gl.prototype.destroy=function(){var t;this._destroyed=!0,Lt(this.element,((t={}).contextmenu=this._clickHandler,t[hr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Lt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},gl.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},gl.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},gl.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)},gl);function gl(t,e,o,i){var r=this;void 0===i&&(i={}),ul.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new J(this,i),this.chartService.theme=o,this._initElement(t);t=j({},this.options,e);this._originalOptions=j({},t),this._theme=o,this._initTheme(t,o),this._initHandlers(),this._initSurface(),this.bindCategories(),jt.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function fl(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function yl(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 vl(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}var ml=["data","categories"];function xl(t,e){for(var o in e){var i,r,n;!dt(o,ml)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],At(r)&&((n=null===i)||!At(i)?(delete t[o],n&&delete e[o]):r&&D(i)&&D(r)&&xl(r,i)))}}function wl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}Dt(wt,{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 bl,_l=wt,Al=((bl=xp)&&(Sl.__proto__=bl),((Sl.prototype=Object.create(bl&&bl.prototype)).constructor=Sl).prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new Jt(this.plotArea.box.x2,e.center().y):new Jt(e.center().x,-2),align:i}},Sl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Sl),Cl=[Ji,"bullet"];function Sl(){bl.apply(this,arguments)}function kl(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function Pl(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Ml(t){return B(t)?[t]:t}var Tl,be=((Tl=_l)&&(Bl.__proto__=Tl),((Bl.prototype=Object.create(Tl&&Tl.prototype)).constructor=Bl).prototype._setElementClass=function(t){p(t,"k-sparkline")},Bl.prototype._initElement=function(t){Tl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(kt(t).width)},Bl.prototype._resize=function(){var t=this.element,e=kl(t.childNodes);this._initialWidth=Math.floor(kt(t).width),Pl(t.childNodes,e),Tl.prototype._resize.call(this)},Bl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=kl(e.childNodes),i=document.createElement("span");i.innerHTML="&nbsp;",e.appendChild(i);t=j({width:this._autoWidth,height:kt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return kt(e,{width:t.width,height:t.height}),e.removeChild(i),Pl(e.childNodes,o),this.surface&&this.surface.resize(),t},Bl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Bl.prototype._createPlotArea=function(t){t=Tl.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Bl.prototype._calculateWidth=function(t){for(var e=this.options,o=U(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===Ji)return 150;if("bullet"===p.type)return 150;if(p.type===or)return kt(r).height;var h=a.categoryAxis;h&&(a=h.categoriesCount()*(!a.options.isStacked&&dt(p.type,[tr,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=o.left+o.right),e},Bl.prototype._createSharedTooltip=function(t){return new Al(this._plotArea,t)},Bl.normalizeOptions=function(t){t=Ml(t);return(t=x(t)?{seriesDefaults:{data:t}}:j({},t)).series||(t.series=[{data:Ml(t.data)}]),j(t,{seriesDefaults:{type:t.type}}),t=dt(t.series[0].type,Cl)||dt(t.seriesDefaults.type,Cl)?j({},{categoryAxis:{crosshair:{visible:!1}}},t):t},Bl);function Bl(){Tl.apply(this,arguments)}Dt(be,{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 Rl,Ol=be,Il=((Rl=P.drawing.Animation)&&(Ll.__proto__=Rl),((Ll.prototype=Object.create(Rl&&Rl.prototype)).constructor=Ll).prototype.setup=function(){this._initialOpacity=parseFloat(H(this.element,"opacity").opacity)},Ll.prototype.step=function(t){H(this.element,{opacity:String(gt(this._initialOpacity,0,t))})},Ll.prototype.abort=function(){Rl.prototype.abort.call(this),H(this.element,{display:"none",opacity:String(this._initialOpacity)})},Ll.prototype.cancel=function(){Rl.prototype.abort.call(this),H(this.element,{opacity:String(this._initialOpacity)})},Ll);function Ll(){Rl.apply(this,arguments)}function Vl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var jl,Z=((jl=P.Class)&&(Dl.__proto__=jl),((Dl.prototype=Object.create(jl&&jl.prototype)).constructor=Dl).prototype.createElements=function(){var t=this.element=Vl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Vl("k-tooltip k-chart-tooltip"),o=this.scroll=Vl("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(o)},Dl.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Ao(Bo(t)+Bo(e-t)/2),p=.4*o.width(),h=o.center().x-p,l=(o.center().x-h)/(r.max-r.min),c=a-r.min,a=this.chartService.intl.format(r.format,t,e),r=nt(r);this.clearHideTimeout(),this._visible||(H(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,H(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});s=H(s,["marginTop","borderTopWidth","height"]);H(n,{width:p,left:h+c*l,top:o.y1+s.marginTop+s.borderTopWidth+s.height/2}),H(i,{visibility:"visible"})},Dl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Dl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Il(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},Dl.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},Dl);function Dl(t,e,o){jl.call(this),this.options=j({},this.options,o),this.container=t,this.chartService=e;e=H(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}Dt(Z,{format:"{0:d} - {1:d}",hideDelay:500});var zl=Z,El="_navigator",Hl=El;function Ul(){}var Fl,Gl,Nl=((Gl=P.Class)&&(Xl.__proto__=Gl),((Xl.prototype=Object.create(Gl&&Gl.prototype)).constructor=Xl).prototype.parseDate=function(t){return Vo(this.chart.chartService.intl,t)},Xl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Xl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Xl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Xl.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,n=i.max,s=e.select,a=s.from,p=s.to,i=s.mousewheel,s=(Ul.prototype=o,new Ul);0!==o.categoriesCount()&&(this.clean(),s.box=o.box,this.selection=new gp(t,s,{min:r,max:n,from:a||r,to:p||n,mousewheel:Vt(i,{zoom:"left"}),visible:e.visible},new yt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new zl(t.element,t.chartService,{min:r,max:n,template:nt(e.hint),format:e.hint.format})))},Xl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Hl].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e,t=i.to||o;this.options.select=j({},i,{from:r=r<e?e:r,to:t=o<t?o:t}),this.filterAxes()},Xl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Tt(e.panes),t)},Xl.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)},Xl.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),i=r.pane.box.containsPoint(i),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!i&&o&&(e=e.from&&e.to?Bo(e.to)-Bo(e.from):Bo(o.options.to)-Bo(o.options.from),t=Ao(Bt(Bo(t.min),n.min,Bo(n.max)-e)),n=Ao(Bt(Bo(t)+e,Bo(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(t,n),this.showHint(t,n))},Xl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Xl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,t=this.options.select;t.from=e,t.to=o},Xl.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,o=(t=void 0===t?{}:t).from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==El&&(n.min=o,n.max=i)}},Xl.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:i.from,to:i.to},"category"!==t.options.type&&(o=new Zo(j({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,e.from=So(o.min,-o.baseUnitStep,o.baseUnit),e.to=So(o.max,o.baseUnitStep,o.baseUnit)),this.chart.trigger("navigatorFilter",e))},Xl.prototype._zoom=function(t){var e,o=this.chart._plotArea.categoryAxis,i=this.selection,r=this.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),p=t.delta;i&&(e=a.categoryIndex(i.options.from),r=a.categoryIndex(i.options.to),a=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(p)&&(p*=3),1<r-e?(i.zoom(p,a),this.readSelection()):(o.options.min=n.from,n.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),a).min),s&&(this.filterAxes(),this.redrawSlaves()),i.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to))},Xl.prototype._zoomEnd=function(t){this._dragEnd(t)},Xl.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},Xl.prototype._selectStart=function(t){return this.chart._selectStart(t)},Xl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Xl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Xl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Hl]},Xl.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}},Xl.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=j({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=j({},o.pane,{name:El}),o.visible||(r.visible=!1,r.height=.1),i.push(r),Xl.attachAxes(t,o),Xl.attachSeries(t,o,e))},Xl.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),t=0===Ss(o,rr).length,o=j({type:"date",pane:El,roundToBaseUnit:!t,justified:t,_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]}}),t=e.categoryAxis;i.push(j({},o,{maxDateGroups:200},t,{name:Hl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),j({},o,t,{name:Hl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),j({},o,t,{name:Hl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(j({name:Hl,pane:El,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Xl.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(j({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Hl,categoryAxis:Hl,autoBind:e.autoBindElements}))},Xl),Yt=((Fl=_l)&&(Wl.__proto__=Fl),((Wl.prototype=Object.create(Fl&&Fl.prototype)).constructor=Wl).prototype.applyDefaults=function(t,e){var o=kt(this.element).width||600,e=e,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}},e=e&&j({},e,o);Nl.setup(t,e),Fl.prototype.applyDefaults.call(this,t,e)},Wl.prototype._setElementClass=function(t){p(t,"k-chart k-stockchart")},Wl.prototype.setOptions=function(t){this.destroyNavigator(),Fl.prototype.setOptions.call(this,t)},Wl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Wl.prototype._resize=function(){this.noTransitionsRedraw()},Wl.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Wl.prototype._dirty=function(){var t=this.options,e=ht([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},Wl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Nl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Fl.prototype._redraw.call(this),t.initSelection()},Wl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===El?this._unsetActivePoint():Fl.prototype._trackSharedTooltip.call(this,t)},Wl.prototype.bindCategories=function(){Fl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Wl.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Hl?t=i.categories:t&&i.pane===El&&(i.categories=t)}},Wl.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Wl.prototype.destroy=function(){this.destroyNavigator(),Fl.prototype.destroy.call(this)},Wl.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Fl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===El},Wl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Wl);function Wl(){Fl.apply(this,arguments)}function Xl(t){Gl.call(this),this.chart=t;var e=this.options=j({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),At(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new yt(this,((e={})[nr]="_drag",e[sr]="_dragEnd",e[ar]="_zoom",e[pr]="_zoomEnd",e)),t.addObserver(this.chartObserver)}Dt(Yt,{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 Yl=Yt,ql=Math.PI/180;function Ql(t,e){var o=t.getOrigin(),i=t.getSize(),e=U(e);return t.setOrigin([o.x-e.left,o.y-e.top]),t.setSize([i.width+(e.left+e.right),i.height+(e.top+e.bottom)]),t}var Zl=P.drawing.Group,Kl=P.drawing.Path,$l=P.drawing.Text;function Jl(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=Kl.fromRect(new P.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),i=new $l(t.text,new P.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),e=Ql(i.bbox().clone(),e.padding),r=Kl.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new Zl;return n.append(o),n.append(r),n.append(i),n}function tc(t,e,o){var i=At(t.from)?t.from:c,r=At(t.to)?t.to:l;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function ec(t,e){e=U(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Ql(t,e)}var oc,ic=P.drawing.Path,rc=P.drawing.Surface,N=((oc=P.Class)&&(nc.__proto__=oc),((nc.prototype=Object.create(oc&&oc.prototype)).constructor=nc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},nc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},nc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},nc.prototype.exportVisual=function(){return this._visuals},nc.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(x(t))for(var r=0;r<t.length;r++)B(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},nc.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},nc.prototype.resize=function(){this.noTransitionsRedraw()},nc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},nc.prototype.redraw=function(){var t=this._surfaceSize(),t=new P.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=ec(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},nc.prototype.setOptions=function(t,e){this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),this._initTheme(e),this.redraw()},nc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},nc.prototype.setIntlService=function(t){this.contextService.intl=t},nc.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=j({},e,this.options);var t=this.options,o=t.pointer;if(x(o)){for(var i=[],r=0;r<o.length;r++)i.push(j({},e.pointer,o[r]));t.pointer=i}},nc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new P.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=ec(e,o.width)),ic.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},nc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();kt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=rc.create(o,{type:t.renderAs}))},nc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&j(e,t.gaugeArea),e},nc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},nc.prototype.getSize=function(){return this._getSize()},nc.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,t=t.offsetHeight;return{width:o=o||e.width,height:t=t||e.height}},nc.prototype._defaultSize=function(){return{width:200,height:200}},nc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},nc);function nc(t,e,o,i){void 0===i&&(i={}),oc.call(this),this.element=t,this.theme=o,this.contextService=new J(this,i),this._originalOptions=j({},this.options,e),this.options=j({},this._originalOptions),this._initTheme(o),this.redraw()}Dt(N,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var sc=N,ac=P.drawing.Path,pc=P.drawing.Group,hc=P.geometry.Point;function lc(t,e,o,i){var r,n,s,a,p,h=e.length;if(i.visible)for(var l=o.mirror,c=o.lineBox,u=i.skip;u<h;u+=i.step)u%i.skipUnit!=0&&(o.tickX=l?c.x2:c.x2-i.size,o.tickY=l?c.y1-i.size:c.y1,o.position=e[u],t.append((r=i,a=s=n=void 0,p=void 0,s=o.position,a=o.tickX,p=o.tickY,p=o.vertical?(n=new hc(a,s),new hc(a+r.size,s)):(n=new hc(s,p),new hc(s,p+r.size)),new ac({stroke:{color:r.color,width:r.width}}).moveTo(n).lineTo(p))))}var cc,Se=((cc=ni)&&(uc.__proto__=cc),((uc.prototype=Object.create(cc&&cc.prototype)).constructor=uc).prototype.initUserOptions=function(t){t=j({},this.options,t);return(t=j({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Kt(t.min,t.max),t},uc.prototype.initFields=function(){},uc.prototype.render=function(){var t=this.elements=new pc,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},uc.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new pc,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=tc(n[h],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(ac.fromRect(new P.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},uc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new pc,i=0;i<t.length;i++)o.append(Jl(t[i],e.labels));return o},uc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new pc;return 0<t.width&&t.visible&&((t=new ac({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},uc.prototype.renderTicks=function(){var t=new pc,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return lc(t,this.getMajorTickPositions(),i,e.majorTicks),lc(t,this.getMinorTickPositions(),i,j({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},uc);function uc(t,e){t=t||{};!At(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),cc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}Dt(Se,{min:0,max:50,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var dc,gc=Se,tt=((dc=P.Class)&&(fc.__proto__=dc),((fc.prototype=Object.create(dc&&dc.prototype)).constructor=fc).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=At(e._oldValue)?e.value:o,e.value=Bt(t,o,i),this.elements&&this.repaint()},fc);function fc(t,e){dc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=j({},this.options,e);e.fill=e.color,this.scale=t,At(e.value)?e.value=Bt(e.value,i,o):e.value=i}Dt(tt,{color:r});var yc,Y=tt,K=((yc=Y)&&(vc.__proto__=yc),((vc.prototype=Object.create(yc&&yc.prototype)).constructor=vc).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=i.track.size||i.size,n=i.size/2,r=U(i.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(o=new ie(p.x1+r,p.y1,p.x1+r,p.y2),s?o.x1-=h:o.x2+=h,"barPointer"!==i.shape&&(t=e=new ie(p.x2+r,p.y1-n,p.x2+r,p.y2+n))):(o=new ie(p.x1,p.y1-r,p.x2,p.y1-r),s?o.y2+=h:o.y1-=h,"barPointer"!==i.shape&&(t=e=new ie(p.x1-n,p.y1-r,p.x2+n,p.y1-r))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},vc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:At(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},vc.prototype._margin=function(){var t=this.scale,e=this.options,o=t.options,t=o.mirror,o=o.vertical,e=U(e.margin);return o?e[t?"left":"right"]:e[t?"bottom":"top"]},vc);function vc(t,e){yc.call(this,t,e),this.options=j({track:{visible:At(e.track)}},this.options)}Dt(K,{shape:"barPointer",track:{border:{width:1}},color:r,border:{width:1},opacity:1,margin:U(3),animation:{type:"barPointer"},visible:!0});var mc,xc=K,it=((mc=P.drawing.Animation)&&(wc.__proto__=mc),((wc.prototype=Object.create(mc&&mc.prototype)).constructor=wc).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e);o=this.fromScale=new P.geometry.Point(o.x1,o.y1),i=this.toScale=new P.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(o.distanceTo(i)/t.duration*1e3,1))},wc.prototype.step=function(t){var e=gt(this.fromScale.x,this.toScale.x,t),t=gt(this.fromScale.y,this.toScale.y,t);this.element.transform(P.geometry.transform().translate(e,t))},wc);function wc(){mc.apply(this,arguments)}Dt(it,{easing:"linear",duration:250}),P.drawing.AnimationFactory.current.register("arrowPointer",it);var bc,_c,Ac=it,Cc=P.geometry.Point,Sc=P.drawing.Path,kc=((_c=xc)&&(Mc.__proto__=_c),((Mc.prototype=Object.create(_c&&_c.prototype)).constructor=Mc).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new Cc(0,0-o),new Cc(0-i*e,0),new Cc(0,0+o)]:[new Cc(0-o,0),new Cc(0,0+i*e),new Cc(0+o,0)]},Mc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ac(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&&(t.options.duration=0),t.setup(),t.play()},Mc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type="arrowPointer";i=new Sc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),e=t.getSlot(e.value);return i.transform(P.geometry.transform().translate(e.x1,e.y1)),this.elements=i},Mc),q=((bc=P.drawing.Animation)&&(Pc.__proto__=bc),((Pc.prototype=Object.create(bc&&bc.prototype)).constructor=Pc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,o=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-e)/t.speed*1e3,1)),this._set(e)},Pc.prototype.step=function(t){t=gt(this.from,this.to,t);this._set(t)},Pc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Pc);function Pc(){bc.apply(this,arguments)}function Mc(t,e){_c.call(this,t,e),At(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}Dt(q,{easing:"linear",speed:250}),P.drawing.AnimationFactory.current.register("barPointer",q);var Tc,Bc,Rc=q,Oc=P.drawing.Group,Ic=P.drawing.Path,Lc=((Bc=xc)&&(Dc.__proto__=Bc),((Dc.prototype=Object.create(Bc&&Bc.prototype)).constructor=Dc).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,i=e.getSlot(e.options.min),r=e.getSlot(t),o=n?m:v,e=n?v:m,t=this._margin()*s,s=new P.geometry.Point;s[o]=i[o+"1"],s[e]=i[e+"1"];i=new P.geometry.Point;i[o]=r[o+"1"],i[e]=r[e+"1"],n?(s.translate(t,0),i.translate(t,0)):(s.translate(0,t),i.translate(0,t));e=i.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,i,e,t]},Dc.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();o=new Rc(i,j(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},Dc.prototype.render=function(){var t=new Oc,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new Ic({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},Dc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Ic.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},Dc),Vc=P.drawing.Group,ct=((Tc=sc)&&(jc.__proto__=Tc),((jc.prototype=Object.create(Tc&&Tc.prototype)).constructor=jc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,t=new ie(o,i,o+t.width(),i+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},jc.prototype._buildVisual=function(){var t=new Vc,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},jc.prototype._createModel=function(){var t=this.options,e=this.scale=new gc(t.scale,this.contextService);this.pointers=[];for(var o=x(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=j({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?kc:Lc;this.pointers.push(new n(e,r))}},jc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},jc.prototype._getBox=function(t){for(var e,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return n=o.options.vertical?(e=n.width()/2,new ie(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new ie(t.x1,r.y-e,t.x2,r.y+e))},jc.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new ie(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new ie(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},jc.prototype._shrinkScaleWidth=function(t){var e,o=this.scale;o.options.vertical||0<(e=o.contentBox().width()-t.width())&&(o.box.shrink(e,0),o.box.alignTo(t,"center"),o.reflow(o.box))},jc.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},jc);function jc(){Tc.apply(this,arguments)}function Dc(t,e){Bc.call(this,t,e),At(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}Dt(ct,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var zc=ct,Ec=P.drawing.Arc,Hc=P.drawing.Path,Uc=P.drawing.Group;function Fc(t,e,o,i){var r=new Uc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new P.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Hc({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(h))}return r}function Gc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var Nc,ve=((Nc=ni)&&(Wc.__proto__=Nc),((Wc.prototype=Object.create(Nc&&Nc.prototype)).constructor=Wc).prototype.initUserOptions=function(t){t=j({},this.options,t);return t.majorUnit=t.majorUnit||Kt(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Wc.prototype.initFields=function(){},Wc.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Wc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!At(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Wc.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,e=s-n;return(r?s-(t-o)/(i-o)*e:(t-o)/(i-o)*e+n)+180},Wc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Wc.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,t=0;return e.visible&&(t=e.size),t=o.visible?Math.max(o.size,t):t},Wc.prototype.labelsCount=function(){var t=Nc.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Wc.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Uc,s=.05*o;At(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=At(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!h&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,a=U(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,g=0;g<c;g++){var f=l[g],y=f.box.width()/2,v=f.box.height()/2,m=i[g],x=(m-180)*ql,w=e.pointAt(m),m=w.x+Math.cos(x)*(y+u)*(p?1:-1),x=w.y+Math.sin(x)*(v+d)*(p?1:-1);f.reflow(new ie(m-y,x-v,m+y,x+v));m=new P.geometry.Point(f.box.x1,f.box.y1),y=void 0;h?(x=(y=this.labelElements.children[g]).bbox().origin,(v=y.transform()||P.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=Jl(f,t.labels),n.append(y)),this.bbox=P.geometry.Rect.union(this.bbox,y.bbox())}return n},Wc.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,i=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=i+o);for(var r=e+i/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=P.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Wc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Uc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&o.append(this.createRange(h,l,s,p))}}return o},Wc.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,e=new P.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Ec(e,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Wc.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(Gc(r,n,s));for(var a=0;a<o;a++)for(var p=tc(e[a],r,n),h=i.length,l=0;l<h;l++){var c=i[l];if(c.from<=p.from&&p.from<=c.to){i.push(Gc(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(Gc(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},Wc.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-i-o:t.getRadiusX()-o},Wc.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new P.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Wc.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Fc(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new Uc;i.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=o.getRadiusX(),o.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Fc(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},Wc.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;0<=i;i--)i%o==0&&t.splice(i,1);return t},Wc.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),360<=n&&o.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(It(a,3)),a+=p;return It(a)<=t.endAngle&&h.push(a),h},Wc.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)},Wc.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&"outside"===this.options.labels.position&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);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,p=a.y-p[0].anchor().y;t[s].transform((new P.geometry.transform).translate(h,p))}},Wc);function Wc(t,e){Nc.call(this,0,1,t,e)}Dt(ve,{min:0,max:100,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Xc,Yc=ve,ft=((Xc=P.drawing.Animation)&&(qc.__proto__=Xc),((qc.prototype=Object.create(Xc&&Xc.prototype)).constructor=qc).prototype.step=function(t){var e=this.options,t=gt(e.oldAngle,e.newAngle,t);this.element.transform(P.geometry.transform().rotate(t,e.center))},qc);function qc(t,e){Xc.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}Dt(ft,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialPointer",ft);var Qc,Zc=ft,Kc=P.drawing.Circle,$c=P.drawing.Group,Jc=P.drawing.Path,ce=((Qc=Y)&&(tu.__proto__=Qc),((tu.prototype=Object.create(Qc&&Qc.prototype)).constructor=tu).prototype.setAngle=function(t){this.elements.transform(P.geometry.transform().rotate(t,this.center))},tu.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new Zc(this.elements,j(e.animation,{oldAngle:o,newAngle:t})).play()},tu.prototype.render=function(){var t=this.scale,e=this.options,o=new $c;return!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(ql),o},tu.prototype.reflow=function(t){var e=this.center=t.center,o=Bt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(o*this.options.cap.size);this.bbox=P.geometry.Rect.fromPoints(new P.geometry.Point(e.x-o,e.y-o),new P.geometry.Point(e.x+o,e.y+o))},tu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new Jc({fill:{color:o},stroke:{color:o,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},tu.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,t=new P.geometry.Circle(this.center,this.capSize);return new Kc(t,{fill:{color:e},stroke:{color:e}})},tu);function tu(){Qc.apply(this,arguments)}Dt(ce,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var eu,ou=ce,iu=P.drawing.Group,Qt=((eu=sc)&&(ru.__proto__=eu),((ru.prototype=Object.create(eu&&eu.prototype)).constructor=ru).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=P.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},ru.prototype._buildVisual=function(t,e,o){var i=this._visuals=new iu;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},ru.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)}},ru.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=It(a,3),h=It(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=0<e&&0<i?2*p:e<0&&i<0?2*h:It((p+h)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(h=r,i=o):(p=r,e=o)},ru.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=P.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},ru.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},ru.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,o=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=o,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=P.geometry.Rect.union(r.bbox,n[s].bbox)},ru.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Yc(t.scale,this.contextService);this.pointers=[];for(var i=x(e)?e:[e],r=0;r<i.length;r++){var n=new ou(o,j({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},ru);function ru(){eu.apply(this,arguments)}Dt(Qt,{transitions:!0,gaugeArea:{background:""}});var nu,su=Qt,G=((nu=Yc)&&(au.__proto__=nu),((au.prototype=Object.create(nu&&nu.prototype)).constructor=au).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},au.prototype.hasRanges=function(){return!0},au.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},au.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),e=this.slotAngle(i?t:e),o=this.createRange(r,e,this.getRangeRadius(),o);return this.ranges.append(o),o},au);function au(){nu.apply(this,arguments)}Dt(G,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var pu,hu=G,wt=((pu=P.drawing.Animation)&&(lu.__proto__=pu),((lu.prototype=Object.create(pu&&pu.prototype)).constructor=lu).prototype.step=function(t){var e=this.options,o=this.startColor,i=this.color,r=gt(e.oldAngle,e.newAngle,t);this.element.angle(r),i&&(e=It(gt(o.r,i.r,t)),r=It(gt(o.g,i.g,t)),t=It(gt(o.b,i.b,t)),this.element.stroke(new P.Color(e,r,t).toHex()))},lu);function lu(t,e){pu.call(this,t,e);var o=this.options,e=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=Bt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new P.Color(e),this.color=new P.Color(t))}Dt(wt,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialRangePointer",wt);var cu,uu=wt,be=((cu=Y)&&(du.__proto__=cu),((du.prototype=Object.create(cu&&cu.prototype)).constructor=du).prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new uu(this,j(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},du.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},du.prototype.stroke=function(t){this.elements.stroke(t)},du.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).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}))},du.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,i=this.options,r=i.colors,t=i.color,i=i.value,n=B(i)?i:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],p=a.color,h=a.from;void 0===h&&(h=e);a=a.to;if(void 0===a&&(a=o),h<=n&&n<=a)return p}return t},du.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},du);function du(){cu.apply(this,arguments)}Dt(be,{animation:{type:"radialRangePointer",duration:150}});var gu,fu,yu,vu=be,mu=((yu=su)&&(_u.__proto__=yu),((_u.prototype=Object.create(yu&&yu.prototype)).constructor=_u).prototype._initTheme=function(t){yu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},_u.prototype._createModel=function(){var t=this.options,e=this.scale=new hu(t.scale,this.contextService),t=new vu(e,j({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},_u.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},_u.prototype._setValueOptions=function(t){this.options.value=t},_u.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},_u.prototype.centerLabelPosition=function(t,e){var o,i=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<i.width&&(o=n+t,n=Math.max(n,0),o>i.width&&(n-=o-i.width)),e<i.height&&(i=(o=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,o.origin.y),i<e&&(r-=e-i)),{left:n,top:r}},_u),xu=((fu=mu)&&(bu.__proto__=fu),((bu.prototype=Object.create(fu&&fu.prototype)).constructor=bu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,fu.prototype._createModel.call(this)},bu),Z=((gu=P.Class)&&(wu.__proto__=gu),((wu.prototype=Object.create(gu&&gu.prototype)).constructor=wu).prototype.initProperties=function(){},wu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},wu.prototype.encode=function(t,e,o){t=At(t)?String(t):t;return this.initValue(t,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},wu.prototype.initValue=function(){},wu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},wu.prototype.addData=function(){},wu.prototype.invalidCharacterError=function(t){throw new Error("Character '"+t+"' is not valid for symbology "+this.name)},wu);function wu(t){gu.call(this),this.setOptions(t),this.initProperties()}function bu(){fu.apply(this,arguments)}function _u(){yu.apply(this,arguments)}Dt(Z,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Au,Cu=Object.assign,Yt=((Au=Z)&&(Su.__proto__=Au),((Su.prototype=Object.create(Au&&Au.prototype)).constructor=Su).prototype.initProperties=function(){Au.prototype.initProperties.call(this),Cu(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"})},Su.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Su.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()},Su.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Su.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength&&(e=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=e,this.addPattern(this.characterMap[e]))},Su.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},Su.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Su.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Su.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Su.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},Su);function Su(){Au.apply(this,arguments)}Dt(Yt,{addCheckSum:!0});var ku,Pu,Mu=Object.assign,N=((Pu=Z)&&(Bu.__proto__=Pu),((Bu.prototype=Object.create(Pu&&Pu.prototype)).constructor=Bu).prototype.initProperties=function(){Pu.prototype.initProperties.call(this),Mu(this,{minBaseUnitLength:.7})},Bu.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()},Bu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Bu.prototype.addBase=function(){},Bu),Se=((ku=N)&&(Tu.__proto__=ku),((Tu.prototype=Object.create(ku&&ku.prototype)).constructor=Tu).prototype.initProperties=function(){ku.prototype.initProperties.call(this),Mu(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"}}})},Tu.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Tu.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.max(.15*this.width,24),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient Height. The minimum height for value: "+this.value+" is: "+i);for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){i=Math.ceil(this.getBaseWidth(o)*e);throw new Error("Insufficient width. The minimum width for value: "+this.value+" is: "+i)}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))},Tu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Tu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Tu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Tu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Tu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Tu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Tu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Tu);function Tu(){ku.apply(this,arguments)}function Bu(){Pu.apply(this,arguments)}Dt(Se,{addCheckSum:!1});var Ru,Ou,Iu,Lu,Vu,ju,Du,zu,Eu,Hu,Uu,Fu={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?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 i=0;i<e.length;i++){var r=e[i];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;if(this.specialAsciiCodes[t])for(var o=[],i=0;i<this.specialAsciiCodes[t].length;i++)o.push(this.characterMap[this.shiftCharacters[3]]),o.push(this.characterMap[this.specialAsciiCodes[t][i]]);else e=6*Math.floor(t/32)+(t-27)%32+64,o=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return o}],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"]},tt=((ju=Se)&&(ed.__proto__=ju),((ed.prototype=Object.create(ju&&ju.prototype)).constructor=ed).prototype.initProperties=function(){ju.prototype.initProperties.call(this),j(this,Fu,{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}}})},ed),Gu=Object.assign,K=((Vu=N)&&(td.__proto__=Vu),((td.prototype=Object.create(Vu&&Vu.prototype)).constructor=td).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),Gu(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"}})},td.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},td.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")},td.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},td.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},td.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},td.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},td.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)},td.prototype._getCheckValues=function(){for(var t,e=this.values,o=e.length,i=0,r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},td.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},td.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},td.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},td),it=((Lu=K)&&(Ju.__proto__=Lu),((Ju.prototype=Object.create(Lu&&Lu.prototype)).constructor=Ju).prototype.initProperties=function(){Lu.prototype.initProperties.call(this),j(this,Fu,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,o=0;o<t.length;o++)e=t[o],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},Ju),Nu=/^\d+$/,Wu=Object.assign,q=((Iu=Z)&&($u.__proto__=Iu),(($u.prototype=Object.create(Iu&&Iu.prototype)).constructor=$u).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),Wu(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},$u.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()},$u.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()},$u.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},$u.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},$u.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},$u.prototype.validate=function(t){if(Nu.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!dt(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(","))},$u.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)},$u),Xu=/^\d+$/,Yu=/^[a-z0-9]+$/i,qu=Object.assign,ct=((Ou=P.Class)&&(Ku.__proto__=Ou),((Ku.prototype=Object.create(Ou&&Ou.prototype)).constructor=Ku).prototype.initProperties=function(){},Ku.prototype.addStart=function(){},Ku.prototype.is=function(){},Ku.prototype.isCode=function(){return!1},Ku.prototype.move=function(){},Ku.prototype.pushState=function(){},Ku),ve=((Ru=ct)&&(Zu.__proto__=Ru),((Zu.prototype=Object.create(Ru&&Ru.prototype)).constructor=Zu).prototype.initProperties=function(){Ru.prototype.initProperties.call(this),j(this,{FNC4:"FNC4",SHIFT:98})},Zu.prototype.addStart=function(){this.encoding.addPattern(this.START)},Zu.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},Zu.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Zu.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!dt("C",o)||(o=i.substr(t.index).match(/\d{4,}/g))&&(r=i.indexOf(o[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Zu.prototype._initMoves=function(t){this._moves=[],dt(this.FNC4,t)&&this._moves.push(this._moveFNC),dt(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Zu.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Zu.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},Zu.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Zu),Qu={};function Zu(t,e){Ru.call(this,t),this.states=e,this._initMoves(e)}function Ku(t){Ou.call(this),this.encoding=t,this.initProperties()}function $u(){Iu.apply(this,arguments)}function Ju(){Lu.apply(this,arguments)}function td(){Vu.apply(this,arguments)}function ed(){ju.apply(this,arguments)}function od(t,e){Du.call(this,t),this.states=e}function id(t,e){zu.call(this,t),this._initSubStates(e)}function rd(){Eu.apply(this,arguments)}function nd(){Hu.apply(this,arguments)}function sd(){Uu.apply(this,arguments)}Qu.A=((Uu=ve)&&(sd.__proto__=Uu),((sd.prototype=Object.create(Uu&&Uu.prototype)).constructor=sd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),qu(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},sd.prototype.isCode=function(t){return 0<=t&&t<96},sd.prototype.getValue=function(t){return t<32?t+64:t-32},sd),Qu.B=((Hu=ve)&&(nd.__proto__=Hu),((nd.prototype=Object.create(Hu&&Hu.prototype)).constructor=nd).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),qu(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},nd.prototype.isCode=function(t){return 32<=t&&t<128},nd.prototype.getValue=function(t){return t-32},nd),Qu.C=((Eu=ct)&&(rd.__proto__=Eu),((rd.prototype=Object.create(Eu&&Eu.prototype)).constructor=rd).prototype.initProperties=function(){Eu.prototype.initProperties.call(this),qu(this,{key:"C",MOVE:99,START:105})},rd.prototype.addStart=function(){this.encoding.addPattern(this.START)},rd.prototype.is=function(t,e){var o=xd(t,e,4);return(e+4<=t.length||2===t.length)&&Xu.test(o)},rd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},rd.prototype.pushState=function(t){for(var e;(e=xd(t.value,t.index,2))&&Xu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},rd.prototype.getValue=function(t){return t},rd),Qu.FNC4=((zu=ct)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.prototype.initProperties.call(this),qu(this,{key:"FNC4",dependentStates:["A","B"]})},id.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},id.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},id.prototype.isCode=function(t){return 128<=t&&t<256},id.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},id.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},id.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},id.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)dt(t[e],this.dependentStates)&&this.subStates.push(t[e])},id.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]},id.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},id),Qu.FNC1=((Du=ct)&&(od.__proto__=Du),((od.prototype=Object.create(Du&&Du.prototype)).constructor=od).prototype.initProperties=function(){Du.prototype.initProperties.call(this),qu(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})},od.prototype.addStart=function(){this.encoding[this.startState].addStart()},od.prototype.is=function(){return dt(this.key,this.states)},od.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if((e=(p.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<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),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,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},od.prototype.validate=function(t,e){var o=e.substr(t.id.length),e=t.ai;if(!e.type&&!Xu.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===e.type&&!Yu.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(e.length&&e.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+e.length+" characters long.");if(e.min&&e.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+e.min+" characters long.");if(e.max&&e.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+e.max+" characters long.")},od.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=xd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},od.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},od.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),e=t.indexOf(this.endAI,o),o=t.substring(o+1,e),e=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substr(o.length-1));return e||this.unsupportedAIError(o),{ai:e,id:o}},od.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&dt(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},od);var ad,pd,hd,ld,cd,ud,ft=((ud=Z)&&(md.__proto__=ud),((md.prototype=Object.create(ud&&ud.prototype)).constructor=md).prototype.initProperties=function(){ud.prototype.initProperties.call(this),qu(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})},md.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Qu[this.states[t]](this,this.states)},md.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},md.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())},md.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var o;t.shifted?(o=t.state,t.state=t.previousState,t.previousState=o,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},md.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},md.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},md.prototype.addStop=function(){this.addPattern(this.STOP)},md.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},md.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},md.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))},md),ce=((cd=ft)&&(vd.__proto__=cd),((vd.prototype=Object.create(cd&&cd.prototype)).constructor=vd).prototype.initProperties=function(){cd.prototype.initProperties.call(this),qu(this,{name:"Code 128 A",states:["A"]})},vd),Qt=((ld=ft)&&(yd.__proto__=ld),((yd.prototype=Object.create(ld&&ld.prototype)).constructor=yd).prototype.initProperties=function(){ld.prototype.initProperties.call(this),qu(this,{name:"Code 128 B",states:["B"]})},yd),G=((hd=ft)&&(fd.__proto__=hd),((fd.prototype=Object.create(hd&&hd.prototype)).constructor=fd).prototype.initProperties=function(){hd.prototype.initProperties.call(this),qu(this,{name:"Code 128 C",states:["C"]})},fd),wt=((pd=ft)&&(gd.__proto__=pd),((gd.prototype=Object.create(pd&&pd.prototype)).constructor=gd).prototype.initProperties=function(){pd.prototype.initProperties.call(this),qu(this,{name:"Code 128",states:["C","B","A","FNC4"]})},gd),Y=((ad=ft)&&(dd.__proto__=ad),((dd.prototype=Object.create(ad&&ad.prototype)).constructor=dd).prototype.initProperties=function(){ad.prototype.initProperties.call(this),qu(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},dd);function dd(){ad.apply(this,arguments)}function gd(){pd.apply(this,arguments)}function fd(){hd.apply(this,arguments)}function yd(){ld.apply(this,arguments)}function vd(){cd.apply(this,arguments)}function md(t){ud.call(this,t),this._initStates()}function xd(t,e,o){return t.substring(e,e+o)}var wd,bd,_d,Ad,Cd,Sd,kd,Pd=Object.assign,be=((kd=Z)&&(zd.__proto__=kd),((zd.prototype=Object.create(kd&&kd.prototype)).constructor=zd).prototype.initProperties=function(){kd.prototype.initProperties.call(this),Pd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Md})},zd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},zd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},zd.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()},zd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},zd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},zd.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]])},zd),N=((Sd=be)&&(Dd.__proto__=Sd),((Dd.prototype=Object.create(Sd&&Sd.prototype)).constructor=Dd).prototype.initProperties=function(){Sd.prototype.initProperties.call(this),Pd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Dd),ve=((Cd=be)&&(jd.__proto__=Cd),((jd.prototype=Object.create(Cd&&Cd.prototype)).constructor=jd).prototype.initProperties=function(){Cd.prototype.initProperties.call(this),Pd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},jd),ct=((Ad=be)&&(Vd.__proto__=Ad),((Vd.prototype=Object.create(Ad&&Ad.prototype)).constructor=Vd).prototype.initProperties=function(){Ad.prototype.initProperties.call(this),Pd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Vd),ft=((_d=be)&&(Ld.__proto__=_d),((Ld.prototype=Object.create(_d&&_d.prototype)).constructor=Ld).prototype.initProperties=function(){_d.prototype.initProperties.call(this),Pd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Ld),Md={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Td=Object.assign,be=((bd=Z)&&(Id.__proto__=bd),((Id.prototype=Object.create(bd&&bd.prototype)).constructor=Id).prototype.initProperties=function(){bd.prototype.initProperties.call(this),Td(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]}})},Id.prototype.initValue=function(t,e,o){t=String(t);if(12!==t.length||/\D/.test(t))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=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},Id.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)},Id.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)},Id.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])},Id.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},Id),Bd=Object.assign,Z=((wd=be)&&(Od.__proto__=wd),((Od.prototype=Object.create(wd&&wd.prototype)).constructor=Od).prototype.initProperties=function(){wd.prototype.initProperties.call(this),Bd(this,{name:"EAN 8"})},Od.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)},Od),Rd={code11:Yt,code39:Se,code39extended:tt,code93:K,code93extended:it,code128:wt,code128a:ce,code128b:Qt,code128c:G};function Od(){wd.apply(this,arguments)}function Id(){bd.apply(this,arguments)}function Ld(){_d.apply(this,arguments)}function Vd(){Ad.apply(this,arguments)}function jd(){Cd.apply(this,arguments)}function Dd(){Sd.apply(this,arguments)}function zd(){kd.apply(this,arguments)}Rd["gs1-128"]=Y,Rd.msimod10=N,Rd.msimod11=ve,Rd.msimod1010=ct,Rd.msimod1110=ft,Rd.postnet=q,Rd.ean8=Z,Rd.ean13=be;var Ed,q=((Ed=P.Class)&&(Hd.__proto__=Ed),((Hd.prototype=Object.create(Ed&&Ed.prototype)).constructor=Hd).prototype.destroy=function(){this._destroySurface()},Hd.prototype._initElement=function(){p(this.element,"k-barcode"),this.element.style.display="block"},Hd.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Hd.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Hd.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Hd.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Hd.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Hd.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},Hd.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)},Hd.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Hd.prototype._resize=function(){this.redraw()},Hd.prototype.createVisual=function(){this.visual=this._render()},Hd.prototype._render=function(){var t=this.options,e=t.value,o=t.text,i=U(o.margin),r=this._getSize(),n=t.border||{},s=this.encoding,a=new ie(0,0,r.width,r.height).unpad(n.width).unpad(t.padding),p=a.height(),n=new P.drawing.Group;return this.contentBox=a,n.append(this._getBackground(r)),o.visible&&(p-=P.drawing.util.measureText(e,{font:o.font}).height+i.top+i.bottom),a=s.encode(e,a.width(),p),o.visible&&(e=e,t.checksum&&At(s.checksum)&&(e+=" "+s.checksum),n.append(this._getText(e))),this.barHeight=p,this._bandsGroup=this._getBands(a.pattern,a.baseUnit),n.append(this._bandsGroup),n},Hd.prototype.exportVisual=function(){return this._render()},Hd.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t=new P.geometry.Size(300,100);return 0<e&&(t.width=e),o&&(t.height=o),this.options.width&&(t.width=this.options.width),this.options.height&&(t.height=this.options.height),t},Hd.prototype.value=function(t){if(!At(t))return this.options.value;this.options.value=String(t),this.redraw()},Hd.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new P.drawing.Group,n=0;n<t.length;n++){var s,a=(s=D(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=P.geometry.Rect.fromPoints(new P.geometry.Point(i,s.y1+o.y1),new P.geometry.Point(i+a,s.y2+o.y1)),s=P.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},Hd.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new ie(0,0,t.width,t.height).unpad(o.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},Hd.prototype._getText=function(t){var e=this.options.text,e=this._textbox=new Ge(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return e.reflow(this.contentBox),e.renderVisual(),e.visual},Hd.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),!Rd[this.type])throw new Error("Encoding "+this.type+" is not supported.");this.encoding=new Rd[this.type],this.options=j({},this.options,t)},Hd);function Hd(t,e){Ed.call(this),this.options=j({},this.options,e),this.element=t,this._initElement(),this._initSurface(),this._setOptions(e),e&&At(e.value)&&this.redraw()}Dt(q,{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 Ud=q,Fd=Object.assign;function Gd(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function Nd(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Wd(t){return parseInt(t,2)}var Xd,Yd,qd,Qd,Zd,Kd,$d,Jd=(($d=P.Class)&&(hg.__proto__=$d),((hg.prototype=Object.create($d&&$d.prototype)).constructor=hg).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},hg.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}},hg.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},hg),tg=((Kd=P.Class)&&(pg.__proto__=Kd),(pg.prototype=Object.create(Kd&&Kd.prototype)).constructor=pg),eg=((Zd=P.Class)&&(ag.__proto__=Zd),((ag.prototype=Object.create(Zd&&Zd.prototype)).constructor=ag).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(Hg(i,Tg,Bg,Rg,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=Hg(i,Og,Ig,Lg,t);r.mode!==t?(t=r.mode,e.push(r),o++):e[o].modeString+=r.modeString,i=i.substr(r.modeString.length)}return e}(),t=Ug(function(t){for(var e=0,o=0;o<t.length;o++)e+=og[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var o="",i=0;i<t.length;i++)o+=og[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new tg(e,t)},ag),Z=((Qd=P.Class)&&(sg.__proto__=Qd),((sg.prototype=Object.create(Qd&&Qd.prototype)).constructor=sg).prototype.initProperties=function(){Fd(this,{modeIndicator:"",bitsInCharacterCount:[]})},sg.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},sg.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},sg.prototype.getModeCountString=function(t,e){return this.modeIndicator+Nd(t,this.getBitsCharacterCount(e))},sg.prototype.encode=function(){},sg.prototype.getStringBitsLength=function(){},sg.prototype.getValue=function(){},sg),be=((qd=Z)&&(ng.__proto__=qd),((ng.prototype=Object.create(qd&&qd.prototype)).constructor=ng).prototype.initProperties=function(){qd.prototype.initProperties.call(this),Fd(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},ng.prototype.getValue=function(t){return parseInt(t,10)},ng.prototype.encode=function(t,e){for(var o=Gd(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=Nd(o[r],10);return i+Nd(o[r],1+3*o[r].length)},ng.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)},ng),q=((Yd=Z)&&(rg.__proto__=Yd),((rg.prototype=Object.create(Yd&&Yd.prototype)).constructor=rg).prototype.initProperties=function(){Yd.prototype.initProperties.call(this),Fd(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"})},rg.prototype.getValue=function(t){return this.characters[t]},rg.prototype.encode=function(t,e){for(var o=Gd(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=Nd(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+Nd(2===o[r].length?45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)):this.getValue(o[r].charAt(0)),1+5*o[r].length)},rg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},rg),Z=((Xd=Z)&&(ig.__proto__=Xd),((ig.prototype=Object.create(Xd&&Xd.prototype)).constructor=ig).prototype.initProperties=function(){Xd.prototype.initProperties.call(this),Fd(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},ig.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error("Unsupported character: "+t)},ig.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=Nd(this.getValue(t.charAt(i)),8);return o},ig.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},ig),og={};function ig(){Xd.apply(this,arguments)}function rg(){Yd.apply(this,arguments)}function ng(){qd.apply(this,arguments)}function sg(){Qd.call(this),this.initProperties()}function ag(){Zd.apply(this,arguments)}function pg(t,e){Kd.call(this),this.dataString=t,this.version=e}function hg(t){$d.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}og.numeric=new be,og.alphanumeric=new q,og.byte=new Z;var lg,cg=((lg=P.Class)&&(jg.__proto__=lg),((jg.prototype=Object.create(lg&&lg.prototype)).constructor=jg).prototype.initProperties=function(){Fd(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},jg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=Ug(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new tg(t,e)},jg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},jg.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},jg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=Nd(t,8);else{for(var e=8-e,r=0;r<o;r++)i=Nd(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},jg.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},jg),ug=[{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}}],dg="numeric",gg="alphanumeric",fg="byte",yg={1:0},vg={0:1},mg={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},xg=[1,0,1,1,1],wg=[1,0,1],bg={L:"01",M:"00",Q:"11",H:"10"},_g=["11101100","00010001"],Ag=93,Cg=[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}],Sg=/^\d+/,kg=new RegExp("^[A-Z $%*+./:-]+"),Pg=new RegExp("^[A-Z0-9 $%*+./:-]+"),Mg=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Tg=8,Bg=5,Rg=8,Og=17,Ig=9,Lg=16,Vg=[[1,0],[1,25,0]];function jg(){lg.call(this),this.initProperties(),this.mode=og[this.encodingMode]}function Dg(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function zg(t,e,o,i){for(var r=0;r<Cg.length;r++)t[r][o][i]=Cg[r](o,i)?1^e:parseInt(e,10)}function Eg(t,e){for(var o,i=Vg[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],p=0;p<s;p++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=vg[(t[i]+e)%255],void 0!==t[--i];);return o}(n,yg[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(p=r.length-1;0<=p;p--)a[e-1-p]=Nd(r[p],8);return a}function Hg(t,e,o,i,r){var n,s=Sg.exec(t),a=s?s[0]:"",p=kg.exec(t),s=p?p[0]:"",p=Pg.exec(t),p=p?p[0]:"",t=a&&(a.length>=e||t.length===a.length||a.length>=o&&!Pg.test(t.charAt(a.length)))?(n=dg,a):p&&(t.length===p.length||p.length>=i||r===gg)?(n=gg,a||s):(n=fg,p?p+Mg.exec(t.substring(p.length))[0]:Mg.exec(t)[0]);return{mode:n,modeString:t}}function Ug(t,e){for(var o=0,i=ug.length-1,r=Math.floor(ug.length/2);t<ug[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=ug[o][e].totalDataCodewords?r+1:i+1}function Fg(t,e,o){var i=Wd(e),r=e.length-1,e=t<<r,o=Nd(t,o-r),i=function(t,e){for(var o=e.toString(2).length,i=t.toString(2).length,r=t;o<=(i=(r^=e<<i-o).toString(2).length););return r}(e,i);return o+Nd(i,r)}function Gg(t,e){return parseInt(t.charAt(e),10)}function Ng(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&Dg(t,Gg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&Dg(t,Gg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)Dg(t,Gg(e,r-1-i++),n,s);for(Dg(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)Dg(t,Gg(e,r-1-i++),n,s)}function Wg(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,Dg(t,r=Gg(e,e.length-p-1),0+o,s+i),Dg(t,r,a+i,0+o)}function Xg(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Dg(t,r=e[a],o+p,i+a),Dg(t,r,o+a,i+p),Dg(t,r,o+s-p,i+s-a),Dg(t,r,o+s-a,i+s-p)}function Yg(t,e,o,i){for(var r=o,n=i,s=t[0];Dg(t,0,r,i),Dg(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function qg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===Ag&&(o[t]+=40)}function Qg(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function Zg(t,e,o){var i=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?cg:eg)).getEncodingResult(t,e),r=i.version,n=ug[r-1][e],s=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var p=s[a][0],h=0;h<p;h++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=Wd(o),i+=8;r.push(c),n.push(Eg(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,o=0,i=0,r=t;r.length<e&&o<"0000".length;)r+="0000".charAt(o++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=_g[i],i^=1;return r}(i.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Cg.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}();i=(t=o)[0].length,Xg(t,xg,0,0),Yg(t,[-1,-1],7,7),Xg(t,xg,i-7,0),Yg(t,[1,-1],i-8,7),Xg(t,xg,0,i-7),Yg(t,[-1,1],7,i-8),function(t,e){if(!(e<2)){var o,i=t[0],r=i.length,n=Math.floor(e/7),s=[6],a=0;for((e=mg[e])?o=(r-13-e)/n:e=o=(r-13)/(n+1),s.push(s[a++]+e);s[a]+o<r;)s.push(s[a++]+o);for(var p=0;p<s.length;p++)for(var h=0;h<s.length;h++)void 0===i[s[p]][s[h]]&&Xg(t,wg,s[p]-2,s[h]-2)}}(o,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)Dg(t,e,6,i),Dg(t,e,i,6),e^=1}(o),7<=r&&Wg(o,Nd(0,18)),Ng(o,Nd(0,15)),function(t,e){for(var o,i,r,n=new Jd(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;0<o.length;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),zg(t,o[a][i].charAt(p),r.row,r.column);for(i++;o[0]&&i===o[0].length;)o.splice(0,1)}for(;r=n.getNextRemainderCell();)zg(t,0,r.row,r.column)}(o,s);s=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,p=0;p<t.length;p++)o[p]=0,r[p]=0,s[p]=[0,0],n[p]=[0,0],i[p]=[];for(var h=0;h<a;h++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][l],10),i[c][0]===e[h][l]&&h+1<a&&0<=l-1&&e[h+1][l]===i[c][0]&&e[h+1][l-1]===i[c][0]&&(o[c]+=3),qg(c,n,o,0,e[h][l]),qg(c,n,o,1,e[l][h]),Qg(c,o,i,e[h][l],s,0),Qg(c,o,i,e[l][h],s,1);var u,d,g,f,y=a*a,v=Number.MAX_VALUE;for(p=0;p<o.length;p++)o[p]+=(d=r[p],g=y,f=void 0,f=Math.floor(d/g*100),d=f%5,g=Math.abs(f-d-50),d=Math.abs(f+5-d-50),10*Math.min(g/5,d/5)),o[p]<v&&(v=o[p],u=p);return u}(o),o=o[s];return 7<=r&&Wg([o],Fg(r,"1111100100101",18)),Ng([o],function(t){var e="";if(0===Wd(t))return"101010000010010";for(var o=Fg(Wd(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(bg[e]+Nd(s,3))),o}!function(){for(var t,e=1;e<255;e++)255<(t=2*vg[e-1])&&(t^=285),vg[e]=t,yg[t]=e;t=2*vg[e-1]^285,vg[e]=t,vg[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Vg[t-1];Vg[t]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)void 0===o[i+r]?o[i+r]=(t[i]+(0<=e[r]?e[r]:0))%255:o[i+r]=yg[vg[o[i+r]]^vg[(t[i]+e[r])%255]];return o}(e,[t,0])}}();var Kg,$g=Math.round,Jg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],tf=[[0,1],[1,1],[1,0]],Z=((Kg=P.Class)&&(ef.__proto__=Kg),((ef.prototype=Object.create(Kg&&Kg.prototype)).constructor=ef).prototype.destroy=function(){this._destroySurface()},ef.prototype._initElement=function(){p(this.element,"k-qrcode"),this.element.style.display="block"},ef.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},ef.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},ef.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},ef.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},ef.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},ef.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},ef.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t={width:0,height:0};return 0<e&&(t.width=e),o&&(t.height=o),t},ef.prototype._resize=function(){this.redraw()},ef.prototype.createVisual=function(){this.visual=this._render()},ef.prototype.exportVisual=function(){return this._render()},ef.prototype._render=function(){var t,e,o,i=this._value,r=this.options.border||{},n=this.options.padding||0,s=r.width||0;r.width=s;var a=new P.drawing.Group;return i&&(t=Zg(i,this.options.errorCorrection,this.options.encoding),o=(e=this._getSize())-2*(s+n),i=this._calculateBaseUnit(o,t.length),o=s+n+(o-t.length*i)/2,a.append(this._renderBackground(e,r)),a.append(this._renderMatrix(t,i,o)),this._hasCustomLogo()?a.append(this._renderLogo(e,i)):this._isSwiss()&&a.append(this._renderSwissCode(e,i))),a},ef.prototype._renderLogo=function(t,e){var o=$g(t/2),t=this._getLogoSize(7*e),e=this.options.overlay.imageUrl,o={x:o-t.width/2,y:o-t.height/2},t=new P.geometry.Rect(new P.geometry.Point(o.x,o.y),new P.geometry.Size(t.width,t.height));return new P.drawing.Image(e,t)},ef.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},t=new P.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),t.append(this._renderShape(s,Math.ceil(o+2*e),tf,"#fff")),s.x=s.y=n-o/2,t.append(this._renderShape(s,o,tf,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,t.append(this._renderShape(s,i,Jg,"#fff")),t},ef.prototype._renderShape=function(t,e,o,i){var r=new P.drawing.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},ef.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=this.element,0<(t=Math.min(t.clientWidth,t.clientHeight))?t:200)},ef.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<1)throw new Error("Insufficient size.");return t<=o*e&&1<=o-1&&o--,o},ef.prototype._renderMatrix=function(t,e,o){for(var i=new P.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var p=$g(o+a*e),h=$g(n),l=$g(o+s*e),a=$g(n+e);i.moveTo(p,h).lineTo(p,a).lineTo(l,a).lineTo(l,h).close()}}return i},ef.prototype._renderBackground=function(t,e){t=new ie(0,0,t,t).unpad(e.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},ef.prototype.setOptions=function(t){this.options=Fd(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this.redraw()},ef.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},ef.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},ef.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},ef.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}},ef);function ef(t,e){Kg.call(this),this.options=j({},this.options,e),this.element=t,this.wrapper=this.element,this._initElement(),this._initSurface(),this.setOptions(e)}Dt(Z,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});function of(){return{icon:{border:{width:1}},label:{font:sf,padding:3},line:{length:10,width:2},visible:!0}}function rf(t){return{axisDefaults:{labels:{font:sf},notes:of(),title:{font:af,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:(t=void 0===t?{}: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:of(),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}},title:{font:af},legend:{labels:{font:sf}}}}var nf=Z,Z="Arial, Helvetica, sans-serif",sf="12px "+Z,af="16px "+Z;o.d(e,"autoMajorUnit",function(){return Kt}),o.d(e,"Point",function(){return Jt}),o.d(e,"Box",function(){return ie}),o.d(e,"Ring",function(){return he}),o.d(e,"Sector",function(){return le}),o.d(e,"ShapeBuilder",function(){return ye}),o.d(e,"ShapeElement",function(){return Pe}),o.d(e,"ChartElement",function(){return we}),o.d(e,"BoxElement",function(){return Ce}),o.d(e,"RootElement",function(){return Oe}),o.d(e,"FloatElement",function(){return Ve}),o.d(e,"Text",function(){return ze}),o.d(e,"TextBox",function(){return Ge}),o.d(e,"Title",function(){return Ye}),o.d(e,"AxisLabel",function(){return Ze}),o.d(e,"Axis",function(){return io}),o.d(e,"Note",function(){return $e}),o.d(e,"CategoryAxis",function(){return Ho}),o.d(e,"DateCategoryAxis",function(){return Zo}),o.d(e,"DateValueAxis",function(){return pi}),o.d(e,"NumericAxis",function(){return ni}),o.d(e,"LogarithmicAxis",function(){return di}),o.d(e,"PolarAxis",function(){return mi}),o.d(e,"RadarCategoryAxis",function(){return yi}),o.d(e,"RadarNumericAxis",function(){return Ai}),o.d(e,"RadarLogarithmicAxis",function(){return Si}),o.d(e,"CurveProcessor",function(){return Ti}),o.d(e,"Gradients",function(){return Me}),o.d(e,"rectToBox",function(){return Ee}),o.d(e,"Aggregates",function(){return Hi}),o.d(e,"AreaChart",function(){return Jr}),o.d(e,"AreaSegment",function(){return Nr}),o.d(e,"AxisGroupRangeTracker",function(){return tn}),o.d(e,"Bar",function(){return ln}),o.d(e,"BarChart",function(){return _n}),o.d(e,"BarLabel",function(){return sn}),o.d(e,"BoxPlotChart",function(){return jn}),o.d(e,"BoxPlot",function(){return Ln}),o.d(e,"BubbleChart",function(){return Kn}),o.d(e,"Bullet",function(){return is}),o.d(e,"BulletChart",function(){return ss}),o.d(e,"CandlestickChart",function(){return Tn}),o.d(e,"Candlestick",function(){return Cn}),o.d(e,"CategoricalChart",function(){return br}),o.d(e,"CategoricalErrorBar",function(){return gr}),o.d(e,"CategoricalPlotArea",function(){return Ia}),o.d(e,"Chart",function(){return _l}),o.d(e,"ChartContainer",function(){return vs}),o.d(e,"ClipAnimation",function(){return Dr}),o.d(e,"ClusterLayout",function(){return yn}),o.d(e,"Crosshair",function(){return gs}),o.d(e,"CrosshairTooltip",function(){return cs}),o.d(e,"DefaultAggregates",function(){return Xs}),o.d(e,"DonutChart",function(){return oh}),o.d(e,"DonutPlotArea",function(){return ih}),o.d(e,"DonutSegment",function(){return Kp}),o.d(e,"ErrorBarBase",function(){return dr}),o.d(e,"ErrorRangeCalculator",function(){return Qi}),o.d(e,"Highlight",function(){return ja}),o.d(e,"SharedTooltip",function(){return xp}),o.d(e,"Legend",function(){return np}),o.d(e,"LegendItem",function(){return $a}),o.d(e,"LegendLayout",function(){return Ka}),o.d(e,"LineChart",function(){return Gr}),o.d(e,"LinePoint",function(){return Sr}),o.d(e,"LineSegment",function(){return Pr}),o.d(e,"Pane",function(){return ws}),o.d(e,"PieAnimation",function(){return Mp}),o.d(e,"PieChart",function(){return Xp}),o.d(e,"PieChartMixin",function(){return Up}),o.d(e,"PiePlotArea",function(){return Yp}),o.d(e,"PieSegment",function(){return Hp}),o.d(e,"PlotAreaBase",function(){return zs}),o.d(e,"PlotAreaEventsMixin",function(){return Es}),o.d(e,"PlotAreaFactory",function(){return ap}),o.d(e,"PointEventsMixin",function(){return _r}),o.d(e,"RangeBar",function(){return Qs}),o.d(e,"RangeBarChart",function(){return Js}),o.d(e,"RangeAreaPoint",function(){return sa}),o.d(e,"RangeAreaChart",function(){return ma}),o.d(e,"ScatterChart",function(){return Wn}),o.d(e,"ScatterErrorBar",function(){return Dn}),o.d(e,"ScatterLineChart",function(){return Rp}),o.d(e,"Selection",function(){return gp}),o.d(e,"SeriesAggregator",function(){return Fs}),o.d(e,"SeriesBinder",function(){return Xi}),o.d(e,"SplineSegment",function(){return Lr}),o.d(e,"SplineAreaSegment",function(){return $r}),o.d(e,"StackWrap",function(){return xn}),o.d(e,"Tooltip",function(){return fp}),o.d(e,"OHLCChart",function(){return wa}),o.d(e,"OHLCPoint",function(){return xa}),o.d(e,"WaterfallChart",function(){return Pa}),o.d(e,"WaterfallSegment",function(){return ka}),o.d(e,"XYPlotArea",function(){return Vp}),o.d(e,"MousewheelZoom",function(){return Za}),o.d(e,"ZoomSelection",function(){return Qa}),o.d(e,"Pannable",function(){return Ga}),o.d(e,"ChartAxis",function(){return Bi}),o.d(e,"ChartPane",function(){return Vi}),o.d(e,"ChartPlotArea",function(){return ji}),o.d(e,"findAxisByName",function(){return Ii}),o.d(e,"anyHasZIndex",function(){return zr}),o.d(e,"appendIfNotNull",function(){return bs}),o.d(e,"areNumbers",function(){return Sn}),o.d(e,"bindSegments",function(){return As}),o.d(e,"categoriesCount",function(){return vr}),o.d(e,"countNumbers",function(){return zi}),o.d(e,"equalsIgnoreCase",function(){return Cs}),o.d(e,"evalOptions",function(){return yr}),o.d(e,"filterSeriesByType",function(){return Ss}),o.d(e,"getDateField",function(){return ks}),o.d(e,"getField",function(){return Ui}),o.d(e,"hasGradientOverlay",function(){return an}),o.d(e,"hasValue",function(){return Un}),o.d(e,"isDateAxis",function(){return Ps}),o.d(e,"segmentVisible",function(){return _s}),o.d(e,"singleItemOrArray",function(){return Ms}),o.d(e,"createOutOfRangePoints",function(){return Os}),o.d(e,"ChartService",function(){return J}),o.d(e,"DomEventsBuilder",function(){return et}),o.d(e,"FormatService",function(){return Q}),o.d(e,"IntlService",function(){return W}),o.d(e,"TemplateService",function(){return rt}),o.d(e,"Sparkline",function(){return Ol}),o.d(e,"Navigator",function(){return Nl}),o.d(e,"NavigatorHint",function(){return zl}),o.d(e,"StockChart",function(){return Yl}),o.d(e,"constants",function(){return i}),o.d(e,"Gauge",function(){return sc}),o.d(e,"LinearGauge",function(){return zc}),o.d(e,"LinearPointer",function(){return xc}),o.d(e,"ArrowLinearPointer",function(){return kc}),o.d(e,"BarLinearPointer",function(){return Lc}),o.d(e,"LinearScale",function(){return gc}),o.d(e,"RadialGauge",function(){return su}),o.d(e,"RadialPointer",function(){return ou}),o.d(e,"RadialScale",function(){return Yc}),o.d(e,"ArcGauge",function(){return mu}),o.d(e,"RangePointer",function(){return vu}),o.d(e,"ArcScale",function(){return hu}),o.d(e,"CircularGauge",function(){return xu}),o.d(e,"Barcode",function(){return Ud}),o.d(e,"QRCode",function(){return nf}),o.d(e,"addClass",function(){return p}),o.d(e,"removeClass",function(){return b}),o.d(e,"alignPathToPixel",function(){return M}),o.d(e,"clockwise",function(){return T}),o.d(e,"convertableToNumber",function(){return O}),o.d(e,"deepExtend",function(){return j}),o.d(e,"elementStyles",function(){return H}),o.d(e,"getSpacing",function(){return U}),o.d(e,"getTemplate",function(){return nt}),o.d(e,"getter",function(){return pt}),o.d(e,"grep",function(){return ht}),o.d(e,"hasClasses",function(){return lt}),o.d(e,"HashMap",function(){return ut}),o.d(e,"inArray",function(){return dt}),o.d(e,"interpolateValue",function(){return gt}),o.d(e,"InstanceObserver",function(){return yt}),o.d(e,"isArray",function(){return x}),o.d(e,"isFunction",function(){return I}),o.d(e,"isNumber",function(){return B}),o.d(e,"isObject",function(){return D}),o.d(e,"isString",function(){return R}),o.d(e,"map",function(){return vt}),o.d(e,"mousewheelDelta",function(){return mt}),o.d(e,"FontLoader",function(){return jt}),o.d(e,"setDefaultOptions",function(){return Dt}),o.d(e,"sparseArrayLimits",function(){return zt}),o.d(e,"styleValue",function(){return z}),o.d(e,"find",function(){return Et}),o.d(e,"elementScale",function(){return Gt}),o.d(e,"autoTextColor",function(){return Nt}),o.d(e,"createHashSet",function(){return Zt}),o.d(e,"append",function(){return bt}),o.d(e,"bindEvents",function(){return _t}),o.d(e,"Class",function(){return P.Class}),o.d(e,"defined",function(){return At}),o.d(e,"deg",function(){return Ct}),o.d(e,"elementOffset",function(){return St}),o.d(e,"elementSize",function(){return kt}),o.d(e,"eventElement",function(){return Pt}),o.d(e,"eventCoordinates",function(){return Mt}),o.d(e,"last",function(){return Tt}),o.d(e,"limitValue",function(){return Bt}),o.d(e,"logToConsole",function(){return P.logToConsole}),o.d(e,"objectKey",function(){return Rt}),o.d(e,"rad",function(){return Ot}),o.d(e,"round",function(){return It}),o.d(e,"unbindEvents",function(){return Lt}),o.d(e,"valueOrDefault",function(){return Vt}),o.d(e,"chartBaseTheme",function(){return rf}),function(t){for(var e in t)pf(e,t[e])}(e)}],r={},i.m=o,i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=1)}}});