@progress/kendo-charts 2.7.2-develop.3 → 2.7.3-develop.1

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.
package/dist/cdn/main.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e(require("@progress/kendo-drawing")):t.KendoCharts=e(t.KendoDrawing)}(self,(t=>(()=>{"use strict";var e={721:e=>{e.exports=t}},o={};function i(t){var r=o[t];if(void 0!==r)return r.exports;var n=o[t]={exports:{}};return e[t](n,n.exports,i),n.exports}i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};i.r(r),i.d(r,{Aggregates:()=>Yr,ArcGauge:()=>Hd,ArcScale:()=>Rd,AreaChart:()=>Ma,AreaSegment:()=>ka,ArrowLinearPointer:()=>sd,Axis:()=>bi,AxisGroupRangeTracker:()=>La,AxisLabel:()=>ti,Bar:()=>Va,BarChart:()=>Ga,BarLabel:()=>Ba,BarLinearPointer:()=>ud,Barcode:()=>If,Box:()=>xo,BoxElement:()=>Io,BoxPlot:()=>Qa,BoxPlotChart:()=>tp,BubbleChart:()=>pp,Bullet:()=>up,BulletChart:()=>fp,Candlestick:()=>Xa,CandlestickChart:()=>qa,CategoricalChart:()=>ta,CategoricalErrorBar:()=>Is,CategoricalPlotArea:()=>Al,CategoryAxis:()=>er,Chart:()=>ou,ChartAxis:()=>Fr,ChartContainer:()=>wp,ChartElement:()=>To,ChartPane:()=>Ur,ChartPlotArea:()=>Gr,ChartService:()=>fi,ChartWizardCommon:()=>Vm,CircularGauge:()=>Ud,Class:()=>q.Class,ClipAnimation:()=>ma,ClusterLayout:()=>Fa,Crosshair:()=>_p,CrosshairTooltip:()=>mp,CurveProcessor:()=>zr,DateCategoryAxis:()=>hr,DateValueAxis:()=>xr,DefaultAggregates:()=>Dp,DomEventsBuilder:()=>vi,DonutChart:()=>jh,DonutPlotArea:()=>Dh,DonutSegment:()=>Rh,ErrorBarBase:()=>Os,ErrorRangeCalculator:()=>tn,Extent:()=>Ay,FloatElement:()=>No,FontLoader:()=>Jt,FormatService:()=>ci,Gauge:()=>Uu,Gradients:()=>jo,HashMap:()=>St,Highlight:()=>Pl,InstanceObserver:()=>Ot,IntlService:()=>ai,Legend:()=>Kl,LegendItem:()=>ql,LegendLayout:()=>jl,LineChart:()=>ba,LinePoint:()=>na,LineSegment:()=>aa,LinearGauge:()=>gd,LinearPointer:()=>td,LinearScale:()=>Qu,Location:()=>Ug,LogarithmicAxis:()=>Ar,Map:()=>Lv,Matrix:()=>Ce,MousewheelZoom:()=>Rl,Navigator:()=>_u,NavigatorHint:()=>fu,Note:()=>oi,NumericAxis:()=>vr,OHLCChart:()=>sl,OHLCPoint:()=>rl,Observable:()=>Ue,Pane:()=>Sp,Pannable:()=>Ll,PieAnimation:()=>uh,PieChart:()=>Lh,PieChartMixin:()=>Th,PiePlotArea:()=>Bh,PieSegment:()=>Ch,PlotAreaBase:()=>Ip,PlotAreaEventsMixin:()=>Ep,PlotAreaFactory:()=>Jl,Point:()=>yo,PointEventsMixin:()=>oa,PolarAxis:()=>Mr,QRCode:()=>Ig,RadarCategoryAxis:()=>Pr,RadarLogarithmicAxis:()=>Vr,RadarNumericAxis:()=>Er,RadialGauge:()=>Bd,RadialPointer:()=>Od,RadialScale:()=>kd,RangeAreaChart:()=>ol,RangeAreaPoint:()=>qp,RangeBar:()=>Hp,RangeBarChart:()=>Up,RangePointer:()=>Dd,Ring:()=>wo,RootElement:()=>Fo,Sankey:()=>nm,ScatterChart:()=>rp,ScatterErrorBar:()=>op,ScatterLineChart:()=>fh,Sector:()=>Ao,Selection:()=>ih,SeriesAggregator:()=>jp,SeriesBinder:()=>Qr,ShapeBuilder:()=>Co,ShapeElement:()=>Ro,SharedTooltip:()=>ah,Sparkline:()=>hu,SplineAreaSegment:()=>Pa,SplineSegment:()=>fa,StackWrap:()=>Na,StockChart:()=>wu,TemplateService:()=>yt,Text:()=>Wo,TextBox:()=>Zo,Title:()=>$o,Tooltip:()=>nh,UserEvents:()=>fo,WaterfallChart:()=>hl,WaterfallSegment:()=>pl,XYPlotArea:()=>wh,ZoomSelection:()=>Bl,addClass:()=>W,alignPathToPixel:()=>Z,anyHasZIndex:()=>Bs,append:()=>Vt,appendIfNotNull:()=>Es,applyEventMap:()=>Me,areNumbers:()=>Rs,autoMajorUnit:()=>go,autoTextColor:()=>fe,barcodeValidator:()=>Ef,bindEvents:()=>jt,bindSegments:()=>js,categoriesCount:()=>zs,chartBaseTheme:()=>px,chartTheme:()=>Ax,clockwise:()=>Q,constants:()=>n,convertableToNumber:()=>J,countNumbers:()=>Wr,createHashSet:()=>be,createOutOfRangePoints:()=>$s,createPatternFill:()=>Oo,createSankeyData:()=>am,cycleDown:()=>et,cycleIndex:()=>ot,cycleUp:()=>tt,deepExtend:()=>at,defaultErrorHandler:()=>we,defined:()=>zt,deg:()=>Dt,elementOffset:()=>Ft,elementScale:()=>de,elementSize:()=>Ht,elementStyles:()=>ut,equalsIgnoreCase:()=>Ds,evalOptions:()=>Hs,eventCoordinates:()=>Nt,eventElement:()=>Ut,eventMap:()=>Pe,filterSeriesByType:()=>Ns,find:()=>le,findAxisByName:()=>Hr,gaugeTheme:()=>wx,getAriaTemplate:()=>mt,getField:()=>qr,getSpacing:()=>dt,getSupportedFeatures:()=>Re,getTemplate:()=>vt,getter:()=>bt,grep:()=>wt,hasClasses:()=>kt,hasGradientOverlay:()=>Ws,hasOwnProperty:()=>Ae,hasValue:()=>Xs,hashKey:()=>Gt,inArray:()=>Ct,interpolateValue:()=>Pt,isArray:()=>G,isDateAxis:()=>Ys,isFunction:()=>it,isNumber:()=>K,isObject:()=>pt,isPlainObject:()=>Lt,isString:()=>$,keys:()=>ke,last:()=>Wt,limitValue:()=>Xt,logToConsole:()=>q.logToConsole,map:()=>It,mousewheelDelta:()=>Et,noop:()=>je,now:()=>ze,objectKey:()=>Yt,off:()=>Ee,on:()=>Be,parseDateCategory:()=>Gs,qrcodeValidator:()=>Bg,rad:()=>qt,rectToBox:()=>Xo,removeClass:()=>Y,renderIcon:()=>ae,round:()=>Zt,sankeyTheme:()=>kx,segmentVisible:()=>Vs,setDefaultOptions:()=>te,singleItemOrArray:()=>qs,sparseArrayLimits:()=>pe,styleValue:()=>lt,unbindEvents:()=>Qt,valueOrDefault:()=>Kt});var n={};i.r(n),i.d(n,{DEFAULT_PANE:()=>vu,NAVIGATOR_AXIS:()=>yu,NAVIGATOR_PANE:()=>gu});var s="arc",a="ArrowUp",p="ArrowDown",l="ArrowLeft",h="ArrowRight",c="aria-activedescendant",u="#000",d="bottom",f="center",g="circle",y=3,v="cross",m="date",x="12px sans-serif",_=10,b="end",w=/\{\d+:?/,k="height",A="inside",S="inherit",C="left",P=Number.MAX_VALUE,T=-Number.MAX_VALUE,M="none",O="object",L="outside",I="right",B="roundedRect",E="start",R="string",V="top",j="value",z="#fff",D="width",F="x",H="y",N="pointer",U="horizontal";function G(t){return Array.isArray(t)}function W(t,e){for(var o=G(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var X=/\s+/g;function Y(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(X," "))}var q=i(721);function Z(t){var e=.5;t.options.stroke&&q.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 Q(t,e){return-t.x*e.y+t.y*e.x<0}function K(t){return"number"==typeof t&&!isNaN(t)}function $(t){return typeof t===R}function J(t){return K(t)||$(t)&&isFinite(t)}function tt(t,e){return(t+1)%e}function et(t,e){var o=t-1;return o<0?e-1:o}function ot(t,e){return 1===e||t%e==0?0:t<0?e+t%e:t>=e?t%e:t}function it(t){return"function"==typeof t}var rt="object",nt="undefined";function st(t,e){for(var o in e)if("__proto__"!==o&&"constructor"!==o){var i,r=e[o],n=typeof r;if((i=n===rt&&null!==r?r.constructor:null)&&i!==Array)if(r instanceof Date)t[o]=new Date(r.getTime());else if(it(r.clone))t[o]=r.clone();else{var s=t[o];t[o]=typeof s===rt&&s||{},st(t[o],r)}else n!==nt&&(t[o]=r)}return t}function at(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)st(t,e[i]);return t}function pt(t){return"object"==typeof t}function lt(t){return K(t)?t+"px":t}var ht=/width|height|top|left|bottom|right/i;function ct(t){return ht.test(t)}function ut(t,e){var o=$(e)?[e]:e;if(G(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=ct(s)?parseFloat(r[s]):r[s]}return i}if(pt(e))for(var a in e)t.style[a]=lt(e[a])}function dt(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[V]=o[I]=o[d]=o[C]=t:(o[V]=t[V]||e,o[I]=t[I]||e,o[d]=t[d]||e,o[C]=t[C]||e),o}var ft={compile:function(t){return t}},gt=function(){};gt.register=function(t){ft=t},gt.compile=function(t,e){return ft.compile(t,e)};const yt=gt;function vt(t){var e;return void 0===t&&(t={}),t.template?t.template=e=yt.compile(t.template):it(t.content)&&(e=t.content),e}function mt(t){var e;return void 0===t&&(t={}),t.ariaTemplate?t.ariaTemplate=e=yt.compile(t.ariaTemplate):it(t.ariaContent)&&(e=t.ariaContent),e}var xt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,_t={};function bt(t){if(_t[t])return _t[t];var e=[];return t.replace(xt,(function(t,o,i,r){e.push(q.drawing.util.defined(o)?o:i||r)})),_t[t]=function(t){for(var o=t,i=0;i<e.length&&o;i++)o=o[e[i]];return o},_t[t]}function wt(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function kt(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(t.className.indexOf&&-1!==t.className.indexOf(o[i]))return!0}_t[void 0]=function(t){return t};var At=function(){this._map=new Map};At.prototype.get=function(t){return this._map.get(t)},At.prototype.set=function(t,e){this._map.set(t,e)};const St=At;function Ct(t,e){if(e)return-1!==e.indexOf(t)}function Pt(t,e,o){return q.drawing.util.round(t+(e-t)*o,y)}var Tt="trigger",Mt=function(t,e){this.observer=t,this.handlerMap=at({},this.handlerMap,e)};Mt.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i[Tt]&&(o=this.callObserver(Tt,t,e)),o},Mt.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},Mt.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};const Ot=Mt;function Lt(t){return"[object Object]"===Object.prototype.toString.call(t)}function It(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);q.drawing.util.defined(n)&&i.push(n)}return i}var Bt=q.support.browser||{};function Et(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Bt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e>0?Math.ceil(e):Math.floor(e)}var Rt=q.drawing.util,Vt=Rt.append,jt=Rt.bindEvents,zt=Rt.defined,Dt=Rt.deg,Ft=Rt.elementOffset,Ht=Rt.elementSize,Nt=Rt.eventCoordinates,Ut=Rt.eventElement,Gt=Rt.hashKey,Wt=Rt.last,Xt=Rt.limitValue,Yt=Rt.objectKey,qt=Rt.rad,Zt=Rt.round,Qt=Rt.unbindEvents,Kt=Rt.valueOrDefault,$t=function(){};$t.fetchFonts=function(t,e,o){void 0===o&&(o={depth:0}),!t||o.depth>5||!document.fonts||Object.keys(t).forEach((function(i){var r=t[i];"dataSource"!==i&&"$"!==i[0]&&r&&("font"===i?e.push(r):"object"==typeof r&&(o.depth++,$t.fetchFonts(r,e,o),o.depth--))}))},$t.loadFonts=function(t,e){var o=[];if(t.length>0&&document.fonts){try{o=t.map((function(t){return document.fonts.load(t)}))}catch(t){(0,q.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},$t.preloadFonts=function(t,e){var o=[];$t.fetchFonts(t,o),$t.loadFonts(o,e)};const Jt=$t;function te(t,e){var o=t.prototype;o.options?o.options=at({},o.options,e):o.options=e}var ee="k-i-",oe="k-svg-i-",ie=function(t,e){this.element=t,this.options=at({},this.options,e),this.wrapper()};ie.prototype.wrapper=function(){this.addClasses()},ie.prototype.addClasses=function(){},ie.prototype.html=function(){return this.element.outerHTML},te(ie,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]});var re=function(t){function e(e,o){t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.element.className.split(" ").find((function(t){return t.startsWith(ee)})),o=this.options.icon?""+(this.options.icon.startsWith(ee)?"":ee)+this.options.icon:"";this._className=o,W(this.element,"k-icon"),W(this.element,"k-font-icon"),Y(this.element,e),W(this.element,o),W(this.element,this.options.iconClass||""),t.prototype.wrapper.call(this)},e}(ie);te(re,{name:"HTMLFontIcon",icon:null});var ne=function(t){function e(e,o){e.innerHTML="",t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.options.icon,o=this.options.iconClass,i=this.element.className.split(" ").find((function(t){return t.startsWith(oe)}));if(!e&&o){var r=o.match(/k-i-(\w+(?:-\w+)*)/);r&&(e=r[1],o=o.replace(r[0],""))}$(e)&&(e=e.replace("k-i-","").replace(/-./g,(function(t){return t[1].toUpperCase()})),e=this.options.svgIcons[e]||this.options.svgIcons[e+"Icon"]);var n=e&&e.name?""+oe+e.name:"";if(this._className=n,W(this.element,"k-svg-icon"),Y(this.element,i),W(this.element,n),W(this.element,o||""),this.element.setAttribute("aria-hidden","true"),e&&Lt(e)){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("viewBox",e.viewBox||""),s.setAttribute("focusable","false"),s.innerHTML=e.content||"",this.element.appendChild(s)}t.prototype.wrapper.call(this)},e}(ie);te(ne,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var se={svg:ne,font:re};function ae(t,e){var o=t,i=e;return o&&(!pt(o)||o instanceof HTMLElement)&&!$(o)||(i=o,o=document.createElement("span")),$(i)&&(i={icon:i}),i.type||(i.type="svg"),se[i.type]?new se[i.type](o,i).html():null}function pe(t){for(var e=P,o=T,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===P?void 0:e,max:o===T?void 0:o}}function le(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var he=q.geometry.Matrix,ce=/matrix\((.*)\)/;function ue(t){var e=getComputedStyle(t).transform;return"none"===e?he.unit():function(t){var e=t.match(ce);if(null===e||2!==e.length)return he.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(he,[null].concat(o)))}(e)}function de(t){if(!t)return he.unit();for(var e=ue(t),o=t.parentElement;o;){var i=ue(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}const fe=function(t){return new q.Color(t).isDark()?z:u};var ge={},ye=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},ve={size:{configurable:!0}};ye.prototype.values=function(){return this._values.filter((function(t){return t!==ge}))},ye.prototype.has=function(t){return void 0!==this._index[t]},ye.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},ye.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=ge,delete this._index[t])},ye.prototype.clear=function(){this._index={},this._values=[]},ve.size.get=function(){return this._values.length},Object.defineProperties(ye.prototype,ve);var me=function(t){this._set=new Set(t)},xe={size:{configurable:!0}};me.prototype.values=function(){return Array.from(this._set)},me.prototype.has=function(t){return this._set.has(t)},me.prototype.add=function(t){this._set.add(t)},me.prototype.delete=function(t){this._set.delete(t)},me.prototype.clear=function(){this._set.clear()},xe.size.get=function(){return this._set.size},Object.defineProperties(me.prototype,xe);var _e=function(){var t=!1;return"function"==typeof Set&&(t=new Set([1]).has(1)),t};function be(t){return _e()?new me(t):new ye(t)}function we(t){throw t}const ke={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Ae(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Se=function(){this.height=0,this.width=0,this.data=[]};Se.prototype.clone=function(){var t=new Se;return t.height=this.height,t.width=this.width,t.data=this.data.map((function(t){return t.slice()})),t},Se.prototype.get=function(t,e){var o=this.data[t];return o?o[e]:null},Se.prototype.set=function(t,e,o){var i=this.data[t];null==i&&(i=this.data[t]=[]),i[e]=o,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Se.prototype.each=function(t,e){for(var o=0;o<this.height;++o)for(var i=0;i<this.width;++i){var r=this.get(o,i);if((e||null!=r)&&void 0!==(r=t(r,o,i)))return r}},Se.prototype.map=function(t,e){var o=new Se;return this.each((function(e,i,r){o.set(i,r,t(e,i,r))}),e),o},Se.prototype.transpose=function(){var t=new Se;return this.each((function(e,o,i){t.set(i,o,e)})),t},Se.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),o=t;--o>=0;)for(var i=e[o]=new Array(t),r=t;--r>=0;)i[r]=o===r?1:0;return this},Se.prototype.multiply=function(t){for(var e=this,o=new Se,i=0;i<e.height;++i)for(var r=0;r<t.width;++r){for(var n=0,s=0;s<e.width;++s){var a=e.get(i,s),p=t.get(s,r);"number"==typeof a&&"number"==typeof p&&(n+=a*p)}o.set(i,r,n)}return o},Se.prototype.inverse=function(){for(var t=this.width,e=this.augment((new Se).unit(t)),o=e.data,i=function(e){var i=function(t,e,o){for(var i=o(t),r=t,n=t+1;n<e;n++){var s=o(t);s>i&&(i=s,r=t)}return r}(e,t,(function(t){return o[t][e]}));if(!o[i][e])return{v:null};if(e!==i){var r=o[e];o[e]=o[i],o[i]=r}for(var n=e+1;n<t;++n){for(var s=e+1;s<2*t;++s)o[n][s]-=o[e][s]*o[n][e]/o[e][e];o[n][e]=0}},r=0;r<t;++r){var n=i(r);if(n)return n.v}for(var s=0;s<t;++s)for(var a=o[s][s],p=0;p<2*t;++p)o[s][p]/=a;for(var l=t;--l>=0;)for(var h=l;--h>=0;)if(o[h][l])for(var c=2*t;--c>=t;)o[h][c]-=o[l][c]*o[h][l];return e.slice(0,t,t,t)},Se.prototype.augment=function(t){var e=this.clone(),o=e.width;return t.each((function(t,i,r){e.set(i,r+o,t)})),e},Se.prototype.slice=function(t,e,o,i){for(var r=new Se,n=0;n<o;++n)for(var s=0;s<i;++s)r.set(n,s,this.get(t+n,e+s));return r};const Ce=Se;var Pe={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function Te(t){return Pe[t]||t}var Me=function(t){return t.replace(/([^ ]+)/g,Te)};function Oe(){var t,e,o="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(o+="-"),o+=(12===t?4:16===t?3&e|8:e).toString(16);return o}var Le=new WeakMap,Ie=Symbol("id");function Be(t,e,o,i,r){!function(t,e,o,i,r){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,o,i,r){var n,s=i;o&&it(o)&&!i?s=o:o&&function(t){return"string"==typeof t}(o)&&it(s)&&(n=o);var a=function(e){var o=e.target?e.target.closest(n):null;if(!n||n&&e.target&&o){var i=n?o:e.currentTarget;Object.defineProperty(e,"currentTarget",{value:i}),Object.defineProperty(e,"delegateTarget",{value:t}),s(e)}};s[Ie]||(s[Ie]=Oe());var p=Le.get(t);p||(p=new Map,Le.set(t,p)),p.set(e+s[Ie],a),t.addEventListener(e,a,Boolean(r))}(t,e,o,i,r)}))}(t,e,o,i,r)}function Ee(t,e,o,i,r){!function(t,e,o,i){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,o,i){var r=Le.get(t);if(r&&o&&o[Ie]){var n=e+o[Ie],s=r.get(n);r.delete(n),s&&t.removeEventListener(e,s,Boolean(i))}}(t,e,o,i)}))}(t,e,o,i)}function Re(){var t=function(t){var e=!1,o={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i},i={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(var r in o)if(t.match(o[r])){if("windows"===r&&"plugins"in navigator)return!1;(e={}).device=r,e.name=Ve(r,i),e[e.name]=!0;break}return e}(navigator.userAgent),e={};return e.mobileOS=t,e}function Ve(t,e,o){for(var i in e)if(e[i].test(t))return i;return void 0!==o?o:t}function je(){}function ze(){return(new Date).getTime()}var De="string",Fe="function",He=function(){this._defaultPrevented=!0},Ne=function(){return!0===this._defaultPrevented};const Ue=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind()},e.prototype.bind=function(t,e,o){var i,r,n,s,a=this,p=typeof t===De?[t]:t||[],l=typeof e===Fe;if(void 0===e){for(i in t)a.bind(i,t[i]);return a}var h=function(){var t=p[i];(s=l?e:e[t])&&(o&&(n=s,s=function(){a.unbind(t,s),n.apply(a,arguments)},s.original=n),(a._events[t]=a._events[t]||[]).push(s))};for(i=0,r=p.length;i<r;i++)h();return a},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){var o,i,r,n=this,s=typeof t===De?[t]:t,a=typeof e===Fe;for(o=0,i=s.length;o<i;o++){var p=s[o];(r=a?e:e[p])&&(n._events[p]=n._events[p]||[]).unshift(r)}return n},e.prototype.trigger=function(t,e){var o,i,r=this,n=r._events[t];if(n){var s=e||{};for(s.sender=r,s._defaultPrevented=!1,s.preventDefault=He,s.isDefaultPrevented=Ne,o=0,i=(n=n.slice()).length;o<i;o++)n[o].call(r,s);return!0===s._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var o,i=this,r=i._events[t];if(void 0===t)i._events={};else if(r)if(e)for(o=r.length-1;o>=0;o--)r[o]!==e&&r[o].original!==e||r.splice(o,1);else i._events[t]=[];return i},e.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events&&this._events[i]&&delete this._events[i])}this.bind(this.events,t)},e}(q.Class);var Ge=Object.assign,We=function(t){t.preventDefault()},Xe=800,Ye=0,qe="press",Ze="hold",Qe="select",Ke="start",$e="move",Je="end",to="cancel",eo="tap",oo="doubleTap",io="release",ro="gesturechange",no="gestureend",so="gesturetap",ao={api:0,touch:0,mouse:9,pointer:9};function po(t){var e=[],o=t.originalEvent||t,i=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:o,event:t,target:t.target,currentTarget:i,id:o.pointerId,type:"pointer"}),e}var lo=function(t){function e(e,o){t.call(this);var i=this;i.support=Re(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=e,i._updateLocationData(o),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=ze()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(t){var e=this,o=t["page"+e.axis],i=ze(),r=i-e.timeStamp||1;!o&&this.invalidZeroEvents||(e.delta=o-e.location,e._updateLocationData(t),e.initialDelta=o-e.startLocation,e.velocity=e.delta/r,e.timeStamp=i)},e.prototype._updateLocationData=function(t){var e=this,o=e.axis;e.location=t["page"+o],e.client=t["client"+o],e.screen=t["screen"+o]},e}(q.Class),ho=function(t){function e(e,o,i){t.call(this),Ge(this,{x:new lo("X",i.location),y:new lo("Y",i.location),type:i.type,threshold:e.threshold||ao[i.type],userEvents:e,target:o,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.press=function(){var t=this;this._holdTimeout=setTimeout((function(){return t._hold()}),this.userEvents.minHold),this._trigger(qe,this.pressEvent)},e.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout((function(){1===e.userEvents._clicks?e._trigger(eo,t):e._trigger(oo,t),e.userEvents._clicks=0}),300))},e.prototype._hold=function(){this._trigger(Ze,this.pressEvent)},e.prototype.move=function(t){var e=this,o="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!o){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(uo.current&&uo.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger($e,t)}},e.prototype.end=function(t){this.endTime=ze(),this._finished||(this._finished=!0,this._trigger(io,t),this._moved?this._trigger(Je,t):this.supportDoubleTap?this._tap(t):this._trigger(eo,t),clearTimeout(this._holdTimeout),this.dispose())},e.prototype.dispose=function(){var t=this.userEvents.touches||[];this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout);var e=t.indexOf(this);t.splice(e,1)},e.prototype.skip=function(){this.dispose()},e.prototype.cancel=function(){this.dispose()},e.prototype.isMoved=function(){return this._moved},e.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=ze(),this._moved=!0,this._trigger(Ke,t)},e.prototype._trigger=function(t,e){var o=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:o};this.userEvents.notify(t,i)&&o.preventDefault()},e.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},e}(q.Class);function co(t){for(var e=Pe.up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var uo=function(t){function e(e,o){t.call(this);var i,r=this,n=Re();if(this.support=n,o=o||{},this.options=o,i=r.filter=o.filter,r.threshold=o.threshold||Ye,r.minHold=o.minHold||Xe,r.touches=[],r._maxTouches=o.multiTouch?2:1,r.allowSelection=o.allowSelection,r.captureUpIfMoved=o.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=o.supportDoubleTap,Ge(r,{element:e,surface:o.surface||e,stopPropagation:o.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Be(r.surface,Me("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Be(r.surface,Me("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Be(e,Me("down"),i,this._elementStartHandler),e.style["touch-action"]=o.touchAction||"none",o.preventDragEvent&&(this._elementDragStartHandler=We,Be(e,Me("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Be(e,Me("mousedown"),i,this._elementSelectHandler),r.captureUpIfMoved){var s=r.surface;r._preventIfMovingProxy=r.preventIfMoving.bind(r),co((function(t){s.addEventListener(t,r._preventIfMovingProxy,!0)}))}r.bind([qe,Ze,eo,oo,Ke,$e,Je,io,to,"gesturestart",ro,no,so,Qe],o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},e.prototype.destroy=function(){var t=this,e=this.options,o=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved){var i=t.surface;co((function(e){i.removeEventListener(e,t._preventIfMovingProxy,!0)}))}Ee(t.surface,Me("move"),this._surfaceMoveHandler),Ee(t.surface,Me("up cancel"),this._surfaceEndHandler),Ee(o,Me("down"),this._elementStartHandler),e.preventDragEvent&&Ee(o,Me("dragstart"),this._elementDragStartHandler),Ee(o,Me("mousedown"),this._elementSelectHandler),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget}},e.prototype.capture=function(){e.current=this},e.prototype.cancel=function(){this._disposeAll(),this.trigger(to)},e.prototype.notify=function(t,e){var o,i,r,n,s,a,p,l,h=this.touches,c=t;if(this._isMultiTouch()){switch(c){case $e:c=ro;break;case Je:c=no;break;case eo:c=so}Ge(e,{touches:h},(o=h[0],i=h[1],r=o.x.location,n=o.y.location,p=r-(s=i.x.location),l=n-(a=i.y.location),{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+l*l)}))}return this.trigger(c,Ge(e,{type:c}))},e.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},e.prototype.move=function(t,e){this._apiCall("_move",t,e)},e.prototype.end=function(t,e){this._apiCall("_end",t,e)},e.prototype._isMultiTouch=function(){return this.touches.length>1},e.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},e.prototype._disposeAll=function(){for(var t=this.touches;t.length>0;)t.pop().dispose()},e.prototype._isMoved=function(){return wt(this.touches,(function(t){return t.isMoved()})).length},e.prototype._select=function(t){this.allowSelection&&!this.trigger(Qe,{event:t})||t.preventDefault()},e.prototype._start=function(t){if(!(t.which&&t.which>1||this._maxTouchesReached())){var o;e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var i=po(t),r=0;r<i.length&&!this._maxTouchesReached();r++){var n=i[r];if(!(o=this.filter?n.currentTarget:this.element)||0!==o.length){var s=new ho(this,o,n);this.touches.push(s),s.press(),this._isMultiTouch()&&this.notify("gesturestart",{})}}}},e.prototype._move=function(t){this._eachTouch("move",t)},e.prototype._end=function(t){this._eachTouch("end",t)},e.prototype._eachTouch=function(t,e){var o,i,r,n,s={},a=po(e),p=this.touches;for(o=0;o<p.length;o++)s[(i=p[o]).id]=i;for(o=0;o<a.length;o++)(n=s[(r=a[o]).id])&&("move"===t&&"pointer"===r.type&&!this.surface.hasPointerCapture(r.id)&&this.surface.setPointerCapture(r.id),n[t](r))},e.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:je,preventDefault:je})},e.defaultThreshold=function(t){Ye=t},e.minHold=function(t){Xe=t},e}(Ue);const fo=uo;function go(t,e){var o=Zt(e-t,_-1);if(0===o){if(0===e)return.1;o=Math.abs(e)}var i=Math.pow(10,Math.floor(Math.log(o)/Math.log(10))),r=Zt(o/i,_);return Zt(i*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),_)}const yo=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var o=qt(e),i=Math.cos(o),r=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Zt(n+(a-n)*i+(p-s)*r,y),this.y=Zt(s+(p-s)*i-(a-n)*r,y),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.onCircle=function(t,o,i){var r=qt(o);return new e(t.x-i*Math.cos(r),t.y-i*Math.sin(r))},e}(q.Class);var vo=function(t){function e(e,o,i,r){t.call(this),this.x1=e||0,this.y1=o||0,this.x2=i||0,this.y2=r||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var o=this.height(),i=this.width();return zt(t)&&(this.x1=t,this.x2=this.x1+i),zt(e)&&(this.y1=e,this.y2=this.y1+o),this},e.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},e.prototype.wrapPoint=function(t){var o=G(t),i=o?t[0]:t.x,r=o?t[1]:t.y;return this.wrap(new e(i,r,i,r)),this},e.prototype.snapTo=function(t,e){return e!==F&&e||(this.x1=t.x1,this.x2=t.x2),e!==H&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var o=this.height(),i=this.width(),r=e===V||e===d?H:F,n=r===H?o:i;if(e===f){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===V||e===C?t[r+1]-n:t[r+2];return this.x2=this.x1+i,this.y2=this.y1+o,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=dt(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=dt(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new yo(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new yo(this.x1,this.y1),new yo(this.x2,this.y1),new yo(this.x2,this.y2),new yo(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=mo(0,0,r,n,t),a=mo(e,0,r,n,t),p=mo(e,o,r,n,t),l=mo(0,o,r,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),o=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+o,this},e.prototype.toRect=function(){return new q.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===F?D:k,s=this[n]();Ct(o,[C,V])?(this[i]=t[i],this[r]=this[i]+s):Ct(o,[I,d])?(this[r]=t[r],this[i]=this[r]-s):o===f&&(this[i]=t[i]+(t[n]()-s)/2,this[r]=this[i]+s)},e}(q.Class);function mo(t,e,o,i,r){var n=qt(r);return new yo(o+(t-o)*Math.cos(n)+(e-i)*Math.sin(n),i-(t-o)*Math.sin(n)+(e-i)*Math.cos(n))}const xo=vo;var _o=function(t){function e(e,o,i,r,n){t.call(this),this.center=e,this.innerRadius=o,this.radius=i,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var o=qt(t),i=Math.cos(o),r=Math.sin(o),n=e?this.innerRadius:this.radius,s=Zt(this.center.x-i*n,y),a=Zt(this.center.y-r*n,y);return new yo(s,a)},e.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,p=Math.sin(qt(r)),l=Math.cos(qt(r)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new xo(h,c,h+e,c+o)},e.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,p=new yo(s,a),l=this.point(r),h=new yo(l.x-e.x,l.y-e.y),c=this.point(n),u=new yo(c.x-e.x,c.y-e.y),d=Zt(s*s+a*a,y);return(h.equals(p)||Q(h,p))&&!Q(u,p)&&d>=o*o&&d<=i*i},e.prototype.getBBox=function(){var t,e=new xo(P,P,T,T),o=Zt(this.startAngle%360),i=Zt((o+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,o,i].sort(bo),s=n.indexOf(o),a=n.indexOf(i);t=o===i?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(q.Class);function bo(t,e){return t-e}const wo=_o;var ko=function(t){function e(e,o,i,r){t.call(this,e,0,o,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(wo);const Ao=ko;var So=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;(0===t.angle||t.angle>0&&o===i)&&(i+=.001);var r=new q.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new q.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),p=q.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var l=a.pointAt(i);p.lineTo(l.x,l.y),p.arc(i,o,s,s,!0)}else p.lineTo(r.x,r.y);return p},e}(q.Class);So.current=new So;const Co=So;var Po=function(t){function e(e){t.call(this),this.children=[],this.options=at({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,o=this.children,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},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},e.prototype.createVisual=function(){this.visual=new q.drawing.Group({zIndex:this.options.zIndex,visible:Kt(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=q.drawing.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):zt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,o=t.options.zIndex||0,i=this.visual.children,r=i.length;for(e=0;e<r;e++){var n=i[e];if(Kt(n.options.zIndex,0)>o)break}this.visual.insert(e,t)},e.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)}},e.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},e.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:z,opacity:e||.2},stroke:{color:z,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);zt(n.options.zIndex)||(n.options.zIndex=Kt(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.toggleFocusHighlight=function(t){var e=(this.options||{}).focusHighlight||{},o=this._focusHighlight;if(t||o){if(!o){var i=this.getRoot().options.background,r=fe(i),n={fill:{opacity:e.opacity,color:e.color},stroke:Object.assign({},{color:r},e.border),zIndex:e.zIndex};o=this._focusHighlight=this.createFocusHighlight(n),this.appendVisual(o)}o.visible(t)}},e.prototype.createGradientOverlay=function(t,e,o){var i=new q.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(q.Class);Po.prototype.options={};const To=Po;var Mo={dots:q.drawing.dotsPattern,verticalStripes:q.drawing.verticalStripesPattern,crosshatch:q.drawing.crosshatchPattern,diagonalStripes:q.drawing.diagonalStripesPattern,grid:q.drawing.gridPattern};function Oo(t,e,o){var i=function(t,e){return it(t)?t(e):t}(t,o),r=i&&Mo[i.type];return r?r(Object.assign({},e,i)):e}var Lo=function(t){function e(e){t.call(this,e),this.options.margin=dt(this.options.margin),this.options.padding=dt(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,l=r.margin,h=r.padding,c=r.border.width,u=function(){i.align(e,F,r.align),i.align(e,H,r.vAlign),i.paddingBox=o.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),o=p?this.box=new xo(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=o.clone(),o.pad(h).pad(c).pad(l),u()),this.translateChildren(o.x1-d.x1+l.left+c+h.left,o.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},e.prototype.align=function(t,e,o){this.box.align(t,e,o)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(q.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:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:Oo(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},e}(To);te(Lo,{align:C,vAlign:V,margin:{},padding:{},border:{color:u,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Io=Lo;function Bo(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}var Eo=function(t){function e(e,o){t.call(this,e),this.pointData=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,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();if(o===g)a=new q.drawing.Circle(new q.geometry.Circle([Zt(e.x1+n,y),Zt(e.y1+s,y)],Math.min(n,s)),p);else if("triangle"===o)a=q.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close();else if(o===v)(a=new q.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var l=e.toRect();if(o===B){var h=Kt(t.borderRadius,l.width()/5);l.setCornerRadius(h)}a=q.drawing.Path.fromRect(l,p)}return i&&a.transform(q.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},e.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement(),Bo(this.visual,this.options.accessibilityOptions)},e}(Io);te(Eo,{type:g,align:f,vAlign:f});const Ro=Eo;var Vo="radial";const jo={glass:{type:"linear",rotation:0,stops:[{offset:0,color:z,opacity:0},{offset:.25,color:z,opacity:.3},{offset:1,color:z,opacity:0}]},sharpBevel:{type:Vo,stops:[{offset:0,color:z,opacity:.55},{offset:.65,color:z,opacity:0},{offset:.95,color:z,opacity:.25}]},roundedBevel:{type:Vo,stops:[{offset:.33,color:z,opacity:.06},{offset:.83,color:z,opacity:.2},{offset:.95,color:z,opacity:0}]},roundedGlass:{type:Vo,supportVML:!1,stops:[{offset:0,color:z,opacity:0},{offset:.5,color:z,opacity:.3},{offset:.99,color:z,opacity:0}]},sharpGlass:{type:Vo,supportVML:!1,stops:[{offset:0,color:z,opacity:.2},{offset:.15,color:z,opacity:.15},{offset:.17,color:z,opacity:.35},{offset:.85,color:z,opacity:.05},{offset:.87,color:z,opacity:.15},{offset:.99,color:z,opacity:0}]},bubbleShadow:{type:Vo,center:[.5,.5],radius:.5}};function zo(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),l=Math.max(t.y2,e.y2),h=[];return h[0]=new xo(i,s,r,a),h[1]=new xo(o,a,i,p),h[2]=new xo(r,a,n,p),h[3]=new xo(i,p,r,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(h[4]=new xo(o,s,i,a),h[5]=new xo(r,p,n,l)):(h[4]=new xo(r,s,n,a),h[5]=new xo(o,p,i,l)),wt(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var Do=function(t){function e(e){t.call(this,e);var o=this.options;o.width=parseInt(o.width,10),o.height=parseInt(o.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,o=new xo(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=zo(o,e[i].box)||new xo},e.prototype.createVisual=function(){this.visual=new q.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),i=q.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(i)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,o=this.gradients,i=Yt(t),r=jo[t.gradient];if(o[i])e=o[i];else{var n=Object.assign({},r,t);"linear"===r.type?e=new q.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,o=t.innerRadius/t.radius*100,i=e.length,r=[],n=0;n<i;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-o)+o)/100,r.push(s)}return r}(n)),(e=new q.drawing.RadialGradient(n)).supportVML=!1!==r.supportVML),o[i]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new xo(0,0,t.width,t.height)},e}(To);te(Do,{width:600,height:400,background:z,border:{color:u,width:0},margin:dt(5),zIndex:-2});const Fo=Do;var Ho=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=F,this.elementAxis=H,this.groupSizeField=D,this.elementSizeField=k,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=H,this.elementAxis=F,this.groupSizeField=k,this.elementSizeField=D,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this,e=t.box,o=t.elementAxis,i=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,s=this.groupOptions(),a=s.groups,p=s.groupsSize,l=s.maxGroupElementsSize,h=a.length,c=e[i+1]+this.alignStart(p,e[n]());if(h){for(var u=c,d=0;d<h;d++){for(var f=a[d],g=f.groupElements,y=e[o+1],v=g.length,m=0;m<v;m++){var x=g[m],_=this.elementSize(x),b=u+this.alignStart(_[n],f.groupSize),w=new xo;w[i+1]=b,w[i+2]=b+_[n],w[o+1]=y,w[o+2]=y+_[r],x.reflow(w),y+=_[r]+this.elementSpacing}u+=f.groupSize+this.groupSpacing}e[i+1]=c,e[i+2]=c+p,e[o+2]=e[o+1]+l}},e.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===I||i===d?o=e-t:i===f&&(o=(e-t)/2),o},e.prototype.groupOptions=function(){for(var t=this,e=t.box,o=t.children,i=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=Zt(e[i]()),p=o.length,l=[],h=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=o[g];y.box||y.reflow(e);var v=this.elementSize(y);this.options.wrap&&Zt(c+n+v[i])>a&&(l.push({groupElements:f,groupSize:h,groupElementsSize:c}),d=Math.max(d,c),u+=s+h,h=0,c=0,f=[]),h=Math.max(h,v[r]),c>0&&(c+=n),c+=v[i],f.push(y)}return l.push({groupElements:f,groupSize:h,groupElementsSize:c}),{groups:l,groupsSize:u+=h,maxGroupElementsSize:d=Math.max(d,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(To);te(Ho,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const No=Ho;var Uo=q.drawing.Text,Go=function(t){function e(e,o){t.call(this,o),this.content=e,this.reflow(new xo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=e.size=q.drawing.util.measureText(this.content,{font:e.font});this.baseline=o.baseline,this.box=new xo(t.x1,t.y1,t.x1+o.width,t.y1+o.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,r=t.cursor,n=t.stroke,s=t.paintOrder;this.visual=new Uo(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:r,stroke:n,paintOrder:s})},e}(To);te(Go,{font:x,color:u});const Wo=Go;function Xo(t){var e=t.origin,o=t.bottomRight();return new xo(e.x,e.y,o.x,o.y)}var Yo=/\n/m,qo=function(t){function e(e,o,i){t.call(this,o),this.content=e,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new xo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Yo),o=new No({vertical:!0,align:t.align,wrap:!1}),i=at({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Wo(e[r].trim(),i);o.append(n)}},e.prototype.reflow=function(e){var o=this.options,i=o.visual;if(this.container.options.align=o.align,i&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=i(this.visualContext(r));n&&(r=Xo(n.clippedBBox()||new q.geometry.Rect),n.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),o.rotation){var s=dt(o.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new q.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=q.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!zt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,F,t.align),this.align(this.targetBox,H,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,r=this.rotatedBox.center();return q.geometry.transform().translate(r.x-o,r.y-i).rotate(t,[o,i])},e}(Io);const Zo=qo;var Qo=function(t){function e(e){t.call(this,e),this._textBox=new Zo(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,F)},e.buildTitle=function(t,o){var i,r=t;return"string"==typeof t&&(r={text:t}),(r=Object.assign({visible:!0},o,r))&&r.visible&&r.text&&(i=new e(r)),i},e.orderTitles=function(t){var e=[].concat(t),o=e.filter((function(t){return t&&t.options.position!==d})),i=e.filter((function(t){return t&&t.options.position===d}));return Ko(o),Ko(i),i.reverse(),o.concat(i)},e}(To);function Ko(t){for(var e=1;e<t.length;e++){var o=t[e]._textBox,i=t[e-1]._textBox;i.options.margin=Object.assign(dt(i.options.margin),{bottom:0}),o.options.margin=Object.assign(dt(o.options.margin),{top:0})}}te(Qo,{color:u,position:V,align:f,margin:dt(5),padding:dt(5)});const $o=Qo;var Jo=function(t){function e(e,o,i,r,n){t.call(this,o,n),this.text=o,this.value=e,this.index=i,this.dataItem=r,this.reflow(new xo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var o=t.prototype.visualContext.call(this,e);return o.value=this.value,o.dataItem=this.dataItem,o.format=this.options.format,o.culture=this.options.culture,o},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Ut(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==f){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=Xo(e.bbox(o.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,o=e.rotation;if(!o)return null;if(e.alignRotation===f)return t.prototype.rotationTransform.call(this);var i=q.geometry.transform().rotate(o).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||V,a=s===V||s===d?F:H,p=s===V||s===d?H:F,l=s===V||s===C?n.origin:n.bottomRight(),h=r.topLeft().transformCopy(i),c=r.topRight().transformCopy(i),u=r.bottomRight().transformCopy(i),g=r.bottomLeft().transformCopy(i),y=q.geometry.Rect.fromPoints(h,c,u,g),v={};v[p]=n.origin[p]-y.origin[p];var m,x,b=Math.abs(h[p]+v[p]-l[p]),w=Math.abs(c[p]+v[p]-l[p]);Zt(b,_)===Zt(w,_)?(m=h,x=c):w<b?(m=c,x=u):(m=h,x=g);var k=m[a]+(x[a]-m[a])/2;return v[a]=n.center()[a]-k,q.geometry.transform().translate(v.x,v.y).rotate(o)},e}(Zo);te(Jo,{_autoReflow:!1});const ti=Jo;var ei=function(t){function e(e,o,i){t.call(this,o),this.fields=e,this.chartService=i,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var o,i,r=e.label,n=e.icon,s=new xo,a=function(){return t},p=n.size,l=this.fields.text;if(zt(r)&&r.visible){var h=vt(r);h?l=h(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color=r.position===A?"#fff":n.background),this.label=new Zo(l,at({},r)),this.label.aliasFor=a,r.position!==A||zt(p)||(n.type===g?p=Math.max(this.label.box.width(),this.label.box.height()):(o=this.label.box.width(),i=this.label.box.height()),s.wrap(this.label.box))}n.width=o||p||7,n.height=i||p||7;var c=new Ro(at({},n));c.aliasFor=a,this.marker=c,this.append(c),this.label&&this.append(this.label),c.reflow(new xo),this.wrapperBox=s.wrap(c.box)}},e.prototype.reflow=function(t){var e,o,i,r=this,n=r.options,s=r.label,a=r.marker,p=r.wrapperBox,l=t.center(),h=n.line.length,c=n.position;n.visible&&(Ct(c,[C,I])?c===C?(i=p.alignTo(t,c).translate(-h,t.center().y-p.center().y),n.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[i.x2,l.y]],o=i.clone().wrapPoint(e))):(i=p.alignTo(t,c).translate(h,t.center().y-p.center().y),n.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[i.x1,l.y]],o=i.clone().wrapPoint(e))):c===d?(i=p.alignTo(t,c).translate(t.center().x-p.center().x,h),n.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,i.y1]],o=i.clone().wrapPoint(e))):(i=p.alignTo(t,c).translate(t.center().x-p.center().x,-h),n.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,i.y2]],o=i.clone().wrapPoint(e))),a&&a.reflow(i),s&&(s.reflow(i),a&&(n.label.position===L&&s.box.alignTo(a.box,c),s.reflow(s.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,o=this.options,i=o.visual;o.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:o.background,border:o.background,icon:o.icon,label:o.label,line:o.line,position:o.position,visible:o.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=q.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Z(e),this.visual.append(e)}},e.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},e.prototype.out=function(t,e){var o=this.eventArgs(e);t.trigger("noteLeave",o)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Ut(t),text:zt(e.label)?e.label.text:"",visual:this.visual})},e}(Io);te(ei,{icon:{visible:!0,type:g},label:{position:A,visible:!0,align:f,vAlign:f},line:{visible:!0},visible:!0,position:V,zIndex:2});const oi=ei;var ii={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},ri=ii,ni=function(){},si={implementation:{configurable:!0}};ni.register=function(t){ri=t},si.implementation.get=function(){return ri},Object.defineProperties(ni,si);const ai=ni;var pi=/\{(\d+)(:[^\}]+)?\}/g,li=function(t){this._intlService=t},hi={intl:{configurable:!0}};hi.intl.get=function(){return this._intlService||ai.implementation},hi.intl.set=function(t){this._intlService=t},li.prototype.auto=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];var i=this.intl;return $(t)&&t.match(w)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},li.prototype.localeAuto=function(t,e,o){var i,r=this.intl;return i=$(t)&&t.match(w)?t.replace(pi,(function(t,i,n){var s=e[parseInt(i,10)];return r.toString(s,n?n.substring(1):"",o)})):r.toString(e[0],t,o),i},Object.defineProperties(li.prototype,hi);const ci=li;var ui=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new ci(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},di={intl:{configurable:!0}};di.intl.get=function(){return this._intlService||ai.implementation},di.intl.set=function(t){this._intlService=t,this.format.intl=t},ui.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},ui.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(ui.prototype,di);const fi=ui;var gi,yi=function(){};yi.register=function(t){gi=t},yi.create=function(t,e){return gi?gi.create(t,e):new fo(t,Object.assign({},{multiTouch:!0},e))};const vi=yi;function mi(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new q.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),Z(n),n}function xi(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,n=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(o,r).lineTo(i,r):n.moveTo(r,o).lineTo(r,i),Z(n),n}var _i=function(t){function e(e,o){void 0===o&&(o=new fi),t.call(this,e),this.chartService=o,this.options.visible||(this.options=at({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==M},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==M},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;pt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?I:f,o=at({},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},a=this.createAxisLabel(n,o,s);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=wt(this.children,(function(t){return!(t instanceof ti)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=wt(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,n=i?e.y2:e.y1,s=t.line.width||0;return o?new xo(r,e.y1,r,e.y2-s):new xo(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=at({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var o=new Zo(e.text,e);this.append(o),this.title=o}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=at({},e,o[i]);r.value=this.parseNoteValue(r.value);var n=new oi({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(zt(n.options.position)?t.vertical&&!Ct(n.options.position,[C,I])?n.options.position=t.reverse?C:I:t.vertical||Ct(n.options.position,[V,d])||(n.options.position=t.reverse?d:V):t.vertical?n.options.position=t.reverse?C:I:n.options.position=t.reverse?d:V,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new q.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,o=this.lineBox(),i=e.labels.mirror,r=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,r,s){var a=e.length,p=Math.max(1,r.step);if(r.visible)for(var l=r.skip;l<a;l+=p)zt(s)&&l%s==0||(n.tickX=i?o.x2:o.x2-r.size,n.tickY=i?o.y1-r.size:o.y1,n.position=e[l],t.append(mi(n,r)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,r/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();if(e.width>0&&e.visible){var i=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});i.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&Z(i);var r=this._lineGroup=new q.drawing.Group;r.append(i),this.visual.append(r),this.createTicks(r)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,o=t.background;o&&(this._backgroundPath=q.drawing.Path.fromRect(e.toRect(),{fill:{color:o},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,o=e.plotBands||[],i=e.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),s=wt(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<o.length;a++){var p=o[a],l=void 0,h=void 0,c=p.label,u=void 0;if(i?(l=(s||r.axisX).lineBox(),h=this.getSlot(p.from,p.to,!0)):(l=this.getSlot(p.from,p.to,!0),h=(s||r.axisY).lineBox()),c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new xo(l.x1,h.y1,l.x2,h.y2))),0!==l.width()&&0!==h.height()){var d=new q.geometry.Rect([l.x1,h.y1],[l.width(),h.height()]),f=q.drawing.Path.fromRect(d,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(f),u&&n.append(u)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;if(zt(t)&&t.visible){var n=vt(t);n?r=n({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)}return(i=new Zo(r,t)).reflow(o),i.renderVisual(),i.visual},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=i.visible?e.majorUnit:0,p=t.lineBox(),l=p[n?"y1":"x1"],h={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function d(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var a=Zt(t[n]);Ct(a,c)||n%o==0||s&&l===a||(h.position=a,u.append(xi(h,e)),c.push(a))}}return d(this.getMajorTickPositions(),i),d(this.getMinorTickPositions(),o,a/r),u.children},e.prototype.reflow=function(t){for(var e=this,o=e.options,i=e.labels,r=e.title,n=o.vertical,s=i.length,a=n?D:k,p=r?r.box[a]():0,l=this.getActualTickSize()+o.margin+p,h=((this.getRoot()||{}).box||t)[a](),c=0,u=0;u<s;u++){var d=i[u].box[a]();d+l<=h&&(c=Math.max(c,d))}this.box=n?new xo(t.x1,t.y1,t.x1+c+l,t.y2):new xo(t.x1,t.y1,t.x2,t.y1+c+l),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),l=i?a.box.height():a.box.width(),h=n[p],c=n[p+1],u=void 0,d=void 0;i?d=u=o?h+(c-h)/2-l/2:h-l/2:o?(u=h,d=c):d=(u=h-l/2)+l,this.positionLabel(a,r,u,d)}},e.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r,n=this.options,s=n.vertical,a=this.lineBox(),p=this.getActualTickSize()+n.margin;if(s){var l=a.x2;e?(l+=p,t.options.rotationOrigin=C):(l-=p+t.box.width(),t.options.rotationOrigin=I),r=t.box.move(l,o)}else{var h=a.y1;e?(h-=p+t.box.height(),t.options.rotationOrigin=d):(h+=p,t.options.rotationOrigin=V),r=new xo(o,h,i,h+t.box.height())}t.reflow(r)},e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},e.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,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,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(i=a),-90===i)break}if(0!==i){for(var p=0;p<e.length;p++)e[p].options.rotation=i,e[p].reflow(new xo);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,i=t.vertical;e&&(i?(e.options.align=o?I:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?V:d),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;zt(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,i=o?H:F;this.box.snapTo(e,i),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[i+1]-=this.lineBox()[i+1]-e[i+1],this.box[i+2]-=this.lineBox()[i+2]-e[i+2]},e.prototype.axisLabelText=function(t,e,o){var i=this,r=vt(e),n=function(){return e.format?i.chartService.format.localeAuto(e.format,[t],e.culture):t};return r?r(Object.assign({},o,{get text(){return n()},value:t,format:e.format,culture:e.culture})):n()},e.prototype.slot=function(t,e,o){var i=this.getSlot(t,e,o);if(i)return i.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var o=this.options.vertical?H:F;if(this.chartService.isPannable(o)){var i=this.maxLabelOffset();t[o+1]-=i.start,t[o+2]+=i.end}else{e[0].options.visible&&t.wrap(e[0].box);var r=e[e.length-1];r.options.visible&&t.wrap(r.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,o=t.reverse,i=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?H:F,s=this.labels,a=o?1:0,p=o?0:1,l=0,h=0,c=0;c<s.length;c++){var u=s[c],d=this.labelTickIndex(u),f=void 0,g=void 0;i?(f=r[d+a],g=r[d+p]):f=g=r[d],l=Math.max(l,f-u.box[n+1]),h=Math.max(h,u.box[n+2]-g)}return{start:l,end:h}},e.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!zt(n.min)||n.min<=o)||i<e&&r>0&&(!zt(n.max)||i<=n.max))return null;if(e<o&&r>0||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<o&&r<0?(a=Xt(t,o,i),p=Xt(t+s,o+s,i)):e>i&&r>0&&(p=Xt(e,o,i),a=Xt(e-s,o,i-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},e.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),i=t?H:F,r=this.lineDir(),n=i+(1===r?1:2).toString();return{axis:i,axisOrigin:n,axisDir:r,lineBox:e,lineSize:o,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(i>0?t[o]-n[r]:n[r]-t[o])/s},e.prototype.scaleToDelta=function(t,e){var o=Xt(t,-.999,.999);return o>0?e*Math.min(1,o):e-e/(1+o)},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(To);te(_i,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:u,visible:!0},title:{visible:!0,position:f},majorTicks:{align:L,size:4,skip:0,step:1},minorTicks:{align:L,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:L,minorTickType:M,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:u,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const bi=_i;var wi="milliseconds",ki="seconds",Ai="minutes",Si="hours",Ci="days",Pi="weeks",Ti="months",Mi="years",Oi=6e4,Li=36e5,Ii=864e5,Bi=6048e5,Ei=26784e5,Ri=31536e6,Vi={years:Ri,months:Ei,weeks:Bi,days:Ii,hours:Li,minutes:Oi,seconds:1e3,milliseconds:1};function ji(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Oi}function zi(t,e){return new Date(t.getTime()+e)}function Di(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Fi(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Hi(t,e,o,i){var r=t;if(t){var n=Di(t),s=n.getHours();o===Mi?Fi(r=new Date(n.getFullYear()+e,0,1),0):o===Ti?Fi(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):o===Pi?(r=Hi(function(t,e){void 0===e&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return zi(t,-o*Ii)}(n,i),7*e,Ci),Fi(r,s)):o===Ci?Fi(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):o===Si?r=function(t,e){var o=new Date(t);o.setMinutes(0,0,0);var i=(t.getTimezoneOffset()-o.getTimezoneOffset())*Oi;return zi(o,i+e*Li)}(n,e):o===Ai?(r=zi(n,e*Oi)).getSeconds()>0&&r.setSeconds(0):o===ki?r=zi(n,1e3*e):o===wi&&(r=zi(n,e)),o!==wi&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function Ni(t,e,o){return Hi(Di(t),0,e,o)}function Ui(t,e,o){var i=Di(t);return i&&Ni(i,e,o).getTime()===i.getTime()?i:Hi(i,1,e,o)}function Gi(t,e){return t&&e?t.getTime()-e.getTime():-1}function Wi(t,e){return t.getTime()-e}function Xi(t){if(G(t)){for(var e=[],o=0;o<t.length;o++)e.push(Xi(t[o]));return e}if(t)return Di(t).getTime()}function Yi(t,e){return t&&e?Xi(t)===Xi(e):t===e}function qi(t,e,o){return ji(t,e)/Vi[o]}function Zi(t,e,o,i){var r=Di(t),n=Di(e);return(o===Ti?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+qi(r,new Date(r.getFullYear(),r.getMonth()),Ci)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===Mi?r.getFullYear()-n.getFullYear()+Zi(r,new Date(r.getFullYear(),0),Ti,1)/12:o===Ci||o===Pi?qi(r,n,o):Wi(r,e)/Vi[o])/i}function Qi(t,e,o){return o===Mi?e.getFullYear()-t.getFullYear():o===Ti?12*Qi(t,e,Mi)+e.getMonth()-t.getMonth():o===Ci?Math.floor(Wi(e,t)/Ii):Math.floor(Wi(e,t)/Vi[o])}function Ki(t,e){return $(e)&&t.parseDate(e)||Di(e)}function $i(t,e){if(G(e)){for(var o=[],i=0;i<e.length;i++)o.push(Ki(t,e[i]));return o}return Ki(t,e)}function Ji(t,e){return K(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var tr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],o=zt(t.min),i=zt(t.max);if(t.srcCategories=t.categories=e,(o||i)&&e.length){var r,n=o?Math.floor(t.min):0;r=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,r)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:K(t.min)?t.min%1:0,max:K(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.range=function(){var t=this.options;return{min:K(t.min)?t.min:0,max:K(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(o-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:o}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length>0){var o=this.options.vertical?H:F,i=t[o+1],r=t[o+2],n=e[0],s=Wt(e);(n.box[o+1]>r||n.box[o+2]<i)&&(n.options.visible=!1),(s.box[o+1]>r||s.box[o+2]<i)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,i=e.max,r=Math.ceil(i),n=Math.floor(o),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(o?H:F)+(i?2:1)],l=this.tickIndices(t),h=[],c=0;c<l.length;c++)h.push(p+Zt(n*(l[c]-a),y));return h},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),r=i.getHash()+o.min+","+o.max+t.reverse+t.justified;if(e._hash!==r){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=r,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?H:F,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])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),n=e?H:F,s=o?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:i,lineSize:r,lineStart:i[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.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,l=s.min,h=this.lineInfo(),c=h.axis,u=h.lineStart,d=p.clone(),f=!zt(e),g=Kt(t,0),y=Kt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*a,m=u+((y=Math.max(g,y))+1-l)*a;return f&&n&&(m=v),o&&(v=Xt(v,p[c+1],p[c+2]),m=Xt(m,p[c+1],p[c+2])),d[c+1]=r?m:v,d[c+2]=r?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?H:F,o=this.lineBox(),i=t.clone();return i[e+1]=Xt(t[e+1],o[e+1],o[e+2]),i[e+2]=Xt(t[e+2],o[e+1],o[e+2]),i},e.prototype.slot=function(e,o,i){var r=Math.floor(this.options.min||0),n=e,s=o;return"string"==typeof n?n=this.categoryIndex(n):K(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):K(s)&&(s-=r),t.prototype.slot.call(this,n,s,i)},e.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?H:F,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,l=n.max,h=o?l:p,c=a[r+1],u=a[r+2],d=t[r];if(d<c||d>u)return null;var f=h+(d-c)/s,g=f%1;return i?f=Math.round(f):0===g&&f>0&&f--,Math.floor(f)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=e.categories.length,n=Zt(t/(i/r),_);return{min:n,max:r+n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),r=i.max-i.min,n=this.scaleToDelta(t,r),s=o*n,a=(1-o)*n,p=i.min+s,l=i.max-a;return l-p<.1&&(l=p+.1),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,r=o.max,n=this.scaleRange(t,e);return{min:Xt(n.min,i,r),max:Xt(n.max,i,r)}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.limitedRangeIndices(!0),r=i.min,n=i.max,s=Math.floor(r);return e?(r=Math.ceil(r),n=Math.floor(n)):(r=Math.floor(r),n=Math.ceil(n)),{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,n=Kt(i.categories[t],"");o.dataItem=r;var s=this.axisLabelText(n,e,o);return new ti(n,s,t,r,e)},e.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,o=t-Math.floor(e.min||0);return this.getSlot(o)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?H:F,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()}},e.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),o=this.scaleOptions().scale,i=Zt(t/o,_),r=this.totalRange(),n=e.min+i,s=e.max+i;return this.limitRange(n,s,0,r.max,i)},e.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?H:F,n=this.limitedRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(i?2:1)],l=t[r]-p,h=e[r]-p,c=n.min+l/a,u=n.min+h/a,d=Math.min(c,u),f=Math.max(c,u);if(f-d>=.01)return{min:d,max:f}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options,o=this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Yi(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories);return o},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return K(t.min)&&(e=Math.floor(t.min)),{min:e,max:K(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.limitedRangeIndices=function(t){var e,o=this.options,i=K(o.min)?o.min:0;if(e=K(o.max)?o.max:K(o.min)?i+o.categories.length:this.totalRange().max||1,t){var r=this.totalRange();i=Xt(i,0,r.max),e=Xt(e,0,r.max)}return{min:i,max:e}},e.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},e.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new St,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(bi);te(tr,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:u},labels:{zIndex:1},justified:!1,_deferLabels:!0});const er=tr;var or={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"},ir=[wi,ki,Ai,Si,Ci,Pi,Ti,Mi],rr="fit";function nr(t,e){e&&(t._range=void 0);var o=t._range;return o||((o=t._range=pe(t)).min=Di(o.min),o.max=Di(o.max)),o}var sr=function(t){this.options=t};sr.prototype.displayIndices=function(){return{min:0,max:1}},sr.prototype.displayRange=function(){return{}},sr.prototype.total=function(){return{}},sr.prototype.valueRange=function(){return{}},sr.prototype.valueIndex=function(){return-1},sr.prototype.values=function(){return[]},sr.prototype.totalIndex=function(){return-1},sr.prototype.valuesCount=function(){return 0},sr.prototype.totalCount=function(){return 0},sr.prototype.dateAt=function(){return null};var ar=function(t,e,o){this.options=o,o.baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=Hi(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Yi(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;var p=o.max;if(p){var l=!r&&Yi(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,l),this.displayEnd=i?this.roundToTotalStep(p,!r):o.max}else 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 pr(t,e,o){for(var i,r,n,s=nr(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,l=t.maxDateGroups,h=t.baseUnit===rr,c=e?ir.indexOf(e):0,u=h?ir[c++]:t.baseUnit,d=a/Vi[u],f=d;!r||d>=l;){i=i||p[u].slice(0);do{n=i.shift()}while(n&&e===u&&n<o);if(n)d=f/(r=n);else{if(u===Wt(ir)){r=Math.ceil(f/l);break}if(!h){d>l&&(r=Math.ceil(f/l));break}u=ir[c++]||Wt(ir),f=a/Vi[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}ar.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},ar.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,o=t.baseUnitStep,i=Zi(this.displayStart,this.valueStart,e,o),r=Zi(this.displayEnd,this.valueStart,e,o);this._indices={min:i,max:r}}return this._indices},ar.prototype.total=function(){return{min:this.start,max:this.end}},ar.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},ar.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},ar.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Zi(t,this.valueStart,e.baseUnit,e.baseUnitStep))},ar.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Zi(t,this.start,e.baseUnit,e.baseUnitStep))},ar.prototype.dateIndex=function(t){var e=this.options;return Zi(t,this.valueStart,e.baseUnit,e.baseUnitStep)},ar.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},ar.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=Hi(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},ar.prototype.dateAt=function(t,e){var o=this.options;return Hi(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},ar.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,a=this.start,p=Zi(t,a,r,n),l=e?Math.ceil(p):Math.floor(p);return o&&(l+=o),Hi(a,l*n,r,s)};var lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,o=e.intl,i=this.options,r=i.categories||[];if(r._parsed||((r=$i(o,r))._parsed=!0),i=at({roundToBaseUnit:!0},i,{categories:r,min:Ki(o,i.min),max:Ki(o,i.max),weekStartDay:Ji(i,o)}),e.panning&&e.isPannable(i.vertical?H:F)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,this.options=i,i.srcCategories=r,r.length>0){var n=nr(r,!0),s=i.maxDivisions,a=function(t){var e=(t.baseUnit||"").toLowerCase();return e!==rr&&!Ct(e,ir)&&function(t){for(var e,o,i=t.categories,r=zt(i)?i.length:0,n=P,s=0;s<r;s++){var a=i[s];if(a&&e){var p=Math.abs(ji(a,e));0!==p&&(o=(n=Math.min(n,p))>=Ri?Mi:n>=24192e5?Ti:n>=Bi?Pi:n>=Ii?Ci:n>=Li?Si:n>=Oi?Ai:ki)}e=a}t.baseUnit=o||Ci}(t),e!==rr&&"auto"!==t.baseUnitStep||pr(t),t}(i),p=i._forecast;if(p&&(p.before>0&&(n.min=Hi(n.min,-p.before,a.baseUnit,a.weekStartDay)),p.after>0&&(n.max=Hi(n.max,p.after,a.baseUnit,a.weekStartDay))),this.dataRange=new ar(n.min,n.max,a),s){var l=this.dataRange.displayRange(),h=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:l.min,max:l.max,maxDateGroups:s}),c=this.dataRange.options;pr(h,c.baseUnit,c.baseUnitStep),this.divisionRange=new ar(n.min,n.max,h)}else this.divisionRange=this.dataRange}else i.baseUnit=i.baseUnit||Ci,this.dataRange=this.divisionRange=new sr(i);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var o=this.dataRange,i=this.divisionRange,r=i.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=i.values(),a=0;this.options.justified||(s=s.concat(i.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(o.dateIndex(s[p])+a),1!==e&&p>=1){var l=n.length-1;n.splice(p,0,n[l-1]+(n[l]-n[l-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return Gi(t,e.min)>=0&&Gi(t,e.max)<=0&&o.length},e.prototype.parseNoteValue=function(t){return Ki(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),l=Zt(t/p,_);if(a.min&&a.max){var h=zi(e.min||a.min,l),c=zi(e.max||a.max,l);a={min:Hi(h,0,o,i),max:Hi(c,0,o,i)}}return a},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Zt(t/(i/(s-n)),_)*(e.reverse?-1:1),l=zi(n,p),h=zi(s,p),c=this.limitRange(Xi(l),Xi(h),Xi(a.min),Xi(a.max),p);return c?(c.min=Di(c.min),c.max=Di(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,o){if(this.isEmpty())return null;var i=t.prototype.pointsRange.call(this,e,o),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Wi(r.max,r.min)/(n.max-n.min),a=this.options;return{min:zi(r.min,i.min*s),max:zi(r.min,i.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===rr,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),l=a-s,h=this.scaleToDelta(t,l),c=Math.round(p*h),u=Math.round((1-p)*h),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+c),g=new Date(a.getTime()-u);if(i){var y,v,m=o.autoBaseUnitSteps,x=o.maxDateGroups,_=Wt(m[d])*x*Vi[d],b=Wi(a,s),w=Wi(g,f),k=ir.indexOf(d);if(w<Vi[d]&&d!==wi)d=ir[k-1],f=zi(s,v=(b-(x-1)*(y=Wt(m[d]))*Vi[d])/2),g=zi(a,-v);else if(w>_&&d!==Mi){var A=0;do{k++,d=ir[k],A=0,v=2*Vi[d];do{y=m[d][A],A++}while(A<m[d].length&&v*y<b)}while(d!==Mi&&v*y<b);(v=(v*y-b)/2)>0&&(f=zi(s,-v),g=zi(a,v),f=zi(f,Xt(g,r.min,r.max)-g),g=zi(g,Xt(f,r.min,r.max)-f))}}return f&&g&&Wi(g,f)>0?{min:f,max:g,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),i=this.scaleRange(t,e);return i&&(i.min<o.min&&(i.min=o.min),i.max>o.max&&(i.max=o.max)),i},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createLabels=function(){t.prototype.createLabels.call(this),this.createRangeLabels()},e.prototype.clearLabels=function(){t.prototype.clearLabels.call(this),this.rangeLabels=[]},e.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),t.prototype.arrangeLabels.call(this)},e.prototype.arrangeRangeLabels=function(){var t=this.options,e=this.rangeLabels;if(0!==e.length){var o=this.lineBox(),i=t.vertical,r=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=i?o.y1-n.box.height()/2:o.x1;this.positionLabel(n,r,s)}var a=e[1];if(a){var p=i?o.y2-a.box.height()/2:o.x2;this.positionLabel(a,r,p)}}},e.prototype.autoRotateLabels=function(){t.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){t.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},e.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var 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;n>0&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1,0))}},e.prototype.contentBox=function(){for(var e=t.prototype.contentBox.call(this),o=this.rangeLabels,i=0;i<o.length;i++){var r=o[i];r.options.visible&&e.wrap(r.box)}return e},e.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),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,o.dataItem=r;var a=this.axisLabelText(n,e,o);if(a)return new ti(n,a,t,r,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,o=e.displayStart,i=e.displayEnd,r=this.options,n=Object.assign({},r.labels,r.rangeLabels,{align:f,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=f,"auto"===n.rotation&&(n.rotation=0,r.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var a=function(e,o,i){if(i){var r=new ti(o,i,e,null,n);t.append(r),t.rangeLabels.push(r)}};a(0,o,this.axisLabelText(o,n,{index:0,count:2})),a(1,i,this.axisLabelText(i,n,{index:1,count:2}))}},e.prototype.autoRotateRangeLabels=function(){var t=this,e=this.rangeLabels;if(this.options.autoRotateRangeLabels&&!this.options.vertical&&2===e.length){var o=function(e,o,i){var r=2*Math.abs(o[i+1]-o[i]),n=t.autoRotateLabelAngle(e.box,r);0!==n&&(e.options.rotation=n,e.reflow(new xo))},i=this.getMajorTickPositions();o(e[0],i,0),o(e[1],i,i.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,o){var i=this.dataRange,r=t,n=e;r instanceof Date&&(r=i.dateIndex(r)),n instanceof Date&&(n=i.dateIndex(n));var s=this.getSlot(r,n,o);if(s)return s.toRect()},e.prototype.getSlot=function(e,o,i){var r=e,n=o;return typeof r===O&&(r=this.categoryIndex(r)),typeof n===O&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,i)},e.prototype.valueRange=function(){var t=nr(this.options.srcCategories);return{min:Di(t.min),max:Di(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=nr(t.srcCategories);return new ar(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange()},e}(er);te(lr,{type:m,labels:{dateFormats:or},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});const hr=lr;function cr(t,e){return Zt(Math.floor(t/e)*e,_)}function ur(t,e){return Zt(Math.ceil(t/e)*e,_)}function dr(t){return Math.max(Math.min(t,3e5),-3e5)}var fr=Math.pow(10,1-_),gr=function(t){function e(e,o,i,r){t.call(this,Object.assign({},i,{seriesMin:e,seriesMax:o}),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,o){var i=o.narrowRange,r=function(t,e,o){if(!t&&!e)return 0;var i;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===o||!o&&(e-r)/e>.2)return 0;i=Math.max(0,r-(e-r)/2)}else i=t;return i}(t,e,i),n=function(t,e,o){if(!t&&!e)return 1;var i;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===o||!o&&n>.2)return 0;i=Math.min(0,r-(t-r)/2)}else i=e;return i}(t,e,i),s=go(r,n),a={majorUnit:s};return!1!==o.roundToMajorUnit&&(r<0&&yr(r,s,1/3)&&(r-=s),n>0&&yr(n,s,1/3)&&(n+=s)),a.min=cr(r,s),a.max=ur(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:zt(e.min)?Math.min(t.min,e.min):t.min,max:zt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var o,i,r=e;if(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=zt(e.min),i=zt(e.max);var n=o||i;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=cr(t.min,e.majorUnit),t.max=ur(t.max,e.majorUnit)):n&&(r=at(t,e),t.majorUnit=go(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=at(t,r);return s.min>=s.max&&(o&&!i?s.max=s.min+s.majorUnit:!o&&i&&(s.min=s.max-s.majorUnit)),s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,o=e.max-e.min;return Math.floor(Zt(o/t,y))+1},e.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),l=[],h=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&l.push(Zt(h,y)),h+=a*r;return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,l=r.lineStart,h=s*(p/(i.max-i.min)),c=Kt(t,e||0),u=Kt(e,t||0);o&&(c=Xt(c,i.min,i.max),u=Xt(u,i.min,i.max));var d=Math.min(c,u)-i.min,f=Math.max(c,u)-i.min,g=new xo(a.x1,a.y1,a.x1,a.y1);return g[n+1]=dr(l+h*(s>0?d:f)),g[n+2]=dr(l+h*(s>0?f:d)),g},e.prototype.getValue=function(t){var e=this.options,o=Number(e.max),i=Number(e.min),r=this.pointOffset(t);return r<0||r>1?null:Zt(i+r*(o-i),_)},e.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,s=this.lineInfo().lineSize,a=Zt(t/(s/(r-n)),_);return!o&&!i||o&&i||(a=-a),{min:n+a,max:r+a,offset:a}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=Zt(i.min+t*i.majorUnit,_),n=this.axisLabelText(r,e,o);return new ti(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=Zt(this.options.min+n,_),p=Zt(this.options.max-s,_);return p-a<fr&&(p=a+fr),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,r=this.scaleRange(t,e);return{min:Xt(r.min,o,i),max:Xt(r.max,o,i),narrowRange:!1}},e.prototype.isValidRange=function(t,e){return e-t>fr},e}(bi);function yr(t,e,o){var i=Zt(Math.abs(t%e),_);return 0===i||i>e*(1-o)}te(gr,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},labels:{format:"#.####################"},zIndex:1});const vr=gr;var mr=function(t){function e(e,o,i,r){var n=Di(e),s=Di(o),a=r.intl,p=i||{};p=function(t,e,o){var i,r,n=o.min||t,s=o.max||e,a=o.baseUnit||(s&&n?(i=ji(s,n),r=Si,i>=Ri?r=Mi:i>=Ei?r=Ti:i>=Bi?r=Pi:i>=Ii&&(r=Ci),r):Si),p=Vi[a],l=o.weekStartDay||0,h=Ni(Xi(n)-1,a,l)||Di(s),c=Ui(Xi(s)+1,a,l),u=(o.majorUnit?o.majorUnit:void 0)||ur(go(h.getTime(),c.getTime()),p)/p,d=Qi(h,c,a),f=ur(d,u)-d,g=Math.floor(f/2),y=f-g;return o.baseUnit||delete o.baseUnit,o.baseUnit=o.baseUnit||a,o.min=o.min||Hi(h,-g,a,l),o.max=o.max||Hi(c,y,a,l),o.minorUnit=o.minorUnit||u/5,o.majorUnit=u,o}(n,s,p=at(p||{},{min:Ki(a,p.min),max:Ki(a,p.max),axisCrossingValue:$i(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ji(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var l=p.weekStartDay||0;this.totalMin=Xi(Ni(Xi(n)-1,p.baseUnit,l)),this.totalMax=Xi(Ui(Xi(s)+1,p.baseUnit,l))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Qi(e.min,e.max,e.baseUnit)/t+1)},e.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/Wi(e.max,e.min),p=e.weekStartDay||0,l=[n],h=1;h<s;h++){var c=n+Wi(Hi(e.min,h*t,e.baseUnit,p),e.min)*a*i;l.push(Zt(c,y))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){return vr.prototype.getSlot.call(this,Ki(this.intlService,t),Ki(this.intlService,e),o)},e.prototype.getValue=function(t){var e=vr.prototype.getValue.call(this,t);return null!==e?Di(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;r>0&&(s=Hi(s,r,i.baseUnit,n));var a=e.dateFormats[i.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,o);return new ti(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),s=this.range(),a=n/Wi(s.max,s.min),p=Zt(t/a,_);return!i&&!r||i&&r||(p=-p),{min:zi(e.min,p),max:zi(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return Gi(t,e.min)>=0&&Gi(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),o=this.limitRange(Xi(e.min),Xi(e.max),this.totalMin,this.totalMax,e.offset);if(o)return{min:Di(o.min),max:Di(o.max)}},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);return{min:Di(r),max:Di(n)}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=Di(Xi(this.options.min)+n),p=Di(Xi(this.options.max)-s);return p-a<1e3&&(p=Di(Xi(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e);return{min:Di(Xt(Xi(o.min),this.totalMin,this.totalMax)),max:Di(Xt(Xi(o.max),this.totalMin,this.totalMax))}},e}(bi);te(mr,{type:m,majorGridLines:{visible:!0,width:1,color:u},labels:{dateFormats:or}});const xr=mr;var _r=1e-6,br=function(t){function e(e,o,i,r){var n=at({majorUnit:10,min:e,max:o},i),s=n.majorUnit,a=function(t,e){var o=Zt(kr(t,e),_)%1;return t<=0?e:0!==o&&(o<.3||o>.9)?Math.pow(e,kr(t,e)+.2):Math.pow(e,Math.ceil(kr(t,e)))}(o,s),p=function(t,e,o){var i=o.majorUnit,r=t;return t<=0?r=e<=1?Math.pow(i,-2):1:o.narrowRange||(r=Math.pow(i,Math.floor(kr(t,i)))),r}(e,o,n),l=function(t,e,o,i){var r=o.min,n=o.max;return zt(o.axisCrossingValue)&&o.axisCrossingValue<=0&&wr(),zt(i.max)?i.max<=0&&wr():n=e,zt(i.min)?i.min<=0&&wr():r=t,{min:r,max:n}}(p,a,n,i);n.max=l.max,n.min=l.min,n.minorUnit=i.minorUnit||Zt(s-1,_),t.call(this,n,r),this.totalMin=zt(i.min)?Math.min(p,i.min):p,this.totalMax=zt(i.max)?Math.max(a,i.max):a,this.logMin=Zt(kr(l.min,s),_),this.logMax=Zt(kr(l.max,s),_),this.seriesMin=e,this.seriesMax=o,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,o){var i=this,r=i.options,n=i.logMin,s=i.logMax,a=r.majorUnit,p=r.min,l=r.max,h=this.lineInfo(),c=h.axis,u=h.axisDir,d=h.lineBox,f=h.lineSize,g=h.lineStart,y=u*(f/(s-n)),v=Kt(t,e||1),m=Kt(e,t||1);if(v<=0||m<=0)return null;o&&(v=Xt(v,p,l),m=Xt(m,p,l)),v=kr(v,a),m=kr(m,a);var x=Math.min(v,m)-n,_=Math.max(v,m)-n,b=new xo(d.x1,d.y1,d.x1,d.y1);return b[c+1]=dr(g+y*(u>0?x:_)),b[c+2]=dr(g+y*(u>0?_:x)),b},e.prototype.getValue=function(t){var e=this,o=e.options,i=e.logMin,r=e.logMax,n=o.majorUnit,s=this.lineInfo(),a=s.axis,p=s.axisDir,l=s.lineStart,h=s.lineSize,c=(r-i)/h,u=p*(t[a]-l);if(u<0||u>h)return null;var d=i+u*c;return Zt(Math.pow(n,d),_)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.translateRange=function(t){var e=this,o=e.options,i=e.logMin,r=e.logMax,n=o.reverse,s=o.vertical,a=o.majorUnit,p=this.lineBox(),l=s?p.height():p.width(),h=Zt(t/(l/(r-i)),_);return!s&&!n||s&&n||(h=-h),{min:Math.pow(a,i+h),max:Math.pow(a,r+h),offset:h}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,o=e.majorTicks,i=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,o){a.tickX=n?s.x2:s.x2-o.size,a.tickY=n?s.y1-o.size:s.y1,a.position=e,t.append(mi(a,o))}return o.visible&&this.traverseMajorTicksPositions(p,o),i.visible&&this.traverseMinorTicksPositions(p,i),[]},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.vertical,n=t.lineBox(),s={lineStart:n[r?"x1":"y1"],lineEnd:n[r?"x2":"y2"],vertical:r},a=[],p=this.gridLinesVisual();function l(t,e){Ct(t,a)||(s.position=t,p.append(xi(s,e)),a.push(t))}return i.visible&&this.traverseMajorTicksPositions(l,i),o.visible&&this.traverseMinorTicksPositions(l,o),p.children},e.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(Zt(i+r*(a-n),_),e)},e.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,a=this.lineInfo(),p=a.lineStart,l=a.step,h=this.logMin,c=this.logMax,u=Math.floor(h);u<c;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var g=d.value+f*d.minorStep;if(g>r)break;g>=i&&t(Zt(p+l*(kr(g,s)-h),_),e)}},e.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),r=Math.pow(this.options.majorUnit,i),n=this.axisLabelText(r,e,o);return new ti(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e);return{min:Math.min(o,i),max:Math.max(o,i)}},e.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=kr(this.options.min,o),r=kr(this.options.max,o),n=Math.abs(this.pointOffset(e)),s=r-i,a=this.scaleToDelta(t,s),p=Math.pow(o,i+n*a),l=Math.pow(o,r-(1-n)*a);return l-p<_r&&(l=p+_r),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),i=this.totalMin,r=this.totalMax;return{min:Xt(o.min,i,r),max:Xt(o.max,i,r)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,r=Math.pow(i,t);return{value:r,minorStep:(Math.pow(i,t+1)-r)/o}},e.prototype.lineInfo=function(){var e=t.prototype.lineInfo.call(this);return e.step=e.axisDir*(e.lineSize/(this.logMax-this.logMin)),e},e}(bi);function wr(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function kr(t,e){return Math.log(t)/Math.log(e)}te(br,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},zIndex:1,_deferLabels:!0});const Ar=br,Sr={createGridLines:function(t){var e,o,i=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,i.majorGridLines)),i.minorGridLines.visible&&(o=this.minorGridLineAngles(t,s),Vt(n,this.renderMinorGridLines(o,r,i.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){var n=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,n)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=this.box.center(),s=new q.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var l=new q.drawing.Path(r);i&&(s.radius=i(t[p])),l.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(l)}return a.children},gridLineAngles:function(t,e,o,i,r){var n=this,s=this.intervals(e,o,i,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return It(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}};var Cr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new xo,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()))}},e.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=o||1,p=[],l=0,h=e||0;h<n;h+=a)l=r.reverse?360-h*s:h*s,l=Zt(l,y)%360,i&&Ct(l,i)||p.push(l);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return It(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,n)},e.prototype.radiusCallback=function(t,e,o){if(e.options.type!==s){var i=qt(360/(2*this.options.categories.length)),r=Math.cos(i)*t,n=this.majorAngles();return function(e){return!o&&Ct(e,n)?t:r}}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new q.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;var p=Co.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;o.reverse&&!i&&(p=(p+1)%s);var l=n[p=Xt(Math.floor(p),0,s-1)];i&&(l-=a/2)<0&&(l+=360);var h=a*(Xt(Math.ceil(e||p),p,s-1)-p+1);return new wo(r.center(),0,r.height()/2,l,h)},e.prototype.slot=function(t,e){var o=this.getSlot(t,e),i=o.startAngle+180,r=i+o.angle;return new q.geometry.Arc([o.center.x,o.center.y],{startAngle:i,endAngle:r,radiusX:o.radius,radiusY:o.radius})},e.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},e}(er);te(Cr,{startAngle:90,labels:{margin:dt(10)},majorGridLines:{visible:!0},justified:!0}),at(Cr.prototype,Sr);const Pr=Cr;var Tr=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.minorUnit=i.minorUnit||i.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return vr.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this,e=t.options,o=t.labels,i=t.options.labels,r=i.skip||0,n=i.step||1,s=new xo,a=this.intervals(e.majorUnit,r,n),p=0;p<o.length;p++){o[p].reflow(s);var l=o[p].box;o[p].reflow(this.getSlot(a[p]).adjacentBox(0,l.width(),l.height()))}},e.prototype.lineBox=function(){return this.box},e.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 l=(360+r+p*t)%360;i&&Ct(l,i)||s.push(l)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,n=Xt(t,o.min,o.max),s=Xt(e||n,n,o.max);if(o.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new wo(i.center(),0,i.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var o,i,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return r.reverse?(o=a,i=p):(o=360-p,i=360-a),o=(o+n)%360,i=(i+n)%360,new q.geometry.Arc([s.center.x,s.center.y],{startAngle:o,endAngle:i,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,r=t.y-o.y,n=Math.round(Dt(Math.atan2(r,i))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(bi);te(Tr,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:dt(10)},majorGridLines:{color:u,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),at(Tr.prototype,Sr,{createPlotBands:Pr.prototype.createPlotBands,majorAngles:Pr.prototype.majorAngles,range:vr.prototype.range,labelsCount:vr.prototype.labelsCount,createAxisLabel:vr.prototype.createAxisLabel});const Mr=Tr;var Or={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),a=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),p=0;p<o.length;p++){var l,h=o[p],c={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},u=this.getSlot(h.from,h.to,!0),d=new wo(n,n.y-u.y2,n.y-u.y1,0,360);l=e===s?Co.current.createRing(d,c):q.drawing.Path.fromPoints(this.plotBandPoints(d,r),c).close(),a.append(l)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new q.geometry.Circle(r,t.innerRadius),s=new q.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(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();Vt(n,this.renderGridLines(r,s,i,e.minorGridLines))}return n},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 a=i.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),l=n;l<e.length;l+=a){var h=t.y-e[l];if(h>0){var c=new q.geometry.Circle([t.x,t.y],h);if(i.type===s)p.append(new q.drawing.Circle(c,r));else{for(var u=new q.drawing.Path(r),d=0;d<o.length;d++)u.lineTo(c.pointAt(o[d]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),o=this.plotArea.polarAxis,i=o.majorAngles(),r=o.box.center(),n=t.distanceTo(r),a=n;if(this.options.majorGridLines.type!==s&&i.length>1){var p=t.x-r.x,l=t.y-r.y,h=(Dt(Math.atan2(l,p))+540)%360;i.sort((function(t,e){return Lr(t,h)-Lr(e,h)}));var c=90-Lr(i[0],i[1])/2,u=180-Lr(h,i[0])-c;a=n*(Math.sin(qt(u))/Math.sin(qt(c)))}return this.axisType().prototype.getValue.call(this,new yo(e.x1,e.y2-a))}};function Lr(t,e){return 180-Math.abs(Math.abs(t-e)-180)}const Ir=Or;var Br=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(vr);at(Br.prototype,Ir);const Er=Br;var Rr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(Ar);at(Rr.prototype,Ir);const Vr=Rr;function jr(t){return t<=0?-1:1}const zr=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(r>2&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return o;var n,s,a=e[0],p=e[1],l=e[2];for(o.push(new q.geometry.Segment(a));a.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){var h=this.tangent(a,p,F,H);return Wt(o).controlOut(this.firstControlPoint(h,a,p,F,H)),o.push(new q.geometry.Segment(p,this.secondControlPoint(h,a,p,F,H))),o}if(i){a=e[r-1],p=e[0],l=e[1];var c=this.controlPoints(a,p,l);n=c[1],s=c[0]}else{var u=this.tangent(a,p,F,H);n=this.firstControlPoint(u,a,p,F,H)}for(var d=n,f=0;f<=r-3;f++)if(this.removeDuplicates(f,e),f+3<=(r=e.length)){a=e[f],p=e[f+1],l=e[f+2];var g=this.controlPoints(a,p,l);Wt(o).controlOut(d),d=g[1];var y=g[0];o.push(new q.geometry.Segment(p,y))}if(i){a=e[r-2],p=e[r-1],l=e[0];var v=this.controlPoints(a,p,l);Wt(o).controlOut(d),o.push(new q.geometry.Segment(p,v[0])),Wt(o).controlOut(v[1]),o.push(new q.geometry.Segment(l,s))}else{var m=this.tangent(p,l,F,H);Wt(o).controlOut(d),o.push(new q.geometry.Segment(l,this.secondControlPoint(m,p,l,F,H)))}return o},e.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},e.prototype.invertAxis=function(t,e,o){var i=!1;if(t.x===e.x)i=!0;else if(e.x===o.x)(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(i=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,o.x);t.y<=e.y&&o.y<=n||e.y<=t.y&&o.y>=n||(i=!0)}return i},e.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),r=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||Zt(r,1)===Zt(o.y,1)},e.prototype.lineFunction=function(t,e){var o=(e.y-t.y)/(e.x-t.x);return[t.y-o*t.x,o]},e.prototype.controlPoints=function(t,e,o){var i,r=F,n=H,s=!1,a=!1;if(this.isLine(t,e,o))i=this.tangent(t,e,F,H);else{var p={x:this.isMonotonicByField(t,e,o,F),y:this.isMonotonicByField(t,e,o,H)};p.x&&p.y?(i=this.tangent(t,o,F,H),s=!0):(this.invertAxis(t,e,o)&&(r=H,n=F),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?jr((o[n]-t[n])*(e[r]-t[r])):-jr((o[r]-t[r])*(e[n]-t[n]))),a=!0))}var l=this.secondControlPoint(i,t,e,r,n);if(a){var h=r;r=n,n=h}var c=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,l,i),this.restrictControlPoint(e,o,c,i)),[l,c]},e.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)},e.prototype.tangent=function(t,e,o,i){var r=e[o]-t[o],n=e[i]-t[i];return 0===r?0:n/r},e.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},e.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],s=.333*(o[i]-n);return this.point(n+s,e[r]+s*t,i,r)},e.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],s=o[i],a=.333*(s-n);return this.point(s-a,o[r]-a*t,i,r)},e.prototype.point=function(t,e,o,i){var r=new q.geometry.Point;return r[o]=t,r[i]=e,r},e.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},e}(q.Class);var Dr=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},e.prototype.slot=function(t,e,o){return void 0===o&&(o=!0),this._axis.slot(t,e,o)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(q.Class);const Fr=Dr;function Hr(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Fr(e[o])}var Nr=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};Nr.prototype.findAxisByName=function(t){return Hr(t,this._pane.axes)};const Ur=Nr,Gr=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(q.Class);function Wr(t){for(var e=t.length,o=0,i=0;i<e;i++)K(t[i])&&o++;return o}var Xr={min:function(t){for(var e=t.length,o=P,i=0;i<e;i++){var r=t[i];K(r)&&(o=Math.min(o,r))}return o===P?t[0]:o},max:function(t){for(var e=t.length,o=T,i=0;i<e;i++){var r=t[i];K(r)&&(o=Math.max(o,r))}return o===T?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];K(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return Wr(t)&&(e=Xr.sum(t)),e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&zt(r)&&o++}return o},avg:function(t){var e=Wr(t),o=t[0];return e>0&&(o=Xr.sum(t)/e),o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&zt(i))return i}return t[0]}};const Yr=Xr;function qr(t,e){return null===e?e:bt(t)(e)}var Zr=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,o){void 0===e&&(e=[j]),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)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[j]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[j]},e.prototype.bindPoint=function(t,e,o){var i,r,n=t.data,s=zt(o)?o:n[e],a={valueFields:{value:s}},p=this.valueFields(t),l=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(zt(s)){if(Array.isArray(s)){var h=s.slice(p.length);r=this._bindFromArray(s,p),i=this._bindFromArray(h,l)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,l);r=this._bindFromObject(s,p,c),i=this._bindFromObject(s,l,u)}}else r=this._undefinedValue[t.type];return zt(r)&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=i||{},a},e.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},e.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},e.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]=qr(a,t))}return i},e.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===j?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},e}(q.Class);Zr.current=new Zr;const Qr=Zr;var Kr=/percent(?:\w*)\((\d+)\)/,$r=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Jr=function(t){function e(e,o,i){t.call(this),this.initGlobalRanges(e,o,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,o){var i=e.data,r=$r.exec(t);if(r){this.valueGetter=this.createValueGetter(e,o);var n=this.getAverage(i),s=this.getStandardDeviation(i,n,!1),a=r[1]?parseFloat(r[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,o);var l=this.getStandardError(i,this.getAverage(i));this.globalRange=function(t){return{low:t-l,high:t+l}}}},e.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Qr.current,n=r.valueFields(t),s=zt(i[0])?i[0]:{};return G(s)?o=bt("["+(e?n.indexOf(e):0)+"]"):K(s)?o=bt():typeof s===O&&(o=bt(r.sourceFields(t,n)[n.indexOf(e)])),o},e.prototype.getErrorRange=function(t,e){var o,i,r;if(!zt(e))return null;if(this.globalRange)return this.globalRange(t);if(G(e))o=t-e[0],i=t+e[1];else if(K(r=parseFloat(e)))o=t-r,i=t+r;else{if(!(r=Kr.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);o=t-Math.abs(n),i=t+Math.abs(n)}return{low:o,high:i}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,r=o?e.count-1:e.count,n=0,s=0;s<i;s++){var a=this.valueGetter(t[s]);K(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},e.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);K(n)&&(o+=n,i++)}return{value:o/i,count:i}},e}(q.Class);const tn=Jr;var en=q.support.browser||{},on=600,rn="fadeIn",nn=.8,sn=en.msie?.001:0,an="errorLow",pn="errorHigh",ln="zero",hn="interpolate",cn="above",un="below",dn="smooth",fn="step",gn="area",yn="bar",vn="boxPlot",mn="bubble",xn="bullet",_n="candlestick",bn="column",wn="donut",kn="funnel",An="pyramid",Sn="heatmap",Cn="horizontalWaterfall",Pn="line",Tn="ohlc",Mn="pie",On="polarArea",Ln="polarLine",In="polarScatter",Bn="radarArea",En="radarColumn",Rn="radarLine",Vn="rangeArea",jn="rangeBar",zn="rangeColumn",Dn="scatter",Fn="scatterLine",Hn="verticalArea",Nn="verticalBoxPlot",Un="verticalBullet",Gn="verticalLine",Wn="verticalRangeArea",Xn="waterfall",Yn=[yn,bn,Tn,_n,vn,Nn,xn,zn,jn,Xn,Cn],qn="exponentialTrendline",Zn="linearTrendline",Qn="logarithmicTrendline",Kn="movingAverageTrendline",$n="polynomialTrendline",Jn="powerTrendline",ts=[qn,Zn,Qn,Kn,$n,Jn],es="legendItemClick",os="seriesClick",is="seriesHover",rs="seriesOver",ns="seriesLeave",ss="plotAreaHover",as="plotAreaLeave",ps="drag",ls="dragEnd",hs="dragStart",cs="zoomStart",us="zoom",ds="zoomEnd",fs="selectStart",gs="select",ys="selectEnd",vs="showTooltip",ms="hideTooltip",xs="graphics-symbol",_s="k-chart-point",bs="Point",ws="log",ks="category",As="insideEnd",Ss="outsideEnd",Cs="wheel",Ps="drilldown",Ts="pattern",Ms=function(t){function e(e,o,i,r,n,s){t.call(this,s),this.low=e,this.high=o,this.isVertical=i,this.chart=r,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,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,p=a-s,l=a+s;i?(e=[new yo(n.x,r.y1),new yo(n.x,r.y2)],o&&e.push(new yo(p,r.y1),new yo(l,r.y1),new yo(p,r.y2),new yo(l,r.y2)),this.box=new xo(p,r.y1,l,r.y2)):(e=[new yo(r.x1,n.y),new yo(r.x2,n.y)],o&&e.push(new yo(r.x1,p),new yo(r.x1,l),new yo(r.x2,p),new yo(r.x2,l)),this.box=new xo(r.x1,p,r.x2,l)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var o=e?t.width():t.height();return Math.min(Math.floor(o/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,o=e.visual;o?this.visual=o({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},e.prototype.createDefaultVisual=function(){var e=this.options,o=this.linePoints,i={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<o.length;r+=2){var n=new q.drawing.Path(i).moveTo(o[r].x,o[r].y).lineTo(o[r+1].x,o[r+1].y);Z(n),this.visual.append(n)}},e}(To);te(Ms,{animation:{type:rn,delay:on},endCaps:!0,line:{width:2},zIndex:1});const Os=Ms;var Ls=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(Os);const Is=Ls;function Bs(t){for(var e=0;e<t.length;e++)if(zt(t[e].zIndex))return!0}function Es(t,e){null!==e&&t.push(e)}function Rs(t){return Wr(t)===t.length}function Vs(t,e,o){var i=e.visible;if(zt(i))return i;var r=t.pointVisibility;return r?r[o]:void 0}function js(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Qr.current.bindPoint(t,n),a=s.valueFields.value;$(a)&&(a=parseFloat(a)),K(a)?(s.visible=!1!==Vs(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 zs(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}function Ds(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var Fs=5;function Hs(t,e,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var r=o.defaults=o.defaults||{},n=o.depth=o.depth||0,s=!1;if(o.excluded=o.excluded||[],n>Fs)return null;for(var a in t)if(!Ct(a,o.excluded)&&Ae(t,a)){var p=t[a];it(p)?(s=!0,i||(t[a]=Kt(p(e),r[a]))):pt(p)&&(i||(o.defaults=r[a]),o.depth++,s=Hs(p,e,o,i)||s,o.depth--)}return s}function Ns(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];Ct(n.type,i)&&o.push(n)}return o}var Us=new WeakMap;function Gs(t,e,o){if(null===e||"object"!=typeof e)return Ki(o,t);var i=Us.get(e);return i||(i=Ki(o,t),Us.set(e,i)),i}function Ws(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}function Xs(t){return zt(t)&&null!==t}function Ys(t,e){var o=t.type,i=e instanceof Date;return!o&&i||Ds(o,m)}function qs(t){return 1===t.length?t[0]:t}var Zs=/area/i;function Qs(t,e){var o=Qr.current.bindPoint(t,null,e).valueFields;for(var i in o)if(J(o[i]))return!0}function Ks(t){var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,l=t.series,h=i;do{p(h+=r)&&(e=Qs(l,(o=a(h)).item))}while(n<=h&&h<=s&&!e);if(e)return o}function $s(t,e,o,i,r){var n=e.min,s=e.max,a=n>0&&n<o,p=s+1<o;if(a||p){var l,h,c,u=function(t){return t.missingValues?t.missingValues:Zs.test(t.type)||t.stack?ln:hn}(t);u!==hn?(a&&(l=i(n-1)),p&&(h=i(s+1))):(a&&(l=Qs(t,(c=i(n-1)).item)?c:Ks({start:n,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),p&&(h=Qs(t,(c=i(s+1)).item)?c:Ks({start:s,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),l&&(t._outOfRangeMinPoint=l),h&&(t._outOfRangeMaxPoint=h)}}var Js=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(o.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=at({},i,{vertical:!this.options.invertAxes},t)}return o},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&K(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s=o[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;K(s.value)&&(r+=Math.abs(s.value),i.push(Math.abs(s.value)))}}if(r>0)return t.value/r}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var i=this.plotValue(t),r=i>=0,n=e,s=!1,a=zt(t.series.stack)?t.series.stack:this.options.defaultStack,p=function(t){return!0===t||typeof t===O&&!t.group};if(a)for(var l=0;l<o.length;l++){var h=o[l];if(t===h)break;var c=zt(h.series.stack)?h.series.stack:this.options.defaultStack;if(c&&(typeof a!==R||a===c)&&(!p(a)||p(c))&&(!a.group||a.group===c.group)){var u=this.plotValue(h);(u>=0&&r||u<0&&!r)&&(0!==e&&0===u||(n+=u,i+=u,s=!0,this.options.isStacked100&&(i=Math.min(i,1))))}}return s&&(n-=e),[n,i]}var d=t.series,f=this.seriesValueAxis(d),g=this.categoryAxisCrossingValue(f);return[g,J(t.value)?t.value:g]},e.prototype.stackLimits=function(t,e){for(var o=P,i=T,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];zt(p)&&isFinite(p)&&(i=Math.max(i,p),o=Math.min(o,p))}}}return{min:o,max:i}},e.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];if(!p){p=this.stackLimits(s,n.stack);var l=this.errorTotals;l&&(l.negative.length&&(p.min=Math.min(p.min,pe(l.negative).min)),l.positive.length&&(p.max=Math.max(p.max,pe(l.positive).max))),p.min!==P||p.max!==T?i[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields[an],l=e.fields[pn];K(p)&&K(l)?i={low:p,high:l}:a&&zt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new tn(a.value,n,j),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},e.prototype.addPointErrorBar=function(t,e){var o=!this.options.invertAxes,i=t.options.errorBars,r=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:r};this.updateRange({value:n},p),this.updateRange({value:s},p)}var l=new Is(n,s,o,this,r,i);t.errorBars=[l],t.append(l)},e.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,r=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:i,high:r}},e.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=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,zt(a.dataItem)||(a.dataItem=i.data[o]),this.addErrorBar(a,t,o)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,o){var i=o.categoryIx,r=o.category,n=o.series,s=o.seriesIx,a={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},p=this._evalSeries[s];zt(p)||(this._evalSeries[s]=p=Hs(t,{},a,!0));var l=t;return p&&Hs(l=at({},l),{value:e,category:r,index:i,series:n,dataItem:n.data[i]},a),l},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.value,r=this.valueAxisRanges[o];isFinite(i)&&null!==i&&((r=this.valueAxisRanges[o]=r||{min:P,max:T}).min=Math.min(r.min,i),r.max=Math.max(r.max,i))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,o=t.axis,i=o?e.namedValueAxes[o]:e.valueAxis;if(!i)throw new Error("Unable to locate value axis with name "+o);return i},e.prototype.reflow=function(t){var e=this,o=this.categorySlots=[],i=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,l=e.seriesValueAxis(p),h=i[n++],c=o[a];if(c||(o[a]=c=e.categorySlot(r,a,l)),h){var u=e.plotRange(h,l.startValue()),d=e.valueSlot(l,u);if(d){var f=e.pointSlot(c,d);h.aboveAxis=e.aboveAxis(h,l),h.stackValue=u[1],e.options.isStacked100&&(h.percentage=e.plotValue(h)),e.reflowPoint(h,f)}else h.visible=!1}})),this.reflowCategories(o),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Wt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),i=t.value;return e.options.reverse?i<o:i>=o},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,o=t.options;return[].concat(o.axisCrossingValues||o.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,r=o?t:e;return new xo(i.x1,r.y1,i.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=zs(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.plotArea.bindPoint(a,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var l=0;l<i;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},e.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];if(r){var n=r.categoryIx;i(this.plotArea.bindPoint(t,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:o,dataItem:r.item})}},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}(To);te(Js,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const ta=Js;var ea={click:function(t,e){return t.trigger(os,this.eventArgs(e))},hover:function(t,e){return t.trigger(is,this.eventArgs(e))},over:function(t,e){return t.trigger(rs,this.eventArgs(e))},out:function(t,e){return t.trigger(ns,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:Ut(t),originalEvent:t,point:this}}};const oa=ea,ia={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&zt(e)&&null!==e&&(this.note=new oi({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};var ra=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Oe()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Zo(this.getLabelText(t),at({align:f,vAlign:f,margin:{left:5,right:5},zIndex:Kt(t.zIndex,this.series.zIndex)},t),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.getAriaLabelText=function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,o=at({color:this.color},t.border);return zt(o.color)||(o.color=new q.Color(e).brightness(nn).toHex()),o},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new Ro({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:at({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical;this.render(),this.box=t;var r=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);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new xo(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,o=this.label,i=e.labels.position;o&&(i=(i=i===cn?V:i)===un?d:i,o.reflow(t),o.box.alignTo(this.markerBox(),i),o.reflow(o.box))},e.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),r=new Ro({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Kt(t.border.opacity,1)},opacity:Kt(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,o=this.marker;if(o)e=o.paddingBox.toRect(),t=o.visual;else{var i=this.options.markers.size,r=i/2,n=this.box.center();e=new q.geometry.Rect([n.x-r,n.y-r],[i,i])}return{options:this.options,rect:e,visual:t}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,o=t.size+(t.border.width||0),i=new Ro({type:t.type,width:o,height:o,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this._childBox),i.getElement()},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i,r=t.x2+5,n=C;return this.aboveAxis?(o=t.y1,i=d):(o=t.y2,i=V),{point:new yo(r,o),align:{horizontal:n,vertical:i}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},e.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},e.prototype.getIndex=function(){return zt(this.categoryIx)?this.categoryIx:this.pointIx},e}(To);ra.prototype.defaults={vertical:!0,markers:{visible:!0,background:z,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,position:cn,margin:dt(3),padding:dt(4),animation:{type:rn,delay:on}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:xs,className:_s,ariaRoleDescription:bs}},at(ra.prototype,oa),at(ra.prototype,ia);const na=ra;var sa=function(t){function e(e,o,i){t.call(this),this.linePoints=e,this.series=o,this.seriesIx=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},e.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!zt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;it(o)&&i&&(o=i.color);var r=q.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&r.close(),this.visual=r},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}(To);te(sa,{closed:!1});const aa=sa;var pa={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,r=e.reverse,n=i?F:H,s=i?H:F,a=r?2:1,p=a,l=la(t[0],n,a,s,p),h=[l],c=1;c<t.length;c++){var u=la(t[c],n,a,s,p);if(l[n]!==u[n]){var d=new q.geometry.Point;d[n]=l[n],d[s]=u[s],h.push(d,u)}l=u}return o?l!==Wt(h)&&h.push(l):h.push(la(Wt(t),n,a,s,r?1:2)),h}};function la(t,e,o,i,r){var n=t.box,s=new q.geometry.Point;return s[e]=n[e+o],s[i]=n[i+r],s}const ha=pa;var ca=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(aa);at(ca.prototype,ha);const ua=ca;var da=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;it(o)&&e&&(o=e.color);var i=new zr(this.options.closed).process(this.points()),r=new q.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,i),this.visual=r},e}(aa);const fa=da;var ga={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,l=[],h=0;h<p;h++){var c=a[h];c?l.push(c):this.seriesMissingValues(s)!==hn&&(l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?ln:e||hn},getNearestPoint:function(t,e,o){for(var i,r=new yo(t,e),n=this.seriesPoints[o],s=P,a=0;a<n.length;a++){var p=n[a];if(p&&zt(p.value)&&null!==p.value&&!1!==p.visible){var l=p.box.center().distanceTo(r);l<s&&(i=p,s=l)}}return i}};const ya=ga;var va=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(Pt(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),r=o[2].anchor();e.suspend(),i.setX(t),e.resume(),r.setX(t)},e}(q.drawing.Animation);te(va,{duration:on}),q.drawing.AnimationFactory.current.register("clip",va);const ma=va,xa={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),o=q.drawing.Path.fromRect(e.toRect());this.visual.clip(o),this.animation=new ma(o,{box:e}),Bs(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&zt(i.visual.options.zIndex)&&i.visual.clip(t)}}};var _a=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return na},e.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=this.seriesMissingValues(o),n=t.valueFields.value;if(!zt(n)||null===n){if(r!==ln)return null;n=0}var s=this.pointOptions(o,i);s=this.evalPointOptions(s,n,e);var a=t.fields.color||o.color;it(o.color)&&(a=s.color);var p=new na(n,s);return p.color=a,this.append(p),p},e.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]},e.prototype.createSegment=function(t,e,o){var i=e.style;return new(i===fn?ua:i===dn?fa:aa)(t,e,o)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ta);at(_a.prototype,ya,xa);const ba=_a;var wa=function(t){function e(e,o,i,r,n){t.call(this,e,o,i),this.prevSegment=r,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;it(i)&&e&&(i=e.color),this.visual=new q.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Oo(t.pattern,{color:i,opacity:t.opacity}),stroke:null}),o.width>0&&!1!==o.visible&&this.createStroke({stroke:at({color:i,opacity:t.opacity,lineCap:"butt"},o)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new q.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment();if(i){var r=this.stackSegments();Vt(o,r)}var n=new q.drawing.Path(t);n.segments.push.apply(n.segments,o),!i&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),n=i.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=Wt(s).anchor(),l=o?n.x1:n.y1;o?t.lineTo(l,p.y).lineTo(l,a.y):t.lineTo(p.x,l).lineTo(a.x,l)},e}(aa);const ka=wa;var Aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(ka);at(Aa.prototype,ha);const Sa=Aa;var Ca=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new zr(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;o>=0;o--){var i=t[o];e.push(new q.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},e}(ka);const Pa=Ca;var Ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&o>0&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new(a===fn?Sa:a===dn?Pa:ka)(t,e,o,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var o=this._stackPoints;if(o)for(var i=0;i<o.length;i++){var r=o[i],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,n=t.length;r<0&&(r=0,n--);var s=r+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var l=r;l<s;l++){var h=l+a,c=e,u=void 0;do{u=i[--c][h]}while(c>0&&!u);if(u)o!==fn&&l>r&&!i[c][h-1]&&p.push(this._previousSegmentPoint(l,h,h-1,c)),p.push(u),o!==fn&&l+1<s&&!i[c][h+1]&&p.push(this._previousSegmentPoint(l,h,h+1,c));else{var d=this._createGapStackPoint(l);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;s>0&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),o=new na(0,e);return o.categoryIx=t,o.series={},o},e.prototype.seriesMissingValues=function(t){return t.missingValues||ln},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ba);const Ma=Ta;var Oa=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var o in t){var i=t[o],r=e[o];e[o]=r=r||{min:P,max:T},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(q.Class);const La=Oa;var Ia=function(t){function e(e,o,i){t.call(this,o),this.textBox=new Zo(e,this.options,i),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;if(n.align=o?f:C,n.vAlign=o?V:f,e.position===As)o?(n.vAlign=V,!i&&s.height()<t.height()&&(n.vAlign=d)):n.align=i?I:C;else if(e.position===f)n.vAlign=f,n.align=f;else if("insideBase"===e.position)o?n.vAlign=i?d:V:n.align=i?C:I;else if(e.position===Ss)if(o)if(i){var l=(s.width()-t.width()-a.left-a.right)/2;p=new xo(t.x1-l,t.y1-s.height(),t.x2+l,t.y1)}else p=new xo(t.x1,t.y2,t.x2,t.y2+s.height());else n.align=f,p=i?new xo(t.x2,t.y1,t.x2+s.width(),t.y2):new xo(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)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?H:F,o=e+"1",i=e+"2",r=this.children[0],n=this.parent.box;if(n[o]<t[o]||t[i]<n[i]){var s=r.paddingBox.clone();s[o]=Math.max(n[o],t[o]),s[i]=Math.min(n[i],t[i]),this.reflow(s)}},e}(To);te(Ia,{position:Ss,margin:dt(3),padding:dt(4),color:u,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:rn,delay:on},zIndex:2});const Ba=Ia,Ea={addAccessibilityAttributesToVisual:function(){this._id=this._id||Oe();var t=at({ariaLabel:this.getAriaLabelText()},this.options.accessibility);Bo(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}};var Ra=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||z,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Ba(this.getLabelText(t),at({vertical:this.options.vertical},t),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},e.prototype.createVisual=function(){var e=this,o=this.box,i=this.options,r=i.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),r){var n=this.rectVisual=r({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:o.toRect(),createVisual:function(){var t=new q.drawing.Group;return e.createRect(t),t},options:i});n&&this.visual.append(n)}else o.width()>0&&o.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,o=e.border,i=zt(o.opacity)?o.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=q.drawing.Path.fromRect(r,{fill:Oo(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(Z(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Ws(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return Z(q.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return Z(q.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||nn,i=e.color;return zt(i)||(i=new q.Color(t).brightness(o).toHex()),i},e.prototype.tooltipAnchor=function(){var t,e,o=this,i=o.options,r=o.box,n=o.aboveAxis,s=this.owner.pane.clipBox()||r,a=C,p=V;if(i.vertical)t=Math.min(r.x2,s.x2)+5,n?e=Math.max(r.y1,s.y1):(e=Math.min(r.y2,s.y2),p=d);else{var l=Math.max(r.x1,s.x1),h=Math.min(r.x2,s.x2);i.isStacked?(p=d,n?(a=I,t=h):t=l,e=Math.max(r.y1,s.y1)-5):(n?t=h+5:(t=l-5,a=I),e=Math.max(r.y1,s.y1))}return{point:new yo(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(To);at(Ra.prototype,oa),at(Ra.prototype,ia),at(Ra.prototype,Ea),Ra.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}};const Va=Ra;function ja(t,e){t.forEach(e)}function za(t,e){for(var o=t.length,i=o-1;i>=0;i--)e(t[i],i-o-1)}var Da=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?za:ja}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.gap,r=e.spacing,n=this.children,s=n.length,a=o?H:F,p=s+i+r*(s-1),l=(o?t.height():t.width())/p,h=t[a+1]+l*(i/2);this.forEach(n,(function(e,o){var i=(e.box||t).clone();i[a+1]=h,i[a+2]=h+l,e.reflow(i),o<s-1&&(h+=l*r),h+=l}))},e}(To);te(Da,{vertical:!1,gap:0,spacing:0});const Fa=Da;var Ha=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?F:H,o=this.children,i=o.length,r=this.box=new xo,n=0;n<i;n++){var s=o[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(r=this.box=a.clone()),s.reflow(a),r.wrap(a)}}},e}(To);te(Ha,{vertical:!0});const Na=Ha;var Ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return Va},e.prototype.clusterType=function(){return Fa},e.prototype.stackType=function(){return Na},e.prototype.stackLimits=function(e,o){return t.prototype.stackLimits.call(this,e,o)},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.options,s=this.children,a=zt(i.stack)?i.stack:n.defaultStack,p=this.pointValue(t),l=this.pointOptions(i,r),h=l.labels;a&&h.position===Ss&&(h.position=As),l.isStacked=a;var c=t.fields.color||i.color;p<0&&l.negativeColor&&(c=l.negativeColor),l=this.evalPointOptions(l,p,e),it(i.color)&&(c=l.color);var u=new(this.pointType())(p,l);u.color=c;var d=s[o];return d||(d=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),n.isStacked?this.getStackWrap(a,d).append(u):d.append(u),u},e.prototype.getStackWrap=function(t,e){var o,i=typeof t===O?t.group||!0:t,r=e.children;if(typeof i===R||!0===i)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},e.prototype.categorySlot=function(t,e,o){var i=this.options,r=t.getSlot(e),n=o.startValue();if(i.isStacked){var s=o.getSlot(n,n,!0),a=i.invertAxes?F:H;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),Bs(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&zt(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};if(e.isStacked){var i=this.seriesValueAxis(e.series[0]);t=i.getSlot(i.startValue())}else t=this.categoryAxis.getSlot(0);o.origin=new q.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e}(ta);te(Ua,{animation:{type:yn}});const Ga=Ua;var Wa=function(t){function e(e,o){t.call(this,o),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){return this.formatValue(t.format)},e.prototype.reflow=function(t){var e=this,o=e.options,i=e.value,r=e.owner.seriesValueAxis(o),n=r.getSlot(i.open,i.close),s=r.getSlot(i.low,i.high);n.x1=s.x1=t.x1,n.x2=s.x2=t.x2,this.realBody=n;var a=s.center().x,p=[];p.push([[a,s.y1],[a,n.y1]]),p.push([[a,n.y2],[a,s.y2]]),this.lines=p,this.box=s.clone().wrap(n),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new q.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var o=q.drawing.Path.fromRect(this.realBody.toRect(),{fill:Oo(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),Z(o),t.append(o),Ws(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:Kt(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=q.drawing.Path.fromPoints(o[n],r);Z(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return zt(e)||(e=new q.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=q.drawing.Path.fromRect(this.box.toRect(),{fill:{color:z,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var o=this.mainVisual(at({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,o},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new yo(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:V}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(To);Wa.prototype.createFocusHighlight=Va.prototype.createFocusHighlight,te(Wa,{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>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(Wa.prototype,oa),at(Wa.prototype,ia),at(Wa.prototype,Ea);const Xa=Wa;var Ya=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.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,l=t.valueFields,h=Rs(this.splitValue(l)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),h&&(o=this.createPoint(t,e));var d=a[i];d||(d=new Fa({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=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)},e.prototype.pointType=function(){return Xa},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointType(),r=t.valueFields,n=at({},o),s=t.fields.color||o.color;n=this.evalPointOptions(n,r,e),o.type!==_n&&o.type!==Tn||r.open>r.close&&(s=t.fields.downColor||o.downColor||o.color),it(o.color)&&(s=n.color),n.vertical=!this.options.invertAxes;var a=new i(r,n);return a.color=s,a},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.splitValue(t),r=this.valueAxisRanges[o]||{min:P,max:T};this.valueAxisRanges[o]={min:Math.min.apply(Math,i.concat([r.min])),max:Math.max.apply(Math,i.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(ta);at(Ya.prototype,xa);const qa=Ya;var Za=function(t){function e(e,o){t.call(this,e,o),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,o,i=this,r=i.options,n=i.value,s=i.owner.seriesValueAxis(r);this.boxSlot=o=s.getSlot(n.q1,n.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=s.getSlot(n.lower,n.upper),this.reflowWhiskerSlot(t);var a=s.getSlot(n.median);if(n.mean){var p=s.getSlot(n.mean);this.meanPoints=this.calcMeanPoints(t,p)}this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,a),this.box=e.clone().wrap(o),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,o=e.outliers||[],i=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<o.length;s++){var a=o[s],p=at({},(n=a<e.q3+i&&a>e.q1-i?t.outliers:t.extremes).border);zt(p.color)||(zt(this.color)?p.color=this.color:p.color=new q.Color(n.background).brightness(nn).toHex());var l=new Ro({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});l.value=a,r.push(l)}return this.reflowOutliers(r),r},e.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,n=e.getSlot(r);this.options.vertical?n.move(o.x):n.move(void 0,o.y),this.box=this.box.wrap(n),t[i].reflow(n)}},e.prototype.mainVisual=function(e){for(var o=t.prototype.mainVisual.call(this,e),i=this.renderOutliers(e),r=0;r<i.length;r++){var n=i[r].getElement();n&&o.append(n)}return o},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Xa);te(Za,{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:v,background:z,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:g,background:z,border:{width:2,opacity:1},opacity:0}}),at(Za.prototype,oa);const Qa=Za;var Ka=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(Qa);const $a=Ka;var Ja=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Rs(this.splitValue(l)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),h&&(o=this.createPoint(t,e));var d=a[i];d||(d=new Fa({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return this.options.invertAxes?$a:Qa},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers));zt(t.mean)&&(i=i.concat(t.mean));var r=this.valueAxisRanges[o]||{min:P,max:T};this.valueAxisRanges[o]={min:Math.min.apply(Math,i.concat([r.min])),max:Math.max.apply(Math,i.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];zt(r)&&null!==r&&o.push(r)}return o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(qa);const tp=Ja;var ep=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(Os);const op=ep;var ip=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=o.seriesIx,l=o.series,h=t.options.errorBars,c=o[s],u=o[a];K(r)&&(K(c)&&K(u)&&(i={low:c,high:u}),h&&zt(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new tn(h[n],l,e),i=this.seriesErrorRanges[e][p].getErrorRange(r,h[n])),i&&this.addPointErrorBar(i,t,e))},e.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===H,p={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];var l=new op(i,r,a,this,n,s);e.errorBars.push(l),e.append(l),p[o]=i,this.updateRange(p,n),p[o]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],l=t;Xs(i)&&Xs(r)||(l=this.createMissingValue(l,a)),l&&((o=this.createPoint(l,e))&&(Object.assign(o,e),this.addErrorBar(o,F,e),this.addErrorBar(o,H,e)),this.updateRange(l,e.series)),this.points.push(o),p.push(o)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[i],p=this.yAxisRanges[r];Xs(n)&&(a=this.xAxisRanges[i]=a||{min:P,max:T},$(n)&&(n=Ki(o,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),Xs(s)&&(p=this.yAxisRanges[r]=p||{min:P,max:T},$(s)&&(s=Ki(o,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.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","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];zt(s)||(this._evalSeries[r]=s=Hs(t,{},n,!0));var a=t;return s&&Hs(a=at({},t),{value:e,series:i,dataItem:o.dataItem},n),a},e.prototype.pointType=function(){return na},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=at({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;i=this.evalPointOptions(i,t,e),it(o.color)&&(r=i.color);var n=new na(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+o);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,i),l=a.y.getSlot(t.y,t.y,i);if(s)if(p&&l){var h=e.pointSlot(p,l);s.reflow(h)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new xo(t.x1,e.y1,t.x2,e.y2)},e.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.plotArea.bindPoint(r,n),a=s.valueFields,p=s.fields;t(a,at({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(To);te(ip,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),at(ip.prototype,xa);const rp=ip;var np=function(t){function e(e,o){t.call(this,e,o),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new q.drawing.Group,s=new q.drawing.Circle(new q.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}]})}),a=new q.drawing.Circle(new q.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new q.Color(o.background).brightness(nn).toHex(),width:e.width,opacity:e.opacity},fill:Oo(this.options.pattern,{color:o.background,opacity:t.opacity})});return n.append(s,a),n},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width)/2+e.border.width/2;return new q.drawing.Circle(new q.geometry.Circle([i.x,i.y],r),t)},e}(na);np.prototype.defaults=at({},np.prototype.defaults,{labels:{position:f},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),np.prototype.defaults.highlight.zIndex=void 0;const sp=np;var ap=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=T,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,o){null!==e.size&&(e.size>0||e.size<0&&o.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,o)):(this.points.push(null),this.seriesPoints[o.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return sp},e.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(on/i),n={delay:r,duration:on-r,type:mn},s=e.color||o.color;t.size<0&&o.negativeValues.visible&&(s=Kt(o.negativeValues.color,s));var a=at({labels:{animation:{delay:r,duration:on-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:g,border:o.border,opacity:o.opacity,animation:n}});a=this.evalPointOptions(a,t,e),it(o.color)&&(s=a.color),a.markers.background=s;var p=new sp(t,a);return p.color=s,this.append(p),p},e.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,l=(Math.PI*a*a-p)/this._maxSize,h=0;h<n.length;h++){var c=n[h];if(c){var u=Math.abs(c.value.size)*l,d=Math.sqrt((p+u)/Math.PI),f=Kt(c.options.zIndex,0)+(1-d/a);at(c.options,{zIndex:f,markers:{size:2*d,zIndex:f},labels:{zIndex:f+1}})}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(rp);te(ap,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const pp=ap;var lp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ro);at(lp.prototype,oa);const hp=lp;var cp=function(t){function e(e,o){t.call(this,o),this.aboveAxis=this.options.aboveAxis,this.color=o.color||z,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,zt(this.value.target)&&(this.target=new hp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:V,align:I}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Ba(this.getLabelText(t),t,this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.reflow=function(t){this.render();var e=this,o=e.options,i=e.target,r=e.owner,n=o.invertAxes,s=r.seriesValueAxis(this.options),a=r.categorySlot(r.categoryAxis,o.categoryIx,s),p=s.getSlot(this.value.target),l=n?p:a,h=n?a:p;if(i){var c=new xo(l.x1,h.y1,l.x2,h.y2);i.options.height=n?c.height():o.target.line.width,i.options.width=n?o.target.line.width:c.width(),i.reflow(c)}var u=this.label;u&&(u.options.aboveAxis=this.aboveAxis,u.reflow(t)),this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var e=this.options,o=q.drawing.Path.fromRect(this.box.toRect(),{fill:Oo(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&o.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),this.bodyVisual=o,Z(o),this.visual.append(o)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=q.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return q.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.getIndex=function(){return this.categoryIx},e}(To);cp.prototype.tooltipAnchor=Va.prototype.tooltipAnchor,cp.prototype.createFocusHighlight=Va.prototype.createFocusHighlight,te(cp,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(cp.prototype,oa),at(cp.prototype,ia),at(cp.prototype,Ea);const up=cp;var dp=function(t){function e(e,o){!function(t){for(var e=t.series,o=0;o<e.length;o++){var i=e[o],r=i.data;!r||G(r[0])||pt(r[0])||(i.data=[r])}}(o),t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.plotRange=function(t){var e=t.series,o=this.seriesValueAxis(e),i=this.categoryAxisCrossingValue(o);return[i,t.value.current||i]},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=this.options,n=this.children,s=t.valueFields,a=at({vertical:!r.invertAxes,overlay:i.overlay,categoryIx:o,invertAxes:r.invertAxes},i),p=t.fields.color||i.color;a=this.evalPointOptions(a,s,e),it(i.color)&&(p=a.color);var l=new up(s,a);l.color=p;var h=n[o];return h||(h=new Fa({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),h.append(l),l},e.prototype.updateRange=function(t,e){var o=t.current,i=t.target,r=e.series.axis,n=this.valueAxisRanges[r];zt(o)&&!isNaN(o)&&zt(i&&!isNaN(i))&&((n=this.valueAxisRanges[r]=n||{min:P,max:T}).min=Math.min(n.min,o,i),n.max=Math.max(n.max,o,i))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},e}(ta);dp.prototype._setAnimationOptions=Ga.prototype._setAnimationOptions,te(dp,{animation:{type:yn}});const fp=dp;var gp=function(t){function e(e,o){t.call(this),this.chartService=e,this.options=at({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;if(e){var r=e.color||e.options.color;o=Kt(o,r),i=Kt(i,r)}var n=void 0!==t.padding?dt(t.padding):{};return"object"==typeof t.padding&&(n.top=void 0!==t.padding.top?n.top:void 0,n.right=void 0!==t.padding.right?n.right:void 0,n.bottom=void 0!==t.padding.bottom?n.bottom:void 0,n.left=void 0!==t.padding.left?n.left:void 0),{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:lt(t.border.width),paddingTop:lt(n.top),paddingBottom:lt(n.bottom),paddingLeft:lt(n.left),paddingRight:lt(n.right)}},e.prototype.show=function(t,e,o){if(this.chartService){t.format=e.format;var i=this.getStyle(e,o);t.style=i;var r=new q.Color(i.backgroundColor);zt(e.color)||r.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(vs,t),this.visible=!0}},e.prototype.hide=function(){this.chartService&&this.chartService.notify(ms),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(q.Class);te(gp,{border:{width:1},opacity:1});const yp=gp;var vp=function(t){function e(e,o,i){t.call(this,e,i),this.crosshair=o,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===m&&(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)},e.prototype.hide=function(){this.chartService.notify(ms,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,o,i=this.crosshair,r=this.options,n=r.position,s=r.padding,a=!i.axis.options.vertical,p=i.line.bbox();return a?(t=f,n===d?(e=V,o=p.bottomLeft().translate(0,s)):(e=d,o=p.topLeft().translate(0,-s))):(e=f,n===C?(t=I,o=p.topLeft().translate(-s,0)):(t=C,o=p.topRight().translate(s,0))),{point:o,align:{horizontal:t,vertical:e}}},e}(yp);te(vp,{padding:10});const mp=vp;var xp=function(t){function e(e,o,i){t.call(this,i),this.axis=o,this.stickyMode=o instanceof er;var r=this.options.tooltip;r.visible&&(this.tooltip=new mp(e,this,at({},r,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,o=this.point,i=e.options.vertical,r=this.getBox(),n=i?H:F,s=new q.geometry.Point(r.x1,r.y1);if(t=i?new q.geometry.Point(r.x2,r.y1):new q.geometry.Point(r.x1,r.y2),o)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(o));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=o[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?F:H,a=0;a<i;a++){var p=o[a];p.options.vertical!==r&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new q.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(To);te(xp,{color:u,width:2,zIndex:-1,tooltip:{visible:!1}});const _p=xp;var bp=function(t){function e(e,o){t.call(this,e),this.pane=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new q.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=q.drawing.Path.fromRect(t);Z(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s=i[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(To);bp.prototype.isStackRoot=!0;const wp=bp;var kp=function(t){function e(e){t.call(this,e),this.id="pane"+Ap++,this.createTitle(),this.content=new To,this.chartContainer=new wp({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;pt(t)&&(t=at({},t,{align:t.position,position:V})),this.title=$o.buildTitle(t,e.prototype.options.title),this.title&&this.append(this.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var o;Wt(this.children)===this.content&&(o=this.children.pop()),t.prototype.reflow.call(this,e),o&&this.children.push(o),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),o=[],i=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?o:i,p=0;p<e.length;p++)if(0===a.length){var l=e[p];s!==l.options.vertical&&Vt(a,n.createGridLines(l))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new xo,i=0;i<e;i++){var r=t[i],n=r.options.vertical?H:F,s=r.lineBox();o[n+1]=s[n+1],o[n+2]=s[n+2]}if(0===o.x2)for(var a=this.parent.axes,p=a.length,l=0;l<p;l++){var h=a[l];if(!h.options.vertical){var c=h.lineBox();o.x1=c.x1,o.x2=c.x2}}return o},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Ur(this),index:this.paneIndex,name:this.options.name})},e}(Io),Ap=1;kp.prototype.isStackRoot=!0,te(kp,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const Sp=kp;var Cp=function(t){return!1!==t.options.visible},Pp=function(t){function e(e,o,i){t.call(this,o),this.initFields(e,o),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=o,this.originalSeries=e,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.bindPoint=function(t,e,o){var i=this._bindCache.get(t);i||(i=[],this._bindCache.set(t,i));var r=i[e];return r||(r=i[e]=Qr.current.bindPoint(t,e,o)),r},e.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=at({title:{color:t.color}},e),s=0;s<i;s++){var a=at({},n,o[s]);$(a.title)&&(a.title=at({text:a.title},n.title));var p=new Sp(a);p.paneIndex=s,r.push(p),this.append(p)}this.panes=r},e.prototype.crosshairOptions=function(t){return t.options.crosshair},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);if(n&&n.visible){var s=new _p(this.chartService,r,n);this.crosshairs.push(s),o.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;i>=0;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},e.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},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},e.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=t[a],l=!1!==p.visible;if(!1!==p.visibleInLegend){var h=p.name,c=l?vt(i):vt(n)||vt(i);c&&(h=c({text:Xs(h)?h:"",series:p}));var u=p._defaults,d=p.color;it(d)&&u&&(d=u.color);var f=void 0,g=void 0;l?(f={},g=d):(f={color:n.color,font:n.font},g=r.markers.color),Xs(h)&&""!==h&&s.push({text:h,labels:f,markerColor:g,series:p,active:l})}}Vt(o.data,s)},e.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.push(s):e.push(s)}return{x:e,y:o,any:e.concat(o)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},e.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},e.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,i=dt(e.margin);this.box=t.clone().unpad(i),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var o=this.getRoot();o&&o.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var r=0;r<e.length;r++)e[r].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var o=t.options,i=[].concat(o.axisCrossingValues||o.axisCrossingValue),r=e.length-i.length,n=i[0]||0,s=0;s<r;s++)i.push(n);return i},e.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,s=e.getSlot(i,i,!0),a=e.options.reverse?2:1,p=t.box.translate(s[F+a]-r[F+n],s[H+a]-r[H+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},l={},h=0;h<e.length;h++){var c=e[h],u=c.pane,f=u.id,g=!1!==c.options.visible,v=Op(t,u)||o,m=r;if(v!==o&&(m=this.axisCrossingValues(v,e)),this.alignAxisTo(c,v,n[h],m[h]),!c.options._overlap){Zt(c.lineBox().x1)===Zt(v.lineBox().x1)&&(s[f]&&c.reflow(c.box.alignTo(s[f].box,C).translate(-c.options.margin,0)),g&&(s[f]=c)),Zt(c.lineBox().x2)===Zt(v.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,v,n[h],m[h]),a[f]&&c.reflow(c.box.alignTo(a[f].box,I).translate(c.options.margin,0)),g&&(a[f]=c));var x=Op(e,u)||i;x!==c&&(c.alignTo(x),c.reflow(c.box))}}for(var _=0;_<t.length;_++){var b=t[_],w=b.pane,k=w.id,A=!1!==b.options.visible,S=Op(e,w)||i,P=n;S!==i&&(P=this.axisCrossingValues(S,t)),this.alignAxisTo(b,S,r[_],P[_]),b.options._overlap||(Zt(b.lineBox().y1)===Zt(S.lineBox().y1)&&(b._mirrored||(b.options.labels.mirror=!b.options.labels.mirror,b._mirrored=!0),this.alignAxisTo(b,S,r[_],P[_]),p[k]&&b.reflow(b.box.alignTo(p[k].box,V).translate(0,-b.options.margin)),A&&(p[k]=b)),Zt(b.lineBox().y2,y)===Zt(S.lineBox().y2,y)&&(l[k]&&b.reflow(b.box.alignTo(l[k].box,d).translate(0,b.options.margin)),A&&(l[k]=b)),0!==_&&(b.alignTo(o),b.reflow(b.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Mp(e),i=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(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))}},e.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Mp(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},e.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(n.length>0){var a=Mp(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);o=Math.max(o,s.x1-a.x1);for(var l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(o,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Lp(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]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(o>0)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},e.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&&!Ct(n,t)||e[r].reflow(i)}},e.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;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var l=parseInt(p,10)/100;a.options.height=l*t.height()}a.reflow(t.clone()),i-=a.options.height}else r++}for(var h=0;h<o;h++){var c=e[h];c.options.height||(c.options.height=i/r)}for(var u=0;u<o;u++){var d=e[u],f=t.clone().move(t.x1,n);d.reflow(f),n+=d.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,o=e.length,i=0;i<o;i++)for(var r=e[i],n=0;n<o;n++){var s=e[n];if(r.options.vertical!==s.options.vertical){var a=r.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(q.drawing.Path.fromRect(e[o].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,o=this.options.plotArea,i=o.opacity,r=o.background,n=o.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&zt(e)||(r=z,i=0);var s=this._bgVisual=new q.drawing.MultiPath({fill:{color:r,opacity:i},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var 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&&zt(s.value)&&null!==s.value&&o.push(s)}}return o},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsByPointIndex=function(t){return this.filterPoints((function(e){return e.getIndex()===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,o=[],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},e.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}},e.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}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,o=t.y;this.detachAxisGroupLabels(o,e),this.detachAxisGroupLabels(e,o)},e.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Op(e,n)||e[0],a=i+o,p=this.createLabelAxis(r,a,s);if(p){o++;var l=n.axes.indexOf(r)+o;n.appendAxisAt(p,l)}}},e.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n=r!==b&&r!==E,s=i.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=o.options.vertical?a.x:a.y,l=this.axisCrossingValues(o,p),h=r===b,c=o.range(),u=h?c.max:c.min;if(Xt(l[e],c.min,c.max)-u==0)return null;l.splice(e+1,0,u),o.options.axisCrossingValues=l;var d=t.clone();return t.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d},e.prototype.isTrendline=function(t){return t&&Ct(t.type,ts)},e.prototype.trendlineFactory=function(){},e.prototype.createTrendlineSeries=function(){var t=this,e=[];return this.series=this.series.map((function(o){if(!t.isTrendline(o))return o;var i=t.seriesByName(o.for);if(!i)throw new Error('Invalid Configuration: Unable to locate linked series "'+o.for+'" for trendline "'+o.name+'".');var r=Qr.current.valueFields(i),n=Wt(r),s=t.trendlineFactory(Object.assign({},{field:n},o),i);return s&&(!1===i.visible&&(s.visible=!1),s.color===S&&(s.color=i.color),e.push(s)),s})).filter((function(t){return null!==t})),e},e.prototype.seriesByName=function(t){return this.series.find((function(e){return e.name===t}))},e.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(Cp);if(e)return e}},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},e.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},e.prototype._getNextPoint=function(t,e,o){var i=this,r=e.call(this,t).filter(Cp),n=r.indexOf(t)+o,s=function(o){var r,n=0;do{n+=o,r=e.call(i,t,n).filter(Cp)}while(0===r.length);return r};return n<0?(r=s(-1)).at(-1):n>=r.length?(r=s(1)).at(0):r[n]},e.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){void 0===e&&(e=0);var o=ot(t.series.index+e,this.series.length);return this.pointsBySeriesIndex(o)},e}(To);function Tp(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Mp(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;if(n||Tp(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new xo}function Op(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Lp=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};te(Pp,{series:[],plotArea:{margin:{}},background:"",border:{color:u,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Ip=Pp;var Bp={hover:function(t,e){this._dispatchEvent(t,e,ss)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};const Ep=Bp;var Rp=function(t){function e(e,o,i){t.call(this);var r=o.canonicalFields(e),n=o.valueFields(e),s=o.sourceFields(e,r),a=this._seriesFields=[],p=i.query(e.type),l=e.aggregate||p;this._series=e,this._binder=o;for(var h=0;h<r.length;h++){var c=r[h],u=void 0;if(pt(l))u=l[c];else{if(0!==h&&!Ct(c,n))break;u=l}u&&a.push({canonicalName:c,name:s[h],transform:it(u)?u:Yr[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};if(n&&!K(n)&&!G(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<i.length;p++){var l=i[p],h=this._bindField(r.values,l.canonicalName),c=l.transform(h,o,r.dataItems,e);if(!(null===c||!pt(c)||zt(c.length)||c instanceof Date)){s=c;break}zt(c)&&Vp(l.name,s,c)}return s},e.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}},e.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n,s=t[r],a=s.valueFields;n=zt(a[e])?a[e]:s.fields[e],o.push(n)}return o},e}(q.Class);function Vp(t,e,o){var i=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),zt(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}const jp=Rp;var zp=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(q.Class);zp.current=new zp;const Dp=zp;var Fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=at({},t,t.from),o=at({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),o.visible&&(this.labelTo=this.createLabelElement(o),this.append(this.labelTo))},e.prototype.reflow=function(t){this.render();var e=this,o=e.labelFrom,i=e.labelTo,r=e.value;this.box=t,o&&(o.options.aboveAxis=r.from>r.to,o.reflow(t)),i&&(i.options.aboveAxis=r.to>r.from,i.reflow(t)),this.note&&this.note.reflow(t)},e}(Va);Fp.prototype.defaults=at({},Fp.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const Hp=Fp;var Np=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Hp},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.from,r=t.to,n=this.valueAxisRanges[o];null!==t&&K(i)&&K(r)&&((n=this.valueAxisRanges[o]=n||{min:P,max:T}).min=Math.min(n.min,i),n.max=Math.max(n.max,i),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Ga);Np.prototype.plotLimits=ta.prototype.plotLimits;const Up=Np;var Gp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(na);const Wp=Gp;var Xp="auto",Yp=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Oe(),this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,o=t.labels,i=this.value,r=this.fromPoint=new Wp(i,at({},this.options,{labels:o.from,markers:e.from})),n=this.toPoint=new Wp(i,at({},this.options,{labels:o.to,markers:e.to}));this.copyFields(r),this.copyFields(n),this.append(r),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,o=t.to;this.positionLabels(e,o),this.fromPoint.reflow(e),this.toPoint.reflow(o),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.createFocusHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i,r=this.box,n=r.center(),s=C;return this.options.vertical?(e=n.x,o=r.y1-5,i=d):(e=r.x2+5,o=n.y,i=f),{point:new yo(e,o),align:{horizontal:s,vertical:i}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var o,i,r=this.options,n=r.labels,s=r.vertical;n.position===Xp&&(s?e.y1<=t.y1?(i=cn,o=un):(i=un,o=cn):e.x1<=t.x1?(i=C,o=I):(i=I,o=C),n.from&&n.from.position||(this.fromPoint.options.labels.position=o),n.to&&n.to.position||(this.toPoint.options.labels.position=i))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e.prototype.focusVisual=function(){this.fromPoint.focusVisual()},e.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},e.prototype.getIndex=function(){return this.categoryIx},e}(To);at(Yp.prototype,oa),at(Yp.prototype,ia),Yp.prototype.defaults={markers:{visible:!1,background:z,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,margin:dt(3),padding:dt(4),animation:{type:rn,delay:on},position:Xp},notes:{label:{}},highlight:{markers:{border:{color:z,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}};const qp=Yp;var Zp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t),o=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),o.segments.push.apply(o.segments,this.stackSegments()),this.visual.append(e),this.visual.append(o)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(ka);const Qp=Zp;var Kp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new zr).process(this.toGeometryPoints(t))},e}(Qp);const $p=Kp;var Jp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(Qp);at(Jp.prototype,ha);const tl=Jp;var el=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return qp},e.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=t.valueFields;if(!Xs(r.from)&&!Xs(r.to)){if(this.seriesMissingValues(o)!==ln)return null;r={from:0,to:0}}var n=this.pointOptions(o,i);n=this.evalPointOptions(n,r,e);var s=t.fields.color||o.color;it(o.color)&&(s=n.color);var a=new qp(r,n);return a.color=s,this.append(a),a},e.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?$p:"step"===i?tl:Qp)(t,e,o)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),i=t.getSlot(e[1],e[1],!this.options.clip);if(o&&i)return{from:o,to:i}},e.prototype.pointSlot=function(t,e){var o,i,r=e.from,n=e.to;return this.options.invertAxes?(o=new xo(r.x1,t.y1,r.x2,t.y2),i=new xo(n.x1,t.y1,n.x2,t.y2)):(o=new xo(t.x1,r.y1,t.x2,r.y2),i=new xo(t.x1,n.y1,t.x2,n.y2)),{from:o,to:i}},e.prototype.addValue=function(e,o){var i=e.valueFields;K(i.from)||(i.from=i.to),K(i.to)||(i.to=i.from),t.prototype.addValue.call(this,e,o)},e.prototype.updateRange=function(t,e){if(null!==t&&K(t.from)&&K(t.to)){var o=e.series.axis,i=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:P,max:T},r=t.from,n=t.to;i.min=Math.min(i.min,r,n),i.max=Math.max(i.max,r,n)}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.from,o.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},e}(ta);at(el.prototype,ya,xa);const ol=el;var il=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this,o=e.options,i=e.value,r=e.owner.seriesValueAxis(o),n=[],s=[],a=[],p=r.getSlot(i.low,i.high),l=r.getSlot(i.open,i.open),h=r.getSlot(i.close,i.close);l.x1=h.x1=p.x1=t.x1,l.x2=h.x2=p.x2=t.x2;var c=p.center().x;n.push([l.x1,l.y1]),n.push([c,l.y1]),s.push([c,h.y1]),s.push([h.x2,h.y1]),a.push([c,p.y1]),a.push([c,p.y2]),this.lines=[n,s,a],this.box=p.clone().wrap(l.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Xa);const rl=il;var nl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return rl},e}(qa);const sl=nl;var al=function(t){function e(e,o,i){t.call(this),this.from=e,this.to=o,this.series=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,o=this.to.box,i=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;i.push([e.x1,r],[o.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;i.push([n,e.y1],[n,o.y2])}return i},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},o=q.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Z(o),this.visual.append(o)},e}(To);te(al,{animation:{type:rn,delay:on}});const pl=al;var ll=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=zs(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 l=Qr.current.bindPoint(n,p),h=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(l.valueFields.value=s,u=0,d=s):(l.valueFields.value=a,d=u-a,a=0):K(h)&&(a+=h,d=s+=h),t(l,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},e.prototype.updateRange=function(e,o){t.prototype.updateRange.call(this,{value:o.to},o)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],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=n[a];if(p&&s){var l=new pl(s,p,r);o.push(l),this.append(l)}s=p}}},e}(Ga);const hl=ll,cl=function(t,e,o){var i=t[String(e)];return i?i(o):null},ul=function(t,e){for(var o,i,r=0,n=0,s=0,a=0,p=0,l=Number.MAX_VALUE,h=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;isFinite(d)&&null!==d&&isFinite(f)&&null!==f&&(l=Math.min(d,l),h=Math.max(d,h),p++,r+=d,n+=f,s+=Math.pow(d,2),a+=d*f)}return p>0&&(i=(n-(o=(p*a-r*n)/(p*s-Math.pow(r,2)))*r)/p),{slope:o,intercept:i,count:p,xMin:l,xMax:h}},dl=function(t,e){return t.every((function(t){var o=t.valueFields;return!Xs(o[e])||o[e]>0}))},fl=function(t,e){for(var o=[],i=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,i.min)),max:Math.ceil(Math.min(r.max+2,i.max))},s=n.min;s<n.max;s++){var a=s+1;o[s]={category:e.categoryAt(s,!0),value:t(a)}}return o};const gl=function(t,e,o){for(var i=[],r=[],n=Math.max(2,o)-1,s=0,a=0,p=0;p<t.length;p++){var l=e(t[p]),h=l.xValue,c=l.yValue;if(isFinite(c)&&null!==c?(r.push(c),a+=c,s=Math.max(p,s)):r.push(null),p>=n){var u=r.filter((function(t){return null!==t})).length,d=r.shift()||0;if(u>0){var f=a/u;i.push([h,f]),a-=d;continue}}i.push([h,null])}return i.slice(0,s+1)};const yl=function(t,e,o){for(var i=Math.min(Math.max(o||1,1),6)+1,r=new Ce,n=new Ce,s=0,a=Number.MAX_VALUE,p=Number.MIN_VALUE,l=function(t){return t},h=[],c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;if(isFinite(d)&&null!==d&&isFinite(f)&&null!==f){a=Math.min(d,a),p=Math.max(d,p),s++,n.set(c,0,f),r.set(c,0,1),r.set(c,1,d);for(var g=2;g<=i;g++)r.set(c,g,Math.pow(r.get(c,1),g))}else r.set(c,0,0)}return r.width=Math.min(i,s),s>0&&(h=function(t,e){for(var o=t.transpose(),i=o.multiply(t).inverse().multiply(o).multiply(e),r=[],n=0;n<i.height;n++)r.push(i.get(n,0));return r}(r,n),l=function(t){return h.reduce((function(e,o,i){return e+o*Math.pow(t,i)}),0)}),{coefficients:h,count:s,valueMapper:l,xMin:a,xMax:p}};var vl={};vl[qn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e=t.categoryAxis,o=t.options,i=(0,t.seriesValues)();if(!dl(i,o.field))return null;var r,n=ul(i,(r=o.field,function(t){var e=t.categoryIx,o=t.valueFields;return{xValue:e+1,yValue:Math.log(o[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return fl((function(t){return p*Math.exp(l*t)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},vl[Zn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e,o=t.categoryAxis,i=t.options,r=ul((0,t.seriesValues)(),(e=i.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),n=r.slope,s=r.intercept;return r.count>0?fl((function(t){return n*t+s}),o):null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},vl[Qn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e,o=t.categoryAxis,i=t.options,r=ul((0,t.seriesValues)(),(e=i.field,function(t){var o=t.categoryIx,i=t.valueFields;return{xValue:Math.log(o+1),yValue:i[e]}})),n=r.slope,s=r.intercept;if(r.count>0){var a=n,p=s;return fl((function(t){return a*Math.log(t)+p}),o)}return null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},vl[Kn]=function(t){var e=t.options,o=function(t){var e=t.categoryAxis,o=function(t){var e,o=t.options,i=t.categoryAxis,r=t.seriesValues,n=(o.trendline||{}).period||2,s=i.totalRangeIndices(),a=i.currentRangeIndices(),p={min:Math.floor(Math.max(a.min-n,s.min)),max:Math.ceil(Math.min(a.max+n+2,s.max))};return gl(r(p),(e=o.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),n)}(t),i=[];return o.forEach((function(t){var o=t[0],r=t[1];i[o]={category:e.categoryAt(o,!0),value:r}})),i.length>0?i:null}(t);return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},vl[$n]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e,o=t.seriesValues,i=t.categoryAxis,r=t.options,n=(r.trendline||{}).order,s=yl(o(),(e=r.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),n),a=s.count,p=s.valueMapper;return a>0?fl((function(t){return p(t)}),i):null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},vl[Jn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e=t.categoryAxis,o=t.options,i=(0,t.seriesValues)();if(!dl(i,o.field))return null;var r,n=ul(i,(r=o.field,function(t){var e=t.categoryIx,o=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(o[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return fl((function(t){return p*Math.pow(t,l)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null};const ml=vl;var xl=[gn,Hn,Vn,Wn],_l=[Pn,Gn].concat(xl),bl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new La,this._seriesPointsCache={},this._currentPointsCache={},t.length>0){this.invertAxes=Ct(t[0].type,[yn,xn,Gn,Hn,Wn,jn,Cn,Nn]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createCategoryAxes(t),this.aggregateCategories(t),this.createTrendlineSeries(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof er?delete this.namedCategoryAxes[o]:(this.valueAxisRangeTracker.reset(o),delete this.namedValueAxes[o]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.trendlineFactory=function(t,e){var o=this.seriesCategoryAxis(t),i=this.seriesValues.bind(this,e.index),r=cl(ml,t.type,{options:t,categoryAxis:o,seriesValues:i});return r?(r.categoryAxis=e.categoryAxis,r.valueAxis=e.valueAxis,this.filterSeries(r,o)):r},e.prototype.trendlineAggregateForecast=function(){return this.series.map((function(t){return(t.trendline||{}).forecast})).filter((function(t){return void 0!==t})).reduce((function(t,e){return{before:Math.max(t.before,e.before||0),after:Math.max(t.after,e.after||0)}}),{before:0,after:0})},e.prototype.seriesValues=function(t,e){var o=[],i=this.srcSeries[t],r=this.seriesCategoryAxis(i);Ds(r.options.type,m)&&(this._seriesPointsCache={},this._currentPointsCache={},r.options.dataItems=[],i=this.aggregateSeries(i,r,r.totalRangeIndices()));for(var n=e?e.min:0,s=e?e.max:i.data.length,a=n;a<s;a++){var p=this.bindPoint(i,a);o.push({categoryIx:a,category:p.fields.category,valueFields:p.valueFields})}return o},e.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);var n=this.filterVisibleSeries(r);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],i)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(Ns(t,[gn,Hn]),e),this.createRangeAreaChart(Ns(t,[Vn,Wn]),e),this.createBarChart(Ns(t,[bn,yn]),e),this.createRangeBarChart(Ns(t,[zn,jn]),e),this.createBulletChart(Ns(t,[xn,Un]),e),this.createCandlestickChart(Ns(t,_n),e),this.createBoxPlotChart(Ns(t,[vn,Nn]),e),this.createOHLCChart(Ns(t,Tn),e),this.createWaterfallChart(Ns(t,[Xn,Cn]),e),this.createLineChart(Ns(t,[Pn,Gn]),e)},e.prototype.aggregateCategories=function(t){var e=[].concat(this.series),o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i];if(!this.isTrendline(r)){var n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(Ds(n.options.type,m)||r.categoryField)&&Ct(s,t)?this.aggregateSeries(r,n,n.currentRangeIndices()):this.filterSeries(r,n)}o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},e.prototype.filterSeries=function(t,e){var o=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,o),!zt(e.options.min)&&!zt(e.options.max))return t;var i=e.currentRangeIndices(),r=Ct(t.type,_l),n=at({},t);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&$s(n,i,o,(function(o){return{item:t.data[o],category:e.categoryAt(o,!0),categoryIx:o-i.min}}),(function(e){return zt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,n=Ds(i.type,m),s=t.data,a=[];n||e.indexCategories();for(var p=0;p<s.length;p++){var l=Qr.current.bindPoint(t,p).fields.category;if(n&&(l=Gs(l,s[p],this.chartService.intl)),zt(l)||(l=r[p]),zt(l)&&null!==l){var h=e.totalIndex(l);a[h]=a[h]||{items:[],category:l},a[h].items.push(p)}}return this._currentPointsCache[o]=a,a},e.prototype.aggregateSeries=function(t,e,o){if(!t.data.length)return t;for(var i=this.seriesSourcePoints(t,e),r=at({},t),n=new jp(at({},t),Qr.current,Dp.current),s=r.data=[],a=e.options.dataItems||[],p=function(t){var r=t-o.min,s=i[t];if(s||(s=i[t]={}),s.categoryIx=r,!s.item){var a=e.categoryAt(t,!0);s.category=a,s.item=n.aggregatePoints(s.items,a)}return s},l=o.min;l<=o.max;l++){var h=p(l);s[h.categoryIx]=h.item,h.items&&h.items.length&&(a[h.categoryIx]=h.item)}return Ct(r.type,_l)&&$s(r,o,e.totalCount(),p,(function(t){return i[t]})),e.options.dataItems=a,r},e.prototype.appendChart=function(e,o){var i=e.options.series,r=this.seriesCategoryAxis(i[0]),n=r.options.categories,s=Math.max(0,zs(i)-n.length);if(s>0)for(n=r.options.categories=r.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,i=wt([].concat(e.valueAxis),(function(t){return t.name===o}))[0],r=((e.panes||[{}])[0]||{}).name||"default";return(i||{}).pane||r},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,o=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!o)throw new Error("Unable to locate category axis with name "+e);return o},e.prototype.stackableChartOptions=function(t,e){var o=t.some((function(t){return t.stack})),i=t.some((function(t){return t.stack&&"100%"===t.stack.type})),r=e.options.clip;return{defaultStack:t[0].stack,isStacked:o,isStacked100:i,clip:r}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";Ae(o,r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=kl(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Ga(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(t,e)));this.appendChart(i,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Up(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var o=t[0],i=new fp(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new ba(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new Ma(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(o,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var o=new ol(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var o=t[0],i=new sl(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var o=t[0],i=new qa(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var o=t[0],i=new tp(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var o=t[0],i=new hl(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var o=Ns(this.series,Yn),i=0;i<this.series.length;i++){var r=this.series[i];if(Ct(r.type,xl)){var n=r.line;n&&n.style===fn&&o.push(r)}}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof er&&t[e].createLabels()},e.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(Ct(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=at({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?P:0},n),zt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(Ys(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),p=new hr(n,this.chartService)):p=new er(n,this.chartService),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 l=this.categoryAxis||i[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!Ct(t[e].type,xl))return!1;return!0},e.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(Ct(this.findPane(p.pane),t)){var l=p.name,h=Ds(p.type,ws)?{min:.1,max:1}:{min:0,max:1},c=e.query(l)||o||h;0===a&&c&&o&&(c.min=Math.min(c.min,o.min),c.max=Math.max(c.max,o.max));var u=new(Ds(p.type,ws)?Ar:vr)(c.min,c.max,at({},n,p),this.chartService);if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var d=this.valueAxis||s[0];this.valueAxis=d,r?this.axisX=d:this.axisY=d},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,l=0;l<p.length;l++){var h=p[l];h.getValue?Es(a,h.getValue(r)):Es(s,h.getCategory(r))}0===s.length&&Es(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(o,{element:Ut(e),originalEvent:e,category:qs(s),value:qs(a)})}},e.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}},e.prototype.updateAxisOptions=function(t,e){wl(this.options,t,e),wl(this.originalOptions,t,e)},e.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){if(void 0===e&&(e=0),this.invertAxes)return this._siblingsByPointIndex(t.getIndex());var o=this._siblingsBySeriesIndex(t.series.index,e);return this.chartService.rtl?o.reverse():o},e.prototype._siblingsByPointIndex=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++){var r=e[i];if(!r.pane||"_navigator"!==r.pane.options.name){var n=r.points.filter((function(e){return e&&!1!==e.visible&&e.getIndex()===t}));o.push.apply(o,n.sort(this._getSeriesCompareFn(n[0])))}}return o},e.prototype._siblingsBySeriesIndex=function(t,e){var o=ot(t+e,this.series.length);return this.pointsBySeriesIndex(o)},e.prototype._getSeriesCompareFn=function(t){var e=this._isInStackedSeries(t);return e&&this.invertAxes||!e&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},e.prototype._isInStackedSeries=function(t){var e=Ct(t.series.type,[gn,Hn,Vn,Wn,Pn,Gn,Rn,Bn]),o=Ct(t.series.type,[bn,yn]);return e||o&&t.options.isStacked},e}(Ip);function wl(t,e,o){at([].concat(e instanceof er?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}function kl(t,e,o){return wt(t,(function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e}))}te(bl,{categoryAxis:{},valueAxis:{}}),at(bl.prototype,Ep);const Al=bl;var Sl=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},e.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;if(i){var r={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Cl,visual:t.highlightVisual(),show:e};i(r),r._defaultPrevented||t.toggleHighlight(e,o)}else t.toggleHighlight(e,o)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1},e}(q.Class);function Cl(){this._defaultPrevented=!0}const Pl=Sl;function Tl(t,e){var o=(e||"").toLowerCase(),i=t.event;return"none"===o&&!(i.ctrlKey||i.shiftKey||i.altKey)||i[o+"Key"]}function Ml(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 Ol=function(t){function e(e,o){t.call(this),this.plotArea=e,this.options=at({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=Tl(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,F).concat(this._panAxes(t,H));if(e.length)return this.axisRanges=e,Ml(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==i&&(r||"").toLowerCase()!==e)for(var s=o.axes,a=0;a<s.length;a++){var p=s[a];if(e===F&&!p.options.vertical||e===H&&p.options.vertical){var l=p.pan(i);l&&(l.limitRange=!0,n.push({axis:p,range:l}))}}return n},e}(q.Class);Ol.prototype.options={key:"none",lock:"none"};const Ll=Ol;var Il=function(t){function e(e,o){t.call(this),this.chart=e,this.options=at({},this.options,o),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){ut(this._marquee,t)},e.prototype.start=function(t){if(Tl(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),i=this._zoomPane=e._plotArea.paneByPoint(o),r=i?i.chartsBox().clone():null;if(i&&r){var n=this._elementOffset();return r.translate(n.left,n.top),this._zoomPaneClipBox=r,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},e.prototype._elementOffset=function(){var t=this.chart.element,e=ut(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,i=e.paddingTop,r=Ft(t);return{left:o+r.left,top:i+r.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),o=this._selectionPosition(t);o.left-=e.left,o.top-=e.top;var i={x:o.left,y:o.top},r={x:o.left+o.width,y:o.top+o.height};return this._updateAxisRanges(i,r),this.removeElement(),delete this._zoomPane,Ml(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==F||a)&&(o!==H||!a)&&zt(s.axisIndex)){var p=s.pointsRange(t,e);p&&i.push({axis:s,range:p})}}this.axisRanges=i},e.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),l=Math.abs(o.y-r);return n===F&&(s=e.x1,p=e.width()),n===H&&(a=e.y1,l=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(l=e.y2-o.y),r<e.y1&&(l=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:l}},e}(q.Class);Il.prototype.options={key:"shift",lock:"none"};const Bl=Il;var El=function(t){function e(e,o){t.call(this),this.chart=e,this.options=at({rate:.3},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==F||a)&&(o!==H||!a)&&s.zoomRange){var p=Xt(this.options.rate,.01,.9),l=s.zoomRange(-t*p,e);l&&i.push({axis:s,range:l})}}return this.axisRanges=i,Ml(i)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(q.Class);const Rl=El;var Vl=function(t){function e(e,o){t.call(this,e),this.chartService=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t,e=this.children,o=this.options,i=o.vertical;this.visual=new q.drawing.Layout(null,{spacing:i?0:o.spacing,lineSpacing:i?o.spacing:0,orientation:i?"vertical":U,reverse:o.rtl,alignItems:i?(t=o.rtl,t?b:E):f});for(var r=0;r<e.length;r++){var n=e[r];n.reflow(new xo),n.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?Xo(e):new xo},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(To);const jl=Vl;var zl=10,Dl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e.prototype.markerOptions=function(){return this.options},e.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return at({},t,{background:t.border.color},t.highlight,t.type===v?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},e.prototype.createHighlight=function(){var e=new t(this.markerHighlightOptions()),o=this.paddingBox.clone();return e.reflow(o.pad(e.options.border.width)),this.highlight=[e.getElement()],this.highlight},e}(Ro);te(Dl,{border:{width:2},width:8,height:8,background:z,margin:{top:-1,left:-1},vAlign:V,align:C,highlight:{width:zl,height:zl,border:{color:z,width:2}}});const Fl=Dl;var Hl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath(this.visualStyle()),o=this.paddingBox,i=o.height()/2;return e.moveTo(o.x1,o.y1+i).lineTo(o.x1,o.y2).lineTo(o.x2,o.y2),t.append(e),t},e}(Ro);te(Hl,{width:15,height:15,align:I,vAlign:d,margin:{right:-2,bottom:2}});const Nl=Hl;var Ul=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),o=this.paddingBox,i=o.center().y;return e.moveTo(o.x1,i).lineTo(o.x2,i),t.append(e),t},e.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},e.prototype.createHighlightLine=function(){var t=at({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),e=new Nl(t);return e.reflow(this.parent.paddingBox.clone()),this.highlightLine=e.getElement(),this.highlightLine},e.prototype.createHighlightMarker=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),o=new t(e),i=this.parent.paddingBox,r=e.border.width,n=this.parent.box.clone();return n.pad({left:r-i.x1,top:r-i.y1}),o.reflow(n),this.highlightMarker=o.getElement(),this.highlightMarker},e}(Ro);te(Ul,{border:{width:0},type:"rect",align:C,vAlign:f,highlight:{border:{width:2},markers:{type:g,width:zl,height:zl,border:{width:2,color:z},align:C,vAlign:V}}});const Gl=Ul;var Wl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),o=new t(e),i=this.paddingBox.clone(),r=this.parent.box.clone();return i.align(r,F,C),i.align(r,H,V),o.reflow(i),this.highlight=[o.getElement()],this.highlight},e}(Ro);te(Wl,{highlight:{markers:{type:g,width:zl,height:zl,border:{width:2,color:z},margin:{top:-3,left:-3}}}});const Xl=Wl;var Yl=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Oe(),this.options.accessibility.ariaChecked=e.active}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new No({vertical:!1,wrap:!1,align:f,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.markerWrap=new t({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},e.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,o=t.line;void 0===o&&(o={});var i={border:{color:o.color||e,opacity:o.opacity,dashType:o.dashType}};return this._createLine(i)||this._createMarkerLine(i,o)||this._createSquare()},e.prototype.markerOptions=function(){var t=this.options,e=t.markers;void 0===e&&(e={});var o=t.markerColor,i=e.border;return void 0===i&&(i={}),e.zIndex=void 0,at({},e,{border:{color:i.color||o},highlight:t.highlight.markers})},e.prototype._highlightOptions=function(){var t=this.options;return at({markers:{type:t.markers.type}},t.highlight)},e.prototype._createLine=function(t){var e=this.options;return e.type!==Pn||e.markers.visible||(this._line=new Gl(at({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},e.prototype._createMarkerLine=function(t,e){return this.options.type===Pn&&(this._markerLineArea=new Nl(at({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},e.prototype._reduceSize=function(t,e,o){void 0===o&&(o=.6),"number"==typeof t[e]&&(t[e]=t[e]*o)},e.prototype._createSquare=function(){var t=this.options;if(t.type===gn){var e=t.pattern||(t.series||{}).pattern;e&&("function"==typeof e&&(e=e(t.series)),e=Object.assign({},e),this._reduceSize(e,"gap"),this._reduceSize(e,"width"),this._reduceSize(e,"radius")),this._square=new Xl(Object.assign({},{border:t.border,vAlign:t.markers.visible?d:f,highlight:this._highlightOptions()},t.area,{pattern:e,background:t.area.background||t.markerColor})),this.markerWrap.append(this._square)}return this._square},e.prototype._createMarker=function(){return new Fl(this.markerOptions())},e.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},e.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},e.prototype._toggleHighlight=function(t){var e=this;if(this.options.highlight.visible){var o=this._marker||this._square||this._line;if(o&&o===this._line&&this._line.visual.visible(!t),o){var i=o.highlight;i||(i=o.createHighlight()).forEach((function(t){return t&&e.markerWrap.appendVisual(t)})),i.forEach((function(e){return e&&e.visible(t)}))}}},e.prototype.createLabel=function(){var t=this.options,e=at({},t.labels);this.container.append(new Zo(t.text,e))},e.prototype.getAriaLabelText=function(){return this.options.text},e.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},e.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},o=this._itemOverlay=q.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:z,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(o)},e.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger(es,o)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);return t.trigger("legendItemHover",o)||(t._legendItemHover(o.seriesIndex,o.pointIndex),this._highlightMarkers()),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:Ut(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;if(this.options.visible){var o=at({ariaLabel:void 0!==e.accessibility.ariaLabel?e.accessibility.ariaLabel:e.text},e.accessibility);Bo(this.visual,o)}},e.prototype.renderVisual=function(){var e=this,o=this.options,i=o.visual;i?(this.visual=i({active:o.active,series:o.series,sender:this.getSender(),pointIndex:o.pointIndex,options:{type:o.type,markers:at({background:this.options.markerColor},this.markerOptions()),labels:o.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return q.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},e}(Io);te(Yl,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const ql=Yl;var Zl="custom",Ql=function(t){function e(e,o){void 0===o&&(o={}),t.call(this,e),this.chartService=o,Ct(this.options.position,[V,I,d,C,Zl])||(this.options.position=I),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=f;e===Zl?i=C:Ct(e,[V,d])?(i=o===E?C:o===b?I:f,r=e):o&&(o===E?r=V:o===b&&(r=d)),this.container=new Io({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 Io({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,o=this.isVertical(),i=new jl({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.data;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s],p=a.series||{},l=p.markers;void 0===l&&(l={});var h=p.dashType,c=p.legendItem,u=p.opacity,d=at({visible:!1!==l.visible,type:g},l);delete d.size;var f=at({},{markers:d,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:h},e.line),area:Object.assign({},{opacity:u},e.area),opacity:u,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers});i.append(new ql(f))}i.render(),this.itemsContainer.append(i)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,o=t.position;return o===Zl&&e!==U||(zt(e)?e!==U:Ct(o,[C,I]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.getItems=function(){return this.itemsContainer.children[0].children},e.prototype.reflow=function(t){var e=this.options,o=t.clone();this.hasItems()?(e.position===Zl?(this.containerCustomReflow(o),this.box=o):this.containerReflow(o),this.hasTitle()&&this.title.reflow(new xo(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=o},e.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===V||i===d?F:H,a=this.isVertical(),p=t.clone(),l=t.clone();i!==C&&i!==I||(l.y1=p.y1=0),a&&n?(l.y2=l.y1+n,l.align(p,H,o.options.vAlign)):!a&&r&&(l.x2=l.x1+r,l.align(p,F,o.options.align)),o.reflow(l);var h=(l=o.box).clone();(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),o.reflow(l)),h[s+1]=t[s+1],h[s+2]=t[s+2],this.box=h},e.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),o.reflow(p),p=o.box,o.reflow(new xo(i,r,i+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=at({},{color:u,position:V,align:f},t),o=e.text;if(t&&!1!==t.visible&&t.text){if(zt(e)&&e.visible){var i=vt(e);i?o=i({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))}this.title=new Zo(o,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new No({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===d?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(To);te(Ql,{position:I,data:[],offsetX:0,offsetY:0,margin:dt(2),padding:dt(5),border:{color:u,width:0},item:{cursor:N,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:N,opacity:1},area:{type:"square",align:I,width:15,height:15}});const Kl=Ql;var $l=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];i=Ns(t,a.seriesTypes);var p=Ns(t,ts);if(i.length-p.length>0){n=a;break}}return new n.type(i,e,o)},e}(q.Class);$l.current=new $l;const Jl=$l;function th(t){var e=document.createElement("div");return t&&(e.className=t),e}function eh(t){for(var e=t;e&&!kt(e,"k-handle");)e=e.parentNode;return e}var oh=function(t){function e(e,o,i,r){t.call(this);var n=e.element;this.options=at({},this.options,i),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=o,this._dateAxis=this.categoryAxis instanceof hr,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=th("k-selector k-pointer-events-none");ut(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=th("k-selection k-pointer-events-none");this.leftMask=th("k-mask k-pointer-events-none"),this.rightMask=th("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o);var i=this.body=th("k-selection-bg k-pointer-events-none");o.appendChild(i);var r=this.leftHandle=th("k-handle k-left-handle k-pointer-events-auto"),n=this.rightHandle=th("k-handle k-right-handle k-pointer-events-auto");r.appendChild(th()),n.appendChild(th()),o.appendChild(r),o.appendChild(n),this.chartElement.appendChild(e);var s=ut(o,["borderLeftWidth","borderRightWidth","height"]),a=ut(r,"height").height,p=ut(n,"height").height;t.selection={border:{left:s.borderLeftWidth,right:s.borderRightWidth}},ut(r,{top:(s.height-a)/2}),ut(n,{top:(s.height-p)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),jt(this.chartElement,((t={})[Cs]=this._mousewheelHandler,t))),this._domEvents=vi.create(this.chartElement,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&at(t,{min:Ki(o,t.min),max:Ki(o,t.max),from:Ki(o,t.from),to:Ki(o,t.to)});var i=ut(this.chartElement,["paddingLeft","paddingTop"]),r=i.paddingLeft,n=i.paddingTop;this.options=at({},{width:e.width(),height:e.height()+.1,padding:{left:r,top:n},offset:{left:e.x1+r,top:e.y1+n},from:t.min,to:t.max},t)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Qt(this.chartElement,((t={})[Cs]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._pointInPane=function(t,e){var o=this.categoryAxis.pane.box,i=this.chart._toModelCoordinates(t,e);return o.containsPoint(i)},e.prototype._start=function(t){var e=this.options,o=Ut(t);if(!this._state&&o){var i=Nt(t);if(this._pointInPane(i.x,i.y)){var r=eh(o),n=this.body.getBoundingClientRect(),s=!r&&i.x>=n.x&&i.x<=n.x+n.width&&i.y>=n.y&&i.y<=n.y+n.height;this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:s,range:{from:this._index(e.from),to:this._index(e.to)}};var a=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger(fs,a)&&(this._state=null)}}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:eh(Ut(t)))&&W(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this,o=e._state,i=e.options,r=e.categoryAxis,n=o.range,s=o.moveTarget,a=r.options.reverse,p=this._index(i.from),l=this._index(i.to),h=this._index(i.min),c=this._index(i.max),u=o.startLocation-t.x.location,d=n.from,f=n.to,g=n.to-n.from,y=ut(this.wrapper,"width").width/(r.categoriesCount()-1),v=Math.round(u/y)*(a?-1:1);if(s||o.inBody){var m=s&&kt(s,"k-left-handle"),x=s&&kt(s,"k-right-handle");o.inBody?(n.from=Math.min(Math.max(h,p-v),c-g),n.to=Math.min(n.from+g,c)):m&&!a||x&&a?(n.from=Math.min(Math.max(h,p-v),c-1),n.to=Math.max(n.from+1,n.to)):(m&&a||x&&!a)&&(n.to=Math.min(Math.max(h+1,l-v),c),n.from=Math.min(n.to-1,n.from)),n.from===d&&n.to===f||(this.move(n.from,n.to),this.trigger(gs,this._rangeEventArgs(n)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&Y(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger(ys,this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new yo(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),l=s-n,h=n+l/2,c={},u=3===t.event.which,d=Math.round(h-r);this._state||u||(this.chart._unsetActivePoint(),o.options.justified||d--,c.from=Math.min(Math.max(a,n-d),p-l),c.to=Math.min(c.from+l,p),this._start(t),this._state&&(this._state.range=c,this.trigger(gs,this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,o=Et(t);if(this._start(t),this._state){var i=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(o)>1&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(gs,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(i.from),to:this._value(i.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options,o=t.touches[0];if(this._pointInPane(o.pageX,o.pageY)){this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var i=this._rangeEventArgs(this._state.range);this.trigger(fs,i)?this._state=null:t.preventDefault()}},e.prototype._gestureend=function(){this._state&&(this.trigger(ys,this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){if(this._state){var e=this,o=e.chart,i=e._state,r=e.options,n=e.categoryAxis,s=i.range,a=o._toModelCoordinates(t.touches[0].x.location).x,p=o._toModelCoordinates(t.touches[1].x.location).x,l=Math.min(a,p),h=Math.max(a,p);t.preventDefault(),s.from=n.pointCategoryIndex(new yo(l))||r.min,s.to=n.pointCategoryIndex(new yo(h))||r.max,this.move(s.from,s.to),this.trigger(gs,this._rangeEventArgs(s))}},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,o=this._index(t);return e.getSlot(o,o,!0)},e.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?e:t,p=i?t:e,l="x"+(i?2:1),h=this._slot(a),c=Zt(h[l]-r.left+n.left);ut(this.leftMask,{width:c}),ut(this.selection,{left:c}),h=this._slot(p);var u=Zt(o.width-(h[l]-r.left+n.left));ut(this.rightMask,{width:u});var d=o.width-u;d!==o.width&&(d+=s.right),ut(this.rightMask,{left:d}),ut(this.selection,{width:Math.max(o.width-(c+u)-s.right,0)})},e.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=Xt(this._index(t),i,r),s=Xt(this._index(e),n+1,r);o.visible&&this.move(n,s),o.from=this._value(n),o.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=at({},a);if(this._state&&(a=this._state.range),r!==I&&(a.from=Xt(Xt(n-t,0,s-1),o,i)),r!==C&&(a.to=Xt(Xt(s+t,a.from+1,i),o,i)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.zoom=function(t,e){var o=this.options,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=at({},a),l=this.categoryAxis.options.reverse,h=F+(l?"2":"1"),c=this.categoryAxis.lineBox(),u=Math.abs(c[h]-e[F]),d=c.width(),f=Zt(u/d,2),g=Zt(f*t),y=Zt((1-f)*t);if(this._state&&(a=this._state.range),a.from=Xt(Xt(n-g,0,s-1),i,r),a.to=Xt(Xt(s+y,a.from+1,r),i,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(q.Class);te(oh,{visible:!0,mousewheel:{zoom:"both"},min:T,max:P});const ih=oh;var rh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var o=at({},this.options,e.options.tooltip),i=e.tooltipAnchor();i?(this._current=e,t.prototype.show.call(this,{point:e,anchor:i},o,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(yp);const nh=rh;var sh=function(t){function e(e,o){t.call(this,e.chartService,o),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var o=wt(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(o.length>0){var i=o[0],r=this.plotArea.categoryAxis.getSlot(i.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(i,r);this.show({anchor:n,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,r=o.center(),n=e.center();return{point:i?new yo(r.x,n.y):new yo(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(yp);te(sh,{categoryFormat:"{0:d}"});const ah=sh;var ph=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var o=e.vertical?H:F,i=this.fromScale=new q.geometry.Point(1,1);i[o]=sn,t.transform(q.geometry.transform().scale(i.x,i.y))}else this.abort()},e.prototype.step=function(t){var e=Pt(this.fromScale.x,1,t),o=Pt(this.fromScale.y,1,t);this.element.transform(q.geometry.transform().scale(e,o,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(q.drawing.Animation);te(ph,{duration:on}),q.drawing.AnimationFactory.current.register(yn,ph);var lh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(q.geometry.transform().scale(sn,sn,t))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.center))},e}(q.drawing.Animation);te(lh,{easing:"easeOutElastic"}),q.drawing.AnimationFactory.current.register(mn,lh);var hh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(q.drawing.Animation);te(hh,{duration:200,easing:"linear"}),q.drawing.AnimationFactory.current.register(rn,hh);var ch=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(q.geometry.transform().scale(sn,sn,this.options.center))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.options.center))},e}(q.drawing.Animation);te(ch,{easing:"easeOutElastic",duration:on}),q.drawing.AnimationFactory.current.register(Mn,ch);const uh=ch;var dh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,o){return new(e.style===dn?fa:aa)(t,e,o)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===ln){var o={x:t.x,y:t.y};return Xs(o.x)||(o.x=0),Xs(o.y)||(o.y=0),o}},e}(rp);at(dh.prototype,ya);const fh=dh,gh=function(t,e,o){var i=[],r=e.xMin,n=e.xMax,s=(o||{}).forecast;s&&(s.before>0&&(r-=s.before),s.after>0&&(n+=s.after));var a=(o||{}).samplingInterval,p=Kt(a,go(r,n)/10);a<=0&&(p=n-r);for(var l=r;l<=n;l+=p)i.push([l,t(l)]);return i};const yh=function(t){return function(e){var o=e.valueFields;return{xValue:o.x,yValue:o[t]}}},vh=function(t,e){for(var o=Number.MAX_VALUE,i=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,a=n.yValue;isFinite(s)&&null!==s&&isFinite(a)&&null!==a&&(o=Math.min(s,o),i=Math.max(s,i))}return{xMin:o,xMax:i}};var mh={};mh[qn]=function(t){var e=t.options,o=function(t){var e=t.options,o=(0,t.seriesValues)();if(!dl(o,e.field))return null;var i,r=ul(o,(i=e.field,function(t){var e=t.valueFields;return{xValue:e.x,yValue:Math.log(e[i])}})),n=r.slope,s=r.intercept,a=r.count,p={xMin:r.xMin,xMax:r.xMax};if(a>0){var l=Math.exp(s),h=n;return gh((function(t){return l*Math.exp(h*t)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},mh[Zn]=function(t){var e=t.options,o=function(t){var e=t.options,o=ul((0,t.seriesValues)(),yh(e.field)),i=o.slope,r=o.intercept,n=o.count,s=o.xMin,a=o.xMax;return n>0?gh((function(t){return i*t+r}),{xMin:s,xMax:a},e.trendline):null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},mh[Qn]=function(t){var e=t.options,o=function(t){var e=t.options,o=(0,t.seriesValues)();if(!dl(o,"x"))return null;var i,r=ul(o,(i=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:e[i]}})),n=r.slope,s=r.intercept,a=r.count,p=vh(o,function(t){return function(e){var o=e.valueFields;return{xValue:o.x,yValue:o[t]}}}(e.field));if(a>0){var l=n,h=s;return gh((function(t){return l*Math.log(t)+h}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},mh[Kn]=function(t){var e=t.options,o=function(t){var e=t.options,o=t.seriesValues,i=(e.trendline||{}).period||2,r=gl(o({before:i,after:i}),yh(e.field),i);return r.length>0?r:null}(t);return o?Object.assign({},e,{type:"scatterLine",data:o}):null},mh[$n]=function(t){var e=t.options,o=function(t){var e=t.seriesValues,o=t.options,i=(o.trendline||{}).order,r=yh(o.field),n=yl(e(),r,i),s=n.count,a=n.valueMapper,p=n.xMin,l=n.xMax;return s>0?gh(a,{xMin:p,xMax:l},o.trendline):null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},mh[Jn]=function(t){var e=t.options,o=function(t){var e=t.options,o=(0,t.seriesValues)();if(!dl(o,"x"))return null;var i,r=ul(o,(i=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:Math.log(e[i])}})),n=r.slope,s=r.intercept,a=r.count,p=vh(o,yh(e.field));if(a>0){var l=Math.exp(s),h=n;return gh((function(t){return l*Math.pow(t,h)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null};const xh=mh;var _h=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new La,this.yAxisRangeTracker=new La},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(Ns(n,Dn),i),this.createScatterLineChart(Ns(n,Fn),i),this.createBubbleChart(Ns(n,mn),i))}this.createAxes(t)},e.prototype.appendChart=function(e,o){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(o),delete this.namedYAxes[o]):(this.xAxisRangeTracker.reset(o),delete this.namedXAxes[o]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=wt([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=wt([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new rp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new fh(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new pp(this,{series:t,clip:e.options.clip}),e)},e.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=at({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ds(a.type,ws),l=s.query(),h=p?{min:.1,max:1}:{min:0,max:1},c=s.query(r)||l||h,u=[a.min,a.max],d=this.series,f=0;f<d.length;f++){var g=d[f],y=g[e?"yAxis":"xAxis"];if(y===a.name||0===o&&!y){var v=Qr.current.bindPoint(g,0).valueFields;u.push(v[e?"y":"x"]);break}}0===o&&l&&(c.min=Math.min(c.min,l.min),c.max=Math.max(c.max,l.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){i=!0;break}var _=new(Ds(a.type,m)||!a.type&&i?xr:p?Ar:vr)(c.min,c.max,a,this.chartService);if(_.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=_}return this.appendAxis(_),_},e.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++)Ct(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)Ct(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]},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l],c=h.options.vertical?p:a,u=h.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(o,{element:Ut(e),originalEvent:e,x:qs(a),y:qs(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);bh(this.options,r,o,e),bh(this.originalOptions,r,o,e)},e.prototype.trendlineFactory=function(t,e){var o=this.seriesValues.bind(this,e.index),i=cl(xh,t.type,{options:t,seriesValues:o});return i&&(i.xAxis=e.xAxis,i.yAxis=e.yAxis),i},e.prototype.seriesValues=function(t){for(var e=[],o=this.series[t],i=0;i<o.data.length;i++){var r=this.bindPoint(o,i);e.push({pointIx:i,valueFields:r.valueFields})}return e},e}(Ip);function bh(t,e,o,i){at([].concat(o?t.yAxis:t.xAxis)[e],i)}te(_h,{xAxis:{},yAxis:{}}),at(_h.prototype,Ep);const wh=_h;var kh=function(t){function e(e,o,i){t.call(this,i),this.value=e,this.sector=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},e.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,o=this.getLabelText(t);if(t.visible&&(o||0===o)){if(t.position===f||t.position===As)t.color||(t.color=fe(this.options.color)),t.background||(t.background=this.options.color);else{var i=e.theme.seriesDefaults.labels;t.color=t.color||i.color,t.background=t.background||i.background}this.label=new Zo(o,at({},t,{align:f,vAlign:"",animation:{type:rn,delay:this.animationDelay}}),this.pointData()),this.append(this.label)}},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,o=this.sector.clone(),i=t.distance,r=o.middle();if(e){var n,s=e.box.height(),a=e.box.width();if(t.position===f)o.radius=Math.abs((o.radius-s)/2)+s,n=o.point(r),e.reflow(new xo(n.x,n.y-s/2,n.x,n.y));else if(t.position===As)o.radius=o.radius-s/2,n=o.point(r),e.reflow(new xo(n.x,n.y-s/2,n.x,n.y));else{var p;(n=o.clone().expand(i).point(r)).x>=o.center.x?(p=n.x+a,e.orientation=I):(p=n.x-a,e.orientation=C),e.reflow(new xo(p,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,o=this.sector,i=this.options;if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value)if(i.visual){var r=(o.startAngle+180)%360,n=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new q.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:r,endAngle:r+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new q.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},r=i.width>0?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,s=Oo(o.pattern,{color:n,opacity:o.opacity}),a=this.createSegment(e,at({fill:s,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(a),Ws(o)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},at({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new q.drawing.Circle(new q.geometry.Circle(new q.geometry.Point(t.center.x,t.center.y),t.radius),e):Co.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,o=this.sector.center;at(e,{animation:{center:[o.x,o.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,at({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new q.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,o=this.createSegment(this.sector,at({},t,{stroke:{width:2*e}})),i=new q.drawing.MultiPath;return i.paths.push(q.drawing.Path.fromRect(o.bbox())),i.paths.push(this.createSegment(this.sector,{})),o.clip(i),o},e.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.sector.clone().expand(5),n=r.middle();return{point:r.point(n),align:(t=n+180,e=qt(t),o=Zt(Math.sin(e),_),i=Zt(Math.cos(e),_),{horizontal:Math.abs(o)>Sh?f:i<0?I:C,vertical:Math.abs(o)<Ah?f:o<0?d:V})}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(To),Ah=Zt(qt(30),_),Sh=Zt(qt(60),_);te(kh,{color:z,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:x,margin:dt(.5),align:g,zIndex:1,position:Ss},animation:{type:Mn},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(kh.prototype,oa),at(kh.prototype,Ea);const Ch=kh;var Ph={createLegendItem:function(t,e,o){var i=this.options.legend||{},r=i.labels||{},n=i.inactiveItems||{},s=n.labels||{};if(o&&!1!==o.visibleInLegend){var a,p,l=!1!==o.visible,h=l?vt(r):vt(s)||vt(r),c=o.category;h&&(c=h({text:c,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),l?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),Xs(c)&&""!==c&&this.legendItems.push({active:l,pointIndex:o.index,text:c,series:o.series,markerColor:p,pattern:e.pattern,labels:a})}}};const Th=Ph;var Mh=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,o=this.plotArea.options.seriesColors;void 0===o&&(o=[]);for(var i=o.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,l=js(a),h=l.total,c=l.points,u=l.count,d=360/h,g=void 0;isFinite(d)||(g=360/u);var y=void 0;y=zt(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&a.labels.position===Ss&&(a.labels.position=f);for(var v=0;v<c.length;v++){var m=c[v];if(m){var x=m.fields,_=m.value,b=m.visible,w=0!==_?g||_*d:0,k=1!==p.length&&Boolean(x.explode);it(a.color)||(a.color=x.color||o[v%i]),t(_,new wo(null,0,0,y,w),{owner:this,category:zt(x.category)?x.category:"",pattern:zt(x.pattern)?x.pattern:a.pattern,index:v,series:a,seriesIx:s,dataItem:p[v],percentage:0!==h?_/h:0,explode:k,visibleInLegend:x.visibleInLegend,visible:b,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==b&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Hs(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},e.prototype.addValue=function(t,e,o){var i=at({},o.series,{index:o.index});if(i.pattern=o.pattern||i.pattern,this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible){var r=new Ch(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this,o=e.options,i=e.points,r=e.seriesConfigs;void 0===r&&(r=[]);var n=i.length,s=t.clone(),a=Math.min(s.width(),s.height()),p=a/2,l=a-.85*a,h=new xo(s.x1,s.y1,s.x1+a,s.y1+a),c=h.center(),u=s.center(),d=o.series.length,f=[],g=[],y=Kt(o.padding,l);this.targetBox=t,y=y>p-5?p-5:y,h.translate(u.x-c.x,u.y-c.y);for(var v=p-y,m=new yo(v+h.x1+y,v+h.y1+y),x=0;x<n;x++){var _=i[x],b=_.sector,w=_.seriesIx;if(b.radius=v,b.center=m,r.length){var k=r[w];b.innerRadius=k.innerRadius,b.radius=k.radius}w===d-1&&_.explode&&(b.center=b.clone().setRadius(.15*b.radius).point(b.middle())),_.reflow(h);var A=_.label;A&&A.options.position===Ss&&w===d-1&&(A.orientation===I?g.push(A):f.push(A))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=h},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=Wt(this.points),o=e.sector,i=t.length-1,r=o.radius+e.options.labels.distance,n=[],s=t[0].box,a=Zt(s.y1-(o.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<i;p++){var l=t[p+1].box;s=t[p].box,a=Zt(l.y1-s.y2),n.push(a)}return a=Zt(o.center.y+r-t[i].box.y2-t[i].box.height()/2),n.push(a),n},e.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;r>0&&(o>=0||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,o,i){var r=i;if(t[o]>0){var n=Math.min(t[o],r);r-=n,t[o]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var o,i=Wt(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 l=0;l<s;l++){var h=e[l],c=h.box;p+=t[l],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),h.orientation===I),h.orientation===I?(n.align!==g&&(o=r.radius+r.center.x+a),h.reflow(new xo(o+c.width(),p,o,p))):(n.align!==g&&(o=r.center.x-r.radius-a),h.reflow(new xo(o-c.width(),p,o,p))),p+=c.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,o=this.points,i=o.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<i;r++){var n=o[r],s=n.sector,a=n.label,p=s.middle(),l=(n.options.connectors||{}).color||e.color;if(a){var h=new q.drawing.Path({stroke:{color:l,width:e.width},animation:{type:rn,delay:n.animationDelay}});if(a.options.position===Ss){var c=a.box,u=s.center,d=s.point(p),f=new yo(c.x1,c.center().y),g=void 0,y=void 0,v=void 0;d=s.clone().expand(e.padding).point(p),h.moveTo(d.x,d.y),a.orientation===I?(v=Oh(u,d,f,y=new yo(c.x1-e.padding,c.center().y)),f=new yo(y.x-4,y.y),(v=v||f).x=Math.min(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x<s.center.x?(g=s.center.x+s.radius+4,n.options.labels.align!==bn?g<f.x?h.lineTo(g,d.y):h.lineTo(d.x+8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))):(v=Oh(u,d,f,y=new yo(c.x2+e.padding,c.center().y)),f=new yo(y.x+4,y.y),(v=v||f).x=Math.max(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x>s.center.x?(g=s.center.x-s.radius-4,n.options.labels.align!==bn?g>f.x?h.lineTo(g,d.y):h.lineTo(d.x-8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))),h.lineTo(y.x,y.y),this._connectorLines.push(h),this.visual.append(h)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),le(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,o=this.box.center(),i=this.visual.bbox();if(!i)return;var r=i.bottomRight(),n=Math.min((o.y-e.y1)/(o.y-i.origin.y),(e.y2-o.y)/(r.y-o.y),(o.x-e.x1)/(o.x-i.origin.x),(e.x2-o.x)/(r.x-o.x));n<1&&this.visual.transform(q.geometry.transform().scale(n,n,[o.x,o.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,o){return((t.parent.sector.middle()+270)%360-(o.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,a=s.x,p=s.y,l=Math.min(Math.abs(p-o),Math.abs(p-i));return l>n?t:a+Math.sqrt(n*n-l*l)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}(To);function Oh(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),s=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new yo(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}te(Mh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),at(Mh.prototype,Th),Mh.prototype.isStackRoot=!0;const Lh=Mh;var Ih=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],o=new Lh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Vt(this.options.legend.data,e.legendItems)},e.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},e.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},e}(Ip);const Bh=Ih;var Eh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();if(o){var n=o.box.height();if(e.position===f){i.radius-=(i.radius-i.innerRadius)/2;var s=i.point(r);o.reflow(new xo(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Co.current.createRing(t,e)},e}(Ch);te(Eh,{overlay:{gradient:"roundedGlass"},labels:{position:f},animation:{type:Mn}}),at(Eh.prototype,oa);const Rh=Eh;var Vh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,o){var i=at({},o.series,{index:o.index});if(i.pattern=o.pattern||i.pattern,this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible){var r=new Rh(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var o,i=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=i.series,l=p.length,h=Kt(i.padding,a),c=s-(h=h>s-5?s-5:h),u=0,d=0;d<l;d++){var f=p[d];0===d&&zt(f.holeSize)&&(o=f.holeSize,c-=f.holeSize),zt(f.size)?c-=f.size:u++,zt(f.margin)&&d!==l-1&&(c-=f.margin)}zt(o)||(c-=o=(s-h)/(l+.75)*.75);var g,y=o,v=0;this.seriesConfigs=[];for(var m=0;m<l;m++){var x=p[m];g=(y+=v)+Kt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,o){return 50*t+on*(e+1)/(o+1)},e}(Lh);te(Vh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const jh=Vh;var zh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],o=new jh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e}(Bh);const Dh=zh;var Fh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new La},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,i=t.getSlot(o),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-i.x1,r.y-i.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,o=this.valueAxisRangeTracker.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});i.type===ws?(t=Vr,e={min:.1,max:1}):(t=Er,e={min:0,max:1});var r=o||e,n=new t(r.min,r.max,i,this.chartService);this.valueAxis=n,this.appendAxis(n)},e.prototype.reflowAxes=function(){var t=this,e=t.options.plotArea,o=t.valueAxis,i=t.polarAxis,r=t.box,n=.15*Math.min(r.width(),r.height()),s=dt(e.padding||{},n),a=r.clone().unpad(s),p=a.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(a,H,f);var l=p.clone().shrink(0,p.height()/2);i.reflow(p),o.reflow(l);var h=o.lineBox().height()-o.box.height();o.reflow(o.box.unpad({top:h})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Ip);const Hh=Fh;var Nh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var o=t.center.y-e.y1,i=yo.onCircle(t.center,t.startAngle,o);return new xo(i.x,i.y,i.x,i.y)},e}(rp);te(Nh,{clip:!1});const Uh=Nh;var Gh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(fh);Gh.prototype.pointSlot=Uh.prototype.pointSlot,te(Gh,{clip:!1});const Wh=Gh;var Xh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),o=new zr(!1),i=this.points();i.push(e),(t=this._strokeSegments=o.process(i)).pop()}return t},e}(Pa);const Yh=Xh;var qh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),o=new q.geometry.Segment([e.x,e.y]);t.segments.unshift(o),t.segments.push(o)},e}(ka);const Zh=qh;var Qh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o){return(e.line||{}).style===dn?new Yh(t,e,o):new Zh(t,e,o)},e.prototype.createMissingValue=function(t,e){var o;return Xs(t.x)&&e!==hn&&(o={x:t.x,y:t.y},e===ln&&(o.y=0)),o},e.prototype.seriesMissingValues=function(t){return t.missingValues||ln},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort(Kh),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Xs(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t},e}(Wh);function Kh(t,e){return t.value.x-e.value.x}const $h=Qh;var Jh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Mr(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),t.prototype.render.call(this)},e.prototype.valueAxisOptions=function(t){return at(t,{majorGridLines:{type:s},minorGridLines:{type:s}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.trendlineFactory=function(t,e){var o=wh.prototype.trendlineFactory.call(this,t,e);return o&&(o.type=Ln),o},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Ip.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Ns(t,[Ln]),e),this.createScatterChart(Ns(t,[In]),e),this.createAreaChart(Ns(t,[On]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new Wh(this,{series:t});this.appendChart(o,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var o=new Uh(this,{series:t});this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new $h(this,{series:t});this.appendChart(o,e)}},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:Ut(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(Hh);te(Jh,{xAxis:{},yAxis:{}}),at(Jh.prototype,Ep,{seriesValues:wh.prototype.seriesValues});const tc=Jh;var ec=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var o=t.center.y-e.y1,i=yo.onCircle(t.center,t.middle(),o);return new xo(i.x,i.y,i.x,i.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),o=0;o<e.length;o++){var i=e[o];if(i&&i.length>1){var r=i[0].linePoints[0],n=Wt(i),s=Wt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Wt(i).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,o){var i=new(e.style===dn?fa:aa)(t,e,o),r=this.seriesMissingValues(e);return t.length!==e.data.length&&r!==hn||(i.options.closed=!0),i},e}(ba);te(ec,{clip:!1,limitPoints:!1});const oc=ec;var ic=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Pa);const rc=ic;var nc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(ka);const sc=nc;var ac=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&o>0&&i&&(n=i.linePoints.slice(0),r=i),p===dn?(s=new rc(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new sc(t,e,o,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||ln},e}(oc);const pc=ac;var lc=function(t){function e(e,o){t.call(this,e,null,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getIndex=function(){return this.categoryIx},e}(Rh);te(lc,{overlay:{gradient:"none"},labels:{distance:10}});const hc=lc;var cc=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?za:ja}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=this.children,i=e.gap,r=e.spacing,n=o.length,s=n+i+r*(n-1),a=t.angle/s,p=t.startAngle+a*(i/2);this.forEach(o,(function(e){var o=t.clone();o.startAngle=p,o.angle=a,e.sector&&(o.radius=e.sector.radius),e.reflow(o),e.sector=o,p+=a+a*r}))},e}(To);te(cc,{gap:1,spacing:0});const uc=cc;var dc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new xo;for(var s=r;s>=0&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(To);const fc=dc;var gc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return hc},e.prototype.clusterType=function(){return uc},e.prototype.stackType=function(){return fc},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var o=t.clone(),i=t.center.y;return o.radius=i-e.y1,o.innerRadius=i-e.y2,o},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Ga);gc.prototype.reflow=ta.prototype.reflow,te(gc,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const yc=gc;var vc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Pr(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&at(t,{majorGridLines:{type:s},minorGridLines:{type:s}}),this._isStacked100&&at(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),at(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Al.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Al.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.trendlineFactory=function(t,e){var o=Al.prototype.trendlineFactory.call(this,t,e);return o&&(o.type=Rn),o},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Ns(t,[Bn]),e),this.createLineChart(Ns(t,[Rn]),e),this.createBarChart(Ns(t,[En]),e)},e.prototype.chartOptions=function(t){var e={series:t},o=t[0];if(o){var i=this.filterVisibleSeries(t),r=o.stack;e.isStacked=r&&i.length>1,e.isStacked100=r&&"100%"===r.type&&i.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new pc(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new oc(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=this.chartOptions(t),r=this.filterVisibleSeries(t),n=r.some((function(t){return t.stack})),s=r.some((function(t){return t.stack&&"100%"===t.stack.type}));i.gap=o.gap,i.spacing=o.spacing,i.defaultStack=o.stack&&r.length>1,i.isStacked=n&&r.length>1,i.isStacked100=s&&r.length>1;var a=new yc(this,i);this.appendChart(a,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:Ut(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e.prototype._pointsByVertical=function(e){return t.prototype._pointsByVertical.call(this,e).sort(this._getSeriesCompareFn())},e.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},e}(Hh);at(vc.prototype,Ep,{appendChart:Al.prototype.appendChart,aggregateSeries:Al.prototype.aggregateSeries,seriesSourcePoints:Al.prototype.seriesSourcePoints,seriesValues:Al.prototype.seriesValues}),te(vc,{categoryAxis:{categories:[]},valueAxis:{}});const mc=vc;var xc=function(t){function e(e,o,i){t.call(this,o),this.value=e,this.options.index=i.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.reflow=function(t){var e=this.points,o=this.children[0],i=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new xo(i,e[0].y,r,e[2].y),o&&o.reflow(new xo(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,o=this,i=this.options;t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(e=i.visual?i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:i,sender:this.getSender(),createVisual:function(){return o.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return q.drawing.Path.fromPoints(this.points,{fill:Oo(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return q.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=q.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,o=q.drawing.Path.fromPoints(this.points,at({},t,{stroke:{width:2*e}})).close(),i=new q.drawing.MultiPath;return i.paths.push(q.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(q.drawing.Path.fromPoints(this.points)),o.clip(i),o},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new yo(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(To);te(xc,{color:z,border:{width:1},labels:{format:""},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(xc.prototype,oa),at(xc.prototype,Ea);const _c=xc;var bc=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var r=js(o),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var l=p.fields;it(o.color)||(o.color=l.color||e[a%e.length]),l=at({index:a,owner:this,series:o,seriesIx:0,dataItem:i[a],percentage:p.value/n},l,{visible:p.visible});var h=p.valueFields.value,c=this.createSegment(h,l),u=this.createLabel(h,l);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Hs(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},e.prototype.createSegment=function(t,e){var o=at({},e.series);if(o.pattern=e.pattern||o.pattern,this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){var i=new _c(t,o,e);return Object.assign(i,e),this.append(i),this.points.push(i),i}},e.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=at({},this.options.labels,o.labels),n=t;if(r.visible){var s=vt(r),a={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(a):r.format&&(n=this.chartService.format.auto(r.format,n)),r.color||(r.color=fe(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);var p=new Zo(n,at({vAlign:r.position},r),a);return this.labels.push(p),p}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i=t[o].options.align;if(i!==f){var r=t[o].box.width();i===C?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.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 l=s.percentage/a.percentage*e,h=(e-l)/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=i.dynamicHeight?o*d:o/n,m=void 0;m=Xt(m=d?(e-l*(g/d))/2:g?0:e/2,0,e),y.push(new q.geometry.Point(t.x1+h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new q.geometry.Point(t.x1+m,t.y1+v+c)),h=m,c+=v+i.segmentSpacing,l=Xt(e-2*m,0,e)}},e.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,l=((s?e:e-2*p)-a)/2,h=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?l*d:l/n,g=i.dynamicHeight?o*d:o/n;u.push(new q.geometry.Point(t.x1+p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p-f,t.y1+g+h)),u.push(new q.geometry.Point(t.x1+p+f,t.y1+g+h)),p+=f,h+=g+i.segmentSpacing}},e.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)}},e}(To);te(bc,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:f,position:f,zIndex:1}}),at(bc.prototype,Th);const wc=bc;var kc=function(t){function e(e,o){o.dynamicSlope=!1,o.neckRatio=1e6,t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(wc);const Ac=kc;var Sc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createChart(wc,Ns(this.series,[kn])),this.createChart(Ac,Ns(this.series,[An]))},e.prototype.createChart=function(t,e){var o=e[0];if(o){var i=new t(this,{series:e,legend:this.options.legend,neckRatio:o.neckRatio,dynamicHeight:o.dynamicHeight,dynamicSlope:o.dynamicSlope,segmentSpacing:o.segmentSpacing,highlight:o.highlight});this.appendChart(i)}},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Vt(this.options.legend.data,e.legendItems)},e.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},e.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},e.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},e}(Ip);const Cc=Sc;var Pc=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||z,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){var e=t.color;return e||(e=fe(this.color)),new Zo(this.getLabelText(t),at({align:f,vAlign:f,margin:{left:5,right:5},zIndex:Kt(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},e.prototype.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i=Kt(t.type,"rect")===B,r=Kt(e.width,i?1:0),n=Math.round(r/2);if(t.size){var s=o.center();o.size.width=o.size.height=t.size,o.origin.x=Math.round(s.x-o.size.width/2),o.origin.y=Math.round(s.y-o.size.height/2)}return o.size.width-=r,o.size.height-=r,o.origin.y+=n+.5,o.origin.x+=n+.5,Xo(o)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,o=Kt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:o,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,o=new Ro({type:Kt(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=o,this.append(o)},e.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,i=new Ro({type:Kt(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:Kt(e.zIndex,this.series.zIndex)});i.reflow(this.markerBox());var r=i.getElement();return r.options.fill=t.fill,r.options.stroke=t.stroke,r},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,o=new Ro({type:Kt(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return o.reflow(this.markerBox()),o.getElement()},e.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new yo(t,e),align:{horizontal:f,vertical:d}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){},e.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},e}(To);at(Pc.prototype,oa),at(Pc.prototype,ia),at(Pc.prototype,Ea),Pc.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}};const Tc=Pc;var Mc=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:P,max:T},this._evalSeries=[]},e.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},e.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this.plotArea.bindPoint(o,i).valueFields;zt(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},e.prototype.addValue=function(t,e){var o;t&&zt(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},e.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];zt(s)||(this._evalSeries[r]=s=Hs(t,{},n,!0));var a=t;return s&&Hs(a=at({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Tc},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=at({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return Object.assign({},o)},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;i.pattern=e.pattern||i.pattern,i=this.evalPointOptions(i,t,e),it(o.color)?r=i.color:0!==this.valueRange.max&&(r=function(t,e){void 0===e&&(e=.05);var o=(0,q.parseColor)(t),i=1-e;return function(t){var e=o.toHSL(),r=100-e.l,n=i-t;return e.l+=Math.min(n*r,r),e.toCss()}}(r)(t.value/this.valueRange.max));var n=new Tc(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:r,yAxis:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.xAxis,l=a.yAxis,h=p.categoryIndex(t.x),c=l.categoryIndex(t.y),u=p.getSlot(h,h,i),d=l.getSlot(c,c,i);if(s)if(u&&d){var f=e.pointSlot(u,d);s.reflow(f)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new xo(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),l=0;l<i.data.length;l++){var h=this.plotArea.bindPoint(i,l),c=h.valueFields,u=h.fields,d=n.totalIndex(c.x),f=s.totalIndex(c.y),g=a.min<=d&&d<=a.max,y=p.min<=f&&f<=p.max;g&&y&&t(c,at({pointIx:l,series:i,seriesIx:o,dataItem:i.data[l],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(To);te(Mc,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const Oc=Mc;var Lc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},e.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=be(n.categories||[]),p=be(s.categories||[]),l=0;l<i.length;l++){var h=Qr.current.bindPoint(o,l).valueFields,c=h.x,u=h.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&this.createHeatmapChart(Ns(n,[Sn]),i)}},e.prototype.createHeatmapChart=function(t,e){var o=new Oc(this,{series:t});this.appendChart(o,e)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=wt([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=wt([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.seriesAxes=function(t){var e,o,i=this.options,r=[].concat(i.xAxis),n=t.xAxis;e=n?r.find((function(t){return t.name===n})):r[0];var s=[].concat(i.yAxis),a=t.yAxis;if(o=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!o)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:o}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,o){for(var 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}),a=s.categories?s.categories[0]:null,p=[s.min,s.max,a],l=this.series,h=0;h<l.length;h++){var c=l[h],u=c[e?"yAxis":"xAxis"];if(u===s.name||0===o&&!u){var d=Qr.current.bindPoint(c,0).valueFields;p.push(d[e?"y":"x"]);break}}for(var f=0;f<p.length;f++)if(p[f]instanceof Date){i=!0;break}var g=new(Ds(s.type,m)||!s.type&&i?hr:er)(s,this.chartService);if(g.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=g}return this.appendAxis(g),g.indexCategories(),g},e.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++)Ct(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)Ct(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]},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[o]:delete this.namedXAxes[o],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l];Es(h.options.vertical?p:a,h.getCategory(r))}a.length>0&&p.length>0&&t.trigger(o,{element:Ut(e),originalEvent:e,x:qs(a),y:qs(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);Bc(this.options,r,o,e),Bc(this.originalOptions,r,o,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e.prototype._pointsByVertical=function(t,e){var o=this;void 0===e&&(e=0);var i=this.axisX.options.reverse?-1*e:e,r=this.axisX.children,n=this._getPointAxisXIndex(t)+i,s=r[n=ot(n,r.length)].value,a=this.filterPoints((function(t){return Ic(t.pointData().x,s)})).sort((function(t,e){return o._getPointAxisYIndex(t)-o._getPointAxisYIndex(e)}));return this.axisY.options.reverse?a.reverse():a},e.prototype._pointsByHorizontal=function(t,e){var o=this;void 0===e&&(e=0);var i=this.axisY.options.reverse?-1*e:e,r=this.axisY.children,n=this._getPointAxisYIndex(t)+i,s=r[n=ot(n,r.length)].value,a=this.filterPoints((function(t){return Ic(t.pointData().y,s)})).sort((function(t,e){return o._getPointAxisXIndex(t)-o._getPointAxisXIndex(e)}));return this.axisX.options.reverse?a.reverse():a},e.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},e.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},e.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex((function(t){return Ic(e,t.value)}))},e}(Ip);function Ic(t,e){return t instanceof Date&&e instanceof Date?Yi(t,e):t===e}function Bc(t,e,o,i){at([].concat(o?t.yAxis:t.xAxis)[e],i)}te(Lc,{xAxis:{},yAxis:{}}),at(Lc.prototype,Ep);const Ec=Lc;var Rc="color",Vc="first",jc="max",zc="min",Dc="noteText";Jl.current.register(Al,[yn,bn,Pn,Gn,gn,Hn,_n,Tn,xn,Un,vn,Nn,zn,jn,Xn,Cn,Vn,Wn].concat(ts)),Jl.current.register(wh,[Dn,Fn,mn].concat(ts)),Jl.current.register(Bh,[Mn]),Jl.current.register(Dh,[wn]),Jl.current.register(Cc,[kn,An]),Jl.current.register(tc,[On,Ln,In].concat(ts)),Jl.current.register(mc,[Bn,En,Rn].concat(ts)),Jl.current.register(Ec,[Sn]),Qr.current.register([yn,bn,Pn,Gn,gn,Hn],[j],[ks,Rc,Dc,an,pn,Ps,Ts]),Qr.current.register([zn,jn,Vn,Wn],["from","to"],[ks,Rc,Dc,Ps,Ts]),Qr.current.register([Xn,Cn],[j],[ks,Rc,Dc,"summary",Ps,Ts]),Qr.current.register([On,Ln,In],[F,H],[Rc,Ps,Ts]),Qr.current.register([Bn,En,Rn],[j],[ks,Rc,Ps,Ts]),Qr.current.register([kn,An],[j],[ks,Rc,"visibleInLegend","visible",Ps,Ts]),Dp.current.register([yn,bn,Pn,Gn,gn,Hn,Xn,Cn],{value:jc,color:Vc,noteText:Vc,errorLow:zc,errorHigh:jc}),Dp.current.register([zn,jn,Vn,Wn],{from:zc,to:jc,color:Vc,noteText:Vc}),Dp.current.register([Bn,En,Rn],{value:jc,color:Vc}),Qr.current.register([Dn,Fn,mn],[F,H],[Rc,Dc,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Qr.current.register([mn],[F,H,"size"],[Rc,ks,Dc,Ts]),Qr.current.register([Sn],[F,H,j],[Rc,Dc,Ts]),Qr.current.register([_n,Tn],["open","high","low","close"],[ks,Rc,"downColor",Dc,Ts]),Dp.current.register([_n,Tn],{open:jc,high:jc,low:zc,close:jc,color:Vc,downColor:Vc,noteText:Vc}),Qr.current.register([vn,Nn],["lower","q1","median","q3","upper","mean","outliers"],[ks,Rc,Dc,Ps,Ts]),Dp.current.register([vn,Nn],{lower:jc,q1:jc,median:jc,q3:jc,upper:jc,mean:jc,outliers:Vc,color:Vc,noteText:Vc}),Qr.current.register([xn,Un],["current","target"],[ks,Rc,"visibleInLegend",Dc,Ps,Ts]),Dp.current.register([xn,Un],{current:jc,target:jc,color:Vc,noteText:Vc}),Qr.current.register([Mn,wn],[j],[ks,Rc,"explode","visibleInLegend","visible",Ps,Ts]);var Fc=[ks,j,F,H],Hc="mousedown",Nc="mousemove",Uc="contextmenu",Gc="mouseleave",Wc="keydown",Xc="focus",Yc="blur",qc="k-chart-overlay-top",Zc=function(t){function e(e,o,i,r){var n=this;void 0===r&&(r={}),t.call(this),this.observers=[],this.addObserver(r.observer),this.chartService=new fi(this,r),this.chartService.theme=i,this._initElement(e);var s=at({},this.options,o);this._originalOptions=at({},s),this._theme=i,this._initTheme(s,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),Jt.preloadFonts(o,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents(),n._restoreOverlayElement())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;e>=0;e--){var o=t.childNodes[e];kt(o,"k-chart-overlay")?this.overlayElement=o:t.removeChild(o)}this.element=t},e.prototype._setElementClass=function(t){W(t,"k-chart")},e.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":(!this.options.title||this.options.title&&this.options.title.position!==d?W(this.overlayElement,qc):Y(this.overlayElement,qc),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element&&this.element.appendChild(this.overlayElement))},e.prototype._hasSeriesData=function(){var t=this.options.series||[];return t.length>0&&t.some((function(t){return t.data&&t.data.length>0}))},e.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=Fc,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,$(t.title)&&(t.title={text:t.title}),this.options=at({},e,t),this.applySeriesColors()},e.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},e.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=e.width>0||e.height>0;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&&le(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,o=e.findPane(t);e.redraw(o)}else this._redraw()},e.prototype.getAxis=function(t){return Hr(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Ur(e[o])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Ur(e[t])},e.prototype.plotArea=function(){return new Gr(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var o,i,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];it(e)?o=n.filterPoints(e):(pt(e)?(i=e.series,r=e.category):i=r=e,o=s.type===wn?Qc(n.pointsBySeriesName(i),r):Ct(s.type,[Mn,kn,An])?Qc((n.charts[0]||{}).points,r):n.pointsBySeriesName(i)),o&&this.togglePointsHighlight(t,o)},e.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},e.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(it(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&zt(t)&&(o=n.categoryAxis.categoryIndex(t)),i){if(o>=0){var s=this._plotArea.pointsByCategoryIndex(o);r.showAt(s)}}else e&&r.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Ht(e,{width:o.width}),o.height&&Ht(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=q.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,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 Pl,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),eu(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},e.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},e.prototype._redrawFocusHighlight=function(){if(!this._destroyed){var t=this._focusState,e=t.legendInFocus,o=t.preserveHighlight;e&&o&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)}},e.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,e=$(t)?t:t.description||t.text;e&&this.element.setAttribute("aria-roledescription",e)},e.prototype._kendoExportVisual=function(t){if(t&&t.width&&t.height){var e=this._originalOptions.chartArea||{},o={width:e.width||t.width,height:e.height||t.height};return this.exportVisual(o)}return this.exportVisual()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var o=this.options,i=at({},t.options,{chartArea:{width:t.width,height:t.height}});tu(this._originalOptions,i),this.options=at({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),eu(r._plotArea.panes),e=r.visual,this.options=o}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof Al&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ll(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Bl(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Rl(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==o||this.requiresHandlers([hs,ps,ls])),n=(!1===e||!1===i)&&!this.requiresHandlers([cs,us,ds]),s=this.element;this._dragZoomEnabled&&r&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||r&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!r,!n)},e.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new nh(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new ah(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var o,i,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||i.color,r=at({},n,n[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[o],r}for(var a=0;a<Fc.length;a++)o=Fc[a]+"Axis",i=t.axisDefaults||{},r=(r=[].concat(t[o])).map(s),t[o]=r.length>1?r:r[0]}(t,e),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=at({},t.seriesDefaults),s=e?at({},e.seriesDefaults):{},a=at({},s);Kc(n),Kc(a);for(var p=0;p<i;p++){var l=o[p].type||t.seriesDefaults.type,h=at({data:[]},a,s[l],{tooltip:t.tooltip},n,r[l]);o[p]._defaults=h,o[p]=at({},h,o[p]),o[p].data=o[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],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)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Fo(this._modelOptions());o.chart=this,o._plotArea=e;var i=$o.buildTitle(t.title),r=$o.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});if(o.append.apply(o,$o.orderTitles([i,r])),t.legend&&t.legend.visible){var n=new Kl(e.options.legend,this.chartService);o.append(n),o._legend=n}return o.append(e),o.reflow(),this._setTitleBox(i,r),o},e.prototype._setTitleBox=function(t,e){if(t||e){this._titleBox=(t||e).box.clone();var o=t?t.options.position:"",i=e?e.options.position:"",r=i!==d;o===i&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone())}},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return at({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return Jl.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i=t[o],r=i.options;if(i instanceof er&&r.select&&!r.vertical){var n=i.range(),s=new ih(this,i,at({min:n.min,max:n.max},r.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger(fs,t)},e.prototype._select=function(t){return this.trigger(gs,t)},e.prototype._selectEnd=function(t){return this.trigger(ys,t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.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._mousemoveThrottled=(0,q.throttle)(this._mousemove.bind(this),20)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),e.sender=this,t===vs?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===rs?this._updateDrilldownPoint(e.point):t===ns?this._resetDrilldownPoint():t===os?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===es&&this._focusLegendItem(e);for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},e.prototype._attachEvents=function(){var t,e,o=this.element;this._touchAction=o.style.touchAction,jt(o,((t={})[Uc]=this._clickHandler,t[Cs]=this._mousewheelHandler,t[Gc]=this._mouseleaveHandler,t[Wc]=this._keydownHandler,t[Hc]=this._mousedownHandler,t[Xc]=this._focusHandler,t[Yc]=this._blurHandler,t)),this._shouldAttachMouseMove()&&jt(o,((e={})[Nc]=this._mousemoveThrottled,e)),this.domEvents=vi.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(as)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(ds,{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var o=this._gestureDistance,i=-t.distance/o+1;if(Math.abs(i)>=.1){i=Math.round(10*i),this._gestureDistance=t.distance;var r={delta:i,axisRanges:$c(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger(cs,r)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(i,n))&&!this.trigger(us,r)&&e.zoom()}}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([hs,ps,ls])&&this._startNavigation(t,e,hs),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger(cs,{axisRanges:$c(this._plotArea.axes),originalEvent:t}))},e.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(ps,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,l=p.startLocation-p.location;0!==l&&(r[a.options.name]=a.translateRange(l))}}e.axisRanges=r,this.trigger(ps,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger(ls,{axisRanges:$c(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,ls),this._zoomSelection){var o=this._zoomSelection.end(t);o&&!this.trigger(us,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(ds,{axisRanges:o,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var o=this._eventCoordinates(t),i=this._plotArea.paneByPoint(o);if(i)for(var r=0;r<e.length;r++)if(e[r].onPane(i))return!0},e.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Kt(t.rate,.3)},e.prototype._mousewheel=function(t){var e=this,o=Et(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:$c(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(cs,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger(us,n)&&i.zoom(),this._mwTimeout=setTimeout((function(){e.trigger(ds,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(s||this._startNavigation(t,r,cs)||(s=this._navState),s){var a=s.totalDelta||o;s.totalDelta=a+o;for(var p=this._navState.axes,l={},h=0;h<p.length;h++){var c=p[h],u=c.options.name;u&&(l[u]=c.scaleRange(-a*this._mousewheelZoomRate(),r))}this.trigger(us,{delta:o,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,ds)}),150)}}},e.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),n=i.axes.slice(0);if(r){var s=$c(n);this.trigger(o,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:s,pane:r,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},e.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))),o&&(i=i.closest(o))&&i.aliasFor&&(i=i.aliasFor()),i},e.prototype._eventCoordinates=function(t){var e=Nt(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=ut(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,o=t.paddingTop;this._padding={top:o,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=Ft(this.element);return{left:Zt(t.x+e.left+o.left),top:Zt(t.y+e.top+o.top)}},e.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Ft(o),r=this._elementPadding(),n=de(o).invert(),s=new q.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(n);return new yo(s.x,s.y)},e.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)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},e.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===V||t===C)},e.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},e.prototype._keydown=function(t){var e=this._focusState,o=e.legendInFocus,i=e.focusedElement,r=this._legend;if("Tab"===t.key){this._clearFocusedElement();var n=this._isLegendBeforeChart();o&&n!==t.shiftKey?this._navigatePoints(t):!o&&n===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)}else"Escape"===t.key?(i&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?i&&(this._focusState.preserveHighlight=!0,this._propagateClick(i,t),this._focusElement(i)):o?this._navigateLegend(t):this._navigatePoints(t)},e.prototype._navigatePoints=function(t){var e=this,o=this._focusState,i=this._plotArea;if(o.legendInFocus=!1,!o.focusedElement)return this._focusFirstPoint(),void t.preventDefault();var r=function(i){o.focusedPoint=i,e._focusElement(o.focusedPoint),e._displayTooltip(i),t.preventDefault()};switch(t.key){case h:r(i.getPointToTheRight(o.focusedPoint));break;case l:r(i.getPointToTheLeft(o.focusedPoint));break;case p:r(i.getPointBelow(o.focusedPoint));break;case a:r(i.getPointAbove(o.focusedPoint))}},e.prototype._navigateLegend=function(t){var e=this,o=this,i=o._focusState,r=o._legend,n=o.chartService.rtl;if(i.legendInFocus=!0,!i.focusedElement)return this._focusFirstLegendItem(),void t.preventDefault();var s=r.getItems().length,c=function(o){i.focusedLegendItemIndex=o(i.focusedLegendItemIndex,s),e._focusElement(e._getFocusedLegendItem()),t.preventDefault()};switch(t.key){case a:case l:c(n?tt:et);break;case p:case h:c(n?et:tt)}},e.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},e.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},e.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},e.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},e.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},e.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},e.prototype._focusLegendItem=function(t){var e=this._focusState;e.focusedLegendItemIndex=this._legend.getItems().findIndex((function(e){return e.options.series.index===t.seriesIndex&&e.options.pointIndex===t.pointIndex})),e.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},e.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},e.prototype._focusElement=function(t,e){var o=this._focusState;if(this._clearFocusedElement(),t&&(o.focusedElement=t,this._setElementActiveDescendant(t),!e))if(t.focusVisual(),o.legendInFocus){var i=t.options;this._showSeriesInactiveOpacity(i.series.index,i.pointIndex)}else this._showInactiveOpacity(t)},e.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},e.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(c,t._id)},e.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(c)},e.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),o=t.options.accessibility;e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",o.role),e.setAttribute("aria-roledescription",o.ariaRoleDescription);var i=o.ariaChecked;return zt(i)&&e.setAttribute("aria-checked",i),e},e.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof Ip)})),i=this._activePoint;return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover&&(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),this._showInactiveOpacity(o))),o},e.prototype._displayTooltip=function(t){at({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},e.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},e.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);if(i)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t);else{var r;if(!i.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,i))&&r.length&&this._highlight.show(r,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var 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},e.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateDrilldownPoint=function(t){t&&t.series&&Qr.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},e.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},e.prototype._startDrilldown=function(t){if(t&&t.series){var e=t.series,o=Qr.current.bindPoint(e,null,t.dataItem).fields.drilldown;if(o){var i={series:e,point:t,value:o,sender:this};this.trigger("drilldown",i)}}},e.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))}},e.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||i;if(s&&(s.highlight||{}).visible&&n.visual){var a=i?i.opacity:n.series.opacity;(s!==e||o)&&n.visual.opacity(o?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,o,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.prototype._showInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},e.prototype._hideInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},e.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,o=this._startHover(t.element,t.originalEvent);o&&o.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),jt(document,((e={})[Nc]=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,o=this,i=o.options,r=o._tooltip,n=o._highlight,s=o._activePoint,a=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(a)){if(s&&s.tooltipTracking&&s.series&&s.parent.getNearestPoint){var p=s.parent.getNearestPoint(a.x,a.y,s.seriesIx);p&&p!==s&&(this._activePoint=p,p.hover(this,t)||(at({},i.tooltip,p.options.tooltip).visible&&r.show(p),n.show(p)))}}else Qt(document,((e={})[Nc]=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(s)},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;if(this._trackCrosshairs(e),o.hover){var i=o.backgroundContainsPoint(e);i?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger(as))}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.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()}},e.prototype._trackSharedTooltip=function(t,e,o){if(!this._suppressHover){var i=this,r=i.options.tooltip,n=i._plotArea,s=i._plotArea.categoryAxis,a=i._tooltip,p=i._highlight;if(n.backgroundContainsPoint(t)){var l=s.pointCategoryIndex(t);if(l!==this._tooltipCategoryIx||!this._sharedHighlight&&o){var h=n.pointsByCategoryIndex(l),c=h.map((function(t){return t.eventArgs(e)})),u=c[0]||{};u.categoryPoints=c,h.length>0&&!this.trigger(is,u)?(r.visible&&a.showAt(h,t),p.show(h),this._sharedHighlight=!0):a.hide(),this._tooltipCategoryIx=l}else o&&this._sharedHighlight&&(p.hide(),a.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(p.hide(),a.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemoveThrottled.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){var o=this,i=new Set,r=this.options.series.filter((function(o){return o.categoryAxis===t.name||!o.categoryAxis&&0===e})),n=r.some((function(t){return Boolean(t.categoryField)})),s=r.filter((function(t){return t.data&&t.data.length>0})),a=s.map((function(t){return Qr.current.bindPoint(t,0).fields.category})),p=a.reduce((function(e,o){return e||Ys(t,o)}),!1);if(s.filter((function(t,e){return t.categoryField||zt(a[e])})).forEach((function(t){return t.data.forEach((function(e,r){var n=Qr.current.bindPoint(t,r).fields.category;if(p){var s=Gs(n,e,o.chartService.intl);n=s?s.getTime():void 0}i.add(n)}))})),i.size>0){var l=Array.from(i.values());p&&(l=l.sort().map((function(t){return t&&new Date(t)}))),t.categories=l}else n&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=Qr.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===j?r="field":r+="Field",!zt(t[r])){o=!1;break}}return o},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},e.prototype._showSeriesInactiveOpacity=function(t,e){var o,i=this._plotArea,r=this._highlight,n=(i.srcSeries||i.series)[t];if(o=Ct(n.type,[Mn,wn,kn,An])?i.findPoint((function(o){return o.series.index===t&&o.index===e})):i.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&o){var s=i.series.length>1,a=o.length?o[0]:o;this._displayInactiveOpacity(a,s,o)}else r.show(o)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([ss,as])},e.prototype.updateMouseMoveHandler=function(){var t,e;Qt(this.element,((t={})[Nc]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&jt(this.element,((e={})[Nc]=this._mousemoveThrottled,e))},e.prototype.applyOptions=function(t,e){tu(this._originalOptions,t),this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Qt(this.element,((t={})[Uc]=this._clickHandler,t[Cs]=this._mousewheelHandler,t[Nc]=this._mousemoveThrottled,t[Gc]=this._mouseleaveHandler,t[Hc]=this._mousedownHandler,t[Wc]=this._keydownHandler,t[Xc]=this._focusHandler,t[Yc]=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Qt(document,((e={})[Nc]=this._mouseMoveTrackHandler,e)),this._focusState=null,this.element._kendoExportVisual=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),this._resetDrilldownPoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},e}(q.Class);function Qc(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function Kc(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 $c(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 Jc=["data","categories"];function tu(t,e){for(var o in e)if(!Ct(o,Jc)&&Ae(e,o)){var i=e[o],r=t[o];if(zt(r)){var n=null===i;n||!zt(i)?(delete t[o],n&&delete e[o]):r&&pt(i)&&pt(r)&&tu(r,i)}}}function eu(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}te(Zc,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:u,width:2}}},categoryAxis:{},seriesDefaults:{type:bn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{narrowRange:!1},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const ou=Zc;var iu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new yo(this.plotArea.box.x2,e.center().y):new yo(e.center().x,-2),align:i}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(ah);const ru=iu;var nu=[yn,xn];function su(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 au(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function pu(t){return K(t)?[t]:t}var lu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){W(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Ht(e).width)},e.prototype._resize=function(){var e=this.element,o=su(e.childNodes);this._initialWidth=Math.floor(Ht(e).width),au(e.childNodes,o),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=su(e.childNodes),i=document.createElement("span");i.innerHTML="&nbsp;",e.appendChild(i);var r=at({width:this._autoWidth,height:Ht(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Ht(e,{width:r.width,height:r.height}),e.removeChild(i),au(e.childNodes,o),this.surface&&this.surface.resize(),r},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var o=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(o),o},e.prototype._calculateWidth=function(t){for(var e=this.options,o=dt(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===yn)return 150;if(p.type===xn)return 150;if(p.type===Mn)return Ht(r).height;var l=a.categoryAxis;if(l){var h=l.categoriesCount()*(!a.options.isStacked&&Ct(p.type,[bn,Un])?a.seriesOptions.length:1);n=Math.max(n,h)}}}var c=n*e.pointWidth;return c>0&&(c+=o.left+o.right),c},e.prototype._createSharedTooltip=function(t){return new ru(this._plotArea,t)},e.normalizeOptions=function(t){var e=pu(t);return(e=G(e)?{seriesDefaults:{data:e}}:at({},e)).series||(e.series=[{data:pu(e.data)}]),at(e,{seriesDefaults:{type:e.type}}),(Ct(e.series[0].type,nu)||Ct(e.seriesDefaults.type,nu))&&(e=at({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(ou);te(lu,{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}]});const hu=lu,cu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(ut(this.element,"opacity").opacity)},e.prototype.step=function(t){ut(this.element,{opacity:String(Pt(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),ut(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),ut(this.element,{opacity:String(this._initialOpacity)})},e}(q.drawing.Animation);function uu(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var du=function(t){function e(e,o,i){t.call(this),this.options=at({},this.options,i),this.container=e,this.chartService=o;var r=ut(e,["paddingLeft","paddingTop"]);this.chartPadding={top:r.paddingTop,left:r.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=uu("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=uu("k-tooltip k-chart-tooltip"),o=this.scroll=uu("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(o)},e.prototype.show=function(t,e,o){var i=this,r=i.element,n=i.options,s=i.scroll,a=i.tooltip,p=Di(Xi(t)+Xi(e-t)/2),l=.4*o.width(),h=o.center().x-l,c=(o.center().x-h)/(n.max-n.min),u=p-n.min,d=this.chartService.intl.format(n.format,t,e),f=vt(n);this.clearHideTimeout(),this._visible||(ut(r,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(d=f({from:t,to:e})),a.innerHTML=d,ut(a,{left:o.center().x-a.offsetWidth/2,top:o.y1});var g=ut(a,["marginTop","borderTopWidth","height"]);ut(s,{width:l,left:h+u*c,top:o.y1+g.marginTop+g.borderTopWidth+g.height/2}),ut(r,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new cu(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},e}(q.Class);te(du,{format:"{0:d} - {1:d}",hideDelay:500});const fu=du;var gu="_navigator",yu=gu,vu="_default",mu=function(t){function e(e){var o;t.call(this),this.chart=e;var i=this.options=at({},this.options,e.options.navigator),r=i.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),zt(i.hint.visible)||(i.hint.visible=i.visible),this.chartObserver=new Ot(this,((o={})[ps]="_drag",o[ls]="_dragEnd",o[us]="_zoom",o[ds]="_zoomEnd",o)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ki(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,o=this.options,i=this.mainAxis(),r=i.roundedRange(),n=r.min,s=r.max,a=o.select,p=a.from,l=a.to,h=a.mousewheel,c=(t=i,xu.prototype=t,new xu);0!==i.categoriesCount()&&(this.clean(),c.box=i.box,this.selection=new ih(e,c,{min:n,max:s,from:p||n,to:l||s,mousewheel:Kt(h,{zoom:"left"}),visible:o.visible},new Ot(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new fu(e.element,e.chartService,{min:n,max:s,template:vt(o.hint),format:o.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[yu].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e;r<e&&(r=e);var n=i.to||o;n>o&&(n=o),this.options.select=at({},i,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Wt(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.filter((function(t){return t.options.name!==gu}));e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},e.prototype._drag=function(t){var e,o=this.chart,i=this.selection,r=o._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=o._plotArea.categoryAxis,l=t.axisRanges[p.options.name],h=this.options.select;if(l&&!a&&i){e=h.from&&h.to?Xi(h.to)-Xi(h.from):Xi(i.options.to)-Xi(i.options.from);var c=Di(Xt(Xi(l.min),s.min,Xi(s.max)-e)),u=Di(Xt(Xi(c)+e,Xi(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(c,u),this.showHint(c,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,i=this.options.select;i.from=e,i.to=o},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,o=t.from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==gu&&(n.min=o,n.max=i)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var o=this.mainAxis(),i={from:e.from,to:e.to};if("category"!==o.options.type){var r=new hr(at({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;i.from=Hi(r.min,-r.baseUnitStep,r.baseUnit),i.to=Hi(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",i)}},e.prototype._zoom=function(t){var e=this,o=e.chart._plotArea.categoryAxis,i=e.selection,r=e.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),p=t.delta;if(i){var l=a.categoryIndex(i.options.from),h=a.categoryIndex(i.options.to),c=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(p)>1&&(p*=3),h-l>1?(i.zoom(p,c),this.readSelection()):(o.options.min=n.from,n.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),c).min),s&&(this.filterAxes(),this.redrawSlaves()),i.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[yu]},e.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},e.setup=function(t,o){if(void 0===t&&(t={}),void 0===o&&(o={}),!t.__navi){t.__navi=!0;var i=at({},o.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=at({},i.pane,{name:gu});i.visible||(n.visible=!1,n.height=.1),"top"!==t.navigator.position?r.push(n):r.unshift(n),r.forEach((function(t){t.name=t.name||vu})),e.attachAxes(t,i),e.attachSeries(t,i,o)}},e.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis);i.concat(r).forEach((function(t){t.pane=t.pane||vu}));var n=0===Ns(o,Yn).length,s=at({type:"date",pane:gu,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;i.push(at({},s,{maxDateGroups:200},a,{name:yu,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),at({},s,a,{name:yu+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),at({},s,a,{name:yu+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(at({name:yu,pane:gu,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.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(at({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:yu,categoryAxis:yu,autoBind:e.autoBindElements}))},e}(q.Class);function xu(){}const _u=mu;var bu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,o){var i=Ht(this.element).width||600,r=o,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}};r&&(r=at({},r,n)),_u.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){W(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=wt([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,o=this._seriesCount!==e;return this._seriesCount=e,o},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new _u(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var o=this._plotArea.paneByPoint(e);o&&o.options.name===gu?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===yu?t=i.categories:t&&i.pane===gu&&(i.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var o=this._eventCoordinates(e),i=this._plotArea.paneByPoint(o);return t.prototype._stopChartHandlers.call(this,e)||i&&i.options.name===gu},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(ou);te(bu,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});const wu=bu;var ku=150,Au="arrowPointer",Su="barPointer",Cu=.5,Pu=Math.PI/180,Tu="inside",Mu="linear",Ou="outside",Lu="radialPointer",Iu="radialRangePointer";function Bu(t,e){var o=t.getOrigin(),i=t.getSize(),r=dt(e);return t.setOrigin([o.x-r.left,o.y-r.top]),t.setSize([i.width+(r.left+r.right),i.height+(r.top+r.bottom)]),t}var Eu=q.drawing.Group,Ru=q.drawing.Path,Vu=q.drawing.Text;function ju(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",s=Ru.fromRect(new q.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),a=new Vu(t.text,new q.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),p=Bu(a.bbox().clone(),e.padding),l=Ru.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),h=new Eu;return h.append(s),h.append(l),h.append(a),h}function zu(t,e,o){var i=zt(t.from)?t.from:T,r=zt(t.to)?t.to:P;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function Du(t,e){var o=dt(e);return o.left=-o.left,o.top=-o.top,o.right=-o.right,o.bottom=-o.bottom,Bu(t,o)}var Fu=q.drawing.Path,Hu=q.drawing.Surface,Nu=function(t){function e(e,o,i,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=i,this.contextService=new fi(this,r),this._originalOptions=at({},this.options,o),this.options=at({},this._originalOptions),this._initTheme(i),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(G(t))for(var r=0;r<t.length;r++)K(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},e.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]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new q.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var o=Du(e.bbox(),this._gaugeAreaMargin);this.reflow(o)},e.prototype.setOptions=function(t,e){this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options);var o=this.options,i=o.pointer;if(G(i)){for(var r=[],n=0;n<i.length;n++)r.push(at({},e.pointer,i[n]));o.pointer=r}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},i=new q.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,o.width>0&&(i=Du(i,o.width)),Fu.fromRect(i,{stroke:{color:o.width?o.color:"",width:o.width,opacity:o.opacity,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Ht(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Hu.create(o,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&at(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,i=t.offsetHeight;return o||(o=e.width),i||(i=e.height),{width:o,height:i}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(q.Class);te(Nu,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const Uu=Nu;var Gu=q.drawing.Path,Wu=q.drawing.Group,Xu=q.geometry.Point;function Yu(t,e){var o,i,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(o=new Xu(n,r),i=new Xu(n+e.size,r)):(o=new Xu(r,s),i=new Xu(r,s+e.size)),new Gu({stroke:{color:e.color,width:e.width}}).moveTo(o).lineTo(i)}function qu(t,e,o,i){var r=e.length;if(i.visible)for(var n=o.mirror,s=o.lineBox,a=i.skip;a<r;a+=i.step)a%i.skipUnit!=0&&(o.tickX=n?s.x2:s.x2-i.size,o.tickY=n?s.y1-i.size:s.y1,o.position=e[a],t.append(Yu(o,i)))}var Zu=function(t){function e(e,o){var i=e||{};!zt(i.reverse)&&!1===i.vertical&&(o||{}).rtl&&(i=Object.assign({},i,{reverse:!0})),t.call(this,0,1,i,o),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return(e=at({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||go(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Wu,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},e.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 Wu,a=n.length,p=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var h=zu(n[l],e,o),c=this.getSlot(h.from,h.to),u=i?this.lineBox():c,d=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):d.y2+=p*(r?-1:1),s.append(Gu.fromRect(new q.geometry.Rect([u.x1,d.y1],[u.x2-u.x1,d.y2-d.y1]),{fill:{color:h.color,opacity:h.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new Wu,i=0;i<t.length;i++)o.append(ju(t[i],e.labels));return o},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new Wu;if(t.width>0&&t.visible){var i=new Gu({stroke:{color:t.color,dashType:t.dashType,width:t.width}});i.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(i)}return o},e.prototype.renderTicks=function(){var t=new Wu,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return qu(t,this.getMajorTickPositions(),i,e.majorTicks),qu(t,this.getMinorTickPositions(),i,at({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e}(vr);te(Zu,{min:0,max:50,majorTicks:{size:15,align:Tu,color:u,width:Cu,visible:!0},minorTicks:{size:10,align:Tu,color:u,width:Cu,visible:!0},line:{width:Cu},labels:{position:Tu,padding:2},mirror:!1,_alignLines:!1});const Qu=Zu;var Ku=function(t){function e(e,o){t.call(this);var i=e.options,r=i.min,n=i.max,s=this.options=at({},this.options,o);s.fill=s.color,this.scale=e,zt(s.value)?s.value=Xt(s.value,r,n):s.value=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,r=i.min,n=i.max;e._oldValue=zt(e._oldValue)?e.value:r,e.value=Xt(t,r,n),this.elements&&this.repaint()},e}(q.Class);te(Ku,{color:u});const $u=Ku;var Ju=function(t){function e(e,o){t.call(this,e,o),this.options=at({track:{visible:zt(o.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),l=i.track.size||i.size,h=i.size/2,c=dt(i.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(o=new xo(p.x1+u,p.y1,p.x1+u,p.y2),s?o.x1-=l:o.x2+=l,i.shape!==Su&&(t=e=new xo(p.x2+u,p.y1-h,p.x2+u,p.y2+h))):(o=new xo(p.x1,p.y1-u,p.x2,p.y1-u),s?o.y2+=l:o.y1-=l,i.shape!==Su&&(t=e=new xo(p.x1-h,p.y1-u,p.x2+h,p.y1-u))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:zt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,o=t.options,i=o.mirror,r=o.vertical,n=dt(e.margin);return r?n[i?"left":"right"]:n[i?"bottom":"top"]},e}($u);te(Ju,{shape:Su,track:{border:{width:1}},color:u,border:{width:1},opacity:1,margin:dt(3),animation:{type:Su},visible:!0});const td=Ju;var ed=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,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);var s=this.fromScale=new q.geometry.Point(o.x1,o.y1),a=this.toScale=new q.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=Pt(this.fromScale.x,this.toScale.x,t),o=Pt(this.fromScale.y,this.toScale.y,t);this.element.transform(q.geometry.transform().translate(e,o))},e}(q.drawing.Animation);te(ed,{easing:Mu,duration:250}),q.drawing.AnimationFactory.current.register(Au,ed);const od=ed;var id=q.geometry.Point,rd=q.drawing.Path,nd=function(t){function e(e,o){t.call(this,e,o),zt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new id(0,0-o),new id(0-i*e,0),new id(0,0+o)]:[new id(0-o,0),new id(0,0+i*e),new id(0+o,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=new od(this.elements,at(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type=Au;var r=new rd({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),n=t.getSlot(e.value);return r.transform(q.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(td);const sd=nd;var ad=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?H:F,o=this.to=t.newPoints[0][e],i=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-i)/t.speed*1e3,1)),this._set(i)},e.prototype.step=function(t){var e=Pt(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},e}(q.drawing.Animation);te(ad,{easing:Mu,speed:250}),q.drawing.AnimationFactory.current.register(Su,ad);const pd=ad;var ld=q.drawing.Group,hd=q.drawing.Path,cd=function(t){function e(e,o){t.call(this,e,o),zt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,p=e.getSlot(e.options.min),l=e.getSlot(t),h=n?H:F,c=n?F:H,u=this._margin()*s,d=new q.geometry.Point;d[h]=p[h+"1"],d[c]=p[c+"1"];var f=new q.geometry.Point;f[h]=l[h+"1"],f[c]=l[c+"1"],n?(d.translate(u,0),f.translate(u,0)):(d.translate(0,u),f.translate(0,u));var g=f.clone(),y=d.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[d,f,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();var n=new pd(i,at(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new ld,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var o=this.pointerPath=new hd({stroke:e.stroke,fill:e.fill});return t.append(o),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new hd.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(td);const ud=cd;var dd=q.drawing.Group,fd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,r=new xo(o,i,o+t.width(),i+t.height());this.scale.reflow(r),this._shrinkScaleWidth(r);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new dd,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},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Qu(t.scale,this.contextService);this.pointers=[];var o=t.pointer;o=G(o)?o:[o];for(var i=0;i<o.length;i++){var r=at({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?sd:ud;this.pointers.push(new n(e,r))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,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 o.options.vertical?(e=n.width()/2,n=new xo(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new xo(t.x1,r.y-e,t.x2,r.y+e)),n},e.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 xo(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new xo(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var o=e.contentBox().width()-t.width();o>0&&(e.box.shrink(o,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),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)},e}(Uu);te(fd,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const gd=fd;var yd=180,vd=q.drawing.Arc,md=q.drawing.Path,xd=q.drawing.Group;function _d(t,e,o,i){var r=new xd,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),l=new q.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new md({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(l))}return r}function bd(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var wd=function(t){function e(e,o){t.call(this,0,1,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return e.majorUnit=e.majorUnit||go(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var o=this.renderArc(t,e);this.bbox=o.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),o=Math.min(t.height(),t.width())/2;if(!zt(this.bbox))return this.render(e,o);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-o)/(i-o)*a:(t-o)/(i-o)*a+n)+yd},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,i=0;return e.visible&&(i=e.size),o.visible&&(i=Math.max(o.size,i)),i},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),o=this.options;return o.endAngle-o.startAngle>=360&&o.max%o.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new xd,s=.05*o;zt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p=a.position===Tu,l=zt(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!l&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var h=this.labels,c=h.length,u=dt(a.padding),d=(u.left+u.right)/2,f=(u.top+u.bottom)/2,g=0;g<c;g++){var y=h[g],v=y.box.width()/2,m=y.box.height()/2,x=i[g],_=(x-yd)*Pu,b=e.pointAt(x),w=b.x+Math.cos(_)*(v+d)*(p?1:-1),k=b.y+Math.sin(_)*(m+f)*(p?1:-1);y.reflow(new xo(w-v,k-m,w+v,k+m));var A=new q.geometry.Point(y.box.x1,y.box.y1),S=void 0;if(l){var C=(S=this.labelElements.children[g]).bbox().origin,P=S.transform()||q.geometry.transform();P.translate(A.x-C.x,A.y-C.y),S.transform(P)}else S=ju(y,t.labels),n.append(S);this.bbox=q.geometry.Rect.union(this.bbox,S.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,o=e.rangeDistance,i=e.rangeSize,r=this.getRangeRadius();this.options.labels.position===Tu&&(r+=i+o);for(var n=r+i/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=q.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new xd;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,s=i.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var l=t[p],h=this.slotAngle(l[n?"to":"from"]),c=this.slotAngle(l[n?"from":"to"]);c-h!=0&&o.append(this.createRange(h,c,a,l))}}return o},e.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,n=new q.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new vd(n,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},e.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(bd(r,n,s));for(var a=0;a<o;a++)for(var p=zu(e[a],r,n),l=i.length,h=0;h<l;h++){var c=i[h];if(c.from<=p.from&&p.from<=c.to){i.push(bd(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(bd(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Ou?t.getRadiusX()-r-i-o:t.getRadiusX()-o},e.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new q.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+yd,endAngle:o.endAngle+yd})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=_d(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new xd;i.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,e.labels.position===Ou){var s=o.getRadiusX();o.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=_d(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;i>=0;i--)i%o==0&&t.splice(i,1);return t},e.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),n>=360&&o.max%e==0&&(s-=1);for(var l=[],h=0;h<s;h++)l.push(Zt(a,y)),a+=p;return Zt(a)<=t.endAngle&&l.push(a),l},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&this.options.labels.position===Ou&&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,l=a.x-p[0].anchor().x,h=a.y-p[0].anchor().y;t[s].transform((new q.geometry.transform).translate(l,h))}},e}(vr);te(wd,{min:0,max:100,majorTicks:{size:15,align:Tu,color:u,width:Cu,visible:!0},minorTicks:{size:10,align:Tu,color:u,width:Cu,visible:!0},startAngle:-30,endAngle:210,labels:{position:Tu,padding:2}});const kd=wd;var Ad=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.duration=Math.max(Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,o=Pt(e.oldAngle,e.newAngle,t);this.element.transform(q.geometry.transform().rotate(o,e.center))},e}(q.drawing.Animation);te(Ad,{easing:Mu,duration:ku}),q.drawing.AnimationFactory.current.register(Lu,Ad);const Sd=Ad;var Cd=q.drawing.Circle,Pd=q.drawing.Group,Td=q.drawing.Path,Md=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(q.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(i):new Sd(this.elements,at(e.animation,{oldAngle:o,newAngle:i})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=new Pd;return!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Pu),o},e.prototype.reflow=function(t){var e=this.center=t.center,o=Xt(this.options.length||1,.1,1.5),i=this.radius=t.getRadiusX()*o,r=this.capSize=Math.round(i*this.options.cap.size);this.bbox=q.geometry.Rect.fromPoints(new q.geometry.Point(e.x-r,e.y-r),new q.geometry.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,i=new Td({fill:{color:o},stroke:{color:o,width:Cu}});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},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,o=new q.geometry.Circle(this.center,this.capSize);return new Cd(o,{fill:{color:e},stroke:{color:e}})},e}($u);te(Md,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:Lu,duration:ku}});const Od=Md;var Ld=q.drawing.Group,Id=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=q.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,o){var i=this._visuals=new Ld;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},e.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),l=Zt(p,y),h=Zt(-p,y),c=0,u=0;!(!(u++<100)||(c=n===i?c+1:0)>5||l!==r&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=e>0&&i>0?2*l:e<0&&i<0?2*h:Zt((l+h)/2||1,y),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,o>0?(h=r,i=o):(l=r,e=o)},e.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=q.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,r=e.y-o.y,n=this.scale,s=this.pointers;n.arc.center.x-=i,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=q.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new kd(t.scale,this.contextService);this.pointers=[];for(var i=G(e)?e:[e],r=0;r<i.length;r++){var n=new Od(o,at({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Uu);te(Id,{transitions:!0,gaugeArea:{background:""}});const Bd=Id;var Ed=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),n=this.slotAngle(i?t:e),s=this.createRange(r,n,this.getRangeRadius(),o);return this.ranges.append(s),s},e}(kd);te(Ed,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const Rd=Ed;var Vd=function(t){function e(e,o){t.call(this,e,o);var i=this.options,r=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3;i.duration=Xt(r,ku,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new q.Color(n),this.color=new q.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this,o=e.options,i=e.startColor,r=e.color,n=Pt(o.oldAngle,o.newAngle,t);if(this.element.angle(n),r){var s=Zt(Pt(i.r,r.r,t)),a=Zt(Pt(i.g,r.g,t)),p=Zt(Pt(i.b,r.b,t));this.element.stroke(new q.Color(s,a,p).toHex())}},e}(q.drawing.Animation);te(Vd,{easing:Mu,duration:ku}),q.drawing.AnimationFactory.current.register(Iu,Vd);const jd=Vd;var zd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(i),this.stroke(this.currentColor())):(this.animation=new jd(this,at(e.animation,{oldAngle:o,newAngle:i})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,i=this.options,r=i.colors,n=i.color,s=i.value,a=K(s)?s:e;if(r)for(var p=0;p<r.length;p++){var l=r[p],h=l.color,c=l.from;void 0===c&&(c=e);var u=l.to;if(void 0===u&&(u=o),c<=a&&a<=u)return h}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}($u);te(zd,{animation:{type:Iu,duration:ku}});const Dd=zd;var Fd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Rd(t.scale,this.contextService),o=new Dd(e,at({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[o]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,n=i.y-e/2;if(t<o.width){var s=r+t;r=Math.max(r,0),s>o.width&&(r-=s-o.width)}if(e<o.height){var a=this.scale.bbox,p=a.bottomRight().y,l=n+e;n=Math.max(n,a.origin.y),l>p&&(n-=l-p)}return{left:r,top:n}},e}(Bd);const Hd=Fd;var Nd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._createModel=function(){var e=this.options.scale;"number"!=typeof e.startAngle&&(e.startAngle=90),e.endAngle=e.startAngle+360,t.prototype._createModel.call(this)},e}(Hd);const Ud=Nd;var Gd=function(t){function e(e){t.call(this),this.setOptions(e),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},e.prototype.encode=function(t,e,o){var i=zt(t)?String(t):t;return this.initValue(i,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},e.prototype.initValue=function(){},e.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},e.prototype.addData=function(){},e.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e}(q.Class);te(Gd,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Wd=Object.assign,Xd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Wd(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength){var i=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=i,this.addPattern(this.characterMap[i])}},e.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},e.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},e.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},e.prototype.addCharacter=function(t){var e=this.getValue(t),o=this.characterMap[e];this.addPattern(o)},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},e}(Gd);te(Xd,{addCheckSum:!0});var Yd=Object.assign,qd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Yd(this,{minBaseUnitLength:.7})},e.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},e.prototype.addBase=function(){},e}(Gd),Zd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Yd(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},e.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&r>o;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){var n=Math.ceil(this.getBaseWidth(o)*e);throw new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+n+"px.")}this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},e.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},e.prototype.getBaseWidth=function(t){var e=3*(t+2);return this.quietZoneLength+e*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},e.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},e.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},e.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e}(qd);te(Zd,{addCheckSum:!1});var Qd={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):t.charCodeAt(0)>127?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var 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,o;if(this.specialAsciiCodes[t]){e=[];for(var i=0;i<this.specialAsciiCodes[t].length;i++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][i]])}else o=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(o)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},Kd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Qd,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},e}(Zd),$d=Object.assign,Jd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),$d(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},e.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},e.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength){var e=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit));throw new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+e+"px.")}},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},e.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},e.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},e.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,o=this.values,i=o.length,r=0;for(e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-e,this.cCheckSumTotal);for(t=r%this.checkSumMod,r=this.weightedValue(t,1,this.kCheckSumTotal),e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-e+1,this.kCheckSumTotal);return[t,r%this.checkSumMod]},e.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},e.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},e}(qd),tf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Qd,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)if(t=e[o],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var i=this._findCharacterByValue(t);this.addPattern(this.characterMap[i].pattern)}}})},e}(Jd),ef=/^\d+$/,of=Object.assign,rf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),of(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},e.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},e.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},e.prototype.validate=function(t){if(ef.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!Ct(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(Gd),nf=/^\d+$/,sf=/^[a-z0-9]+$/i,af=Object.assign,pf=function(t){function e(e){t.call(this),this.encoding=e,this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.addStart=function(){},e.prototype.is=function(){},e.prototype.isCode=function(){return!1},e.prototype.move=function(){},e.prototype.pushState=function(){},e}(q.Class),lf=function(t){function e(e,o){t.call(this,e),this.states=o,this._initMoves(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},e.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;if(Ct("C",o)){var n=i.substr(t.index).match(/\d{4,}/g);n&&(r=i.indexOf(n[0],t.index))}for(;(e=t.value.charCodeAt(t.index))>=0&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},e.prototype._initMoves=function(t){this._moves=[],Ct(this.FNC4,t)&&this._moves.push(this._moveFNC),Ct(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},e.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},e.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0,!0},e.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},e}(pf),hf={};hf.A=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},e.prototype.isCode=function(t){return 0<=t&&t<96},e.prototype.getValue=function(t){return t<32?t+64:t-32},e}(lf),hf.B=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},e.prototype.isCode=function(t){return 32<=t&&t<128},e.prototype.getValue=function(t){return t-32},e}(lf),hf.C=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=vf(t,e,4);return(e+4<=t.length||2===t.length)&&nf.test(o)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=vf(t.value,t.index,2))&&nf.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(pf),hf.FNC4=function(t){function e(e,o){t.call(this,e),this._initSubStates(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,o=this._getSubState(e);this.encoding[o].addStart()},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,o=this._initSubState(t),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},e.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},e.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},e.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)Ct(t[e],this.dependentStates)&&this.subStates.push(t[e])},e.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},e.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},e}(pf),hf.FNC1=function(t){function e(e,o){t.call(this,e),this.states=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},e.prototype.addStart=function(){this.encoding[this.startState].addStart()},e.prototype.is=function(){return Ct(this.key,this.states)},e.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(p.index=0,(e=(i=n.charAt(a)===this.startAI?2:0)>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},e.prototype.validate=function(t,e){var o=e.substr(t.id.length),i=t.ai;if(!i.type&&!nf.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!sf.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=vf(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,o),r=t.substring(o+1,i),n=this.getApplicationIdentifier(r)||this.getApplicationIdentifier(r.substr(r.length-1));return n||this.unsupportedAIError(r),{ai:n,id:r}},e.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&Ct(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}},e}(pf);var cf=function(t){function e(e){t.call(this,e),this._initStates()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},e.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new hf[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},e.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},e.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);)if(t.shifted){var o=t.state;t.state=t.previousState,t.previousState=o,t.shifted=!1}else t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t)},e.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},e.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},e.prototype.addStop=function(){this.addPattern(this.STOP)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))},e}(Gd),uf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{name:"Code 128 A",states:["A"]})},e}(cf),df=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{name:"Code 128 B",states:["B"]})},e}(cf),ff=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{name:"Code 128 C",states:["C"]})},e}(cf),gf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(cf),yf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),af(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(cf);function vf(t,e,o){return t.substring(e,e+o)}var mf=Object.assign,xf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),mf(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Af})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},e.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},e}(Gd),_f=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),mf(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(xf),bf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),mf(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(xf),wf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),mf(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(xf),kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),mf(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(xf),Af={Modulo10:function(t){var e,o,i,r=[0,""],n=t.length%2;for(e=0;e<t.length;e++)r[(e+n)%2]+=parseInt(t.charAt(e),10);for(i=r[0],o=(2*r[1]).toString(),e=0;e<o.length;e++)i+=parseInt(o.charAt(e),10);return[(10-i%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,o=this.Modulo11(t);return e=t+o[0],o.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,o=this.Modulo10(t);return e=t+o[0],o.concat(this.Modulo10(e))}},Sf=Object.assign,Cf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Sf(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},e.prototype.initValue=function(t,e,o){var i=String(t);if(12!==i.length||/\D/.test(i))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=i,this.checksum=this.calculateChecksum(),this.leftKey=i[0],this.leftPart=i.substr(1,6),this.rightPart=i.substr(7)+this.checksum},e.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},e.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},e.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),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},e}(Gd),Pf=Object.assign,Tf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Pf(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},e}(Cf),Mf={code11:Xd,code39:Zd,code39extended:Kd,code93:Jd,code93extended:tf,code128:gf,code128a:uf,code128b:df,code128c:ff};function Of(t,e){var o=t.style.display;"canvas"===e&&(t.style.display="block");var i={width:t.clientWidth,height:t.clientHeight};return t.style.display=o,i}Mf["gs1-128"]=yf,Mf.msimod10=_f,Mf.msimod11=bf,Mf.msimod1010=wf,Mf.msimod1110=kf,Mf.postnet=rf,Mf.ean8=Tf,Mf.ean13=Cf;var Lf=function(t){function e(e,o,i){void 0===i&&(i=we),t.call(this),this.options=at({},this.options,o),this.element=e,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(o),o&&zt(o.value)&&this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){W(this.element,"k-barcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},e.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype._render=function(){var t,e,o=this.options,i=o.value,r=o.text,n=dt(r.margin),s=this._getSize(),a=o.border||{},p=this.encoding,l=new xo(0,0,s.width,s.height).unpad(a.width).unpad(o.padding),h=l.height(),c=new q.drawing.Group;this.contentBox=l,c.append(this._getBackground(s)),r.visible&&(h-=q.drawing.util.measureText(i,{font:r.font}).height+n.top+n.bottom);try{t=p.encode(i,l.width(),h)}catch(t){return this.onError(t),c}return r.visible&&(e=i,o.checksum&&zt(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=Of(this.element,this.options.renderAs),e=new q.geometry.Size(300,100);return t.width>0&&(e.width=t.width),t.height>0&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},e.prototype.value=function(t){if(!zt(t))return this.options.value;this.options.value=String(t),this.redraw()},e.prototype._getBands=function(t,e){for(var o,i,r=this.contentBox,n=r.x1,s=new q.drawing.Group,a=0;a<t.length;a++){if(o=(i=pt(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=q.geometry.Rect.fromPoints(new q.geometry.Point(n,i.y1+r.y1),new q.geometry.Point(n+o,i.y2+r.y1)),l=q.drawing.Path.fromRect(p,{fill:{color:this.options.color},stroke:null});s.append(l)}n+=o}return s},e.prototype._getBackground=function(t){var e=this.options,o=e.border||{},i=new xo(0,0,t.width,t.height).unpad(o.width/2);return q.drawing.Path.fromRect(i.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},e.prototype._getText=function(t){var e=this.options.text,o=this._textbox=new Zo(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return o.reflow(this.contentBox),o.renderVisual(),o.visual},e.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Mf[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Mf[this.type],this.options=at({},this.options,t)},e}(q.Class);te(Lf,{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}});const If=Lf;var Bf={width:500,height:100};const Ef=function(t,e){if(void 0===e&&(e=Bf),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),i="";if("upca"===o?(o="ean13",i="0"):"upce"===o&&(o="ean8",i="0"),!Mf[o])throw new Error("Encoding '"+t+"' is not supported.");return function(t,e,o){return function(i){try{t.encode(o+i,e.width,e.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}(new Mf[o],e,i)};var Rf=Object.assign;function Vf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function jf(t,e){var o=Number(t).toString(2);return o.length<e&&(o=new Array(e-o.length+1).join(0)+o),o}function zf(t){return parseInt(t,2)}var Df=function(t){function e(e){t.call(this),this.matrix=e,this.row=e.length-1,this.column=e.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},e.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},e.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},e}(q.Class),Ff=function(t){function e(e,o){t.call(this),this.dataString=e,this.version=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(q.Class),Hf="alphanumeric",Nf=/^\d+/,Uf="A-Z0-9 $%*+./:-",Gf=new RegExp("^[A-Z $%*+./:-]+"),Wf=new RegExp("^["+Uf+"]+"),Xf=new RegExp("^[^"+Uf+"]+");function Yf(t,e,o,i,r){var n,s,a=Nf.exec(t),p=a?a[0]:"",l=Gf.exec(t),h=l?l[0]:"",c=Wf.exec(t),u=c?c[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=o&&!Wf.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=i||r===Hf)?(n=Hf,s=p||h):(n="byte",s=u?u+Xf.exec(t.substring(u.length))[0]:Xf.exec(t)[0]),{mode:n,modeString:s}}var qf=function(t){function e(){t.call(this),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){Rf(this,{modeIndicator:"",bitsInCharacterCount:[]})},e.prototype.getVersionIndex=function(t){return t<10?0:t>26?2:1},e.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},e.prototype.getModeCountString=function(t,e){return this.modeIndicator+jf(t,this.getBitsCharacterCount(e))},e.prototype.encode=function(){},e.prototype.getStringBitsLength=function(){},e.prototype.getValue=function(){},e}(q.Class),Zf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Rf(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var o,i=Vf(t,3),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=jf(i[o],10);return r+jf(i[o],1+3*i[o].length)},e.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0===o?0:1)},e}(qf),Qf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Rf(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},e.prototype.getValue=function(t){return this.characters[t]},e.prototype.encode=function(t,e){var o,i=Vf(t,2),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=jf(45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)),11);return r+jf(2===i[o].length?45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)):this.getValue(i[o].charAt(0)),1+5*i[o].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(qf),Kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Rf(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},e.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},e.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=jf(this.getValue(t.charAt(i)),8);return o},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(qf),$f={};$f.numeric=new Zf,$f.alphanumeric=new Qf,$f.byte=new Kf;var Jf=[{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}}];function tg(t,e){var o=0,i=Jf.length-1,r=Math.floor(Jf.length/2);do{t<Jf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2)}while(i-o>1);return t<=Jf[o][e].totalDataCodewords?r+1:i+1}var eg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getEncodingResult=function(t,e){var o=function(t){var e,o=[],i=0,r=t;for(o.push(Yf(r,8,5,8,e)),e=o[0].mode,r=r.substr(o[0].modeString.length);r.length>0;){var n=Yf(r,17,9,16,e);n.mode!==e?(e=n.mode,o.push(n),i++):o[i].modeString+=n.modeString,r=r.substr(n.modeString.length)}return o}(t),i=function(t){for(var e=0,o=0;o<t.length;o++)e+=$f[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(o),r=tg(i,e),n=function(t,e){for(var o="",i=0;i<t.length;i++)o+=$f[t[i].mode].encode(t[i].modeString,e);return o}(o,r);return new Ff(n,r)},e}(q.Class),og=function(t){function e(){t.call(this),this.initProperties(),this.mode=$f[this.encodingMode]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){Rf(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},e.prototype.getEncodingResult=function(t,e){var o=this.encode(t),i=tg(this.getDataCodewordsCount(o),e),r=this.mode.getModeCountString(o.length/8,i)+o;return new Ff(r,i)},e.prototype.getDataCodewordsCount=function(t){var e=t.length;return Math.ceil((this.initialModeCountStringLength+e)/8)},e.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},e.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=jf(t,8);else{for(var r=8-e,n=0;n<o;n++)i=jf(t>>6*n&63|128,8)+i;i=(t>>6*o|255>>r<<r).toString(2)+i}return i},e.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},e}(q.Class),ig={1:0},rg={0:1},ng={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},sg=[1,0,1,1,1],ag=[1,0,1],pg={L:"01",M:"00",Q:"11",H:"10"},lg=["11101100","00010001"],hg=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%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}],cg=[[1,0],[1,25,0]];function ug(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function dg(t,e,o,i){for(var r=0;r<hg.length;r++)t[r][o][i]=hg[r](o,i)?1^e:parseInt(e,10)}function fg(t,e){for(var o=[],i=t.length-2;i>=0;i--)o[i]=t[i]^e[i];return o}function gg(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]+(e[r]>=0?e[r]:0))%255:o[i+r]=ig[rg[o[i+r]]^rg[(t[i]+e[r])%255]];return o}function yg(t,e){var o=[],i=t.length-1;do{o[i]=rg[(t[i]+e)%255],i--}while(void 0!==t[i]);return o}function vg(t,e){var o,i,r=cg[e-1],n=new Array(e).concat(t),s=new Array(n.length-r.length).concat(r),a=t.length,p=[];for(i=0;i<a;i++)o=yg(s,ig[n[n.length-1]]),s.splice(0,1),n=fg(o,n);for(i=n.length-1;i>=0;i--)p[e-1-i]=jf(n[i],8);return p}function mg(t,e,o){var i=zf(e),r=e.length-1,n=t<<r,s=jf(t,o-r),a=function(t,e){var o=e.toString(2).length,i=t.toString(2).length,r=t;do{i=(r^=e<<i-o).toString(2).length}while(i>=o);return r}(n,i);return s+jf(a,r)}function xg(t,e){return parseInt(t.charAt(e),10)}function _g(t,e){var o,i,r=t[0],n=0,s=e.length;for(o=0,i=8;o<=8;o++)6!==o&&ug(t,xg(e,s-1-n++),o,i);for(o=8,i=7;i>=0;i--)6!==i&&ug(t,xg(e,s-1-n++),o,i);for(n=0,i=r.length-1,o=8;i>=r.length-8;i--)ug(t,xg(e,s-1-n++),o,i);for(ug(t,1,r.length-8,8),o=r.length-7,i=8;o<r.length;o++)ug(t,xg(e,s-1-n++),o,i)}function bg(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,ug(t,r=xg(e,e.length-p-1),0+o,s+i),ug(t,r,a+i,0+o)}function wg(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++)ug(t,r=e[a],o+p,i+a),ug(t,r,o+a,i+p),ug(t,r,o+s-p,i+s-a),ug(t,r,o+s-a,i+s-p)}function kg(t,e,o,i){var r=o,n=i,s=t[0];do{ug(t,0,r,i),ug(t,0,o,n),r+=e[0],n+=e[1]}while(r>=0&&r<s.length)}function Ag(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,93===e[t][i]&&(o[t]+=40)}function Sg(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,r[t][n]>=5&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function Cg(t,e){var o=Math.floor(t/e*100),i=o%5,r=Math.abs(o-i-50),n=Math.abs(o+5-i-50);return 10*Math.min(r/5,n/5)}function Pg(t,e,o){var i=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new og:new eg}(o),r=i.getEncodingResult(t,e),n=r.version,s=Jf[n-1][e],a=function(t,e){for(var o,i,r,n,s,a=0,p=[],l=[],h=e.groups,c=0;c<h.length;c++){r=h[c][0];for(var u=0;u<r;u++){i=h[c][1],o=[],n=[];for(var d=1;d<=i;d++)s=t.substring(a,a+8),o.push(s),n[i-d]=zf(s),a+=8;p.push(o),l.push(vg(n,e.errorCodewordsPerBlock))}}return[p,l]}(function(t,e){for(var o=8*e,i=0,r=0,n=t;n.length<o&&i<4;)n+="0000".charAt(i++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<o;)n+=lg[r],r^=1;return n}(r.dataString,s.totalDataCodewords),s),p=function(t){for(var e=[],o=17+4*t,i=0;i<hg.length;i++){e[i]=new Array(o);for(var r=0;r<o;r++)e[i][r]=new Array(o)}return e}(n);!function(t){var e=t[0].length;wg(t,sg,0,0),kg(t,[-1,-1],7,7),wg(t,sg,e-7,0),kg(t,[1,-1],e-8,7),wg(t,sg,0,e-7),kg(t,[-1,1],7,e-8)}(p),function(t,e){if(!(e<2)){var o,i,r=t[0],n=r.length,s=Math.floor(e/7),a=[6],p=0;for((o=ng[e])?i=(n-13-o)/s:o=i=(n-13)/(s+1),a.push(a[p++]+o);a[p]+i<n;)a.push(a[p++]+i);for(var l=0;l<a.length;l++)for(var h=0;h<a.length;h++)void 0===r[a[l]][a[h]]&&wg(t,ag,a[l]-2,a[h]-2)}}(p,n),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)ug(t,e,6,i),ug(t,e,i,6),e^=1}(p),n>=7&&bg(p,jf(0,18)),_g(p,jf(0,15)),function(t,e){for(var o,i,r,n=new Df(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;o.length>0;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),dg(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();)dg(t,0,r.row,r.column)}(p,a);var l=function(t){var e,o,i=[],r=[],n=[],s=[],a=[],p=t[0].length;for(o=0;o<t.length;o++)i[o]=0,n[o]=0,a[o]=[0,0],s[o]=[0,0],r[o]=[];for(var l=0;l<p;l++)for(var h=0;h<p;h++)for(var c=0;c<t.length;c++)e=t[c],n[c]+=parseInt(e[l][h],10),r[c][0]===e[l][h]&&l+1<p&&h-1>=0&&e[l+1][h]===r[c][0]&&e[l+1][h-1]===r[c][0]&&(i[c]+=3),Ag(c,s,i,0,e[l][h]),Ag(c,s,i,1,e[h][l]),Sg(c,i,r,e[l][h],a,0),Sg(c,i,r,e[h][l],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(o=0;o<i.length;o++)i[o]+=Cg(n[o],d),i[o]<f&&(f=i[o],u=o);return u}(p),h=p[l];return n>=7&&bg([h],function(t){return mg(t,"1111100100101",18)}(n)),_g([h],function(t){var e,o="";if(0===zf(t))return"101010000010010";e=mg(zf(t),"10100110111",15);for(var i=0;i<e.length;i++)o+=e.charAt(i)^"101010000010010".charAt(i);return o}(pg[e]+jf(l,3))),h}!function(){var t,e;for(e=1;e<255;e++)(t=2*rg[e-1])>255&&(t^=285),rg[e]=t,ig[t]=e;t=2*rg[e-1]^285,rg[e]=t,rg[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=cg[t-1],o=[t,0];cg[t]=gg(e,o)}}();var Tg=Math.round,Mg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Og=[[0,1],[1,1],[1,0]],Lg=function(t){function e(e,o,i){void 0===i&&(i=we),t.call(this),this.options=at({},this.options,o),this.element=e,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){W(this.element,"k-qrcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,i={width:0,height:0};return e>0&&(i.width=e),o&&(i.height=o),i},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.exportVisual=function(){return this._render()},e.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0;s.width=p;var l=new q.drawing.Group;try{n&&(o=Pg(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,l.append(this._renderBackground(i,s)),l.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(i,t)):this._isSwiss()&&l.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return l},e.prototype._renderLogo=function(t,e){var o,i=Tg(t/2),r=this._getLogoSize(7*e),n=this.options.overlay.imageUrl,s={x:i-r.width/2,y:i-r.height/2};return o=new q.geometry.Rect(new q.geometry.Point(s.x,s.y),new q.geometry.Size(r.width,r.height)),new q.drawing.Image(n,o)},e.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={},a=new q.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),a.append(this._renderShape(s,Math.ceil(o+2*e),Og,"#fff")),s.x=s.y=n-o/2,a.append(this._renderShape(s,o,Og,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,a.append(this._renderShape(s,i,Mg,"#fff")),a},e.prototype._renderShape=function(t,e,o,i){var r=new q.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},e.prototype._getSize=function(){var t;if(this.options.size)t=parseInt(this.options.size,10);else{var e=Of(this.element,this.options.renderAs),o=Math.min(e.width,e.height);t=o>0?o:200}return t},e.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<1){var i=Math.ceil(1*e);this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))}else o*e>=t&&o-1>=1&&o--;return o},e.prototype._renderMatrix=function(t,e,o){for(var i=new q.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=Tg(o+a*e),l=Tg(n),h=Tg(o+s*e),c=Tg(n+e);i.moveTo(p,l).lineTo(p,c).lineTo(h,c).lineTo(h,l).close()}}return i},e.prototype._renderBackground=function(t,e){var o=new xo(0,0,t,t).unpad(e.width/2);return q.drawing.Path.fromRect(o.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},e.prototype.setOptions=function(t){var e=t||{};this.options=Rf(this.options,e),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},e.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},e.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},e.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},e.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},e}(q.Class);te(Lg,{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}});const Ig=Lg,Bg=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{Pg(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var Eg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Rg(t){return t*t}var Vg=Math,jg=Vg.abs,zg=Vg.atan,Dg=Vg.atan2,Fg=Vg.cos,Hg=Vg.sin,Ng=Vg.tan,Ug=function(t){function e(e,o){t.call(this),this.initProperties(),1===arguments.length?(this.lat=e[0],this.lng=e[1]):(this.lat=e,this.lng=o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){at(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},e.prototype.toArray=function(){return[this.lat,this.lng]},e.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},e.prototype.clone=function(){return new e(this.lat,this.lng)},e.prototype.round=function(t){return this.lng=Zt(this.lng,t),this.lat=Zt(this.lat,t),this},e.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},e.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},e.prototype.destination=function(t,o,i){var r=qt(o),n=i||Eg.WGS84,s=qt(this.lat),a=qt(this.lng),p=t/n.a,l=Vg.asin(Hg(s)*Fg(p)+Fg(s)*Hg(p)*Fg(r)),h=a+Dg(Hg(r)*Hg(p)*Fg(s),Fg(p)-Hg(s)*Hg(l));return new e(Dt(l),Dt(h))},e.prototype.greatCircleTo=function(t,o){var i=e.create(i),r=o||Eg.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var n,s,a,p,l,h,c,u,d=r.a,f=r.b,g=r.f,y=qt(i.lng-this.lng),v=zg((1-g)*Ng(qt(this.lat))),m=Hg(v),x=Fg(v),_=zg((1-g)*Ng(qt(i.lat))),b=Hg(_),w=Fg(_),k=y,A=this.DISTANCE_ITERATIONS,S=!1;!S&&A-- >0;){s=Hg(k),a=Fg(k),p=Vg.sqrt(Rg(w*s)+Rg(x*b-m*w*a)),u=Dg(p,h=m*b+x*w*a);var C=x*w*s/p;c=0,0!=(l=1-Rg(C))&&(c=h-2*m*b/l),n=k;var P=g/16*l*(4+g*(4-3*l));k=y+(1-P)*g*C*(u+P*p*(c+P*h*(2*Rg(c)-1))),S=jg(k-n)<=this.DISTANCE_CONVERGENCE}var T=l*(Rg(d)-Rg(f))/Rg(f),M=1+T/16384*(4096+T*(T*(320-175*T)-768)),O=T/1024*(256+T*(T*(74-47*T)-128)),L=O*p*(c+O/4*(h*(2*Rg(c)-1)-O/6*c*(4*Rg(p)-3)*(4*Rg(c)-3))),I=Dg(w*s,x*b-m*w*a),B=Dg(x*s,-m*w+x*b*a);return{distance:Zt(f*M*(u-L),this.DISTANCE_PRECISION),azimuthFrom:Dt(I),azimuthTo:Dt(B)}},e.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},e.fromLngLat=function(t){return new e(t[1],t[0])},e.fromLatLng=function(t){return new e(t[0],t[1])},e.create=function(t,o){if(zt(t))return t instanceof e?t.clone():1===arguments.length&&2===t.length?e.fromLatLng(t):new e(t,o)},e}(q.Class),Gg=Math,Wg=Gg.atan,Xg=Gg.exp,Yg=Gg.pow,qg=Gg.sin,Zg=Gg.log,Qg=Gg.tan,Kg=q.geometry.Point,$g=Gg.PI,Jg=$g/2,ty=$g/4,ey=$g/180,oy=Eg.WGS84,iy=function(t){function e(e){t.call(this),this.initProperties(),this._initOptions(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.initProperties=function(){at(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},e.prototype.forward=function(t,e){var o=this,i=o.options,r=i.datum.a,n=i.centralMeridian,s=Xt(t.lat,-o.MAX_LAT,o.MAX_LAT),a=e?Xt(t.lng,-o.MAX_LNG,o.MAX_LNG):t.lng,p=qt(a-n)*r,l=o._projectLat(s);return new Kg(p,l)},e.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,i=e.a,r=qt(t),n=Qg(ty+r/2),s=o*qg(r),a=Yg((1-s)/(1+s),o/2);return i*Zg(n*a)},e.prototype.inverse=function(t,e){var o=this,i=o.options,r=i.datum.a,n=i.centralMeridian,s=t.x/(ey*r)+n,a=Xt(o._inverseY(t.y),-o.MAX_LAT,o.MAX_LAT);return e&&(s=Xt(s,-o.MAX_LNG,o.MAX_LNG)),new Ug(a,s)},e.prototype._inverseY=function(t){var e,o=this,i=o.options.datum,r=i.a,n=i.e,s=n/2,a=Xg(-t/r),p=Jg-2*Wg(a);for(e=0;e<=o.INVERSE_ITERATIONS;e++){var l=n*qg(p),h=Yg((1-l)/(1+l),s),c=Jg-2*Wg(a*h)-p;if(p+=c,Gg.abs(c)<=o.INVERSE_CONVERGENCE)break}return Dt(p)},e}(q.Class);te(iy,{centralMeridian:0,datum:oy});var ry=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{MAX_LAT:85.0511287798})},e.prototype._projectLat=function(t){var e=this.options.datum.a,o=qt(t),i=Qg(ty+o/2);return e*Zg(i)},e.prototype._inverseY=function(t){var e=this.options.datum.a,o=Xg(-t/e);return Dt(Jg-2*Wg(o))},e}(iy),ny=function(t){function e(){t.call(this);var e=this._proj=new ry,o=this.c=2*$g*e.options.datum.a;this._tm=q.geometry.transform().translate(.5,.5).scale(1/o,-1/o),this._itm=q.geometry.transform().scale(o,-o).translate(-.5,-.5)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},e.prototype.toLocation=function(t,e,o){var i=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(i,o)},e}(q.Class),sy=(Object.assign,function(t,e){return t.bind(e)}),ay=function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild},py=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},ly=function(t,e){e.insertBefore(t,e.firstChild)},hy=function(t){return t.replace(/([a-z][A-Z])/g,(function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()}))},cy=function(t){return t&&String(t).endsWith("px")?t:String(t)+"px"},uy=function(t,e){var o=t.prototype;o.events?e.forEach((function(t){o.events.indexOf(t)<0&&o.events.push(t)})):o.events=e},dy=function(t){var e=[];if(t)for(var o=hy(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")},fy=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.items=[],W(this.element,"k-widget k-attribution")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},e.prototype.add=function(t){var e=t;zt(t)&&("string"==typeof t&&(e={text:t}),this.items.push(e),this._render())},e.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},e.prototype.clear=function(){this.items=[],py(this.element)},e.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var o=this.items[e],i=this._itemText(o);""!==i&&t.push(i)}t.length>0?(py(this.element),function(t,e){var o=document.createElement("div");for(o.innerHTML=t;o.childNodes.length>0;)e.appendChild(o.childNodes[0])}(t.join(this.options.separator),this.element),this.showElement()):this.hideElement()},e.prototype.hideElement=function(){this.element.style.display="none"},e.prototype.showElement=function(){this.element.style.display=""},e.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},e.prototype._inZoomLevel=function(t,e){var o=Kt(t,-Number.MAX_VALUE),i=Kt(e,Number.MAX_VALUE);return this._zoom>o&&this._zoom<i},e.prototype._inArea=function(t){var e=!0;return t&&(e=t.contains(this._extent)),e},e}(Ue);te(fy,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var gy={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function yy(t,e){var o='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+gy[t].className+'" aria-label="move '+t+'">'+ae({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return ay(o)}var vy=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=yy("up",o.icons),r=yy("right",o.icons),n=yy("down",o.icons),s=yy("left",o.icons);this.element.appendChild(i),this.element.appendChild(r),this.element.appendChild(n),this.element.appendChild(s),W(this.element,"k-widget k-navigator"),Be(this.element,"click",".k-button",sy(this._click,this));var a=this.element.parentNode.closest("[data-role]");this._keyroot=a||this.element,this._tabindex(this._keyroot),this._keydownHandler=sy(this._keydown,this),Be(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.dispose()},e.prototype.dispose=function(){Ee(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i="tabindex",r=e.getAttribute(i)||o.getAttribute(i);o.removeAttribute(i),e.setAttribute(i,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},e.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.UP:this._pan(0,1),t.preventDefault();break;case ke.DOWN:this._pan(0,-1),t.preventDefault();break;case ke.RIGHT:this._pan(1,0),t.preventDefault();break;case ke.LEFT:this._pan(-1,0),t.preventDefault()}},e}(Ue);function my(t,e,o){var i='<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+ae({icon:e,iconClass:"k-button-icon",svgIcons:o.svgIcons,type:o.type})+"</button>";return ay(i)}te(vy,{name:"Navigator",panStep:1}),uy(vy,["pan"]);var xy="change",_y=function(t){function e(e,o,i){t.call(this),this.element=e,this._initOptions(o);var r=my("in","plus",i),n=my("out","minus",i);this.element.appendChild(r),this.element.appendChild(n),this.element.setAttribute("role","group"),W(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Be(this.element,"click",".k-button",this._clickHandler);var s=this.element.parentNode.closest("[data-role]");this._keyroot=s||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Be(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&Ee(this.element,"click",this._clickHandler),this._keyroot&&Ee(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i="tabindex",r=e.getAttribute(i)||o.getAttribute(i);o.removeAttribute(i),e.setAttribute(i,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._change=function(t){var e=this.options.zoomStep;this.trigger(xy,{delta:t*e})},e.prototype._click=function(t){var e=1;kt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case ke.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},e}(Ue);te(_y,{name:"ZoomControl",zoomStep:1}),uy(_y,[xy]);var by=Math,wy=by.max,ky=by.min,Ay=function(t){function e(e,o){t.call(this);var i=Ug.create(e),r=Ug.create(o);i.lng+180>r.lng+180&&i.lat+90<r.lat+90?(this.se=i,this.nw=r):(this.se=r,this.nw=i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={World:{configurable:!0}};return e.prototype.contains=function(t){var e=this.nw,o=this.se,i=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},e.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,i=t.lat+(e.lat-t.lat)/2;return new Ug(i,o)},e.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},e.prototype.include=function(t){var e=this.nw,o=this.se,i=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);e.lng=ky(e.lng,i),e.lat=wy(e.lat,r),o.lng=wy(o.lng,i),o.lat=ky(o.lat,r)},e.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},e.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Ug(t.lat,e.lng),se:this.se,sw:new Ug(e.lat,t.lng)}},e.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Ug(t.lat,e.lng),e,new Ug(e.lat,t.lng)]},e.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},e.create=function(t,o){return t instanceof e?t:t&&o?new e(t,o):t&&4===t.length&&!o?new e([t[0],t[1]],[t[2],t[3]]):void 0},o.World.get=function(){return new e([90,-180],[-90,180])},Object.defineProperties(e,o),e}(q.Class),Sy="centerChange",Cy=function(t){function e(e,o){t.call(this),this.widgetService=e,this.options=at({},this.options,o),this.offset={x:0,y:0}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={anchor:{configurable:!0}};return e.prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},e.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},o.anchor.get=function(){return this._anchor},o.anchor.set=function(t){var e=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:e.left,top:e.top}},e.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(e.prototype,o),e}(q.Class);te(Cy,{border:{width:1},opacity:1});var Py=function(t){function e(e,o){t.call(this),this.support=Re(),this._initOptions(o),this.map=e;var i=document.createElement("div");W(i,"k-layer"),i.style.zIndex=this.options.zIndex,i.style.opacity=this.options.opacity,this.element=i,e.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._deactivate()},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},e.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},e.prototype.reset=function(){this._beforeReset(),this._reset()},e.prototype._reset=function(){this._applyExtent()},e.prototype._beforeReset=function(){},e.prototype._resize=function(){},e.prototype._panEnd=function(){this._applyExtent()},e.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!zt(t.minZoom)||e>=t.minZoom,i=!zt(t.maxZoom)||e<=t.maxZoom,r=Ay.create(t.extent),n=!r||r.overlaps(this.map.extent());this._setVisibility(o&&i&&n)},e.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},e.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},e.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},e.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},e.prototype._readData=function(){return this.options.data||[]},e.prototype._hasData=function(){return this._data&&this._data.length>0},e.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)},e}(q.Class),Ty=Math,My=q.geometry.Point;function Oy(t){return it(t)?t:yt.compile(t)}function Ly(t){return new My(Zt(t.x),Zt(t.y))}function Iy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var By=function(t){function e(e,o){t.call(this,e,o),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var i=this._viewType();this._view=new i(this.element,this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this._view.destroy(),this._view=null},e.prototype._beforeReset=function(){var t=this.map,e=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(e)},e.prototype._reset=function(){t.prototype._reset.call(this),this._updateView(),this._view.reset()},e.prototype._viewType=function(){return Ey},e.prototype._activate=function(){t.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,q.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},e.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),i={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},e.prototype._resize=function(){this._render()},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._render()},e.prototype._render=function(){this._updateView(),this._view.render()},e}(Py);te(By,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var Ey=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.pool=new Vy}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.center=function(t){this._center=t},e.prototype.extent=function(t){this._extent=t},e.prototype.viewOrigin=function(t){this._viewOrigin=t},e.prototype.zoom=function(t){this._zoom=t},e.prototype.pointToTileIndex=function(t){return new My(Ty.floor(t.x/this.options.tileSize),Ty.floor(t.y/this.options.tileSize))},e.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,i=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Ty.ceil((Ty.abs(i.x)+t.width)/this.options.tileSize),y:Ty.ceil((Ty.abs(i.y)+t.height)/this.options.tileSize)}},e.prototype.size=function(){var t=this._extent.nw,e=this._extent.se.clone().translate(-t.x,-t.y);return{width:e.x,height:e.y}},e.prototype.indexToPoint=function(t){var e=t.x,o=t.y;return new My(e*this.options.tileSize,o*this.options.tileSize)},e.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},e.prototype.destroy=function(){py(this.element),this.pool.empty()},e.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},e.prototype.render=function(){var t,e,o,i=this.tileCount(),r=this.pointToTileIndex(this._extent.nw);for(e=0;e<i.x;e++)for(o=0;o<i.y;o++)(t=this.createTile({x:r.x+e,y:r.y+o})).visible||t.show()},e.prototype.createTile=function(t){var e=this.tileOptions(t),o=this.pool.get(this._center,e);return o.element.parentNode||this.element.append(o.element),o},e.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,r=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:Ly(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},e.prototype.wrapIndex=function(t){var e=Ty.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:Xt(t.y,0,e-1)}},e.prototype.wrapValue=function(t,e){var o=Ty.abs(t)%e;return t>=0?o:e-(0===o?e:o)},e}(q.Class),Ry=function(t){function e(e,o){t.call(this),this.id=e,this.visible=!0,this._initOptions(o),this.createElement(),this.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},e.prototype.show=function(){var t=this.element;t.style.top=Iy(this.options.offset.y),t.style.left=Iy(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},e.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},e.prototype.url=function(){return Oy(this.options.urlTemplate)(this.urlOptions())},e.prototype.errorUrl=function(){return Oy(this.options.errorUrlTemplate)(this.urlOptions())},e.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},e}(q.Class);te(Ry,{urlTemplate:"",errorUrlTemplate:""});var Vy=function(t){function e(){t.call(this),this._items=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},e.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},e.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},e.prototype._create=function(t){for(var e,o=this._items,i=Gt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new Ry(i,t),this._items.push(e)),e},e.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);n>o&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))},e}(q.Class);te(Vy,{maxSize:100});var jy=Object.assign,zy="change",Dy=function(t){function e(e,o){t.call(this);var i=this,r=e[0]||e;i.capture=!1,r.addEventListener?(Pe.down.split(" ").forEach((function(t){r.addEventListener(t,sy(i._press,i),!0)})),Pe.up.split(" ").forEach((function(t){r.addEventListener(t,sy(i._release,i),!0)}))):(Pe.down.split(" ").forEach((function(t){r.attachEvent(t,sy(i._press,i))})),Pe.up.split(" ").forEach((function(t){r.attachEvent(t,sy(i._release,i))}))),i.bind(["press","release"],o||{})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.captureNext=function(){this.capture=!0},e.prototype.cancelCapture=function(){this.capture=!1},e.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},e.prototype._release=function(t){var e=this;e.trigger("release"),e.capture&&(t.preventDefault(),e.cancelCapture())},e}(Ue),Fy=function(t){function e(e){t.call(this);var o=this;o.forcedEnabled=!1,jy(o,e),o.scale=1,o.horizontal?(o.measure="offsetWidth",o.scrollSize="scrollWidth",o.axis="x"):(o.measure="offsetHeight",o.scrollSize="scrollHeight",o.axis="y")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.makeVirtual=function(){jy(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},e.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},e.prototype.outOfBounds=function(t){return t>this.max||t<this.min},e.prototype.forceEnabled=function(){this.forcedEnabled=!0},e.prototype.getSize=function(){return this.container[this.measure]},e.prototype.getTotal=function(){return this.element[this.scrollSize]},e.prototype.rescale=function(t){this.scale=t},e.prototype.update=function(t){var e=this,o=e.virtual?e._virtualMax:e.getTotal(),i=o*e.scale,r=e.getSize();(0!==o||e.forcedEnabled)&&(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=i,e.min=Math.min(e.max,r-i),e.minScale=r/o,e.centerOffset=(i-r)/2,e.enabled=e.forcedEnabled||i>r,t||e.trigger(zy,e))},e}(Ue),Hy=function(t){function e(e){t.call(this);var o=this;o.x=new Fy(jy({horizontal:!0},e)),o.y=new Fy(jy({horizontal:!1},e)),o.container=e.container,o.forcedMinScale=e.minScale,o.maxScale=e.maxScale||100,o.bind(zy,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},e.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},e.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(zy)},e}(Ue),Ny=function(t){function e(e){t.call(this),jy(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},e.prototype.dragMove=function(t){var e=this,o=e.dimension,i=e.axis,r=e.movable,n=r[i]+t;if(o.enabled){var s=t;(n<o.min&&t<0||n>o.max&&t>0)&&(s*=e.resistance),r.translateAxis(i,s),e.trigger(zy,e)}},e}(Ue),Uy=function(t){function e(e){t.call(this);var o,i,r,n,s=this;jy(s,{elastic:!0},e),r=s.elastic?.5:0,n=s.movable,s.x=o=new Ny({axis:"x",dimension:s.dimensions.x,resistance:r,movable:n}),s.y=i=new Ny({axis:"y",dimension:s.dimensions.y,resistance:r,movable:n}),s.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){s.gesture=t,s.offset=Ft(s.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e,r=s.gesture,a=r.center,p=t.center,l=t.distance/r.distance,h=s.dimensions.minScale,c=s.dimensions.maxScale;n.scale<=h&&l<1&&(l+=.8*(1-l)),n.scale*l>=c&&(l=c/n.scale);var u=n.x+s.offset.left,d=n.y+s.offset.top;e={x:(u-a.x)*l+p.x-u,y:(d-a.y)*l+p.y-d},n.scaleWith(l),o.dragMove(e.x),i.dragMove(e.y),s.dimensions.rescale(n.scale),s.gesture=t,t.preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(o.dimension.enabled||i.dimension.enabled?(o.dragMove(t.x.delta),i.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(q.Class),Gy=function(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"},Wy=function(t){function e(e){t.call(this);var o=this;o.element=e,o.element.style.transformOrigin="left top",o.x=0,o.y=0,o.scale=1;var i=Gy(o.x,o.y,o.scale);o.element.style.transform=i,o._saveCoordinates(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},e.prototype.scaleTo=function(t){this.scale=t,this.refresh()},e.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},e.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},e.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},e.prototype.moveTo=function(t){jy(this,t),this.refresh()},e.prototype.refresh=function(){var t,e=this,o=e.x,i=e.y;e.round&&(o=Math.round(o),i=Math.round(i)),(t=Gy(o,i,e.scale))!==e.coordinates&&(e.element.style.transform=t,e._saveCoordinates(t),e.trigger(zy))},e.prototype._saveCoordinates=function(t){this.coordinates=t},e}(Ue),Xy=q.drawing.Group,Yy=function(t){function e(e,o){t.call(this,e,o),this._pan=sy(this._pan,this),this.surface=q.drawing.Surface.create(this.element,{width:e.scrollElement.clientWidth,height:e.scrollElement.clientHeight}),this._initRoot(),this.movable=new Wy(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this.surface.destroy()},e.prototype._reset=function(){t.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},e.prototype._initRoot=function(){this._root=new Xy,this.surface.draw(this._root)},e.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},e.prototype._resize=function(){this.surface.size(this.map.size())},e.prototype._readData=function(){var e=t.prototype._readData.call(this);return"FeatureCollection"===e.type?e.features:"GeometryCollection"===e.type?e.geometries:e},e.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new qy(this.map,this.options.style,this));for(var e=new Xy,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},e.prototype.shapeCreated=function(t){var e=!1;if(t instanceof q.drawing.Circle&&this.map.options.renderPointsAsMarkers&&(e=zt(this._createMarker(t))),!e){var o={layer:this,shape:t};e=this.map.trigger("shapeCreated",o)}return e},e.prototype.featureCreated=function(t){t.layer=this,this.map.trigger("shapeFeatureCreated",t)},e.prototype._createMarker=function(t){var e=this.map.markers.bind({location:t.location},t.dataItem);return e&&this._markers.push(e),e},e.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},e.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},e.prototype._translateSurface=function(){var t=this.map,e=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(e),this.movable.moveTo({x:e.x,y:e.y}))},e.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},e.prototype._handler=function(t){var e=this;return function(o){o.element&&e.map.trigger(t,e._eventArgs(o))}},e.prototype._mouseenter=function(t){if(t.element){this.map.trigger("shapeMouseEnter",this._eventArgs(t));var e=t.element,o=this._tooltipAnchor(t);this.map._tooltip.show(o,this._tooltipContext(e))}},e.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},e.prototype._tooltipAnchor=function(t){var e=this.map.eventOffset(t.originalEvent);return{top:e.y,left:e.x}},e.prototype._activate=function(){t.prototype._activate.call(this),this._panHandler=sy(this._pan,this),this.map.bind("pan",this.panHandler)},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e}(Py);te(Yy,{autoBind:!0,zIndex:100});var qy=function(t){function e(e,o,i){t.call(this),this.observer=i,this.locator=e,this.style=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parse=function(t){var e=new Xy,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),o&&e.children.length<2&&(e=e.children[0]),e},e.prototype._shapeCreated=function(t){var e=!1;return this.observer&&this.observer.shapeCreated&&(e=this.observer.shapeCreated(t)),e},e.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},e.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},e.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Wt(e).anchor()))&&(t.options.fill=null)},e.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},e.prototype._loadPolygon=function(t,e,o){var i=this._buildPolygon(e);return i.dataItem=o,i.location=this.locator.viewToLocation(i.bbox().center()),this._loadShape(t,i)},e.prototype._buildPolygon=function(t){for(var e=new(t.length>1?q.drawing.MultiPath:q.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(Ug.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},e.prototype._loadPoint=function(t,e,o){var i=Ug.fromLngLat(e),r=this.locator.locationToView(i),n=new q.geometry.Circle(r,10),s=new q.drawing.Circle(n,this.style);return s.dataItem=o,s.location=i,this._loadShape(t,s)},e}(q.Class),Zy=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=bt(e.valueField),i=t.slice(0);i.sort((function(t,e){return o(e)-o(t)}));for(var r,n=this._scaleType(),s=bt(this.options.locationField),a=0;a<i.length;a++){var p=i[a],l=s(p),h=o(p);if(zt(l)&&zt(h)){r||(r=new n([0,h],[e.minSize,e.maxSize])),l=Ug.create(l);var c=this.map.locationToView(l),u=r.map(h),d=this._createSymbol({center:c,size:u,style:e.style,dataItem:p,location:l});d.dataItem=p,d.location=l,d.value=h,this._drawSymbol(d)}}}},e.prototype._scaleType=function(){var t=this.options.scale;return it(t)?t:Ky[t]},e.prototype._createSymbol=function(t){var e=this.options.symbol;return it(e)||(e=$y[e]),e(t)},e.prototype._drawSymbol=function(t){var e={layer:this,shape:t};this.map.trigger("shapeCreated",e)||this.surface.draw(t)},e.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},e.prototype._tooltipAnchor=function(t){var e=t.element.bbox().center();return{top:e.y,left:e.x}},e}(Yy);te(Zy,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Qy=function(t){function e(e,o){t.call(this),this._domain=e,this._range=o;var i=Math.sqrt(e[1])-Math.sqrt(e[0]),r=o[1]-o[0];this._ratio=r/i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t){var e=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+e},e}(q.Class),Ky={sqrt:Qy},$y={circle:function(t){var e=new q.geometry.Circle(t.center,t.size/2);return new q.drawing.Circle(e,t.style)},square:function(t){var e=new q.drawing.Path(t.style),o=t.size/2,i=t.center;return e.moveTo(i.x-o,i.y-o).lineTo(i.x+o,i.y-o).lineTo(i.x+o,i.y+o).lineTo(i.x-o,i.y+o).close(),e}},Jy="click",tv="mouseenter",ev="mouseleave",ov=Object.assign,iv="k-marker",rv="."+iv,nv=function(t){function e(e,o){t.call(this,e,o),this._markerClickHandler=sy(this._markerClick,this),Be(this.element,Jy,rv,this._markerClickHandler),this.items=[],this._load(this._readData())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),Ee(this.element,Jy,this._markerClickHandler),this.clear()},e.prototype.add=function(t){if(!G(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},e.prototype.remove=function(t){t.destroy();var e=(this.items||[]).indexOf(t);e>-1&&this.items.splice(e,1)},e.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},e.prototype.update=function(t){var e=t.location();if(e){t.showAt(this.map.locationToView(e));var o={marker:t,layer:this};this.map.trigger("markerActivate",o)}},e.prototype._reset=function(){t.prototype._reset.call(this);for(var e=this.items,o=0;o<e.length;o++)this.update(e[o])},e.prototype.bind=function(t,e){var o=sv.create(t,this.options);o.dataItem=e;var i={marker:o,layer:this};if(!this.map.trigger("markerCreated",i))return this.add(o),o},e.prototype._addOne=function(t){var e=sv.create(t,this.options);return e.addTo(this),e},e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){this._data=t,this.clear();for(var e=bt(this.options.locationField),o=bt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},e.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,o={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",o)},e.prototype._markerMouseEnter=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",e)},e.prototype._markerMouseLeave=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",e)},e.prototype._createMarkerEventArgs=function(t){var e=t.marker;return ov({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},e}(Py);te(nv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});var sv=function(t){function e(e){t.call(this),this.options=e||{}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},e.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},e.prototype.location=function(t){return t?(this.options.location=Ug.create(t).toArray(),this.layer&&this.layer.update(this),this):Ug.create(this.options.location)},e.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=cy(this._anchor.left),this.element.style.top=cy(this._anchor.top)},e.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},e.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=sy(this._mouseEnter,this),Be(this.element,tv,rv,this._mouseEnterHandler),this._mouseLeaveHandler=sy(this._mouseLeave,this),Be(this.element,ev,rv,this._mouseLeaveHandler))},e.prototype.unbindEvents=function(){this.element&&(Ee(this.element,tv,this._mouseEnterHandler),Ee(this.element,ev,this._mouseLeaveHandler))},e.prototype.render=function(){if(!this.element){var t=this.options,e=this.layer,o=document.createElement("span");if(W(o,iv),this.options.template){var i=this._compileTemplate(this.options.template)(this.dataItem),r=ay(i);o.appendChild(r)}else if(t.svgIcon)ae(o,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"});else{var n={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type};t.shape?"pinTarget"===t.shape?(n.icon="map-marker-target",ae(o,n)):"pin"===t.shape?ae(o,n):W(o,"k-icon k-icon-xxl k-i-marker-"+hy(t.shape||"pin")):ae(o,n)}t.title&&o.setAttribute("title",t.title);var s=t.attributes||{};Object.keys(s).forEach((function(t){o.setAttribute(t,s[t])})),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents()}},e.prototype._mouseEnter=function(t){var e=this._createEventArgs(t);this.layer._markerMouseEnter(e),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},e.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},e.prototype._mouseLeave=function(t){var e=this._createEventArgs(t);this.layer._markerMouseLeave(e)},e.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},e.prototype._compileTemplate=function(t){return yt.compile(t,{paramName:"dataItem",useWithBlock:!1})},e.create=function(t,o){return t instanceof e?t:new e(at({},o,t))},e}(q.Class),av=Object.assign;function pv(t){window.requestAnimationFrame(t)}var lv=function(t){function e(){t.call(this);var e=this;e._tickProxy=sy(e._tick,e),e._started=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){},e.prototype.done=function(){},e.prototype.onEnd=function(){},e.prototype.onCancel=function(){},e.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,pv(this._tickProxy)))},e.prototype.enabled=function(){return!0},e.prototype.cancel=function(){this._started=!1,this.onCancel()},e.prototype._tick=function(){var t=this;t._started&&(t.tick(),t.done()?(t._started=!1,t.onEnd()):pv(t._tickProxy))},e}(q.Class),hv=function(t){function e(e){t.call(this),av(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.done=function(){return this.timePassed()>=this.duration},e.prototype.timePassed=function(){return Math.min(this.duration,ze()-this.startDate)},e.prototype.moveTo=function(t){var e=this,o=e.movable;e.initial=o[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=ze(),e.start()},e.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},e.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},e}(lv),cv=Object.assign,uv=Math.abs,dv="change",fv="scroll",gv=function(t){function e(e){t.call(this,e);var o=this;cv(o,e),o.userEvents.bind("gestureend",o.start.bind(this)),o.tapCapture.bind("press",o.cancel.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},e.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},e.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},e.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},e}(lv),yv=function(t){function e(e){t.call(this);var o=this;cv(o,e,{transition:new hv({axis:e.axis,movable:e.movable,onEnd:function(){o._end()}})}),o.tapCapture.bind("press",(function(){o.cancel()})),o.userEvents.bind("end",sy(o.start,o)),o.userEvents.bind("gestureend",sy(o.start,o)),o.userEvents.bind("tap",sy(o.onEnd,o))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onCancel=function(){this.transition.cancel()},e.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},e.prototype.onEnd=function(){var t=this;t.paneAxis.outOfBounds()?t._snapBack():t._end()},e.prototype.done=function(){return uv(this.velocity)<1},e.prototype.start=function(e){var o,i=this;i.dimension.enabled&&(i.paneAxis.outOfBounds()?i.transition._started?(i.transition.cancel(),i.velocity=Math.min(e.touch[i.axis].velocity*i.velocityMultiplier,55),t.prototype.start.call(this)):i._snapBack():(o=2===e.touch.id?0:e.touch[i.axis].velocity,i.velocity=Math.max(Math.min(o*i.velocityMultiplier,55),-55),i.tapCapture.captureNext(),t.prototype.start.call(this)))},e.prototype.tick=function(){var t=this,e=t.dimension,o=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=o,r=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(r)&&(r=Math.max(Math.min(r,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,r)},e.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},e.prototype._snapBack=function(){var t=this,e=t.dimension,o=t.movable[t.axis]>e.max?e.max:e.min;t._moveTo(o)},e.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:hv.easeOutExpo})},e}(lv),vv=function(t){function e(e){t.call(this,e),cv(this,e,{origin:{},destination:{},offset:{}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},e.prototype.done=function(){return uv(this.offset.y)<5&&uv(this.offset.x)<5},e.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},e.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},e.prototype.setCallback=function(t){t&&it(t)?this.callback=t:t=void 0},e.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},e}(lv),mv=function(t){function e(e){t.call(this);var o=this,i="x"===e.axis,r=ay('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');cv(o,e,{element:r,elementSize:0,movable:new Wy(r),scrollMovable:e.movable,alwaysVisible:e.alwaysVisible,size:i?"width":"height"}),o.scrollMovable.bind(dv,o.refresh.bind(o)),o.container.appendChild(r),e.alwaysVisible&&o.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.refresh=function(){var t=this,e=t.axis,o=t.dimension,i=o.size,r=t.scrollMovable,n=i/o.total,s=Math.round(-r[e]*n),a=Math.round(i*n);this.element.style.display=n>=1?"none":"",s+a>i?a=i-s:s<0&&(a+=s,s=0),t.elementSize!==a&&(t.element.style[t.size]=a+"px",t.elementSize=a),t.movable.moveAxis(e,s)},e.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},e.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},e}(q.Class),xv=function(t){function e(e,o){t.call(this);var i=this;this.element=e,this._initOptions(o);var r,n=(navigator.userAgent,(r=Re().mobileOS).ios||r.android);i._native=i.options.useNative&&n;var s=ay('<div class="km-scroll-header"/>');if(i._native)return W(e,"km-native-scroller"),ly(s,e),void cv(i,{scrollElement:e,fixedContainer:e.children[0]});e.style.overflow="hidden",W(e,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(e,ay('<div class="km-scroll-container"/>')),ly(s,e);var a=e.children[1],p=new Dy(e),l=new Wy(a),h=new Hy({element:a,container:e,forcedEnabled:i.options.zoom}),c=this.options.avoidScrolling,u=new fo(e,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:i.options.zoom,supportDoubleTap:i.options.supportDoubleTap,start:function(t){h.refresh();var e=uv(t.x.velocity),o=uv(t.y.velocity),r=2*e>=o,n=2*o>=e;!i.fixedContainer.contains(t.event.target)&&!c(t)&&i.enabled&&(h.x.enabled&&r||h.y.enabled&&n)?u.capture():u.cancel()}}),d=new Uy({movable:l,dimensions:h,userEvents:u,elastic:i.options.elastic}),f=new gv({movable:l,dimensions:h,userEvents:u,tapCapture:p}),g=new vv({moveTo:function(t){i.scrollTo(t.x,t.y)}});l.bind(dv,(function(){i.scrollTop=-l.y,i.scrollLeft=-l.x,i.trigger(fv,{scrollTop:i.scrollTop,scrollLeft:i.scrollLeft})})),i.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Be(e,"wheel",this._wheelScrollHandler)),cv(i,{movable:l,dimensions:h,zoomSnapBack:f,animatedScroller:g,userEvents:u,pane:d,tapCapture:p,pulled:!1,enabled:!0,scrollElement:a,scrollTop:0,scrollLeft:0,fixedContainer:e.children[0]}),i._initAxis("x"),i._initAxis("y"),i._wheelEnd=function(){i._wheel=!1,i.userEvents.end(0,i._wheelY)},h.refresh(),i.options.pullToRefresh&&i._initPullToRefresh()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._wheelScroll=function(t){if(!t.ctrlKey){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var e=function(t){var e,o=t.wheelDeltaY;return t.wheelDelta?(void 0===o||o)&&(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e}(t);e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault()}},e.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},e.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},e.prototype.height=function(){return this.dimensions.y.size},e.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},e.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},e.prototype._resize=function(){this._native||this.contentResized()},e.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},e.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},e.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},e.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(uv(t)),this.scrollElement.scrollTop(uv(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},e.prototype.animatedScrollTo=function(t,e,o){var i,r;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},r={x:t,y:e},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(o),this.animatedScroller.start())},e.prototype.pullHandled=function(){},e.prototype.destroy=function(){Ee(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},e.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},e.prototype._initPullToRefresh=function(){},e.prototype._dragEnd=function(){},e.prototype._paneChange=function(){},e.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new mv({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(dv,(function(){s.refresh()})),n.bind(dv,(function(){s.show()})),e[t+"inertia"]=new yv({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},e}(Ue);te(xv,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),uy(xv,["pull",fv,"resize"]);var _v=function(t,e){void 0===e&&(e={}),this.sender=e.sender||t,this.widget=t,this.rtl=Boolean(e.rtl)};_v.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const bv=_v;var wv=Math,kv=wv.min,Av=wv.pow,Sv=q.geometry.Point,Cv="marker",Pv="location",Tv="wheel",Mv={bubble:Zy,shape:Yy,tile:By};Mv[Cv]=nv;var Ov=function(t){function e(e,o,i,r){void 0===o&&(o={}),void 0===i&&(i={}),void 0===r&&(r={}),t.call(this),this._init(e,o,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),G(this.markers)?this.markers.forEach((function(t){t.destroy()})):this.markers.destroy();for(var e=0;e<this.layers.length;e++)this.layers[e].destroy();Ee(this.element,Tv,this._mousewheelHandler),t.prototype.destroy.call(this)},e.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=Re(),this.context=i,this.initObserver(i),this.initServices(i),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new ny,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,q.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Be(this.element,Tv,this._mousewheelHandler)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._initElement=function(t){this.element=t,W(t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),py(t);var e=ay("<div />");this.element.appendChild(e)},e.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new bv(this,t)},e.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(e,o){void 0===o&&(o={}),o.sender=this;for(var i=this.observers,r=!1,n=0;n<i.length;n++)i[n].trigger(e,o)&&(r=!0);return r||t.prototype.trigger.call(this,e,o),r},e.prototype._notifyObserver=function(t,e){void 0===e&&(e={}),e.sender=this;for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype.zoom=function(t){var e,o=this.options;if(zt(t)){var i=wv.round(Xt(t,o.minZoom,o.maxZoom));o.zoom!==i&&(o.zoom=i,this.widgetService.notify("zoomChange",{zoom:o.zoom}),this._reset()),e=this}else e=o.zoom;return e},e.prototype.center=function(t){var e;if(t){var o=Ug.create(t),i=Ug.create(this.options.center);o.equals(i)||(this.options.center=o.toArray(),this.widgetService.notify(Sy,{center:this.options.center}),this._reset()),e=this}else e=Ug.create(this.options.center);return e},e.prototype.extent=function(t){var e;return t?(this._setExtent(t),e=this):e=this._getExtent(),e},e.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),py(e),this._init(e,t,{},this.context),this._reset()},e.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,i=Ug.create(t);return this.crs.toPoint(i,this._layerSize(e),o)},e.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,i=Sv.create(t);return this.crs.toLocation(i,this._layerSize(e),o)},e.prototype.locationToView=function(t){var e=Ug.create(t),o=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(o.scale(-1))},e.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),i=Sv.create(t).clone().translateWith(o);return this.layerToLocation(i,e)},e.prototype.eventOffset=function(t){var e,o,i=Ft(this.element);if(t.x&&t.x[Pv]||t.y&&t.y[Pv])e=t.x[Pv]-i.left,o=t.y[Pv]-i.top;else{var r=t.originalEvent||t;e=Kt(r.pageX,r.clientX)-i.left,o=Kt(r.pageY,r.clientY)-i.top}return new q.geometry.Point(e,o)},e.prototype.eventToView=function(t){var e=this.eventOffset(t);return this.locationToView(this.viewToLocation(e))},e.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},e.prototype.eventToLocation=function(t){var e=this.eventOffset(t);return this.viewToLocation(e)},e.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return this.options.wraparound||(o=kv(e,o)),{width:o,height:kv(e,t.clientHeight)}},e.prototype.exportVisual=function(){return this._reset(),!1},e.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},e.prototype._setOrigin=function(t,e){var o,i=this.viewSize(),r=this._origin=Ug.create(t);return(o=this.locationToLayer(r,e)).x+=i.width/2,o.y+=i.height/2,this.options.center=this.layerToLocation(o,e).toArray(),this.widgetService.notify(Sy,{center:this.options.center}),this},e.prototype._getOrigin=function(t){var e,o=this.viewSize();return!t&&this._origin||((e=this.locationToLayer(this.center())).x-=o.width/2,e.y-=o.height/2,this._origin=this.layerToLocation(e)),this._origin},e.prototype._setExtent=function(t){var e=Ay.create(t),o=e.se.clone();this.options.wraparound&&o.lng<0&&t.nw.lng>0&&(o.lng=180+(180+o.lng));var i=new Ay(e.nw,o);this.center(i.center());var r,n=this.element.clientWidth,s=this.element.clientHeight;for(r=this.options.maxZoom;r>=this.options.minZoom;r--){var a=this.locationToLayer(i.nw,r),p=this.locationToLayer(i.se,r),l=wv.abs(p.x-a.x),h=wv.abs(p.y-a.y);if(l<=n&&h<=s)break}this.zoom(r)},e.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize();e.x+=o.width,e.y+=o.height;var i=this.layerToLocation(e);return new Ay(t,i)},e.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},e.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},e.prototype._createControlElement=function(t,e){var o=t.position||e,i="."+dy(o).replace(" ","."),r=this.element.querySelector(".k-map-controls"+i)||[];if(0===r.length){var n=document.createElement("div");W(n,"k-map-controls "+dy(o)),r=n,this.element.appendChild(r)}var s=document.createElement("div");return r.appendChild(s),s},e.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new fy(e,t)},e.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),o=this.navigator=new vy(e,at({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),o.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),o.bind("center",this._navigatorCenter)},e.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,i=e.scrollTop-t.y,r=this._virtualSize,n=this.element.clientWidth,s=this.element.clientHeight;o=Xt(o,r.x.min,r.x.max-n),i=Xt(i,r.y.min,r.y.max-s),this.scroller.one("scroll",sy(this._scrollEnd,this)),this.scroller.scrollTo(-o,-i)},e.prototype._navigatorCenter=function(){this.center(this.options.center)},e.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),o=this.zoomControl=new _y(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),o.bind("change",this._zoomControlChange)},e.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},e.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,o=this.scroller=new xv(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});o.bind("scroll",sy(this._scroll,this)),o.bind("scrollEnd",sy(this._scrollEnd,this)),o.userEvents.bind("gesturestart",sy(this._scaleStart,this)),o.userEvents.bind("gestureend",sy(this._scale,this)),o.userEvents.bind("doubleTap",sy(this._doubleTap,this)),o.userEvents.bind("tap",sy(this._tap,this)),this.scrollElement=o.scrollElement},e.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],r=this._createLayer(i);e.push(r)}},e.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],i=e===Cv?at({},this.options.markerDefaults,t,{icons:this.options.icons}):at({},o,t),r=new(0,Mv[e])(this,i);return e===Cv&&(this.markers=r),r},e.prototype._createTooltip=function(){return new Cy(this.widgetService,this.options.tooltip)},e.prototype._initMarkers=function(){(this.options.layers||[]).filter((function(t){return t&&t.type===Cv})).length>0||(this.markers=new nv(this,at({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},e.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,i=new q.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,this._tooltip.offset=i,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},e.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=ze(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},e.prototype._panComplete=function(){return ze()-(this._panEndTimestamp||0)>50},e.prototype._scaleStart=function(t){if(this.trigger("zoomStart",{originalEvent:t})){var e=t.touches[1];e&&e.cancel()}},e.prototype._scale=function(t){var e=this.scroller.movable.scale,o=this._scaleToZoom(e),i=new q.geometry.Point(t.center.x,t.center.y),r=this.viewToLocation(i,o),n=this.locationToLayer(r,o).translate(-i.x,-i.y);this._zoomAround(n,o),this.trigger("zoomEnd",{originalEvent:t})},e.prototype._scaleToZoom=function(t){var e=this._layerSize()*t/this.options.minSize,o=wv.log(e)/wv.log(2);return wv.round(o)},e.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},e.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,n=this.locationToLayer(r).round();t.movable.round=!0,t.reset(),t.userEvents.cancel();var s=this.zoom();t.dimensions.forcedMinScale=Av(2,this.options.minZoom-s),t.dimensions.maxScale=Av(2,this.options.maxZoom-s);var a={min:-n.x,max:i-n.x},p={min:-n.y,max:i-n.y};if(this.options.wraparound&&(a.max=20*i,a.min=-a.max),!1===this.options.pannable){var l=this.viewSize();a.min=p.min=0,a.max=l.width,p.max=l.height}e.makeVirtual(),o.makeVirtual(),e.virtualSize(a.min,a.max),o.virtualSize(p.min,p.max),this._virtualSize={x:a,y:p}},e.prototype._renderLayers=function(){},e.prototype._layerSize=function(t){var e=Kt(t,this.options.zoom);return this.options.minSize*Av(2,e)},e.prototype._tap=function(t){if(this._panComplete()){var e=this.eventOffset(t);this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)})}},e.prototype._doubleTap=function(t){if(!1!==this.options.zoomable&&!this.trigger("zoomStart",{originalEvent:t})){var e=this.zoom()+1,o=this.eventOffset(t),i=this.viewToLocation(o),r=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(r,e),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._mousewheel=function(t){var e=Et(t)>0?-1:1,o=this.options,i=this.zoom(),r=Xt(i+e,o.minZoom,o.maxZoom);if(!1!==o.zoomable&&r!==i&&!this.trigger("zoomStart",{originalEvent:t})){var n=this.eventOffset(t),s=this.viewToLocation(n),a=this.locationToLayer(s,r).translate(-n.x,-n.y);this._zoomAround(a,r),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._toDocumentCoordinates=function(t){var e=Ft(this.element);return{left:Zt(t.x+e.left),top:Zt(t.y+e.top)}},e}(Ue);te(Ov,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),uy(Ov,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const Lv=Ov;var Iv=function(t,e){return t.map(e).reduce((function(t,e){return t+e}),0)},Bv=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1},Ev=function(t,e){return Bv(t.source,e.source)},Rv=function(t,e){return Bv(t.target,e.target)},Vv=function(t){return t.value};function jv(t){t.forEach((function(t){t.targetLinks.forEach((function(t){t.source.sourceLinks.sort(Rv)})),t.sourceLinks.forEach((function(t){t.target.targetLinks.sort(Ev)}))}))}var zv=function(t,e){return"left"===t.align?t.depth:"right"===t.align?e-t.height:t.sourceLinks.length?t.depth:e},Dv=function(t){var e=t.nodesOptions,o=e.offset;void 0===o&&(o={});var i=e.align;this.data={nodes:t.nodes.map((function(t){return at({},{offset:o,align:i},t)})),links:t.links.map((function(t){return at({},t)}))},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout};Dv.prototype.calculate=function(){var t=this.data,e=t.nodes,o=t.links;this.connectLinksToNodes(e,o),this.calculateNodeValues(e);var i=this.calculateNodeHeights(e);if(i)return{nodes:[],links:[],columns:[],circularLinks:i};this.calculateNodeDepths(e);var r=this.calculateNodeColumns(e);return this.calculateNodeBreadths(r),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:r})},Dv.prototype.connectLinksToNodes=function(t,e){var o=new Map;t.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,o.set(t.id,t)})),e.forEach((function(t){t.source=o.get(t.sourceId),t.target=o.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)}))},Dv.prototype.calculateNodeValues=function(t){t.forEach((function(t){t.value=Math.max(Iv(t.sourceLinks,Vv),Iv(t.targetLinks,Vv))}))},Dv.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),o=new Set,i=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=i;for(var a=0;a<s.sourceLinks.length;a++){var p=s.sourceLinks[a];o.add(p.target)}}i++,e=o,o=new Set}},Dv.prototype.calculateNodeHeights=function(t){for(var e=t.length,o=new Set(t),i=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach((function(t){i.add(t.source)}))};o.size;){if(o.forEach(n),++r>e)return!0;o=i,i=new Set}return!1},Dv.prototype.calculateNodeColumns=function(t){for(var e,o,i=(e=t,o=function(t){return t.depth},Math.max.apply(null,e.map(o))),r=(this.width-this.offsetX-this.nodeWidth)/i,n=new Array(i+1),s=0;s<t.length;s++){var a=t[s],p=Math.max(0,Math.min(i,zv(a,i)));a.x0=this.offsetX+p*r,a.x1=a.x0+this.nodeWidth,a.layer=p,n[p]=n[p]||[],n[p].push(a)}return n},Dv.prototype.calculateNodeBreadths=function(t){var e,o,i=this,r=(e=t,o=function(t){return(i.height-i.offsetY-(t.length-1)*i.nodePadding)/Iv(t,Vv)},Math.min.apply(null,e.map(o)));if(t.forEach((function(t){var e=i.offsetY;t.forEach((function(t){t.y0=e,t.y1=e+t.value*r,e=t.y1+i.nodePadding,t.sourceLinks.forEach((function(t){t.width=t.value*r}))})),e=(i.height-e+i.nodePadding)/(t.length+1),t.forEach((function(t,o){t.y0+=e*(o+1),t.y1+=e*(o+1)}))})),!1!==this.autoLayout)for(var n=void 0!==this.loops?this.loops:t.length-1,s=this.targetColumnIndex||1,a=0;a<n;a++)this.reverse?(this.uncurlLinksToRight(t,s),this.uncurlLinksToLeft(t,s)):(this.uncurlLinksToLeft(t,s),this.uncurlLinksToRight(t,s));t.forEach(jv)},Dv.prototype.applyNodesOffset=function(t){t.forEach((function(t){var e=(t.offset?t.offset.left:0)||0,o=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=o,t.y1+=o}))},Dv.prototype.calculateLinkBreadths=function(t){t.forEach((function(t){var e=t.sourceLinks,o=t.targetLinks,i=t.y0,r=i;e.forEach((function(t){t.x0=t.source.x1,t.y0=i+t.width/2,i+=t.width})),o.forEach((function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width}))}))},Dv.prototype.uncurlLinksToRight=function(t,e){for(var o=this,i=t.length,r=e;r<i;r++){var n=t[r];n.forEach((function(t){var e=0,i=0;t.targetLinks.forEach((function(r){var n=r.value*(t.layer-r.source.layer);e+=o.targetTopPos(r.source,t)*n,i+=n}));var r=0===e?0:e/i-t.y0;t.y0+=r,t.y1+=r,jv([t])})),n.sort(Bv),this.arrangeNodesVertically(n)}},Dv.prototype.uncurlLinksToLeft=function(t,e){for(var o=this,i=t.length-1-e;i>=0;i--){for(var r=t[i],n=function(t){var e=r[t],i=0,n=0;e.sourceLinks.forEach((function(t){var r=t.value*(t.target.layer-e.layer);i+=o.sourceTopPos(e,t.target)*r,n+=r}));var s=0===i?0:i/n-e.y0;e.y0+=s,e.y1+=s,jv([e])},s=0;s<r.length;s++)n(s);r.sort(Bv),this.arrangeNodesVertically(r)}},Dv.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},Dv.prototype.arrangeDown=function(t,e,o){for(var i=e,r=o;r<t.length;r++){var n=t[r],s=Math.max(0,i-n.y0);n.y0+=s,n.y1+=s,i=n.y1+this.nodePadding}},Dv.prototype.arrangeUp=function(t,e,o){for(var i=e,r=o;r>=0;--r){var n=t[r],s=Math.max(0,n.y1-i);n.y0-=s,n.y1-=s,i=n.y0-this.nodePadding}},Dv.prototype.sourceTopPos=function(t,e){for(var o=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,i=0;i<e.targetLinks.length;i++){var r=e.targetLinks[i];if(r.source===t)break;o+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;o-=s.width}return o},Dv.prototype.targetTopPos=function(t,e){for(var o=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,i=0;i<t.sourceLinks.length;i++){var r=t.sourceLinks[i];if(r.target===e)break;o+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;o-=s.width}return o};var Fv=function(t){return new Dv(t).calculate()};function Hv(t,e,o,i,r,n){var s=(n-e)*(o-t),a=(i-e)*(r-t);return s>a?1:s===a?0:-1}var Nv=function(t){function e(e){t.call(this),this.options=at({},this.options,e),this.createVisual()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.visual=this.createElement()},e.prototype.exportVisual=function(){return this.visual},e.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.getSender=function(){return this},e}(q.Class),Uv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){return q.drawing.Path.fromRect(this.getRect(),this.visualOptions())},e.prototype.getRect=function(){var t=this.options.node;return new q.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=q.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var o=this.options.node.id;this.visual.options.set("id",o),this.options.root()&&this.options.root().setAttribute(c,o)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(Nv),Gv=function(t,e,o){return t.color||e[o%e.length]},Wv=function(t,e,o,i){var r=at({},e,e.node);return at({},{color:Gv(t,o,i)},r,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})},Xv=function(t,e,o,i,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*o*a*n+i*a*r},Yv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options.link,e=t.x0,o=t.x1,i=t.y0,r=t.y1,n=(e+o)/2;return new q.drawing.Path(this.visualOptions()).moveTo(e,i).curveTo([n,i],[n,r],[o,r])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},e.prototype.visualOptions=function(){var t=this.options,e=this.options.link,o=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:zt(e.opacity)?e.opacity:t.opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:o}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable){var t=this.options.link,e=t.x0,o=t.x1,i=t.y0,r=t.y1,n=(e+o)/2,s=t.width/2,a=function(t,e){var o=t.width/2,i=e?t.x1:t.x0,r=e?t.x0:t.x1,n=e?t.y1:t.y0,s=e?t.y0:t.y1,a=(i+r)/2,p=[a,Xv(n,n,s,s,.5)],l=.4999,h=[Xv(i,a,a,r,l),Xv(n,n,s,s,l)],c=function(t,e,o,i,r){var n,s,a=(t+o)/2,p=(e+i)/2;if(e===i)n=0,s=r/2;else if(t===o)n=r/2,s=0;else{var l=-1/((i-e)/(o-t));s=l*(n=r/2/Math.sqrt(1+l*l))}return{P1:{x:a-n,y:p-s},P2:{x:a+n,y:p+s}}}(p[0],p[1],h[0],h[1],t.width),u=[a,Xv(n+o,n+o,s+o,s+o,.5)],d=c.P1.y>c.P2.y?c.P1:c.P2,f=(n>s?1:-1)*o,g=i,y=r;return a-((function(t,e,o,i,r){var n=(t.x+e.x)/2,s=(t.y+e.y)/2,a=e.x-t.x,p=-(e.y-t.y),l=a,h=Math.sqrt(p*p+l*l),c=n+(p=p/h*o),u=s+(l=l/h*o),d=n-p,f=s-l,g=r.x-i.x,y=r.y-i.y,v=y*(c-d)-g*(u-f);if(Math.abs(v)<1e-10)return null;var m=(g*(f-i.y)-y*(d-i.x))/v,x=((c-d)*(f-i.y)-(u-f)*(d-i.x))/v;return m>=0&&m<=1&&x>=0&&x<=1?{x:d+m*(c-d)}:null}(d,{x:u[0],y:u[1]},o,{x:u[0],y:u[1]},{x:Math.max(1,u[0]+f),y:u[1]})||{x:(u[0]+d.x)/2}).x-.125*g-.125*y)/.75}(t,this.options.rtl);this._highlight=new q.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(e,i+s).lineTo(e,i-s).curveTo([n+a,i-s],[n+a,r-s],[o,r-s]).lineTo(o,r+s).curveTo([n-a,r+s],[n-a,i+s],[e,i+s])}},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var o=this.options.link.sourceId+"->"+this.options.link.targetId;this.visual.options.set("id",o),this.options.root()&&this.options.root().setAttribute(c,o)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(Nv),qv="inside",Zv="before",Qv="after",Kv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=at({},this.options,this.options.node.label),e=t.node,o=t.diagramMinX,i=t.diagramMaxX,r=t.text,n=t.offset,s=t.rtl,a=t.position;if(s&&a!==qv&&(a=a===Zv?Qv:Zv),!t.visible||!r)return null;var p=new xo(e.x0,e.y0,e.x1,e.y1),l=this.visualOptions();s&&!l.align&&(l.align="right");var h=new Zo(r,l);h.reflow(new xo);var c=h.box,u=p.center().y-c.height()/2,d=e.x1+c.width()>i,f=e.x0-c.width()<o,g=a===Zv||a===qv&&d?Zv:Qv;s&&(g=a===Qv||a===qv&&f?Qv:Zv);var y=[g===Zv?e.x0-c.width():e.x1,u],v=new xo(y[0],y[1],y[0]+c.width(),y[1]+c.height());return v.translate(n.left||0,n.top||0),h.reflow(v),h.renderVisual(),h.visual},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},e}(Nv);te(Kv,{position:qv});var $v=function(t,e,o,i,r){return at({},e,{node:t,diagramMinX:i,diagramMaxX:r,rtl:o,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})},Jv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,o=t.text;if(!1===t.visible||!o)return null;var i=$o.buildTitle(o,t);return i.reflow(e),i.renderVisual(),i.visual},e.prototype.createElement=function(){return this.getElement()},e}(Nv);te(Jv,{align:f,border:{width:0},margin:dt(5),padding:dt(5)});var tm=function(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0},em=function(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0},om=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,o=t.rtl,i=t.nodes;void 0===i&&(i=[]);var r=t.item,n=t.position;if(!1===t.visible||!i.length)return null;var s,a=t.labels||{};a.content&&(s=vt(a));var p=i.map((function(t){return{text:s?s(t):t.label&&t.label.text||"",area:{background:void 0!==r.areaBackground?r.areaBackground:t.color,opacity:void 0!==r.areaOpacity?r.areaOpacity:t.opacity},node:t}}));p.sort(function(t){return t?em:tm}(o));var l=o&&n!==C&&n!==I,h=new Kl(Object.assign({},t,{data:p,reverse:l}),{rtl:o});return h.reflow(e),h.renderVisual(),h.visual},e.prototype.createElement=function(){return this.getElement()},e}(Nv);te(om,{markers:{visible:!1},item:{type:gn,cursor:N,opacity:1},position:d,align:f,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var im="link",rm="node",nm=function(t){function e(e,o,i){t.call(this),this._initTheme(i),this._setOptions(o),this._initElement(e),this._initSurface(),o&&o.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},e.prototype._initElement=function(t){this.element=t,W(t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},e.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},e.prototype.firstFocusableNode=function(){return this.columns[0][0]},e.prototype._initResizeObserver=function(){var t=this,e=new ResizeObserver((function(e){e.forEach((function(e){var o=e.contentRect,i=o.width,r=o.height;e.target!==t.element||t.size&&t.size.width===i&&t.size.height===r||(t.size={width:i,height:r},t.surface.setSize(t.size),t.resize=!0,t._redraw())}))}));this._resizeObserver=e,e.observe(this.element)},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options)},e.prototype.setLinksOpacity=function(t){var e=this;this.linksVisuals.forEach((function(o){e.setOpacity(o,t,o.linkOptions.opacity)}))},e.prototype.setLinksInactivityOpacity=function(t){var e=this;this.linksVisuals.forEach((function(o){e.setOpacity(o,t,o.linkOptions.highlight.inactiveOpacity)}))},e.prototype.setOpacity=function(t,e,o){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:zt(o)?o:e}))},e.prototype.trigger=function(e,o){var i=o.element.dataItem,r=o.element.type,n=Object.assign({},o,{type:e,targetType:r,dataItem:i});return t.prototype.trigger.call(this,e,n)},e.prototype._mouseenter=function(t){var e=t.element,o=e.type===im,i=e.type===rm,r=Boolean(e.chartElement&&e.chartElement.options.node);if(!(o&&this.trigger("linkEnter",t)||i&&this.trigger("nodeEnter",t))){var n=this.options.links.highlight;if(o)this.setLinksInactivityOpacity(n.inactiveOpacity),this.setOpacity(e,n.opacity,e.linkOptions.highlight.opacity);else if(i)this.highlightLinks(e,n);else if(r){var s=this.nodesVisuals.get(e.chartElement.options.node.id);this.highlightLinks(s,n)}}},e.prototype._mouseleave=function(t){var e=this,o=t.element,i=o.type===im,r=o.type===rm,n=Boolean(o.chartElement&&o.chartElement.options.node),s=t.originalEvent.relatedTarget;i&&s&&"text"===s.nodeName||((i||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),i&&this.trigger("linkLeave",t)||r&&this.trigger("nodeLeave",t)||(i||r||n)&&this.linksVisuals.forEach((function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})))},e.prototype._mousemove=function(t){var e=this,o=this.options.tooltip,i=o.followPointer,r=o.delay,n=t.element,s=n.type;if(!(s!==im&&s!==rm||this.tooltipShown&&!i)){var a=t.originalEvent,p=this.element.getBoundingClientRect(),l=a.clientX-p.left<p.width/2,h=a.clientY-p.top<p.height/2;if(t.tooltipData={popupOffset:{left:a.pageX,top:a.pageY},popupAlign:{horizontal:l?"left":"right",vertical:h?"top":"bottom"}},s===rm){var c=n.dataItem,u=c.sourceLinks,d=c.targetLinks,f=d.length?d:u;t.nodeValue=f.reduce((function(t,e){return t+e.value}),0)}this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null);var g=i&&this.tooltipShown?0:r;this.tooltipTimeOut=setTimeout((function(){e.trigger("tooltipShow",t),e.tooltipShown=!0,e.tooltipTimeOut=null}),g)}},e.prototype._click=function(t){var e=t.element,o=e.dataItem,i=e.type===im,r=e.type===rm,n=this._focusState||{};if(r)!n.link&&this.sameNode(n.node,o)||(this._focusState={node:o,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t);else if(i){var s={sourceId:o.source.id,targetId:o.target.id,value:o.value};this.sameLink(n.link,s)||(this._focusState={node:o.source,link:s},this._focusLink({highlight:!1})),this.trigger("linkClick",t)}},e.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},e.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},e.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},e.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},e.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,o=this.columns.findIndex((function(t){return t.find((function(t){return t.id===e.id}))})),i=this.columns[o],r=i.findIndex((function(t){return t.id===e.id})),n=i[r+t];n&&(this._focusState.node=n,this._focusNode())},e.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,o=this._focusState.link,i=e.sourceLinks.findIndex((function(t){return t.sourceId===o.sourceId&&t.targetId===o.targetId})),r=e.targetLinks.findIndex((function(t){return t.sourceId===o.sourceId&&t.targetId===o.targetId}));if(-1!==i){var n=e.sourceLinks[i+t];n&&(this._focusState.link=n,this._focusLink())}else if(-1!==r){var s=e.targetLinks[r+t];s&&(this._focusState.link=s,this._focusLink())}},e.prototype._focusSourceNode=function(){var t=this._focusState.link,e=this.models.map.get(t.sourceId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusTargetNode=function(){var t=this._focusState.link,e=this.models.map.get(t.targetId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},e.prototype._blur=function(){this._cleanFocusHighlight()},e.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},e.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},e.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach((function(t){return t.blur()})),this.models.links.forEach((function(t){return t.blur()}))},e.prototype._keydown=function(t){var e=this["on"+t.key],o=this.options.rtl;o&&"ArrowLeft"===t.key?e=this.onArrowRight:o&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},e.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},e.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},e.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},e.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},e.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},e.prototype.highlightLinks=function(t,e){var o=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach((function(t){o.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)})))},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},e.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,o=t.height;this.size={width:e,height:o},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},e.prototype._getSize=function(){return this.element.getBoundingClientRect()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new Jv(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},e.prototype.legendBox=function(t,e,o){return t&&!1!==t.visible?new om(Object.assign({},{nodes:e},t,{drawingRect:o})).exportVisual().chartElement.box:null},e.prototype.calculateSankey=function(t,e){var o=e.title,i=e.legend,r=e.data,n=e.nodes,s=e.labels,a=e.nodeColors,p=e.disableAutoLayout,l=e.disableKeyboardNavigation,h=e.rtl,c=!p,u=((n.focusHighlight||{}).border||{}).width||0,f=l?0:u/2,g=new xo(0,0,t.width,t.height);g.unpad(f);var y=this.titleBox(o,g),v=g.clone();if(y){var m=y.height();o.position===V?(g.unpad({top:m}),v=new xo(0,m,t.width,t.height)):(g.shrink(0,m),v=new xo(0,0,t.width,t.height-m))}var x=this.legendBox(i,r.nodes,v),_=i&&i.position||om.prototype.options.position;x&&(_===C&&g.unpad({left:x.width()}),_===I&&g.shrink(x.width(),0),_===V&&g.unpad({top:x.height()}),_===d&&g.shrink(0,x.height()));var b=Fv(Object.assign({},t,{offsetX:0,offsetY:0,width:g.width(),height:g.height()})),w=b.nodes,k=b.circularLinks;if(k)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:k},legendBox:x,titleBox:y};var A=new xo,S=w.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),P=w.reduce((function(t,e){return Math.max(t,e.x1)}),0);w.forEach((function(t,e){if(h){var o=t.x0,i=t.x1;t.x0=P-i,t.x1=P-o}var r=Wv(t,n,a,e),p=new Uv(r);A.wrap(Xo(p.exportVisual().rawBBox()));var l=new Kv($v(t,s,h,S,P)).exportVisual();l&&A.wrap(Xo(l.rawBBox()))}));var T=g.x1,M=g.y1,O=g.width()+T,L=g.height()+M;if(O-=A.x2>g.width()?A.x2-g.width():0,L-=A.y2>g.height()?A.y2-g.height():0,T+=A.x1<0?-A.x1:0,M+=A.y1<0?-A.y1:0,!1===c)return{sankey:Fv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})),legendBox:x,titleBox:y};if(this.resize&&c&&this.permutation)return this.resize=!1,{sankey:Fv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y};for(var B=Fv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})).columns.length,E=[],R=function(e,o){var i=function(t){for(var e,o,i,r,n,s,a=0,p=t.length,l=0;l<p;l++)for(var h=t[l],c=l+1;c<p;c++){var u=t[c];o=u,void 0,void 0,void 0,void 0,i=Hv((e=h).x0,e.y0,e.x1,e.y1,o.x1,o.y1),r=Hv(e.x0,e.y0,e.x1,e.y1,o.x0,o.y0),n=Hv(e.x0,e.y0,o.x0,o.y0,o.x1,o.y1),s=Hv(e.x1,e.y1,o.x0,o.y0,o.x1,o.y1),i!==r&&n!==s&&(a+=Math.min(h.value,u.value))}return a}(Fv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,loops:2,targetColumnIndex:e,reverse:o})).links);return E.push({crosses:i,reverse:o,targetColumnIndex:e}),0===i},j=1;j<=B-1&&!R(j,!1)&&!R(j,!0);j++);var z=Math.min.apply(null,E.map((function(t){return t.crosses}))),D=E.find((function(t){return t.crosses===z}));return this.permutation={targetColumnIndex:D.targetColumnIndex,reverse:D.reverse},{sankey:Fv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y}},e.prototype._render=function(t,e){var o=t||this.options,i=e||this,r=o.labels,n=o.nodes,s=o.links,a=o.nodeColors,p=o.title,l=o.legend,h=o.rtl,c=o.disableKeyboardNavigation,u=o.data,d=i.size,f=d.width,g=d.height,y=Object.assign({},u,{width:f,height:g,nodesOptions:n,title:p,legend:l}),v=this.calculateSankey(y,o),m=v.sankey,x=v.titleBox,_=v.legendBox;h&&function(t){var e=t.nodes,o=t.links,i=Math.min.apply(Math,e.map((function(t){return t.x0}))),r=Math.max.apply(Math,e.map((function(t){return t.x1})))-i;e.forEach((function(t){var e=r-(t.x1-2*i),o=r-(t.x0-2*i);t.x0=e,t.x1=o})),o.forEach((function(t){var e=r-(t.x1-2*i),o=r-(t.x0-2*i);t.x1=e,t.x0=o}))}(m);var b=m.nodes,w=m.links,k=m.columns;i.columns=k.map((function(t){var e=t.slice();return e.sort((function(t,e){return t.y0-e.y0})),e}));var A=new q.drawing.Group({clip:q.drawing.Path.fromRect(new q.geometry.Rect([0,0],[f,g]))});if(x){var S=new Jv(Object.assign({},p,{drawingRect:x})).exportVisual();A.append(S)}if(m.circularLinks)return A;var C=new Map;i.nodesVisuals=C;var P={nodes:[],links:[],map:new Map};i.models=P;var T=[];b.forEach((function(t,e){var o=Wv(t,n,a,e);o.root=function(){return i.element},o.navigatable=!0!==c;var r=new Uv(o),s=r.exportVisual();s.links=[],s.type=rm,t.color=o.color,t.opacity=o.opacity,s.dataItem=Object.assign({},u.nodes[e],{color:o.color,opacity:o.opacity,sourceLinks:t.sourceLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})),targetLinks:t.targetLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}))}),C.set(t.id,s),P.nodes.push(r),P.map.set(t.id,r),A.append(s),r.createFocusHighlight(),r._highlight&&T.push(r._highlight)}));var M=w.slice().sort((function(t,e){return e.value-t.value})),O=[];i.linksVisuals=O,M.forEach((function(t){var e=t.source,o=t.target,r=C.get(e.id),n=C.get(o.id),a=function(t,e,o,i){var r=at({},e,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight});return"source"===r.colorType?r.color=o.options.fill.color:"target"===r.colorType&&(r.color=i.options.fill.color),r}(t,s,r,n);a.root=function(){return i.element},a.navigatable=!0!==c,a.rtl=h;var p=new Yv(a),l=p.exportVisual();l.type=im,l.dataItem={source:Object.assign({},r.dataItem),target:Object.assign({},n.dataItem),value:t.value},l.linkOptions=a,O.push(l),r.links.push(l),n.links.push(l),P.links.push(p),P.map.set(e.id+"-"+o.id,p),p.createFocusHighlight(),p._highlight&&T.push(p._highlight),A.append(l)}));var L=b.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),I=b.reduce((function(t,e){return Math.max(t,e.x1)}),0);if(b.forEach((function(t){var e=$v(t,r,h,L,I),o=new Kv(e).exportVisual();o&&A.append(o)})),_){var B=new om(Object.assign({},l,{rtl:h,drawingRect:_,nodes:b})).exportVisual();A.append(B)}if(0!==T.length){var E=new q.drawing.Group;E.append.apply(E,T),A.append(E)}return A},e.prototype.exportVisual=function(t){var e=t&&t.options?at({},this.options,t.options):this.options,o={size:{width:zt(t&&t.width)?t.width:this.size.width,height:zt(t&&t.height)?t.height:this.size.height}};return this._render(e,o)},e.prototype._setOptions=function(t){this.options=at({},this.options,t)},e}(Ue),sm={opacity:1,width:2,color:u};te(nm,{title:{position:V},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},sm)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},sm)},labels:{ariaTemplate:function(t){var e=t.link;return e.source.label.text+" to "+e.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var am=function(t,e,o){var i=new Set,r=new Map,n=new Map;t.forEach((function(t){e.forEach((function(e){i.add(e.value(t))}));for(var s=0;s<e.length-1;s++){var a=e[s].value(t),p=e[s+1].value(t),l=a+"_"+p,h=o.value(t),c=r.get(l);void 0!==c?r.set(l,c+h):(r.set(l,h),n.set(l,{source:a,target:p}))}}));var s=new Map,a=Array.from(i).map((function(t,e){return s.set(t,e),{id:e,label:{text:String(t)}}})),p=Array.from(r).map((function(t){var e=t[0],o=t[1],i=n.get(e),r=i.source,a=i.target;return{sourceId:s.get(r),targetId:s.get(a),value:o}}));return{nodes:a,links:p}},pm=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),lm="12px",hm="16px",cm=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],um=cm[0].value,dm="line",fm="scatter",gm=["column","bar",dm,fm],ym={type:dm,width:0};function vm(t){return t&&gm.includes(t)}var mm=["string","date","number"],xm=["number"],_m={bar:[{axisType:"category",types:mm},{axisType:"value",types:xm}],column:[{axisType:"category",types:mm},{axisType:"value",types:xm}],line:[{axisType:"category",types:mm},{axisType:"value",types:xm}],pie:[{axisType:"category",types:mm},{axisType:"value",types:xm,count:1}],scatter:[{axisType:"category",types:mm},{axisType:"value",types:xm}]};function bm(t,e){return((e||"")+" "+(t||"")).trim()}function wm(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}var km=function(t,e,o){var i=wm(o).size;return t?bm(t,i||e):""},Am=function(t,e,o){var i=wm(o).name;return t?bm(i||e,t):""},Sm=function(t){return null!=t},Cm=function(t){var e=structuredClone(t[0]);return e.forEach((function(e,o){if(!Sm(e.value))for(var i=0;i<t.length;i++){var r=t[i][o].value;if(Sm(r)){e.value=r;break}}})),e},Pm=function(t,e){var o=[],i=Cm(t);e.types.forEach((function(t){i.forEach((function(e,i){typeof e.value===t&&o.push(i)}))}));var r=o.findIndex((function(e){var o=t.map((function(t){return t[e].value}));return new Set(o).size===o.length}));return Math.max(r,0)},Tm=function(t,e){var o=[],i=Cm(t);return e.forEach((function(t){t.types.forEach((function(t){i.forEach((function(e,i){typeof e.value===t&&o.push(i)}))}))})),o},Mm=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})},Om=function(t,e,o){var i=Mm();i.seriesType=e,i.data=t||[],i.legend={visible:!0,position:"bottom"};var r=_m[e];if(!r||!t.length)return i;var n=t[0].slice();i.columns=t[0].map((function(t){return String(t.field)}));var s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=o&&o.categoryAxis?i.columns.indexOf(o.categoryAxis):Pm(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=Tm(t,p);l.includes(a)&&(l.length>1?l=l.filter((function(t){return t!==a})):a=-1);var h=[];l.forEach((function(o){var i=n[o],r=[];t.forEach((function(t){r.push(t[o].value)})),h.push(Object.assign({},{name:i.field,type:e,data:r,stack:!1,labels:{visible:!1}},e===fm?ym:{}))}));var c=a>-1?t.map((function(t){return String(Sm(t[a].value)?t[a].value:" ")})):[];return h.length&&(i.series=h.map((function(t,e){return Object.assign({},t,{id:e})})),i.initialSeries=structuredClone(i.series)),i.categoryAxis=[{categories:c,labels:{visible:!0,rotation:"auto"}}],i.categoryField=i.columns[a],i},Lm=function(t,e,o){var i=Mm();i.seriesType=e,i.data=t||[];var r=_m[e];if(!r||!t.length)return i;var n=t[0].map((function(t){return t.field})),s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=o&&o.categoryAxis?n.indexOf(o.categoryAxis):Pm(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=[];(l=o&&o.valueAxis?[n.indexOf(o.valueAxis)]:Tm(t,p)).includes(a)&&l.length>1&&(l=l.filter((function(t){return t!==a}))),"number"==typeof p[0].count&&(l=l.slice(0,p[0].count));var h=a>-1?t.map((function(t){return String(t[a].value)})):[],c=[];return t.forEach((function(t){var e={};l.forEach((function(o){var i=t[o];e[i.field]=i.value||0,e[t[a].field]=t[a].value||" "})),c.push(e)})),i.columns=n,i.categoryAxis=[{categories:h,title:{text:""}}],i.series=[{id:0,data:c,type:e,name:n[a],labels:{visible:!0},categoryField:n[a],field:n[l[0]]}],i.categoryField=n[a],i.valueField=n[l[0]],i.initialSeries=structuredClone(i.series),i};function Im(t,e){return(vm(e)?Om:Lm)(t,e)}function Bm(t,e){var o=structuredClone(e);if(o.legend=t.legend,o.area=t.area,o.title=t.title,o.subtitle=t.subtitle,o.series.length===t.series.length)for(var i=0;i<o.series.length;i++)o.series[i].color=t.series[i].color,o.series[i].labels=t.series[i].labels;return t.series.every((function(t){return t.labels&&t.labels.visible}))&&vm(o.seriesType)&&vm(t.seriesType)&&o.series.forEach((function(t){t.labels=t.labels||{},t.labels.visible=!0})),o}function Em(t,e,o){var i=Object.assign({},t);switch(e){case pm.seriesType:return Im(i.data,o);case pm.stacked:return i.series=i.series.map((function(t){return Object.assign({},t,{stack:o})})),i.stack=o,i;case pm.categoryAxisX:return i.seriesType&&vm(i.seriesType)?Bm(i,Om(i.data,i.seriesType,{categoryAxis:o})):"pie"===i.seriesType?Bm(i,Lm(i.data,i.seriesType,{categoryAxis:o})):i;case pm.valueAxisY:return"pie"===i.seriesType?Bm(i,Lm(i.data,i.seriesType,{categoryAxis:i.categoryField,valueAxis:o})):i;case pm.seriesChange:return i.series=o,i;case pm.areaMarginLeft:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{left:o})}),i;case pm.areaMarginRight:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{right:o})}),i;case pm.areaMarginTop:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{top:o})}),i;case pm.areaMarginBottom:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{bottom:o})}),i;case pm.areaBackground:return i.area=Object.assign({},i.area,{background:o}),i;case pm.titleText:return i.title=Object.assign({},i.title,{text:o}),i;case pm.titleFontName:return i.title=Object.assign({},i.title,{font:km(o,"20px",i.title&&i.title.font)}),i;case pm.titleFontSize:return i.title=Object.assign({},i.title,{font:Am(o,um,i.title&&i.title.font)}),i;case pm.titleColor:return i.title=Object.assign({},i.title,{color:o}),i;case pm.subtitleText:return i.subtitle=Object.assign({},i.subtitle,{text:o}),i;case pm.subtitleFontName:return i.subtitle=Object.assign({},i.subtitle,{font:km(o,"16px",i.subtitle&&i.subtitle.font)}),i;case pm.subtitleFontSize:return i.subtitle=Object.assign({},i.subtitle,{font:Am(o,um,i.subtitle&&i.subtitle.font)}),i;case pm.subtitleColor:return i.subtitle=Object.assign({},i.subtitle,{color:o}),i;case pm.seriesColor:return i.series=i.series.map((function(t){return Object.assign({},t,{color:o.seriesName===t.name?o.color:t.color})})),i;case pm.seriesLabel:return i.series=i.series.map((function(t){return o.all||o.seriesName===t.name?Object.assign({},t,{labels:{visible:o.visible}}):t})),i;case pm.legendVisible:return i.legend=Object.assign({},i.legend,{visible:o}),i;case pm.legendFontName:var r=i.legend||{};return i.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:km(o,lm,r.labels&&r.labels.font)})}),i;case pm.legendFontSize:var n=i.legend||{};return i.legend=Object.assign({},n,{labels:Object.assign({},n.labels,{font:Am(o,um,n.labels&&n.labels.font)})}),i;case pm.legendColor:var s=i.legend||{};return i.legend=Object.assign({},s,{labels:Object.assign({},s.labels,{color:o})}),i;case pm.legendPosition:return i.legend=Object.assign({},i.legend,{position:o}),i;case pm.categoryAxisTitleText:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:o})})})),i;case pm.categoryAxisTitleFontName:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:km(o,hm,t.title&&t.title.font)})})})),i;case pm.categoryAxisTitleFontSize:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Am(o,um,t.title&&t.title.font)})})})),i;case pm.categoryAxisTitleColor:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:o})})})),i;case pm.categoryAxisLabelsFontName:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:km(o,lm,t.labels&&t.labels.font)})})})),i;case pm.categoryAxisLabelsFontSize:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Am(o,um,t.labels&&t.labels.font)})})})),i;case pm.categoryAxisLabelsColor:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:o})})})),i;case pm.categoryAxisLabelsRotation:var a=Sm(o)?o:"auto";return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:a})})})),i;case pm.categoryAxisReverseOrder:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{reverse:o})})),i;case pm.valueAxisTitleText:return i.valueAxis&&0!==i.valueAxis.length?i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:o})})})):i.valueAxis=[{title:{text:o}}],i;case pm.valueAxisTitleFontName:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:km(o,hm,t.title&&t.title.font)})})})),i;case pm.valueAxisTitleFontSize:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Am(o,um,t.title&&t.title.font)})})})),i;case pm.valueAxisTitleColor:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:o})})})),i;case pm.valueAxisLabelsFormat:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:o})})})),i;case pm.valueAxisLabelsFontName:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:km(o,lm,t.labels&&t.labels.font)})})})),i;case pm.valueAxisLabelsFontSize:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Am(o,um,t.labels&&t.labels.font)})})})),i;case pm.valueAxisLabelsColor:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:o})})})),i;case pm.valueAxisLabelsRotation:var p=Sm(o)?o:"auto";return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:p})})})),i;default:return i}}var Rm=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),Vm=Object.freeze({getWizardDataFromDataRows:function(t){var e=[];return t.forEach((function(t){var o=t.dataItem,i=t.dataColumns,r=[];i.forEach((function(t){r.push({field:t.title||t.field,value:bt(t.field)(o)})})),e.push(r)})),e},ActionTypes:pm,createInitialState:function(t,e,o){var i=Im(t,o&&o.seriesType||e);return void 0!==(o&&o.stack)?Em(i,pm.stacked,o.stack):i},createState:Im,fontNames:cm,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:vm,mergeStates:Bm,parseFont:wm,updateState:Em,messages:Rm}),jm=1.5,zm=.4,Dm="#000",Fm="Arial, Helvetica, sans-serif",Hm="11px "+Fm,Nm="12px "+Fm,Um="16px "+Fm,Gm="transparent",Wm="#fff",Xm={type:Pn},Ym={type:gn},qm=Object.assign({},Ym,{markers:{visible:!1},highlight:{visible:!1}}),Zm=function(){return{icon:{border:{width:1}},label:{font:Nm,padding:3},line:{length:10,width:2},legendItem:qm,visible:!0}},Qm=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Ym,opacity:.4}},Km=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Ym,opacity:.4}},$m=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Wm,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},legendItem:qm}},Jm=function(){return{gap:jm,spacing:zm,target:{color:"#ff0000"},legendItem:qm}},tx=function(){return{width:2,legendItem:Xm}},ex=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Ym,opacity:.5}},ox=function(){return{markers:{visible:!1},legendItem:Xm,width:2}},ix=function(){return{gap:.5,line:{color:Dm,width:1},legendItem:qm,spacing:zm}},rx=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:qm}},nx=rx,sx=function(t){return Object.assign({color:S,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:Xm},t)},ax=function(t){return{visible:!0,labels:{font:Hm},overlay:t.gradients?{}:{gradient:"none"},area:Qm(),rangeArea:Km(),verticalRangeArea:Km(),bar:{gap:jm,spacing:zm,legendItem:qm},boxPlot:$m(),bubble:{border:{width:0},labels:{background:Gm},legendItem:qm,opacity:.6},bullet:Jm(),candlestick:{border:{_brightness:.8,width:1},downColor:Wm,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Dm,width:1},legendItem:qm,spacing:.3},column:{gap:jm,spacing:zm,legendItem:qm},heatmap:{labels:{color:"",background:Gm,visible:!0},highlight:{border:{width:0}},legendItem:qm},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:qm},donut:{margin:1,legendItem:qm},funnel:rx(),pyramid:nx(),horizontalWaterfall:ix(),line:tx(),notes:Zm(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:qm,spacing:.3},radarArea:ex(),radarLine:ox(),radarColumn:{legendItem:qm},polarArea:ex(),polarLine:ox(),polarScatter:{legendItem:Xm},rangeBar:{gap:jm,spacing:zm,legendItem:qm},rangeColumn:{gap:jm,spacing:zm,legendItem:qm},scatter:{legendItem:Xm},scatterLine:{width:1,legendItem:Xm},verticalArea:Qm(),verticalBoxPlot:$m(),verticalBullet:Jm(),verticalLine:tx(),waterfall:ix(),linearTrendline:sx(),exponentialTrendline:sx({style:"smooth"}),logarithmicTrendline:sx({style:"smooth"}),polynomialTrendline:sx({style:"smooth"}),powerTrendline:sx({style:"smooth"}),movingAverageTrendline:sx()}},px=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Nm},notes:Zm(),title:{font:Um,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:ax(t),title:{font:Um},subtitle:{font:Nm},legend:{labels:{font:Nm}}}},lx="--kendo-chart-series-",hx=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},cx={},ux=function(t,e){var o=hx(t).getPropertyValue(e);return/^color-mix/i.test(o)&&(o=function(t,e){if(cx[t])return cx[t];var o=e.style.color;e.style.color=t;var i=hx(e).color;return e.style.color=o,cx[t]=i,i}(o,t)),o},dx=function(t,e){return parseFloat(hx(t).getPropertyValue(e))},fx=function(t,e,o,i){var r=hx(t);return[r.getPropertyValue(e),r.getPropertyValue(o),r.getPropertyValue(i)||r.fontFamily].join(" ")},gx=function(t){for(var e=hx(t),o=[],i=1,r=e.getPropertyValue(""+lx+i);r||i<=30;)o.push(r),i++,r=e.getPropertyValue(""+lx+i);return o},yx=function(t){return fx(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family")},vx=function(t){return fx(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")},mx=function(t){return ux(t,"--kendo-chart-text")},xx=function(t){return{color:mx(t),font:fx(t,"--kendo-font-weight","--kendo-chart-title-font-size","--kendo-font-family")}},_x=function(t){var e=mx(t);return{labels:{color:e,font:yx(t)},title:{color:e}}},bx=function(t){var e=ux(t,"--kendo-chart-inactive");return Object.assign({},{inactiveItems:{labels:{color:e},markers:{color:e}}},_x(t))},wx=function(t){var e=mx(t);return{pointer:{color:ux(t,"--kendo-chart-gauge-pointer")},scale:{labels:{color:e},rangePlaceholderColor:ux(t,"--kendo-chart-gauge-track"),minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}}},kx=function(t){return{labels:{color:mx(t),font:yx(t),stroke:{color:ux(t,"--kendo-chart-bg")}},links:{color:ux(t,"--kendo-color-subtle")},nodeColors:gx(t),title:xx(t),legend:_x(t)}},Ax=function(t){var e=ux(t,"--kendo-chart-major-lines"),o=ux(t,"--kendo-chart-text"),i=fx(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family"),r=ux(t,"--kendo-chart-bg"),n=function(t){return{icon:{background:ux(t,"--kendo-chart-notes-bg"),border:{color:ux(t,"--kendo-chart-notes-border")}},line:{color:ux(t,"--kendo-chart-notes-lines")},label:{font:yx(t)}}}(t),s=dx(t,"--kendo-chart-area-opacity"),a=ux(t,"--kendo-color-surface"),p=ux(t,"--kendo-chart-primary-bg"),l=function(){return{downColor:e,mean:{color:a},median:{color:a},whiskers:{color:p}}},h=function(){return{line:{color:e}}},c=function(){return{opacity:s,highlight:{inactiveOpacity:dx(t,"--kendo-chart-area-inactive-opacity")}}},u=function(){return{highlight:{inactiveOpacity:dx(t,"--kendo-chart-line-inactive-opacity")}}},d=function(){return{target:{color:o}}};return{axisDefaults:{crosshair:{color:ux(t,"--kendo-chart-crosshair-bg")},labels:{color:o,font:i},line:{color:e},majorGridLines:{color:e},minorGridLines:{color:ux(t,"--kendo-chart-minor-lines")},notes:structuredClone(n),title:{color:o,font:yx(t)}},chartArea:{background:r},legend:bx(t),seriesColors:gx(t),seriesDefaults:{area:c(),verticalArea:c(),radarArea:c(),boxPlot:l(),verticalBoxPlot:l(),bullet:d(),verticalBullet:d(),horizontalWaterfall:h(),waterfall:h(),line:u(),verticalLine:u(),candlestick:{downColor:o,line:{color:o}},errorBars:{color:ux(t,"--kendo-chart-error-bars-bg")},icon:{border:{color:e}},labels:{background:r,color:o,font:i,opacity:s},notes:structuredClone(n)},subtitle:{color:o,font:vx(t)},title:xx(t),paneDefaults:{title:{font:vx(t)}}}};return r})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e(require("@progress/kendo-drawing")):t.KendoCharts=e(t.KendoDrawing)}(self,(t=>(()=>{"use strict";var e={721:e=>{e.exports=t}},o={};function i(t){var r=o[t];if(void 0!==r)return r.exports;var n=o[t]={exports:{}};return e[t](n,n.exports,i),n.exports}i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};i.r(r),i.d(r,{Aggregates:()=>Yr,ArcGauge:()=>Nd,ArcScale:()=>Vd,AreaChart:()=>Oa,AreaSegment:()=>Aa,ArrowLinearPointer:()=>ad,Axis:()=>bi,AxisGroupRangeTracker:()=>Ba,AxisLabel:()=>ti,Bar:()=>ja,BarChart:()=>Wa,BarLabel:()=>Ea,BarLinearPointer:()=>dd,Barcode:()=>If,Box:()=>xo,BoxElement:()=>Bo,BoxPlot:()=>Ka,BoxPlotChart:()=>ep,BubbleChart:()=>lp,Bullet:()=>dp,BulletChart:()=>gp,Candlestick:()=>Ya,CandlestickChart:()=>Za,CategoricalChart:()=>ea,CategoricalErrorBar:()=>Bs,CategoricalPlotArea:()=>Sl,CategoryAxis:()=>er,Chart:()=>iu,ChartAxis:()=>Fr,ChartContainer:()=>kp,ChartElement:()=>To,ChartPane:()=>Ur,ChartPlotArea:()=>Gr,ChartService:()=>fi,ChartWizardCommon:()=>jm,CircularGauge:()=>Gd,Class:()=>q.Class,ClipAnimation:()=>xa,ClusterLayout:()=>Ha,Crosshair:()=>bp,CrosshairTooltip:()=>xp,CurveProcessor:()=>zr,DateCategoryAxis:()=>hr,DateValueAxis:()=>xr,DefaultAggregates:()=>Fp,DomEventsBuilder:()=>vi,DonutChart:()=>zh,DonutPlotArea:()=>Fh,DonutSegment:()=>Vh,ErrorBarBase:()=>Os,ErrorRangeCalculator:()=>tn,Extent:()=>Sy,FloatElement:()=>No,FontLoader:()=>Jt,FormatService:()=>ci,Gauge:()=>Gu,Gradients:()=>jo,HashMap:()=>St,Highlight:()=>Tl,InstanceObserver:()=>Ot,IntlService:()=>ai,Legend:()=>$l,LegendItem:()=>Zl,LegendLayout:()=>zl,LineChart:()=>wa,LinePoint:()=>sa,LineSegment:()=>pa,LinearGauge:()=>yd,LinearPointer:()=>ed,LinearScale:()=>Ku,Location:()=>Gg,LogarithmicAxis:()=>Ar,Map:()=>Bv,Matrix:()=>Ce,MousewheelZoom:()=>Vl,Navigator:()=>bu,NavigatorHint:()=>gu,Note:()=>oi,NumericAxis:()=>vr,OHLCChart:()=>al,OHLCPoint:()=>nl,Observable:()=>Ue,Pane:()=>Cp,Pannable:()=>Bl,PieAnimation:()=>dh,PieChart:()=>Bh,PieChartMixin:()=>Mh,PiePlotArea:()=>Eh,PieSegment:()=>Ph,PlotAreaBase:()=>Ip,PlotAreaEventsMixin:()=>Rp,PlotAreaFactory:()=>th,Point:()=>yo,PointEventsMixin:()=>ia,PolarAxis:()=>Mr,QRCode:()=>Ig,RadarCategoryAxis:()=>Pr,RadarLogarithmicAxis:()=>Vr,RadarNumericAxis:()=>Er,RadialGauge:()=>Ed,RadialPointer:()=>Ld,RadialScale:()=>Ad,RangeAreaChart:()=>il,RangeAreaPoint:()=>Zp,RangeBar:()=>Np,RangeBarChart:()=>Gp,RangePointer:()=>Fd,Ring:()=>wo,RootElement:()=>Fo,Sankey:()=>sm,ScatterChart:()=>np,ScatterErrorBar:()=>ip,ScatterLineChart:()=>gh,Sector:()=>Ao,Selection:()=>rh,SeriesAggregator:()=>zp,SeriesBinder:()=>Qr,ShapeBuilder:()=>Co,ShapeElement:()=>Ro,SharedTooltip:()=>ph,Sparkline:()=>cu,SplineAreaSegment:()=>Ta,SplineSegment:()=>ga,StackWrap:()=>Ua,StockChart:()=>ku,TemplateService:()=>yt,Text:()=>Wo,TextBox:()=>Zo,Title:()=>$o,Tooltip:()=>sh,UserEvents:()=>fo,WaterfallChart:()=>cl,WaterfallSegment:()=>ll,XYPlotArea:()=>kh,ZoomSelection:()=>El,addClass:()=>W,alignPathToPixel:()=>Z,anyHasZIndex:()=>Is,append:()=>Vt,appendIfNotNull:()=>Es,applyEventMap:()=>Me,areNumbers:()=>Rs,autoMajorUnit:()=>go,autoTextColor:()=>fe,barcodeValidator:()=>Rf,bindEvents:()=>jt,bindSegments:()=>js,categoriesCount:()=>zs,chartBaseTheme:()=>lx,chartTheme:()=>Sx,clockwise:()=>Q,constants:()=>n,convertableToNumber:()=>J,countNumbers:()=>Wr,createHashSet:()=>be,createOutOfRangePoints:()=>$s,createPatternFill:()=>Oo,createSankeyData:()=>pm,cycleDown:()=>et,cycleIndex:()=>ot,cycleUp:()=>tt,deepExtend:()=>at,defaultErrorHandler:()=>we,defined:()=>zt,deg:()=>Dt,elementOffset:()=>Ft,elementScale:()=>de,elementSize:()=>Ht,elementStyles:()=>ut,equalsIgnoreCase:()=>Ds,evalOptions:()=>Hs,eventCoordinates:()=>Nt,eventElement:()=>Ut,eventMap:()=>Pe,filterSeriesByType:()=>Ns,find:()=>le,findAxisByName:()=>Hr,gaugeTheme:()=>kx,getAriaTemplate:()=>mt,getField:()=>qr,getSpacing:()=>dt,getSupportedFeatures:()=>Re,getTemplate:()=>vt,getter:()=>bt,grep:()=>wt,hasClasses:()=>kt,hasGradientOverlay:()=>Ws,hasOwnProperty:()=>Ae,hasValue:()=>Xs,hashKey:()=>Gt,inArray:()=>Ct,interpolateValue:()=>Pt,isArray:()=>G,isDateAxis:()=>Ys,isFunction:()=>it,isNumber:()=>K,isObject:()=>pt,isPlainObject:()=>Lt,isString:()=>$,keys:()=>ke,last:()=>Wt,limitValue:()=>Xt,logToConsole:()=>q.logToConsole,map:()=>Bt,mousewheelDelta:()=>Et,noop:()=>je,now:()=>ze,objectKey:()=>Yt,off:()=>Ee,on:()=>Ie,parseDateCategory:()=>Gs,qrcodeValidator:()=>Eg,rad:()=>qt,rectToBox:()=>Xo,removeClass:()=>Y,renderIcon:()=>ae,round:()=>Zt,sankeyTheme:()=>Ax,segmentVisible:()=>Vs,setDefaultOptions:()=>te,singleItemOrArray:()=>qs,sparseArrayLimits:()=>pe,styleValue:()=>lt,unbindEvents:()=>Qt,unclipBox:()=>Js,valueOrDefault:()=>Kt});var n={};i.r(n),i.d(n,{DEFAULT_PANE:()=>mu,NAVIGATOR_AXIS:()=>vu,NAVIGATOR_PANE:()=>yu});var s="arc",a="ArrowUp",p="ArrowDown",l="ArrowLeft",h="ArrowRight",c="aria-activedescendant",u="#000",d="bottom",f="center",g="circle",y=3,v="cross",m="date",x="12px sans-serif",_=10,b="end",w=/\{\d+:?/,k="height",A="inside",S="inherit",C="left",P=Number.MAX_VALUE,T=-Number.MAX_VALUE,M="none",O="object",L="outside",B="right",I="roundedRect",E="start",R="string",V="top",j="value",z="#fff",D="width",F="x",H="y",N="pointer",U="horizontal";function G(t){return Array.isArray(t)}function W(t,e){for(var o=G(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var X=/\s+/g;function Y(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(X," "))}var q=i(721);function Z(t){var e=.5;t.options.stroke&&q.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 Q(t,e){return-t.x*e.y+t.y*e.x<0}function K(t){return"number"==typeof t&&!isNaN(t)}function $(t){return typeof t===R}function J(t){return K(t)||$(t)&&isFinite(t)}function tt(t,e){return(t+1)%e}function et(t,e){var o=t-1;return o<0?e-1:o}function ot(t,e){return 1===e||t%e==0?0:t<0?e+t%e:t>=e?t%e:t}function it(t){return"function"==typeof t}var rt="object",nt="undefined";function st(t,e){for(var o in e)if("__proto__"!==o&&"constructor"!==o){var i,r=e[o],n=typeof r;if((i=n===rt&&null!==r?r.constructor:null)&&i!==Array)if(r instanceof Date)t[o]=new Date(r.getTime());else if(it(r.clone))t[o]=r.clone();else{var s=t[o];t[o]=typeof s===rt&&s||{},st(t[o],r)}else n!==nt&&(t[o]=r)}return t}function at(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)st(t,e[i]);return t}function pt(t){return"object"==typeof t}function lt(t){return K(t)?t+"px":t}var ht=/width|height|top|left|bottom|right/i;function ct(t){return ht.test(t)}function ut(t,e){var o=$(e)?[e]:e;if(G(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=ct(s)?parseFloat(r[s]):r[s]}return i}if(pt(e))for(var a in e)t.style[a]=lt(e[a])}function dt(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[V]=o[B]=o[d]=o[C]=t:(o[V]=t[V]||e,o[B]=t[B]||e,o[d]=t[d]||e,o[C]=t[C]||e),o}var ft={compile:function(t){return t}},gt=function(){};gt.register=function(t){ft=t},gt.compile=function(t,e){return ft.compile(t,e)};const yt=gt;function vt(t){var e;return void 0===t&&(t={}),t.template?t.template=e=yt.compile(t.template):it(t.content)&&(e=t.content),e}function mt(t){var e;return void 0===t&&(t={}),t.ariaTemplate?t.ariaTemplate=e=yt.compile(t.ariaTemplate):it(t.ariaContent)&&(e=t.ariaContent),e}var xt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,_t={};function bt(t){if(_t[t])return _t[t];var e=[];return t.replace(xt,(function(t,o,i,r){e.push(q.drawing.util.defined(o)?o:i||r)})),_t[t]=function(t){for(var o=t,i=0;i<e.length&&o;i++)o=o[e[i]];return o},_t[t]}function wt(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function kt(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(t.className.indexOf&&-1!==t.className.indexOf(o[i]))return!0}_t[void 0]=function(t){return t};var At=function(){this._map=new Map};At.prototype.get=function(t){return this._map.get(t)},At.prototype.set=function(t,e){this._map.set(t,e)};const St=At;function Ct(t,e){if(e)return-1!==e.indexOf(t)}function Pt(t,e,o){return q.drawing.util.round(t+(e-t)*o,y)}var Tt="trigger",Mt=function(t,e){this.observer=t,this.handlerMap=at({},this.handlerMap,e)};Mt.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i[Tt]&&(o=this.callObserver(Tt,t,e)),o},Mt.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},Mt.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};const Ot=Mt;function Lt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Bt(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);q.drawing.util.defined(n)&&i.push(n)}return i}var It=q.support.browser||{};function Et(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,It.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e>0?Math.ceil(e):Math.floor(e)}var Rt=q.drawing.util,Vt=Rt.append,jt=Rt.bindEvents,zt=Rt.defined,Dt=Rt.deg,Ft=Rt.elementOffset,Ht=Rt.elementSize,Nt=Rt.eventCoordinates,Ut=Rt.eventElement,Gt=Rt.hashKey,Wt=Rt.last,Xt=Rt.limitValue,Yt=Rt.objectKey,qt=Rt.rad,Zt=Rt.round,Qt=Rt.unbindEvents,Kt=Rt.valueOrDefault,$t=function(){};$t.fetchFonts=function(t,e,o){void 0===o&&(o={depth:0}),!t||o.depth>5||!document.fonts||Object.keys(t).forEach((function(i){var r=t[i];"dataSource"!==i&&"$"!==i[0]&&r&&("font"===i?e.push(r):"object"==typeof r&&(o.depth++,$t.fetchFonts(r,e,o),o.depth--))}))},$t.loadFonts=function(t,e){var o=[];if(t.length>0&&document.fonts){try{o=t.map((function(t){return document.fonts.load(t)}))}catch(t){(0,q.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},$t.preloadFonts=function(t,e){var o=[];$t.fetchFonts(t,o),$t.loadFonts(o,e)};const Jt=$t;function te(t,e){var o=t.prototype;o.options?o.options=at({},o.options,e):o.options=e}var ee="k-i-",oe="k-svg-i-",ie=function(t,e){this.element=t,this.options=at({},this.options,e),this.wrapper()};ie.prototype.wrapper=function(){this.addClasses()},ie.prototype.addClasses=function(){},ie.prototype.html=function(){return this.element.outerHTML},te(ie,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]});var re=function(t){function e(e,o){t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.element.className.split(" ").find((function(t){return t.startsWith(ee)})),o=this.options.icon?""+(this.options.icon.startsWith(ee)?"":ee)+this.options.icon:"";this._className=o,W(this.element,"k-icon"),W(this.element,"k-font-icon"),Y(this.element,e),W(this.element,o),W(this.element,this.options.iconClass||""),t.prototype.wrapper.call(this)},e}(ie);te(re,{name:"HTMLFontIcon",icon:null});var ne=function(t){function e(e,o){e.innerHTML="",t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.options.icon,o=this.options.iconClass,i=this.element.className.split(" ").find((function(t){return t.startsWith(oe)}));if(!e&&o){var r=o.match(/k-i-(\w+(?:-\w+)*)/);r&&(e=r[1],o=o.replace(r[0],""))}$(e)&&(e=e.replace("k-i-","").replace(/-./g,(function(t){return t[1].toUpperCase()})),e=this.options.svgIcons[e]||this.options.svgIcons[e+"Icon"]);var n=e&&e.name?""+oe+e.name:"";if(this._className=n,W(this.element,"k-svg-icon"),Y(this.element,i),W(this.element,n),W(this.element,o||""),this.element.setAttribute("aria-hidden","true"),e&&Lt(e)){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("viewBox",e.viewBox||""),s.setAttribute("focusable","false"),s.innerHTML=e.content||"",this.element.appendChild(s)}t.prototype.wrapper.call(this)},e}(ie);te(ne,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var se={svg:ne,font:re};function ae(t,e){var o=t,i=e;return o&&(!pt(o)||o instanceof HTMLElement)&&!$(o)||(i=o,o=document.createElement("span")),$(i)&&(i={icon:i}),i.type||(i.type="svg"),se[i.type]?new se[i.type](o,i).html():null}function pe(t){for(var e=P,o=T,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===P?void 0:e,max:o===T?void 0:o}}function le(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var he=q.geometry.Matrix,ce=/matrix\((.*)\)/;function ue(t){var e=getComputedStyle(t).transform;return"none"===e?he.unit():function(t){var e=t.match(ce);if(null===e||2!==e.length)return he.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(he,[null].concat(o)))}(e)}function de(t){if(!t)return he.unit();for(var e=ue(t),o=t.parentElement;o;){var i=ue(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}const fe=function(t){return new q.Color(t).isDark()?z:u};var ge={},ye=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},ve={size:{configurable:!0}};ye.prototype.values=function(){return this._values.filter((function(t){return t!==ge}))},ye.prototype.has=function(t){return void 0!==this._index[t]},ye.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},ye.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=ge,delete this._index[t])},ye.prototype.clear=function(){this._index={},this._values=[]},ve.size.get=function(){return this._values.length},Object.defineProperties(ye.prototype,ve);var me=function(t){this._set=new Set(t)},xe={size:{configurable:!0}};me.prototype.values=function(){return Array.from(this._set)},me.prototype.has=function(t){return this._set.has(t)},me.prototype.add=function(t){this._set.add(t)},me.prototype.delete=function(t){this._set.delete(t)},me.prototype.clear=function(){this._set.clear()},xe.size.get=function(){return this._set.size},Object.defineProperties(me.prototype,xe);var _e=function(){var t=!1;return"function"==typeof Set&&(t=new Set([1]).has(1)),t};function be(t){return _e()?new me(t):new ye(t)}function we(t){throw t}const ke={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Ae(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Se=function(){this.height=0,this.width=0,this.data=[]};Se.prototype.clone=function(){var t=new Se;return t.height=this.height,t.width=this.width,t.data=this.data.map((function(t){return t.slice()})),t},Se.prototype.get=function(t,e){var o=this.data[t];return o?o[e]:null},Se.prototype.set=function(t,e,o){var i=this.data[t];null==i&&(i=this.data[t]=[]),i[e]=o,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Se.prototype.each=function(t,e){for(var o=0;o<this.height;++o)for(var i=0;i<this.width;++i){var r=this.get(o,i);if((e||null!=r)&&void 0!==(r=t(r,o,i)))return r}},Se.prototype.map=function(t,e){var o=new Se;return this.each((function(e,i,r){o.set(i,r,t(e,i,r))}),e),o},Se.prototype.transpose=function(){var t=new Se;return this.each((function(e,o,i){t.set(i,o,e)})),t},Se.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),o=t;--o>=0;)for(var i=e[o]=new Array(t),r=t;--r>=0;)i[r]=o===r?1:0;return this},Se.prototype.multiply=function(t){for(var e=this,o=new Se,i=0;i<e.height;++i)for(var r=0;r<t.width;++r){for(var n=0,s=0;s<e.width;++s){var a=e.get(i,s),p=t.get(s,r);"number"==typeof a&&"number"==typeof p&&(n+=a*p)}o.set(i,r,n)}return o},Se.prototype.inverse=function(){for(var t=this.width,e=this.augment((new Se).unit(t)),o=e.data,i=function(e){var i=function(t,e,o){for(var i=o(t),r=t,n=t+1;n<e;n++){var s=o(t);s>i&&(i=s,r=t)}return r}(e,t,(function(t){return o[t][e]}));if(!o[i][e])return{v:null};if(e!==i){var r=o[e];o[e]=o[i],o[i]=r}for(var n=e+1;n<t;++n){for(var s=e+1;s<2*t;++s)o[n][s]-=o[e][s]*o[n][e]/o[e][e];o[n][e]=0}},r=0;r<t;++r){var n=i(r);if(n)return n.v}for(var s=0;s<t;++s)for(var a=o[s][s],p=0;p<2*t;++p)o[s][p]/=a;for(var l=t;--l>=0;)for(var h=l;--h>=0;)if(o[h][l])for(var c=2*t;--c>=t;)o[h][c]-=o[l][c]*o[h][l];return e.slice(0,t,t,t)},Se.prototype.augment=function(t){var e=this.clone(),o=e.width;return t.each((function(t,i,r){e.set(i,r+o,t)})),e},Se.prototype.slice=function(t,e,o,i){for(var r=new Se,n=0;n<o;++n)for(var s=0;s<i;++s)r.set(n,s,this.get(t+n,e+s));return r};const Ce=Se;var Pe={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function Te(t){return Pe[t]||t}var Me=function(t){return t.replace(/([^ ]+)/g,Te)};function Oe(){var t,e,o="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(o+="-"),o+=(12===t?4:16===t?3&e|8:e).toString(16);return o}var Le=new WeakMap,Be=Symbol("id");function Ie(t,e,o,i,r){!function(t,e,o,i,r){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,o,i,r){var n,s=i;o&&it(o)&&!i?s=o:o&&function(t){return"string"==typeof t}(o)&&it(s)&&(n=o);var a=function(e){var o=e.target?e.target.closest(n):null;if(!n||n&&e.target&&o){var i=n?o:e.currentTarget;Object.defineProperty(e,"currentTarget",{value:i}),Object.defineProperty(e,"delegateTarget",{value:t}),s(e)}};s[Be]||(s[Be]=Oe());var p=Le.get(t);p||(p=new Map,Le.set(t,p)),p.set(e+s[Be],a),t.addEventListener(e,a,Boolean(r))}(t,e,o,i,r)}))}(t,e,o,i,r)}function Ee(t,e,o,i,r){!function(t,e,o,i){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,o,i){var r=Le.get(t);if(r&&o&&o[Be]){var n=e+o[Be],s=r.get(n);r.delete(n),s&&t.removeEventListener(e,s,Boolean(i))}}(t,e,o,i)}))}(t,e,o,i)}function Re(){var t=function(t){var e=!1,o={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[._]([\d._]+)/,ipad:/(iPad).*OS\s+(\d+)[._]([\d_]+)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i},i={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(var r in o)if(t.match(o[r])){if("windows"===r&&"plugins"in navigator)return!1;(e={}).device=r,e.name=Ve(r,i),e[e.name]=!0;break}return e}(navigator.userAgent),e={};return e.mobileOS=t,e}function Ve(t,e,o){for(var i in e)if(e[i].test(t))return i;return void 0!==o?o:t}function je(){}function ze(){return(new Date).getTime()}var De="string",Fe="function",He=function(){this._defaultPrevented=!0},Ne=function(){return!0===this._defaultPrevented};const Ue=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind()},e.prototype.bind=function(t,e,o){var i,r,n,s,a=this,p=typeof t===De?[t]:t||[],l=typeof e===Fe;if(void 0===e){for(i in t)a.bind(i,t[i]);return a}var h=function(){var t=p[i];(s=l?e:e[t])&&(o&&(n=s,s=function(){a.unbind(t,s),n.apply(a,arguments)},s.original=n),(a._events[t]=a._events[t]||[]).push(s))};for(i=0,r=p.length;i<r;i++)h();return a},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){var o,i,r,n=this,s=typeof t===De?[t]:t,a=typeof e===Fe;for(o=0,i=s.length;o<i;o++){var p=s[o];(r=a?e:e[p])&&(n._events[p]=n._events[p]||[]).unshift(r)}return n},e.prototype.trigger=function(t,e){var o,i,r=this,n=r._events[t];if(n){var s=e||{};for(s.sender=r,s._defaultPrevented=!1,s.preventDefault=He,s.isDefaultPrevented=Ne,o=0,i=(n=n.slice()).length;o<i;o++)n[o].call(r,s);return!0===s._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var o,i=this,r=i._events[t];if(void 0===t)i._events={};else if(r)if(e)for(o=r.length-1;o>=0;o--)r[o]!==e&&r[o].original!==e||r.splice(o,1);else i._events[t]=[];return i},e.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events&&this._events[i]&&delete this._events[i])}this.bind(this.events,t)},e}(q.Class);var Ge=Object.assign,We=function(t){t.preventDefault()},Xe=800,Ye=0,qe="press",Ze="hold",Qe="select",Ke="start",$e="move",Je="end",to="cancel",eo="tap",oo="doubleTap",io="release",ro="gesturechange",no="gestureend",so="gesturetap",ao={api:0,touch:0,mouse:9,pointer:9};function po(t){var e=[],o=t.originalEvent||t,i=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:o,event:t,target:t.target,currentTarget:i,id:o.pointerId,type:"pointer"}),e}var lo=function(t){function e(e,o){t.call(this);var i=this;i.support=Re(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=e,i._updateLocationData(o),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=ze()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(t){var e=this,o=t["page"+e.axis],i=ze(),r=i-e.timeStamp||1;!o&&this.invalidZeroEvents||(e.delta=o-e.location,e._updateLocationData(t),e.initialDelta=o-e.startLocation,e.velocity=e.delta/r,e.timeStamp=i)},e.prototype._updateLocationData=function(t){var e=this,o=e.axis;e.location=t["page"+o],e.client=t["client"+o],e.screen=t["screen"+o]},e}(q.Class),ho=function(t){function e(e,o,i){t.call(this),Ge(this,{x:new lo("X",i.location),y:new lo("Y",i.location),type:i.type,threshold:e.threshold||ao[i.type],userEvents:e,target:o,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.press=function(){var t=this;this._holdTimeout=setTimeout((function(){return t._hold()}),this.userEvents.minHold),this._trigger(qe,this.pressEvent)},e.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout((function(){1===e.userEvents._clicks?e._trigger(eo,t):e._trigger(oo,t),e.userEvents._clicks=0}),300))},e.prototype._hold=function(){this._trigger(Ze,this.pressEvent)},e.prototype.move=function(t){var e=this,o="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!o){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(uo.current&&uo.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger($e,t)}},e.prototype.end=function(t){this.endTime=ze(),this._finished||(this._finished=!0,this._trigger(io,t),this._moved?this._trigger(Je,t):this.supportDoubleTap?this._tap(t):this._trigger(eo,t),clearTimeout(this._holdTimeout),this.dispose())},e.prototype.dispose=function(){var t=this.userEvents.touches||[];this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout);var e=t.indexOf(this);t.splice(e,1)},e.prototype.skip=function(){this.dispose()},e.prototype.cancel=function(){this.dispose()},e.prototype.isMoved=function(){return this._moved},e.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=ze(),this._moved=!0,this._trigger(Ke,t)},e.prototype._trigger=function(t,e){var o=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:o};this.userEvents.notify(t,i)&&o.preventDefault()},e.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},e}(q.Class);function co(t){for(var e=Pe.up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var uo=function(t){function e(e,o){t.call(this);var i,r=this,n=Re();if(this.support=n,o=o||{},this.options=o,i=r.filter=o.filter,r.threshold=o.threshold||Ye,r.minHold=o.minHold||Xe,r.touches=[],r._maxTouches=o.multiTouch?2:1,r.allowSelection=o.allowSelection,r.captureUpIfMoved=o.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=o.supportDoubleTap,Ge(r,{element:e,surface:o.surface||e,stopPropagation:o.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Ie(r.surface,Me("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Ie(r.surface,Me("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Ie(e,Me("down"),i,this._elementStartHandler),e.style["touch-action"]=o.touchAction||"none",o.preventDragEvent&&(this._elementDragStartHandler=We,Ie(e,Me("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Ie(e,Me("mousedown"),i,this._elementSelectHandler),r.captureUpIfMoved){var s=r.surface;r._preventIfMovingProxy=r.preventIfMoving.bind(r),co((function(t){s.addEventListener(t,r._preventIfMovingProxy,!0)}))}r.bind([qe,Ze,eo,oo,Ke,$e,Je,io,to,"gesturestart",ro,no,so,Qe],o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},e.prototype.destroy=function(){var t=this,e=this.options,o=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved){var i=t.surface;co((function(e){i.removeEventListener(e,t._preventIfMovingProxy,!0)}))}Ee(t.surface,Me("move"),this._surfaceMoveHandler),Ee(t.surface,Me("up cancel"),this._surfaceEndHandler),Ee(o,Me("down"),this._elementStartHandler),e.preventDragEvent&&Ee(o,Me("dragstart"),this._elementDragStartHandler),Ee(o,Me("mousedown"),this._elementSelectHandler),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget}},e.prototype.capture=function(){e.current=this},e.prototype.cancel=function(){this._disposeAll(),this.trigger(to)},e.prototype.notify=function(t,e){var o,i,r,n,s,a,p,l,h=this.touches,c=t;if(this._isMultiTouch()){switch(c){case $e:c=ro;break;case Je:c=no;break;case eo:c=so}Ge(e,{touches:h},(o=h[0],i=h[1],r=o.x.location,n=o.y.location,p=r-(s=i.x.location),l=n-(a=i.y.location),{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+l*l)}))}return this.trigger(c,Ge(e,{type:c}))},e.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},e.prototype.move=function(t,e){this._apiCall("_move",t,e)},e.prototype.end=function(t,e){this._apiCall("_end",t,e)},e.prototype._isMultiTouch=function(){return this.touches.length>1},e.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},e.prototype._disposeAll=function(){for(var t=this.touches;t.length>0;)t.pop().dispose()},e.prototype._isMoved=function(){return wt(this.touches,(function(t){return t.isMoved()})).length},e.prototype._select=function(t){this.allowSelection&&!this.trigger(Qe,{event:t})||t.preventDefault()},e.prototype._start=function(t){if(!(t.which&&t.which>1||this._maxTouchesReached())){var o;e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var i=po(t),r=0;r<i.length&&!this._maxTouchesReached();r++){var n=i[r];if(!(o=this.filter?n.currentTarget:this.element)||0!==o.length){var s=new ho(this,o,n);this.touches.push(s),s.press(),this._isMultiTouch()&&this.notify("gesturestart",{})}}}},e.prototype._move=function(t){this._eachTouch("move",t)},e.prototype._end=function(t){this._eachTouch("end",t)},e.prototype._eachTouch=function(t,e){var o,i,r,n,s={},a=po(e),p=this.touches;for(o=0;o<p.length;o++)s[(i=p[o]).id]=i;for(o=0;o<a.length;o++)(n=s[(r=a[o]).id])&&("move"===t&&"pointer"===r.type&&!this.surface.hasPointerCapture(r.id)&&this.surface.setPointerCapture(r.id),n[t](r))},e.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:je,preventDefault:je})},e.defaultThreshold=function(t){Ye=t},e.minHold=function(t){Xe=t},e}(Ue);const fo=uo;function go(t,e){var o=Zt(e-t,_-1);if(0===o){if(0===e)return.1;o=Math.abs(e)}var i=Math.pow(10,Math.floor(Math.log(o)/Math.log(10))),r=Zt(o/i,_);return Zt(i*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),_)}const yo=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var o=qt(e),i=Math.cos(o),r=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Zt(n+(a-n)*i+(p-s)*r,y),this.y=Zt(s+(p-s)*i-(a-n)*r,y),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.onCircle=function(t,o,i){var r=qt(o);return new e(t.x-i*Math.cos(r),t.y-i*Math.sin(r))},e}(q.Class);var vo=function(t){function e(e,o,i,r){t.call(this),this.x1=e||0,this.y1=o||0,this.x2=i||0,this.y2=r||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var o=this.height(),i=this.width();return zt(t)&&(this.x1=t,this.x2=this.x1+i),zt(e)&&(this.y1=e,this.y2=this.y1+o),this},e.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},e.prototype.wrapLimit=function(t,e,o){return this.x1=Math.min(this.x1,Math.max(this.x1-e,t.x1)),this.y1=Math.min(this.y1,Math.max(this.y1-o,t.y1)),this.x2=Math.max(this.x2,Math.min(this.x2+e,t.x2)),this.y2=Math.max(this.y2,Math.min(this.y2+o,t.y2)),this},e.prototype.wrapPoint=function(t){var o=G(t),i=o?t[0]:t.x,r=o?t[1]:t.y;return this.wrap(new e(i,r,i,r)),this},e.prototype.snapTo=function(t,e){return e!==F&&e||(this.x1=t.x1,this.x2=t.x2),e!==H&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var o=this.height(),i=this.width(),r=e===V||e===d?H:F,n=r===H?o:i;if(e===f){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===V||e===C?t[r+1]-n:t[r+2];return this.x2=this.x1+i,this.y2=this.y1+o,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=dt(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=dt(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new yo(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new yo(this.x1,this.y1),new yo(this.x2,this.y1),new yo(this.x2,this.y2),new yo(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=mo(0,0,r,n,t),a=mo(e,0,r,n,t),p=mo(e,o,r,n,t),l=mo(0,o,r,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),o=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+o,this},e.prototype.toRect=function(){return new q.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===F?D:k,s=this[n]();Ct(o,[C,V])?(this[i]=t[i],this[r]=this[i]+s):Ct(o,[B,d])?(this[r]=t[r],this[i]=this[r]-s):o===f&&(this[i]=t[i]+(t[n]()-s)/2,this[r]=this[i]+s)},e}(q.Class);function mo(t,e,o,i,r){var n=qt(r);return new yo(o+(t-o)*Math.cos(n)+(e-i)*Math.sin(n),i-(t-o)*Math.sin(n)+(e-i)*Math.cos(n))}const xo=vo;var _o=function(t){function e(e,o,i,r,n){t.call(this),this.center=e,this.innerRadius=o,this.radius=i,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var o=qt(t),i=Math.cos(o),r=Math.sin(o),n=e?this.innerRadius:this.radius,s=Zt(this.center.x-i*n,y),a=Zt(this.center.y-r*n,y);return new yo(s,a)},e.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,p=Math.sin(qt(r)),l=Math.cos(qt(r)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new xo(h,c,h+e,c+o)},e.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,p=new yo(s,a),l=this.point(r),h=new yo(l.x-e.x,l.y-e.y),c=this.point(n),u=new yo(c.x-e.x,c.y-e.y),d=Zt(s*s+a*a,y);return(h.equals(p)||Q(h,p))&&!Q(u,p)&&d>=o*o&&d<=i*i},e.prototype.getBBox=function(){var t,e=new xo(P,P,T,T),o=Zt(this.startAngle%360),i=Zt((o+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,o,i].sort(bo),s=n.indexOf(o),a=n.indexOf(i);t=o===i?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(q.Class);function bo(t,e){return t-e}const wo=_o;var ko=function(t){function e(e,o,i,r){t.call(this,e,0,o,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(wo);const Ao=ko;var So=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;(0===t.angle||t.angle>0&&o===i)&&(i+=.001);var r=new q.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new q.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),p=q.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var l=a.pointAt(i);p.lineTo(l.x,l.y),p.arc(i,o,s,s,!0)}else p.lineTo(r.x,r.y);return p},e}(q.Class);So.current=new So;const Co=So;var Po=function(t){function e(e){t.call(this),this.children=[],this.options=at({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,o=this.children,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},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},e.prototype.createVisual=function(){this.visual=new q.drawing.Group({zIndex:this.options.zIndex,visible:Kt(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=q.drawing.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):zt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,o=t.options.zIndex||0,i=this.visual.children,r=i.length;for(e=0;e<r;e++){var n=i[e];if(Kt(n.options.zIndex,0)>o)break}this.visual.insert(e,t)},e.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)}},e.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},e.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:z,opacity:e||.2},stroke:{color:z,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);zt(n.options.zIndex)||(n.options.zIndex=Kt(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.toggleFocusHighlight=function(t){var e=(this.options||{}).focusHighlight||{},o=this._focusHighlight;if(t||o){if(!o){var i=this.getRoot().options.background,r=fe(i),n={fill:{opacity:e.opacity,color:e.color},stroke:Object.assign({},{color:r},e.border),zIndex:e.zIndex};o=this._focusHighlight=this.createFocusHighlight(n),this.appendVisual(o)}o.visible(t)}},e.prototype.createGradientOverlay=function(t,e,o){var i=new q.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(q.Class);Po.prototype.options={};const To=Po;var Mo={dots:q.drawing.dotsPattern,verticalStripes:q.drawing.verticalStripesPattern,crosshatch:q.drawing.crosshatchPattern,diagonalStripes:q.drawing.diagonalStripesPattern,grid:q.drawing.gridPattern};function Oo(t,e,o){var i=function(t,e){return it(t)?t(e):t}(t,o),r=i&&Mo[i.type];return r?r(Object.assign({},e,i)):e}var Lo=function(t){function e(e){t.call(this,e),this.options.margin=dt(this.options.margin),this.options.padding=dt(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,l=r.margin,h=r.padding,c=r.border.width,u=function(){i.align(e,F,r.align),i.align(e,H,r.vAlign),i.paddingBox=o.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),o=p?this.box=new xo(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=o.clone(),o.pad(h).pad(c).pad(l),u()),this.translateChildren(o.x1-d.x1+l.left+c+h.left,o.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},e.prototype.align=function(t,e,o){this.box.align(t,e,o)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(q.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:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:Oo(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},e}(To);te(Lo,{align:C,vAlign:V,margin:{},padding:{},border:{color:u,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Bo=Lo;function Io(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}var Eo=function(t){function e(e,o){t.call(this,e),this.pointData=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,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();if(o===g)a=new q.drawing.Circle(new q.geometry.Circle([Zt(e.x1+n,y),Zt(e.y1+s,y)],Math.min(n,s)),p);else if("triangle"===o)a=q.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close();else if(o===v)(a=new q.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var l=e.toRect();if(o===I){var h=Kt(t.borderRadius,l.width()/5);l.setCornerRadius(h)}a=q.drawing.Path.fromRect(l,p)}return i&&a.transform(q.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},e.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement(),Io(this.visual,this.options.accessibilityOptions)},e}(Bo);te(Eo,{type:g,align:f,vAlign:f});const Ro=Eo;var Vo="radial";const jo={glass:{type:"linear",rotation:0,stops:[{offset:0,color:z,opacity:0},{offset:.25,color:z,opacity:.3},{offset:1,color:z,opacity:0}]},sharpBevel:{type:Vo,stops:[{offset:0,color:z,opacity:.55},{offset:.65,color:z,opacity:0},{offset:.95,color:z,opacity:.25}]},roundedBevel:{type:Vo,stops:[{offset:.33,color:z,opacity:.06},{offset:.83,color:z,opacity:.2},{offset:.95,color:z,opacity:0}]},roundedGlass:{type:Vo,supportVML:!1,stops:[{offset:0,color:z,opacity:0},{offset:.5,color:z,opacity:.3},{offset:.99,color:z,opacity:0}]},sharpGlass:{type:Vo,supportVML:!1,stops:[{offset:0,color:z,opacity:.2},{offset:.15,color:z,opacity:.15},{offset:.17,color:z,opacity:.35},{offset:.85,color:z,opacity:.05},{offset:.87,color:z,opacity:.15},{offset:.99,color:z,opacity:0}]},bubbleShadow:{type:Vo,center:[.5,.5],radius:.5}};function zo(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),l=Math.max(t.y2,e.y2),h=[];return h[0]=new xo(i,s,r,a),h[1]=new xo(o,a,i,p),h[2]=new xo(r,a,n,p),h[3]=new xo(i,p,r,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(h[4]=new xo(o,s,i,a),h[5]=new xo(r,p,n,l)):(h[4]=new xo(r,s,n,a),h[5]=new xo(o,p,i,l)),wt(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var Do=function(t){function e(e){t.call(this,e);var o=this.options;o.width=parseInt(o.width,10),o.height=parseInt(o.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,o=new xo(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=zo(o,e[i].box)||new xo},e.prototype.createVisual=function(){this.visual=new q.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),i=q.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(i)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,o=this.gradients,i=Yt(t),r=jo[t.gradient];if(o[i])e=o[i];else{var n=Object.assign({},r,t);"linear"===r.type?e=new q.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,o=t.innerRadius/t.radius*100,i=e.length,r=[],n=0;n<i;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-o)+o)/100,r.push(s)}return r}(n)),(e=new q.drawing.RadialGradient(n)).supportVML=!1!==r.supportVML),o[i]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new xo(0,0,t.width,t.height)},e}(To);te(Do,{width:600,height:400,background:z,border:{color:u,width:0},margin:dt(5),zIndex:-2});const Fo=Do;var Ho=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=F,this.elementAxis=H,this.groupSizeField=D,this.elementSizeField=k,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=H,this.elementAxis=F,this.groupSizeField=k,this.elementSizeField=D,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this,e=t.box,o=t.elementAxis,i=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,s=this.groupOptions(),a=s.groups,p=s.groupsSize,l=s.maxGroupElementsSize,h=a.length,c=e[i+1]+this.alignStart(p,e[n]());if(h){for(var u=c,d=0;d<h;d++){for(var f=a[d],g=f.groupElements,y=e[o+1],v=g.length,m=0;m<v;m++){var x=g[m],_=this.elementSize(x),b=u+this.alignStart(_[n],f.groupSize),w=new xo;w[i+1]=b,w[i+2]=b+_[n],w[o+1]=y,w[o+2]=y+_[r],x.reflow(w),y+=_[r]+this.elementSpacing}u+=f.groupSize+this.groupSpacing}e[i+1]=c,e[i+2]=c+p,e[o+2]=e[o+1]+l}},e.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===B||i===d?o=e-t:i===f&&(o=(e-t)/2),o},e.prototype.groupOptions=function(){for(var t=this,e=t.box,o=t.children,i=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=Zt(e[i]()),p=o.length,l=[],h=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=o[g];y.box||y.reflow(e);var v=this.elementSize(y);this.options.wrap&&Zt(c+n+v[i])>a&&(l.push({groupElements:f,groupSize:h,groupElementsSize:c}),d=Math.max(d,c),u+=s+h,h=0,c=0,f=[]),h=Math.max(h,v[r]),c>0&&(c+=n),c+=v[i],f.push(y)}return l.push({groupElements:f,groupSize:h,groupElementsSize:c}),{groups:l,groupsSize:u+=h,maxGroupElementsSize:d=Math.max(d,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(To);te(Ho,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const No=Ho;var Uo=q.drawing.Text,Go=function(t){function e(e,o){t.call(this,o),this.content=e,this.reflow(new xo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=e.size=q.drawing.util.measureText(this.content,{font:e.font});this.baseline=o.baseline,this.box=new xo(t.x1,t.y1,t.x1+o.width,t.y1+o.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,r=t.cursor,n=t.stroke,s=t.paintOrder;this.visual=new Uo(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:r,stroke:n,paintOrder:s})},e}(To);te(Go,{font:x,color:u});const Wo=Go;function Xo(t){var e=t.origin,o=t.bottomRight();return new xo(e.x,e.y,o.x,o.y)}var Yo=/\n/m,qo=function(t){function e(e,o,i){t.call(this,o),this.content=e,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new xo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Yo),o=new No({vertical:!0,align:t.align,wrap:!1}),i=at({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Wo(e[r].trim(),i);o.append(n)}},e.prototype.reflow=function(e){var o=this.options,i=o.visual;if(this.container.options.align=o.align,i&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=i(this.visualContext(r));n&&(r=Xo(n.clippedBBox()||new q.geometry.Rect),n.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),o.rotation){var s=dt(o.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new q.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=q.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!zt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,F,t.align),this.align(this.targetBox,H,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,r=this.rotatedBox.center();return q.geometry.transform().translate(r.x-o,r.y-i).rotate(t,[o,i])},e}(Bo);const Zo=qo;var Qo=function(t){function e(e){t.call(this,e),this._textBox=new Zo(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,F)},e.buildTitle=function(t,o){var i,r=t;return"string"==typeof t&&(r={text:t}),(r=Object.assign({visible:!0},o,r))&&r.visible&&r.text&&(i=new e(r)),i},e.orderTitles=function(t){var e=[].concat(t),o=e.filter((function(t){return t&&t.options.position!==d})),i=e.filter((function(t){return t&&t.options.position===d}));return Ko(o),Ko(i),i.reverse(),o.concat(i)},e}(To);function Ko(t){for(var e=1;e<t.length;e++){var o=t[e]._textBox,i=t[e-1]._textBox;i.options.margin=Object.assign(dt(i.options.margin),{bottom:0}),o.options.margin=Object.assign(dt(o.options.margin),{top:0})}}te(Qo,{color:u,position:V,align:f,margin:dt(5),padding:dt(5)});const $o=Qo;var Jo=function(t){function e(e,o,i,r,n){t.call(this,o,n),this.text=o,this.value=e,this.index=i,this.dataItem=r,this.reflow(new xo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var o=t.prototype.visualContext.call(this,e);return o.value=this.value,o.dataItem=this.dataItem,o.format=this.options.format,o.culture=this.options.culture,o},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Ut(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==f){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=Xo(e.bbox(o.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,o=e.rotation;if(!o)return null;if(e.alignRotation===f)return t.prototype.rotationTransform.call(this);var i=q.geometry.transform().rotate(o).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||V,a=s===V||s===d?F:H,p=s===V||s===d?H:F,l=s===V||s===C?n.origin:n.bottomRight(),h=r.topLeft().transformCopy(i),c=r.topRight().transformCopy(i),u=r.bottomRight().transformCopy(i),g=r.bottomLeft().transformCopy(i),y=q.geometry.Rect.fromPoints(h,c,u,g),v={};v[p]=n.origin[p]-y.origin[p];var m,x,b=Math.abs(h[p]+v[p]-l[p]),w=Math.abs(c[p]+v[p]-l[p]);Zt(b,_)===Zt(w,_)?(m=h,x=c):w<b?(m=c,x=u):(m=h,x=g);var k=m[a]+(x[a]-m[a])/2;return v[a]=n.center()[a]-k,q.geometry.transform().translate(v.x,v.y).rotate(o)},e}(Zo);te(Jo,{_autoReflow:!1});const ti=Jo;var ei=function(t){function e(e,o,i){t.call(this,o),this.fields=e,this.chartService=i,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var o,i,r=e.label,n=e.icon,s=new xo,a=function(){return t},p=n.size,l=this.fields.text;if(zt(r)&&r.visible){var h=vt(r);h?l=h(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color=r.position===A?"#fff":n.background),this.label=new Zo(l,at({},r)),this.label.aliasFor=a,r.position!==A||zt(p)||(n.type===g?p=Math.max(this.label.box.width(),this.label.box.height()):(o=this.label.box.width(),i=this.label.box.height()),s.wrap(this.label.box))}n.width=o||p||7,n.height=i||p||7;var c=new Ro(at({},n));c.aliasFor=a,this.marker=c,this.append(c),this.label&&this.append(this.label),c.reflow(new xo),this.wrapperBox=s.wrap(c.box)}},e.prototype.reflow=function(t){var e,o,i,r=this,n=r.options,s=r.label,a=r.marker,p=r.wrapperBox,l=t.center(),h=n.line.length,c=n.position;n.visible&&(Ct(c,[C,B])?c===C?(i=p.alignTo(t,c).translate(-h,t.center().y-p.center().y),n.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[i.x2,l.y]],o=i.clone().wrapPoint(e))):(i=p.alignTo(t,c).translate(h,t.center().y-p.center().y),n.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[i.x1,l.y]],o=i.clone().wrapPoint(e))):c===d?(i=p.alignTo(t,c).translate(t.center().x-p.center().x,h),n.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,i.y1]],o=i.clone().wrapPoint(e))):(i=p.alignTo(t,c).translate(t.center().x-p.center().x,-h),n.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,i.y2]],o=i.clone().wrapPoint(e))),a&&a.reflow(i),s&&(s.reflow(i),a&&(n.label.position===L&&s.box.alignTo(a.box,c),s.reflow(s.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,o=this.options,i=o.visual;o.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:o.background,border:o.background,icon:o.icon,label:o.label,line:o.line,position:o.position,visible:o.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=q.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Z(e),this.visual.append(e)}},e.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},e.prototype.out=function(t,e){var o=this.eventArgs(e);t.trigger("noteLeave",o)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Ut(t),text:zt(e.label)?e.label.text:"",visual:this.visual})},e}(Bo);te(ei,{icon:{visible:!0,type:g},label:{position:A,visible:!0,align:f,vAlign:f},line:{visible:!0},visible:!0,position:V,zIndex:2});const oi=ei;var ii={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},ri=ii,ni=function(){},si={implementation:{configurable:!0}};ni.register=function(t){ri=t},si.implementation.get=function(){return ri},Object.defineProperties(ni,si);const ai=ni;var pi=/\{(\d+)(:[^\}]+)?\}/g,li=function(t){this._intlService=t},hi={intl:{configurable:!0}};hi.intl.get=function(){return this._intlService||ai.implementation},hi.intl.set=function(t){this._intlService=t},li.prototype.auto=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];var i=this.intl;return $(t)&&t.match(w)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},li.prototype.localeAuto=function(t,e,o){var i,r=this.intl;return i=$(t)&&t.match(w)?t.replace(pi,(function(t,i,n){var s=e[parseInt(i,10)];return r.toString(s,n?n.substring(1):"",o)})):r.toString(e[0],t,o),i},Object.defineProperties(li.prototype,hi);const ci=li;var ui=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new ci(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},di={intl:{configurable:!0}};di.intl.get=function(){return this._intlService||ai.implementation},di.intl.set=function(t){this._intlService=t,this.format.intl=t},ui.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},ui.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(ui.prototype,di);const fi=ui;var gi,yi=function(){};yi.register=function(t){gi=t},yi.create=function(t,e){return gi?gi.create(t,e):new fo(t,Object.assign({},{multiTouch:!0},e))};const vi=yi;function mi(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new q.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),Z(n),n}function xi(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,n=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(o,r).lineTo(i,r):n.moveTo(r,o).lineTo(r,i),Z(n),n}var _i=function(t){function e(e,o){void 0===o&&(o=new fi),t.call(this,e),this.chartService=o,this.options.visible||(this.options=at({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==M},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==M},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;pt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?B:f,o=at({},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},a=this.createAxisLabel(n,o,s);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=wt(this.children,(function(t){return!(t instanceof ti)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=wt(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,n=i?e.y2:e.y1,s=t.line.width||0;return o?new xo(r,e.y1,r,e.y2-s):new xo(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=at({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var o=new Zo(e.text,e);this.append(o),this.title=o}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=at({},e,o[i]);r.value=this.parseNoteValue(r.value);var n=new oi({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(zt(n.options.position)?t.vertical&&!Ct(n.options.position,[C,B])?n.options.position=t.reverse?C:B:t.vertical||Ct(n.options.position,[V,d])||(n.options.position=t.reverse?d:V):t.vertical?n.options.position=t.reverse?C:B:n.options.position=t.reverse?d:V,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new q.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,o=this.lineBox(),i=e.labels.mirror,r=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,r,s){var a=e.length,p=Math.max(1,r.step);if(r.visible)for(var l=r.skip;l<a;l+=p)zt(s)&&l%s==0||(n.tickX=i?o.x2:o.x2-r.size,n.tickY=i?o.y1-r.size:o.y1,n.position=e[l],t.append(mi(n,r)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,r/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();if(e.width>0&&e.visible){var i=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});i.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&Z(i);var r=this._lineGroup=new q.drawing.Group;r.append(i),this.visual.append(r),this.createTicks(r)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,o=t.background;o&&(this._backgroundPath=q.drawing.Path.fromRect(e.toRect(),{fill:{color:o},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,o=e.plotBands||[],i=e.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),s=wt(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<o.length;a++){var p=o[a],l=void 0,h=void 0,c=p.label,u=void 0;if(i?(l=(s||r.axisX).lineBox(),h=this.getSlot(p.from,p.to,!0)):(l=this.getSlot(p.from,p.to,!0),h=(s||r.axisY).lineBox()),c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new xo(l.x1,h.y1,l.x2,h.y2))),0!==l.width()&&0!==h.height()){var d=new q.geometry.Rect([l.x1,h.y1],[l.width(),h.height()]),f=q.drawing.Path.fromRect(d,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(f),u&&n.append(u)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;if(zt(t)&&t.visible){var n=vt(t);n?r=n({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)}return(i=new Zo(r,t)).reflow(o),i.renderVisual(),i.visual},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=i.visible?e.majorUnit:0,p=t.lineBox(),l=p[n?"y1":"x1"],h={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function d(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var a=Zt(t[n]);Ct(a,c)||n%o==0||s&&l===a||(h.position=a,u.append(xi(h,e)),c.push(a))}}return d(this.getMajorTickPositions(),i),d(this.getMinorTickPositions(),o,a/r),u.children},e.prototype.reflow=function(t){for(var e=this,o=e.options,i=e.labels,r=e.title,n=o.vertical,s=i.length,a=n?D:k,p=r?r.box[a]():0,l=this.getActualTickSize()+o.margin+p,h=((this.getRoot()||{}).box||t)[a](),c=0,u=0;u<s;u++){var d=i[u].box[a]();d+l<=h&&(c=Math.max(c,d))}this.box=n?new xo(t.x1,t.y1,t.x1+c+l,t.y2):new xo(t.x1,t.y1,t.x2,t.y1+c+l),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),l=i?a.box.height():a.box.width(),h=n[p],c=n[p+1],u=void 0,d=void 0;i?d=u=o?h+(c-h)/2-l/2:h-l/2:o?(u=h,d=c):d=(u=h-l/2)+l,this.positionLabel(a,r,u,d)}},e.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r,n=this.options,s=n.vertical,a=this.lineBox(),p=this.getActualTickSize()+n.margin;if(s){var l=a.x2;e?(l+=p,t.options.rotationOrigin=C):(l-=p+t.box.width(),t.options.rotationOrigin=B),r=t.box.move(l,o)}else{var h=a.y1;e?(h-=p+t.box.height(),t.options.rotationOrigin=d):(h+=p,t.options.rotationOrigin=V),r=new xo(o,h,i,h+t.box.height())}t.reflow(r)},e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},e.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,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,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(i=a),-90===i)break}if(0!==i){for(var p=0;p<e.length;p++)e[p].options.rotation=i,e[p].reflow(new xo);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,i=t.vertical;e&&(i?(e.options.align=o?B:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?V:d),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;zt(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,i=o?H:F;this.box.snapTo(e,i),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[i+1]-=this.lineBox()[i+1]-e[i+1],this.box[i+2]-=this.lineBox()[i+2]-e[i+2]},e.prototype.axisLabelText=function(t,e,o){var i=this,r=vt(e),n=function(){return e.format?i.chartService.format.localeAuto(e.format,[t],e.culture):t};return r?r(Object.assign({},o,{get text(){return n()},value:t,format:e.format,culture:e.culture})):n()},e.prototype.slot=function(t,e,o){var i=this.getSlot(t,e,o);if(i)return i.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var o=this.options.vertical?H:F;if(this.chartService.isPannable(o)){var i=this.maxLabelOffset();t[o+1]-=i.start,t[o+2]+=i.end}else{e[0].options.visible&&t.wrap(e[0].box);var r=e[e.length-1];r.options.visible&&t.wrap(r.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,o=t.reverse,i=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?H:F,s=this.labels,a=o?1:0,p=o?0:1,l=0,h=0,c=0;c<s.length;c++){var u=s[c],d=this.labelTickIndex(u),f=void 0,g=void 0;i?(f=r[d+a],g=r[d+p]):f=g=r[d],l=Math.max(l,f-u.box[n+1]),h=Math.max(h,u.box[n+2]-g)}return{start:l,end:h}},e.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!zt(n.min)||n.min<=o)||i<e&&r>0&&(!zt(n.max)||i<=n.max))return null;if(e<o&&r>0||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<o&&r<0?(a=Xt(t,o,i),p=Xt(t+s,o+s,i)):e>i&&r>0&&(p=Xt(e,o,i),a=Xt(e-s,o,i-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},e.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),i=t?H:F,r=this.lineDir(),n=i+(1===r?1:2).toString();return{axis:i,axisOrigin:n,axisDir:r,lineBox:e,lineSize:o,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(i>0?t[o]-n[r]:n[r]-t[o])/s},e.prototype.scaleToDelta=function(t,e){var o=Xt(t,-.999,.999);return o>0?e*Math.min(1,o):e-e/(1+o)},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(To);te(_i,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:u,visible:!0},title:{visible:!0,position:f},majorTicks:{align:L,size:4,skip:0,step:1},minorTicks:{align:L,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:L,minorTickType:M,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:u,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const bi=_i;var wi="milliseconds",ki="seconds",Ai="minutes",Si="hours",Ci="days",Pi="weeks",Ti="months",Mi="years",Oi=6e4,Li=36e5,Bi=864e5,Ii=6048e5,Ei=26784e5,Ri=31536e6,Vi={years:Ri,months:Ei,weeks:Ii,days:Bi,hours:Li,minutes:Oi,seconds:1e3,milliseconds:1};function ji(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Oi}function zi(t,e){return new Date(t.getTime()+e)}function Di(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Fi(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Hi(t,e,o,i){var r=t;if(t){var n=Di(t),s=n.getHours();o===Mi?Fi(r=new Date(n.getFullYear()+e,0,1),0):o===Ti?Fi(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):o===Pi?(r=Hi(function(t,e){void 0===e&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return zi(t,-o*Bi)}(n,i),7*e,Ci),Fi(r,s)):o===Ci?Fi(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):o===Si?r=function(t,e){var o=new Date(t);o.setMinutes(0,0,0);var i=(t.getTimezoneOffset()-o.getTimezoneOffset())*Oi;return zi(o,i+e*Li)}(n,e):o===Ai?(r=zi(n,e*Oi)).getSeconds()>0&&r.setSeconds(0):o===ki?r=zi(n,1e3*e):o===wi&&(r=zi(n,e)),o!==wi&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function Ni(t,e,o){return Hi(Di(t),0,e,o)}function Ui(t,e,o){var i=Di(t);return i&&Ni(i,e,o).getTime()===i.getTime()?i:Hi(i,1,e,o)}function Gi(t,e){return t&&e?t.getTime()-e.getTime():-1}function Wi(t,e){return t.getTime()-e}function Xi(t){if(G(t)){for(var e=[],o=0;o<t.length;o++)e.push(Xi(t[o]));return e}if(t)return Di(t).getTime()}function Yi(t,e){return t&&e?Xi(t)===Xi(e):t===e}function qi(t,e,o){return ji(t,e)/Vi[o]}function Zi(t,e,o,i){var r=Di(t),n=Di(e);return(o===Ti?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+qi(r,new Date(r.getFullYear(),r.getMonth()),Ci)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===Mi?r.getFullYear()-n.getFullYear()+Zi(r,new Date(r.getFullYear(),0),Ti,1)/12:o===Ci||o===Pi?qi(r,n,o):Wi(r,e)/Vi[o])/i}function Qi(t,e,o){return o===Mi?e.getFullYear()-t.getFullYear():o===Ti?12*Qi(t,e,Mi)+e.getMonth()-t.getMonth():o===Ci?Math.floor(Wi(e,t)/Bi):Math.floor(Wi(e,t)/Vi[o])}function Ki(t,e){return $(e)&&t.parseDate(e)||Di(e)}function $i(t,e){if(G(e)){for(var o=[],i=0;i<e.length;i++)o.push(Ki(t,e[i]));return o}return Ki(t,e)}function Ji(t,e){return K(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var tr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],o=zt(t.min),i=zt(t.max);if(t.srcCategories=t.categories=e,(o||i)&&e.length){var r,n=o?Math.floor(t.min):0;r=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,r)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:K(t.min)?t.min%1:0,max:K(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.range=function(){var t=this.options;return{min:K(t.min)?t.min:0,max:K(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(o-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:o}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length>0){var o=this.options.vertical?H:F,i=t[o+1],r=t[o+2],n=e[0],s=Wt(e);(n.box[o+1]>r||n.box[o+2]<i)&&(n.options.visible=!1),(s.box[o+1]>r||s.box[o+2]<i)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,i=e.max,r=Math.ceil(i),n=Math.floor(o),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(o?H:F)+(i?2:1)],l=this.tickIndices(t),h=[],c=0;c<l.length;c++)h.push(p+Zt(n*(l[c]-a),y));return h},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),r=i.getHash()+o.min+","+o.max+t.reverse+t.justified;if(e._hash!==r){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=r,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?H:F,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])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),n=e?H:F,s=o?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:i,lineSize:r,lineStart:i[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.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,l=s.min,h=this.lineInfo(),c=h.axis,u=h.lineStart,d=p.clone(),f=!zt(e),g=Kt(t,0),y=Kt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*a,m=u+((y=Math.max(g,y))+1-l)*a;return f&&n&&(m=v),o&&(v=Xt(v,p[c+1],p[c+2]),m=Xt(m,p[c+1],p[c+2])),d[c+1]=r?m:v,d[c+2]=r?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?H:F,o=this.lineBox(),i=t.clone();return i[e+1]=Xt(t[e+1],o[e+1],o[e+2]),i[e+2]=Xt(t[e+2],o[e+1],o[e+2]),i},e.prototype.slot=function(e,o,i){var r=Math.floor(this.options.min||0),n=e,s=o;return"string"==typeof n?n=this.categoryIndex(n):K(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):K(s)&&(s-=r),t.prototype.slot.call(this,n,s,i)},e.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?H:F,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,l=n.max,h=o?l:p,c=a[r+1],u=a[r+2],d=t[r];if(d<c||d>u)return null;var f=h+(d-c)/s,g=f%1;return i?f=Math.round(f):0===g&&f>0&&f--,Math.floor(f)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=e.categories.length,n=Zt(t/(i/r),_);return{min:n,max:r+n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),r=i.max-i.min,n=this.scaleToDelta(t,r),s=o*n,a=(1-o)*n,p=i.min+s,l=i.max-a;return l-p<.1&&(l=p+.1),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,r=o.max,n=this.scaleRange(t,e);return{min:Xt(n.min,i,r),max:Xt(n.max,i,r)}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.limitedRangeIndices(!0),r=i.min,n=i.max,s=Math.floor(r);return e?(r=Math.ceil(r),n=Math.floor(n)):(r=Math.floor(r),n=Math.ceil(n)),{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,n=Kt(i.categories[t],"");o.dataItem=r;var s=this.axisLabelText(n,e,o);return new ti(n,s,t,r,e)},e.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,o=t-Math.floor(e.min||0);return this.getSlot(o)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?H:F,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()}},e.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),o=this.scaleOptions().scale,i=Zt(t/o,_),r=this.totalRange(),n=e.min+i,s=e.max+i;return this.limitRange(n,s,0,r.max,i)},e.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?H:F,n=this.limitedRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(i?2:1)],l=t[r]-p,h=e[r]-p,c=n.min+l/a,u=n.min+h/a,d=Math.min(c,u),f=Math.max(c,u);if(f-d>=.01)return{min:d,max:f}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options,o=this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Yi(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories);return o},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return K(t.min)&&(e=Math.floor(t.min)),{min:e,max:K(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.limitedRangeIndices=function(t){var e,o=this.options,i=K(o.min)?o.min:0;if(e=K(o.max)?o.max:K(o.min)?i+o.categories.length:this.totalRange().max||1,t){var r=this.totalRange();i=Xt(i,0,r.max),e=Xt(e,0,r.max)}return{min:i,max:e}},e.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},e.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new St,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(bi);te(tr,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:u},labels:{zIndex:1},justified:!1,_deferLabels:!0});const er=tr;var or={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"},ir=[wi,ki,Ai,Si,Ci,Pi,Ti,Mi],rr="fit";function nr(t,e){e&&(t._range=void 0);var o=t._range;return o||((o=t._range=pe(t)).min=Di(o.min),o.max=Di(o.max)),o}var sr=function(t){this.options=t};sr.prototype.displayIndices=function(){return{min:0,max:1}},sr.prototype.displayRange=function(){return{}},sr.prototype.total=function(){return{}},sr.prototype.valueRange=function(){return{}},sr.prototype.valueIndex=function(){return-1},sr.prototype.values=function(){return[]},sr.prototype.totalIndex=function(){return-1},sr.prototype.valuesCount=function(){return 0},sr.prototype.totalCount=function(){return 0},sr.prototype.dateAt=function(){return null};var ar=function(t,e,o){this.options=o,o.baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=Hi(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Yi(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;var p=o.max;if(p){var l=!r&&Yi(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,l),this.displayEnd=i?this.roundToTotalStep(p,!r):o.max}else 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 pr(t,e,o){for(var i,r,n,s=nr(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,l=t.maxDateGroups,h=t.baseUnit===rr,c=e?ir.indexOf(e):0,u=h?ir[c++]:t.baseUnit,d=a/Vi[u],f=d;!r||d>=l;){i=i||p[u].slice(0);do{n=i.shift()}while(n&&e===u&&n<o);if(n)d=f/(r=n);else{if(u===Wt(ir)){r=Math.ceil(f/l);break}if(!h){d>l&&(r=Math.ceil(f/l));break}u=ir[c++]||Wt(ir),f=a/Vi[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}ar.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},ar.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,o=t.baseUnitStep,i=Zi(this.displayStart,this.valueStart,e,o),r=Zi(this.displayEnd,this.valueStart,e,o);this._indices={min:i,max:r}}return this._indices},ar.prototype.total=function(){return{min:this.start,max:this.end}},ar.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},ar.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},ar.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Zi(t,this.valueStart,e.baseUnit,e.baseUnitStep))},ar.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Zi(t,this.start,e.baseUnit,e.baseUnitStep))},ar.prototype.dateIndex=function(t){var e=this.options;return Zi(t,this.valueStart,e.baseUnit,e.baseUnitStep)},ar.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},ar.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=Hi(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},ar.prototype.dateAt=function(t,e){var o=this.options;return Hi(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},ar.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,a=this.start,p=Zi(t,a,r,n),l=e?Math.ceil(p):Math.floor(p);return o&&(l+=o),Hi(a,l*n,r,s)};var lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,o=e.intl,i=this.options,r=i.categories||[];if(r._parsed||((r=$i(o,r))._parsed=!0),i=at({roundToBaseUnit:!0},i,{categories:r,min:Ki(o,i.min),max:Ki(o,i.max),weekStartDay:Ji(i,o)}),e.panning&&e.isPannable(i.vertical?H:F)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,this.options=i,i.srcCategories=r,r.length>0){var n=nr(r,!0),s=i.maxDivisions,a=function(t){var e=(t.baseUnit||"").toLowerCase();return e!==rr&&!Ct(e,ir)&&function(t){for(var e,o,i=t.categories,r=zt(i)?i.length:0,n=P,s=0;s<r;s++){var a=i[s];if(a&&e){var p=Math.abs(ji(a,e));0!==p&&(o=(n=Math.min(n,p))>=Ri?Mi:n>=24192e5?Ti:n>=Ii?Pi:n>=Bi?Ci:n>=Li?Si:n>=Oi?Ai:ki)}e=a}t.baseUnit=o||Ci}(t),e!==rr&&"auto"!==t.baseUnitStep||pr(t),t}(i),p=i._forecast;if(p&&(p.before>0&&(n.min=Hi(n.min,-p.before,a.baseUnit,a.weekStartDay)),p.after>0&&(n.max=Hi(n.max,p.after,a.baseUnit,a.weekStartDay))),this.dataRange=new ar(n.min,n.max,a),s){var l=this.dataRange.displayRange(),h=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:l.min,max:l.max,maxDateGroups:s}),c=this.dataRange.options;pr(h,c.baseUnit,c.baseUnitStep),this.divisionRange=new ar(n.min,n.max,h)}else this.divisionRange=this.dataRange}else i.baseUnit=i.baseUnit||Ci,this.dataRange=this.divisionRange=new sr(i);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var o=this.dataRange,i=this.divisionRange,r=i.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=i.values(),a=0;this.options.justified||(s=s.concat(i.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(o.dateIndex(s[p])+a),1!==e&&p>=1){var l=n.length-1;n.splice(p,0,n[l-1]+(n[l]-n[l-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return Gi(t,e.min)>=0&&Gi(t,e.max)<=0&&o.length},e.prototype.parseNoteValue=function(t){return Ki(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),l=Zt(t/p,_);if(a.min&&a.max){var h=zi(e.min||a.min,l),c=zi(e.max||a.max,l);a={min:Hi(h,0,o,i),max:Hi(c,0,o,i)}}return a},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Zt(t/(i/(s-n)),_)*(e.reverse?-1:1),l=zi(n,p),h=zi(s,p),c=this.limitRange(Xi(l),Xi(h),Xi(a.min),Xi(a.max),p);return c?(c.min=Di(c.min),c.max=Di(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,o){if(this.isEmpty())return null;var i=t.prototype.pointsRange.call(this,e,o),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Wi(r.max,r.min)/(n.max-n.min),a=this.options;return{min:zi(r.min,i.min*s),max:zi(r.min,i.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===rr,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),l=a-s,h=this.scaleToDelta(t,l),c=Math.round(p*h),u=Math.round((1-p)*h),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+c),g=new Date(a.getTime()-u);if(i){var y,v,m=o.autoBaseUnitSteps,x=o.maxDateGroups,_=Wt(m[d])*x*Vi[d],b=Wi(a,s),w=Wi(g,f),k=ir.indexOf(d);if(w<Vi[d]&&d!==wi)d=ir[k-1],f=zi(s,v=(b-(x-1)*(y=Wt(m[d]))*Vi[d])/2),g=zi(a,-v);else if(w>_&&d!==Mi){var A=0;do{k++,d=ir[k],A=0,v=2*Vi[d];do{y=m[d][A],A++}while(A<m[d].length&&v*y<b)}while(d!==Mi&&v*y<b);(v=(v*y-b)/2)>0&&(f=zi(s,-v),g=zi(a,v),f=zi(f,Xt(g,r.min,r.max)-g),g=zi(g,Xt(f,r.min,r.max)-f))}}return f&&g&&Wi(g,f)>0?{min:f,max:g,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),i=this.scaleRange(t,e);return i&&(i.min<o.min&&(i.min=o.min),i.max>o.max&&(i.max=o.max)),i},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createLabels=function(){t.prototype.createLabels.call(this),this.createRangeLabels()},e.prototype.clearLabels=function(){t.prototype.clearLabels.call(this),this.rangeLabels=[]},e.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),t.prototype.arrangeLabels.call(this)},e.prototype.arrangeRangeLabels=function(){var t=this.options,e=this.rangeLabels;if(0!==e.length){var o=this.lineBox(),i=t.vertical,r=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=i?o.y1-n.box.height()/2:o.x1;this.positionLabel(n,r,s)}var a=e[1];if(a){var p=i?o.y2-a.box.height()/2:o.x2;this.positionLabel(a,r,p)}}},e.prototype.autoRotateLabels=function(){t.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){t.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},e.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var 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;n>0&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1,0))}},e.prototype.contentBox=function(){for(var e=t.prototype.contentBox.call(this),o=this.rangeLabels,i=0;i<o.length;i++){var r=o[i];r.options.visible&&e.wrap(r.box)}return e},e.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),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,o.dataItem=r;var a=this.axisLabelText(n,e,o);if(a)return new ti(n,a,t,r,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,o=e.displayStart,i=e.displayEnd,r=this.options,n=Object.assign({},r.labels,r.rangeLabels,{align:f,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=f,"auto"===n.rotation&&(n.rotation=0,r.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var a=function(e,o,i){if(i){var r=new ti(o,i,e,null,n);t.append(r),t.rangeLabels.push(r)}};a(0,o,this.axisLabelText(o,n,{index:0,count:2})),a(1,i,this.axisLabelText(i,n,{index:1,count:2}))}},e.prototype.autoRotateRangeLabels=function(){var t=this,e=this.rangeLabels;if(this.options.autoRotateRangeLabels&&!this.options.vertical&&2===e.length){var o=function(e,o,i){var r=2*Math.abs(o[i+1]-o[i]),n=t.autoRotateLabelAngle(e.box,r);0!==n&&(e.options.rotation=n,e.reflow(new xo))},i=this.getMajorTickPositions();o(e[0],i,0),o(e[1],i,i.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,o){var i=this.dataRange,r=t,n=e;r instanceof Date&&(r=i.dateIndex(r)),n instanceof Date&&(n=i.dateIndex(n));var s=this.getSlot(r,n,o);if(s)return s.toRect()},e.prototype.getSlot=function(e,o,i){var r=e,n=o;return typeof r===O&&(r=this.categoryIndex(r)),typeof n===O&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,i)},e.prototype.valueRange=function(){var t=nr(this.options.srcCategories);return{min:Di(t.min),max:Di(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=nr(t.srcCategories);return new ar(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange()},e}(er);te(lr,{type:m,labels:{dateFormats:or},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});const hr=lr;function cr(t,e){return Zt(Math.floor(t/e)*e,_)}function ur(t,e){return Zt(Math.ceil(t/e)*e,_)}function dr(t){return Math.max(Math.min(t,3e5),-3e5)}var fr=Math.pow(10,1-_),gr=function(t){function e(e,o,i,r){t.call(this,Object.assign({},i,{seriesMin:e,seriesMax:o}),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,o){var i=o.narrowRange,r=function(t,e,o){if(!t&&!e)return 0;var i;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===o||!o&&(e-r)/e>.2)return 0;i=Math.max(0,r-(e-r)/2)}else i=t;return i}(t,e,i),n=function(t,e,o){if(!t&&!e)return 1;var i;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===o||!o&&n>.2)return 0;i=Math.min(0,r-(t-r)/2)}else i=e;return i}(t,e,i),s=go(r,n),a={majorUnit:s};return!1!==o.roundToMajorUnit&&(r<0&&yr(r,s,1/3)&&(r-=s),n>0&&yr(n,s,1/3)&&(n+=s)),a.min=cr(r,s),a.max=ur(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:zt(e.min)?Math.min(t.min,e.min):t.min,max:zt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var o,i,r=e;if(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=zt(e.min),i=zt(e.max);var n=o||i;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=cr(t.min,e.majorUnit),t.max=ur(t.max,e.majorUnit)):n&&(r=at(t,e),t.majorUnit=go(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=at(t,r);return s.min>=s.max&&(o&&!i?s.max=s.min+s.majorUnit:!o&&i&&(s.min=s.max-s.majorUnit)),s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,o=e.max-e.min;return Math.floor(Zt(o/t,y))+1},e.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),l=[],h=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&l.push(Zt(h,y)),h+=a*r;return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,l=r.lineStart,h=s*(p/(i.max-i.min)),c=Kt(t,e||0),u=Kt(e,t||0);o&&(c=Xt(c,i.min,i.max),u=Xt(u,i.min,i.max));var d=Math.min(c,u)-i.min,f=Math.max(c,u)-i.min,g=new xo(a.x1,a.y1,a.x1,a.y1);return g[n+1]=dr(l+h*(s>0?d:f)),g[n+2]=dr(l+h*(s>0?f:d)),g},e.prototype.getValue=function(t){var e=this.options,o=Number(e.max),i=Number(e.min),r=this.pointOffset(t);return r<0||r>1?null:Zt(i+r*(o-i),_)},e.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,s=this.lineInfo().lineSize,a=Zt(t/(s/(r-n)),_);return!o&&!i||o&&i||(a=-a),{min:n+a,max:r+a,offset:a}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=Zt(i.min+t*i.majorUnit,_),n=this.axisLabelText(r,e,o);return new ti(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=Zt(this.options.min+n,_),p=Zt(this.options.max-s,_);return p-a<fr&&(p=a+fr),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,r=this.scaleRange(t,e);return{min:Xt(r.min,o,i),max:Xt(r.max,o,i),narrowRange:!1}},e.prototype.isValidRange=function(t,e){return e-t>fr},e}(bi);function yr(t,e,o){var i=Zt(Math.abs(t%e),_);return 0===i||i>e*(1-o)}te(gr,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},labels:{format:"#.####################"},zIndex:1});const vr=gr;var mr=function(t){function e(e,o,i,r){var n=Di(e),s=Di(o),a=r.intl,p=i||{};p=function(t,e,o){var i,r,n=o.min||t,s=o.max||e,a=o.baseUnit||(s&&n?(i=ji(s,n),r=Si,i>=Ri?r=Mi:i>=Ei?r=Ti:i>=Ii?r=Pi:i>=Bi&&(r=Ci),r):Si),p=Vi[a],l=o.weekStartDay||0,h=Ni(Xi(n)-1,a,l)||Di(s),c=Ui(Xi(s)+1,a,l),u=(o.majorUnit?o.majorUnit:void 0)||ur(go(h.getTime(),c.getTime()),p)/p,d=Qi(h,c,a),f=ur(d,u)-d,g=Math.floor(f/2),y=f-g;return o.baseUnit||delete o.baseUnit,o.baseUnit=o.baseUnit||a,o.min=o.min||Hi(h,-g,a,l),o.max=o.max||Hi(c,y,a,l),o.minorUnit=o.minorUnit||u/5,o.majorUnit=u,o}(n,s,p=at(p||{},{min:Ki(a,p.min),max:Ki(a,p.max),axisCrossingValue:$i(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ji(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var l=p.weekStartDay||0;this.totalMin=Xi(Ni(Xi(n)-1,p.baseUnit,l)),this.totalMax=Xi(Ui(Xi(s)+1,p.baseUnit,l))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Qi(e.min,e.max,e.baseUnit)/t+1)},e.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/Wi(e.max,e.min),p=e.weekStartDay||0,l=[n],h=1;h<s;h++){var c=n+Wi(Hi(e.min,h*t,e.baseUnit,p),e.min)*a*i;l.push(Zt(c,y))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){return vr.prototype.getSlot.call(this,Ki(this.intlService,t),Ki(this.intlService,e),o)},e.prototype.getValue=function(t){var e=vr.prototype.getValue.call(this,t);return null!==e?Di(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;r>0&&(s=Hi(s,r,i.baseUnit,n));var a=e.dateFormats[i.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,o);return new ti(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),s=this.range(),a=n/Wi(s.max,s.min),p=Zt(t/a,_);return!i&&!r||i&&r||(p=-p),{min:zi(e.min,p),max:zi(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return Gi(t,e.min)>=0&&Gi(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),o=this.limitRange(Xi(e.min),Xi(e.max),this.totalMin,this.totalMax,e.offset);if(o)return{min:Di(o.min),max:Di(o.max)}},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);return{min:Di(r),max:Di(n)}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=Di(Xi(this.options.min)+n),p=Di(Xi(this.options.max)-s);return p-a<1e3&&(p=Di(Xi(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e);return{min:Di(Xt(Xi(o.min),this.totalMin,this.totalMax)),max:Di(Xt(Xi(o.max),this.totalMin,this.totalMax))}},e}(bi);te(mr,{type:m,majorGridLines:{visible:!0,width:1,color:u},labels:{dateFormats:or}});const xr=mr;var _r=1e-6,br=function(t){function e(e,o,i,r){var n=at({majorUnit:10,min:e,max:o},i),s=n.majorUnit,a=function(t,e){var o=Zt(kr(t,e),_)%1;return t<=0?e:0!==o&&(o<.3||o>.9)?Math.pow(e,kr(t,e)+.2):Math.pow(e,Math.ceil(kr(t,e)))}(o,s),p=function(t,e,o){var i=o.majorUnit,r=t;return t<=0?r=e<=1?Math.pow(i,-2):1:o.narrowRange||(r=Math.pow(i,Math.floor(kr(t,i)))),r}(e,o,n),l=function(t,e,o,i){var r=o.min,n=o.max;return zt(o.axisCrossingValue)&&o.axisCrossingValue<=0&&wr(),zt(i.max)?i.max<=0&&wr():n=e,zt(i.min)?i.min<=0&&wr():r=t,{min:r,max:n}}(p,a,n,i);n.max=l.max,n.min=l.min,n.minorUnit=i.minorUnit||Zt(s-1,_),t.call(this,n,r),this.totalMin=zt(i.min)?Math.min(p,i.min):p,this.totalMax=zt(i.max)?Math.max(a,i.max):a,this.logMin=Zt(kr(l.min,s),_),this.logMax=Zt(kr(l.max,s),_),this.seriesMin=e,this.seriesMax=o,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,o){var i=this,r=i.options,n=i.logMin,s=i.logMax,a=r.majorUnit,p=r.min,l=r.max,h=this.lineInfo(),c=h.axis,u=h.axisDir,d=h.lineBox,f=h.lineSize,g=h.lineStart,y=u*(f/(s-n)),v=Kt(t,e||1),m=Kt(e,t||1);if(v<=0||m<=0)return null;o&&(v=Xt(v,p,l),m=Xt(m,p,l)),v=kr(v,a),m=kr(m,a);var x=Math.min(v,m)-n,_=Math.max(v,m)-n,b=new xo(d.x1,d.y1,d.x1,d.y1);return b[c+1]=dr(g+y*(u>0?x:_)),b[c+2]=dr(g+y*(u>0?_:x)),b},e.prototype.getValue=function(t){var e=this,o=e.options,i=e.logMin,r=e.logMax,n=o.majorUnit,s=this.lineInfo(),a=s.axis,p=s.axisDir,l=s.lineStart,h=s.lineSize,c=(r-i)/h,u=p*(t[a]-l);if(u<0||u>h)return null;var d=i+u*c;return Zt(Math.pow(n,d),_)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.translateRange=function(t){var e=this,o=e.options,i=e.logMin,r=e.logMax,n=o.reverse,s=o.vertical,a=o.majorUnit,p=this.lineBox(),l=s?p.height():p.width(),h=Zt(t/(l/(r-i)),_);return!s&&!n||s&&n||(h=-h),{min:Math.pow(a,i+h),max:Math.pow(a,r+h),offset:h}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,o=e.majorTicks,i=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,o){a.tickX=n?s.x2:s.x2-o.size,a.tickY=n?s.y1-o.size:s.y1,a.position=e,t.append(mi(a,o))}return o.visible&&this.traverseMajorTicksPositions(p,o),i.visible&&this.traverseMinorTicksPositions(p,i),[]},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.vertical,n=t.lineBox(),s={lineStart:n[r?"x1":"y1"],lineEnd:n[r?"x2":"y2"],vertical:r},a=[],p=this.gridLinesVisual();function l(t,e){Ct(t,a)||(s.position=t,p.append(xi(s,e)),a.push(t))}return i.visible&&this.traverseMajorTicksPositions(l,i),o.visible&&this.traverseMinorTicksPositions(l,o),p.children},e.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(Zt(i+r*(a-n),_),e)},e.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,a=this.lineInfo(),p=a.lineStart,l=a.step,h=this.logMin,c=this.logMax,u=Math.floor(h);u<c;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var g=d.value+f*d.minorStep;if(g>r)break;g>=i&&t(Zt(p+l*(kr(g,s)-h),_),e)}},e.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),r=Math.pow(this.options.majorUnit,i),n=this.axisLabelText(r,e,o);return new ti(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e);return{min:Math.min(o,i),max:Math.max(o,i)}},e.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=kr(this.options.min,o),r=kr(this.options.max,o),n=Math.abs(this.pointOffset(e)),s=r-i,a=this.scaleToDelta(t,s),p=Math.pow(o,i+n*a),l=Math.pow(o,r-(1-n)*a);return l-p<_r&&(l=p+_r),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),i=this.totalMin,r=this.totalMax;return{min:Xt(o.min,i,r),max:Xt(o.max,i,r)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,r=Math.pow(i,t);return{value:r,minorStep:(Math.pow(i,t+1)-r)/o}},e.prototype.lineInfo=function(){var e=t.prototype.lineInfo.call(this);return e.step=e.axisDir*(e.lineSize/(this.logMax-this.logMin)),e},e}(bi);function wr(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function kr(t,e){return Math.log(t)/Math.log(e)}te(br,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},zIndex:1,_deferLabels:!0});const Ar=br,Sr={createGridLines:function(t){var e,o,i=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,i.majorGridLines)),i.minorGridLines.visible&&(o=this.minorGridLineAngles(t,s),Vt(n,this.renderMinorGridLines(o,r,i.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){var n=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,n)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=this.box.center(),s=new q.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var l=new q.drawing.Path(r);i&&(s.radius=i(t[p])),l.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(l)}return a.children},gridLineAngles:function(t,e,o,i,r){var n=this,s=this.intervals(e,o,i,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return Bt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}};var Cr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new xo,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()))}},e.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=o||1,p=[],l=0,h=e||0;h<n;h+=a)l=r.reverse?360-h*s:h*s,l=Zt(l,y)%360,i&&Ct(l,i)||p.push(l);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return Bt(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,n)},e.prototype.radiusCallback=function(t,e,o){if(e.options.type!==s){var i=qt(360/(2*this.options.categories.length)),r=Math.cos(i)*t,n=this.majorAngles();return function(e){return!o&&Ct(e,n)?t:r}}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new q.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;var p=Co.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;o.reverse&&!i&&(p=(p+1)%s);var l=n[p=Xt(Math.floor(p),0,s-1)];i&&(l-=a/2)<0&&(l+=360);var h=a*(Xt(Math.ceil(e||p),p,s-1)-p+1);return new wo(r.center(),0,r.height()/2,l,h)},e.prototype.slot=function(t,e){var o=this.getSlot(t,e),i=o.startAngle+180,r=i+o.angle;return new q.geometry.Arc([o.center.x,o.center.y],{startAngle:i,endAngle:r,radiusX:o.radius,radiusY:o.radius})},e.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},e}(er);te(Cr,{startAngle:90,labels:{margin:dt(10)},majorGridLines:{visible:!0},justified:!0}),at(Cr.prototype,Sr);const Pr=Cr;var Tr=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.minorUnit=i.minorUnit||i.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return vr.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this,e=t.options,o=t.labels,i=t.options.labels,r=i.skip||0,n=i.step||1,s=new xo,a=this.intervals(e.majorUnit,r,n),p=0;p<o.length;p++){o[p].reflow(s);var l=o[p].box;o[p].reflow(this.getSlot(a[p]).adjacentBox(0,l.width(),l.height()))}},e.prototype.lineBox=function(){return this.box},e.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 l=(360+r+p*t)%360;i&&Ct(l,i)||s.push(l)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,n=Xt(t,o.min,o.max),s=Xt(e||n,n,o.max);if(o.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new wo(i.center(),0,i.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var o,i,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return r.reverse?(o=a,i=p):(o=360-p,i=360-a),o=(o+n)%360,i=(i+n)%360,new q.geometry.Arc([s.center.x,s.center.y],{startAngle:o,endAngle:i,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,r=t.y-o.y,n=Math.round(Dt(Math.atan2(r,i))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(bi);te(Tr,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:dt(10)},majorGridLines:{color:u,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),at(Tr.prototype,Sr,{createPlotBands:Pr.prototype.createPlotBands,majorAngles:Pr.prototype.majorAngles,range:vr.prototype.range,labelsCount:vr.prototype.labelsCount,createAxisLabel:vr.prototype.createAxisLabel});const Mr=Tr;var Or={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),a=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),p=0;p<o.length;p++){var l,h=o[p],c={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},u=this.getSlot(h.from,h.to,!0),d=new wo(n,n.y-u.y2,n.y-u.y1,0,360);l=e===s?Co.current.createRing(d,c):q.drawing.Path.fromPoints(this.plotBandPoints(d,r),c).close(),a.append(l)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new q.geometry.Circle(r,t.innerRadius),s=new q.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(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();Vt(n,this.renderGridLines(r,s,i,e.minorGridLines))}return n},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 a=i.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),l=n;l<e.length;l+=a){var h=t.y-e[l];if(h>0){var c=new q.geometry.Circle([t.x,t.y],h);if(i.type===s)p.append(new q.drawing.Circle(c,r));else{for(var u=new q.drawing.Path(r),d=0;d<o.length;d++)u.lineTo(c.pointAt(o[d]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),o=this.plotArea.polarAxis,i=o.majorAngles(),r=o.box.center(),n=t.distanceTo(r),a=n;if(this.options.majorGridLines.type!==s&&i.length>1){var p=t.x-r.x,l=t.y-r.y,h=(Dt(Math.atan2(l,p))+540)%360;i.sort((function(t,e){return Lr(t,h)-Lr(e,h)}));var c=90-Lr(i[0],i[1])/2,u=180-Lr(h,i[0])-c;a=n*(Math.sin(qt(u))/Math.sin(qt(c)))}return this.axisType().prototype.getValue.call(this,new yo(e.x1,e.y2-a))}};function Lr(t,e){return 180-Math.abs(Math.abs(t-e)-180)}const Br=Or;var Ir=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(vr);at(Ir.prototype,Br);const Er=Ir;var Rr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(Ar);at(Rr.prototype,Br);const Vr=Rr;function jr(t){return t<=0?-1:1}const zr=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(r>2&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return o;var n,s,a=e[0],p=e[1],l=e[2];for(o.push(new q.geometry.Segment(a));a.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){var h=this.tangent(a,p,F,H);return Wt(o).controlOut(this.firstControlPoint(h,a,p,F,H)),o.push(new q.geometry.Segment(p,this.secondControlPoint(h,a,p,F,H))),o}if(i){a=e[r-1],p=e[0],l=e[1];var c=this.controlPoints(a,p,l);n=c[1],s=c[0]}else{var u=this.tangent(a,p,F,H);n=this.firstControlPoint(u,a,p,F,H)}for(var d=n,f=0;f<=r-3;f++)if(this.removeDuplicates(f,e),f+3<=(r=e.length)){a=e[f],p=e[f+1],l=e[f+2];var g=this.controlPoints(a,p,l);Wt(o).controlOut(d),d=g[1];var y=g[0];o.push(new q.geometry.Segment(p,y))}if(i){a=e[r-2],p=e[r-1],l=e[0];var v=this.controlPoints(a,p,l);Wt(o).controlOut(d),o.push(new q.geometry.Segment(p,v[0])),Wt(o).controlOut(v[1]),o.push(new q.geometry.Segment(l,s))}else{var m=this.tangent(p,l,F,H);Wt(o).controlOut(d),o.push(new q.geometry.Segment(l,this.secondControlPoint(m,p,l,F,H)))}return o},e.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},e.prototype.invertAxis=function(t,e,o){var i=!1;if(t.x===e.x)i=!0;else if(e.x===o.x)(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(i=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,o.x);t.y<=e.y&&o.y<=n||e.y<=t.y&&o.y>=n||(i=!0)}return i},e.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),r=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||Zt(r,1)===Zt(o.y,1)},e.prototype.lineFunction=function(t,e){var o=(e.y-t.y)/(e.x-t.x);return[t.y-o*t.x,o]},e.prototype.controlPoints=function(t,e,o){var i,r=F,n=H,s=!1,a=!1;if(this.isLine(t,e,o))i=this.tangent(t,e,F,H);else{var p={x:this.isMonotonicByField(t,e,o,F),y:this.isMonotonicByField(t,e,o,H)};p.x&&p.y?(i=this.tangent(t,o,F,H),s=!0):(this.invertAxis(t,e,o)&&(r=H,n=F),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?jr((o[n]-t[n])*(e[r]-t[r])):-jr((o[r]-t[r])*(e[n]-t[n]))),a=!0))}var l=this.secondControlPoint(i,t,e,r,n);if(a){var h=r;r=n,n=h}var c=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,l,i),this.restrictControlPoint(e,o,c,i)),[l,c]},e.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)},e.prototype.tangent=function(t,e,o,i){var r=e[o]-t[o],n=e[i]-t[i];return 0===r?0:n/r},e.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},e.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],s=.333*(o[i]-n);return this.point(n+s,e[r]+s*t,i,r)},e.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],s=o[i],a=.333*(s-n);return this.point(s-a,o[r]-a*t,i,r)},e.prototype.point=function(t,e,o,i){var r=new q.geometry.Point;return r[o]=t,r[i]=e,r},e.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},e}(q.Class);var Dr=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},e.prototype.slot=function(t,e,o){return void 0===o&&(o=!0),this._axis.slot(t,e,o)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(q.Class);const Fr=Dr;function Hr(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Fr(e[o])}var Nr=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};Nr.prototype.findAxisByName=function(t){return Hr(t,this._pane.axes)};const Ur=Nr,Gr=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(q.Class);function Wr(t){for(var e=t.length,o=0,i=0;i<e;i++)K(t[i])&&o++;return o}var Xr={min:function(t){for(var e=t.length,o=P,i=0;i<e;i++){var r=t[i];K(r)&&(o=Math.min(o,r))}return o===P?t[0]:o},max:function(t){for(var e=t.length,o=T,i=0;i<e;i++){var r=t[i];K(r)&&(o=Math.max(o,r))}return o===T?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];K(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return Wr(t)&&(e=Xr.sum(t)),e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&zt(r)&&o++}return o},avg:function(t){var e=Wr(t),o=t[0];return e>0&&(o=Xr.sum(t)/e),o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&zt(i))return i}return t[0]}};const Yr=Xr;function qr(t,e){return null===e?e:bt(t)(e)}var Zr=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,o){void 0===e&&(e=[j]),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)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[j]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[j]},e.prototype.bindPoint=function(t,e,o){var i,r,n=t.data,s=zt(o)?o:n[e],a={valueFields:{value:s}},p=this.valueFields(t),l=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(zt(s)){if(Array.isArray(s)){var h=s.slice(p.length);r=this._bindFromArray(s,p),i=this._bindFromArray(h,l)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,l);r=this._bindFromObject(s,p,c),i=this._bindFromObject(s,l,u)}}else r=this._undefinedValue[t.type];return zt(r)&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=i||{},a},e.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},e.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},e.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]=qr(a,t))}return i},e.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===j?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},e}(q.Class);Zr.current=new Zr;const Qr=Zr;var Kr=/percent(?:\w*)\((\d+)\)/,$r=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Jr=function(t){function e(e,o,i){t.call(this),this.initGlobalRanges(e,o,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,o){var i=e.data,r=$r.exec(t);if(r){this.valueGetter=this.createValueGetter(e,o);var n=this.getAverage(i),s=this.getStandardDeviation(i,n,!1),a=r[1]?parseFloat(r[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,o);var l=this.getStandardError(i,this.getAverage(i));this.globalRange=function(t){return{low:t-l,high:t+l}}}},e.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Qr.current,n=r.valueFields(t),s=zt(i[0])?i[0]:{};return G(s)?o=bt("["+(e?n.indexOf(e):0)+"]"):K(s)?o=bt():typeof s===O&&(o=bt(r.sourceFields(t,n)[n.indexOf(e)])),o},e.prototype.getErrorRange=function(t,e){var o,i,r;if(!zt(e))return null;if(this.globalRange)return this.globalRange(t);if(G(e))o=t-e[0],i=t+e[1];else if(K(r=parseFloat(e)))o=t-r,i=t+r;else{if(!(r=Kr.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);o=t-Math.abs(n),i=t+Math.abs(n)}return{low:o,high:i}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,r=o?e.count-1:e.count,n=0,s=0;s<i;s++){var a=this.valueGetter(t[s]);K(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},e.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);K(n)&&(o+=n,i++)}return{value:o/i,count:i}},e}(q.Class);const tn=Jr;var en=q.support.browser||{},on=600,rn="fadeIn",nn=.8,sn=en.msie?.001:0,an="errorLow",pn="errorHigh",ln="zero",hn="interpolate",cn="above",un="below",dn="smooth",fn="step",gn="area",yn="bar",vn="boxPlot",mn="bubble",xn="bullet",_n="candlestick",bn="column",wn="donut",kn="funnel",An="pyramid",Sn="heatmap",Cn="horizontalWaterfall",Pn="line",Tn="ohlc",Mn="pie",On="polarArea",Ln="polarLine",Bn="polarScatter",In="radarArea",En="radarColumn",Rn="radarLine",Vn="rangeArea",jn="rangeBar",zn="rangeColumn",Dn="scatter",Fn="scatterLine",Hn="verticalArea",Nn="verticalBoxPlot",Un="verticalBullet",Gn="verticalLine",Wn="verticalRangeArea",Xn="waterfall",Yn=[yn,bn,Tn,_n,vn,Nn,xn,zn,jn,Xn,Cn],qn="exponentialTrendline",Zn="linearTrendline",Qn="logarithmicTrendline",Kn="movingAverageTrendline",$n="polynomialTrendline",Jn="powerTrendline",ts=[qn,Zn,Qn,Kn,$n,Jn],es="legendItemClick",os="seriesClick",is="seriesHover",rs="seriesOver",ns="seriesLeave",ss="plotAreaHover",as="plotAreaLeave",ps="drag",ls="dragEnd",hs="dragStart",cs="zoomStart",us="zoom",ds="zoomEnd",fs="selectStart",gs="select",ys="selectEnd",vs="showTooltip",ms="hideTooltip",xs="graphics-symbol",_s="k-chart-point",bs="Point",ws="log",ks="category",As="insideEnd",Ss="outsideEnd",Cs="wheel",Ps="drilldown",Ts="pattern",Ms=function(t){function e(e,o,i,r,n,s){t.call(this,s),this.low=e,this.high=o,this.isVertical=i,this.chart=r,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,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,p=a-s,l=a+s;i?(e=[new yo(n.x,r.y1),new yo(n.x,r.y2)],o&&e.push(new yo(p,r.y1),new yo(l,r.y1),new yo(p,r.y2),new yo(l,r.y2)),this.box=new xo(p,r.y1,l,r.y2)):(e=[new yo(r.x1,n.y),new yo(r.x2,n.y)],o&&e.push(new yo(r.x1,p),new yo(r.x1,l),new yo(r.x2,p),new yo(r.x2,l)),this.box=new xo(r.x1,p,r.x2,l)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var o=e?t.width():t.height();return Math.min(Math.floor(o/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,o=e.visual;o?this.visual=o({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},e.prototype.createDefaultVisual=function(){var e=this.options,o=this.linePoints,i={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<o.length;r+=2){var n=new q.drawing.Path(i).moveTo(o[r].x,o[r].y).lineTo(o[r+1].x,o[r+1].y);Z(n),this.visual.append(n)}},e}(To);te(Ms,{animation:{type:rn,delay:on},endCaps:!0,line:{width:2},zIndex:1});const Os=Ms;var Ls=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(Os);const Bs=Ls;function Is(t){for(var e=0;e<t.length;e++)if(zt(t[e].zIndex))return!0}function Es(t,e){null!==e&&t.push(e)}function Rs(t){return Wr(t)===t.length}function Vs(t,e,o){var i=e.visible;if(zt(i))return i;var r=t.pointVisibility;return r?r[o]:void 0}function js(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Qr.current.bindPoint(t,n),a=s.valueFields.value;$(a)&&(a=parseFloat(a)),K(a)?(s.visible=!1!==Vs(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 zs(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}function Ds(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var Fs=5;function Hs(t,e,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var r=o.defaults=o.defaults||{},n=o.depth=o.depth||0,s=!1;if(o.excluded=o.excluded||[],n>Fs)return null;for(var a in t)if(!Ct(a,o.excluded)&&Ae(t,a)){var p=t[a];it(p)?(s=!0,i||(t[a]=Kt(p(e),r[a]))):pt(p)&&(i||(o.defaults=r[a]),o.depth++,s=Hs(p,e,o,i)||s,o.depth--)}return s}function Ns(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];Ct(n.type,i)&&o.push(n)}return o}var Us=new WeakMap;function Gs(t,e,o){if(null===e||"object"!=typeof e)return Ki(o,t);var i=Us.get(e);return i||(i=Ki(o,t),Us.set(e,i)),i}function Ws(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}function Xs(t){return zt(t)&&null!==t}function Ys(t,e){var o=t.type,i=e instanceof Date;return!o&&i||Ds(o,m)}function qs(t){return 1===t.length?t[0]:t}var Zs=/area/i;function Qs(t,e){var o=Qr.current.bindPoint(t,null,e).valueFields;for(var i in o)if(J(o[i]))return!0}function Ks(t){var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,l=t.series,h=i;do{p(h+=r)&&(e=Qs(l,(o=a(h)).item))}while(n<=h&&h<=s&&!e);if(e)return o}function $s(t,e,o,i,r){var n=e.min,s=e.max,a=n>0&&n<o,p=s+1<o;if(a||p){var l,h,c,u=function(t){return t.missingValues?t.missingValues:Zs.test(t.type)||t.stack?ln:hn}(t);u!==hn?(a&&(l=i(n-1)),p&&(h=i(s+1))):(a&&(l=Qs(t,(c=i(n-1)).item)?c:Ks({start:n,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),p&&(h=Qs(t,(c=i(s+1)).item)?c:Ks({start:s,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),l&&(t._outOfRangeMinPoint=l),h&&(t._outOfRangeMaxPoint=h)}}function Js(t,e){return e.forEach((function(e){var o=e&&e.options,i=e&&(e.box||e.wrapperBox);o&&i&&!1!==o.noclip&&!1!==o.visible&&t.wrap(i)})),t}var ta=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(o.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=at({},i,{vertical:!this.options.invertAxes},t)}return o},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&K(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s=o[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;K(s.value)&&(r+=Math.abs(s.value),i.push(Math.abs(s.value)))}}if(r>0)return t.value/r}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var i=this.plotValue(t),r=i>=0,n=e,s=!1,a=zt(t.series.stack)?t.series.stack:this.options.defaultStack,p=function(t){return!0===t||typeof t===O&&!t.group};if(a)for(var l=0;l<o.length;l++){var h=o[l];if(t===h)break;var c=zt(h.series.stack)?h.series.stack:this.options.defaultStack;if(c&&(typeof a!==R||a===c)&&(!p(a)||p(c))&&(!a.group||a.group===c.group)){var u=this.plotValue(h);(u>=0&&r||u<0&&!r)&&(0!==e&&0===u||(n+=u,i+=u,s=!0,this.options.isStacked100&&(i=Math.min(i,1))))}}return s&&(n-=e),[n,i]}var d=t.series,f=this.seriesValueAxis(d),g=this.categoryAxisCrossingValue(f);return[g,J(t.value)?t.value:g]},e.prototype.stackLimits=function(t,e){for(var o=P,i=T,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];zt(p)&&isFinite(p)&&(i=Math.max(i,p),o=Math.min(o,p))}}}return{min:o,max:i}},e.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];if(!p){p=this.stackLimits(s,n.stack);var l=this.errorTotals;l&&(l.negative.length&&(p.min=Math.min(p.min,pe(l.negative).min)),l.positive.length&&(p.max=Math.max(p.max,pe(l.positive).max))),p.min!==P||p.max!==T?i[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields[an],l=e.fields[pn];K(p)&&K(l)?i={low:p,high:l}:a&&zt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new tn(a.value,n,j),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},e.prototype.addPointErrorBar=function(t,e){var o=!this.options.invertAxes,i=t.options.errorBars,r=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:r};this.updateRange({value:n},p),this.updateRange({value:s},p)}var l=new Bs(n,s,o,this,r,i);t.errorBars=[l],t.append(l)},e.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,r=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:i,high:r}},e.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=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,zt(a.dataItem)||(a.dataItem=i.data[o]),this.addErrorBar(a,t,o)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,o){var i=o.categoryIx,r=o.category,n=o.series,s=o.seriesIx,a={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},p=this._evalSeries[s];zt(p)||(this._evalSeries[s]=p=Hs(t,{},a,!0));var l=t;return p&&Hs(l=at({},l),{value:e,category:r,index:i,series:n,dataItem:n.data[i]},a),l},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.value,r=this.valueAxisRanges[o];isFinite(i)&&null!==i&&((r=this.valueAxisRanges[o]=r||{min:P,max:T}).min=Math.min(r.min,i),r.max=Math.max(r.max,i))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,o=t.axis,i=o?e.namedValueAxes[o]:e.valueAxis;if(!i)throw new Error("Unable to locate value axis with name "+o);return i},e.prototype.reflow=function(t){var e=this,o=this.categorySlots=[],i=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,l=e.seriesValueAxis(p),h=i[n++],c=o[a];if(c||(o[a]=c=e.categorySlot(r,a,l)),h){var u=e.plotRange(h,l.startValue()),d=e.valueSlot(l,u);if(d){var f=e.pointSlot(c,d);h.aboveAxis=e.aboveAxis(h,l),h.stackValue=u[1],e.options.isStacked100&&(h.percentage=e.plotValue(h)),e.reflowPoint(h,f)}else h.visible=!1}})),this.reflowCategories(o),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Wt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),i=t.value;return e.options.reverse?i<o:i>=o},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,o=t.options;return[].concat(o.axisCrossingValues||o.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,r=o?t:e;return new xo(i.x1,r.y1,i.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=zs(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.plotArea.bindPoint(a,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var l=0;l<i;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},e.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];if(r){var n=r.categoryIx;i(this.plotArea.bindPoint(t,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:o,dataItem:r.item})}},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}(To);te(ta,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const ea=ta;var oa={click:function(t,e){return t.trigger(os,this.eventArgs(e))},hover:function(t,e){return t.trigger(is,this.eventArgs(e))},over:function(t,e){return t.trigger(rs,this.eventArgs(e))},out:function(t,e){return t.trigger(ns,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:Ut(t),originalEvent:t,point:this}}};const ia=oa,ra={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&zt(e)&&null!==e&&(this.note=new oi({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};var na=function(t){function e(e,o){t.call(this),this.value=e,this.options=Object.assign({},o),this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Oe()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Zo(this.getLabelText(t),at({align:f,vAlign:f,margin:{left:5,right:5},zIndex:Kt(t.zIndex,this.series.zIndex)},t),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.getAriaLabelText=function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,o=at({color:this.color},t.border);return zt(o.color)||(o.color=new q.Color(e).brightness(nn).toHex()),o},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new Ro({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:at({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical;this.render(),this.box=t;var r=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);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new xo(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,o=this.label,i=e.labels.position;o&&(i=(i=i===cn?V:i)===un?d:i,o.reflow(t),o.box.alignTo(this.markerBox(),i),o.reflow(o.box))},e.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),r=new Ro({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Kt(t.border.opacity,1)},opacity:Kt(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,o=this.marker;if(o)e=o.paddingBox.toRect(),t=o.visual;else{var i=this.options.markers.size,r=i/2,n=this.box.center();e=new q.geometry.Rect([n.x-r,n.y-r],[i,i])}return{options:this.options,rect:e,visual:t}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,o=t.size+(t.border.width||0),i=new Ro({type:t.type,width:o,height:o,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this._childBox),i.getElement()},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i,r=t.x2+5,n=C;return this.aboveAxis?(o=t.y1,i=d):(o=t.y2,i=V),{point:new yo(r,o),align:{horizontal:n,vertical:i}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.clipElements=function(){this.options.visible=!1},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.unclipBox=function(){return Js(this.markerBox().clone(),[this.label,this.note])},e.prototype.labelBox=function(){return this.label?this.label.box:new xo},e.prototype.noteBox=function(){return this.note?this.note.box:new xo},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},e.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},e.prototype.getIndex=function(){return zt(this.categoryIx)?this.categoryIx:this.pointIx},e}(To);na.prototype.defaults={vertical:!0,markers:{visible:!0,background:z,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,position:cn,margin:dt(3),padding:dt(4),animation:{type:rn,delay:on}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:xs,className:_s,ariaRoleDescription:bs}},at(na.prototype,ia),at(na.prototype,ra);const sa=na;var aa=function(t){function e(e,o,i){t.call(this),this.linePoints=e,this.series=o,this.seriesIx=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},e.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!zt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;it(o)&&i&&(o=i.color);var r=q.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&r.close(),this.visual=r},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}(To);te(aa,{closed:!1});const pa=aa;var la={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,r=e.reverse,n=i?F:H,s=i?H:F,a=r?2:1,p=a,l=ha(t[0],n,a,s,p),h=[l],c=1;c<t.length;c++){var u=ha(t[c],n,a,s,p);if(l[n]!==u[n]){var d=new q.geometry.Point;d[n]=l[n],d[s]=u[s],h.push(d,u)}l=u}return o?l!==Wt(h)&&h.push(l):h.push(ha(Wt(t),n,a,s,r?1:2)),h}};function ha(t,e,o,i,r){var n=t.box,s=new q.geometry.Point;return s[e]=n[e+o],s[i]=n[i+r],s}const ca=la;var ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(pa);at(ua.prototype,ca);const da=ua;var fa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;it(o)&&e&&(o=e.color);var i=new zr(this.options.closed).process(this.points()),r=new q.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,i),this.visual=r},e}(pa);const ga=fa;var ya={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,l=[],h=0;h<p;h++){var c=a[h];c?l.push(c):this.seriesMissingValues(s)!==hn&&(l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?ln:e||hn},getNearestPoint:function(t,e,o){for(var i,r=new yo(t,e),n=this.seriesPoints[o],s=P,a=0;a<n.length;a++){var p=n[a];if(p&&zt(p.value)&&null!==p.value&&!1!==p.visible){var l=p.box.center().distanceTo(r);l<s&&(i=p,s=l)}}return i}};const va=ya;var ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(Pt(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),r=o[2].anchor();e.suspend(),i.setX(t),e.resume(),r.setX(t)},e}(q.drawing.Animation);te(ma,{duration:on}),q.drawing.AnimationFactory.current.register("clip",ma);const xa=ma,_a={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),o=q.drawing.Path.fromRect(e.toRect());this.visual.clip(o),this.animation=new xa(o,{box:e}),Is(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&zt(i.visual.options.zIndex)&&i.visual.clip(t)}}};var ba=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return sa},e.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=this.seriesMissingValues(o),n=t.valueFields.value;if(!zt(n)||null===n){if(r!==ln)return null;n=0}var s=this.pointOptions(o,i);s=this.evalPointOptions(s,n,e);var a=t.fields.color||o.color;it(o.color)&&(a=s.color);var p=new sa(n,s);return p.color=a,this.append(p),p},e.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]},e.prototype.createSegment=function(t,e,o){var i=e.style;return new(i===fn?da:i===dn?ga:pa)(t,e,o)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ea);at(ba.prototype,va,_a);const wa=ba;var ka=function(t){function e(e,o,i,r,n){t.call(this,e,o,i),this.prevSegment=r,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;it(i)&&e&&(i=e.color),this.visual=new q.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Oo(t.pattern,{color:i,opacity:t.opacity}),stroke:null}),o.width>0&&!1!==o.visible&&this.createStroke({stroke:at({color:i,opacity:t.opacity,lineCap:"butt"},o)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new q.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment();if(i){var r=this.stackSegments();Vt(o,r)}var n=new q.drawing.Path(t);n.segments.push.apply(n.segments,o),!i&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),n=i.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=Wt(s).anchor(),l=o?n.x1:n.y1;o?t.lineTo(l,p.y).lineTo(l,a.y):t.lineTo(p.x,l).lineTo(a.x,l)},e}(pa);const Aa=ka;var Sa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(Aa);at(Sa.prototype,ca);const Ca=Sa;var Pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new zr(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;o>=0;o--){var i=t[o];e.push(new q.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},e}(Aa);const Ta=Pa;var Ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&o>0&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new(a===fn?Ca:a===dn?Ta:Aa)(t,e,o,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var o=this._stackPoints;if(o)for(var i=0;i<o.length;i++){var r=o[i],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,n=t.length;r<0&&(r=0,n--);var s=r+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var l=r;l<s;l++){var h=l+a,c=e,u=void 0;do{u=i[--c][h]}while(c>0&&!u);if(u)o!==fn&&l>r&&!i[c][h-1]&&p.push(this._previousSegmentPoint(l,h,h-1,c)),p.push(u),o!==fn&&l+1<s&&!i[c][h+1]&&p.push(this._previousSegmentPoint(l,h,h+1,c));else{var d=this._createGapStackPoint(l);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;s>0&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),o=new sa(0,e);return o.categoryIx=t,o.series={},o},e.prototype.seriesMissingValues=function(t){return t.missingValues||ln},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(wa);const Oa=Ma;var La=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var o in t){var i=t[o],r=e[o];e[o]=r=r||{min:P,max:T},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(q.Class);const Ba=La;var Ia=function(t){function e(e,o,i){t.call(this,o),this.textBox=new Zo(e,this.options,i),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;if(n.align=o?f:C,n.vAlign=o?V:f,e.position===As)o?(n.vAlign=V,!i&&s.height()<t.height()&&(n.vAlign=d)):n.align=i?B:C;else if(e.position===f)n.vAlign=f,n.align=f;else if("insideBase"===e.position)o?n.vAlign=i?d:V:n.align=i?C:B;else if(e.position===Ss)if(o)if(i){var l=(s.width()-t.width()-a.left-a.right)/2;p=new xo(t.x1-l,t.y1-s.height(),t.x2+l,t.y1)}else p=new xo(t.x1,t.y2,t.x2,t.y2+s.height());else n.align=f,p=i?new xo(t.x2,t.y1,t.x2+s.width(),t.y2):new xo(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)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?H:F,o=e+"1",i=e+"2",r=this.children[0],n=this.parent.box;if(n[o]<t[o]||t[i]<n[i]){var s=r.paddingBox.clone();s[o]=Math.max(n[o],t[o]),s[i]=Math.min(n[i],t[i]),this.reflow(s)}},e}(To);te(Ia,{position:Ss,margin:dt(3),padding:dt(4),color:u,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:rn,delay:on},zIndex:2});const Ea=Ia,Ra={addAccessibilityAttributesToVisual:function(){this._id=this._id||Oe();var t=at({ariaLabel:this.getAriaLabelText()},this.options.accessibility);Io(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}};var Va=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||z,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Ea(this.getLabelText(t),at({vertical:this.options.vertical},t),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},e.prototype.createVisual=function(){var e=this,o=this.box,i=this.options,r=i.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),r){var n=this.rectVisual=r({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:o.toRect(),createVisual:function(){var t=new q.drawing.Group;return e.createRect(t),t},options:i});n&&this.visual.append(n)}else o.width()>0&&o.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,o=e.border,i=zt(o.opacity)?o.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=q.drawing.Path.fromRect(r,{fill:Oo(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(Z(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Ws(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return Z(q.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return Z(q.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||nn,i=e.color;return zt(i)||(i=new q.Color(t).brightness(o).toHex()),i},e.prototype.tooltipAnchor=function(){var t,e,o=this,i=o.options,r=o.box,n=o.aboveAxis,s=this.owner.pane.clipBox()||r,a=C,p=V;if(i.vertical)t=Math.min(r.x2,s.x2)+5,n?e=Math.max(r.y1,s.y1):(e=Math.min(r.y2,s.y2),p=d);else{var l=Math.max(r.x1,s.x1),h=Math.min(r.x2,s.x2);i.isStacked?(p=d,n?(a=B,t=h):t=l,e=Math.max(r.y1,s.y1)-5):(n?t=h+5:(t=l-5,a=B),e=Math.max(r.y1,s.y1))}return{point:new yo(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipBox=function(){var t=this.label&&this.label.textBox;return Js(this.box.clone(),[t,this.note])},e.prototype.labelBox=function(){var t=this.label&&this.label.textBox;return t?t.box:new xo},e.prototype.noteBox=function(){return this.note?this.note.box:new xo},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(To);at(Va.prototype,ia),at(Va.prototype,ra),at(Va.prototype,Ra),Va.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}};const ja=Va;function za(t,e){t.forEach(e)}function Da(t,e){for(var o=t.length,i=o-1;i>=0;i--)e(t[i],i-o-1)}var Fa=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Da:za}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.gap,r=e.spacing,n=this.children,s=n.length,a=o?H:F,p=s+i+r*(s-1),l=(o?t.height():t.width())/p,h=t[a+1]+l*(i/2);this.forEach(n,(function(e,o){var i=(e.box||t).clone();i[a+1]=h,i[a+2]=h+l,e.reflow(i),o<s-1&&(h+=l*r),h+=l}))},e}(To);te(Fa,{vertical:!1,gap:0,spacing:0});const Ha=Fa;var Na=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?F:H,o=this.children,i=o.length,r=this.box=new xo,n=0;n<i;n++){var s=o[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(r=this.box=a.clone()),s.reflow(a),r.wrap(a)}}},e}(To);te(Na,{vertical:!0});const Ua=Na;var Ga=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return ja},e.prototype.clusterType=function(){return Ha},e.prototype.stackType=function(){return Ua},e.prototype.stackLimits=function(e,o){return t.prototype.stackLimits.call(this,e,o)},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.options,s=this.children,a=zt(i.stack)?i.stack:n.defaultStack,p=this.pointValue(t),l=this.pointOptions(i,r),h=l.labels;a&&h.position===Ss&&(h.position=As),l.isStacked=a;var c=t.fields.color||i.color;p<0&&l.negativeColor&&(c=l.negativeColor),l=this.evalPointOptions(l,p,e),it(i.color)&&(c=l.color);var u=new(this.pointType())(p,l);u.color=c;var d=s[o];return d||(d=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),n.isStacked?this.getStackWrap(a,d).append(u):d.append(u),u},e.prototype.getStackWrap=function(t,e){var o,i=typeof t===O?t.group||!0:t,r=e.children;if(typeof i===R||!0===i)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},e.prototype.categorySlot=function(t,e,o){var i=this.options,r=t.getSlot(e),n=o.startValue();if(i.isStacked){var s=o.getSlot(n,n,!0),a=i.invertAxes?F:H;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),Is(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&zt(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};if(e.isStacked){var i=this.seriesValueAxis(e.series[0]);t=i.getSlot(i.startValue())}else t=this.categoryAxis.getSlot(0);o.origin=new q.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e}(ea);te(Ga,{animation:{type:yn}});const Wa=Ga;var Xa=function(t){function e(e,o){t.call(this,o),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){return this.formatValue(t.format)},e.prototype.reflow=function(t){var e=this,o=e.options,i=e.value,r=e.owner.seriesValueAxis(o),n=r.getSlot(i.open,i.close),s=r.getSlot(i.low,i.high);n.x1=s.x1=t.x1,n.x2=s.x2=t.x2,this.realBody=n;var a=s.center().x,p=[];p.push([[a,s.y1],[a,n.y1]]),p.push([[a,n.y2],[a,s.y2]]),this.lines=p,this.box=s.clone().wrap(n),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new q.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var o=q.drawing.Path.fromRect(this.realBody.toRect(),{fill:Oo(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),Z(o),t.append(o),Ws(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:Kt(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=q.drawing.Path.fromPoints(o[n],r);Z(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return zt(e)||(e=new q.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=q.drawing.Path.fromRect(this.box.toRect(),{fill:{color:z,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var o=this.mainVisual(at({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,o},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new yo(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:V}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(To);Xa.prototype.createFocusHighlight=ja.prototype.createFocusHighlight,te(Xa,{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>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(Xa.prototype,ia),at(Xa.prototype,ra),at(Xa.prototype,Ra);const Ya=Xa;var qa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.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,l=t.valueFields,h=Rs(this.splitValue(l)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),h&&(o=this.createPoint(t,e));var d=a[i];d||(d=new Ha({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=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)},e.prototype.pointType=function(){return Ya},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointType(),r=t.valueFields,n=at({},o),s=t.fields.color||o.color;n=this.evalPointOptions(n,r,e),o.type!==_n&&o.type!==Tn||r.open>r.close&&(s=t.fields.downColor||o.downColor||o.color),it(o.color)&&(s=n.color),n.vertical=!this.options.invertAxes;var a=new i(r,n);return a.color=s,a},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.splitValue(t),r=this.valueAxisRanges[o]||{min:P,max:T};this.valueAxisRanges[o]={min:Math.min.apply(Math,i.concat([r.min])),max:Math.max.apply(Math,i.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(ea);at(qa.prototype,_a);const Za=qa;var Qa=function(t){function e(e,o){t.call(this,e,o),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,o,i=this,r=i.options,n=i.value,s=i.owner.seriesValueAxis(r);this.boxSlot=o=s.getSlot(n.q1,n.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=s.getSlot(n.lower,n.upper),this.reflowWhiskerSlot(t);var a=s.getSlot(n.median);if(n.mean){var p=s.getSlot(n.mean);this.meanPoints=this.calcMeanPoints(t,p)}this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,a),this.box=e.clone().wrap(o),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,o=e.outliers||[],i=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<o.length;s++){var a=o[s],p=at({},(n=a<e.q3+i&&a>e.q1-i?t.outliers:t.extremes).border);zt(p.color)||(zt(this.color)?p.color=this.color:p.color=new q.Color(n.background).brightness(nn).toHex());var l=new Ro({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});l.value=a,r.push(l)}return this.reflowOutliers(r),r},e.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,n=e.getSlot(r);this.options.vertical?n.move(o.x):n.move(void 0,o.y),this.box=this.box.wrap(n),t[i].reflow(n)}},e.prototype.mainVisual=function(e){for(var o=t.prototype.mainVisual.call(this,e),i=this.renderOutliers(e),r=0;r<i.length;r++){var n=i[r].getElement();n&&o.append(n)}return o},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Ya);te(Qa,{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:v,background:z,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:g,background:z,border:{width:2,opacity:1},opacity:0}}),at(Qa.prototype,ia);const Ka=Qa;var $a=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(Ka);const Ja=$a;var tp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Rs(this.splitValue(l)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),h&&(o=this.createPoint(t,e));var d=a[i];d||(d=new Ha({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return this.options.invertAxes?Ja:Ka},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers));zt(t.mean)&&(i=i.concat(t.mean));var r=this.valueAxisRanges[o]||{min:P,max:T};this.valueAxisRanges[o]={min:Math.min.apply(Math,i.concat([r.min])),max:Math.max.apply(Math,i.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];zt(r)&&null!==r&&o.push(r)}return o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Za);const ep=tp;var op=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(Os);const ip=op;var rp=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=o.seriesIx,l=o.series,h=t.options.errorBars,c=o[s],u=o[a];K(r)&&(K(c)&&K(u)&&(i={low:c,high:u}),h&&zt(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new tn(h[n],l,e),i=this.seriesErrorRanges[e][p].getErrorRange(r,h[n])),i&&this.addPointErrorBar(i,t,e))},e.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===H,p={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];var l=new ip(i,r,a,this,n,s);e.errorBars.push(l),e.append(l),p[o]=i,this.updateRange(p,n),p[o]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],l=t;Xs(i)&&Xs(r)||(l=this.createMissingValue(l,a)),l&&((o=this.createPoint(l,e))&&(Object.assign(o,e),this.addErrorBar(o,F,e),this.addErrorBar(o,H,e)),this.updateRange(l,e.series)),this.points.push(o),p.push(o)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[i],p=this.yAxisRanges[r];Xs(n)&&(a=this.xAxisRanges[i]=a||{min:P,max:T},$(n)&&(n=Ki(o,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),Xs(s)&&(p=this.yAxisRanges[r]=p||{min:P,max:T},$(s)&&(s=Ki(o,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.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","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];zt(s)||(this._evalSeries[r]=s=Hs(t,{},n,!0));var a=t;return s&&Hs(a=at({},t),{value:e,series:i,dataItem:o.dataItem},n),a},e.prototype.pointType=function(){return sa},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=at({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;i=this.evalPointOptions(i,t,e),it(o.color)&&(r=i.color);var n=new sa(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+o);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,i),l=a.y.getSlot(t.y,t.y,i);if(s)if(p&&l){var h=e.pointSlot(p,l);s.reflow(h)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new xo(t.x1,e.y1,t.x2,e.y2)},e.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.plotArea.bindPoint(r,n),a=s.valueFields,p=s.fields;t(a,at({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(To);te(rp,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),at(rp.prototype,_a);const np=rp;var sp=function(t){function e(e,o){t.call(this,e,o),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new q.drawing.Group,s=new q.drawing.Circle(new q.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}]})}),a=new q.drawing.Circle(new q.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new q.Color(o.background).brightness(nn).toHex(),width:e.width,opacity:e.opacity},fill:Oo(this.options.pattern,{color:o.background,opacity:t.opacity})});return n.append(s,a),n},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width)/2+e.border.width/2;return new q.drawing.Circle(new q.geometry.Circle([i.x,i.y],r),t)},e}(sa);sp.prototype.defaults=at({},sp.prototype.defaults,{labels:{position:f},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),sp.prototype.defaults.highlight.zIndex=void 0;const ap=sp;var pp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=T,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,o){null!==e.size&&(e.size>0||e.size<0&&o.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,o)):(this.points.push(null),this.seriesPoints[o.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return ap},e.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(on/i),n={delay:r,duration:on-r,type:mn},s=e.color||o.color;t.size<0&&o.negativeValues.visible&&(s=Kt(o.negativeValues.color,s));var a=at({labels:{animation:{delay:r,duration:on-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:g,border:o.border,opacity:o.opacity,animation:n}});a=this.evalPointOptions(a,t,e),it(o.color)&&(s=a.color),a.markers.background=s;var p=new ap(t,a);return p.color=s,this.append(p),p},e.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,l=(Math.PI*a*a-p)/this._maxSize,h=0;h<n.length;h++){var c=n[h];if(c){var u=Math.abs(c.value.size)*l,d=Math.sqrt((p+u)/Math.PI),f=Kt(c.options.zIndex,0)+(1-d/a);at(c.options,{zIndex:f,markers:{size:2*d,zIndex:f},labels:{zIndex:f+1}})}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(np);te(pp,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const lp=pp;var hp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ro);at(hp.prototype,ia);const cp=hp;var up=function(t){function e(e,o){t.call(this,o),this.aboveAxis=this.options.aboveAxis,this.color=o.color||z,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,zt(this.value.target)&&(this.target=new cp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:V,align:B}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Ea(this.getLabelText(t),t,this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.reflow=function(t){this.render();var e=this,o=e.options,i=e.target,r=e.owner,n=o.invertAxes,s=r.seriesValueAxis(this.options),a=r.categorySlot(r.categoryAxis,o.categoryIx,s),p=s.getSlot(this.value.target),l=n?p:a,h=n?a:p;if(i){var c=new xo(l.x1,h.y1,l.x2,h.y2);i.options.height=n?c.height():o.target.line.width,i.options.width=n?o.target.line.width:c.width(),i.reflow(c)}var u=this.label;u&&(u.options.aboveAxis=this.aboveAxis,u.reflow(t)),this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var e=this.options,o=q.drawing.Path.fromRect(this.box.toRect(),{fill:Oo(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&o.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),this.bodyVisual=o,Z(o),this.visual.append(o)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=q.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return q.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.getIndex=function(){return this.categoryIx},e}(To);up.prototype.tooltipAnchor=ja.prototype.tooltipAnchor,up.prototype.createFocusHighlight=ja.prototype.createFocusHighlight,te(up,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(up.prototype,ia),at(up.prototype,ra),at(up.prototype,Ra);const dp=up;var fp=function(t){function e(e,o){!function(t){for(var e=t.series,o=0;o<e.length;o++){var i=e[o],r=i.data;!r||G(r[0])||pt(r[0])||(i.data=[r])}}(o),t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.plotRange=function(t){var e=t.series,o=this.seriesValueAxis(e),i=this.categoryAxisCrossingValue(o);return[i,t.value.current||i]},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=this.options,n=this.children,s=t.valueFields,a=at({vertical:!r.invertAxes,overlay:i.overlay,categoryIx:o,invertAxes:r.invertAxes},i),p=t.fields.color||i.color;a=this.evalPointOptions(a,s,e),it(i.color)&&(p=a.color);var l=new dp(s,a);l.color=p;var h=n[o];return h||(h=new Ha({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),h.append(l),l},e.prototype.updateRange=function(t,e){var o=t.current,i=t.target,r=e.series.axis,n=this.valueAxisRanges[r];zt(o)&&!isNaN(o)&&zt(i&&!isNaN(i))&&((n=this.valueAxisRanges[r]=n||{min:P,max:T}).min=Math.min(n.min,o,i),n.max=Math.max(n.max,o,i))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},e}(ea);fp.prototype._setAnimationOptions=Wa.prototype._setAnimationOptions,te(fp,{animation:{type:yn}});const gp=fp;var yp=function(t){function e(e,o){t.call(this),this.chartService=e,this.options=at({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;if(e){var r=e.color||e.options.color;o=Kt(o,r),i=Kt(i,r)}var n=void 0!==t.padding?dt(t.padding):{};return"object"==typeof t.padding&&(n.top=void 0!==t.padding.top?n.top:void 0,n.right=void 0!==t.padding.right?n.right:void 0,n.bottom=void 0!==t.padding.bottom?n.bottom:void 0,n.left=void 0!==t.padding.left?n.left:void 0),{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:lt(t.border.width),paddingTop:lt(n.top),paddingBottom:lt(n.bottom),paddingLeft:lt(n.left),paddingRight:lt(n.right)}},e.prototype.show=function(t,e,o){if(this.chartService){t.format=e.format;var i=this.getStyle(e,o);t.style=i;var r=new q.Color(i.backgroundColor);zt(e.color)||r.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(vs,t),this.visible=!0}},e.prototype.hide=function(){this.chartService&&this.chartService.notify(ms),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(q.Class);te(yp,{border:{width:1},opacity:1});const vp=yp;var mp=function(t){function e(e,o,i){t.call(this,e,i),this.crosshair=o,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===m&&(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)},e.prototype.hide=function(){this.chartService.notify(ms,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,o,i=this.crosshair,r=this.options,n=r.position,s=r.padding,a=!i.axis.options.vertical,p=i.line.bbox();return a?(t=f,n===d?(e=V,o=p.bottomLeft().translate(0,s)):(e=d,o=p.topLeft().translate(0,-s))):(e=f,n===C?(t=B,o=p.topLeft().translate(-s,0)):(t=C,o=p.topRight().translate(s,0))),{point:o,align:{horizontal:t,vertical:e}}},e}(vp);te(mp,{padding:10});const xp=mp;var _p=function(t){function e(e,o,i){t.call(this,i),this.axis=o,this.stickyMode=o instanceof er;var r=this.options.tooltip;r.visible&&(this.tooltip=new xp(e,this,at({},r,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,o=this.point,i=e.options.vertical,r=this.getBox(),n=i?H:F,s=new q.geometry.Point(r.x1,r.y1);if(t=i?new q.geometry.Point(r.x2,r.y1):new q.geometry.Point(r.x1,r.y2),o)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(o));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=o[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?F:H,a=0;a<i;a++){var p=o[a];p.options.vertical!==r&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new q.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(To);te(_p,{color:u,width:2,zIndex:-1,tooltip:{visible:!1}});const bp=_p;var wp=function(t){function e(e,o){t.call(this,e),this.pane=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new q.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=q.drawing.Path.fromRect(t);Z(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||[],r=i.length,n=0;n<r;n++){var s=i[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.unclipBox=function(){for(var t=this.children,e=this._clipBox(),o=e.clone(),i=0;i<t.length;i++)for(var r=t[i].points||[],n=r.length,s=0;s<n;s++){var a=r[s];if(a&&a.unclipBox&&a.overlapsBox&&!1!==a.visible){if(!a.overlapsBox(e)){a.clipElements&&a.clipElements();continue}var p=a.unclipBox();if(o.overlaps(p)){var l=a.labelBox?a.labelBox():new xo,h=a.noteBox?a.noteBox():new xo,c=Math.max(l.height(),h.height()),u=Math.max(l.width(),h.width());o.wrapLimit(p,u,c)}}}return o},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(To);wp.prototype.isStackRoot=!0;const kp=wp;var Ap=function(t){function e(e){t.call(this,e),this.id="pane"+Sp++,this.createTitle(),this.content=new To,this.chartContainer=new kp({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;pt(t)&&(t=at({},t,{align:t.position,position:V})),this.title=$o.buildTitle(t,e.prototype.options.title),this.title&&this.append(this.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var o;Wt(this.children)===this.content&&(o=this.children.pop()),t.prototype.reflow.call(this,e),o&&this.children.push(o),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.unclipBox=function(){return this.chartContainer.unclipBox()},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),o=[],i=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?o:i,p=0;p<e.length;p++)if(0===a.length){var l=e[p];s!==l.options.vertical&&Vt(a,n.createGridLines(l))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new xo,i=0;i<e;i++){var r=t[i],n=r.options.vertical?H:F,s=r.lineBox();o[n+1]=s[n+1],o[n+2]=s[n+2]}if(0===o.x2)for(var a=this.parent.axes,p=a.length,l=0;l<p;l++){var h=a[l];if(!h.options.vertical){var c=h.lineBox();o.x1=c.x1,o.x2=c.x2}}return o},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Ur(this),index:this.paneIndex,name:this.options.name})},e}(Bo),Sp=1;Ap.prototype.isStackRoot=!0,te(Ap,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const Cp=Ap;var Pp=function(t){return!1!==t.options.visible},Tp=function(t){function e(e,o,i){t.call(this,o),this.initFields(e,o),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=o,this.originalSeries=e,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.bindPoint=function(t,e,o){var i=this._bindCache.get(t);i||(i=[],this._bindCache.set(t,i));var r=i[e];return r||(r=i[e]=Qr.current.bindPoint(t,e,o)),r},e.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=at({title:{color:t.color}},e),s=0;s<i;s++){var a=at({},n,o[s]);$(a.title)&&(a.title=at({text:a.title},n.title));var p=new Cp(a);p.paneIndex=s,r.push(p),this.append(p)}this.panes=r},e.prototype.crosshairOptions=function(t){return t.options.crosshair},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);if(n&&n.visible){var s=new bp(this.chartService,r,n);this.crosshairs.push(s),o.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;i>=0;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},e.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},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},e.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=t[a],l=!1!==p.visible;if(!1!==p.visibleInLegend){var h=p.name,c=l?vt(i):vt(n)||vt(i);c&&(h=c({text:Xs(h)?h:"",series:p}));var u=p._defaults,d=p.color;it(d)&&u&&(d=u.color);var f=void 0,g=void 0;l?(f={},g=d):(f={color:n.color,font:n.font},g=r.markers.color),Xs(h)&&""!==h&&s.push({text:h,labels:f,markerColor:g,series:p,active:l})}}Vt(o.data,s)},e.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.push(s):e.push(s)}return{x:e,y:o,any:e.concat(o)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},e.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},e.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,i=dt(e.margin);this.box=t.clone().unpad(i),this.reflowArea(o),this.ensureLabelsFit(o)&&this.reflowArea(o)},e.prototype.reflowArea=function(t){this.reflowPanes(),this.detachLabels(),this.reflowAxes(t),this.reflowCharts(t)},e.prototype.ensureLabelsFit=function(t){var e=!1;return t.forEach((function(t){var o=t.unclipBox(),i=t.chartContainer._clipBox(),r=dt(t.options.padding||{});o.y1<i.y1+r.top&&(e=!0,r.top=i.y1-o.y1+r.top),o.y2>i.y2-r.bottom&&(e=!0,r.bottom=o.y2-i.y2+r.bottom),o.x1<i.x1+r.left&&(e=!0,r.left=i.x1-o.x1+r.left),o.x2>i.x2-r.right&&(e=!0,r.right=o.x2-i.x2+r.right),e&&(t.options.padding=r)})),e},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var o=this.getRoot();o&&o.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var r=0;r<e.length;r++)e[r].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var o=t.options,i=[].concat(o.axisCrossingValues||o.axisCrossingValue),r=e.length-i.length,n=i[0]||0,s=0;s<r;s++)i.push(n);return i},e.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,s=e.getSlot(i,i,!0),a=e.options.reverse?2:1,p=t.box.translate(s[F+a]-r[F+n],s[H+a]-r[H+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},l={},h=0;h<e.length;h++){var c=e[h],u=c.pane,f=u.id,g=!1!==c.options.visible,v=Lp(t,u)||o,m=r;if(v!==o&&(m=this.axisCrossingValues(v,e)),this.alignAxisTo(c,v,n[h],m[h]),!c.options._overlap){Zt(c.lineBox().x1)===Zt(v.lineBox().x1)&&(s[f]&&c.reflow(c.box.alignTo(s[f].box,C).translate(-c.options.margin,0)),g&&(s[f]=c)),Zt(c.lineBox().x2)===Zt(v.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,v,n[h],m[h]),a[f]&&c.reflow(c.box.alignTo(a[f].box,B).translate(c.options.margin,0)),g&&(a[f]=c));var x=Lp(e,u)||i;x!==c&&(c.alignTo(x),c.reflow(c.box))}}for(var _=0;_<t.length;_++){var b=t[_],w=b.pane,k=w.id,A=!1!==b.options.visible,S=Lp(e,w)||i,P=n;S!==i&&(P=this.axisCrossingValues(S,t)),this.alignAxisTo(b,S,r[_],P[_]),b.options._overlap||(Zt(b.lineBox().y1)===Zt(S.lineBox().y1)&&(b._mirrored||(b.options.labels.mirror=!b.options.labels.mirror,b._mirrored=!0),this.alignAxisTo(b,S,r[_],P[_]),p[k]&&b.reflow(b.box.alignTo(p[k].box,V).translate(0,-b.options.margin)),A&&(p[k]=b)),Zt(b.lineBox().y2,y)===Zt(S.lineBox().y2,y)&&(l[k]&&b.reflow(b.box.alignTo(l[k].box,d).translate(0,b.options.margin)),A&&(l[k]=b)),0!==_&&(b.alignTo(o),b.reflow(b.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Op(e),i=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(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))}},e.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Op(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},e.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(n.length>0){var a=Op(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);o=Math.max(o,s.x1-a.x1);for(var l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(o,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Bp(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]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(o>0)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},e.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&&!Ct(n,t)||e[r].reflow(i)}},e.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;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var l=parseInt(p,10)/100;a.options.height=l*t.height()}a.reflow(t.clone()),i-=a.options.height}else r++}for(var h=0;h<o;h++){var c=e[h];c.options.height||(c.options.height=i/r)}for(var u=0;u<o;u++){var d=e[u],f=t.clone().move(t.x1,n);d.reflow(f),n+=d.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,o=e.length,i=0;i<o;i++)for(var r=e[i],n=0;n<o;n++){var s=e[n];if(r.options.vertical!==s.options.vertical){var a=r.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(q.drawing.Path.fromRect(e[o].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,o=this.options.plotArea,i=o.opacity,r=o.background,n=o.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&zt(e)||(r=z,i=0);var s=this._bgVisual=new q.drawing.MultiPath({fill:{color:r,opacity:i},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var 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&&zt(s.value)&&null!==s.value&&o.push(s)}}return o},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsByPointIndex=function(t){return this.filterPoints((function(e){return e.getIndex()===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,o=[],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},e.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}},e.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}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,o=t.y;this.detachAxisGroupLabels(o,e),this.detachAxisGroupLabels(e,o)},e.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Lp(e,n)||e[0],a=i+o,p=this.createLabelAxis(r,a,s);if(p){o++;var l=n.axes.indexOf(r)+o;n.appendAxisAt(p,l)}}},e.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n=r!==b&&r!==E,s=i.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=o.options.vertical?a.x:a.y,l=this.axisCrossingValues(o,p),h=r===b,c=o.range(),u=h?c.max:c.min;if(Xt(l[e],c.min,c.max)-u==0)return null;l.splice(e+1,0,u),o.options.axisCrossingValues=l;var d=t.clone();return t.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d},e.prototype.isTrendline=function(t){return t&&Ct(t.type,ts)},e.prototype.trendlineFactory=function(){},e.prototype.createTrendlineSeries=function(){var t=this,e=[];return this.series=this.series.map((function(o){if(!t.isTrendline(o))return o;var i=t.seriesByName(o.for);if(!i)throw new Error('Invalid Configuration: Unable to locate linked series "'+o.for+'" for trendline "'+o.name+'".');var r=Qr.current.valueFields(i),n=Wt(r),s=t.trendlineFactory(Object.assign({},{field:n},o),i);return s&&(!1===i.visible&&(s.visible=!1),s.color===S&&(s.color=i.color),e.push(s)),s})).filter((function(t){return null!==t})),e},e.prototype.seriesByName=function(t){return this.series.find((function(e){return e.name===t}))},e.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(Pp);if(e)return e}},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},e.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},e.prototype._getNextPoint=function(t,e,o){var i=this,r=e.call(this,t).filter(Pp),n=r.indexOf(t)+o,s=function(o){var r,n=0;do{n+=o,r=e.call(i,t,n).filter(Pp)}while(0===r.length);return r};return n<0?(r=s(-1)).at(-1):n>=r.length?(r=s(1)).at(0):r[n]},e.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){void 0===e&&(e=0);var o=ot(t.series.index+e,this.series.length);return this.pointsBySeriesIndex(o)},e}(To);function Mp(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Op(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;if(n||Mp(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new xo}function Lp(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Bp=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};te(Tp,{series:[],plotArea:{margin:{}},background:"",border:{color:u,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Ip=Tp;var Ep={hover:function(t,e){this._dispatchEvent(t,e,ss)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};const Rp=Ep;var Vp=function(t){function e(e,o,i){t.call(this);var r=o.canonicalFields(e),n=o.valueFields(e),s=o.sourceFields(e,r),a=this._seriesFields=[],p=i.query(e.type),l=e.aggregate||p;this._series=e,this._binder=o;for(var h=0;h<r.length;h++){var c=r[h],u=void 0;if(pt(l))u=l[c];else{if(0!==h&&!Ct(c,n))break;u=l}u&&a.push({canonicalName:c,name:s[h],transform:it(u)?u:Yr[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};if(n&&!K(n)&&!G(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<i.length;p++){var l=i[p],h=this._bindField(r.values,l.canonicalName),c=l.transform(h,o,r.dataItems,e);if(!(null===c||!pt(c)||zt(c.length)||c instanceof Date)){s=c;break}zt(c)&&jp(l.name,s,c)}return s},e.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}},e.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n,s=t[r],a=s.valueFields;n=zt(a[e])?a[e]:s.fields[e],o.push(n)}return o},e}(q.Class);function jp(t,e,o){var i=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),zt(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}const zp=Vp;var Dp=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(q.Class);Dp.current=new Dp;const Fp=Dp;var Hp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=at({},t,t.from),o=at({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),o.visible&&(this.labelTo=this.createLabelElement(o),this.append(this.labelTo))},e.prototype.reflow=function(t){this.render();var e=this,o=e.labelFrom,i=e.labelTo,r=e.value;this.box=t,o&&(o.options.aboveAxis=r.from>r.to,o.reflow(t)),i&&(i.options.aboveAxis=r.to>r.from,i.reflow(t)),this.note&&this.note.reflow(t)},e}(ja);Hp.prototype.defaults=at({},Hp.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const Np=Hp;var Up=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Np},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.from,r=t.to,n=this.valueAxisRanges[o];null!==t&&K(i)&&K(r)&&((n=this.valueAxisRanges[o]=n||{min:P,max:T}).min=Math.min(n.min,i),n.max=Math.max(n.max,i),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Wa);Up.prototype.plotLimits=ea.prototype.plotLimits;const Gp=Up;var Wp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(sa);const Xp=Wp;var Yp="auto",qp=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Oe(),this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,o=t.labels,i=this.value,r=this.fromPoint=new Xp(i,at({},this.options,{labels:o.from,markers:e.from})),n=this.toPoint=new Xp(i,at({},this.options,{labels:o.to,markers:e.to}));this.copyFields(r),this.copyFields(n),this.append(r),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,o=t.to;this.positionLabels(e,o),this.fromPoint.reflow(e),this.toPoint.reflow(o),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.createFocusHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i,r=this.box,n=r.center(),s=C;return this.options.vertical?(e=n.x,o=r.y1-5,i=d):(e=r.x2+5,o=n.y,i=f),{point:new yo(e,o),align:{horizontal:s,vertical:i}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var o,i,r=this.options,n=r.labels,s=r.vertical;n.position===Yp&&(s?e.y1<=t.y1?(i=cn,o=un):(i=un,o=cn):e.x1<=t.x1?(i=C,o=B):(i=B,o=C),n.from&&n.from.position||(this.fromPoint.options.labels.position=o),n.to&&n.to.position||(this.toPoint.options.labels.position=i))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e.prototype.focusVisual=function(){this.fromPoint.focusVisual()},e.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},e.prototype.getIndex=function(){return this.categoryIx},e}(To);at(qp.prototype,ia),at(qp.prototype,ra),qp.prototype.defaults={markers:{visible:!1,background:z,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,margin:dt(3),padding:dt(4),animation:{type:rn,delay:on},position:Yp},notes:{label:{}},highlight:{markers:{border:{color:z,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}};const Zp=qp;var Qp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t),o=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),o.segments.push.apply(o.segments,this.stackSegments()),this.visual.append(e),this.visual.append(o)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(Aa);const Kp=Qp;var $p=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new zr).process(this.toGeometryPoints(t))},e}(Kp);const Jp=$p;var tl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(Kp);at(tl.prototype,ca);const el=tl;var ol=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return Zp},e.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=t.valueFields;if(!Xs(r.from)&&!Xs(r.to)){if(this.seriesMissingValues(o)!==ln)return null;r={from:0,to:0}}var n=this.pointOptions(o,i);n=this.evalPointOptions(n,r,e);var s=t.fields.color||o.color;it(o.color)&&(s=n.color);var a=new Zp(r,n);return a.color=s,this.append(a),a},e.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?Jp:"step"===i?el:Kp)(t,e,o)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),i=t.getSlot(e[1],e[1],!this.options.clip);if(o&&i)return{from:o,to:i}},e.prototype.pointSlot=function(t,e){var o,i,r=e.from,n=e.to;return this.options.invertAxes?(o=new xo(r.x1,t.y1,r.x2,t.y2),i=new xo(n.x1,t.y1,n.x2,t.y2)):(o=new xo(t.x1,r.y1,t.x2,r.y2),i=new xo(t.x1,n.y1,t.x2,n.y2)),{from:o,to:i}},e.prototype.addValue=function(e,o){var i=e.valueFields;K(i.from)||(i.from=i.to),K(i.to)||(i.to=i.from),t.prototype.addValue.call(this,e,o)},e.prototype.updateRange=function(t,e){if(null!==t&&K(t.from)&&K(t.to)){var o=e.series.axis,i=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:P,max:T},r=t.from,n=t.to;i.min=Math.min(i.min,r,n),i.max=Math.max(i.max,r,n)}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.from,o.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},e}(ea);at(ol.prototype,va,_a);const il=ol;var rl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this,o=e.options,i=e.value,r=e.owner.seriesValueAxis(o),n=[],s=[],a=[],p=r.getSlot(i.low,i.high),l=r.getSlot(i.open,i.open),h=r.getSlot(i.close,i.close);l.x1=h.x1=p.x1=t.x1,l.x2=h.x2=p.x2=t.x2;var c=p.center().x;n.push([l.x1,l.y1]),n.push([c,l.y1]),s.push([c,h.y1]),s.push([h.x2,h.y1]),a.push([c,p.y1]),a.push([c,p.y2]),this.lines=[n,s,a],this.box=p.clone().wrap(l.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Ya);const nl=rl;var sl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return nl},e}(Za);const al=sl;var pl=function(t){function e(e,o,i){t.call(this),this.from=e,this.to=o,this.series=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,o=this.to.box,i=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;i.push([e.x1,r],[o.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;i.push([n,e.y1],[n,o.y2])}return i},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},o=q.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Z(o),this.visual.append(o)},e}(To);te(pl,{animation:{type:rn,delay:on}});const ll=pl;var hl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=zs(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 l=Qr.current.bindPoint(n,p),h=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(l.valueFields.value=s,u=0,d=s):(l.valueFields.value=a,d=u-a,a=0):K(h)&&(a+=h,d=s+=h),t(l,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},e.prototype.updateRange=function(e,o){t.prototype.updateRange.call(this,{value:o.to},o)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],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=n[a];if(p&&s){var l=new ll(s,p,r);o.push(l),this.append(l)}s=p}}},e}(Wa);const cl=hl,ul=function(t,e,o){var i=t[String(e)];return i?i(o):null},dl=function(t,e){for(var o,i,r=0,n=0,s=0,a=0,p=0,l=Number.MAX_VALUE,h=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;isFinite(d)&&null!==d&&isFinite(f)&&null!==f&&(l=Math.min(d,l),h=Math.max(d,h),p++,r+=d,n+=f,s+=Math.pow(d,2),a+=d*f)}return p>0&&(i=(n-(o=(p*a-r*n)/(p*s-Math.pow(r,2)))*r)/p),{slope:o,intercept:i,count:p,xMin:l,xMax:h}},fl=function(t,e){return t.every((function(t){var o=t.valueFields;return!Xs(o[e])||o[e]>0}))},gl=function(t,e){for(var o=[],i=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,i.min)),max:Math.ceil(Math.min(r.max+2,i.max))},s=n.min;s<n.max;s++){var a=s+1;o[s]={category:e.categoryAt(s,!0),value:t(a)}}return o};const yl=function(t,e,o){for(var i=[],r=[],n=Math.max(2,o)-1,s=0,a=0,p=0;p<t.length;p++){var l=e(t[p]),h=l.xValue,c=l.yValue;if(isFinite(c)&&null!==c?(r.push(c),a+=c,s=Math.max(p,s)):r.push(null),p>=n){var u=r.filter((function(t){return null!==t})).length,d=r.shift()||0;if(u>0){var f=a/u;i.push([h,f]),a-=d;continue}}i.push([h,null])}return i.slice(0,s+1)};const vl=function(t,e,o){for(var i=Math.min(Math.max(o||1,1),6)+1,r=new Ce,n=new Ce,s=0,a=Number.MAX_VALUE,p=Number.MIN_VALUE,l=function(t){return t},h=[],c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;if(isFinite(d)&&null!==d&&isFinite(f)&&null!==f){a=Math.min(d,a),p=Math.max(d,p),s++,n.set(c,0,f),r.set(c,0,1),r.set(c,1,d);for(var g=2;g<=i;g++)r.set(c,g,Math.pow(r.get(c,1),g))}else r.set(c,0,0)}return r.width=Math.min(i,s),s>0&&(h=function(t,e){for(var o=t.transpose(),i=o.multiply(t).inverse().multiply(o).multiply(e),r=[],n=0;n<i.height;n++)r.push(i.get(n,0));return r}(r,n),l=function(t){return h.reduce((function(e,o,i){return e+o*Math.pow(t,i)}),0)}),{coefficients:h,count:s,valueMapper:l,xMin:a,xMax:p}};var ml={};ml[qn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e=t.categoryAxis,o=t.options,i=(0,t.seriesValues)();if(!fl(i,o.field))return null;var r,n=dl(i,(r=o.field,function(t){var e=t.categoryIx,o=t.valueFields;return{xValue:e+1,yValue:Math.log(o[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return gl((function(t){return p*Math.exp(l*t)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},ml[Zn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e,o=t.categoryAxis,i=t.options,r=dl((0,t.seriesValues)(),(e=i.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),n=r.slope,s=r.intercept;return r.count>0?gl((function(t){return n*t+s}),o):null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},ml[Qn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e,o=t.categoryAxis,i=t.options,r=dl((0,t.seriesValues)(),(e=i.field,function(t){var o=t.categoryIx,i=t.valueFields;return{xValue:Math.log(o+1),yValue:i[e]}})),n=r.slope,s=r.intercept;if(r.count>0){var a=n,p=s;return gl((function(t){return a*Math.log(t)+p}),o)}return null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},ml[Kn]=function(t){var e=t.options,o=function(t){var e=t.categoryAxis,o=function(t){var e,o=t.options,i=t.categoryAxis,r=t.seriesValues,n=(o.trendline||{}).period||2,s=i.totalRangeIndices(),a=i.currentRangeIndices(),p={min:Math.floor(Math.max(a.min-n,s.min)),max:Math.ceil(Math.min(a.max+n+2,s.max))};return yl(r(p),(e=o.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),n)}(t),i=[];return o.forEach((function(t){var o=t[0],r=t[1];i[o]={category:e.categoryAt(o,!0),value:r}})),i.length>0?i:null}(t);return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},ml[$n]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e,o=t.seriesValues,i=t.categoryAxis,r=t.options,n=(r.trendline||{}).order,s=vl(o(),(e=r.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),n),a=s.count,p=s.valueMapper;return a>0?gl((function(t){return p(t)}),i):null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},ml[Jn]=function(t){var e=t.options,o=t.categoryAxis,i=function(t){var e=t.categoryAxis,o=t.options,i=(0,t.seriesValues)();if(!fl(i,o.field))return null;var r,n=dl(i,(r=o.field,function(t){var e=t.categoryIx,o=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(o[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return gl((function(t){return p*Math.pow(t,l)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:o,options:e});return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null};const xl=ml;var _l=[gn,Hn,Vn,Wn],bl=[Pn,Gn].concat(_l),wl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Ba,this._seriesPointsCache={},this._currentPointsCache={},t.length>0){this.invertAxes=Ct(t[0].type,[yn,xn,Gn,Hn,Wn,jn,Cn,Nn]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createCategoryAxes(t),this.aggregateCategories(t),this.createTrendlineSeries(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof er?delete this.namedCategoryAxes[o]:(this.valueAxisRangeTracker.reset(o),delete this.namedValueAxes[o]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.trendlineFactory=function(t,e){var o=this.seriesCategoryAxis(t),i=this.seriesValues.bind(this,e.index),r=ul(xl,t.type,{options:t,categoryAxis:o,seriesValues:i});return r?(r.categoryAxis=e.categoryAxis,r.valueAxis=e.valueAxis,this.filterSeries(r,o)):r},e.prototype.trendlineAggregateForecast=function(){return this.series.map((function(t){return(t.trendline||{}).forecast})).filter((function(t){return void 0!==t})).reduce((function(t,e){return{before:Math.max(t.before,e.before||0),after:Math.max(t.after,e.after||0)}}),{before:0,after:0})},e.prototype.seriesValues=function(t,e){var o=[],i=this.srcSeries[t],r=this.seriesCategoryAxis(i);Ds(r.options.type,m)&&(this._seriesPointsCache={},this._currentPointsCache={},r.options.dataItems=[],i=this.aggregateSeries(i,r,r.totalRangeIndices()));for(var n=e?e.min:0,s=e?e.max:i.data.length,a=n;a<s;a++){var p=this.bindPoint(i,a);o.push({categoryIx:a,category:p.fields.category,valueFields:p.valueFields})}return o},e.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);var n=this.filterVisibleSeries(r);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],i)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(Ns(t,[gn,Hn]),e),this.createRangeAreaChart(Ns(t,[Vn,Wn]),e),this.createBarChart(Ns(t,[bn,yn]),e),this.createRangeBarChart(Ns(t,[zn,jn]),e),this.createBulletChart(Ns(t,[xn,Un]),e),this.createCandlestickChart(Ns(t,_n),e),this.createBoxPlotChart(Ns(t,[vn,Nn]),e),this.createOHLCChart(Ns(t,Tn),e),this.createWaterfallChart(Ns(t,[Xn,Cn]),e),this.createLineChart(Ns(t,[Pn,Gn]),e)},e.prototype.aggregateCategories=function(t){var e=[].concat(this.series),o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i];if(!this.isTrendline(r)){var n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(Ds(n.options.type,m)||r.categoryField)&&Ct(s,t)?this.aggregateSeries(r,n,n.currentRangeIndices()):this.filterSeries(r,n)}o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},e.prototype.filterSeries=function(t,e){var o=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,o),!zt(e.options.min)&&!zt(e.options.max))return t;var i=e.currentRangeIndices(),r=Ct(t.type,bl),n=at({},t);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&$s(n,i,o,(function(o){return{item:t.data[o],category:e.categoryAt(o,!0),categoryIx:o-i.min}}),(function(e){return zt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,n=Ds(i.type,m),s=t.data,a=[];n||e.indexCategories();for(var p=0;p<s.length;p++){var l=Qr.current.bindPoint(t,p).fields.category;if(n&&(l=Gs(l,s[p],this.chartService.intl)),zt(l)||(l=r[p]),zt(l)&&null!==l){var h=e.totalIndex(l);a[h]=a[h]||{items:[],category:l},a[h].items.push(p)}}return this._currentPointsCache[o]=a,a},e.prototype.aggregateSeries=function(t,e,o){if(!t.data.length)return t;for(var i=this.seriesSourcePoints(t,e),r=at({},t),n=new zp(at({},t),Qr.current,Fp.current),s=r.data=[],a=e.options.dataItems||[],p=function(t){var r=t-o.min,s=i[t];if(s||(s=i[t]={}),s.categoryIx=r,!s.item){var a=e.categoryAt(t,!0);s.category=a,s.item=n.aggregatePoints(s.items,a)}return s},l=o.min;l<=o.max;l++){var h=p(l);s[h.categoryIx]=h.item,h.items&&h.items.length&&(a[h.categoryIx]=h.item)}return Ct(r.type,bl)&&$s(r,o,e.totalCount(),p,(function(t){return i[t]})),e.options.dataItems=a,r},e.prototype.appendChart=function(e,o){var i=e.options.series,r=this.seriesCategoryAxis(i[0]),n=r.options.categories,s=Math.max(0,zs(i)-n.length);if(s>0)for(n=r.options.categories=r.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,i=wt([].concat(e.valueAxis),(function(t){return t.name===o}))[0],r=((e.panes||[{}])[0]||{}).name||"default";return(i||{}).pane||r},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,o=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!o)throw new Error("Unable to locate category axis with name "+e);return o},e.prototype.stackableChartOptions=function(t,e){var o=t.some((function(t){return t.stack})),i=t.some((function(t){return t.stack&&"100%"===t.stack.type})),r=e.options.clip;return{defaultStack:t[0].stack,isStacked:o,isStacked100:i,clip:r}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";Ae(o,r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=Al(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Wa(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(t,e)));this.appendChart(i,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Gp(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var o=t[0],i=new gp(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new wa(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new Oa(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(o,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var o=new il(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var o=t[0],i=new al(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var o=t[0],i=new Za(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var o=t[0],i=new ep(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var o=t[0],i=new cl(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var o=Ns(this.series,Yn),i=0;i<this.series.length;i++){var r=this.series[i];if(Ct(r.type,_l)){var n=r.line;n&&n.style===fn&&o.push(r)}}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof er&&t[e].createLabels()},e.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(Ct(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=at({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?P:0},n),zt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(Ys(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),p=new hr(n,this.chartService)):p=new er(n,this.chartService),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 l=this.categoryAxis||i[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!Ct(t[e].type,_l))return!1;return!0},e.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(Ct(this.findPane(p.pane),t)){var l=p.name,h=Ds(p.type,ws)?{min:.1,max:1}:{min:0,max:1},c=e.query(l)||o||h;0===a&&c&&o&&(c.min=Math.min(c.min,o.min),c.max=Math.max(c.max,o.max));var u=new(Ds(p.type,ws)?Ar:vr)(c.min,c.max,at({},n,p),this.chartService);if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var d=this.valueAxis||s[0];this.valueAxis=d,r?this.axisX=d:this.axisY=d},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,l=0;l<p.length;l++){var h=p[l];h.getValue?Es(a,h.getValue(r)):Es(s,h.getCategory(r))}0===s.length&&Es(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(o,{element:Ut(e),originalEvent:e,category:qs(s),value:qs(a)})}},e.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}},e.prototype.updateAxisOptions=function(t,e){kl(this.options,t,e),kl(this.originalOptions,t,e)},e.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){if(void 0===e&&(e=0),this.invertAxes)return this._siblingsByPointIndex(t.getIndex());var o=this._siblingsBySeriesIndex(t.series.index,e);return this.chartService.rtl?o.reverse():o},e.prototype._siblingsByPointIndex=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++){var r=e[i];if(!r.pane||"_navigator"!==r.pane.options.name){var n=r.points.filter((function(e){return e&&!1!==e.visible&&e.getIndex()===t}));o.push.apply(o,n.sort(this._getSeriesCompareFn(n[0])))}}return o},e.prototype._siblingsBySeriesIndex=function(t,e){var o=ot(t+e,this.series.length);return this.pointsBySeriesIndex(o)},e.prototype._getSeriesCompareFn=function(t){var e=this._isInStackedSeries(t);return e&&this.invertAxes||!e&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},e.prototype._isInStackedSeries=function(t){var e=Ct(t.series.type,[gn,Hn,Vn,Wn,Pn,Gn,Rn,In]),o=Ct(t.series.type,[bn,yn]);return e||o&&t.options.isStacked},e}(Ip);function kl(t,e,o){at([].concat(e instanceof er?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}function Al(t,e,o){return wt(t,(function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e}))}te(wl,{categoryAxis:{},valueAxis:{}}),at(wl.prototype,Rp);const Sl=wl;var Cl=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},e.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;if(i){var r={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Pl,visual:t.highlightVisual(),show:e};i(r),r._defaultPrevented||t.toggleHighlight(e,o)}else t.toggleHighlight(e,o)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1},e}(q.Class);function Pl(){this._defaultPrevented=!0}const Tl=Cl;function Ml(t,e){var o=(e||"").toLowerCase(),i=t.event;return"none"===o&&!(i.ctrlKey||i.shiftKey||i.altKey)||i[o+"Key"]}function Ol(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 Ll=function(t){function e(e,o){t.call(this),this.plotArea=e,this.options=at({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=Ml(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,F).concat(this._panAxes(t,H));if(e.length)return this.axisRanges=e,Ol(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==i&&(r||"").toLowerCase()!==e)for(var s=o.axes,a=0;a<s.length;a++){var p=s[a];if(e===F&&!p.options.vertical||e===H&&p.options.vertical){var l=p.pan(i);l&&(l.limitRange=!0,n.push({axis:p,range:l}))}}return n},e}(q.Class);Ll.prototype.options={key:"none",lock:"none"};const Bl=Ll;var Il=function(t){function e(e,o){t.call(this),this.chart=e,this.options=at({},this.options,o),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){ut(this._marquee,t)},e.prototype.start=function(t){if(Ml(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),i=this._zoomPane=e._plotArea.paneByPoint(o),r=i?i.chartsBox().clone():null;if(i&&r){var n=this._elementOffset();return r.translate(n.left,n.top),this._zoomPaneClipBox=r,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},e.prototype._elementOffset=function(){var t=this.chart.element,e=ut(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,i=e.paddingTop,r=Ft(t);return{left:o+r.left,top:i+r.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),o=this._selectionPosition(t);o.left-=e.left,o.top-=e.top;var i={x:o.left,y:o.top},r={x:o.left+o.width,y:o.top+o.height};return this._updateAxisRanges(i,r),this.removeElement(),delete this._zoomPane,Ol(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==F||a)&&(o!==H||!a)&&zt(s.axisIndex)){var p=s.pointsRange(t,e);p&&i.push({axis:s,range:p})}}this.axisRanges=i},e.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),l=Math.abs(o.y-r);return n===F&&(s=e.x1,p=e.width()),n===H&&(a=e.y1,l=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(l=e.y2-o.y),r<e.y1&&(l=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:l}},e}(q.Class);Il.prototype.options={key:"shift",lock:"none"};const El=Il;var Rl=function(t){function e(e,o){t.call(this),this.chart=e,this.options=at({rate:.3},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==F||a)&&(o!==H||!a)&&s.zoomRange){var p=Xt(this.options.rate,.01,.9),l=s.zoomRange(-t*p,e);l&&i.push({axis:s,range:l})}}return this.axisRanges=i,Ol(i)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(q.Class);const Vl=Rl;var jl=function(t){function e(e,o){t.call(this,e),this.chartService=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t,e=this.children,o=this.options,i=o.vertical;this.visual=new q.drawing.Layout(null,{spacing:i?0:o.spacing,lineSpacing:i?o.spacing:0,orientation:i?"vertical":U,reverse:o.rtl,alignItems:i?(t=o.rtl,t?b:E):f});for(var r=0;r<e.length;r++){var n=e[r];n.reflow(new xo),n.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?Xo(e):new xo},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(To);const zl=jl;var Dl=10,Fl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e.prototype.markerOptions=function(){return this.options},e.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return at({},t,{background:t.border.color},t.highlight,t.type===v?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},e.prototype.createHighlight=function(){var e=new t(this.markerHighlightOptions()),o=this.paddingBox.clone();return e.reflow(o.pad(e.options.border.width)),this.highlight=[e.getElement()],this.highlight},e}(Ro);te(Fl,{border:{width:2},width:8,height:8,background:z,margin:{top:-1,left:-1},vAlign:V,align:C,highlight:{width:Dl,height:Dl,border:{color:z,width:2}}});const Hl=Fl;var Nl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath(this.visualStyle()),o=this.paddingBox,i=o.height()/2;return e.moveTo(o.x1,o.y1+i).lineTo(o.x1,o.y2).lineTo(o.x2,o.y2),t.append(e),t},e}(Ro);te(Nl,{width:15,height:15,align:B,vAlign:d,margin:{right:-2,bottom:2}});const Ul=Nl;var Gl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),o=this.paddingBox,i=o.center().y;return e.moveTo(o.x1,i).lineTo(o.x2,i),t.append(e),t},e.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},e.prototype.createHighlightLine=function(){var t=at({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),e=new Ul(t);return e.reflow(this.parent.paddingBox.clone()),this.highlightLine=e.getElement(),this.highlightLine},e.prototype.createHighlightMarker=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),o=new t(e),i=this.parent.paddingBox,r=e.border.width,n=this.parent.box.clone();return n.pad({left:r-i.x1,top:r-i.y1}),o.reflow(n),this.highlightMarker=o.getElement(),this.highlightMarker},e}(Ro);te(Gl,{border:{width:0},type:"rect",align:C,vAlign:f,highlight:{border:{width:2},markers:{type:g,width:Dl,height:Dl,border:{width:2,color:z},align:C,vAlign:V}}});const Wl=Gl;var Xl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),o=new t(e),i=this.paddingBox.clone(),r=this.parent.box.clone();return i.align(r,F,C),i.align(r,H,V),o.reflow(i),this.highlight=[o.getElement()],this.highlight},e}(Ro);te(Xl,{highlight:{markers:{type:g,width:Dl,height:Dl,border:{width:2,color:z},margin:{top:-3,left:-3}}}});const Yl=Xl;var ql=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Oe(),this.options.accessibility.ariaChecked=e.active}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new No({vertical:!1,wrap:!1,align:f,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.markerWrap=new t({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},e.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,o=t.line;void 0===o&&(o={});var i={border:{color:o.color||e,opacity:o.opacity,dashType:o.dashType}};return this._createLine(i)||this._createMarkerLine(i,o)||this._createSquare()},e.prototype.markerOptions=function(){var t=this.options,e=t.markers;void 0===e&&(e={});var o=t.markerColor,i=e.border;return void 0===i&&(i={}),e.zIndex=void 0,at({},e,{border:{color:i.color||o},highlight:t.highlight.markers})},e.prototype._highlightOptions=function(){var t=this.options;return at({markers:{type:t.markers.type}},t.highlight)},e.prototype._createLine=function(t){var e=this.options;return e.type!==Pn||e.markers.visible||(this._line=new Wl(at({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},e.prototype._createMarkerLine=function(t,e){return this.options.type===Pn&&(this._markerLineArea=new Ul(at({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},e.prototype._reduceSize=function(t,e,o){void 0===o&&(o=.6),"number"==typeof t[e]&&(t[e]=t[e]*o)},e.prototype._createSquare=function(){var t=this.options;if(t.type===gn){var e=t.pattern||(t.series||{}).pattern;e&&("function"==typeof e&&(e=e(t.series)),e=Object.assign({},e),this._reduceSize(e,"gap"),this._reduceSize(e,"width"),this._reduceSize(e,"radius")),this._square=new Yl(Object.assign({},{border:t.border,vAlign:t.markers.visible?d:f,highlight:this._highlightOptions()},t.area,{pattern:e,background:t.area.background||t.markerColor})),this.markerWrap.append(this._square)}return this._square},e.prototype._createMarker=function(){return new Hl(this.markerOptions())},e.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},e.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},e.prototype._toggleHighlight=function(t){var e=this;if(this.options.highlight.visible){var o=this._marker||this._square||this._line;if(o&&o===this._line&&this._line.visual.visible(!t),o){var i=o.highlight;i||(i=o.createHighlight()).forEach((function(t){return t&&e.markerWrap.appendVisual(t)})),i.forEach((function(e){return e&&e.visible(t)}))}}},e.prototype.createLabel=function(){var t=this.options,e=at({},t.labels);this.container.append(new Zo(t.text,e))},e.prototype.getAriaLabelText=function(){return this.options.text},e.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},e.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},o=this._itemOverlay=q.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:z,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(o)},e.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger(es,o)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);return t.trigger("legendItemHover",o)||(t._legendItemHover(o.seriesIndex,o.pointIndex),this._highlightMarkers()),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:Ut(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;if(this.options.visible){var o=at({ariaLabel:void 0!==e.accessibility.ariaLabel?e.accessibility.ariaLabel:e.text},e.accessibility);Io(this.visual,o)}},e.prototype.renderVisual=function(){var e=this,o=this.options,i=o.visual;i?(this.visual=i({active:o.active,series:o.series,sender:this.getSender(),pointIndex:o.pointIndex,options:{type:o.type,markers:at({background:this.options.markerColor},this.markerOptions()),labels:o.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return q.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},e}(Bo);te(ql,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const Zl=ql;var Ql="custom",Kl=function(t){function e(e,o){void 0===o&&(o={}),t.call(this,e),this.chartService=o,Ct(this.options.position,[V,B,d,C,Ql])||(this.options.position=B),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=f;e===Ql?i=C:Ct(e,[V,d])?(i=o===E?C:o===b?B:f,r=e):o&&(o===E?r=V:o===b&&(r=d)),this.container=new Bo({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 Bo({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,o=this.isVertical(),i=new zl({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.data;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s],p=a.series||{},l=p.markers;void 0===l&&(l={});var h=p.dashType,c=p.legendItem,u=p.opacity,d=at({visible:!1!==l.visible,type:g},l);delete d.size;var f=at({},{markers:d,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:h},e.line),area:Object.assign({},{opacity:u},e.area),opacity:u,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers});i.append(new Zl(f))}i.render(),this.itemsContainer.append(i)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,o=t.position;return o===Ql&&e!==U||(zt(e)?e!==U:Ct(o,[C,B]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.getItems=function(){return this.itemsContainer.children[0].children},e.prototype.reflow=function(t){var e=this.options,o=t.clone();this.hasItems()?(e.position===Ql?(this.containerCustomReflow(o),this.box=o):this.containerReflow(o),this.hasTitle()&&this.title.reflow(new xo(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=o},e.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===V||i===d?F:H,a=this.isVertical(),p=t.clone(),l=t.clone();i!==C&&i!==B||(l.y1=p.y1=0),a&&n?(l.y2=l.y1+n,l.align(p,H,o.options.vAlign)):!a&&r&&(l.x2=l.x1+r,l.align(p,F,o.options.align)),o.reflow(l);var h=(l=o.box).clone();(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),o.reflow(l)),h[s+1]=t[s+1],h[s+2]=t[s+2],this.box=h},e.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),o.reflow(p),p=o.box,o.reflow(new xo(i,r,i+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=at({},{color:u,position:V,align:f},t),o=e.text;if(t&&!1!==t.visible&&t.text){if(zt(e)&&e.visible){var i=vt(e);i?o=i({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))}this.title=new Zo(o,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new No({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===d?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(To);te(Kl,{position:B,data:[],offsetX:0,offsetY:0,margin:dt(2),padding:dt(5),border:{color:u,width:0},item:{cursor:N,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:N,opacity:1},area:{type:"square",align:B,width:15,height:15}});const $l=Kl;var Jl=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];i=Ns(t,a.seriesTypes);var p=Ns(t,ts);if(i.length-p.length>0){n=a;break}}return new n.type(i,e,o)},e}(q.Class);Jl.current=new Jl;const th=Jl;function eh(t){var e=document.createElement("div");return t&&(e.className=t),e}function oh(t){for(var e=t;e&&!kt(e,"k-handle");)e=e.parentNode;return e}var ih=function(t){function e(e,o,i,r){t.call(this);var n=e.element;this.options=at({},this.options,i),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=o,this._dateAxis=this.categoryAxis instanceof hr,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=eh("k-selector k-pointer-events-none");ut(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=eh("k-selection k-pointer-events-none");this.leftMask=eh("k-mask k-pointer-events-none"),this.rightMask=eh("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o);var i=this.body=eh("k-selection-bg k-pointer-events-none");o.appendChild(i);var r=this.leftHandle=eh("k-handle k-left-handle k-pointer-events-auto"),n=this.rightHandle=eh("k-handle k-right-handle k-pointer-events-auto");r.appendChild(eh()),n.appendChild(eh()),o.appendChild(r),o.appendChild(n),this.chartElement.appendChild(e);var s=ut(o,["borderLeftWidth","borderRightWidth","height"]),a=ut(r,"height").height,p=ut(n,"height").height;t.selection={border:{left:s.borderLeftWidth,right:s.borderRightWidth}},ut(r,{top:(s.height-a)/2}),ut(n,{top:(s.height-p)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),jt(this.chartElement,((t={})[Cs]=this._mousewheelHandler,t))),this._domEvents=vi.create(this.chartElement,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&at(t,{min:Ki(o,t.min),max:Ki(o,t.max),from:Ki(o,t.from),to:Ki(o,t.to)});var i=ut(this.chartElement,["paddingLeft","paddingTop"]),r=i.paddingLeft,n=i.paddingTop;this.options=at({},{width:e.width(),height:e.height()+.1,padding:{left:r,top:n},offset:{left:e.x1+r,top:e.y1+n},from:t.min,to:t.max},t)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Qt(this.chartElement,((t={})[Cs]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._pointInPane=function(t,e){var o=this.categoryAxis.pane.box,i=this.chart._toModelCoordinates(t,e);return o.containsPoint(i)},e.prototype._start=function(t){var e=this.options,o=Ut(t);if(!this._state&&o){var i=Nt(t);if(this._pointInPane(i.x,i.y)){var r=oh(o),n=this.body.getBoundingClientRect(),s=!r&&i.x>=n.x&&i.x<=n.x+n.width&&i.y>=n.y&&i.y<=n.y+n.height;this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:s,range:{from:this._index(e.from),to:this._index(e.to)}};var a=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger(fs,a)&&(this._state=null)}}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:oh(Ut(t)))&&W(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this,o=e._state,i=e.options,r=e.categoryAxis,n=o.range,s=o.moveTarget,a=r.options.reverse,p=this._index(i.from),l=this._index(i.to),h=this._index(i.min),c=this._index(i.max),u=o.startLocation-t.x.location,d=n.from,f=n.to,g=n.to-n.from,y=ut(this.wrapper,"width").width/(r.categoriesCount()-1),v=Math.round(u/y)*(a?-1:1);if(s||o.inBody){var m=s&&kt(s,"k-left-handle"),x=s&&kt(s,"k-right-handle");o.inBody?(n.from=Math.min(Math.max(h,p-v),c-g),n.to=Math.min(n.from+g,c)):m&&!a||x&&a?(n.from=Math.min(Math.max(h,p-v),c-1),n.to=Math.max(n.from+1,n.to)):(m&&a||x&&!a)&&(n.to=Math.min(Math.max(h+1,l-v),c),n.from=Math.min(n.to-1,n.from)),n.from===d&&n.to===f||(this.move(n.from,n.to),this.trigger(gs,this._rangeEventArgs(n)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&Y(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger(ys,this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new yo(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),l=s-n,h=n+l/2,c={},u=3===t.event.which,d=Math.round(h-r);this._state||u||(this.chart._unsetActivePoint(),o.options.justified||d--,c.from=Math.min(Math.max(a,n-d),p-l),c.to=Math.min(c.from+l,p),this._start(t),this._state&&(this._state.range=c,this.trigger(gs,this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,o=Et(t);if(this._start(t),this._state){var i=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(o)>1&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(gs,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(i.from),to:this._value(i.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options,o=t.touches[0];if(this._pointInPane(o.pageX,o.pageY)){this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var i=this._rangeEventArgs(this._state.range);this.trigger(fs,i)?this._state=null:t.preventDefault()}},e.prototype._gestureend=function(){this._state&&(this.trigger(ys,this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){if(this._state){var e=this,o=e.chart,i=e._state,r=e.options,n=e.categoryAxis,s=i.range,a=o._toModelCoordinates(t.touches[0].x.location).x,p=o._toModelCoordinates(t.touches[1].x.location).x,l=Math.min(a,p),h=Math.max(a,p);t.preventDefault(),s.from=n.pointCategoryIndex(new yo(l))||r.min,s.to=n.pointCategoryIndex(new yo(h))||r.max,this.move(s.from,s.to),this.trigger(gs,this._rangeEventArgs(s))}},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,o=this._index(t);return e.getSlot(o,o,!0)},e.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?e:t,p=i?t:e,l="x"+(i?2:1),h=this._slot(a),c=Zt(h[l]-r.left+n.left);ut(this.leftMask,{width:c}),ut(this.selection,{left:c}),h=this._slot(p);var u=Zt(o.width-(h[l]-r.left+n.left));ut(this.rightMask,{width:u});var d=o.width-u;d!==o.width&&(d+=s.right),ut(this.rightMask,{left:d}),ut(this.selection,{width:Math.max(o.width-(c+u)-s.right,0)})},e.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=Xt(this._index(t),i,r),s=Xt(this._index(e),n+1,r);o.visible&&this.move(n,s),o.from=this._value(n),o.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=at({},a);if(this._state&&(a=this._state.range),r!==B&&(a.from=Xt(Xt(n-t,0,s-1),o,i)),r!==C&&(a.to=Xt(Xt(s+t,a.from+1,i),o,i)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.zoom=function(t,e){var o=this.options,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=at({},a),l=this.categoryAxis.options.reverse,h=F+(l?"2":"1"),c=this.categoryAxis.lineBox(),u=Math.abs(c[h]-e[F]),d=c.width(),f=Zt(u/d,2),g=Zt(f*t),y=Zt((1-f)*t);if(this._state&&(a=this._state.range),a.from=Xt(Xt(n-g,0,s-1),i,r),a.to=Xt(Xt(s+y,a.from+1,r),i,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(q.Class);te(ih,{visible:!0,mousewheel:{zoom:"both"},min:T,max:P});const rh=ih;var nh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var o=at({},this.options,e.options.tooltip),i=e.tooltipAnchor();i?(this._current=e,t.prototype.show.call(this,{point:e,anchor:i},o,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(vp);const sh=nh;var ah=function(t){function e(e,o){t.call(this,e.chartService,o),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var o=wt(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(o.length>0){var i=o[0],r=this.plotArea.categoryAxis.getSlot(i.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(i,r);this.show({anchor:n,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,r=o.center(),n=e.center();return{point:i?new yo(r.x,n.y):new yo(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(vp);te(ah,{categoryFormat:"{0:d}"});const ph=ah;var lh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var o=e.vertical?H:F,i=this.fromScale=new q.geometry.Point(1,1);i[o]=sn,t.transform(q.geometry.transform().scale(i.x,i.y))}else this.abort()},e.prototype.step=function(t){var e=Pt(this.fromScale.x,1,t),o=Pt(this.fromScale.y,1,t);this.element.transform(q.geometry.transform().scale(e,o,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(q.drawing.Animation);te(lh,{duration:on}),q.drawing.AnimationFactory.current.register(yn,lh);var hh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(q.geometry.transform().scale(sn,sn,t))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.center))},e}(q.drawing.Animation);te(hh,{easing:"easeOutElastic"}),q.drawing.AnimationFactory.current.register(mn,hh);var ch=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(q.drawing.Animation);te(ch,{duration:200,easing:"linear"}),q.drawing.AnimationFactory.current.register(rn,ch);var uh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(q.geometry.transform().scale(sn,sn,this.options.center))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.options.center))},e}(q.drawing.Animation);te(uh,{easing:"easeOutElastic",duration:on}),q.drawing.AnimationFactory.current.register(Mn,uh);const dh=uh;var fh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,o){return new(e.style===dn?ga:pa)(t,e,o)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===ln){var o={x:t.x,y:t.y};return Xs(o.x)||(o.x=0),Xs(o.y)||(o.y=0),o}},e}(np);at(fh.prototype,va);const gh=fh,yh=function(t,e,o){var i=[],r=e.xMin,n=e.xMax,s=(o||{}).forecast;s&&(s.before>0&&(r-=s.before),s.after>0&&(n+=s.after));var a=(o||{}).samplingInterval,p=Kt(a,go(r,n)/10);a<=0&&(p=n-r);for(var l=r;l<=n;l+=p)i.push([l,t(l)]);return i};const vh=function(t){return function(e){var o=e.valueFields;return{xValue:o.x,yValue:o[t]}}},mh=function(t,e){for(var o=Number.MAX_VALUE,i=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,a=n.yValue;isFinite(s)&&null!==s&&isFinite(a)&&null!==a&&(o=Math.min(s,o),i=Math.max(s,i))}return{xMin:o,xMax:i}};var xh={};xh[qn]=function(t){var e=t.options,o=function(t){var e=t.options,o=(0,t.seriesValues)();if(!fl(o,e.field))return null;var i,r=dl(o,(i=e.field,function(t){var e=t.valueFields;return{xValue:e.x,yValue:Math.log(e[i])}})),n=r.slope,s=r.intercept,a=r.count,p={xMin:r.xMin,xMax:r.xMax};if(a>0){var l=Math.exp(s),h=n;return yh((function(t){return l*Math.exp(h*t)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},xh[Zn]=function(t){var e=t.options,o=function(t){var e=t.options,o=dl((0,t.seriesValues)(),vh(e.field)),i=o.slope,r=o.intercept,n=o.count,s=o.xMin,a=o.xMax;return n>0?yh((function(t){return i*t+r}),{xMin:s,xMax:a},e.trendline):null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},xh[Qn]=function(t){var e=t.options,o=function(t){var e=t.options,o=(0,t.seriesValues)();if(!fl(o,"x"))return null;var i,r=dl(o,(i=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:e[i]}})),n=r.slope,s=r.intercept,a=r.count,p=mh(o,function(t){return function(e){var o=e.valueFields;return{xValue:o.x,yValue:o[t]}}}(e.field));if(a>0){var l=n,h=s;return yh((function(t){return l*Math.log(t)+h}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},xh[Kn]=function(t){var e=t.options,o=function(t){var e=t.options,o=t.seriesValues,i=(e.trendline||{}).period||2,r=yl(o({before:i,after:i}),vh(e.field),i);return r.length>0?r:null}(t);return o?Object.assign({},e,{type:"scatterLine",data:o}):null},xh[$n]=function(t){var e=t.options,o=function(t){var e=t.seriesValues,o=t.options,i=(o.trendline||{}).order,r=vh(o.field),n=vl(e(),r,i),s=n.count,a=n.valueMapper,p=n.xMin,l=n.xMax;return s>0?yh(a,{xMin:p,xMax:l},o.trendline):null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null},xh[Jn]=function(t){var e=t.options,o=function(t){var e=t.options,o=(0,t.seriesValues)();if(!fl(o,"x"))return null;var i,r=dl(o,(i=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:Math.log(e[i])}})),n=r.slope,s=r.intercept,a=r.count,p=mh(o,vh(e.field));if(a>0){var l=Math.exp(s),h=n;return yh((function(t){return l*Math.pow(t,h)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return o?Object.assign({},e,{type:"scatterLine",data:o}):null};const _h=xh;var bh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Ba,this.yAxisRangeTracker=new Ba},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(Ns(n,Dn),i),this.createScatterLineChart(Ns(n,Fn),i),this.createBubbleChart(Ns(n,mn),i))}this.createAxes(t)},e.prototype.appendChart=function(e,o){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(o),delete this.namedYAxes[o]):(this.xAxisRangeTracker.reset(o),delete this.namedXAxes[o]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=wt([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=wt([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new np(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new gh(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new lp(this,{series:t,clip:e.options.clip}),e)},e.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=at({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ds(a.type,ws),l=s.query(),h=p?{min:.1,max:1}:{min:0,max:1},c=s.query(r)||l||h,u=[a.min,a.max],d=this.series,f=0;f<d.length;f++){var g=d[f],y=g[e?"yAxis":"xAxis"];if(y===a.name||0===o&&!y){var v=Qr.current.bindPoint(g,0).valueFields;u.push(v[e?"y":"x"]);break}}0===o&&l&&(c.min=Math.min(c.min,l.min),c.max=Math.max(c.max,l.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){i=!0;break}var _=new(Ds(a.type,m)||!a.type&&i?xr:p?Ar:vr)(c.min,c.max,a,this.chartService);if(_.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=_}return this.appendAxis(_),_},e.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++)Ct(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)Ct(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]},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l],c=h.options.vertical?p:a,u=h.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(o,{element:Ut(e),originalEvent:e,x:qs(a),y:qs(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);wh(this.options,r,o,e),wh(this.originalOptions,r,o,e)},e.prototype.trendlineFactory=function(t,e){var o=this.seriesValues.bind(this,e.index),i=ul(_h,t.type,{options:t,seriesValues:o});return i&&(i.xAxis=e.xAxis,i.yAxis=e.yAxis),i},e.prototype.seriesValues=function(t){for(var e=[],o=this.series[t],i=0;i<o.data.length;i++){var r=this.bindPoint(o,i);e.push({pointIx:i,valueFields:r.valueFields})}return e},e}(Ip);function wh(t,e,o,i){at([].concat(o?t.yAxis:t.xAxis)[e],i)}te(bh,{xAxis:{},yAxis:{}}),at(bh.prototype,Rp);const kh=bh;var Ah=function(t){function e(e,o,i){t.call(this,i),this.value=e,this.sector=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},e.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,o=this.getLabelText(t);if(t.visible&&(o||0===o)){if(t.position===f||t.position===As)t.color||(t.color=fe(this.options.color)),t.background||(t.background=this.options.color);else{var i=e.theme.seriesDefaults.labels;t.color=t.color||i.color,t.background=t.background||i.background}this.label=new Zo(o,at({},t,{align:f,vAlign:"",animation:{type:rn,delay:this.animationDelay}}),this.pointData()),this.append(this.label)}},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,o=this.sector.clone(),i=t.distance,r=o.middle();if(e){var n,s=e.box.height(),a=e.box.width();if(t.position===f)o.radius=Math.abs((o.radius-s)/2)+s,n=o.point(r),e.reflow(new xo(n.x,n.y-s/2,n.x,n.y));else if(t.position===As)o.radius=o.radius-s/2,n=o.point(r),e.reflow(new xo(n.x,n.y-s/2,n.x,n.y));else{var p;(n=o.clone().expand(i).point(r)).x>=o.center.x?(p=n.x+a,e.orientation=B):(p=n.x-a,e.orientation=C),e.reflow(new xo(p,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,o=this.sector,i=this.options;if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value)if(i.visual){var r=(o.startAngle+180)%360,n=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new q.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:r,endAngle:r+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new q.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},r=i.width>0?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,s=Oo(o.pattern,{color:n,opacity:o.opacity}),a=this.createSegment(e,at({fill:s,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(a),Ws(o)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},at({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new q.drawing.Circle(new q.geometry.Circle(new q.geometry.Point(t.center.x,t.center.y),t.radius),e):Co.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,o=this.sector.center;at(e,{animation:{center:[o.x,o.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,at({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new q.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,o=this.createSegment(this.sector,at({},t,{stroke:{width:2*e}})),i=new q.drawing.MultiPath;return i.paths.push(q.drawing.Path.fromRect(o.bbox())),i.paths.push(this.createSegment(this.sector,{})),o.clip(i),o},e.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.sector.clone().expand(5),n=r.middle();return{point:r.point(n),align:(t=n+180,e=qt(t),o=Zt(Math.sin(e),_),i=Zt(Math.cos(e),_),{horizontal:Math.abs(o)>Ch?f:i<0?B:C,vertical:Math.abs(o)<Sh?f:o<0?d:V})}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(To),Sh=Zt(qt(30),_),Ch=Zt(qt(60),_);te(Ah,{color:z,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:x,margin:dt(.5),align:g,zIndex:1,position:Ss},animation:{type:Mn},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(Ah.prototype,ia),at(Ah.prototype,Ra);const Ph=Ah;var Th={createLegendItem:function(t,e,o){var i=this.options.legend||{},r=i.labels||{},n=i.inactiveItems||{},s=n.labels||{};if(o&&!1!==o.visibleInLegend){var a,p,l=!1!==o.visible,h=l?vt(r):vt(s)||vt(r),c=o.category;h&&(c=h({text:c,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),l?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),Xs(c)&&""!==c&&this.legendItems.push({active:l,pointIndex:o.index,text:c,series:o.series,markerColor:p,pattern:e.pattern,labels:a})}}};const Mh=Th;var Oh=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,o=this.plotArea.options.seriesColors;void 0===o&&(o=[]);for(var i=o.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,l=js(a),h=l.total,c=l.points,u=l.count,d=360/h,g=void 0;isFinite(d)||(g=360/u);var y=void 0;y=zt(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&a.labels.position===Ss&&(a.labels.position=f);for(var v=0;v<c.length;v++){var m=c[v];if(m){var x=m.fields,_=m.value,b=m.visible,w=0!==_?g||_*d:0,k=1!==p.length&&Boolean(x.explode);it(a.color)||(a.color=x.color||o[v%i]),t(_,new wo(null,0,0,y,w),{owner:this,category:zt(x.category)?x.category:"",pattern:zt(x.pattern)?x.pattern:a.pattern,index:v,series:a,seriesIx:s,dataItem:p[v],percentage:0!==h?_/h:0,explode:k,visibleInLegend:x.visibleInLegend,visible:b,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==b&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Hs(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},e.prototype.addValue=function(t,e,o){var i=at({},o.series,{index:o.index});if(i.pattern=o.pattern||i.pattern,this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible){var r=new Ph(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this,o=e.options,i=e.points,r=e.seriesConfigs;void 0===r&&(r=[]);var n=i.length,s=t.clone(),a=Math.min(s.width(),s.height()),p=a/2,l=a-.85*a,h=new xo(s.x1,s.y1,s.x1+a,s.y1+a),c=h.center(),u=s.center(),d=o.series.length,f=[],g=[],y=Kt(o.padding,l);this.targetBox=t,y=y>p-5?p-5:y,h.translate(u.x-c.x,u.y-c.y);for(var v=p-y,m=new yo(v+h.x1+y,v+h.y1+y),x=0;x<n;x++){var _=i[x],b=_.sector,w=_.seriesIx;if(b.radius=v,b.center=m,r.length){var k=r[w];b.innerRadius=k.innerRadius,b.radius=k.radius}w===d-1&&_.explode&&(b.center=b.clone().setRadius(.15*b.radius).point(b.middle())),_.reflow(h);var A=_.label;A&&A.options.position===Ss&&w===d-1&&(A.orientation===B?g.push(A):f.push(A))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=h},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=Wt(this.points),o=e.sector,i=t.length-1,r=o.radius+e.options.labels.distance,n=[],s=t[0].box,a=Zt(s.y1-(o.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<i;p++){var l=t[p+1].box;s=t[p].box,a=Zt(l.y1-s.y2),n.push(a)}return a=Zt(o.center.y+r-t[i].box.y2-t[i].box.height()/2),n.push(a),n},e.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;r>0&&(o>=0||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,o,i){var r=i;if(t[o]>0){var n=Math.min(t[o],r);r-=n,t[o]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var o,i=Wt(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 l=0;l<s;l++){var h=e[l],c=h.box;p+=t[l],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),h.orientation===B),h.orientation===B?(n.align!==g&&(o=r.radius+r.center.x+a),h.reflow(new xo(o+c.width(),p,o,p))):(n.align!==g&&(o=r.center.x-r.radius-a),h.reflow(new xo(o-c.width(),p,o,p))),p+=c.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,o=this.points,i=o.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<i;r++){var n=o[r],s=n.sector,a=n.label,p=s.middle(),l=(n.options.connectors||{}).color||e.color;if(a){var h=new q.drawing.Path({stroke:{color:l,width:e.width},animation:{type:rn,delay:n.animationDelay}});if(a.options.position===Ss){var c=a.box,u=s.center,d=s.point(p),f=new yo(c.x1,c.center().y),g=void 0,y=void 0,v=void 0;d=s.clone().expand(e.padding).point(p),h.moveTo(d.x,d.y),a.orientation===B?(v=Lh(u,d,f,y=new yo(c.x1-e.padding,c.center().y)),f=new yo(y.x-4,y.y),(v=v||f).x=Math.min(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x<s.center.x?(g=s.center.x+s.radius+4,n.options.labels.align!==bn?g<f.x?h.lineTo(g,d.y):h.lineTo(d.x+8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))):(v=Lh(u,d,f,y=new yo(c.x2+e.padding,c.center().y)),f=new yo(y.x+4,y.y),(v=v||f).x=Math.max(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x>s.center.x?(g=s.center.x-s.radius-4,n.options.labels.align!==bn?g>f.x?h.lineTo(g,d.y):h.lineTo(d.x-8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))),h.lineTo(y.x,y.y),this._connectorLines.push(h),this.visual.append(h)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),le(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,o=this.box.center(),i=this.visual.bbox();if(!i)return;var r=i.bottomRight(),n=Math.min((o.y-e.y1)/(o.y-i.origin.y),(e.y2-o.y)/(r.y-o.y),(o.x-e.x1)/(o.x-i.origin.x),(e.x2-o.x)/(r.x-o.x));n<1&&this.visual.transform(q.geometry.transform().scale(n,n,[o.x,o.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,o){return((t.parent.sector.middle()+270)%360-(o.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,a=s.x,p=s.y,l=Math.min(Math.abs(p-o),Math.abs(p-i));return l>n?t:a+Math.sqrt(n*n-l*l)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}(To);function Lh(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),s=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new yo(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}te(Oh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),at(Oh.prototype,Mh),Oh.prototype.isStackRoot=!0;const Bh=Oh;var Ih=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],o=new Bh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Vt(this.options.legend.data,e.legendItems)},e.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},e.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},e}(Ip);const Eh=Ih;var Rh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();if(o){var n=o.box.height();if(e.position===f){i.radius-=(i.radius-i.innerRadius)/2;var s=i.point(r);o.reflow(new xo(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Co.current.createRing(t,e)},e}(Ph);te(Rh,{overlay:{gradient:"roundedGlass"},labels:{position:f},animation:{type:Mn}}),at(Rh.prototype,ia);const Vh=Rh;var jh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,o){var i=at({},o.series,{index:o.index});if(i.pattern=o.pattern||i.pattern,this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible){var r=new Vh(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var o,i=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=i.series,l=p.length,h=Kt(i.padding,a),c=s-(h=h>s-5?s-5:h),u=0,d=0;d<l;d++){var f=p[d];0===d&&zt(f.holeSize)&&(o=f.holeSize,c-=f.holeSize),zt(f.size)?c-=f.size:u++,zt(f.margin)&&d!==l-1&&(c-=f.margin)}zt(o)||(c-=o=(s-h)/(l+.75)*.75);var g,y=o,v=0;this.seriesConfigs=[];for(var m=0;m<l;m++){var x=p[m];g=(y+=v)+Kt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,o){return 50*t+on*(e+1)/(o+1)},e}(Bh);te(jh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const zh=jh;var Dh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],o=new zh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e}(Eh);const Fh=Dh;var Hh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new Ba},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,i=t.getSlot(o),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-i.x1,r.y-i.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,o=this.valueAxisRangeTracker.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});i.type===ws?(t=Vr,e={min:.1,max:1}):(t=Er,e={min:0,max:1});var r=o||e,n=new t(r.min,r.max,i,this.chartService);this.valueAxis=n,this.appendAxis(n)},e.prototype.reflowAxes=function(){var t=this,e=t.options.plotArea,o=t.valueAxis,i=t.polarAxis,r=t.box,n=.15*Math.min(r.width(),r.height()),s=dt(e.padding||{},n),a=r.clone().unpad(s),p=a.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(a,H,f);var l=p.clone().shrink(0,p.height()/2);i.reflow(p),o.reflow(l);var h=o.lineBox().height()-o.box.height();o.reflow(o.box.unpad({top:h})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Ip);const Nh=Hh;var Uh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var o=t.center.y-e.y1,i=yo.onCircle(t.center,t.startAngle,o);return new xo(i.x,i.y,i.x,i.y)},e}(np);te(Uh,{clip:!1});const Gh=Uh;var Wh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(gh);Wh.prototype.pointSlot=Gh.prototype.pointSlot,te(Wh,{clip:!1});const Xh=Wh;var Yh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),o=new zr(!1),i=this.points();i.push(e),(t=this._strokeSegments=o.process(i)).pop()}return t},e}(Ta);const qh=Yh;var Zh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),o=new q.geometry.Segment([e.x,e.y]);t.segments.unshift(o),t.segments.push(o)},e}(Aa);const Qh=Zh;var Kh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o){return(e.line||{}).style===dn?new qh(t,e,o):new Qh(t,e,o)},e.prototype.createMissingValue=function(t,e){var o;return Xs(t.x)&&e!==hn&&(o={x:t.x,y:t.y},e===ln&&(o.y=0)),o},e.prototype.seriesMissingValues=function(t){return t.missingValues||ln},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort($h),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Xs(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t},e}(Xh);function $h(t,e){return t.value.x-e.value.x}const Jh=Kh;var tc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Mr(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),t.prototype.render.call(this)},e.prototype.valueAxisOptions=function(t){return at(t,{majorGridLines:{type:s},minorGridLines:{type:s}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.trendlineFactory=function(t,e){var o=kh.prototype.trendlineFactory.call(this,t,e);return o&&(o.type=Ln),o},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Ip.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Ns(t,[Ln]),e),this.createScatterChart(Ns(t,[Bn]),e),this.createAreaChart(Ns(t,[On]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new Xh(this,{series:t});this.appendChart(o,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var o=new Gh(this,{series:t});this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new Jh(this,{series:t});this.appendChart(o,e)}},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:Ut(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(Nh);te(tc,{xAxis:{},yAxis:{}}),at(tc.prototype,Rp,{seriesValues:kh.prototype.seriesValues});const ec=tc;var oc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var o=t.center.y-e.y1,i=yo.onCircle(t.center,t.middle(),o);return new xo(i.x,i.y,i.x,i.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),o=0;o<e.length;o++){var i=e[o];if(i&&i.length>1){var r=i[0].linePoints[0],n=Wt(i),s=Wt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Wt(i).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,o){var i=new(e.style===dn?ga:pa)(t,e,o),r=this.seriesMissingValues(e);return t.length!==e.data.length&&r!==hn||(i.options.closed=!0),i},e}(wa);te(oc,{clip:!1,limitPoints:!1});const ic=oc;var rc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Ta);const nc=rc;var sc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Aa);const ac=sc;var pc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&o>0&&i&&(n=i.linePoints.slice(0),r=i),p===dn?(s=new nc(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new ac(t,e,o,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||ln},e}(ic);const lc=pc;var hc=function(t){function e(e,o){t.call(this,e,null,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getIndex=function(){return this.categoryIx},e}(Vh);te(hc,{overlay:{gradient:"none"},labels:{distance:10}});const cc=hc;var uc=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Da:za}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=this.children,i=e.gap,r=e.spacing,n=o.length,s=n+i+r*(n-1),a=t.angle/s,p=t.startAngle+a*(i/2);this.forEach(o,(function(e){var o=t.clone();o.startAngle=p,o.angle=a,e.sector&&(o.radius=e.sector.radius),e.reflow(o),e.sector=o,p+=a+a*r}))},e}(To);te(uc,{gap:1,spacing:0});const dc=uc;var fc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new xo;for(var s=r;s>=0&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(To);const gc=fc;var yc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return cc},e.prototype.clusterType=function(){return dc},e.prototype.stackType=function(){return gc},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var o=t.clone(),i=t.center.y;return o.radius=i-e.y1,o.innerRadius=i-e.y2,o},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Wa);yc.prototype.reflow=ea.prototype.reflow,te(yc,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const vc=yc;var mc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Pr(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&at(t,{majorGridLines:{type:s},minorGridLines:{type:s}}),this._isStacked100&&at(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),at(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Sl.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Sl.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.trendlineFactory=function(t,e){var o=Sl.prototype.trendlineFactory.call(this,t,e);return o&&(o.type=Rn),o},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Ns(t,[In]),e),this.createLineChart(Ns(t,[Rn]),e),this.createBarChart(Ns(t,[En]),e)},e.prototype.chartOptions=function(t){var e={series:t},o=t[0];if(o){var i=this.filterVisibleSeries(t),r=o.stack;e.isStacked=r&&i.length>1,e.isStacked100=r&&"100%"===r.type&&i.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new lc(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new ic(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=this.chartOptions(t),r=this.filterVisibleSeries(t),n=r.some((function(t){return t.stack})),s=r.some((function(t){return t.stack&&"100%"===t.stack.type}));i.gap=o.gap,i.spacing=o.spacing,i.defaultStack=o.stack&&r.length>1,i.isStacked=n&&r.length>1,i.isStacked100=s&&r.length>1;var a=new vc(this,i);this.appendChart(a,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:Ut(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e.prototype._pointsByVertical=function(e){return t.prototype._pointsByVertical.call(this,e).sort(this._getSeriesCompareFn())},e.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},e}(Nh);at(mc.prototype,Rp,{appendChart:Sl.prototype.appendChart,aggregateSeries:Sl.prototype.aggregateSeries,seriesSourcePoints:Sl.prototype.seriesSourcePoints,seriesValues:Sl.prototype.seriesValues}),te(mc,{categoryAxis:{categories:[]},valueAxis:{}});const xc=mc;var _c=function(t){function e(e,o,i){t.call(this,o),this.value=e,this.options.index=i.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.reflow=function(t){var e=this.points,o=this.children[0],i=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new xo(i,e[0].y,r,e[2].y),o&&o.reflow(new xo(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,o=this,i=this.options;t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(e=i.visual?i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:i,sender:this.getSender(),createVisual:function(){return o.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return q.drawing.Path.fromPoints(this.points,{fill:Oo(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return q.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=q.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,o=q.drawing.Path.fromPoints(this.points,at({},t,{stroke:{width:2*e}})).close(),i=new q.drawing.MultiPath;return i.paths.push(q.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(q.drawing.Path.fromPoints(this.points)),o.clip(i),o},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new yo(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(To);te(_c,{color:z,border:{width:1},labels:{format:""},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}}),at(_c.prototype,ia),at(_c.prototype,Ra);const bc=_c;var wc=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var r=js(o),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var l=p.fields;it(o.color)||(o.color=l.color||e[a%e.length]),l=at({index:a,owner:this,series:o,seriesIx:0,dataItem:i[a],percentage:p.value/n},l,{visible:p.visible});var h=p.valueFields.value,c=this.createSegment(h,l),u=this.createLabel(h,l);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Hs(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},e.prototype.createSegment=function(t,e){var o=at({},e.series);if(o.pattern=e.pattern||o.pattern,this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){var i=new bc(t,o,e);return Object.assign(i,e),this.append(i),this.points.push(i),i}},e.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=at({},this.options.labels,o.labels),n=t;if(r.visible){var s=vt(r),a={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(a):r.format&&(n=this.chartService.format.auto(r.format,n)),r.color||(r.color=fe(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);var p=new Zo(n,at({vAlign:r.position},r),a);return this.labels.push(p),p}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i=t[o].options.align;if(i!==f){var r=t[o].box.width();i===C?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.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 l=s.percentage/a.percentage*e,h=(e-l)/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=i.dynamicHeight?o*d:o/n,m=void 0;m=Xt(m=d?(e-l*(g/d))/2:g?0:e/2,0,e),y.push(new q.geometry.Point(t.x1+h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new q.geometry.Point(t.x1+m,t.y1+v+c)),h=m,c+=v+i.segmentSpacing,l=Xt(e-2*m,0,e)}},e.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,l=((s?e:e-2*p)-a)/2,h=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?l*d:l/n,g=i.dynamicHeight?o*d:o/n;u.push(new q.geometry.Point(t.x1+p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p-f,t.y1+g+h)),u.push(new q.geometry.Point(t.x1+p+f,t.y1+g+h)),p+=f,h+=g+i.segmentSpacing}},e.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)}},e}(To);te(wc,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:f,position:f,zIndex:1}}),at(wc.prototype,Mh);const kc=wc;var Ac=function(t){function e(e,o){o.dynamicSlope=!1,o.neckRatio=1e6,t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(kc);const Sc=Ac;var Cc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createChart(kc,Ns(this.series,[kn])),this.createChart(Sc,Ns(this.series,[An]))},e.prototype.createChart=function(t,e){var o=e[0];if(o){var i=new t(this,{series:e,legend:this.options.legend,neckRatio:o.neckRatio,dynamicHeight:o.dynamicHeight,dynamicSlope:o.dynamicSlope,segmentSpacing:o.segmentSpacing,highlight:o.highlight});this.appendChart(i)}},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Vt(this.options.legend.data,e.legendItems)},e.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},e.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},e.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},e}(Ip);const Pc=Cc;var Tc=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||z,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){var e=t.color;return e||(e=fe(this.color)),new Zo(this.getLabelText(t),at({align:f,vAlign:f,margin:{left:5,right:5},zIndex:Kt(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},e.prototype.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i=Kt(t.type,"rect")===I,r=Kt(e.width,i?1:0),n=Math.round(r/2);if(t.size){var s=o.center();o.size.width=o.size.height=t.size,o.origin.x=Math.round(s.x-o.size.width/2),o.origin.y=Math.round(s.y-o.size.height/2)}return o.size.width-=r,o.size.height-=r,o.origin.y+=n+.5,o.origin.x+=n+.5,Xo(o)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,o=Kt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:o,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,o=new Ro({type:Kt(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=o,this.append(o)},e.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,i=new Ro({type:Kt(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:Kt(e.zIndex,this.series.zIndex)});i.reflow(this.markerBox());var r=i.getElement();return r.options.fill=t.fill,r.options.stroke=t.stroke,r},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,o=new Ro({type:Kt(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return o.reflow(this.markerBox()),o.getElement()},e.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new yo(t,e),align:{horizontal:f,vertical:d}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){},e.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},e}(To);at(Tc.prototype,ia),at(Tc.prototype,ra),at(Tc.prototype,Ra),Tc.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:xs,className:_s,ariaRoleDescription:bs}};const Mc=Tc;var Oc=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:P,max:T},this._evalSeries=[]},e.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},e.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this.plotArea.bindPoint(o,i).valueFields;zt(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},e.prototype.addValue=function(t,e){var o;t&&zt(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},e.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];zt(s)||(this._evalSeries[r]=s=Hs(t,{},n,!0));var a=t;return s&&Hs(a=at({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Mc},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=at({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return Object.assign({},o)},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;i.pattern=e.pattern||i.pattern,i=this.evalPointOptions(i,t,e),it(o.color)?r=i.color:0!==this.valueRange.max&&(r=function(t,e){void 0===e&&(e=.05);var o=(0,q.parseColor)(t),i=1-e;return function(t){var e=o.toHSL(),r=100-e.l,n=i-t;return e.l+=Math.min(n*r,r),e.toCss()}}(r)(t.value/this.valueRange.max));var n=new Mc(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:r,yAxis:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.xAxis,l=a.yAxis,h=p.categoryIndex(t.x),c=l.categoryIndex(t.y),u=p.getSlot(h,h,i),d=l.getSlot(c,c,i);if(s)if(u&&d){var f=e.pointSlot(u,d);s.reflow(f)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new xo(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),l=0;l<i.data.length;l++){var h=this.plotArea.bindPoint(i,l),c=h.valueFields,u=h.fields,d=n.totalIndex(c.x),f=s.totalIndex(c.y),g=a.min<=d&&d<=a.max,y=p.min<=f&&f<=p.max;g&&y&&t(c,at({pointIx:l,series:i,seriesIx:o,dataItem:i.data[l],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(To);te(Oc,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const Lc=Oc;var Bc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},e.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=be(n.categories||[]),p=be(s.categories||[]),l=0;l<i.length;l++){var h=Qr.current.bindPoint(o,l).valueFields,c=h.x,u=h.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&this.createHeatmapChart(Ns(n,[Sn]),i)}},e.prototype.createHeatmapChart=function(t,e){var o=new Lc(this,{series:t});this.appendChart(o,e)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=wt([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=wt([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.seriesAxes=function(t){var e,o,i=this.options,r=[].concat(i.xAxis),n=t.xAxis;e=n?r.find((function(t){return t.name===n})):r[0];var s=[].concat(i.yAxis),a=t.yAxis;if(o=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!o)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:o}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,o){for(var 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}),a=s.categories?s.categories[0]:null,p=[s.min,s.max,a],l=this.series,h=0;h<l.length;h++){var c=l[h],u=c[e?"yAxis":"xAxis"];if(u===s.name||0===o&&!u){var d=Qr.current.bindPoint(c,0).valueFields;p.push(d[e?"y":"x"]);break}}for(var f=0;f<p.length;f++)if(p[f]instanceof Date){i=!0;break}var g=new(Ds(s.type,m)||!s.type&&i?hr:er)(s,this.chartService);if(g.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=g}return this.appendAxis(g),g.indexCategories(),g},e.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++)Ct(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)Ct(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]},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[o]:delete this.namedXAxes[o],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new yo(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l];Es(h.options.vertical?p:a,h.getCategory(r))}a.length>0&&p.length>0&&t.trigger(o,{element:Ut(e),originalEvent:e,x:qs(a),y:qs(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);Ec(this.options,r,o,e),Ec(this.originalOptions,r,o,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e.prototype._pointsByVertical=function(t,e){var o=this;void 0===e&&(e=0);var i=this.axisX.options.reverse?-1*e:e,r=this.axisX.children,n=this._getPointAxisXIndex(t)+i,s=r[n=ot(n,r.length)].value,a=this.filterPoints((function(t){return Ic(t.pointData().x,s)})).sort((function(t,e){return o._getPointAxisYIndex(t)-o._getPointAxisYIndex(e)}));return this.axisY.options.reverse?a.reverse():a},e.prototype._pointsByHorizontal=function(t,e){var o=this;void 0===e&&(e=0);var i=this.axisY.options.reverse?-1*e:e,r=this.axisY.children,n=this._getPointAxisYIndex(t)+i,s=r[n=ot(n,r.length)].value,a=this.filterPoints((function(t){return Ic(t.pointData().y,s)})).sort((function(t,e){return o._getPointAxisXIndex(t)-o._getPointAxisXIndex(e)}));return this.axisX.options.reverse?a.reverse():a},e.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},e.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},e.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex((function(t){return Ic(e,t.value)}))},e}(Ip);function Ic(t,e){return t instanceof Date&&e instanceof Date?Yi(t,e):t===e}function Ec(t,e,o,i){at([].concat(o?t.yAxis:t.xAxis)[e],i)}te(Bc,{xAxis:{},yAxis:{}}),at(Bc.prototype,Rp);const Rc=Bc;var Vc="color",jc="first",zc="max",Dc="min",Fc="noteText";th.current.register(Sl,[yn,bn,Pn,Gn,gn,Hn,_n,Tn,xn,Un,vn,Nn,zn,jn,Xn,Cn,Vn,Wn].concat(ts)),th.current.register(kh,[Dn,Fn,mn].concat(ts)),th.current.register(Eh,[Mn]),th.current.register(Fh,[wn]),th.current.register(Pc,[kn,An]),th.current.register(ec,[On,Ln,Bn].concat(ts)),th.current.register(xc,[In,En,Rn].concat(ts)),th.current.register(Rc,[Sn]),Qr.current.register([yn,bn,Pn,Gn,gn,Hn],[j],[ks,Vc,Fc,an,pn,Ps,Ts]),Qr.current.register([zn,jn,Vn,Wn],["from","to"],[ks,Vc,Fc,Ps,Ts]),Qr.current.register([Xn,Cn],[j],[ks,Vc,Fc,"summary",Ps,Ts]),Qr.current.register([On,Ln,Bn],[F,H],[Vc,Ps,Ts]),Qr.current.register([In,En,Rn],[j],[ks,Vc,Ps,Ts]),Qr.current.register([kn,An],[j],[ks,Vc,"visibleInLegend","visible",Ps,Ts]),Fp.current.register([yn,bn,Pn,Gn,gn,Hn,Xn,Cn],{value:zc,color:jc,noteText:jc,errorLow:Dc,errorHigh:zc}),Fp.current.register([zn,jn,Vn,Wn],{from:Dc,to:zc,color:jc,noteText:jc}),Fp.current.register([In,En,Rn],{value:zc,color:jc}),Qr.current.register([Dn,Fn,mn],[F,H],[Vc,Fc,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Qr.current.register([mn],[F,H,"size"],[Vc,ks,Fc,Ts]),Qr.current.register([Sn],[F,H,j],[Vc,Fc,Ts]),Qr.current.register([_n,Tn],["open","high","low","close"],[ks,Vc,"downColor",Fc,Ts]),Fp.current.register([_n,Tn],{open:zc,high:zc,low:Dc,close:zc,color:jc,downColor:jc,noteText:jc}),Qr.current.register([vn,Nn],["lower","q1","median","q3","upper","mean","outliers"],[ks,Vc,Fc,Ps,Ts]),Fp.current.register([vn,Nn],{lower:zc,q1:zc,median:zc,q3:zc,upper:zc,mean:zc,outliers:jc,color:jc,noteText:jc}),Qr.current.register([xn,Un],["current","target"],[ks,Vc,"visibleInLegend",Fc,Ps,Ts]),Fp.current.register([xn,Un],{current:zc,target:zc,color:jc,noteText:jc}),Qr.current.register([Mn,wn],[j],[ks,Vc,"explode","visibleInLegend","visible",Ps,Ts]);var Hc=[ks,j,F,H],Nc="mousedown",Uc="mousemove",Gc="contextmenu",Wc="mouseleave",Xc="keydown",Yc="focus",qc="blur",Zc="k-chart-overlay-top",Qc=function(t){function e(e,o,i,r){var n=this;void 0===r&&(r={}),t.call(this),this.observers=[],this.addObserver(r.observer),this.chartService=new fi(this,r),this.chartService.theme=i,this._initElement(e);var s=at({},this.options,o);this._originalOptions=at({},s),this._theme=i,this._initTheme(s,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),Jt.preloadFonts(o,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents(),n._restoreOverlayElement())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;e>=0;e--){var o=t.childNodes[e];kt(o,"k-chart-overlay")?this.overlayElement=o:t.removeChild(o)}this.element=t},e.prototype._setElementClass=function(t){W(t,"k-chart")},e.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":(!this.options.title||this.options.title&&this.options.title.position!==d?W(this.overlayElement,Zc):Y(this.overlayElement,Zc),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element&&this.element.appendChild(this.overlayElement))},e.prototype._hasSeriesData=function(){var t=this.options.series||[];return t.length>0&&t.some((function(t){return t.data&&t.data.length>0}))},e.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=Hc,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,$(t.title)&&(t.title={text:t.title}),this.options=at({},e,t),this.applySeriesColors()},e.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},e.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=e.width>0||e.height>0;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&&le(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,o=e.findPane(t);e.redraw(o)}else this._redraw()},e.prototype.getAxis=function(t){return Hr(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Ur(e[o])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Ur(e[t])},e.prototype.plotArea=function(){return new Gr(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var o,i,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];it(e)?o=n.filterPoints(e):(pt(e)?(i=e.series,r=e.category):i=r=e,o=s.type===wn?Kc(n.pointsBySeriesName(i),r):Ct(s.type,[Mn,kn,An])?Kc((n.charts[0]||{}).points,r):n.pointsBySeriesName(i)),o&&this.togglePointsHighlight(t,o)},e.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},e.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(it(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&zt(t)&&(o=n.categoryAxis.categoryIndex(t)),i){if(o>=0){var s=this._plotArea.pointsByCategoryIndex(o);r.showAt(s)}}else e&&r.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Ht(e,{width:o.width}),o.height&&Ht(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=q.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,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 Tl,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),ou(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},e.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},e.prototype._redrawFocusHighlight=function(){if(!this._destroyed){var t=this._focusState,e=t.legendInFocus,o=t.preserveHighlight;e&&o&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)}},e.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,e=$(t)?t:t.description||t.text;e&&this.element.setAttribute("aria-roledescription",e)},e.prototype._kendoExportVisual=function(t){if(t&&t.width&&t.height){var e=this._originalOptions.chartArea||{},o={width:e.width||t.width,height:e.height||t.height};return this.exportVisual(o)}return this.exportVisual()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var o=this.options,i=at({},t.options,{chartArea:{width:t.width,height:t.height}});eu(this._originalOptions,i),this.options=at({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),ou(r._plotArea.panes),e=r.visual,this.options=o}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof Sl&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Bl(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new El(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Vl(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==o||this.requiresHandlers([hs,ps,ls])),n=(!1===e||!1===i)&&!this.requiresHandlers([cs,us,ds]),s=this.element;this._dragZoomEnabled&&r&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||r&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!r,!n)},e.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new sh(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new ph(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var o,i,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||i.color,r=at({},n,n[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[o],r}for(var a=0;a<Hc.length;a++)o=Hc[a]+"Axis",i=t.axisDefaults||{},r=(r=[].concat(t[o])).map(s),t[o]=r.length>1?r:r[0]}(t,e),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=at({},t.seriesDefaults),s=e?at({},e.seriesDefaults):{},a=at({},s);$c(n),$c(a);for(var p=0;p<i;p++){var l=o[p].type||t.seriesDefaults.type,h=at({data:[]},a,s[l],{tooltip:t.tooltip},n,r[l]);o[p]._defaults=h,o[p]=at({},h,o[p]),o[p].data=o[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],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)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Fo(this._modelOptions());o.chart=this,o._plotArea=e;var i=$o.buildTitle(t.title),r=$o.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});if(o.append.apply(o,$o.orderTitles([i,r])),t.legend&&t.legend.visible){var n=new $l(e.options.legend,this.chartService);o.append(n),o._legend=n}return o.append(e),o.reflow(),this._setTitleBox(i,r),o},e.prototype._setTitleBox=function(t,e){if(t||e){this._titleBox=(t||e).box.clone();var o=t?t.options.position:"",i=e?e.options.position:"",r=i!==d;o===i&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone())}},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return at({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return th.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i=t[o],r=i.options;if(i instanceof er&&r.select&&!r.vertical){var n=i.range(),s=new rh(this,i,at({min:n.min,max:n.max},r.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger(fs,t)},e.prototype._select=function(t){return this.trigger(gs,t)},e.prototype._selectEnd=function(t){return this.trigger(ys,t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.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._mousemoveThrottled=(0,q.throttle)(this._mousemove.bind(this),20)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),e.sender=this,t===vs?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===rs?this._updateDrilldownPoint(e.point):t===ns?this._resetDrilldownPoint():t===os?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===es&&this._focusLegendItem(e);for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},e.prototype._attachEvents=function(){var t,e,o=this.element;this._touchAction=o.style.touchAction,jt(o,((t={})[Gc]=this._clickHandler,t[Cs]=this._mousewheelHandler,t[Wc]=this._mouseleaveHandler,t[Xc]=this._keydownHandler,t[Nc]=this._mousedownHandler,t[Yc]=this._focusHandler,t[qc]=this._blurHandler,t)),this._shouldAttachMouseMove()&&jt(o,((e={})[Uc]=this._mousemoveThrottled,e)),this.domEvents=vi.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(as)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(ds,{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var o=this._gestureDistance,i=-t.distance/o+1;if(Math.abs(i)>=.1){i=Math.round(10*i),this._gestureDistance=t.distance;var r={delta:i,axisRanges:Jc(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger(cs,r)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(i,n))&&!this.trigger(us,r)&&e.zoom()}}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([hs,ps,ls])&&this._startNavigation(t,e,hs),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger(cs,{axisRanges:Jc(this._plotArea.axes),originalEvent:t}))},e.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(ps,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,l=p.startLocation-p.location;0!==l&&(r[a.options.name]=a.translateRange(l))}}e.axisRanges=r,this.trigger(ps,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger(ls,{axisRanges:Jc(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,ls),this._zoomSelection){var o=this._zoomSelection.end(t);o&&!this.trigger(us,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(ds,{axisRanges:o,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var o=this._eventCoordinates(t),i=this._plotArea.paneByPoint(o);if(i)for(var r=0;r<e.length;r++)if(e[r].onPane(i))return!0},e.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Kt(t.rate,.3)},e.prototype._mousewheel=function(t){var e=this,o=Et(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:Jc(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(cs,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger(us,n)&&i.zoom(),this._mwTimeout=setTimeout((function(){e.trigger(ds,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(s||this._startNavigation(t,r,cs)||(s=this._navState),s){var a=s.totalDelta||o;s.totalDelta=a+o;for(var p=this._navState.axes,l={},h=0;h<p.length;h++){var c=p[h],u=c.options.name;u&&(l[u]=c.scaleRange(-a*this._mousewheelZoomRate(),r))}this.trigger(us,{delta:o,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,ds)}),150)}}},e.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),n=i.axes.slice(0);if(r){var s=Jc(n);this.trigger(o,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:s,pane:r,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},e.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))),o&&(i=i.closest(o))&&i.aliasFor&&(i=i.aliasFor()),i},e.prototype._eventCoordinates=function(t){var e=Nt(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=ut(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,o=t.paddingTop;this._padding={top:o,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=Ft(this.element);return{left:Zt(t.x+e.left+o.left),top:Zt(t.y+e.top+o.top)}},e.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Ft(o),r=this._elementPadding(),n=de(o).invert(),s=new q.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(n);return new yo(s.x,s.y)},e.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)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},e.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===V||t===C)},e.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},e.prototype._keydown=function(t){var e=this._focusState,o=e.legendInFocus,i=e.focusedElement,r=this._legend;if("Tab"===t.key){this._clearFocusedElement();var n=this._isLegendBeforeChart();o&&n!==t.shiftKey?this._navigatePoints(t):!o&&n===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)}else"Escape"===t.key?(i&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?i&&(this._focusState.preserveHighlight=!0,this._propagateClick(i,t),this._focusElement(i)):o?this._navigateLegend(t):this._navigatePoints(t)},e.prototype._navigatePoints=function(t){var e=this,o=this._focusState,i=this._plotArea;if(o.legendInFocus=!1,!o.focusedElement)return this._focusFirstPoint(),void t.preventDefault();var r=function(i){o.focusedPoint=i,e._focusElement(o.focusedPoint),e._displayTooltip(i),t.preventDefault()};switch(t.key){case h:r(i.getPointToTheRight(o.focusedPoint));break;case l:r(i.getPointToTheLeft(o.focusedPoint));break;case p:r(i.getPointBelow(o.focusedPoint));break;case a:r(i.getPointAbove(o.focusedPoint))}},e.prototype._navigateLegend=function(t){var e=this,o=this,i=o._focusState,r=o._legend,n=o.chartService.rtl;if(i.legendInFocus=!0,!i.focusedElement)return this._focusFirstLegendItem(),void t.preventDefault();var s=r.getItems().length,c=function(o){i.focusedLegendItemIndex=o(i.focusedLegendItemIndex,s),e._focusElement(e._getFocusedLegendItem()),t.preventDefault()};switch(t.key){case a:case l:c(n?tt:et);break;case p:case h:c(n?et:tt)}},e.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},e.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},e.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},e.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},e.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},e.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},e.prototype._focusLegendItem=function(t){var e=this._focusState;e.focusedLegendItemIndex=this._legend.getItems().findIndex((function(e){return e.options.series.index===t.seriesIndex&&e.options.pointIndex===t.pointIndex})),e.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},e.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},e.prototype._focusElement=function(t,e){var o=this._focusState;if(this._clearFocusedElement(),t&&(o.focusedElement=t,this._setElementActiveDescendant(t),!e))if(t.focusVisual(),o.legendInFocus){var i=t.options;this._showSeriesInactiveOpacity(i.series.index,i.pointIndex)}else this._showInactiveOpacity(t)},e.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},e.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(c,t._id)},e.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(c)},e.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),o=t.options.accessibility;e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",o.role),e.setAttribute("aria-roledescription",o.ariaRoleDescription);var i=o.ariaChecked;return zt(i)&&e.setAttribute("aria-checked",i),e},e.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof Ip)})),i=this._activePoint;return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover&&(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),this._showInactiveOpacity(o))),o},e.prototype._displayTooltip=function(t){at({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},e.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},e.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);if(i)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t);else{var r;if(!i.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,i))&&r.length&&this._highlight.show(r,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var 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},e.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateDrilldownPoint=function(t){t&&t.series&&Qr.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},e.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},e.prototype._startDrilldown=function(t){if(t&&t.series){var e=t.series,o=Qr.current.bindPoint(e,null,t.dataItem).fields.drilldown;if(o){var i={series:e,point:t,value:o,sender:this};this.trigger("drilldown",i)}}},e.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))}},e.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||i;if(s&&(s.highlight||{}).visible&&n.visual){var a=i?i.opacity:n.series.opacity;(s!==e||o)&&n.visual.opacity(o?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,o,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.prototype._showInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},e.prototype._hideInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},e.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,o=this._startHover(t.element,t.originalEvent);o&&o.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),jt(document,((e={})[Uc]=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,o=this,i=o.options,r=o._tooltip,n=o._highlight,s=o._activePoint,a=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(a)){if(s&&s.tooltipTracking&&s.series&&s.parent.getNearestPoint){var p=s.parent.getNearestPoint(a.x,a.y,s.seriesIx);p&&p!==s&&(this._activePoint=p,p.hover(this,t)||(at({},i.tooltip,p.options.tooltip).visible&&r.show(p),n.show(p)))}}else Qt(document,((e={})[Uc]=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(s)},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;if(this._trackCrosshairs(e),o.hover){var i=o.backgroundContainsPoint(e);i?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger(as))}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.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()}},e.prototype._trackSharedTooltip=function(t,e,o){if(!this._suppressHover){var i=this,r=i.options.tooltip,n=i._plotArea,s=i._plotArea.categoryAxis,a=i._tooltip,p=i._highlight;if(n.backgroundContainsPoint(t)){var l=s.pointCategoryIndex(t);if(l!==this._tooltipCategoryIx||!this._sharedHighlight&&o){var h=n.pointsByCategoryIndex(l),c=h.map((function(t){return t.eventArgs(e)})),u=c[0]||{};u.categoryPoints=c,h.length>0&&!this.trigger(is,u)?(r.visible&&a.showAt(h,t),p.show(h),this._sharedHighlight=!0):a.hide(),this._tooltipCategoryIx=l}else o&&this._sharedHighlight&&(p.hide(),a.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(p.hide(),a.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemoveThrottled.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){var o=this,i=new Set,r=this.options.series.filter((function(o){return o.categoryAxis===t.name||!o.categoryAxis&&0===e})),n=r.some((function(t){return Boolean(t.categoryField)})),s=r.filter((function(t){return t.data&&t.data.length>0})),a=s.map((function(t){return Qr.current.bindPoint(t,0).fields.category})),p=a.reduce((function(e,o){return e||Ys(t,o)}),!1);if(s.filter((function(t,e){return t.categoryField||zt(a[e])})).forEach((function(t){return t.data.forEach((function(e,r){var n=Qr.current.bindPoint(t,r).fields.category;if(p){var s=Gs(n,e,o.chartService.intl);n=s?s.getTime():void 0}i.add(n)}))})),i.size>0){var l=Array.from(i.values());p&&(l=l.sort().map((function(t){return t&&new Date(t)}))),t.categories=l}else n&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=Qr.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===j?r="field":r+="Field",!zt(t[r])){o=!1;break}}return o},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},e.prototype._showSeriesInactiveOpacity=function(t,e){var o,i=this._plotArea,r=this._highlight,n=(i.srcSeries||i.series)[t];if(o=Ct(n.type,[Mn,wn,kn,An])?i.findPoint((function(o){return o.series.index===t&&o.index===e})):i.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&o){var s=i.series.length>1,a=o.length?o[0]:o;this._displayInactiveOpacity(a,s,o)}else r.show(o)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([ss,as])},e.prototype.updateMouseMoveHandler=function(){var t,e;Qt(this.element,((t={})[Uc]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&jt(this.element,((e={})[Uc]=this._mousemoveThrottled,e))},e.prototype.applyOptions=function(t,e){eu(this._originalOptions,t),this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Qt(this.element,((t={})[Gc]=this._clickHandler,t[Cs]=this._mousewheelHandler,t[Uc]=this._mousemoveThrottled,t[Wc]=this._mouseleaveHandler,t[Nc]=this._mousedownHandler,t[Xc]=this._keydownHandler,t[Yc]=this._focusHandler,t[qc]=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Qt(document,((e={})[Uc]=this._mouseMoveTrackHandler,e)),this._focusState=null,this.element._kendoExportVisual=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),this._resetDrilldownPoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},e}(q.Class);function Kc(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function $c(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 Jc(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 tu=["data","categories"];function eu(t,e){for(var o in e)if(!Ct(o,tu)&&Ae(e,o)){var i=e[o],r=t[o];if(zt(r)){var n=null===i;n||!zt(i)?(delete t[o],n&&delete e[o]):r&&pt(i)&&pt(r)&&eu(r,i)}}}function ou(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}te(Qc,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:u,width:2}}},categoryAxis:{},seriesDefaults:{type:bn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{narrowRange:!1},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const iu=Qc;var ru=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new yo(this.plotArea.box.x2,e.center().y):new yo(e.center().x,-2),align:i}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(ph);const nu=ru;var su=[yn,xn];function au(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 pu(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function lu(t){return K(t)?[t]:t}var hu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){W(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Ht(e).width)},e.prototype._resize=function(){var e=this.element,o=au(e.childNodes);this._initialWidth=Math.floor(Ht(e).width),pu(e.childNodes,o),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=au(e.childNodes),i=document.createElement("span");i.innerHTML="&nbsp;",e.appendChild(i);var r=at({width:this._autoWidth,height:Ht(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Ht(e,{width:r.width,height:r.height}),e.removeChild(i),pu(e.childNodes,o),this.surface&&this.surface.resize(),r},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var o=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(o),o},e.prototype._calculateWidth=function(t){for(var e=this.options,o=dt(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===yn)return 150;if(p.type===xn)return 150;if(p.type===Mn)return Ht(r).height;var l=a.categoryAxis;if(l){var h=l.categoriesCount()*(!a.options.isStacked&&Ct(p.type,[bn,Un])?a.seriesOptions.length:1);n=Math.max(n,h)}}}var c=n*e.pointWidth;return c>0&&(c+=o.left+o.right),c},e.prototype._createSharedTooltip=function(t){return new nu(this._plotArea,t)},e.normalizeOptions=function(t){var e=lu(t);return(e=G(e)?{seriesDefaults:{data:e}}:at({},e)).series||(e.series=[{data:lu(e.data)}]),at(e,{seriesDefaults:{type:e.type}}),(Ct(e.series[0].type,su)||Ct(e.seriesDefaults.type,su))&&(e=at({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(iu);te(hu,{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}]});const cu=hu,uu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(ut(this.element,"opacity").opacity)},e.prototype.step=function(t){ut(this.element,{opacity:String(Pt(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),ut(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),ut(this.element,{opacity:String(this._initialOpacity)})},e}(q.drawing.Animation);function du(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var fu=function(t){function e(e,o,i){t.call(this),this.options=at({},this.options,i),this.container=e,this.chartService=o;var r=ut(e,["paddingLeft","paddingTop"]);this.chartPadding={top:r.paddingTop,left:r.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=du("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=du("k-tooltip k-chart-tooltip"),o=this.scroll=du("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(o)},e.prototype.show=function(t,e,o){var i=this,r=i.element,n=i.options,s=i.scroll,a=i.tooltip,p=Di(Xi(t)+Xi(e-t)/2),l=.4*o.width(),h=o.center().x-l,c=(o.center().x-h)/(n.max-n.min),u=p-n.min,d=this.chartService.intl.format(n.format,t,e),f=vt(n);this.clearHideTimeout(),this._visible||(ut(r,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(d=f({from:t,to:e})),a.innerHTML=d,ut(a,{left:o.center().x-a.offsetWidth/2,top:o.y1});var g=ut(a,["marginTop","borderTopWidth","height"]);ut(s,{width:l,left:h+u*c,top:o.y1+g.marginTop+g.borderTopWidth+g.height/2}),ut(r,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new uu(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},e}(q.Class);te(fu,{format:"{0:d} - {1:d}",hideDelay:500});const gu=fu;var yu="_navigator",vu=yu,mu="_default",xu=function(t){function e(e){var o;t.call(this),this.chart=e;var i=this.options=at({},this.options,e.options.navigator),r=i.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),zt(i.hint.visible)||(i.hint.visible=i.visible),this.chartObserver=new Ot(this,((o={})[ps]="_drag",o[ls]="_dragEnd",o[us]="_zoom",o[ds]="_zoomEnd",o)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ki(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,o=this.options,i=this.mainAxis(),r=i.roundedRange(),n=r.min,s=r.max,a=o.select,p=a.from,l=a.to,h=a.mousewheel,c=(t=i,_u.prototype=t,new _u);0!==i.categoriesCount()&&(this.clean(),c.box=i.box,this.selection=new rh(e,c,{min:n,max:s,from:p||n,to:l||s,mousewheel:Kt(h,{zoom:"left"}),visible:o.visible},new Ot(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new gu(e.element,e.chartService,{min:n,max:s,template:vt(o.hint),format:o.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[vu].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e;r<e&&(r=e);var n=i.to||o;n>o&&(n=o),this.options.select=at({},i,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Wt(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.filter((function(t){return t.options.name!==yu}));e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},e.prototype._drag=function(t){var e,o=this.chart,i=this.selection,r=o._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=o._plotArea.categoryAxis,l=t.axisRanges[p.options.name],h=this.options.select;if(l&&!a&&i){e=h.from&&h.to?Xi(h.to)-Xi(h.from):Xi(i.options.to)-Xi(i.options.from);var c=Di(Xt(Xi(l.min),s.min,Xi(s.max)-e)),u=Di(Xt(Xi(c)+e,Xi(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(c,u),this.showHint(c,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,i=this.options.select;i.from=e,i.to=o},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,o=t.from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==yu&&(n.min=o,n.max=i)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var o=this.mainAxis(),i={from:e.from,to:e.to};if("category"!==o.options.type){var r=new hr(at({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;i.from=Hi(r.min,-r.baseUnitStep,r.baseUnit),i.to=Hi(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",i)}},e.prototype._zoom=function(t){var e=this,o=e.chart._plotArea.categoryAxis,i=e.selection,r=e.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),p=t.delta;if(i){var l=a.categoryIndex(i.options.from),h=a.categoryIndex(i.options.to),c=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(p)>1&&(p*=3),h-l>1?(i.zoom(p,c),this.readSelection()):(o.options.min=n.from,n.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),c).min),s&&(this.filterAxes(),this.redrawSlaves()),i.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[vu]},e.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},e.setup=function(t,o){if(void 0===t&&(t={}),void 0===o&&(o={}),!t.__navi){t.__navi=!0;var i=at({},o.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=at({},i.pane,{name:yu});i.visible||(n.visible=!1,n.height=.1),"top"!==t.navigator.position?r.push(n):r.unshift(n),r.forEach((function(t){t.name=t.name||mu})),e.attachAxes(t,i),e.attachSeries(t,i,o)}},e.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis);i.concat(r).forEach((function(t){t.pane=t.pane||mu}));var n=0===Ns(o,Yn).length,s=at({type:"date",pane:yu,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;i.push(at({},s,{maxDateGroups:200},a,{name:vu,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),at({},s,a,{name:vu+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),at({},s,a,{name:vu+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(at({name:vu,pane:yu,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.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(at({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:vu,categoryAxis:vu,autoBind:e.autoBindElements}))},e}(q.Class);function _u(){}const bu=xu;var wu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,o){var i=Ht(this.element).width||600,r=o,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}};r&&(r=at({},r,n)),bu.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){W(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=wt([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,o=this._seriesCount!==e;return this._seriesCount=e,o},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new bu(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var o=this._plotArea.paneByPoint(e);o&&o.options.name===yu?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===vu?t=i.categories:t&&i.pane===yu&&(i.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var o=this._eventCoordinates(e),i=this._plotArea.paneByPoint(o);return t.prototype._stopChartHandlers.call(this,e)||i&&i.options.name===yu},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(iu);te(wu,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});const ku=wu;var Au=150,Su="arrowPointer",Cu="barPointer",Pu=.5,Tu=Math.PI/180,Mu="inside",Ou="linear",Lu="outside",Bu="radialPointer",Iu="radialRangePointer";function Eu(t,e){var o=t.getOrigin(),i=t.getSize(),r=dt(e);return t.setOrigin([o.x-r.left,o.y-r.top]),t.setSize([i.width+(r.left+r.right),i.height+(r.top+r.bottom)]),t}var Ru=q.drawing.Group,Vu=q.drawing.Path,ju=q.drawing.Text;function zu(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",s=Vu.fromRect(new q.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),a=new ju(t.text,new q.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),p=Eu(a.bbox().clone(),e.padding),l=Vu.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),h=new Ru;return h.append(s),h.append(l),h.append(a),h}function Du(t,e,o){var i=zt(t.from)?t.from:T,r=zt(t.to)?t.to:P;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function Fu(t,e){var o=dt(e);return o.left=-o.left,o.top=-o.top,o.right=-o.right,o.bottom=-o.bottom,Eu(t,o)}var Hu=q.drawing.Path,Nu=q.drawing.Surface,Uu=function(t){function e(e,o,i,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=i,this.contextService=new fi(this,r),this._originalOptions=at({},this.options,o),this.options=at({},this._originalOptions),this._initTheme(i),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(G(t))for(var r=0;r<t.length;r++)K(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},e.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]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new q.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var o=Fu(e.bbox(),this._gaugeAreaMargin);this.reflow(o)},e.prototype.setOptions=function(t,e){this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options);var o=this.options,i=o.pointer;if(G(i)){for(var r=[],n=0;n<i.length;n++)r.push(at({},e.pointer,i[n]));o.pointer=r}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},i=new q.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,o.width>0&&(i=Fu(i,o.width)),Hu.fromRect(i,{stroke:{color:o.width?o.color:"",width:o.width,opacity:o.opacity,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Ht(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Nu.create(o,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&at(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,i=t.offsetHeight;return o||(o=e.width),i||(i=e.height),{width:o,height:i}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(q.Class);te(Uu,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const Gu=Uu;var Wu=q.drawing.Path,Xu=q.drawing.Group,Yu=q.geometry.Point;function qu(t,e){var o,i,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(o=new Yu(n,r),i=new Yu(n+e.size,r)):(o=new Yu(r,s),i=new Yu(r,s+e.size)),new Wu({stroke:{color:e.color,width:e.width}}).moveTo(o).lineTo(i)}function Zu(t,e,o,i){var r=e.length;if(i.visible)for(var n=o.mirror,s=o.lineBox,a=i.skip;a<r;a+=i.step)a%i.skipUnit!=0&&(o.tickX=n?s.x2:s.x2-i.size,o.tickY=n?s.y1-i.size:s.y1,o.position=e[a],t.append(qu(o,i)))}var Qu=function(t){function e(e,o){var i=e||{};!zt(i.reverse)&&!1===i.vertical&&(o||{}).rtl&&(i=Object.assign({},i,{reverse:!0})),t.call(this,0,1,i,o),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return(e=at({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||go(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Xu,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},e.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 Xu,a=n.length,p=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var h=Du(n[l],e,o),c=this.getSlot(h.from,h.to),u=i?this.lineBox():c,d=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):d.y2+=p*(r?-1:1),s.append(Wu.fromRect(new q.geometry.Rect([u.x1,d.y1],[u.x2-u.x1,d.y2-d.y1]),{fill:{color:h.color,opacity:h.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new Xu,i=0;i<t.length;i++)o.append(zu(t[i],e.labels));return o},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new Xu;if(t.width>0&&t.visible){var i=new Wu({stroke:{color:t.color,dashType:t.dashType,width:t.width}});i.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(i)}return o},e.prototype.renderTicks=function(){var t=new Xu,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Zu(t,this.getMajorTickPositions(),i,e.majorTicks),Zu(t,this.getMinorTickPositions(),i,at({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e}(vr);te(Qu,{min:0,max:50,majorTicks:{size:15,align:Mu,color:u,width:Pu,visible:!0},minorTicks:{size:10,align:Mu,color:u,width:Pu,visible:!0},line:{width:Pu},labels:{position:Mu,padding:2},mirror:!1,_alignLines:!1});const Ku=Qu;var $u=function(t){function e(e,o){t.call(this);var i=e.options,r=i.min,n=i.max,s=this.options=at({},this.options,o);s.fill=s.color,this.scale=e,zt(s.value)?s.value=Xt(s.value,r,n):s.value=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,r=i.min,n=i.max;e._oldValue=zt(e._oldValue)?e.value:r,e.value=Xt(t,r,n),this.elements&&this.repaint()},e}(q.Class);te($u,{color:u});const Ju=$u;var td=function(t){function e(e,o){t.call(this,e,o),this.options=at({track:{visible:zt(o.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),l=i.track.size||i.size,h=i.size/2,c=dt(i.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(o=new xo(p.x1+u,p.y1,p.x1+u,p.y2),s?o.x1-=l:o.x2+=l,i.shape!==Cu&&(t=e=new xo(p.x2+u,p.y1-h,p.x2+u,p.y2+h))):(o=new xo(p.x1,p.y1-u,p.x2,p.y1-u),s?o.y2+=l:o.y1-=l,i.shape!==Cu&&(t=e=new xo(p.x1-h,p.y1-u,p.x2+h,p.y1-u))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:zt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,o=t.options,i=o.mirror,r=o.vertical,n=dt(e.margin);return r?n[i?"left":"right"]:n[i?"bottom":"top"]},e}(Ju);te(td,{shape:Cu,track:{border:{width:1}},color:u,border:{width:1},opacity:1,margin:dt(3),animation:{type:Cu},visible:!0});const ed=td;var od=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,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);var s=this.fromScale=new q.geometry.Point(o.x1,o.y1),a=this.toScale=new q.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=Pt(this.fromScale.x,this.toScale.x,t),o=Pt(this.fromScale.y,this.toScale.y,t);this.element.transform(q.geometry.transform().translate(e,o))},e}(q.drawing.Animation);te(od,{easing:Ou,duration:250}),q.drawing.AnimationFactory.current.register(Su,od);const id=od;var rd=q.geometry.Point,nd=q.drawing.Path,sd=function(t){function e(e,o){t.call(this,e,o),zt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new rd(0,0-o),new rd(0-i*e,0),new rd(0,0+o)]:[new rd(0-o,0),new rd(0,0+i*e),new rd(0+o,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=new id(this.elements,at(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type=Su;var r=new nd({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),n=t.getSlot(e.value);return r.transform(q.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(ed);const ad=sd;var pd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?H:F,o=this.to=t.newPoints[0][e],i=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-i)/t.speed*1e3,1)),this._set(i)},e.prototype.step=function(t){var e=Pt(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},e}(q.drawing.Animation);te(pd,{easing:Ou,speed:250}),q.drawing.AnimationFactory.current.register(Cu,pd);const ld=pd;var hd=q.drawing.Group,cd=q.drawing.Path,ud=function(t){function e(e,o){t.call(this,e,o),zt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,p=e.getSlot(e.options.min),l=e.getSlot(t),h=n?H:F,c=n?F:H,u=this._margin()*s,d=new q.geometry.Point;d[h]=p[h+"1"],d[c]=p[c+"1"];var f=new q.geometry.Point;f[h]=l[h+"1"],f[c]=l[c+"1"],n?(d.translate(u,0),f.translate(u,0)):(d.translate(0,u),f.translate(0,u));var g=f.clone(),y=d.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[d,f,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();var n=new ld(i,at(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new hd,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var o=this.pointerPath=new cd({stroke:e.stroke,fill:e.fill});return t.append(o),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new cd.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(ed);const dd=ud;var fd=q.drawing.Group,gd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,r=new xo(o,i,o+t.width(),i+t.height());this.scale.reflow(r),this._shrinkScaleWidth(r);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new fd,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},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Ku(t.scale,this.contextService);this.pointers=[];var o=t.pointer;o=G(o)?o:[o];for(var i=0;i<o.length;i++){var r=at({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?ad:dd;this.pointers.push(new n(e,r))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,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 o.options.vertical?(e=n.width()/2,n=new xo(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new xo(t.x1,r.y-e,t.x2,r.y+e)),n},e.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 xo(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new xo(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var o=e.contentBox().width()-t.width();o>0&&(e.box.shrink(o,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),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)},e}(Gu);te(gd,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const yd=gd;var vd=180,md=q.drawing.Arc,xd=q.drawing.Path,_d=q.drawing.Group;function bd(t,e,o,i){var r=new _d,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),l=new q.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new xd({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(l))}return r}function wd(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var kd=function(t){function e(e,o){t.call(this,0,1,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return e.majorUnit=e.majorUnit||go(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var o=this.renderArc(t,e);this.bbox=o.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),o=Math.min(t.height(),t.width())/2;if(!zt(this.bbox))return this.render(e,o);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-o)/(i-o)*a:(t-o)/(i-o)*a+n)+vd},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,i=0;return e.visible&&(i=e.size),o.visible&&(i=Math.max(o.size,i)),i},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),o=this.options;return o.endAngle-o.startAngle>=360&&o.max%o.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new _d,s=.05*o;zt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p=a.position===Mu,l=zt(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!l&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var h=this.labels,c=h.length,u=dt(a.padding),d=(u.left+u.right)/2,f=(u.top+u.bottom)/2,g=0;g<c;g++){var y=h[g],v=y.box.width()/2,m=y.box.height()/2,x=i[g],_=(x-vd)*Tu,b=e.pointAt(x),w=b.x+Math.cos(_)*(v+d)*(p?1:-1),k=b.y+Math.sin(_)*(m+f)*(p?1:-1);y.reflow(new xo(w-v,k-m,w+v,k+m));var A=new q.geometry.Point(y.box.x1,y.box.y1),S=void 0;if(l){var C=(S=this.labelElements.children[g]).bbox().origin,P=S.transform()||q.geometry.transform();P.translate(A.x-C.x,A.y-C.y),S.transform(P)}else S=zu(y,t.labels),n.append(S);this.bbox=q.geometry.Rect.union(this.bbox,S.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,o=e.rangeDistance,i=e.rangeSize,r=this.getRangeRadius();this.options.labels.position===Mu&&(r+=i+o);for(var n=r+i/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=q.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new _d;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,s=i.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var l=t[p],h=this.slotAngle(l[n?"to":"from"]),c=this.slotAngle(l[n?"from":"to"]);c-h!=0&&o.append(this.createRange(h,c,a,l))}}return o},e.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,n=new q.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new md(n,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},e.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(wd(r,n,s));for(var a=0;a<o;a++)for(var p=Du(e[a],r,n),l=i.length,h=0;h<l;h++){var c=i[h];if(c.from<=p.from&&p.from<=c.to){i.push(wd(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(wd(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Lu?t.getRadiusX()-r-i-o:t.getRadiusX()-o},e.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new q.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+vd,endAngle:o.endAngle+vd})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=bd(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new _d;i.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,e.labels.position===Lu){var s=o.getRadiusX();o.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=bd(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;i>=0;i--)i%o==0&&t.splice(i,1);return t},e.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),n>=360&&o.max%e==0&&(s-=1);for(var l=[],h=0;h<s;h++)l.push(Zt(a,y)),a+=p;return Zt(a)<=t.endAngle&&l.push(a),l},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&this.options.labels.position===Lu&&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,l=a.x-p[0].anchor().x,h=a.y-p[0].anchor().y;t[s].transform((new q.geometry.transform).translate(l,h))}},e}(vr);te(kd,{min:0,max:100,majorTicks:{size:15,align:Mu,color:u,width:Pu,visible:!0},minorTicks:{size:10,align:Mu,color:u,width:Pu,visible:!0},startAngle:-30,endAngle:210,labels:{position:Mu,padding:2}});const Ad=kd;var Sd=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.duration=Math.max(Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,o=Pt(e.oldAngle,e.newAngle,t);this.element.transform(q.geometry.transform().rotate(o,e.center))},e}(q.drawing.Animation);te(Sd,{easing:Ou,duration:Au}),q.drawing.AnimationFactory.current.register(Bu,Sd);const Cd=Sd;var Pd=q.drawing.Circle,Td=q.drawing.Group,Md=q.drawing.Path,Od=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(q.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(i):new Cd(this.elements,at(e.animation,{oldAngle:o,newAngle:i})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=new Td;return!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Tu),o},e.prototype.reflow=function(t){var e=this.center=t.center,o=Xt(this.options.length||1,.1,1.5),i=this.radius=t.getRadiusX()*o,r=this.capSize=Math.round(i*this.options.cap.size);this.bbox=q.geometry.Rect.fromPoints(new q.geometry.Point(e.x-r,e.y-r),new q.geometry.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,i=new Md({fill:{color:o},stroke:{color:o,width:Pu}});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},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,o=new q.geometry.Circle(this.center,this.capSize);return new Pd(o,{fill:{color:e},stroke:{color:e}})},e}(Ju);te(Od,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:Bu,duration:Au}});const Ld=Od;var Bd=q.drawing.Group,Id=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=q.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,o){var i=this._visuals=new Bd;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},e.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),l=Zt(p,y),h=Zt(-p,y),c=0,u=0;!(!(u++<100)||(c=n===i?c+1:0)>5||l!==r&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=e>0&&i>0?2*l:e<0&&i<0?2*h:Zt((l+h)/2||1,y),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,o>0?(h=r,i=o):(l=r,e=o)},e.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=q.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,r=e.y-o.y,n=this.scale,s=this.pointers;n.arc.center.x-=i,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=q.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Ad(t.scale,this.contextService);this.pointers=[];for(var i=G(e)?e:[e],r=0;r<i.length;r++){var n=new Ld(o,at({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Gu);te(Id,{transitions:!0,gaugeArea:{background:""}});const Ed=Id;var Rd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),n=this.slotAngle(i?t:e),s=this.createRange(r,n,this.getRangeRadius(),o);return this.ranges.append(s),s},e}(Ad);te(Rd,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const Vd=Rd;var jd=function(t){function e(e,o){t.call(this,e,o);var i=this.options,r=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3;i.duration=Xt(r,Au,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new q.Color(n),this.color=new q.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this,o=e.options,i=e.startColor,r=e.color,n=Pt(o.oldAngle,o.newAngle,t);if(this.element.angle(n),r){var s=Zt(Pt(i.r,r.r,t)),a=Zt(Pt(i.g,r.g,t)),p=Zt(Pt(i.b,r.b,t));this.element.stroke(new q.Color(s,a,p).toHex())}},e}(q.drawing.Animation);te(jd,{easing:Ou,duration:Au}),q.drawing.AnimationFactory.current.register(Iu,jd);const zd=jd;var Dd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(i),this.stroke(this.currentColor())):(this.animation=new zd(this,at(e.animation,{oldAngle:o,newAngle:i})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,i=this.options,r=i.colors,n=i.color,s=i.value,a=K(s)?s:e;if(r)for(var p=0;p<r.length;p++){var l=r[p],h=l.color,c=l.from;void 0===c&&(c=e);var u=l.to;if(void 0===u&&(u=o),c<=a&&a<=u)return h}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Ju);te(Dd,{animation:{type:Iu,duration:Au}});const Fd=Dd;var Hd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Vd(t.scale,this.contextService),o=new Fd(e,at({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[o]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,n=i.y-e/2;if(t<o.width){var s=r+t;r=Math.max(r,0),s>o.width&&(r-=s-o.width)}if(e<o.height){var a=this.scale.bbox,p=a.bottomRight().y,l=n+e;n=Math.max(n,a.origin.y),l>p&&(n-=l-p)}return{left:r,top:n}},e}(Ed);const Nd=Hd;var Ud=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._createModel=function(){var e=this.options.scale;"number"!=typeof e.startAngle&&(e.startAngle=90),e.endAngle=e.startAngle+360,t.prototype._createModel.call(this)},e}(Nd);const Gd=Ud;var Wd=function(t){function e(e){t.call(this),this.setOptions(e),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},e.prototype.encode=function(t,e,o){var i=zt(t)?String(t):t;return this.initValue(i,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},e.prototype.initValue=function(){},e.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},e.prototype.addData=function(){},e.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e}(q.Class);te(Wd,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Xd=Object.assign,Yd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Xd(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength){var i=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=i,this.addPattern(this.characterMap[i])}},e.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},e.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},e.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},e.prototype.addCharacter=function(t){var e=this.getValue(t),o=this.characterMap[e];this.addPattern(o)},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},e}(Wd);te(Yd,{addCheckSum:!0});var qd=Object.assign,Zd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qd(this,{minBaseUnitLength:.7})},e.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},e.prototype.addBase=function(){},e}(Wd),Qd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qd(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},e.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&r>o;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){var n=Math.ceil(this.getBaseWidth(o)*e);throw new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+n+"px.")}this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},e.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},e.prototype.getBaseWidth=function(t){var e=3*(t+2);return this.quietZoneLength+e*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},e.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},e.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},e.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e}(Zd);te(Qd,{addCheckSum:!1});var Kd={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):t.charCodeAt(0)>127?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var 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,o;if(this.specialAsciiCodes[t]){e=[];for(var i=0;i<this.specialAsciiCodes[t].length;i++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][i]])}else o=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(o)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},$d=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Kd,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},e}(Qd),Jd=Object.assign,tf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Jd(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},e.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},e.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength){var e=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit));throw new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+e+"px.")}},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},e.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},e.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},e.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,o=this.values,i=o.length,r=0;for(e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-e,this.cCheckSumTotal);for(t=r%this.checkSumMod,r=this.weightedValue(t,1,this.kCheckSumTotal),e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-e+1,this.kCheckSumTotal);return[t,r%this.checkSumMod]},e.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},e.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},e}(Zd),ef=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Kd,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)if(t=e[o],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var i=this._findCharacterByValue(t);this.addPattern(this.characterMap[i].pattern)}}})},e}(tf),of=/^\d+$/,rf=Object.assign,nf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),rf(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},e.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},e.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},e.prototype.validate=function(t){if(of.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!Ct(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(Wd),sf=/^\d+$/,af=/^[a-z0-9]+$/i,pf=Object.assign,lf=function(t){function e(e){t.call(this),this.encoding=e,this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.addStart=function(){},e.prototype.is=function(){},e.prototype.isCode=function(){return!1},e.prototype.move=function(){},e.prototype.pushState=function(){},e}(q.Class),hf=function(t){function e(e,o){t.call(this,e),this.states=o,this._initMoves(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},e.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;if(Ct("C",o)){var n=i.substr(t.index).match(/\d{4,}/g);n&&(r=i.indexOf(n[0],t.index))}for(;(e=t.value.charCodeAt(t.index))>=0&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},e.prototype._initMoves=function(t){this._moves=[],Ct(this.FNC4,t)&&this._moves.push(this._moveFNC),Ct(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},e.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},e.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0,!0},e.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},e}(lf),cf={};cf.A=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},e.prototype.isCode=function(t){return 0<=t&&t<96},e.prototype.getValue=function(t){return t<32?t+64:t-32},e}(hf),cf.B=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},e.prototype.isCode=function(t){return 32<=t&&t<128},e.prototype.getValue=function(t){return t-32},e}(hf),cf.C=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=mf(t,e,4);return(e+4<=t.length||2===t.length)&&sf.test(o)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=mf(t.value,t.index,2))&&sf.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(lf),cf.FNC4=function(t){function e(e,o){t.call(this,e),this._initSubStates(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,o=this._getSubState(e);this.encoding[o].addStart()},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,o=this._initSubState(t),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},e.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},e.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},e.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)Ct(t[e],this.dependentStates)&&this.subStates.push(t[e])},e.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},e.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},e}(lf),cf.FNC1=function(t){function e(e,o){t.call(this,e),this.states=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},e.prototype.addStart=function(){this.encoding[this.startState].addStart()},e.prototype.is=function(){return Ct(this.key,this.states)},e.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(p.index=0,(e=(i=n.charAt(a)===this.startAI?2:0)>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},e.prototype.validate=function(t,e){var o=e.substr(t.id.length),i=t.ai;if(!i.type&&!sf.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!af.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=mf(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,o),r=t.substring(o+1,i),n=this.getApplicationIdentifier(r)||this.getApplicationIdentifier(r.substr(r.length-1));return n||this.unsupportedAIError(r),{ai:n,id:r}},e.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&Ct(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}},e}(lf);var uf=function(t){function e(e){t.call(this,e),this._initStates()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},e.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new cf[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},e.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},e.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);)if(t.shifted){var o=t.state;t.state=t.previousState,t.previousState=o,t.shifted=!1}else t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t)},e.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},e.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},e.prototype.addStop=function(){this.addPattern(this.STOP)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))},e}(Wd),df=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{name:"Code 128 A",states:["A"]})},e}(uf),ff=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{name:"Code 128 B",states:["B"]})},e}(uf),gf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{name:"Code 128 C",states:["C"]})},e}(uf),yf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(uf),vf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),pf(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(uf);function mf(t,e,o){return t.substring(e,e+o)}var xf=Object.assign,_f=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),xf(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Sf})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},e.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},e}(Wd),bf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),xf(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(_f),wf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),xf(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(_f),kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),xf(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(_f),Af=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),xf(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(_f),Sf={Modulo10:function(t){var e,o,i,r=[0,""],n=t.length%2;for(e=0;e<t.length;e++)r[(e+n)%2]+=parseInt(t.charAt(e),10);for(i=r[0],o=(2*r[1]).toString(),e=0;e<o.length;e++)i+=parseInt(o.charAt(e),10);return[(10-i%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,o=this.Modulo11(t);return e=t+o[0],o.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,o=this.Modulo10(t);return e=t+o[0],o.concat(this.Modulo10(e))}},Cf=Object.assign,Pf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Cf(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},e.prototype.initValue=function(t,e,o){var i=String(t);if(12!==i.length||/\D/.test(i))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=i,this.checksum=this.calculateChecksum(),this.leftKey=i[0],this.leftPart=i.substr(1,6),this.rightPart=i.substr(7)+this.checksum},e.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},e.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},e.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),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},e}(Wd),Tf=Object.assign,Mf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Tf(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},e}(Pf),Of={code11:Yd,code39:Qd,code39extended:$d,code93:tf,code93extended:ef,code128:yf,code128a:df,code128b:ff,code128c:gf};function Lf(t,e){var o=t.style.display;"canvas"===e&&(t.style.display="block");var i={width:t.clientWidth,height:t.clientHeight};return t.style.display=o,i}Of["gs1-128"]=vf,Of.msimod10=bf,Of.msimod11=wf,Of.msimod1010=kf,Of.msimod1110=Af,Of.postnet=nf,Of.ean8=Mf,Of.ean13=Pf;var Bf=function(t){function e(e,o,i){void 0===i&&(i=we),t.call(this),this.options=at({},this.options,o),this.element=e,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(o),o&&zt(o.value)&&this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){W(this.element,"k-barcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},e.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype._render=function(){var t,e,o=this.options,i=o.value,r=o.text,n=dt(r.margin),s=this._getSize(),a=o.border||{},p=this.encoding,l=new xo(0,0,s.width,s.height).unpad(a.width).unpad(o.padding),h=l.height(),c=new q.drawing.Group;this.contentBox=l,c.append(this._getBackground(s)),r.visible&&(h-=q.drawing.util.measureText(i,{font:r.font}).height+n.top+n.bottom);try{t=p.encode(i,l.width(),h)}catch(t){return this.onError(t),c}return r.visible&&(e=i,o.checksum&&zt(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=Lf(this.element,this.options.renderAs),e=new q.geometry.Size(300,100);return t.width>0&&(e.width=t.width),t.height>0&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},e.prototype.value=function(t){if(!zt(t))return this.options.value;this.options.value=String(t),this.redraw()},e.prototype._getBands=function(t,e){for(var o,i,r=this.contentBox,n=r.x1,s=new q.drawing.Group,a=0;a<t.length;a++){if(o=(i=pt(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=q.geometry.Rect.fromPoints(new q.geometry.Point(n,i.y1+r.y1),new q.geometry.Point(n+o,i.y2+r.y1)),l=q.drawing.Path.fromRect(p,{fill:{color:this.options.color},stroke:null});s.append(l)}n+=o}return s},e.prototype._getBackground=function(t){var e=this.options,o=e.border||{},i=new xo(0,0,t.width,t.height).unpad(o.width/2);return q.drawing.Path.fromRect(i.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},e.prototype._getText=function(t){var e=this.options.text,o=this._textbox=new Zo(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return o.reflow(this.contentBox),o.renderVisual(),o.visual},e.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Of[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Of[this.type],this.options=at({},this.options,t)},e}(q.Class);te(Bf,{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}});const If=Bf;var Ef={width:500,height:100};const Rf=function(t,e){if(void 0===e&&(e=Ef),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),i="";if("upca"===o?(o="ean13",i="0"):"upce"===o&&(o="ean8",i="0"),!Of[o])throw new Error("Encoding '"+t+"' is not supported.");return function(t,e,o){return function(i){try{t.encode(o+i,e.width,e.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}(new Of[o],e,i)};var Vf=Object.assign;function jf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function zf(t,e){var o=Number(t).toString(2);return o.length<e&&(o=new Array(e-o.length+1).join(0)+o),o}function Df(t){return parseInt(t,2)}var Ff=function(t){function e(e){t.call(this),this.matrix=e,this.row=e.length-1,this.column=e.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},e.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},e.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},e}(q.Class),Hf=function(t){function e(e,o){t.call(this),this.dataString=e,this.version=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(q.Class),Nf="alphanumeric",Uf=/^\d+/,Gf="A-Z0-9 $%*+./:-",Wf=new RegExp("^[A-Z $%*+./:-]+"),Xf=new RegExp("^["+Gf+"]+"),Yf=new RegExp("^[^"+Gf+"]+");function qf(t,e,o,i,r){var n,s,a=Uf.exec(t),p=a?a[0]:"",l=Wf.exec(t),h=l?l[0]:"",c=Xf.exec(t),u=c?c[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=o&&!Xf.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=i||r===Nf)?(n=Nf,s=p||h):(n="byte",s=u?u+Yf.exec(t.substring(u.length))[0]:Yf.exec(t)[0]),{mode:n,modeString:s}}var Zf=function(t){function e(){t.call(this),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){Vf(this,{modeIndicator:"",bitsInCharacterCount:[]})},e.prototype.getVersionIndex=function(t){return t<10?0:t>26?2:1},e.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},e.prototype.getModeCountString=function(t,e){return this.modeIndicator+zf(t,this.getBitsCharacterCount(e))},e.prototype.encode=function(){},e.prototype.getStringBitsLength=function(){},e.prototype.getValue=function(){},e}(q.Class),Qf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Vf(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var o,i=jf(t,3),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=zf(i[o],10);return r+zf(i[o],1+3*i[o].length)},e.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0===o?0:1)},e}(Zf),Kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Vf(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},e.prototype.getValue=function(t){return this.characters[t]},e.prototype.encode=function(t,e){var o,i=jf(t,2),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=zf(45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)),11);return r+zf(2===i[o].length?45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)):this.getValue(i[o].charAt(0)),1+5*i[o].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(Zf),$f=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Vf(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},e.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},e.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=zf(this.getValue(t.charAt(i)),8);return o},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(Zf),Jf={};Jf.numeric=new Qf,Jf.alphanumeric=new Kf,Jf.byte=new $f;var tg=[{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}}];function eg(t,e){var o=0,i=tg.length-1,r=Math.floor(tg.length/2);do{t<tg[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2)}while(i-o>1);return t<=tg[o][e].totalDataCodewords?r+1:i+1}var og=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getEncodingResult=function(t,e){var o=function(t){var e,o=[],i=0,r=t;for(o.push(qf(r,8,5,8,e)),e=o[0].mode,r=r.substr(o[0].modeString.length);r.length>0;){var n=qf(r,17,9,16,e);n.mode!==e?(e=n.mode,o.push(n),i++):o[i].modeString+=n.modeString,r=r.substr(n.modeString.length)}return o}(t),i=function(t){for(var e=0,o=0;o<t.length;o++)e+=Jf[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(o),r=eg(i,e),n=function(t,e){for(var o="",i=0;i<t.length;i++)o+=Jf[t[i].mode].encode(t[i].modeString,e);return o}(o,r);return new Hf(n,r)},e}(q.Class),ig=function(t){function e(){t.call(this),this.initProperties(),this.mode=Jf[this.encodingMode]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){Vf(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},e.prototype.getEncodingResult=function(t,e){var o=this.encode(t),i=eg(this.getDataCodewordsCount(o),e),r=this.mode.getModeCountString(o.length/8,i)+o;return new Hf(r,i)},e.prototype.getDataCodewordsCount=function(t){var e=t.length;return Math.ceil((this.initialModeCountStringLength+e)/8)},e.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},e.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=zf(t,8);else{for(var r=8-e,n=0;n<o;n++)i=zf(t>>6*n&63|128,8)+i;i=(t>>6*o|255>>r<<r).toString(2)+i}return i},e.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},e}(q.Class),rg={1:0},ng={0:1},sg={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},ag=[1,0,1,1,1],pg=[1,0,1],lg={L:"01",M:"00",Q:"11",H:"10"},hg=["11101100","00010001"],cg=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%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}],ug=[[1,0],[1,25,0]];function dg(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function fg(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 gg(t,e){for(var o=[],i=t.length-2;i>=0;i--)o[i]=t[i]^e[i];return o}function yg(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]+(e[r]>=0?e[r]:0))%255:o[i+r]=rg[ng[o[i+r]]^ng[(t[i]+e[r])%255]];return o}function vg(t,e){var o=[],i=t.length-1;do{o[i]=ng[(t[i]+e)%255],i--}while(void 0!==t[i]);return o}function mg(t,e){var o,i,r=ug[e-1],n=new Array(e).concat(t),s=new Array(n.length-r.length).concat(r),a=t.length,p=[];for(i=0;i<a;i++)o=vg(s,rg[n[n.length-1]]),s.splice(0,1),n=gg(o,n);for(i=n.length-1;i>=0;i--)p[e-1-i]=zf(n[i],8);return p}function xg(t,e,o){var i=Df(e),r=e.length-1,n=t<<r,s=zf(t,o-r),a=function(t,e){var o=e.toString(2).length,i=t.toString(2).length,r=t;do{i=(r^=e<<i-o).toString(2).length}while(i>=o);return r}(n,i);return s+zf(a,r)}function _g(t,e){return parseInt(t.charAt(e),10)}function bg(t,e){var o,i,r=t[0],n=0,s=e.length;for(o=0,i=8;o<=8;o++)6!==o&&dg(t,_g(e,s-1-n++),o,i);for(o=8,i=7;i>=0;i--)6!==i&&dg(t,_g(e,s-1-n++),o,i);for(n=0,i=r.length-1,o=8;i>=r.length-8;i--)dg(t,_g(e,s-1-n++),o,i);for(dg(t,1,r.length-8,8),o=r.length-7,i=8;o<r.length;o++)dg(t,_g(e,s-1-n++),o,i)}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=_g(e,e.length-p-1),0+o,s+i),dg(t,r,a+i,0+o)}function kg(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 Ag(t,e,o,i){var r=o,n=i,s=t[0];do{dg(t,0,r,i),dg(t,0,o,n),r+=e[0],n+=e[1]}while(r>=0&&r<s.length)}function Sg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,93===e[t][i]&&(o[t]+=40)}function Cg(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,r[t][n]>=5&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function Pg(t,e){var o=Math.floor(t/e*100),i=o%5,r=Math.abs(o-i-50),n=Math.abs(o+5-i-50);return 10*Math.min(r/5,n/5)}function Tg(t,e,o){var i=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new ig:new og}(o),r=i.getEncodingResult(t,e),n=r.version,s=tg[n-1][e],a=function(t,e){for(var o,i,r,n,s,a=0,p=[],l=[],h=e.groups,c=0;c<h.length;c++){r=h[c][0];for(var u=0;u<r;u++){i=h[c][1],o=[],n=[];for(var d=1;d<=i;d++)s=t.substring(a,a+8),o.push(s),n[i-d]=Df(s),a+=8;p.push(o),l.push(mg(n,e.errorCodewordsPerBlock))}}return[p,l]}(function(t,e){for(var o=8*e,i=0,r=0,n=t;n.length<o&&i<4;)n+="0000".charAt(i++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<o;)n+=hg[r],r^=1;return n}(r.dataString,s.totalDataCodewords),s),p=function(t){for(var e=[],o=17+4*t,i=0;i<cg.length;i++){e[i]=new Array(o);for(var r=0;r<o;r++)e[i][r]=new Array(o)}return e}(n);!function(t){var e=t[0].length;kg(t,ag,0,0),Ag(t,[-1,-1],7,7),kg(t,ag,e-7,0),Ag(t,[1,-1],e-8,7),kg(t,ag,0,e-7),Ag(t,[-1,1],7,e-8)}(p),function(t,e){if(!(e<2)){var o,i,r=t[0],n=r.length,s=Math.floor(e/7),a=[6],p=0;for((o=sg[e])?i=(n-13-o)/s:o=i=(n-13)/(s+1),a.push(a[p++]+o);a[p]+i<n;)a.push(a[p++]+i);for(var l=0;l<a.length;l++)for(var h=0;h<a.length;h++)void 0===r[a[l]][a[h]]&&kg(t,pg,a[l]-2,a[h]-2)}}(p,n),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}(p),n>=7&&wg(p,zf(0,18)),bg(p,zf(0,15)),function(t,e){for(var o,i,r,n=new Ff(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;o.length>0;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),fg(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();)fg(t,0,r.row,r.column)}(p,a);var l=function(t){var e,o,i=[],r=[],n=[],s=[],a=[],p=t[0].length;for(o=0;o<t.length;o++)i[o]=0,n[o]=0,a[o]=[0,0],s[o]=[0,0],r[o]=[];for(var l=0;l<p;l++)for(var h=0;h<p;h++)for(var c=0;c<t.length;c++)e=t[c],n[c]+=parseInt(e[l][h],10),r[c][0]===e[l][h]&&l+1<p&&h-1>=0&&e[l+1][h]===r[c][0]&&e[l+1][h-1]===r[c][0]&&(i[c]+=3),Sg(c,s,i,0,e[l][h]),Sg(c,s,i,1,e[h][l]),Cg(c,i,r,e[l][h],a,0),Cg(c,i,r,e[h][l],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(o=0;o<i.length;o++)i[o]+=Pg(n[o],d),i[o]<f&&(f=i[o],u=o);return u}(p),h=p[l];return n>=7&&wg([h],function(t){return xg(t,"1111100100101",18)}(n)),bg([h],function(t){var e,o="";if(0===Df(t))return"101010000010010";e=xg(Df(t),"10100110111",15);for(var i=0;i<e.length;i++)o+=e.charAt(i)^"101010000010010".charAt(i);return o}(lg[e]+zf(l,3))),h}!function(){var t,e;for(e=1;e<255;e++)(t=2*ng[e-1])>255&&(t^=285),ng[e]=t,rg[t]=e;t=2*ng[e-1]^285,ng[e]=t,ng[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=ug[t-1],o=[t,0];ug[t]=yg(e,o)}}();var Mg=Math.round,Og=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Lg=[[0,1],[1,1],[1,0]],Bg=function(t){function e(e,o,i){void 0===i&&(i=we),t.call(this),this.options=at({},this.options,o),this.element=e,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){W(this.element,"k-qrcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,i={width:0,height:0};return e>0&&(i.width=e),o&&(i.height=o),i},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.exportVisual=function(){return this._render()},e.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0;s.width=p;var l=new q.drawing.Group;try{n&&(o=Tg(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,l.append(this._renderBackground(i,s)),l.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(i,t)):this._isSwiss()&&l.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return l},e.prototype._renderLogo=function(t,e){var o,i=Mg(t/2),r=this._getLogoSize(7*e),n=this.options.overlay.imageUrl,s={x:i-r.width/2,y:i-r.height/2};return o=new q.geometry.Rect(new q.geometry.Point(s.x,s.y),new q.geometry.Size(r.width,r.height)),new q.drawing.Image(n,o)},e.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={},a=new q.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),a.append(this._renderShape(s,Math.ceil(o+2*e),Lg,"#fff")),s.x=s.y=n-o/2,a.append(this._renderShape(s,o,Lg,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,a.append(this._renderShape(s,i,Og,"#fff")),a},e.prototype._renderShape=function(t,e,o,i){var r=new q.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},e.prototype._getSize=function(){var t;if(this.options.size)t=parseInt(this.options.size,10);else{var e=Lf(this.element,this.options.renderAs),o=Math.min(e.width,e.height);t=o>0?o:200}return t},e.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<1){var i=Math.ceil(1*e);this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))}else o*e>=t&&o-1>=1&&o--;return o},e.prototype._renderMatrix=function(t,e,o){for(var i=new q.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=Mg(o+a*e),l=Mg(n),h=Mg(o+s*e),c=Mg(n+e);i.moveTo(p,l).lineTo(p,c).lineTo(h,c).lineTo(h,l).close()}}return i},e.prototype._renderBackground=function(t,e){var o=new xo(0,0,t,t).unpad(e.width/2);return q.drawing.Path.fromRect(o.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},e.prototype.setOptions=function(t){var e=t||{};this.options=Vf(this.options,e),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},e.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},e.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},e.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},e.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},e}(q.Class);te(Bg,{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}});const Ig=Bg,Eg=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{Tg(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var Rg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Vg(t){return t*t}var jg=Math,zg=jg.abs,Dg=jg.atan,Fg=jg.atan2,Hg=jg.cos,Ng=jg.sin,Ug=jg.tan,Gg=function(t){function e(e,o){t.call(this),this.initProperties(),1===arguments.length?(this.lat=e[0],this.lng=e[1]):(this.lat=e,this.lng=o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){at(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},e.prototype.toArray=function(){return[this.lat,this.lng]},e.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},e.prototype.clone=function(){return new e(this.lat,this.lng)},e.prototype.round=function(t){return this.lng=Zt(this.lng,t),this.lat=Zt(this.lat,t),this},e.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},e.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},e.prototype.destination=function(t,o,i){var r=qt(o),n=i||Rg.WGS84,s=qt(this.lat),a=qt(this.lng),p=t/n.a,l=jg.asin(Ng(s)*Hg(p)+Hg(s)*Ng(p)*Hg(r)),h=a+Fg(Ng(r)*Ng(p)*Hg(s),Hg(p)-Ng(s)*Ng(l));return new e(Dt(l),Dt(h))},e.prototype.greatCircleTo=function(t,o){var i=e.create(i),r=o||Rg.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var n,s,a,p,l,h,c,u,d=r.a,f=r.b,g=r.f,y=qt(i.lng-this.lng),v=Dg((1-g)*Ug(qt(this.lat))),m=Ng(v),x=Hg(v),_=Dg((1-g)*Ug(qt(i.lat))),b=Ng(_),w=Hg(_),k=y,A=this.DISTANCE_ITERATIONS,S=!1;!S&&A-- >0;){s=Ng(k),a=Hg(k),p=jg.sqrt(Vg(w*s)+Vg(x*b-m*w*a)),u=Fg(p,h=m*b+x*w*a);var C=x*w*s/p;c=0,0!=(l=1-Vg(C))&&(c=h-2*m*b/l),n=k;var P=g/16*l*(4+g*(4-3*l));k=y+(1-P)*g*C*(u+P*p*(c+P*h*(2*Vg(c)-1))),S=zg(k-n)<=this.DISTANCE_CONVERGENCE}var T=l*(Vg(d)-Vg(f))/Vg(f),M=1+T/16384*(4096+T*(T*(320-175*T)-768)),O=T/1024*(256+T*(T*(74-47*T)-128)),L=O*p*(c+O/4*(h*(2*Vg(c)-1)-O/6*c*(4*Vg(p)-3)*(4*Vg(c)-3))),B=Fg(w*s,x*b-m*w*a),I=Fg(x*s,-m*w+x*b*a);return{distance:Zt(f*M*(u-L),this.DISTANCE_PRECISION),azimuthFrom:Dt(B),azimuthTo:Dt(I)}},e.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},e.fromLngLat=function(t){return new e(t[1],t[0])},e.fromLatLng=function(t){return new e(t[0],t[1])},e.create=function(t,o){if(zt(t))return t instanceof e?t.clone():1===arguments.length&&2===t.length?e.fromLatLng(t):new e(t,o)},e}(q.Class),Wg=Math,Xg=Wg.atan,Yg=Wg.exp,qg=Wg.pow,Zg=Wg.sin,Qg=Wg.log,Kg=Wg.tan,$g=q.geometry.Point,Jg=Wg.PI,ty=Jg/2,ey=Jg/4,oy=Jg/180,iy=Rg.WGS84,ry=function(t){function e(e){t.call(this),this.initProperties(),this._initOptions(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.initProperties=function(){at(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},e.prototype.forward=function(t,e){var o=this,i=o.options,r=i.datum.a,n=i.centralMeridian,s=Xt(t.lat,-o.MAX_LAT,o.MAX_LAT),a=e?Xt(t.lng,-o.MAX_LNG,o.MAX_LNG):t.lng,p=qt(a-n)*r,l=o._projectLat(s);return new $g(p,l)},e.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,i=e.a,r=qt(t),n=Kg(ey+r/2),s=o*Zg(r),a=qg((1-s)/(1+s),o/2);return i*Qg(n*a)},e.prototype.inverse=function(t,e){var o=this,i=o.options,r=i.datum.a,n=i.centralMeridian,s=t.x/(oy*r)+n,a=Xt(o._inverseY(t.y),-o.MAX_LAT,o.MAX_LAT);return e&&(s=Xt(s,-o.MAX_LNG,o.MAX_LNG)),new Gg(a,s)},e.prototype._inverseY=function(t){var e,o=this,i=o.options.datum,r=i.a,n=i.e,s=n/2,a=Yg(-t/r),p=ty-2*Xg(a);for(e=0;e<=o.INVERSE_ITERATIONS;e++){var l=n*Zg(p),h=qg((1-l)/(1+l),s),c=ty-2*Xg(a*h)-p;if(p+=c,Wg.abs(c)<=o.INVERSE_CONVERGENCE)break}return Dt(p)},e}(q.Class);te(ry,{centralMeridian:0,datum:iy});var ny=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{MAX_LAT:85.0511287798})},e.prototype._projectLat=function(t){var e=this.options.datum.a,o=qt(t),i=Kg(ey+o/2);return e*Qg(i)},e.prototype._inverseY=function(t){var e=this.options.datum.a,o=Yg(-t/e);return Dt(ty-2*Xg(o))},e}(ry),sy=function(t){function e(){t.call(this);var e=this._proj=new ny,o=this.c=2*Jg*e.options.datum.a;this._tm=q.geometry.transform().translate(.5,.5).scale(1/o,-1/o),this._itm=q.geometry.transform().scale(o,-o).translate(-.5,-.5)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},e.prototype.toLocation=function(t,e,o){var i=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(i,o)},e}(q.Class),ay=(Object.assign,function(t,e){return t.bind(e)}),py=function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild},ly=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},hy=function(t,e){e.insertBefore(t,e.firstChild)},cy=function(t){return t.replace(/([a-z][A-Z])/g,(function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()}))},uy=function(t){return t&&String(t).endsWith("px")?t:String(t)+"px"},dy=function(t,e){var o=t.prototype;o.events?e.forEach((function(t){o.events.indexOf(t)<0&&o.events.push(t)})):o.events=e},fy=function(t){var e=[];if(t)for(var o=cy(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")},gy=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.items=[],W(this.element,"k-widget k-attribution")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},e.prototype.add=function(t){var e=t;zt(t)&&("string"==typeof t&&(e={text:t}),this.items.push(e),this._render())},e.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},e.prototype.clear=function(){this.items=[],ly(this.element)},e.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var o=this.items[e],i=this._itemText(o);""!==i&&t.push(i)}t.length>0?(ly(this.element),function(t,e){var o=document.createElement("div");for(o.innerHTML=t;o.childNodes.length>0;)e.appendChild(o.childNodes[0])}(t.join(this.options.separator),this.element),this.showElement()):this.hideElement()},e.prototype.hideElement=function(){this.element.style.display="none"},e.prototype.showElement=function(){this.element.style.display=""},e.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},e.prototype._inZoomLevel=function(t,e){var o=Kt(t,-Number.MAX_VALUE),i=Kt(e,Number.MAX_VALUE);return this._zoom>o&&this._zoom<i},e.prototype._inArea=function(t){var e=!0;return t&&(e=t.contains(this._extent)),e},e}(Ue);te(gy,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var yy={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function vy(t,e){var o='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+yy[t].className+'" aria-label="move '+t+'">'+ae({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return py(o)}var my=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=vy("up",o.icons),r=vy("right",o.icons),n=vy("down",o.icons),s=vy("left",o.icons);this.element.appendChild(i),this.element.appendChild(r),this.element.appendChild(n),this.element.appendChild(s),W(this.element,"k-widget k-navigator"),Ie(this.element,"click",".k-button",ay(this._click,this));var a=this.element.parentNode.closest("[data-role]");this._keyroot=a||this.element,this._tabindex(this._keyroot),this._keydownHandler=ay(this._keydown,this),Ie(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.dispose()},e.prototype.dispose=function(){Ee(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i="tabindex",r=e.getAttribute(i)||o.getAttribute(i);o.removeAttribute(i),e.setAttribute(i,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},e.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.UP:this._pan(0,1),t.preventDefault();break;case ke.DOWN:this._pan(0,-1),t.preventDefault();break;case ke.RIGHT:this._pan(1,0),t.preventDefault();break;case ke.LEFT:this._pan(-1,0),t.preventDefault()}},e}(Ue);function xy(t,e,o){var i='<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+ae({icon:e,iconClass:"k-button-icon",svgIcons:o.svgIcons,type:o.type})+"</button>";return py(i)}te(my,{name:"Navigator",panStep:1}),dy(my,["pan"]);var _y="change",by=function(t){function e(e,o,i){t.call(this),this.element=e,this._initOptions(o);var r=xy("in","plus",i),n=xy("out","minus",i);this.element.appendChild(r),this.element.appendChild(n),this.element.setAttribute("role","group"),W(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Ie(this.element,"click",".k-button",this._clickHandler);var s=this.element.parentNode.closest("[data-role]");this._keyroot=s||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Ie(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&Ee(this.element,"click",this._clickHandler),this._keyroot&&Ee(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i="tabindex",r=e.getAttribute(i)||o.getAttribute(i);o.removeAttribute(i),e.setAttribute(i,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._change=function(t){var e=this.options.zoomStep;this.trigger(_y,{delta:t*e})},e.prototype._click=function(t){var e=1;kt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case ke.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},e}(Ue);te(by,{name:"ZoomControl",zoomStep:1}),dy(by,[_y]);var wy=Math,ky=wy.max,Ay=wy.min,Sy=function(t){function e(e,o){t.call(this);var i=Gg.create(e),r=Gg.create(o);i.lng+180>r.lng+180&&i.lat+90<r.lat+90?(this.se=i,this.nw=r):(this.se=r,this.nw=i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={World:{configurable:!0}};return e.prototype.contains=function(t){var e=this.nw,o=this.se,i=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},e.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,i=t.lat+(e.lat-t.lat)/2;return new Gg(i,o)},e.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},e.prototype.include=function(t){var e=this.nw,o=this.se,i=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);e.lng=Ay(e.lng,i),e.lat=ky(e.lat,r),o.lng=ky(o.lng,i),o.lat=Ay(o.lat,r)},e.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},e.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Gg(t.lat,e.lng),se:this.se,sw:new Gg(e.lat,t.lng)}},e.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Gg(t.lat,e.lng),e,new Gg(e.lat,t.lng)]},e.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},e.create=function(t,o){return t instanceof e?t:t&&o?new e(t,o):t&&4===t.length&&!o?new e([t[0],t[1]],[t[2],t[3]]):void 0},o.World.get=function(){return new e([90,-180],[-90,180])},Object.defineProperties(e,o),e}(q.Class),Cy="centerChange",Py=function(t){function e(e,o){t.call(this),this.widgetService=e,this.options=at({},this.options,o),this.offset={x:0,y:0}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={anchor:{configurable:!0}};return e.prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},e.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},o.anchor.get=function(){return this._anchor},o.anchor.set=function(t){var e=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:e.left,top:e.top}},e.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(e.prototype,o),e}(q.Class);te(Py,{border:{width:1},opacity:1});var Ty=function(t){function e(e,o){t.call(this),this.support=Re(),this._initOptions(o),this.map=e;var i=document.createElement("div");W(i,"k-layer"),i.style.zIndex=this.options.zIndex,i.style.opacity=this.options.opacity,this.element=i,e.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._deactivate()},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},e.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},e.prototype.reset=function(){this._beforeReset(),this._reset()},e.prototype._reset=function(){this._applyExtent()},e.prototype._beforeReset=function(){},e.prototype._resize=function(){},e.prototype._panEnd=function(){this._applyExtent()},e.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!zt(t.minZoom)||e>=t.minZoom,i=!zt(t.maxZoom)||e<=t.maxZoom,r=Sy.create(t.extent),n=!r||r.overlaps(this.map.extent());this._setVisibility(o&&i&&n)},e.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},e.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},e.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},e.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},e.prototype._readData=function(){return this.options.data||[]},e.prototype._hasData=function(){return this._data&&this._data.length>0},e.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)},e}(q.Class),My=Math,Oy=q.geometry.Point;function Ly(t){return it(t)?t:yt.compile(t)}function By(t){return new Oy(Zt(t.x),Zt(t.y))}function Iy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var Ey=function(t){function e(e,o){t.call(this,e,o),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var i=this._viewType();this._view=new i(this.element,this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this._view.destroy(),this._view=null},e.prototype._beforeReset=function(){var t=this.map,e=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(e)},e.prototype._reset=function(){t.prototype._reset.call(this),this._updateView(),this._view.reset()},e.prototype._viewType=function(){return Ry},e.prototype._activate=function(){t.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,q.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},e.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),i={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},e.prototype._resize=function(){this._render()},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._render()},e.prototype._render=function(){this._updateView(),this._view.render()},e}(Ty);te(Ey,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var Ry=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.pool=new jy}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.center=function(t){this._center=t},e.prototype.extent=function(t){this._extent=t},e.prototype.viewOrigin=function(t){this._viewOrigin=t},e.prototype.zoom=function(t){this._zoom=t},e.prototype.pointToTileIndex=function(t){return new Oy(My.floor(t.x/this.options.tileSize),My.floor(t.y/this.options.tileSize))},e.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,i=this.indexToPoint(e).translate(-o.x,-o.y);return{x:My.ceil((My.abs(i.x)+t.width)/this.options.tileSize),y:My.ceil((My.abs(i.y)+t.height)/this.options.tileSize)}},e.prototype.size=function(){var t=this._extent.nw,e=this._extent.se.clone().translate(-t.x,-t.y);return{width:e.x,height:e.y}},e.prototype.indexToPoint=function(t){var e=t.x,o=t.y;return new Oy(e*this.options.tileSize,o*this.options.tileSize)},e.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},e.prototype.destroy=function(){ly(this.element),this.pool.empty()},e.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},e.prototype.render=function(){var t,e,o,i=this.tileCount(),r=this.pointToTileIndex(this._extent.nw);for(e=0;e<i.x;e++)for(o=0;o<i.y;o++)(t=this.createTile({x:r.x+e,y:r.y+o})).visible||t.show()},e.prototype.createTile=function(t){var e=this.tileOptions(t),o=this.pool.get(this._center,e);return o.element.parentNode||this.element.append(o.element),o},e.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,r=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:By(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},e.prototype.wrapIndex=function(t){var e=My.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:Xt(t.y,0,e-1)}},e.prototype.wrapValue=function(t,e){var o=My.abs(t)%e;return t>=0?o:e-(0===o?e:o)},e}(q.Class),Vy=function(t){function e(e,o){t.call(this),this.id=e,this.visible=!0,this._initOptions(o),this.createElement(),this.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},e.prototype.show=function(){var t=this.element;t.style.top=Iy(this.options.offset.y),t.style.left=Iy(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},e.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},e.prototype.url=function(){return Ly(this.options.urlTemplate)(this.urlOptions())},e.prototype.errorUrl=function(){return Ly(this.options.errorUrlTemplate)(this.urlOptions())},e.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},e}(q.Class);te(Vy,{urlTemplate:"",errorUrlTemplate:""});var jy=function(t){function e(){t.call(this),this._items=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},e.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},e.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},e.prototype._create=function(t){for(var e,o=this._items,i=Gt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new Vy(i,t),this._items.push(e)),e},e.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);n>o&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))},e}(q.Class);te(jy,{maxSize:100});var zy=Object.assign,Dy="change",Fy=function(t){function e(e,o){t.call(this);var i=this,r=e[0]||e;i.capture=!1,r.addEventListener?(Pe.down.split(" ").forEach((function(t){r.addEventListener(t,ay(i._press,i),!0)})),Pe.up.split(" ").forEach((function(t){r.addEventListener(t,ay(i._release,i),!0)}))):(Pe.down.split(" ").forEach((function(t){r.attachEvent(t,ay(i._press,i))})),Pe.up.split(" ").forEach((function(t){r.attachEvent(t,ay(i._release,i))}))),i.bind(["press","release"],o||{})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.captureNext=function(){this.capture=!0},e.prototype.cancelCapture=function(){this.capture=!1},e.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},e.prototype._release=function(t){var e=this;e.trigger("release"),e.capture&&(t.preventDefault(),e.cancelCapture())},e}(Ue),Hy=function(t){function e(e){t.call(this);var o=this;o.forcedEnabled=!1,zy(o,e),o.scale=1,o.horizontal?(o.measure="offsetWidth",o.scrollSize="scrollWidth",o.axis="x"):(o.measure="offsetHeight",o.scrollSize="scrollHeight",o.axis="y")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.makeVirtual=function(){zy(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},e.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},e.prototype.outOfBounds=function(t){return t>this.max||t<this.min},e.prototype.forceEnabled=function(){this.forcedEnabled=!0},e.prototype.getSize=function(){return this.container[this.measure]},e.prototype.getTotal=function(){return this.element[this.scrollSize]},e.prototype.rescale=function(t){this.scale=t},e.prototype.update=function(t){var e=this,o=e.virtual?e._virtualMax:e.getTotal(),i=o*e.scale,r=e.getSize();(0!==o||e.forcedEnabled)&&(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=i,e.min=Math.min(e.max,r-i),e.minScale=r/o,e.centerOffset=(i-r)/2,e.enabled=e.forcedEnabled||i>r,t||e.trigger(Dy,e))},e}(Ue),Ny=function(t){function e(e){t.call(this);var o=this;o.x=new Hy(zy({horizontal:!0},e)),o.y=new Hy(zy({horizontal:!1},e)),o.container=e.container,o.forcedMinScale=e.minScale,o.maxScale=e.maxScale||100,o.bind(Dy,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},e.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},e.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(Dy)},e}(Ue),Uy=function(t){function e(e){t.call(this),zy(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},e.prototype.dragMove=function(t){var e=this,o=e.dimension,i=e.axis,r=e.movable,n=r[i]+t;if(o.enabled){var s=t;(n<o.min&&t<0||n>o.max&&t>0)&&(s*=e.resistance),r.translateAxis(i,s),e.trigger(Dy,e)}},e}(Ue),Gy=function(t){function e(e){t.call(this);var o,i,r,n,s=this;zy(s,{elastic:!0},e),r=s.elastic?.5:0,n=s.movable,s.x=o=new Uy({axis:"x",dimension:s.dimensions.x,resistance:r,movable:n}),s.y=i=new Uy({axis:"y",dimension:s.dimensions.y,resistance:r,movable:n}),s.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){s.gesture=t,s.offset=Ft(s.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e,r=s.gesture,a=r.center,p=t.center,l=t.distance/r.distance,h=s.dimensions.minScale,c=s.dimensions.maxScale;n.scale<=h&&l<1&&(l+=.8*(1-l)),n.scale*l>=c&&(l=c/n.scale);var u=n.x+s.offset.left,d=n.y+s.offset.top;e={x:(u-a.x)*l+p.x-u,y:(d-a.y)*l+p.y-d},n.scaleWith(l),o.dragMove(e.x),i.dragMove(e.y),s.dimensions.rescale(n.scale),s.gesture=t,t.preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(o.dimension.enabled||i.dimension.enabled?(o.dragMove(t.x.delta),i.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(q.Class),Wy=function(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"},Xy=function(t){function e(e){t.call(this);var o=this;o.element=e,o.element.style.transformOrigin="left top",o.x=0,o.y=0,o.scale=1;var i=Wy(o.x,o.y,o.scale);o.element.style.transform=i,o._saveCoordinates(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},e.prototype.scaleTo=function(t){this.scale=t,this.refresh()},e.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},e.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},e.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},e.prototype.moveTo=function(t){zy(this,t),this.refresh()},e.prototype.refresh=function(){var t,e=this,o=e.x,i=e.y;e.round&&(o=Math.round(o),i=Math.round(i)),(t=Wy(o,i,e.scale))!==e.coordinates&&(e.element.style.transform=t,e._saveCoordinates(t),e.trigger(Dy))},e.prototype._saveCoordinates=function(t){this.coordinates=t},e}(Ue),Yy=q.drawing.Group,qy=function(t){function e(e,o){t.call(this,e,o),this._pan=ay(this._pan,this),this.surface=q.drawing.Surface.create(this.element,{width:e.scrollElement.clientWidth,height:e.scrollElement.clientHeight}),this._initRoot(),this.movable=new Xy(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this.surface.destroy()},e.prototype._reset=function(){t.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},e.prototype._initRoot=function(){this._root=new Yy,this.surface.draw(this._root)},e.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},e.prototype._resize=function(){this.surface.size(this.map.size())},e.prototype._readData=function(){var e=t.prototype._readData.call(this);return"FeatureCollection"===e.type?e.features:"GeometryCollection"===e.type?e.geometries:e},e.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Zy(this.map,this.options.style,this));for(var e=new Yy,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},e.prototype.shapeCreated=function(t){var e=!1;if(t instanceof q.drawing.Circle&&this.map.options.renderPointsAsMarkers&&(e=zt(this._createMarker(t))),!e){var o={layer:this,shape:t};e=this.map.trigger("shapeCreated",o)}return e},e.prototype.featureCreated=function(t){t.layer=this,this.map.trigger("shapeFeatureCreated",t)},e.prototype._createMarker=function(t){var e=this.map.markers.bind({location:t.location},t.dataItem);return e&&this._markers.push(e),e},e.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},e.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},e.prototype._translateSurface=function(){var t=this.map,e=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(e),this.movable.moveTo({x:e.x,y:e.y}))},e.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},e.prototype._handler=function(t){var e=this;return function(o){o.element&&e.map.trigger(t,e._eventArgs(o))}},e.prototype._mouseenter=function(t){if(t.element){this.map.trigger("shapeMouseEnter",this._eventArgs(t));var e=t.element,o=this._tooltipAnchor(t);this.map._tooltip.show(o,this._tooltipContext(e))}},e.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},e.prototype._tooltipAnchor=function(t){var e=this.map.eventOffset(t.originalEvent);return{top:e.y,left:e.x}},e.prototype._activate=function(){t.prototype._activate.call(this),this._panHandler=ay(this._pan,this),this.map.bind("pan",this.panHandler)},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e}(Ty);te(qy,{autoBind:!0,zIndex:100});var Zy=function(t){function e(e,o,i){t.call(this),this.observer=i,this.locator=e,this.style=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parse=function(t){var e=new Yy,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),o&&e.children.length<2&&(e=e.children[0]),e},e.prototype._shapeCreated=function(t){var e=!1;return this.observer&&this.observer.shapeCreated&&(e=this.observer.shapeCreated(t)),e},e.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},e.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},e.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Wt(e).anchor()))&&(t.options.fill=null)},e.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},e.prototype._loadPolygon=function(t,e,o){var i=this._buildPolygon(e);return i.dataItem=o,i.location=this.locator.viewToLocation(i.bbox().center()),this._loadShape(t,i)},e.prototype._buildPolygon=function(t){for(var e=new(t.length>1?q.drawing.MultiPath:q.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(Gg.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},e.prototype._loadPoint=function(t,e,o){var i=Gg.fromLngLat(e),r=this.locator.locationToView(i),n=new q.geometry.Circle(r,10),s=new q.drawing.Circle(n,this.style);return s.dataItem=o,s.location=i,this._loadShape(t,s)},e}(q.Class),Qy=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=bt(e.valueField),i=t.slice(0);i.sort((function(t,e){return o(e)-o(t)}));for(var r,n=this._scaleType(),s=bt(this.options.locationField),a=0;a<i.length;a++){var p=i[a],l=s(p),h=o(p);if(zt(l)&&zt(h)){r||(r=new n([0,h],[e.minSize,e.maxSize])),l=Gg.create(l);var c=this.map.locationToView(l),u=r.map(h),d=this._createSymbol({center:c,size:u,style:e.style,dataItem:p,location:l});d.dataItem=p,d.location=l,d.value=h,this._drawSymbol(d)}}}},e.prototype._scaleType=function(){var t=this.options.scale;return it(t)?t:$y[t]},e.prototype._createSymbol=function(t){var e=this.options.symbol;return it(e)||(e=Jy[e]),e(t)},e.prototype._drawSymbol=function(t){var e={layer:this,shape:t};this.map.trigger("shapeCreated",e)||this.surface.draw(t)},e.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},e.prototype._tooltipAnchor=function(t){var e=t.element.bbox().center();return{top:e.y,left:e.x}},e}(qy);te(Qy,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Ky=function(t){function e(e,o){t.call(this),this._domain=e,this._range=o;var i=Math.sqrt(e[1])-Math.sqrt(e[0]),r=o[1]-o[0];this._ratio=r/i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t){var e=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+e},e}(q.Class),$y={sqrt:Ky},Jy={circle:function(t){var e=new q.geometry.Circle(t.center,t.size/2);return new q.drawing.Circle(e,t.style)},square:function(t){var e=new q.drawing.Path(t.style),o=t.size/2,i=t.center;return e.moveTo(i.x-o,i.y-o).lineTo(i.x+o,i.y-o).lineTo(i.x+o,i.y+o).lineTo(i.x-o,i.y+o).close(),e}},tv="click",ev="mouseenter",ov="mouseleave",iv=Object.assign,rv="k-marker",nv="."+rv,sv=function(t){function e(e,o){t.call(this,e,o),this._markerClickHandler=ay(this._markerClick,this),Ie(this.element,tv,nv,this._markerClickHandler),this.items=[],this._load(this._readData())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),Ee(this.element,tv,this._markerClickHandler),this.clear()},e.prototype.add=function(t){if(!G(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},e.prototype.remove=function(t){t.destroy();var e=(this.items||[]).indexOf(t);e>-1&&this.items.splice(e,1)},e.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},e.prototype.update=function(t){var e=t.location();if(e){t.showAt(this.map.locationToView(e));var o={marker:t,layer:this};this.map.trigger("markerActivate",o)}},e.prototype._reset=function(){t.prototype._reset.call(this);for(var e=this.items,o=0;o<e.length;o++)this.update(e[o])},e.prototype.bind=function(t,e){var o=av.create(t,this.options);o.dataItem=e;var i={marker:o,layer:this};if(!this.map.trigger("markerCreated",i))return this.add(o),o},e.prototype._addOne=function(t){var e=av.create(t,this.options);return e.addTo(this),e},e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){this._data=t,this.clear();for(var e=bt(this.options.locationField),o=bt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},e.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,o={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",o)},e.prototype._markerMouseEnter=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",e)},e.prototype._markerMouseLeave=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",e)},e.prototype._createMarkerEventArgs=function(t){var e=t.marker;return iv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},e}(Ty);te(sv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});var av=function(t){function e(e){t.call(this),this.options=e||{}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},e.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},e.prototype.location=function(t){return t?(this.options.location=Gg.create(t).toArray(),this.layer&&this.layer.update(this),this):Gg.create(this.options.location)},e.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=uy(this._anchor.left),this.element.style.top=uy(this._anchor.top)},e.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},e.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=ay(this._mouseEnter,this),Ie(this.element,ev,nv,this._mouseEnterHandler),this._mouseLeaveHandler=ay(this._mouseLeave,this),Ie(this.element,ov,nv,this._mouseLeaveHandler))},e.prototype.unbindEvents=function(){this.element&&(Ee(this.element,ev,this._mouseEnterHandler),Ee(this.element,ov,this._mouseLeaveHandler))},e.prototype.render=function(){if(!this.element){var t=this.options,e=this.layer,o=document.createElement("span");if(W(o,rv),this.options.template){var i=this._compileTemplate(this.options.template)(this.dataItem),r=py(i);o.appendChild(r)}else if(t.svgIcon)ae(o,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"});else{var n={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type};t.shape?"pinTarget"===t.shape?(n.icon="map-marker-target",ae(o,n)):"pin"===t.shape?ae(o,n):W(o,"k-icon k-icon-xxl k-i-marker-"+cy(t.shape||"pin")):ae(o,n)}t.title&&o.setAttribute("title",t.title);var s=t.attributes||{};Object.keys(s).forEach((function(t){o.setAttribute(t,s[t])})),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents()}},e.prototype._mouseEnter=function(t){var e=this._createEventArgs(t);this.layer._markerMouseEnter(e),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},e.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},e.prototype._mouseLeave=function(t){var e=this._createEventArgs(t);this.layer._markerMouseLeave(e)},e.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},e.prototype._compileTemplate=function(t){return yt.compile(t,{paramName:"dataItem",useWithBlock:!1})},e.create=function(t,o){return t instanceof e?t:new e(at({},o,t))},e}(q.Class),pv=Object.assign;function lv(t){window.requestAnimationFrame(t)}var hv=function(t){function e(){t.call(this);var e=this;e._tickProxy=ay(e._tick,e),e._started=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){},e.prototype.done=function(){},e.prototype.onEnd=function(){},e.prototype.onCancel=function(){},e.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,lv(this._tickProxy)))},e.prototype.enabled=function(){return!0},e.prototype.cancel=function(){this._started=!1,this.onCancel()},e.prototype._tick=function(){var t=this;t._started&&(t.tick(),t.done()?(t._started=!1,t.onEnd()):lv(t._tickProxy))},e}(q.Class),cv=function(t){function e(e){t.call(this),pv(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.done=function(){return this.timePassed()>=this.duration},e.prototype.timePassed=function(){return Math.min(this.duration,ze()-this.startDate)},e.prototype.moveTo=function(t){var e=this,o=e.movable;e.initial=o[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=ze(),e.start()},e.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},e.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},e}(hv),uv=Object.assign,dv=Math.abs,fv="change",gv="scroll",yv=function(t){function e(e){t.call(this,e);var o=this;uv(o,e),o.userEvents.bind("gestureend",o.start.bind(this)),o.tapCapture.bind("press",o.cancel.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},e.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},e.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},e.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},e}(hv),vv=function(t){function e(e){t.call(this);var o=this;uv(o,e,{transition:new cv({axis:e.axis,movable:e.movable,onEnd:function(){o._end()}})}),o.tapCapture.bind("press",(function(){o.cancel()})),o.userEvents.bind("end",ay(o.start,o)),o.userEvents.bind("gestureend",ay(o.start,o)),o.userEvents.bind("tap",ay(o.onEnd,o))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onCancel=function(){this.transition.cancel()},e.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},e.prototype.onEnd=function(){var t=this;t.paneAxis.outOfBounds()?t._snapBack():t._end()},e.prototype.done=function(){return dv(this.velocity)<1},e.prototype.start=function(e){var o,i=this;i.dimension.enabled&&(i.paneAxis.outOfBounds()?i.transition._started?(i.transition.cancel(),i.velocity=Math.min(e.touch[i.axis].velocity*i.velocityMultiplier,55),t.prototype.start.call(this)):i._snapBack():(o=2===e.touch.id?0:e.touch[i.axis].velocity,i.velocity=Math.max(Math.min(o*i.velocityMultiplier,55),-55),i.tapCapture.captureNext(),t.prototype.start.call(this)))},e.prototype.tick=function(){var t=this,e=t.dimension,o=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=o,r=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(r)&&(r=Math.max(Math.min(r,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,r)},e.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},e.prototype._snapBack=function(){var t=this,e=t.dimension,o=t.movable[t.axis]>e.max?e.max:e.min;t._moveTo(o)},e.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:cv.easeOutExpo})},e}(hv),mv=function(t){function e(e){t.call(this,e),uv(this,e,{origin:{},destination:{},offset:{}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},e.prototype.done=function(){return dv(this.offset.y)<5&&dv(this.offset.x)<5},e.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},e.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},e.prototype.setCallback=function(t){t&&it(t)?this.callback=t:t=void 0},e.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},e}(hv),xv=function(t){function e(e){t.call(this);var o=this,i="x"===e.axis,r=py('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');uv(o,e,{element:r,elementSize:0,movable:new Xy(r),scrollMovable:e.movable,alwaysVisible:e.alwaysVisible,size:i?"width":"height"}),o.scrollMovable.bind(fv,o.refresh.bind(o)),o.container.appendChild(r),e.alwaysVisible&&o.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.refresh=function(){var t=this,e=t.axis,o=t.dimension,i=o.size,r=t.scrollMovable,n=i/o.total,s=Math.round(-r[e]*n),a=Math.round(i*n);this.element.style.display=n>=1?"none":"",s+a>i?a=i-s:s<0&&(a+=s,s=0),t.elementSize!==a&&(t.element.style[t.size]=a+"px",t.elementSize=a),t.movable.moveAxis(e,s)},e.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},e.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},e}(q.Class),_v=function(t){function e(e,o){t.call(this);var i=this;this.element=e,this._initOptions(o);var r,n=(navigator.userAgent,(r=Re().mobileOS).ios||r.android);i._native=i.options.useNative&&n;var s=py('<div class="km-scroll-header"/>');if(i._native)return W(e,"km-native-scroller"),hy(s,e),void uv(i,{scrollElement:e,fixedContainer:e.children[0]});e.style.overflow="hidden",W(e,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(e,py('<div class="km-scroll-container"/>')),hy(s,e);var a=e.children[1],p=new Fy(e),l=new Xy(a),h=new Ny({element:a,container:e,forcedEnabled:i.options.zoom}),c=this.options.avoidScrolling,u=new fo(e,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:i.options.zoom,supportDoubleTap:i.options.supportDoubleTap,start:function(t){h.refresh();var e=dv(t.x.velocity),o=dv(t.y.velocity),r=2*e>=o,n=2*o>=e;!i.fixedContainer.contains(t.event.target)&&!c(t)&&i.enabled&&(h.x.enabled&&r||h.y.enabled&&n)?u.capture():u.cancel()}}),d=new Gy({movable:l,dimensions:h,userEvents:u,elastic:i.options.elastic}),f=new yv({movable:l,dimensions:h,userEvents:u,tapCapture:p}),g=new mv({moveTo:function(t){i.scrollTo(t.x,t.y)}});l.bind(fv,(function(){i.scrollTop=-l.y,i.scrollLeft=-l.x,i.trigger(gv,{scrollTop:i.scrollTop,scrollLeft:i.scrollLeft})})),i.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Ie(e,"wheel",this._wheelScrollHandler)),uv(i,{movable:l,dimensions:h,zoomSnapBack:f,animatedScroller:g,userEvents:u,pane:d,tapCapture:p,pulled:!1,enabled:!0,scrollElement:a,scrollTop:0,scrollLeft:0,fixedContainer:e.children[0]}),i._initAxis("x"),i._initAxis("y"),i._wheelEnd=function(){i._wheel=!1,i.userEvents.end(0,i._wheelY)},h.refresh(),i.options.pullToRefresh&&i._initPullToRefresh()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._wheelScroll=function(t){if(!t.ctrlKey){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var e=function(t){var e,o=t.wheelDeltaY;return t.wheelDelta?(void 0===o||o)&&(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e}(t);e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault()}},e.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},e.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},e.prototype.height=function(){return this.dimensions.y.size},e.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},e.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},e.prototype._resize=function(){this._native||this.contentResized()},e.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},e.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},e.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},e.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(dv(t)),this.scrollElement.scrollTop(dv(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},e.prototype.animatedScrollTo=function(t,e,o){var i,r;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},r={x:t,y:e},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(o),this.animatedScroller.start())},e.prototype.pullHandled=function(){},e.prototype.destroy=function(){Ee(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},e.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},e.prototype._initPullToRefresh=function(){},e.prototype._dragEnd=function(){},e.prototype._paneChange=function(){},e.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new xv({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(fv,(function(){s.refresh()})),n.bind(fv,(function(){s.show()})),e[t+"inertia"]=new vv({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},e}(Ue);te(_v,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),dy(_v,["pull",gv,"resize"]);var bv=function(t,e){void 0===e&&(e={}),this.sender=e.sender||t,this.widget=t,this.rtl=Boolean(e.rtl)};bv.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const wv=bv;var kv=Math,Av=kv.min,Sv=kv.pow,Cv=q.geometry.Point,Pv="marker",Tv="location",Mv="wheel",Ov={bubble:Qy,shape:qy,tile:Ey};Ov[Pv]=sv;var Lv=function(t){function e(e,o,i,r){void 0===o&&(o={}),void 0===i&&(i={}),void 0===r&&(r={}),t.call(this),this._init(e,o,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),G(this.markers)?this.markers.forEach((function(t){t.destroy()})):this.markers.destroy();for(var e=0;e<this.layers.length;e++)this.layers[e].destroy();Ee(this.element,Mv,this._mousewheelHandler),t.prototype.destroy.call(this)},e.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=Re(),this.context=i,this.initObserver(i),this.initServices(i),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new sy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,q.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Ie(this.element,Mv,this._mousewheelHandler)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._initElement=function(t){this.element=t,W(t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),ly(t);var e=py("<div />");this.element.appendChild(e)},e.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new wv(this,t)},e.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(e,o){void 0===o&&(o={}),o.sender=this;for(var i=this.observers,r=!1,n=0;n<i.length;n++)i[n].trigger(e,o)&&(r=!0);return r||t.prototype.trigger.call(this,e,o),r},e.prototype._notifyObserver=function(t,e){void 0===e&&(e={}),e.sender=this;for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype.zoom=function(t){var e,o=this.options;if(zt(t)){var i=kv.round(Xt(t,o.minZoom,o.maxZoom));o.zoom!==i&&(o.zoom=i,this.widgetService.notify("zoomChange",{zoom:o.zoom}),this._reset()),e=this}else e=o.zoom;return e},e.prototype.center=function(t){var e;if(t){var o=Gg.create(t),i=Gg.create(this.options.center);o.equals(i)||(this.options.center=o.toArray(),this.widgetService.notify(Cy,{center:this.options.center}),this._reset()),e=this}else e=Gg.create(this.options.center);return e},e.prototype.extent=function(t){var e;return t?(this._setExtent(t),e=this):e=this._getExtent(),e},e.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),ly(e),this._init(e,t,{},this.context),this._reset()},e.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,i=Gg.create(t);return this.crs.toPoint(i,this._layerSize(e),o)},e.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,i=Cv.create(t);return this.crs.toLocation(i,this._layerSize(e),o)},e.prototype.locationToView=function(t){var e=Gg.create(t),o=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(o.scale(-1))},e.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),i=Cv.create(t).clone().translateWith(o);return this.layerToLocation(i,e)},e.prototype.eventOffset=function(t){var e,o,i=Ft(this.element);if(t.x&&t.x[Tv]||t.y&&t.y[Tv])e=t.x[Tv]-i.left,o=t.y[Tv]-i.top;else{var r=t.originalEvent||t;e=Kt(r.pageX,r.clientX)-i.left,o=Kt(r.pageY,r.clientY)-i.top}return new q.geometry.Point(e,o)},e.prototype.eventToView=function(t){var e=this.eventOffset(t);return this.locationToView(this.viewToLocation(e))},e.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},e.prototype.eventToLocation=function(t){var e=this.eventOffset(t);return this.viewToLocation(e)},e.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return this.options.wraparound||(o=Av(e,o)),{width:o,height:Av(e,t.clientHeight)}},e.prototype.exportVisual=function(){return this._reset(),!1},e.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},e.prototype._setOrigin=function(t,e){var o,i=this.viewSize(),r=this._origin=Gg.create(t);return(o=this.locationToLayer(r,e)).x+=i.width/2,o.y+=i.height/2,this.options.center=this.layerToLocation(o,e).toArray(),this.widgetService.notify(Cy,{center:this.options.center}),this},e.prototype._getOrigin=function(t){var e,o=this.viewSize();return!t&&this._origin||((e=this.locationToLayer(this.center())).x-=o.width/2,e.y-=o.height/2,this._origin=this.layerToLocation(e)),this._origin},e.prototype._setExtent=function(t){var e=Sy.create(t),o=e.se.clone();this.options.wraparound&&o.lng<0&&t.nw.lng>0&&(o.lng=180+(180+o.lng));var i=new Sy(e.nw,o);this.center(i.center());var r,n=this.element.clientWidth,s=this.element.clientHeight;for(r=this.options.maxZoom;r>=this.options.minZoom;r--){var a=this.locationToLayer(i.nw,r),p=this.locationToLayer(i.se,r),l=kv.abs(p.x-a.x),h=kv.abs(p.y-a.y);if(l<=n&&h<=s)break}this.zoom(r)},e.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize();e.x+=o.width,e.y+=o.height;var i=this.layerToLocation(e);return new Sy(t,i)},e.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},e.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},e.prototype._createControlElement=function(t,e){var o=t.position||e,i="."+fy(o).replace(" ","."),r=this.element.querySelector(".k-map-controls"+i)||[];if(0===r.length){var n=document.createElement("div");W(n,"k-map-controls "+fy(o)),r=n,this.element.appendChild(r)}var s=document.createElement("div");return r.appendChild(s),s},e.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new gy(e,t)},e.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),o=this.navigator=new my(e,at({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),o.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),o.bind("center",this._navigatorCenter)},e.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,i=e.scrollTop-t.y,r=this._virtualSize,n=this.element.clientWidth,s=this.element.clientHeight;o=Xt(o,r.x.min,r.x.max-n),i=Xt(i,r.y.min,r.y.max-s),this.scroller.one("scroll",ay(this._scrollEnd,this)),this.scroller.scrollTo(-o,-i)},e.prototype._navigatorCenter=function(){this.center(this.options.center)},e.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),o=this.zoomControl=new by(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),o.bind("change",this._zoomControlChange)},e.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},e.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,o=this.scroller=new _v(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});o.bind("scroll",ay(this._scroll,this)),o.bind("scrollEnd",ay(this._scrollEnd,this)),o.userEvents.bind("gesturestart",ay(this._scaleStart,this)),o.userEvents.bind("gestureend",ay(this._scale,this)),o.userEvents.bind("doubleTap",ay(this._doubleTap,this)),o.userEvents.bind("tap",ay(this._tap,this)),this.scrollElement=o.scrollElement},e.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],r=this._createLayer(i);e.push(r)}},e.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],i=e===Pv?at({},this.options.markerDefaults,t,{icons:this.options.icons}):at({},o,t),r=new(0,Ov[e])(this,i);return e===Pv&&(this.markers=r),r},e.prototype._createTooltip=function(){return new Py(this.widgetService,this.options.tooltip)},e.prototype._initMarkers=function(){(this.options.layers||[]).filter((function(t){return t&&t.type===Pv})).length>0||(this.markers=new sv(this,at({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},e.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,i=new q.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,this._tooltip.offset=i,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},e.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=ze(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},e.prototype._panComplete=function(){return ze()-(this._panEndTimestamp||0)>50},e.prototype._scaleStart=function(t){if(this.trigger("zoomStart",{originalEvent:t})){var e=t.touches[1];e&&e.cancel()}},e.prototype._scale=function(t){var e=this.scroller.movable.scale,o=this._scaleToZoom(e),i=new q.geometry.Point(t.center.x,t.center.y),r=this.viewToLocation(i,o),n=this.locationToLayer(r,o).translate(-i.x,-i.y);this._zoomAround(n,o),this.trigger("zoomEnd",{originalEvent:t})},e.prototype._scaleToZoom=function(t){var e=this._layerSize()*t/this.options.minSize,o=kv.log(e)/kv.log(2);return kv.round(o)},e.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},e.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,n=this.locationToLayer(r).round();t.movable.round=!0,t.reset(),t.userEvents.cancel();var s=this.zoom();t.dimensions.forcedMinScale=Sv(2,this.options.minZoom-s),t.dimensions.maxScale=Sv(2,this.options.maxZoom-s);var a={min:-n.x,max:i-n.x},p={min:-n.y,max:i-n.y};if(this.options.wraparound&&(a.max=20*i,a.min=-a.max),!1===this.options.pannable){var l=this.viewSize();a.min=p.min=0,a.max=l.width,p.max=l.height}e.makeVirtual(),o.makeVirtual(),e.virtualSize(a.min,a.max),o.virtualSize(p.min,p.max),this._virtualSize={x:a,y:p}},e.prototype._renderLayers=function(){},e.prototype._layerSize=function(t){var e=Kt(t,this.options.zoom);return this.options.minSize*Sv(2,e)},e.prototype._tap=function(t){if(this._panComplete()){var e=this.eventOffset(t);this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)})}},e.prototype._doubleTap=function(t){if(!1!==this.options.zoomable&&!this.trigger("zoomStart",{originalEvent:t})){var e=this.zoom()+1,o=this.eventOffset(t),i=this.viewToLocation(o),r=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(r,e),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._mousewheel=function(t){var e=Et(t)>0?-1:1,o=this.options,i=this.zoom(),r=Xt(i+e,o.minZoom,o.maxZoom);if(!1!==o.zoomable&&r!==i&&!this.trigger("zoomStart",{originalEvent:t})){var n=this.eventOffset(t),s=this.viewToLocation(n),a=this.locationToLayer(s,r).translate(-n.x,-n.y);this._zoomAround(a,r),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._toDocumentCoordinates=function(t){var e=Ft(this.element);return{left:Zt(t.x+e.left),top:Zt(t.y+e.top)}},e}(Ue);te(Lv,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),dy(Lv,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const Bv=Lv;var Iv=function(t,e){return t.map(e).reduce((function(t,e){return t+e}),0)},Ev=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1},Rv=function(t,e){return Ev(t.source,e.source)},Vv=function(t,e){return Ev(t.target,e.target)},jv=function(t){return t.value};function zv(t){t.forEach((function(t){t.targetLinks.forEach((function(t){t.source.sourceLinks.sort(Vv)})),t.sourceLinks.forEach((function(t){t.target.targetLinks.sort(Rv)}))}))}var Dv=function(t,e){return"left"===t.align?t.depth:"right"===t.align?e-t.height:t.sourceLinks.length?t.depth:e},Fv=function(t){var e=t.nodesOptions,o=e.offset;void 0===o&&(o={});var i=e.align;this.data={nodes:t.nodes.map((function(t){return at({},{offset:o,align:i},t)})),links:t.links.map((function(t){return at({},t)}))},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout};Fv.prototype.calculate=function(){var t=this.data,e=t.nodes,o=t.links;this.connectLinksToNodes(e,o),this.calculateNodeValues(e);var i=this.calculateNodeHeights(e);if(i)return{nodes:[],links:[],columns:[],circularLinks:i};this.calculateNodeDepths(e);var r=this.calculateNodeColumns(e);return this.calculateNodeBreadths(r),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:r})},Fv.prototype.connectLinksToNodes=function(t,e){var o=new Map;t.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,o.set(t.id,t)})),e.forEach((function(t){t.source=o.get(t.sourceId),t.target=o.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)}))},Fv.prototype.calculateNodeValues=function(t){t.forEach((function(t){t.value=Math.max(Iv(t.sourceLinks,jv),Iv(t.targetLinks,jv))}))},Fv.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),o=new Set,i=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=i;for(var a=0;a<s.sourceLinks.length;a++){var p=s.sourceLinks[a];o.add(p.target)}}i++,e=o,o=new Set}},Fv.prototype.calculateNodeHeights=function(t){for(var e=t.length,o=new Set(t),i=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach((function(t){i.add(t.source)}))};o.size;){if(o.forEach(n),++r>e)return!0;o=i,i=new Set}return!1},Fv.prototype.calculateNodeColumns=function(t){for(var e,o,i=(e=t,o=function(t){return t.depth},Math.max.apply(null,e.map(o))),r=(this.width-this.offsetX-this.nodeWidth)/i,n=new Array(i+1),s=0;s<t.length;s++){var a=t[s],p=Math.max(0,Math.min(i,Dv(a,i)));a.x0=this.offsetX+p*r,a.x1=a.x0+this.nodeWidth,a.layer=p,n[p]=n[p]||[],n[p].push(a)}return n},Fv.prototype.calculateNodeBreadths=function(t){var e,o,i=this,r=(e=t,o=function(t){return(i.height-i.offsetY-(t.length-1)*i.nodePadding)/Iv(t,jv)},Math.min.apply(null,e.map(o)));if(t.forEach((function(t){var e=i.offsetY;t.forEach((function(t){t.y0=e,t.y1=e+t.value*r,e=t.y1+i.nodePadding,t.sourceLinks.forEach((function(t){t.width=t.value*r}))})),e=(i.height-e+i.nodePadding)/(t.length+1),t.forEach((function(t,o){t.y0+=e*(o+1),t.y1+=e*(o+1)}))})),!1!==this.autoLayout)for(var n=void 0!==this.loops?this.loops:t.length-1,s=this.targetColumnIndex||1,a=0;a<n;a++)this.reverse?(this.uncurlLinksToRight(t,s),this.uncurlLinksToLeft(t,s)):(this.uncurlLinksToLeft(t,s),this.uncurlLinksToRight(t,s));t.forEach(zv)},Fv.prototype.applyNodesOffset=function(t){t.forEach((function(t){var e=(t.offset?t.offset.left:0)||0,o=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=o,t.y1+=o}))},Fv.prototype.calculateLinkBreadths=function(t){t.forEach((function(t){var e=t.sourceLinks,o=t.targetLinks,i=t.y0,r=i;e.forEach((function(t){t.x0=t.source.x1,t.y0=i+t.width/2,i+=t.width})),o.forEach((function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width}))}))},Fv.prototype.uncurlLinksToRight=function(t,e){for(var o=this,i=t.length,r=e;r<i;r++){var n=t[r];n.forEach((function(t){var e=0,i=0;t.targetLinks.forEach((function(r){var n=r.value*(t.layer-r.source.layer);e+=o.targetTopPos(r.source,t)*n,i+=n}));var r=0===e?0:e/i-t.y0;t.y0+=r,t.y1+=r,zv([t])})),n.sort(Ev),this.arrangeNodesVertically(n)}},Fv.prototype.uncurlLinksToLeft=function(t,e){for(var o=this,i=t.length-1-e;i>=0;i--){for(var r=t[i],n=function(t){var e=r[t],i=0,n=0;e.sourceLinks.forEach((function(t){var r=t.value*(t.target.layer-e.layer);i+=o.sourceTopPos(e,t.target)*r,n+=r}));var s=0===i?0:i/n-e.y0;e.y0+=s,e.y1+=s,zv([e])},s=0;s<r.length;s++)n(s);r.sort(Ev),this.arrangeNodesVertically(r)}},Fv.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},Fv.prototype.arrangeDown=function(t,e,o){for(var i=e,r=o;r<t.length;r++){var n=t[r],s=Math.max(0,i-n.y0);n.y0+=s,n.y1+=s,i=n.y1+this.nodePadding}},Fv.prototype.arrangeUp=function(t,e,o){for(var i=e,r=o;r>=0;--r){var n=t[r],s=Math.max(0,n.y1-i);n.y0-=s,n.y1-=s,i=n.y0-this.nodePadding}},Fv.prototype.sourceTopPos=function(t,e){for(var o=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,i=0;i<e.targetLinks.length;i++){var r=e.targetLinks[i];if(r.source===t)break;o+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;o-=s.width}return o},Fv.prototype.targetTopPos=function(t,e){for(var o=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,i=0;i<t.sourceLinks.length;i++){var r=t.sourceLinks[i];if(r.target===e)break;o+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;o-=s.width}return o};var Hv=function(t){return new Fv(t).calculate()};function Nv(t,e,o,i,r,n){var s=(n-e)*(o-t),a=(i-e)*(r-t);return s>a?1:s===a?0:-1}var Uv=function(t){function e(e){t.call(this),this.options=at({},this.options,e),this.createVisual()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.visual=this.createElement()},e.prototype.exportVisual=function(){return this.visual},e.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.getSender=function(){return this},e}(q.Class),Gv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){return q.drawing.Path.fromRect(this.getRect(),this.visualOptions())},e.prototype.getRect=function(){var t=this.options.node;return new q.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=q.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var o=this.options.node.id;this.visual.options.set("id",o),this.options.root()&&this.options.root().setAttribute(c,o)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(Uv),Wv=function(t,e,o){return t.color||e[o%e.length]},Xv=function(t,e,o,i){var r=at({},e,e.node);return at({},{color:Wv(t,o,i)},r,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})},Yv=function(t,e,o,i,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*o*a*n+i*a*r},qv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options.link,e=t.x0,o=t.x1,i=t.y0,r=t.y1,n=(e+o)/2;return new q.drawing.Path(this.visualOptions()).moveTo(e,i).curveTo([n,i],[n,r],[o,r])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},e.prototype.visualOptions=function(){var t=this.options,e=this.options.link,o=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:zt(e.opacity)?e.opacity:t.opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:o}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable){var t=this.options.link,e=t.x0,o=t.x1,i=t.y0,r=t.y1,n=(e+o)/2,s=t.width/2,a=function(t,e){var o=t.width/2,i=e?t.x1:t.x0,r=e?t.x0:t.x1,n=e?t.y1:t.y0,s=e?t.y0:t.y1,a=(i+r)/2,p=[a,Yv(n,n,s,s,.5)],l=.4999,h=[Yv(i,a,a,r,l),Yv(n,n,s,s,l)],c=function(t,e,o,i,r){var n,s,a=(t+o)/2,p=(e+i)/2;if(e===i)n=0,s=r/2;else if(t===o)n=r/2,s=0;else{var l=-1/((i-e)/(o-t));s=l*(n=r/2/Math.sqrt(1+l*l))}return{P1:{x:a-n,y:p-s},P2:{x:a+n,y:p+s}}}(p[0],p[1],h[0],h[1],t.width),u=[a,Yv(n+o,n+o,s+o,s+o,.5)],d=c.P1.y>c.P2.y?c.P1:c.P2,f=(n>s?1:-1)*o,g=i,y=r;return a-((function(t,e,o,i,r){var n=(t.x+e.x)/2,s=(t.y+e.y)/2,a=e.x-t.x,p=-(e.y-t.y),l=a,h=Math.sqrt(p*p+l*l),c=n+(p=p/h*o),u=s+(l=l/h*o),d=n-p,f=s-l,g=r.x-i.x,y=r.y-i.y,v=y*(c-d)-g*(u-f);if(Math.abs(v)<1e-10)return null;var m=(g*(f-i.y)-y*(d-i.x))/v,x=((c-d)*(f-i.y)-(u-f)*(d-i.x))/v;return m>=0&&m<=1&&x>=0&&x<=1?{x:d+m*(c-d)}:null}(d,{x:u[0],y:u[1]},o,{x:u[0],y:u[1]},{x:Math.max(1,u[0]+f),y:u[1]})||{x:(u[0]+d.x)/2}).x-.125*g-.125*y)/.75}(t,this.options.rtl);this._highlight=new q.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(e,i+s).lineTo(e,i-s).curveTo([n+a,i-s],[n+a,r-s],[o,r-s]).lineTo(o,r+s).curveTo([n-a,r+s],[n-a,i+s],[e,i+s])}},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var o=this.options.link.sourceId+"->"+this.options.link.targetId;this.visual.options.set("id",o),this.options.root()&&this.options.root().setAttribute(c,o)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(Uv),Zv="inside",Qv="before",Kv="after",$v=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=at({},this.options,this.options.node.label),e=t.node,o=t.diagramMinX,i=t.diagramMaxX,r=t.text,n=t.offset,s=t.rtl,a=t.position;if(s&&a!==Zv&&(a=a===Qv?Kv:Qv),!t.visible||!r)return null;var p=new xo(e.x0,e.y0,e.x1,e.y1),l=this.visualOptions();s&&!l.align&&(l.align="right");var h=new Zo(r,l);h.reflow(new xo);var c=h.box,u=p.center().y-c.height()/2,d=e.x1+c.width()>i,f=e.x0-c.width()<o,g=a===Qv||a===Zv&&d?Qv:Kv;s&&(g=a===Kv||a===Zv&&f?Kv:Qv);var y=[g===Qv?e.x0-c.width():e.x1,u],v=new xo(y[0],y[1],y[0]+c.width(),y[1]+c.height());return v.translate(n.left||0,n.top||0),h.reflow(v),h.renderVisual(),h.visual},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},e}(Uv);te($v,{position:Zv});var Jv=function(t,e,o,i,r){return at({},e,{node:t,diagramMinX:i,diagramMaxX:r,rtl:o,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})},tm=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,o=t.text;if(!1===t.visible||!o)return null;var i=$o.buildTitle(o,t);return i.reflow(e),i.renderVisual(),i.visual},e.prototype.createElement=function(){return this.getElement()},e}(Uv);te(tm,{align:f,border:{width:0},margin:dt(5),padding:dt(5)});var em=function(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0},om=function(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0},im=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,o=t.rtl,i=t.nodes;void 0===i&&(i=[]);var r=t.item,n=t.position;if(!1===t.visible||!i.length)return null;var s,a=t.labels||{};a.content&&(s=vt(a));var p=i.map((function(t){return{text:s?s(t):t.label&&t.label.text||"",area:{background:void 0!==r.areaBackground?r.areaBackground:t.color,opacity:void 0!==r.areaOpacity?r.areaOpacity:t.opacity},node:t}}));p.sort(function(t){return t?om:em}(o));var l=o&&n!==C&&n!==B,h=new $l(Object.assign({},t,{data:p,reverse:l}),{rtl:o});return h.reflow(e),h.renderVisual(),h.visual},e.prototype.createElement=function(){return this.getElement()},e}(Uv);te(im,{markers:{visible:!1},item:{type:gn,cursor:N,opacity:1},position:d,align:f,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var rm="link",nm="node",sm=function(t){function e(e,o,i){t.call(this),this._initTheme(i),this._setOptions(o),this._initElement(e),this._initSurface(),o&&o.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},e.prototype._initElement=function(t){this.element=t,W(t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},e.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},e.prototype.firstFocusableNode=function(){return this.columns[0][0]},e.prototype._initResizeObserver=function(){var t=this,e=new ResizeObserver((function(e){e.forEach((function(e){var o=e.contentRect,i=o.width,r=o.height;e.target!==t.element||t.size&&t.size.width===i&&t.size.height===r||(t.size={width:i,height:r},t.surface.setSize(t.size),t.resize=!0,t._redraw())}))}));this._resizeObserver=e,e.observe(this.element)},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options)},e.prototype.setLinksOpacity=function(t){var e=this;this.linksVisuals.forEach((function(o){e.setOpacity(o,t,o.linkOptions.opacity)}))},e.prototype.setLinksInactivityOpacity=function(t){var e=this;this.linksVisuals.forEach((function(o){e.setOpacity(o,t,o.linkOptions.highlight.inactiveOpacity)}))},e.prototype.setOpacity=function(t,e,o){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:zt(o)?o:e}))},e.prototype.trigger=function(e,o){var i=o.element.dataItem,r=o.element.type,n=Object.assign({},o,{type:e,targetType:r,dataItem:i});return t.prototype.trigger.call(this,e,n)},e.prototype._mouseenter=function(t){var e=t.element,o=e.type===rm,i=e.type===nm,r=Boolean(e.chartElement&&e.chartElement.options.node);if(!(o&&this.trigger("linkEnter",t)||i&&this.trigger("nodeEnter",t))){var n=this.options.links.highlight;if(o)this.setLinksInactivityOpacity(n.inactiveOpacity),this.setOpacity(e,n.opacity,e.linkOptions.highlight.opacity);else if(i)this.highlightLinks(e,n);else if(r){var s=this.nodesVisuals.get(e.chartElement.options.node.id);this.highlightLinks(s,n)}}},e.prototype._mouseleave=function(t){var e=this,o=t.element,i=o.type===rm,r=o.type===nm,n=Boolean(o.chartElement&&o.chartElement.options.node),s=t.originalEvent.relatedTarget;i&&s&&"text"===s.nodeName||((i||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),i&&this.trigger("linkLeave",t)||r&&this.trigger("nodeLeave",t)||(i||r||n)&&this.linksVisuals.forEach((function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})))},e.prototype._mousemove=function(t){var e=this,o=this.options.tooltip,i=o.followPointer,r=o.delay,n=t.element,s=n.type;if(!(s!==rm&&s!==nm||this.tooltipShown&&!i)){var a=t.originalEvent,p=this.element.getBoundingClientRect(),l=a.clientX-p.left<p.width/2,h=a.clientY-p.top<p.height/2;if(t.tooltipData={popupOffset:{left:a.pageX,top:a.pageY},popupAlign:{horizontal:l?"left":"right",vertical:h?"top":"bottom"}},s===nm){var c=n.dataItem,u=c.sourceLinks,d=c.targetLinks,f=d.length?d:u;t.nodeValue=f.reduce((function(t,e){return t+e.value}),0)}this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null);var g=i&&this.tooltipShown?0:r;this.tooltipTimeOut=setTimeout((function(){e.trigger("tooltipShow",t),e.tooltipShown=!0,e.tooltipTimeOut=null}),g)}},e.prototype._click=function(t){var e=t.element,o=e.dataItem,i=e.type===rm,r=e.type===nm,n=this._focusState||{};if(r)!n.link&&this.sameNode(n.node,o)||(this._focusState={node:o,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t);else if(i){var s={sourceId:o.source.id,targetId:o.target.id,value:o.value};this.sameLink(n.link,s)||(this._focusState={node:o.source,link:s},this._focusLink({highlight:!1})),this.trigger("linkClick",t)}},e.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},e.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},e.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},e.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},e.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,o=this.columns.findIndex((function(t){return t.find((function(t){return t.id===e.id}))})),i=this.columns[o],r=i.findIndex((function(t){return t.id===e.id})),n=i[r+t];n&&(this._focusState.node=n,this._focusNode())},e.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,o=this._focusState.link,i=e.sourceLinks.findIndex((function(t){return t.sourceId===o.sourceId&&t.targetId===o.targetId})),r=e.targetLinks.findIndex((function(t){return t.sourceId===o.sourceId&&t.targetId===o.targetId}));if(-1!==i){var n=e.sourceLinks[i+t];n&&(this._focusState.link=n,this._focusLink())}else if(-1!==r){var s=e.targetLinks[r+t];s&&(this._focusState.link=s,this._focusLink())}},e.prototype._focusSourceNode=function(){var t=this._focusState.link,e=this.models.map.get(t.sourceId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusTargetNode=function(){var t=this._focusState.link,e=this.models.map.get(t.targetId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},e.prototype._blur=function(){this._cleanFocusHighlight()},e.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},e.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},e.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach((function(t){return t.blur()})),this.models.links.forEach((function(t){return t.blur()}))},e.prototype._keydown=function(t){var e=this["on"+t.key],o=this.options.rtl;o&&"ArrowLeft"===t.key?e=this.onArrowRight:o&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},e.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},e.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},e.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},e.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},e.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},e.prototype.highlightLinks=function(t,e){var o=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach((function(t){o.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)})))},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},e.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,o=t.height;this.size={width:e,height:o},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},e.prototype._getSize=function(){return this.element.getBoundingClientRect()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new tm(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},e.prototype.legendBox=function(t,e,o){return t&&!1!==t.visible?new im(Object.assign({},{nodes:e},t,{drawingRect:o})).exportVisual().chartElement.box:null},e.prototype.calculateSankey=function(t,e){var o=e.title,i=e.legend,r=e.data,n=e.nodes,s=e.labels,a=e.nodeColors,p=e.disableAutoLayout,l=e.disableKeyboardNavigation,h=e.rtl,c=!p,u=((n.focusHighlight||{}).border||{}).width||0,f=l?0:u/2,g=new xo(0,0,t.width,t.height);g.unpad(f);var y=this.titleBox(o,g),v=g.clone();if(y){var m=y.height();o.position===V?(g.unpad({top:m}),v=new xo(0,m,t.width,t.height)):(g.shrink(0,m),v=new xo(0,0,t.width,t.height-m))}var x=this.legendBox(i,r.nodes,v),_=i&&i.position||im.prototype.options.position;x&&(_===C&&g.unpad({left:x.width()}),_===B&&g.shrink(x.width(),0),_===V&&g.unpad({top:x.height()}),_===d&&g.shrink(0,x.height()));var b=Hv(Object.assign({},t,{offsetX:0,offsetY:0,width:g.width(),height:g.height()})),w=b.nodes,k=b.circularLinks;if(k)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:k},legendBox:x,titleBox:y};var A=new xo,S=w.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),P=w.reduce((function(t,e){return Math.max(t,e.x1)}),0);w.forEach((function(t,e){if(h){var o=t.x0,i=t.x1;t.x0=P-i,t.x1=P-o}var r=Xv(t,n,a,e),p=new Gv(r);A.wrap(Xo(p.exportVisual().rawBBox()));var l=new $v(Jv(t,s,h,S,P)).exportVisual();l&&A.wrap(Xo(l.rawBBox()))}));var T=g.x1,M=g.y1,O=g.width()+T,L=g.height()+M;if(O-=A.x2>g.width()?A.x2-g.width():0,L-=A.y2>g.height()?A.y2-g.height():0,T+=A.x1<0?-A.x1:0,M+=A.y1<0?-A.y1:0,!1===c)return{sankey:Hv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})),legendBox:x,titleBox:y};if(this.resize&&c&&this.permutation)return this.resize=!1,{sankey:Hv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y};for(var I=Hv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})).columns.length,E=[],R=function(e,o){var i=function(t){for(var e,o,i,r,n,s,a=0,p=t.length,l=0;l<p;l++)for(var h=t[l],c=l+1;c<p;c++){var u=t[c];o=u,void 0,void 0,void 0,void 0,i=Nv((e=h).x0,e.y0,e.x1,e.y1,o.x1,o.y1),r=Nv(e.x0,e.y0,e.x1,e.y1,o.x0,o.y0),n=Nv(e.x0,e.y0,o.x0,o.y0,o.x1,o.y1),s=Nv(e.x1,e.y1,o.x0,o.y0,o.x1,o.y1),i!==r&&n!==s&&(a+=Math.min(h.value,u.value))}return a}(Hv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,loops:2,targetColumnIndex:e,reverse:o})).links);return E.push({crosses:i,reverse:o,targetColumnIndex:e}),0===i},j=1;j<=I-1&&!R(j,!1)&&!R(j,!0);j++);var z=Math.min.apply(null,E.map((function(t){return t.crosses}))),D=E.find((function(t){return t.crosses===z}));return this.permutation={targetColumnIndex:D.targetColumnIndex,reverse:D.reverse},{sankey:Hv(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y}},e.prototype._render=function(t,e){var o=t||this.options,i=e||this,r=o.labels,n=o.nodes,s=o.links,a=o.nodeColors,p=o.title,l=o.legend,h=o.rtl,c=o.disableKeyboardNavigation,u=o.data,d=i.size,f=d.width,g=d.height,y=Object.assign({},u,{width:f,height:g,nodesOptions:n,title:p,legend:l}),v=this.calculateSankey(y,o),m=v.sankey,x=v.titleBox,_=v.legendBox;h&&function(t){var e=t.nodes,o=t.links,i=Math.min.apply(Math,e.map((function(t){return t.x0}))),r=Math.max.apply(Math,e.map((function(t){return t.x1})))-i;e.forEach((function(t){var e=r-(t.x1-2*i),o=r-(t.x0-2*i);t.x0=e,t.x1=o})),o.forEach((function(t){var e=r-(t.x1-2*i),o=r-(t.x0-2*i);t.x1=e,t.x0=o}))}(m);var b=m.nodes,w=m.links,k=m.columns;i.columns=k.map((function(t){var e=t.slice();return e.sort((function(t,e){return t.y0-e.y0})),e}));var A=new q.drawing.Group({clip:q.drawing.Path.fromRect(new q.geometry.Rect([0,0],[f,g]))});if(x){var S=new tm(Object.assign({},p,{drawingRect:x})).exportVisual();A.append(S)}if(m.circularLinks)return A;var C=new Map;i.nodesVisuals=C;var P={nodes:[],links:[],map:new Map};i.models=P;var T=[];b.forEach((function(t,e){var o=Xv(t,n,a,e);o.root=function(){return i.element},o.navigatable=!0!==c;var r=new Gv(o),s=r.exportVisual();s.links=[],s.type=nm,t.color=o.color,t.opacity=o.opacity,s.dataItem=Object.assign({},u.nodes[e],{color:o.color,opacity:o.opacity,sourceLinks:t.sourceLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})),targetLinks:t.targetLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}))}),C.set(t.id,s),P.nodes.push(r),P.map.set(t.id,r),A.append(s),r.createFocusHighlight(),r._highlight&&T.push(r._highlight)}));var M=w.slice().sort((function(t,e){return e.value-t.value})),O=[];i.linksVisuals=O,M.forEach((function(t){var e=t.source,o=t.target,r=C.get(e.id),n=C.get(o.id),a=function(t,e,o,i){var r=at({},e,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight});return"source"===r.colorType?r.color=o.options.fill.color:"target"===r.colorType&&(r.color=i.options.fill.color),r}(t,s,r,n);a.root=function(){return i.element},a.navigatable=!0!==c,a.rtl=h;var p=new qv(a),l=p.exportVisual();l.type=rm,l.dataItem={source:Object.assign({},r.dataItem),target:Object.assign({},n.dataItem),value:t.value},l.linkOptions=a,O.push(l),r.links.push(l),n.links.push(l),P.links.push(p),P.map.set(e.id+"-"+o.id,p),p.createFocusHighlight(),p._highlight&&T.push(p._highlight),A.append(l)}));var L=b.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),B=b.reduce((function(t,e){return Math.max(t,e.x1)}),0);if(b.forEach((function(t){var e=Jv(t,r,h,L,B),o=new $v(e).exportVisual();o&&A.append(o)})),_){var I=new im(Object.assign({},l,{rtl:h,drawingRect:_,nodes:b})).exportVisual();A.append(I)}if(0!==T.length){var E=new q.drawing.Group;E.append.apply(E,T),A.append(E)}return A},e.prototype.exportVisual=function(t){var e=t&&t.options?at({},this.options,t.options):this.options,o={size:{width:zt(t&&t.width)?t.width:this.size.width,height:zt(t&&t.height)?t.height:this.size.height}};return this._render(e,o)},e.prototype._setOptions=function(t){this.options=at({},this.options,t)},e}(Ue),am={opacity:1,width:2,color:u};te(sm,{title:{position:V},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},am)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},am)},labels:{ariaTemplate:function(t){var e=t.link;return e.source.label.text+" to "+e.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var pm=function(t,e,o){var i=new Set,r=new Map,n=new Map;t.forEach((function(t){e.forEach((function(e){i.add(e.value(t))}));for(var s=0;s<e.length-1;s++){var a=e[s].value(t),p=e[s+1].value(t),l=a+"_"+p,h=o.value(t),c=r.get(l);void 0!==c?r.set(l,c+h):(r.set(l,h),n.set(l,{source:a,target:p}))}}));var s=new Map,a=Array.from(i).map((function(t,e){return s.set(t,e),{id:e,label:{text:String(t)}}})),p=Array.from(r).map((function(t){var e=t[0],o=t[1],i=n.get(e),r=i.source,a=i.target;return{sourceId:s.get(r),targetId:s.get(a),value:o}}));return{nodes:a,links:p}},lm=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),hm="12px",cm="16px",um=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],dm=um[0].value,fm="line",gm="scatter",ym=["column","bar",fm,gm],vm={type:fm,width:0};function mm(t){return t&&ym.includes(t)}var xm=["string","date","number"],_m=["number"],bm={bar:[{axisType:"category",types:xm},{axisType:"value",types:_m}],column:[{axisType:"category",types:xm},{axisType:"value",types:_m}],line:[{axisType:"category",types:xm},{axisType:"value",types:_m}],pie:[{axisType:"category",types:xm},{axisType:"value",types:_m,count:1}],scatter:[{axisType:"category",types:xm},{axisType:"value",types:_m}]};function wm(t,e){return((e||"")+" "+(t||"")).trim()}function km(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}var Am=function(t,e,o){var i=km(o).size;return t?wm(t,i||e):""},Sm=function(t,e,o){var i=km(o).name;return t?wm(i||e,t):""},Cm=function(t){return null!=t},Pm=function(t){var e=structuredClone(t[0]);return e.forEach((function(e,o){if(!Cm(e.value))for(var i=0;i<t.length;i++){var r=t[i][o].value;if(Cm(r)){e.value=r;break}}})),e},Tm=function(t,e){var o=[],i=Pm(t);e.types.forEach((function(t){i.forEach((function(e,i){typeof e.value===t&&o.push(i)}))}));var r=o.findIndex((function(e){var o=t.map((function(t){return t[e].value}));return new Set(o).size===o.length}));return Math.max(r,0)},Mm=function(t,e){var o=[],i=Pm(t);return e.forEach((function(t){t.types.forEach((function(t){i.forEach((function(e,i){typeof e.value===t&&o.push(i)}))}))})),o},Om=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})},Lm=function(t,e,o){var i=Om();i.seriesType=e,i.data=t||[],i.legend={visible:!0,position:"bottom"};var r=bm[e];if(!r||!t.length)return i;var n=t[0].slice();i.columns=t[0].map((function(t){return String(t.field)}));var s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=o&&o.categoryAxis?i.columns.indexOf(o.categoryAxis):Tm(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=Mm(t,p);l.includes(a)&&(l.length>1?l=l.filter((function(t){return t!==a})):a=-1);var h=[];l.forEach((function(o){var i=n[o],r=[];t.forEach((function(t){r.push(t[o].value)})),h.push(Object.assign({},{name:i.field,type:e,data:r,stack:!1,labels:{visible:!1}},e===gm?vm:{}))}));var c=a>-1?t.map((function(t){return String(Cm(t[a].value)?t[a].value:" ")})):[];return h.length&&(i.series=h.map((function(t,e){return Object.assign({},t,{id:e})})),i.initialSeries=structuredClone(i.series)),i.categoryAxis=[{categories:c,labels:{visible:!0,rotation:"auto"}}],i.categoryField=i.columns[a],i},Bm=function(t,e,o){var i=Om();i.seriesType=e,i.data=t||[];var r=bm[e];if(!r||!t.length)return i;var n=t[0].map((function(t){return t.field})),s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=o&&o.categoryAxis?n.indexOf(o.categoryAxis):Tm(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=[];(l=o&&o.valueAxis?[n.indexOf(o.valueAxis)]:Mm(t,p)).includes(a)&&l.length>1&&(l=l.filter((function(t){return t!==a}))),"number"==typeof p[0].count&&(l=l.slice(0,p[0].count));var h=a>-1?t.map((function(t){return String(t[a].value)})):[],c=[];return t.forEach((function(t){var e={};l.forEach((function(o){var i=t[o];e[i.field]=i.value||0,e[t[a].field]=t[a].value||" "})),c.push(e)})),i.columns=n,i.categoryAxis=[{categories:h,title:{text:""}}],i.series=[{id:0,data:c,type:e,name:n[a],labels:{visible:!0},categoryField:n[a],field:n[l[0]]}],i.categoryField=n[a],i.valueField=n[l[0]],i.initialSeries=structuredClone(i.series),i};function Im(t,e){return(mm(e)?Lm:Bm)(t,e)}function Em(t,e){var o=structuredClone(e);if(o.legend=t.legend,o.area=t.area,o.title=t.title,o.subtitle=t.subtitle,o.series.length===t.series.length)for(var i=0;i<o.series.length;i++)o.series[i].color=t.series[i].color,o.series[i].labels=t.series[i].labels;return t.series.every((function(t){return t.labels&&t.labels.visible}))&&mm(o.seriesType)&&mm(t.seriesType)&&o.series.forEach((function(t){t.labels=t.labels||{},t.labels.visible=!0})),o}function Rm(t,e,o){var i=Object.assign({},t);switch(e){case lm.seriesType:return Im(i.data,o);case lm.stacked:return i.series=i.series.map((function(t){return Object.assign({},t,{stack:o})})),i.stack=o,i;case lm.categoryAxisX:return i.seriesType&&mm(i.seriesType)?Em(i,Lm(i.data,i.seriesType,{categoryAxis:o})):"pie"===i.seriesType?Em(i,Bm(i.data,i.seriesType,{categoryAxis:o})):i;case lm.valueAxisY:return"pie"===i.seriesType?Em(i,Bm(i.data,i.seriesType,{categoryAxis:i.categoryField,valueAxis:o})):i;case lm.seriesChange:return i.series=o,i;case lm.areaMarginLeft:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{left:o})}),i;case lm.areaMarginRight:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{right:o})}),i;case lm.areaMarginTop:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{top:o})}),i;case lm.areaMarginBottom:return i.area=Object.assign({},i.area,{margin:Object.assign({},i.area&&i.area.margin||{},{bottom:o})}),i;case lm.areaBackground:return i.area=Object.assign({},i.area,{background:o}),i;case lm.titleText:return i.title=Object.assign({},i.title,{text:o}),i;case lm.titleFontName:return i.title=Object.assign({},i.title,{font:Am(o,"20px",i.title&&i.title.font)}),i;case lm.titleFontSize:return i.title=Object.assign({},i.title,{font:Sm(o,dm,i.title&&i.title.font)}),i;case lm.titleColor:return i.title=Object.assign({},i.title,{color:o}),i;case lm.subtitleText:return i.subtitle=Object.assign({},i.subtitle,{text:o}),i;case lm.subtitleFontName:return i.subtitle=Object.assign({},i.subtitle,{font:Am(o,"16px",i.subtitle&&i.subtitle.font)}),i;case lm.subtitleFontSize:return i.subtitle=Object.assign({},i.subtitle,{font:Sm(o,dm,i.subtitle&&i.subtitle.font)}),i;case lm.subtitleColor:return i.subtitle=Object.assign({},i.subtitle,{color:o}),i;case lm.seriesColor:return i.series=i.series.map((function(t){return Object.assign({},t,{color:o.seriesName===t.name?o.color:t.color})})),i;case lm.seriesLabel:return i.series=i.series.map((function(t){return o.all||o.seriesName===t.name?Object.assign({},t,{labels:{visible:o.visible}}):t})),i;case lm.legendVisible:return i.legend=Object.assign({},i.legend,{visible:o}),i;case lm.legendFontName:var r=i.legend||{};return i.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:Am(o,hm,r.labels&&r.labels.font)})}),i;case lm.legendFontSize:var n=i.legend||{};return i.legend=Object.assign({},n,{labels:Object.assign({},n.labels,{font:Sm(o,dm,n.labels&&n.labels.font)})}),i;case lm.legendColor:var s=i.legend||{};return i.legend=Object.assign({},s,{labels:Object.assign({},s.labels,{color:o})}),i;case lm.legendPosition:return i.legend=Object.assign({},i.legend,{position:o}),i;case lm.categoryAxisTitleText:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:o})})})),i;case lm.categoryAxisTitleFontName:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Am(o,cm,t.title&&t.title.font)})})})),i;case lm.categoryAxisTitleFontSize:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Sm(o,dm,t.title&&t.title.font)})})})),i;case lm.categoryAxisTitleColor:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:o})})})),i;case lm.categoryAxisLabelsFontName:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Am(o,hm,t.labels&&t.labels.font)})})})),i;case lm.categoryAxisLabelsFontSize:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Sm(o,dm,t.labels&&t.labels.font)})})})),i;case lm.categoryAxisLabelsColor:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:o})})})),i;case lm.categoryAxisLabelsRotation:var a=Cm(o)?o:"auto";return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:a})})})),i;case lm.categoryAxisReverseOrder:return i.categoryAxis=(i.categoryAxis||[]).map((function(t){return Object.assign({},t,{reverse:o})})),i;case lm.valueAxisTitleText:return i.valueAxis&&0!==i.valueAxis.length?i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:o})})})):i.valueAxis=[{title:{text:o}}],i;case lm.valueAxisTitleFontName:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Am(o,cm,t.title&&t.title.font)})})})),i;case lm.valueAxisTitleFontSize:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Sm(o,dm,t.title&&t.title.font)})})})),i;case lm.valueAxisTitleColor:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:o})})})),i;case lm.valueAxisLabelsFormat:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:o})})})),i;case lm.valueAxisLabelsFontName:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Am(o,hm,t.labels&&t.labels.font)})})})),i;case lm.valueAxisLabelsFontSize:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Sm(o,dm,t.labels&&t.labels.font)})})})),i;case lm.valueAxisLabelsColor:return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:o})})})),i;case lm.valueAxisLabelsRotation:var p=Cm(o)?o:"auto";return i.valueAxis=(i.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:p})})})),i;default:return i}}var Vm=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),jm=Object.freeze({getWizardDataFromDataRows:function(t){var e=[];return t.forEach((function(t){var o=t.dataItem,i=t.dataColumns,r=[];i.forEach((function(t){r.push({field:t.title||t.field,value:bt(t.field)(o)})})),e.push(r)})),e},ActionTypes:lm,createInitialState:function(t,e,o){var i=Im(t,o&&o.seriesType||e);return void 0!==(o&&o.stack)?Rm(i,lm.stacked,o.stack):i},createState:Im,fontNames:um,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:mm,mergeStates:Em,parseFont:km,updateState:Rm,messages:Vm}),zm=1.5,Dm=.4,Fm="#000",Hm="Arial, Helvetica, sans-serif",Nm="11px "+Hm,Um="12px "+Hm,Gm="16px "+Hm,Wm="transparent",Xm="#fff",Ym={type:Pn},qm={type:gn},Zm=Object.assign({},qm,{markers:{visible:!1},highlight:{visible:!1}}),Qm=function(){return{icon:{border:{width:1}},label:{font:Um,padding:3},line:{length:10,width:2},legendItem:Zm,visible:!0}},Km=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:qm,opacity:.4}},$m=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:qm,opacity:.4}},Jm=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Xm,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},legendItem:Zm}},tx=function(){return{gap:zm,spacing:Dm,target:{color:"#ff0000"},legendItem:Zm}},ex=function(){return{width:2,legendItem:Ym}},ox=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:qm,opacity:.5}},ix=function(){return{markers:{visible:!1},legendItem:Ym,width:2}},rx=function(){return{gap:.5,line:{color:Fm,width:1},legendItem:Zm,spacing:Dm}},nx=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Zm}},sx=nx,ax=function(t){return Object.assign({color:S,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:Ym},t)},px=function(t){return{visible:!0,labels:{font:Nm},overlay:t.gradients?{}:{gradient:"none"},area:Km(),rangeArea:$m(),verticalRangeArea:$m(),bar:{gap:zm,spacing:Dm,legendItem:Zm},boxPlot:Jm(),bubble:{border:{width:0},labels:{background:Wm},legendItem:Zm,opacity:.6},bullet:tx(),candlestick:{border:{_brightness:.8,width:1},downColor:Xm,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Fm,width:1},legendItem:Zm,spacing:.3},column:{gap:zm,spacing:Dm,legendItem:Zm},heatmap:{labels:{color:"",background:Wm,visible:!0},highlight:{border:{width:0}},legendItem:Zm},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Zm},donut:{margin:1,legendItem:Zm},funnel:nx(),pyramid:sx(),horizontalWaterfall:rx(),line:ex(),notes:Qm(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:Zm,spacing:.3},radarArea:ox(),radarLine:ix(),radarColumn:{legendItem:Zm},polarArea:ox(),polarLine:ix(),polarScatter:{legendItem:Ym},rangeBar:{gap:zm,spacing:Dm,legendItem:Zm},rangeColumn:{gap:zm,spacing:Dm,legendItem:Zm},scatter:{legendItem:Ym},scatterLine:{width:1,legendItem:Ym},verticalArea:Km(),verticalBoxPlot:Jm(),verticalBullet:tx(),verticalLine:ex(),waterfall:rx(),linearTrendline:ax(),exponentialTrendline:ax({style:"smooth"}),logarithmicTrendline:ax({style:"smooth"}),polynomialTrendline:ax({style:"smooth"}),powerTrendline:ax({style:"smooth"}),movingAverageTrendline:ax()}},lx=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Um},notes:Qm(),title:{font:Gm,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:px(t),title:{font:Gm},subtitle:{font:Um},legend:{labels:{font:Um}}}},hx="--kendo-chart-series-",cx=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},ux={},dx=function(t,e){var o=cx(t).getPropertyValue(e);return/^color-mix/i.test(o)&&(o=function(t,e){if(ux[t])return ux[t];var o=e.style.color;e.style.color=t;var i=cx(e).color;return e.style.color=o,ux[t]=i,i}(o,t)),o},fx=function(t,e){return parseFloat(cx(t).getPropertyValue(e))},gx=function(t,e,o,i){var r=cx(t);return[r.getPropertyValue(e),r.getPropertyValue(o),r.getPropertyValue(i)||r.fontFamily].join(" ")},yx=function(t){for(var e=cx(t),o=[],i=1,r=e.getPropertyValue(""+hx+i);r||i<=30;)o.push(r),i++,r=e.getPropertyValue(""+hx+i);return o},vx=function(t){return gx(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family")},mx=function(t){return gx(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")},xx=function(t){return dx(t,"--kendo-chart-text")},_x=function(t){return{color:xx(t),font:gx(t,"--kendo-font-weight","--kendo-chart-title-font-size","--kendo-font-family")}},bx=function(t){var e=xx(t);return{labels:{color:e,font:vx(t)},title:{color:e}}},wx=function(t){var e=dx(t,"--kendo-chart-inactive");return Object.assign({},{inactiveItems:{labels:{color:e},markers:{color:e}}},bx(t))},kx=function(t){var e=xx(t);return{pointer:{color:dx(t,"--kendo-chart-gauge-pointer")},scale:{labels:{color:e},rangePlaceholderColor:dx(t,"--kendo-chart-gauge-track"),minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}}},Ax=function(t){return{labels:{color:xx(t),font:vx(t),stroke:{color:dx(t,"--kendo-chart-bg")}},links:{color:dx(t,"--kendo-color-subtle")},nodeColors:yx(t),title:_x(t),legend:bx(t)}},Sx=function(t){var e=dx(t,"--kendo-chart-major-lines"),o=dx(t,"--kendo-chart-text"),i=gx(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family"),r=dx(t,"--kendo-chart-bg"),n=function(t){return{icon:{background:dx(t,"--kendo-chart-notes-bg"),border:{color:dx(t,"--kendo-chart-notes-border")}},line:{color:dx(t,"--kendo-chart-notes-lines")},label:{font:vx(t)}}}(t),s=fx(t,"--kendo-chart-area-opacity"),a=dx(t,"--kendo-color-surface"),p=dx(t,"--kendo-chart-primary-bg"),l=function(){return{downColor:e,mean:{color:a},median:{color:a},whiskers:{color:p}}},h=function(){return{line:{color:e}}},c=function(){return{opacity:s,highlight:{inactiveOpacity:fx(t,"--kendo-chart-area-inactive-opacity")}}},u=function(){return{highlight:{inactiveOpacity:fx(t,"--kendo-chart-line-inactive-opacity")}}},d=function(){return{target:{color:o}}};return{axisDefaults:{crosshair:{color:dx(t,"--kendo-chart-crosshair-bg")},labels:{color:o,font:i},line:{color:e},majorGridLines:{color:e},minorGridLines:{color:dx(t,"--kendo-chart-minor-lines")},notes:structuredClone(n),title:{color:o,font:vx(t)}},chartArea:{background:r},legend:wx(t),seriesColors:yx(t),seriesDefaults:{area:c(),verticalArea:c(),radarArea:c(),boxPlot:l(),verticalBoxPlot:l(),bullet:d(),verticalBullet:d(),horizontalWaterfall:h(),waterfall:h(),line:u(),verticalLine:u(),candlestick:{downColor:o,line:{color:o}},errorBars:{color:dx(t,"--kendo-chart-error-bars-bg")},icon:{border:{color:e}},labels:{background:r,color:o,font:i,opacity:s},notes:structuredClone(n)},subtitle:{color:o,font:mx(t)},title:_x(t),paneDefaults:{title:{font:mx(t)}}}};return r})()));