@progress/kendo-charts 2.3.0 → 2.4.0-dev.202405201104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var Hb={};return{setters:[function(t){Hb.Class=t.Class,Hb.Color=t.Color,Hb.drawing=t.drawing,Hb.geometry=t.geometry,Hb.logToConsole=t.logToConsole,Hb.parseColor=t.parseColor,Hb.support=t.support,Hb.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var V={100:t=>{t.exports=Hb}},z={};function j(t){var e=z[t];return void 0!==e||(e=z[t]={exports:{}},V[t](e,e.exports,j)),e.exports}j.d=(t,e)=>{for(var i in e)j.o(e,i)&&!j.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},j.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),j.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var D,F,H={};{j.r(H),j.d(H,{Aggregates:()=>g_,ArcGauge:()=>Lb,ArcScale:()=>Ob,AreaChart:()=>L_,AreaSegment:()=>O_,ArrowLinearPointer:()=>wb,Axis:()=>t_,AxisGroupRangeTracker:()=>E_,AxisLabel:()=>qx,Bar:()=>z_,BarChart:()=>F_,BarLabel:()=>R_,BarLinearPointer:()=>Sb,Barcode:()=>Rb,Box:()=>E,BoxElement:()=>Fx,BoxPlot:()=>N_,BoxPlotChart:()=>W_,BubbleChart:()=>Z_,Bullet:()=>K_,BulletChart:()=>$_,Candlestick:()=>H_,CandlestickChart:()=>U_,CategoricalChart:()=>__,CategoricalErrorBar:()=>x_,CategoricalPlotArea:()=>_1,CategoryAxis:()=>e_,Chart:()=>cb,ChartAxis:()=>u_,ChartContainer:()=>e1,ChartElement:()=>R,ChartPane:()=>d_,ChartPlotArea:()=>f_,ChartService:()=>$x,CircularGauge:()=>Eb,Class:()=>w.Class,ClipAnimation:()=>P_,ClusterLayout:()=>j_,Crosshair:()=>t1,CrosshairTooltip:()=>J_,CurveProcessor:()=>c_,DateCategoryAxis:()=>i_,DateValueAxis:()=>r_,DefaultAggregates:()=>s1,DomEventsBuilder:()=>Jx,DonutChart:()=>W1,DonutPlotArea:()=>X1,DonutSegment:()=>G1,ErrorBarBase:()=>m_,ErrorRangeCalculator:()=>v_,Extent:()=>py,FloatElement:()=>Gx,FontLoader:()=>Bx,FormatService:()=>Kx,Gauge:()=>mb,Gradients:()=>Ux,HashMap:()=>Ox,Highlight:()=>b1,InstanceObserver:()=>Ix,IntlService:()=>Qx,Legend:()=>I1,LegendItem:()=>O1,LegendLayout:()=>A1,LineChart:()=>M_,LinePoint:()=>k_,LineSegment:()=>S_,LinearGauge:()=>Ab,LinearPointer:()=>_b,LinearScale:()=>xb,Location:()=>sg,LogarithmicAxis:()=>n_,Map:()=>Fb,Matrix:()=>Rx,MousewheelZoom:()=>S1,Navigator:()=>yb,NavigatorHint:()=>gb,Note:()=>Zx,NumericAxis:()=>o_,OHLCChart:()=>y1,OHLCPoint:()=>g1,Observable:()=>Vx,Pane:()=>i1,Pannable:()=>w1,PieAnimation:()=>V1,PieChart:()=>U1,PieChartMixin:()=>H1,PiePlotArea:()=>N1,PieSegment:()=>F1,PlotAreaBase:()=>o1,PlotAreaEventsMixin:()=>r1,PlotAreaFactory:()=>B1,Point:()=>L,PointEventsMixin:()=>b_,PolarAxis:()=>h_,QRCode:()=>zb,RadarCategoryAxis:()=>a_,RadarLogarithmicAxis:()=>l_,RadarNumericAxis:()=>p_,RadialGauge:()=>Mb,RadialPointer:()=>Tb,RadialScale:()=>Cb,RangeAreaChart:()=>f1,RangeAreaPoint:()=>l1,RangeBar:()=>a1,RangeBarChart:()=>h1,RangePointer:()=>Bb,Ring:()=>zx,RootElement:()=>Nx,Sankey:()=>ox,ScatterChart:()=>Y_,ScatterErrorBar:()=>X_,ScatterLineChart:()=>z1,Sector:()=>jx,Selection:()=>L1,SeriesAggregator:()=>n1,SeriesBinder:()=>y_,ShapeBuilder:()=>Dx,ShapeElement:()=>Hx,SharedTooltip:()=>R1,Sparkline:()=>db,SplineAreaSegment:()=>B_,SplineSegment:()=>C_,StackWrap:()=>D_,StockChart:()=>vb,TemplateService:()=>Mx,Text:()=>Wx,TextBox:()=>Xx,Title:()=>Yx,Tooltip:()=>E1,WaterfallChart:()=>m1,WaterfallSegment:()=>v1,XYPlotArea:()=>D1,ZoomSelection:()=>k1,addClass:()=>xt,alignPathToPixel:()=>wt,anyHasZIndex:()=>Pn,append:()=>te,appendIfNotNull:()=>Tn,areNumbers:()=>Mn,autoMajorUnit:()=>Qe,autoTextColor:()=>Lx,barcodeValidator:()=>Vb,bindEvents:()=>ee,bindSegments:()=>In,categoriesCount:()=>Bn,chartBaseTheme:()=>Tx,clockwise:()=>kt,constants:()=>U,convertableToNumber:()=>At,countNumbers:()=>Ko,createHashSet:()=>Ie,createOutOfRangePoints:()=>Zn,createSankeyData:()=>rx,cycleDown:()=>Pt,cycleIndex:()=>Tt,cycleUp:()=>Ct,deepExtend:()=>x,defaultErrorHandler:()=>Be,defined:()=>T,deg:()=>ie,elementOffset:()=>oe,elementScale:()=>Ce,elementSize:()=>re,elementStyles:()=>Rt,equalsIgnoreCase:()=>Ln,evalOptions:()=>Rn,eventCoordinates:()=>ne,eventElement:()=>se,filterSeriesByType:()=>Vn,find:()=>we,findAxisByName:()=>qo,getAriaTemplate:()=>Dt,getField:()=>tr,getSpacing:()=>P,getTemplate:()=>jt,getter:()=>Ut,grep:()=>Nt,hasClasses:()=>Gt,hasGradientOverlay:()=>Dn,hasOwnProperty:()=>Le,hasValue:()=>Fn,hashKey:()=>ae,inArray:()=>u,interpolateValue:()=>Xt,isArray:()=>mt,isDateAxis:()=>Hn,isFunction:()=>Mt,isNumber:()=>m,isObject:()=>Bt,isPlainObject:()=>Zt,isString:()=>St,keys:()=>Ex,last:()=>he,limitValue:()=>_,logToConsole:()=>w.logToConsole,map:()=>Qt,mousewheelDelta:()=>$t,objectKey:()=>pe,parseDateCategory:()=>jn,qrcodeValidator:()=>jb,rad:()=>le,rectToBox:()=>di,removeClass:()=>bt,renderIcon:()=>_e,round:()=>M,segmentVisible:()=>On,setDefaultOptions:()=>i,singleItemOrArray:()=>Un,sparseArrayLimits:()=>be,styleValue:()=>Lt,unbindEvents:()=>ce,valueOrDefault:()=>O});var U={},N=(j.r(U),j.d(U,{DEFAULT_PANE:()=>Vl,NAVIGATOR_AXIS:()=>Rl,NAVIGATOR_PANE:()=>El}),"arc"),G="ArrowUp",W="ArrowDown",X="ArrowLeft",Y="ArrowRight",q="aria-activedescendant",Z="#000",k="bottom",b="center",Q="circle",K=3,$="cross",J="date",t="12px sans-serif",tt=10,et="end",it=/\{\d+:?/,ot="height",rt="inside",nt="inherit",S="left",st=Number.MAX_VALUE,at=-Number.MAX_VALUE,ht="none",pt="object",lt="outside",A="right",ct="roundedRect",ut="start",dt="string",C="top",ft="value",a="#fff",gt="width",y="x",v="y",yt="pointer",vt="horizontal";function mt(t){return Array.isArray(t)}function xt(t,e){for(var i=mt(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var _t=/\s+/g;function bt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(_t," "))}var w=j(100);function wt(t){var e=.5;t.options.stroke&&w.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function kt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function St(t){return typeof t===dt}function At(t){return m(t)||St(t)&&isFinite(t)}function Ct(t,e){return(t+1)%e}function Pt(t,e){t-=1;return t<0?e-1:t}function Tt(t,e){return 1===e||t%e==0?0:t<0?e+t%e:e<=t?t%e:t}function Mt(t){return"function"==typeof t}var Ot="object",It="undefined";function x(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r,n=i[o],s=typeof n;(r=s===Ot&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[o]=new Date(n.getTime()):Mt(n.clone)?e[o]=n.clone():(r=e[o],e[o]=typeof r===Ot&&r||{},t(e[o],n)):s!==It&&(e[o]=n)}}(t,e[o]);return t}function Bt(t){return"object"==typeof t}function Lt(t){return m(t)?t+"px":t}var Et=/width|height|top|left|bottom|right/i;function Rt(t,e){var i=St(e)?[e]:e;if(mt(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=Et.test(s)?parseFloat(r[s]):r[s]}return o}if(Bt(e))for(var a in e)t.style[a]=Lt(e[a])}function P(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[C]=i[A]=i[k]=i[S]=t:(i[C]=t[C]||e,i[A]=t[A]||e,i[k]=t[k]||e,i[S]=t[S]||e),i}function Vt(){}var zt={compile:function(t){return t}};Vt.register=function(t){zt=t},Vt.compile=function(t,e){return zt.compile(t,e)};const Mx=Vt;function jt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=Mx.compile(t.template):Mt(t.content)&&(e=t.content),e}function Dt(t){var e;return(t=void 0===t?{}:t).ariaTemplate?t.ariaTemplate=e=Mx.compile(t.ariaTemplate):Mt(t.ariaContent)&&(e=t.ariaContent),e}var Ft=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Ht={};function Ut(t){var r;return Ht[t]||(r=[],t.replace(Ft,function(t,e,i,o){r.push(w.drawing.util.defined(e)?e:i||o)}),Ht[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e}),Ht[t]}function Nt(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function Gt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}function Wt(){this._map=new Map}Ht[void 0]=function(t){return t},Wt.prototype.get=function(t){return this._map.get(t)},Wt.prototype.set=function(t,e){this._map.set(t,e)};const Ox=Wt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Xt(t,e,i){return w.drawing.util.round(t+(e-t)*i,K)}function Yt(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}var qt="trigger";Yt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[qt]&&(i=this.callObserver(qt,t,e)),i},Yt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Yt.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 Ix=Yt;function Zt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Qt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);w.drawing.util.defined(n)&&o.push(n)}return o}var Kt=w.support.browser||{};function $t(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Kt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Jt(){}var e,te=(e=w.drawing.util).append,ee=e.bindEvents,T=e.defined,ie=e.deg,oe=e.elementOffset,re=e.elementSize,ne=e.eventCoordinates,se=e.eventElement,ae=e.hashKey,he=e.last,_=e.limitValue,pe=e.objectKey,le=e.rad,M=e.round,ce=e.unbindEvents,O=e.valueOrDefault;Jt.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,Jt.fetchFonts(e,o,r),r.depth--))})},Jt.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,w.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},Jt.preloadFonts=function(t,e){var i=[];Jt.fetchFonts(t,i),Jt.loadFonts(i,e)};const Bx=Jt;function i(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function ue(t,e){this.element=t,this.options=x({},this.options,e),this.wrapper()}var de,fe="k-i-",ge="k-svg-i-",e=(ue.prototype.wrapper=function(){this.addClasses()},ue.prototype.addClasses=function(){},ue.prototype.html=function(){return this.element.outerHTML},i(ue,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(de=ue)&&(ve.__proto__=de),((ve.prototype=Object.create(de&&de.prototype)).constructor=ve).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(fe)}),e=this.options.icon?(this.options.icon.startsWith(fe)?"":fe)+this.options.icon:"";this._className=e,xt(this.element,"k-icon"),xt(this.element,"k-font-icon"),bt(this.element,t),xt(this.element,e),xt(this.element,this.options.iconClass||""),de.prototype.wrapper.call(this)},ve),ye,o;function ve(t,e){de.call(this,t,e)}function me(t,e){t.innerHTML="",ye.call(this,t,e)}i(e,{name:"HTMLFontIcon",icon:null}),(ye=ue)&&(me.__proto__=ye),((me.prototype=Object.create(ye&&ye.prototype)).constructor=me).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,i=this.element.className.split(" ").find(function(t){return t.startsWith(ge)}),o=(!t&&e&&(o=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=o[1],e=e.replace(o[0],"")),St(t)&&(t=t.replace("k-i-","").replace(/-./g,function(t){return t[1].toUpperCase()}),t=this.options.svgIcons[t]||this.options.svgIcons[t+"Icon"]),t&&t.name?ge+t.name:"");this._className=o,xt(this.element,"k-svg-icon"),bt(this.element,i),xt(this.element,o),xt(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&Zt(t)&&((i=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),i.setAttribute("focusable","false"),i.innerHTML=t.content||"",this.element.appendChild(i)),ye.prototype.wrapper.call(this)},i(o=me,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var xe={svg:o,font:e};function _e(t,e){return t&&(!Bt(t)||t instanceof HTMLElement)&&!St(t)||(e=t,t=document.createElement("span")),(e=St(e)?{icon:e}:e).type||(e.type="svg"),xe[e.type]?new xe[e.type](t,e).html():null}function be(t){for(var e=st,i=at,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===st?void 0:e,max:i===at?void 0:i}}function we(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var ke=w.geometry.Matrix,Se=/matrix\((.*)\)/;function Ae(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(Se))||2!==t.length?ke.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(ke,[null].concat(t))))}function Ce(t){if(!t)return ke.unit();for(var e=Ae(t),i=t.parentElement;i;)var o=Ae(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}const Lx=function(t){return new w.Color(t).isDark()?a:Z};var Pe={},Te=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},o={size:{configurable:!0}},Me=(Te.prototype.values=function(){return this._values.filter(function(t){return t!==Pe})},Te.prototype.has=function(t){return void 0!==this._index[t]},Te.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Te.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Pe,delete this._index[t])},Te.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(Te.prototype,o),function(t){this._set=new Set(t)}),e={size:{configurable:!0}},Oe=(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()},e.size.get=function(){return this._set.size},Object.defineProperties(Me.prototype,e),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Ie(t){return new(Oe()?Me:Te)(t)}function Be(t){throw t}const Ex={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 Le(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ee(){this.height=0,this.width=0,this.data=[]}Ee.prototype.clone=function(){var t=new Ee;return t.height=this.height,t.width=this.width,t.data=this.data.map(function(t){return t.slice()}),t},Ee.prototype.get=function(t,e){t=this.data[t];return t?t[e]:null},Ee.prototype.set=function(t,e,i){var o=this.data[t];(o=null==o?this.data[t]=[]:o)[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Ee.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},Ee.prototype.map=function(o,t){var r=new Ee;return this.each(function(t,e,i){r.set(e,i,o(t,e,i))},t),r},Ee.prototype.transpose=function(){var o=new Ee;return this.each(function(t,e,i){o.set(i,e,t)}),o},Ee.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;0<=--i;)for(var o=e[i]=new Array(t),r=t;0<=--r;)o[r]=i===r?1:0;return this},Ee.prototype.multiply=function(t){for(var e=new Ee,i=0;i<this.height;++i)for(var o=0;o<t.width;++o){for(var r=0,n=0;n<this.width;++n){var s=this.get(i,n),a=t.get(n,o);"number"==typeof s&&"number"==typeof a&&(r+=s*a)}e.set(i,o,r)}return e},Ee.prototype.inverse=function(){for(var n=this.width,t=this.augment((new Ee).unit(n)),s=t.data,e=0;e<n;++e){var i=function(e){var t,i=function(t,e,i){for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);o<s&&(o=s,r=t)}return r}(e,n,function(t){return s[t][e]});if(!s[i][e])return{v:null};e!==i&&(t=s[e],s[e]=s[i],s[i]=t);for(var o=e+1;o<n;++o){for(var r=e+1;r<2*n;++r)s[o][r]-=s[e][r]*s[o][e]/s[e][e];s[o][e]=0}}(e);if(i)return i.v}for(var o=0;o<n;++o)for(var r=s[o][o],a=0;a<2*n;++a)s[o][a]/=r;for(var h=n;0<=--h;)for(var p=h;0<=--p;)if(s[p][h])for(var l=2*n;--l>=n;)s[p][l]-=s[h][l]*s[p][h];return t.slice(0,n,n,n)},Ee.prototype.augment=function(t){var o=this.clone(),r=o.width;return t.each(function(t,e,i){o.set(e,i+r,t)}),o},Ee.prototype.slice=function(t,e,i,o){for(var r=new Ee,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};const Rx=Ee;function Re(){this._defaultPrevented=!0}function Ve(){return!0===this._defaultPrevented}var ze,je,De,Fe,He,Ue="function",Ne,o,Ge,e,We,o,Xe,e,Ye,e,qe,o;function Ze(){ze.call(this),this._events={}}(ze=w.Class)&&(Ze.__proto__=ze),((Ze.prototype=Object.create(ze&&ze.prototype)).constructor=Ze).prototype.destroy=function(){this.unbind()},Ze.prototype.bind=function(t,e,i){var o,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==Ue;if(void 0===e)for(h in t)n.bind(h,t[h]);else for(var h=0,p=s.length;h<p;h++)!function(){var t=s[h];(r=a?e:e[t])&&(i&&(o=r,(r=function(){n.unbind(t,r),o.apply(n,arguments)}).original=o),(n._events[t]=n._events[t]||[]).push(r))}();return n},Ze.prototype.one=function(t,e){return this.bind(t,e,!0)},Ze.prototype.first=function(t,e){for(var i,o="string"==typeof t?[t]:t,r=typeof e==Ue,n=0,s=o.length;n<s;n++){var a=o[n];(i=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(i)}return this},Ze.prototype.trigger=function(t,e){var i,o,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=Re,n.isDefaultPrevented=Ve,i=0,o=(r=r.slice()).length;i<o;i++)r[i].call(this,n);return!0===n._defaultPrevented}return!1},Ze.prototype.unbind=function(t,e){var i,o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(i=o.length-1;0<=i;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},Ze.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events)&&this._events[o]&&delete this._events[o]}this.bind(this.events,t)};const Vx=Ze;function Qe(t,e){t=M(e-t,tt-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=M(t/e,tt);return M(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),tt)}(je=w.Class)&&(Ke.__proto__=je),((Ke.prototype=Object.create(je&&je.prototype)).constructor=Ke).prototype.clone=function(){return new Ke(this.x,this.y)},Ke.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ke.prototype.rotate=function(t,e){var e=le(e),i=Math.cos(e),e=Math.sin(e),o=t.x,t=t.y,r=this.x,n=this.y;return this.x=M(o+(r-o)*i+(n-t)*e,K),this.y=M(t+(n-t)*i-(r-o)*e,K),this},Ke.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ke.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ke.onCircle=function(t,e,i){e=le(e);return new Ke(t.x-i*Math.cos(e),t.y-i*Math.sin(e))};const L=Ke;function Ke(t,e){je.call(this),this.x=t||0,this.y=e||0}function $e(t,e,i,o){De.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Je(t,e,i,o,r){r=le(r);return new L(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}(De=w.Class)&&($e.__proto__=De),(($e.prototype=Object.create(De&&De.prototype)).constructor=$e).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},$e.prototype.width=function(){return this.x2-this.x1},$e.prototype.height=function(){return this.y2-this.y1},$e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},$e.prototype.move=function(t,e){var i=this.height(),o=this.width();return T(t)&&(this.x1=t,this.x2=this.x1+o),T(e)&&(this.y1=e,this.y2=this.y1+i),this},$e.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},$e.prototype.wrapPoint=function(t){var e=mt(t),i=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new $e(i,e,i,e)),this},$e.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},$e.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===C||e===k?v:y,a=s==v?r:n;return e===b?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===C||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,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){t=P(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},$e.prototype.unpad=function(t){t=P(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},$e.prototype.clone=function(){return new $e(this.x1,this.y1,this.x2,this.y2)},$e.prototype.center=function(){return new L(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 L(this.x1,this.y1),new L(this.x2,this.y1),new L(this.x2,this.y2),new L(this.x1,this.y2)]},$e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},$e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},$e.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,o=o.y,n=Je(0,0,r,o,t),s=Je(e,0,r,o,t),a=Je(e,i,r,o,t),r=Je(0,i,r,o,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),i=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+i,this},$e.prototype.toRect=function(){return new w.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},$e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},$e.prototype.align=function(t,e,i){var o=e+1,r=e+2,e=e===y?gt:ot,n=this[e]();u(i,[S,C])?(this[o]=t[o],this[r]=this[o]+n):u(i,[A,k])?(this[r]=t[r],this[o]=this[r]-n):i===b&&(this[o]=t[o]+(t[e]()-n)/2,this[r]=this[o]+n)};const E=$e;function ti(t,e,i,o,r){Fe.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}function ei(t,e){return t-e}(Fe=w.Class)&&(ti.__proto__=Fe),((ti.prototype=Object.create(Fe&&Fe.prototype)).constructor=ti).prototype.clone=function(){return new ti(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},ti.prototype.middle=function(){return this.startAngle+this.angle/2},ti.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},ti.prototype.point=function(t,e){var t=le(t),i=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,i=M(this.center.x-i*e,K),t=M(this.center.y-t*e,K);return new L(i,t)},ti.prototype.adjacentBox=function(t,e,i){var t=this.clone().expand(t),o=t.middle(),t=t.point(o),r=e/2,n=i/2,s=Math.sin(le(o)),o=Math.cos(le(o)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-o/Math.abs(o)),Math.abs(o)<.9&&(t+=n*-s/Math.abs(s)),new E(a,t,a+e,t+i)},ti.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new L(s,t),r=this.point(r),r=new L(r.x-e.x,r.y-e.y),n=this.point(n),n=new L(n.x-e.x,n.y-e.y),e=M(s*s+t*t,K);return(r.equals(a)||kt(r,a))&&!kt(n,a)&&i*i<=e&&e<=o*o},ti.prototype.getBBox=function(){for(var t=new E(st,st,at,at),e=M(this.startAngle%360),i=M((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(ei),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),h=0;h<a.length;h++){var p=this.point(a[h]);t.wrapPoint(p),t.wrapPoint(p,o)}return o||t.wrapPoint(this.center),t},ti.prototype.expand=function(t){return this.radius+=t,this};const zx=ti;function ii(t,e,i,o){He.call(this,t,0,e,i,o)}(He=zx)&&(ii.__proto__=He),((ii.prototype=Object.create(He&&He.prototype)).constructor=ii).prototype.expand=function(t){return He.prototype.expand.call(this,t)},ii.prototype.clone=function(){return new ii(this.center,this.radius,this.startAngle,this.angle)},ii.prototype.setRadius=function(t){return this.radius=t,this};const jx=ii;function oi(){Ne.apply(this,arguments)}(Ne=w.Class)&&(oi.__proto__=Ne),((oi.prototype=Object.create(Ne&&Ne.prototype)).constructor=oi).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i,r=((0===t.angle||0<t.angle&&i===o)&&(o+=.001),new w.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new w.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=w.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},(o=oi).current=new o;const Dx=o;function ri(t){Ge.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}(Ge=w.Class)&&(ri.__proto__=Ge),((ri.prototype=Object.create(Ge&&Ge.prototype)).constructor=ri).prototype.initUserOptions=function(t){return t},ri.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},ri.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},ri.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},ri.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},ri.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},ri.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},ri.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},ri.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},ri.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},ri.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},ri.prototype.createVisual=function(){this.visual=new w.drawing.Group({zIndex:this.options.zIndex,visible:O(this.options.visible,!0)})},ri.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=w.drawing.Animation.create(this.visual,this.options.animation))},ri.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):T(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},ri.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},ri.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},ri.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(O(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},ri.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},ri.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},ri.prototype.renderComplete=function(){},ri.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},ri.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);T(n.options.zIndex)||(n.options.zIndex=O(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},ri.prototype.toggleFocusHighlight=function(t){var e,i=((this.options||{}).accessibility||{}).highlight||{},o=this._focusHighlight;(t||o)&&(o||(e=this.getRoot().options.background,e=Lx(e),e={fill:{opacity:i.opacity,color:i.color},stroke:Object.assign({},{color:e},i.border),zIndex:i.zIndex},o=this._focusHighlight=this.createFocusHighlight(e),this.appendVisual(o)),o.visible(t))},ri.prototype.createGradientOverlay=function(t,e,i){i=new w.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},ri.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},ri.prototype.supportsPointInactiveOpacity=function(){return!0},(e=ri).prototype.options={};const R=e;function ni(t){We.call(this,t),this.options.margin=P(this.options.margin),this.options.padding=P(this.options.padding)}(We=R)&&(ni.__proto__=We),((ni.prototype=Object.create(We&&We.prototype)).constructor=ni).prototype.reflow=function(t){function e(){o.align(t,y,r.align),o.align(t,v,r.vAlign),o.paddingBox=i.clone().unpad(p).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,p=r.margin,l=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(p).unpad(c).unpad(l),We.prototype.reflow.call(this,u),i=h?this.box=new E(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=i.clone(),i.pad(l).pad(c).pad(p),e()),this.translateChildren(i.x1-u.x1+p.left+c+l.left,i.y1-u.y1+p.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},ni.prototype.align=function(t,e,i){this.box.align(t,e,i)},ni.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ni.prototype.createVisual=function(){We.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(w.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ni.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},i(o=ni,{align:S,vAlign:C,margin:{},padding:{},border:{color:Z,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Fx=o;function si(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)}function ai(t,e){Xe.call(this,t),this.pointData=e}(Xe=Fx)&&(ai.__proto__=Xe),((ai.prototype=Object.create(Xe&&Xe.prototype)).constructor=ai).prototype.getElement=function(){var t,e,i=this.options,o=this.paddingBox,r=i.type,n=i.rotation,s=o.center(),a=o.width()/2,h=o.height()/2;return i.visible&&this.hasBox()?(e=this.visualStyle(),r===Q?t=new w.drawing.Circle(new w.geometry.Circle([M(o.x1+a,K),M(o.y1+h,K)],Math.min(a,h)),e):"triangle"===r?t=w.drawing.Path.fromPoints([[o.x1+a,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===$?((t=new w.drawing.MultiPath(e)).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):(h=o.toRect(),r===ct&&(a=O(i.borderRadius,h.width()/5),h.setCornerRadius(a)),t=w.drawing.Path.fromRect(h,e)),n&&t.transform(w.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=i.zIndex,t):null},ai.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},ai.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}},ai.prototype.createVisual=function(){this.visual=this.createElement(),si(this.visual,this.options.accessibilityOptions)},i(e=ai,{type:Q,align:b,vAlign:b});const Hx=e,Ux={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:o="radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:o,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:o,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:o,supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:o,center:[.5,.5],radius:.5}};function hi(t){Ye.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}(Ye=R)&&(hi.__proto__=Ye),((hi.prototype=Object.create(Ye&&Ye.prototype)).constructor=hi).prototype.reflow=function(){var t=this.options,e=this.children,i=new E(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o,r,n,s,a,h,p,l,c,u,d,f=0;f<e.length;f++)e[f].reflow(i),o=i,r=e[f].box,d=u=c=l=p=h=a=s=n=void 0,i=(o.x1===r.x1&&o.y1===r.y1&&o.x2===r.x2&&o.y2===r.y2?r:(n=Math.min(o.x1,r.x1),s=Math.max(o.x1,r.x1),a=Math.min(o.x2,r.x2),h=Math.max(o.x2,r.x2),p=Math.min(o.y1,r.y1),l=Math.max(o.y1,r.y1),c=Math.min(o.y2,r.y2),u=Math.max(o.y2,r.y2),(d=[])[0]=new E(s,p,a,l),d[1]=new E(n,l,s,c),d[2]=new E(a,l,h,c),d[3]=new E(s,c,a,u),o.x1===n&&o.y1===p||r.x1===n&&r.y1===p?(d[4]=new E(n,p,s,l),d[5]=new E(a,c,h,u)):(d[4]=new E(a,p,h,l),d[5]=new E(n,c,s,u)),Nt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new E},hi.prototype.createVisual=function(){this.visual=new w.drawing.Group,this.createBackground()},hi.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),i=w.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(i)},hi.prototype.getRoot=function(){return this},hi.prototype.createGradient=function(t){var e,s,i=this.gradients,o=pe(t),r=Ux[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new w.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o}()),(e=new w.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},hi.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},hi.prototype.size=function(){var t=this.options;return new E(0,0,t.width,t.height)},i(e=hi,{width:600,height:400,background:a,border:{color:Z,width:0},margin:P(5),zIndex:-2});const Nx=e;function pi(t){qe.call(this,t),this._initDirection()}(qe=R)&&(pi.__proto__=qe),((pi.prototype=Object.create(qe&&qe.prototype)).constructor=pi).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=gt,this.elementSizeField=ot,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=ot,this.elementSizeField=gt,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},pi.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},pi.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,h=s.length,p=e[o+1]+this.alignStart(a,e[n]());if(h){for(var l=p,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=e[i+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[n],u.groupSize),_=new E;_[o+1]=x,_[o+2]=x+m[n],_[i+1]=f,_[i+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}e[o+1]=p,e[o+2]=p+a,e[i+2]=e[i+1]+t}},pi.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===A||o===k?i=e-t:o===b&&(i=(e-t)/2),i},pi.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=M(e[o]()),h=i.length,p=[],l=0,c=0,u=0,d=0,f=[],g=0;g<h;g++){var y=i[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&M(c+n+v[o])>a&&(p.push({groupElements:f,groupSize:l,groupElementsSize:c}),d=Math.max(d,c),u+=s+l,c=l=0,f=[]),l=Math.max(l,v[r]),0<c&&(c+=n),c+=v[o],f.push(y)}return p.push({groupElements:f,groupSize:l,groupElementsSize:c}),{groups:p,groupsSize:u+=l,maxGroupElementsSize:d=Math.max(d,c)}},pi.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},pi.prototype.createVisual=function(){},i(o=pi,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const Gx=o;var li,ci=w.drawing.Text,e;function ui(t,e){li.call(this,e),this.content=t,this.reflow(new E)}(li=R)&&(ui.__proto__=li),((ui.prototype=Object.create(li&&li.prototype)).constructor=ui).prototype.reflow=function(t){var e=this.options,e=e.size=w.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new E(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},ui.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,t=t.paintOrder;this.visual=new ci(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:t})},i(e=ui,{font:t,color:Z});const Wx=e;function di(t){var e=t.origin,t=t.bottomRight();return new E(e.x,e.y,t.x,t.y)}var fi,gi=/\n/m,yi,o,vi,e,mi,o;function xi(t,e,i){fi.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new E)}(fi=Fx)&&(xi.__proto__=fi),((xi.prototype=Object.create(fi&&fi.prototype)).constructor=xi).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(gi),i=new Gx({vertical:!0,align:t.align,wrap:!1}),o=x({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new Wx(e[r].trim(),o);i.append(n)}},xi.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=di(o.clippedBBox()||new w.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(fi.prototype.reflow.call(this,t),i.rotation&&(o=P(i.margin),e=this.box.unpad(o),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(o.left-o.right,o.top-o.bottom),this.rotatedBox=e.clone(),e.pad(o)))},xi.prototype.createVisual=function(){var t=this.options;this.visual=new w.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=w.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},xi.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!T(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):fi.prototype.renderVisual.call(this))},xi.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},xi.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},xi.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},xi.prototype.rotationTransform=function(){var t,e,i,o=this.options.rotation;return o?(t=(e=this.normalBox.center()).x,e=e.y,i=this.rotatedBox.center(),w.geometry.transform().translate(i.x-t,i.y-e).rotate(o,[t,e])):null};const Xx=xi;function _i(t){yi.call(this,t),this._textBox=new Xx(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function bi(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(P(o.options.margin),{bottom:0}),i.options.margin=Object.assign(P(i.options.margin),{top:0})}}(yi=R)&&(_i.__proto__=yi),((_i.prototype=Object.create(yi&&yi.prototype)).constructor=_i).prototype.reflow=function(t){yi.prototype.reflow.call(this,t),this.box.snapTo(t,y)},_i.buildTitle=function(t,e){var i,t="string"==typeof t?{text:t}:t;return i=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new _i(t):i},_i.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==k}),t=t.filter(function(t){return t&&t.options.position===k});return bi(e),bi(t),t.reverse(),e.concat(t)},i(o=_i,{color:Z,position:C,align:b,margin:P(5),padding:P(5)});const Yx=o;function wi(t,e,i,o,r){vi.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new E)}(vi=Xx)&&(wi.__proto__=vi),((wi.prototype=Object.create(vi&&vi.prototype)).constructor=wi).prototype.visualContext=function(t){t=vi.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},wi.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:se(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},wi.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=di(t.bbox(e.matrix()))):vi.prototype.rotate.call(this),this.box},wi.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return vi.prototype.rotationTransform.call(this);var i=w.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||C,n=t===C||t===k?y:v,s=t===C||t===k?v:y,t=t===C||t===S?r.origin:r.bottomRight(),a=o.topLeft().transformCopy(i),h=o.topRight().transformCopy(i),p=o.bottomRight().transformCopy(i),o=o.bottomLeft().transformCopy(i),i=w.geometry.Rect.fromPoints(a,h,p,o),l={};l[s]=r.origin[s]-i.origin[s];var c,i=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(h[s]+l[s]-t[s]),s=M(i,tt)===M(t,tt)?(c=a,h):t<i?(c=h,p):(c=a,o),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,w.geometry.transform().translate(l.x,l.y).rotate(e)},i(e=wi,{_autoReflow:!1});const qx=e;function ki(t,e,i){mi.call(this,e),this.fields=t,this.chartService=i,this.render()}(mi=Fx)&&(ki.__proto__=mi),((ki.prototype=Object.create(mi&&mi.prototype)).constructor=ki).prototype.hide=function(){this.options.visible=!1},ki.prototype.show=function(){this.options.visible=!0},ki.prototype.render=function(){var t,e,i,o,r,n,s,a,h=this,p=this.options;p.visible&&(i=p.label,p=p.icon,o=new E,r=function(){return h},n=p.size,s=this.fields.text,T(i)&&i.visible&&((a=jt(i))?s=a(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color=i.position===rt?"#fff":p.background),this.label=new Xx(s,x({},i)),this.label.aliasFor=r,i.position!==rt||T(n)||(p.type===Q?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),p.width=t||n||7,p.height=e||n||7,(a=new Hx(x({},p))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new E),this.wrapperBox=o.wrap(a.box))},ki.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),p=r.line.length,l=r.position;r.visible&&(u(l,[S,A])?l===S?(o=a.alignTo(t,l).translate(-p,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[o.x2,h.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(p,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[o.x1,h.y]],i=o.clone().wrapPoint(e))):l===k?(o=a.alignTo(t,l).translate(t.center().x-a.center().x,p),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(t.center().x-a.center().x,-p),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s)&&(r.label.position===lt&&n.box.alignTo(s.box,l),n.reflow(n.box)),this.contentBox=o,this.targetBox=t,this.box=i||o)},ki.prototype.createVisual=function(){mi.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},ki.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):mi.prototype.renderVisual.call(this)},ki.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(wt(t=w.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},ki.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},ki.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},ki.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},ki.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:se(t),text:T(e.label)?e.label.text:"",visual:this.visual})},i(o=ki,{icon:{visible:!0,type:Q},label:{position:rt,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:C,zIndex:2});const Zx=o;function Si(){}var Ai={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},e={implementation:{configurable:!0}};Si.register=function(t){Ai=t},e.implementation.get=function(){return Ai},Object.defineProperties(Si,e);const Qx=Si;function Ci(t){this._intlService=t}var Pi=/\{(\d+)(:[^\}]+)?\}/g,o,Ti,o;(o={intl:{configurable:!0}}).intl.get=function(){return this._intlService||Qx.implementation},o.intl.set=function(t){this._intlService=t},Ci.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return St(t)&&t.match(it)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},Ci.prototype.localeAuto=function(t,o,r){var n=this.intl;return St(t)&&t.match(it)?t.replace(Pi,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(Ci.prototype,o);const Kx=Ci;function Mi(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Kx(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}(e={intl:{configurable:!0}}).intl.get=function(){return this._intlService||Qx.implementation},e.intl.set=function(t){this._intlService=t,this.format.intl=t},Mi.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Mi.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Mi.prototype,e);const $x=Mi;function Oi(){}Oi.register=function(t){D=t},Oi.create=function(t,e){if(D)return D.create(t,e)};const Jx=Oi;function Ii(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new w.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),wt(n),n}function Bi(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new w.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),wt(e),e}function r(t,e){void 0===e&&(e=new $x),Ti.call(this,t),this.chartService=e,this.options.visible||(this.options=x({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==ht},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==ht},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}(Ti=R)&&(r.__proto__=Ti),((r.prototype=Object.create(Ti&&Ti.prototype)).constructor=r).prototype.initFields=function(){},r.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},r.prototype.normalizeLabelRotation=function(t){var e=t.rotation;Bt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},r.prototype.createLabels=function(){var t=this.options,e=t.vertical?A:b,i=x({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},s=this.createAxisLabel(n,i,s);s&&(this.append(s),this.labels.push(s))}}},r.prototype.clearLabels=function(){this.children=Nt(this.children,function(t){return!(t instanceof qx)}),this.labels=[]},r.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Nt(this.children,function(t){return t!==e.title}),this.title=void 0)},r.prototype.clear=function(){this.clearLabels(),this.clearTitle()},r.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new E(r,e.y1,r,e.y2-t):new E(e.x1,o,e.x2-t,o)},r.prototype.createTitle=function(){var t=this.options,t=x({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Xx(t.text,t),this.append(t),this.title=t)},r.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=x({},e,i[o]),r=(r.value=this.parseNoteValue(r.value),new Zx({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(T(r.options.position)?t.vertical&&!u(r.options.position,[S,A])?r.options.position=t.reverse?S:A:t.vertical||u(r.options.position,[C,k])||(r.options.position=t.reverse?k:C):t.vertical?r.options.position=t.reverse?S:A:r.options.position=t.reverse?k:C,this.append(r),this.notes.push(r))}},r.prototype.parseNoteValue=function(t){return t},r.prototype.renderVisual=function(){Ti.prototype.renderVisual.call(this),this.createPlotBands()},r.prototype.createVisual=function(){Ti.prototype.createVisual.call(this),this.createBackground(),this.createLine()},r.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new w.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},r.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),h=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,p={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)T(i)&&n%i==0||(p.tickX=h?a.x2:a.x2-e.size,p.tickY=h?a.y1-e.size:a.y1,p.position=t[n],s.append(Ii(p,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},r.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new w.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&wt(e),(i=this._lineGroup=new w.drawing.Group).append(e),this.visual.append(i),this.createTicks(i))},r.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},r.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=w.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},r.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new w.drawing.Group({zIndex:-1}),s=Nt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var h=i[a],p=void 0,l=void 0,c=h.label,u=void 0,l=o?(p=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(p=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,h,new E(p.x1,l.y1,p.x2,l.y2))),0!==p.width()&&0!==l.height()&&(c=new w.geometry.Rect([p.x1,l.y1],[p.width(),l.height()]),p=w.drawing.Path.fromRect(c,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(p),u)&&n.append(u)}this.appendVisual(n)}},r.prototype.createPlotBandLabel=function(t,e,i){var o,r;return!1===t.visible?null:(o=t.text,T(t)&&t.visible&&((r=jt(t))?o=r({text:o,item:e}):t.format&&(o=this.chartService.format.auto(t.format,o)),t.color||(t.color=this.options.labels.color)),(r=new Xx(o,t)).reflow(i),r.renderVisual(),r.visual)},r.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],p={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=M(t[n]);u(s,l)||n%i==0||a&&h===s||(p.position=s,c.append(Bi(p,e)),l.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},r.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?gt:ot,o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,h=((this.getRoot()||{}).box||t)[s](),p=0,l=0;l<n;l++){var c=i[l].box[s]();c+a<=h&&(p=Math.max(p,c))}this.box=r?new E(t.x1,t.y1,t.x1+p+a,t.y2):new E(t.x1,t.y1,t.x2,t.y1+p+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},r.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},r.prototype.labelTickIndex=function(t){return t.index},r.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),p=o?a.box.height():a.box.width(),l=n[h],h=n[h+1],c=void 0,u=void 0,u=o?c=i?l+(h-l)/2-p/2:l-p/2:i?(c=l,h):(c=l-p/2)+p;this.positionLabel(a,r,c,u)}},r.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=S):(n-=r+t.box.width(),t.options.rotationOrigin=A),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=k):(n+=r,t.options.rotationOrigin=C),new E(i,n,o,n+t.box.height()));t.reflow(s)},r.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},r.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(o=0!==s?s:o))break}if(0!==o){for(var a=0;a<e.length;a++)e[a].options.rotation=o,e[a].reflow(new E);return!0}},r.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=i?A:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?C:k),e.reflow(this.box))},r.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;T(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},r.prototype.noteSlot=function(t){return this.getSlot(t)},r.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,i=e?v:y;this.box.snapTo(t,i),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[i+1]-=this.lineBox()[i+1]-t[i+1],this.box[i+2]-=this.lineBox()[i+2]-t[i+2]},r.prototype.axisLabelText=function(t,e,i){function o(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=jt(e);return n?n(Object.assign({},i,{get text(){return o()},value:t,format:e.format,culture:e.culture})):o()},r.prototype.slot=function(t,e,i){t=this.getSlot(t,e,i);if(t)return t.toRect()},r.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),i[e+1]-=t.start,i[e+2]+=t.end):(o[0].options.visible&&i.wrap(o[0].box),(e=o[o.length-1]).options.visible&&i.wrap(e.box))),i},r.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,h=0,p=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;i?(d=o[u+s],f=o[u+a]):d=f=o[u],h=Math.max(h,d-c.box[r+1]),p=Math.max(p,c.box[r+2]-f)}return{start:h,end:p}},r.prototype.limitRange=function(t,e,i,o,r){var n,s,a=this.options;return t<i&&r<0&&(!T(a.min)||a.min<=i)||o<e&&0<r&&(!T(a.max)||o<=a.max)?null:e<i&&0<r||o<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<i&&r<0?(n=_(t,i,o),s=_(t+a,i+a,o)):o<e&&0<r&&(s=_(e,i,o),n=_(e-a,i,o-a)),{min:n,max:s})},r.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},r.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},r.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),t=t?v:y,o=this.lineDir(),r=t+(1===o?1:2).toString();return{axis:t,axisOrigin:r,axisDir:o,lineBox:e,lineSize:i,lineStart:e[r]}},r.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<o?t[i]-n[r]:n[r]-t[i])/e},r.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},r.prototype.labelsBetweenTicks=function(){return!this.options.justified},r.prototype.prepareUserOptions=function(){},i(o=r,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Z,visible:!0},title:{visible:!0,position:b},majorTicks:{align:lt,size:4,skip:0,step:1},minorTicks:{align:lt,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:lt,minorTickType:ht,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Z,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const t_=o;var Li="milliseconds",Ei="seconds",Ri="minutes",Vi="hours",zi="days",ji="weeks",Di="months",Fi="years",Hi=1e3,Ui=60*Hi,Ni=60*Ui,Gi=24*Ni,Wi=7*Gi,Xi=31*Gi,Yi=365*Gi,qi={years:Yi,months:Xi,weeks:Wi,days:Gi,hours:Ni,minutes:Ui,seconds:Hi,milliseconds:1},Zi,e;function Qi(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ui}function Ki(t,e){return new Date(t.getTime()+e)}function $i(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Ji(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function to(t,e,i,r){var o,n,s,a=t;return t&&(o=(t=$i(t)).getHours(),i===Fi?Ji(a=new Date(t.getFullYear()+e,0,1),0):i===Di?Ji(a=new Date(t.getFullYear(),t.getMonth()+e,1),o):i===ji?Ji(a=to(function(t,e){void 0===r&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return Ki(t,-i*Gi)}(t,r),7*e,zi),o):i===zi?Ji(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),o):i===Vi?(o=t,n=e,(s=new Date(o)).setMinutes(0,0,0),o=(o.getTimezoneOffset()-s.getTimezoneOffset())*Ui,a=Ki(s,o+n*Ni)):i===Ri?0<(a=Ki(t,e*Ui)).getSeconds()&&a.setSeconds(0):i===Ei?a=Ki(t,e*Hi):i===Li&&(a=Ki(t,e)),i!==Li)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function eo(t,e,i){return to($i(t),0,e,i)}function io(t,e,i){t=$i(t);return t&&eo(t,e,i).getTime()===t.getTime()?t:to(t,1,e,i)}function oo(t,e){return t&&e?t.getTime()-e.getTime():-1}function ro(t,e){return t.getTime()-e}function no(t){if(mt(t)){for(var e=[],i=0;i<t.length;i++)e.push(no(t[i]));return e}if(t)return $i(t).getTime()}function so(t,e){return t&&e?no(t)===no(e):t===e}function ao(t,e,i){return Qi(t,e)/qi[i]}function ho(t,e,i,o){var t=$i(t),r=$i(e);return(i===Di?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+ao(t,new Date(t.getFullYear(),t.getMonth()),zi)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():i===Fi?t.getFullYear()-r.getFullYear()+ho(t,new Date(t.getFullYear(),0),Di,1)/12:i===zi||i===ji?ao(t,r,i):ro(t,e)/qi[i])/o}function po(t,e,i){return i===Fi?e.getFullYear()-t.getFullYear():i===Di?12*po(t,e,Fi)+e.getMonth()-t.getMonth():i===zi?Math.floor(ro(e,t)/Gi):Math.floor(ro(e,t)/qi[i])}function lo(t,e){return St(e)&&t.parseDate(e)||$i(e)}function co(t,e){if(mt(e)){for(var i=[],o=0;o<e.length;o++)i.push(lo(t,e[o]));return i}return lo(t,e)}function uo(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}function n(){Zi.apply(this,arguments)}(Zi=t_)&&(n.__proto__=Zi),((n.prototype=Object.create(Zi&&Zi.prototype)).constructor=n).prototype.initFields=function(){this._ticks={}},n.prototype.categoriesHash=function(){return""},n.prototype.clone=function(){var t=new n(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},n.prototype.initUserOptions=function(t){var e=t.categories||[],i=T(t.min),o=T(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,o=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,o)),t},n.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},n.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},n.prototype.roundedRange=function(){return this.range()},n.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},n.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(t-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:t}},n.prototype.arrangeLabels=function(){Zi.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;0<r.length&&(e=o[(t=this.options.vertical?v:y)+1],o=o[t+2],i=r[0],r=he(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),r.box[t+1]>o||r.box[t+2]<e)&&(r.options.visible=!1)},n.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},n.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},n.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},n.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,e=e.max,o=Math.ceil(e),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},n.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,e=e.reverse,o=this.scaleOptions(),r=o.scale,n=o.box,s=o.min,a=n[(i?v:y)+(e?2:1)],h=this.tickIndices(t),p=[],l=0;l<h.length;l++)p.push(a+M(r*(h[l]-s),K));return p},n.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},n.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?v:y,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},n.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,i=this.lineBox(),o=e?i.height():i.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:i,lineSize:o,lineStart:i[r]}},n.prototype.lineDir=function(){return this.options.reverse?-1:1},n.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,o=o.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,h=this.lineInfo(),p=h.axis,h=h.lineStart,l=a.clone(),c=!T(e),t=O(t,0),e=O(e,t),e=Math.max(e-1,t),u=h+(t-n)*s,h=h+(Math.max(t,e)+1-n)*s;return c&&o&&(h=u),i&&(u=_(u,a[p+1],a[p+2]),h=_(h,a[p+1],a[p+2])),l[p+1]=r?h:u,l[p+2]=r?u:h,l},n.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,i=this.lineBox(),o=t.clone();return o[e+1]=_(t[e+1],i[e+1],i[e+2]),o[e+2]=_(t[e+2],i[e+1],i[e+2]),o},n.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=o),Zi.prototype.slot.call(this,t,e,i)},n.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,h=s[e+1],s=s[e+2],t=t[e];return t<h||s<t?null:(s=(e=(i?r:a)+(t-h)/n)%1,o?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e))},n.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},n.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},n.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},n.prototype.categoriesCount=function(){return(this.options.categories||[]).length},n.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,t=M(t/(i/e),tt);return{min:t,max:e+t}},n.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),o=i.max-i.min,t=this.scaleToDelta(t,o),o=i.min+e*t,i=i.max-(1-e)*t;return{min:o,max:i=i-o<.1?o+.1:i}},n.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,i=i.max,t=this.scaleRange(t,e);return{min:_(t.min,o,i),max:_(t.max,o,i)}},n.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},n.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,o=o.max,n=Math.floor(r),o=e?(r=Math.ceil(r),Math.floor(o)):(r=Math.floor(r),Math.ceil(o));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-n,max:(t.categories.length?o+(e?1:0):0)-n}},n.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,o=O(o.categories[t],""),i=(i.dataItem=r,this.axisLabelText(o,e,i));return new qx(o,i,t,r,e)},n.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},n.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},n.prototype.arrangeNotes=function(){Zi.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},n.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?v:y,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},n.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,t=M(t/i,tt),i=this.totalRange(),o=e.min+t,e=e.max+t;return this.limitRange(o,e,0,i.max,t)},n.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,i=i.vertical?v:y,r=this.limitedRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[i+(o?2:1)],o=t[i]-n,t=e[i]-n,e=r.min+o/s,i=r.min+t/s,n=Math.min(e,i),o=Math.max(e,i);if(.01<=o-n)return{min:n,max:o}},n.prototype.valueRange=function(){return this.range()},n.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var i=t,o=e.srcCategories;if(i instanceof Date){for(var r=o.length,n=0;n<r;n++)if(so(o[n],i))return n;return-1}return o.indexOf(i)},n.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},n.prototype.limitedRangeIndices=function(t){var e=this.options,i=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=_(i,0,t.max),e=_(e,0,t.max)),{min:i,max:e}},n.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},n.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new Ox,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},n.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},i(e=n,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:Z},labels:{zIndex:1},justified:!1,_deferLabels:!0});const e_=e;var o={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"},fo=[Li,Ei,Ri,Vi,zi,ji,Di,Fi],go="fit",yo,e;function vo(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=be(t)).min=$i(e.min),e.max=$i(e.max)),e}function mo(t){this.options=t}function xo(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o,r=i.roundToBaseUnit,n=i.justified,s=(this.start=to(t,0,i.baseUnit,i.weekStartDay),this.roundToTotalStep(e)),a=!n&&so(e,s)&&!i.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),i.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=i.max)?(o=!n&&so(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,o),this.displayEnd=r?this.roundToTotalStep(t,!n):i.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function _o(t,e,i){for(var o,r,n,s=vo(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,p=t.maxDateGroups,l=t.baseUnit===go,c=e?fo.indexOf(e):0,u=l?fo[c++]:t.baseUnit,d=a/qi[u],f=d;!r||p<=d;){for(o=o||h[u].slice(0);(n=o.shift())&&e===u&&n<i;);if(n)d=f/(r=n);else{if(u===he(fo)){r=Math.ceil(f/p);break}if(!l){p<d&&(r=Math.ceil(f/p));break}u=fo[c++]||he(fo),f=a/qi[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function s(){yo.apply(this,arguments)}mo.prototype.displayIndices=function(){return{min:0,max:1}},mo.prototype.displayRange=function(){return{}},mo.prototype.total=function(){return{}},mo.prototype.valueRange=function(){return{}},mo.prototype.valueIndex=function(){return-1},mo.prototype.values=function(){return[]},mo.prototype.totalIndex=function(){return-1},mo.prototype.valuesCount=function(){return 0},mo.prototype.totalCount=function(){return 0},mo.prototype.dateAt=function(){return null},xo.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},xo.prototype.displayIndices=function(){var t,e,i;return this._indices||(i=(t=this.options).baseUnit,t=t.baseUnitStep,e=ho(this.displayStart,this.valueStart,i,t),i=ho(this.displayEnd,this.valueStart,i,t),this._indices={min:e,max:i}),this._indices},xo.prototype.total=function(){return{min:this.start,max:this.end}},xo.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},xo.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},xo.prototype.valueIndex=function(t){var e=this.options;return Math.floor(ho(t,this.valueStart,e.baseUnit,e.baseUnitStep))},xo.prototype.totalIndex=function(t){var e=this.options;return Math.floor(ho(t,this.start,e.baseUnit,e.baseUnitStep))},xo.prototype.dateIndex=function(t){var e=this.options;return ho(t,this.valueStart,e.baseUnit,e.baseUnitStep)},xo.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},xo.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=to(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},xo.prototype.dateAt=function(t,e){var i=this.options;return to(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},xo.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,o=o.weekStartDay,s=this.start,t=ho(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return i&&(e+=i),to(s,e*n,r,o)},(yo=e_)&&(s.__proto__=yo),((s.prototype=Object.create(yo&&yo.prototype)).constructor=s).prototype.clone=function(){var t=new s(Object.assign({},this.options),this.chartService);return t.createLabels(),t},s.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},s.prototype.initUserOptions=function(t){return t},s.prototype.initFields=function(){yo.prototype.initFields.call(this);var t,e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];r._parsed||((r=co(i,r))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:r,min:lo(i,o.min),max:lo(i,o.max),weekStartDay:uo(o,i)}),e.panning&&e.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=r).length?(i=vo(r,!0),e=o.maxDivisions,r=function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==go&&!u(e,fo)){for(var i=t,o,r,n=i.categories,s=T(n)?n.length:0,a=st,h=0;h<s;h++){var p,l=n[h];l&&o&&0!==(p=Math.abs(Qi(l,o)))&&(r=(a=Math.min(a,p))>=Yi?Fi:Xi-3*Gi<=a?Di:Wi<=a?ji:Gi<=a?zi:Ni<=a?Vi:Ui<=a?Ri:Ei),o=l}i.baseUnit=r||zi}return e!==go&&"auto"!==t.baseUnitStep||_o(t),t}(o),(t=o._forecast)&&(0<t.before&&(i.min=to(i.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(i.max=to(i.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new xo(i.min,i.max,r),e?(t=this.dataRange.displayRange(),_o(r=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:t.min,max:t.max,maxDateGroups:e}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new xo(i.min,i.max,r)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||zi,this.dataRange=this.divisionRange=new mo(o)),this.rangeLabels=[]},s.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return yo.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,h=0;h<n.length;h++)r.push(e.dateIndex(n[h])+s),1!==t&&1<=h&&r.splice(h,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},s.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=oo(t,e.min)&&oo(t,e.max)<=0&&i.length},s.prototype.parseNoteValue=function(t){return lo(this.chartService.intl,t)},s.prototype.noteSlot=function(t){return this.getSlot(t)},s.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=M(t/r,tt);return n.min&&n.max&&(r=Ki(e.min||n.min,t),e=Ki(e.max||n.max,t),n={min:to(r,0,i,o),max:to(e,0,i,o)}),n},s.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},s.prototype.pan=function(t){var e,i,o,r,n;return this.isEmpty()?null:(e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,i=this.dataRange.total(),o=Ki(r,t=M(t/(o/(n-r)),tt)*(e.reverse?-1:1)),r=Ki(n,t),(n=this.limitRange(no(o),no(r),no(i.min),no(i.max),t))?(n.min=$i(n.min),n.max=$i(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},s.prototype.pointsRange=function(t,e){var i,o;return this.isEmpty()?null:(t=yo.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),i=ro(e.max,e.min)/(i.max-i.min),o=this.options,{min:Ki(e.min,t.min*i),max:Ki(e.min,t.max*i),baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep})},s.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===go,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),h=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(o){var p,l,c=i.autoBaseUnitSteps,e=i.maxDateGroups,o=he(c[h])*e*qi[h],u=ro(n,s),d=ro(a,t),f=fo.indexOf(h);if(d<qi[h]&&h!==Li)h=fo[f-1],t=Ki(s,l=(u-(e-1)*(p=he(c[h]))*qi[h])/2),a=Ki(n,-l);else if(o<d&&h!==Fi){var g=0;do{for(h=fo[++f],g=0,l=2*qi[h];p=c[h][g],++g<c[h].length&&l*p<u;);}while(h!==Fi&&l*p<u);0<(l=(l*p-u)/2)&&(t=Ki(s,-l),a=Ki(n,l),t=Ki(t,_(a,r.min,r.max)-a),a=Ki(a,_(t,r.min,r.max)-t))}}return t&&a&&0<ro(a,t)?{min:t,max:a,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},s.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<i.min&&(t.min=i.min),t.max>i.max)&&(t.max=i.max),t},s.prototype.range=function(){return this.dataRange.displayRange()},s.prototype.createLabels=function(){yo.prototype.createLabels.call(this),this.createRangeLabels()},s.prototype.clearLabels=function(){yo.prototype.clearLabels.call(this),this.rangeLabels=[]},s.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),yo.prototype.arrangeLabels.call(this)},s.prototype.arrangeRangeLabels=function(){var t,e,i,o,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(i=n[0])&&(o=e?t.y1-i.box.height()/2:t.x1,this.positionLabel(i,r,o)),i=n[1])&&(o=e?t.y2-i.box.height()/2:t.x2,this.positionLabel(i,r,o))},s.prototype.autoRotateLabels=function(){yo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){yo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},s.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1))}},s.prototype.contentBox=function(){for(var t=yo.prototype.contentBox.call(this),e=this.rangeLabels,i=0;i<e.length;i++){var o=e[i];o.options.visible&&t.wrap(o.box)}return t},s.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,o=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,i.dataItem=o,this.axisLabelText(r,e,i));if(n)return new qx(r,n,t,o,e)},s.prototype.createRangeLabels=function(){var o=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,i=this.options,r=Object.assign({},i.labels,i.rangeLabels,{align:b,zIndex:i.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,i.autoRotateRangeLabels=!0),i=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||i,(i=function(t,e,i){i&&(e=new qx(e,i,t,null,r),o.append(e),o.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),i(1,t,this.axisLabelText(t,r,{index:1,count:2})))},s.prototype.autoRotateRangeLabels=function(){var t,e,o=this,i=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===i.length&&(t=function(t,e,i){e=2*Math.abs(e[i+1]-e[i]),i=o.autoRotateLabelAngle(t.box,e);0!==i&&(t.options.rotation=i,t.reflow(new E))},e=this.getMajorTickPositions(),t(i[0],e,0),t(i[1],e,e.length-2))},s.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},s.prototype.slot=function(t,e,i){var o=this.dataRange,o=(t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e)),this.getSlot(t,e,i));if(o)return o.toRect()},s.prototype.getSlot=function(t,e,i){return typeof t==pt&&(t=this.categoryIndex(t)),typeof e==pt&&(e=this.categoryIndex(e)),yo.prototype.getSlot.call(this,t,e,i)},s.prototype.valueRange=function(){var t=vo(this.options.srcCategories);return{min:$i(t.min),max:$i(t.max)}},s.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},s.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},s.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},s.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},s.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},s.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},s.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalRange=function(){return this.dataRange.total()},s.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalCount=function(){return this.dataRange.totalCount()},s.prototype.isEmpty=function(){return!this.options.srcCategories.length},s.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=vo((t=this.options).srcCategories),new xo(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())},i(e=s,{type:J,labels:{dateFormats:o},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 i_=e;function bo(t,e){return M(Math.floor(t/e)*e,tt)}function wo(t,e){return M(Math.ceil(t/e)*e,tt)}function ko(t){return Math.max(Math.min(t,3e5),-3e5)}var So,Ao=Math.pow(10,1-tt),e,Co,e,Po,o,To,e,Mo,o;function Oo(t,e,i,o){So.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function Io(t,e,i){t=M(Math.abs(t%e),tt);return 0===t||e*(1-i)<t}(So=t_)&&(Oo.__proto__=So),((Oo.prototype=Object.create(So&&So.prototype)).constructor=Oo).prototype.initUserOptions=function(t){a=t.seriesMin,i=t.seriesMax,o=(r=t).narrowRange,e=function(t){if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e}(a),a=function(t,e,i){if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;r=Math.min(0,o-(t-o)/2)}else r=e;return r}(a,i,o),n=Qe(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&Io(e,n,1/3)&&(e-=n),0<a)&&Io(a,n,1/3)&&(a+=n),s.min=bo(e,n),s.max=wo(a,n);var i,o,e,r=s,n=(this.totalOptions=(e=r,{min:T((a=t).min)?Math.min(e.min,a.min):e.min,max:T(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var h=s,p=["min","max"],l=0;l<p.length;l++){var c=p[l];null===h[c]&&(h[c]=void 0)}var u=T(s.min),d=T(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=bo(n.min,s.majorUnit),n.max=wo(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=Qe(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=x(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},Oo.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},Oo.prototype.clone=function(){return new Oo(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Oo.prototype.startValue=function(){return 0},Oo.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Oo.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(M(e/t,K))+1)},Oo.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),h=this.getDivisions(t),p=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&p.push(M(l,K)),l+=a*r;return p},Oo.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Oo.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Oo.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,h=r.lineSize,r=r.lineStart,h=s*(h/(o.max-o.min)),p=O(t,e||0),e=O(e,t||0),t=(i&&(p=_(p,o.min,o.max),e=_(e,o.min,o.max)),Math.min(p,e)-o.min),i=Math.max(p,e)-o.min,p=new E(a.x1,a.y1,a.x1,a.y1);return p[n+1]=ko(r+h*(0<s?t:i)),p[n+2]=ko(r+h*(0<s?i:t)),p},Oo.prototype.getValue=function(t){var e=this.options,i=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:M(e+t*(i-e),tt)},Oo.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=M(t/(n/(r-e)),tt);return{min:e+(t=!i&&!o||i&&o?t:-t),max:r+t,offset:t}},Oo.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Oo.prototype.createAxisLabel=function(t,e,i){var o=this.options,o=M(o.min+t*o.majorUnit,tt),i=this.axisLabelText(o,e,i);return new qx(o,i,t,null,e)},Oo.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Oo.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Oo.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(i,t))return{min:i,max:t}},Oo.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=(1-e)*t,e=M(this.options.min+e*t,tt),t=M(this.options.max-i,tt);return{min:e,max:t=t-e<Ao?e+Ao:t}},Oo.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,t=this.scaleRange(t,e);return{min:_(t.min,i,o),max:_(t.max,i,o),narrowRange:!1}},Oo.prototype.isValidRange=function(t,e){return Ao<e-t},i(e=Oo,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Z},labels:{format:"#.####################"},zIndex:1});const o_=e;function Bo(t,e,i,o){var r,n,s,a,h,p,l,t=$i(t),e=$i(e),c=o.intl,i=i||{},u=(u=t,r=e,n=i=x(i||{},{min:lo(c,i.min),max:lo(c,i.max),axisCrossingValue:co(c,i.axisCrossingValues||i.axisCrossingValue),weekStartDay:uo(i,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Qi(r,u),a=Vi,Yi<=s?a=Fi:Xi<=s?a=Di:Wi<=s?a=ji:Gi<=s&&(a=zi),a):Vi),a=qi[s],h=n.weekStartDay||0,u=eo(no(u)-1,s,h)||$i(r),r=io(no(r)+1,s,h),a=n.majorUnit||wo(Qe(u.getTime(),r.getTime()),a)/a,p=wo(p=po(u,r,s),a)-p,l=Math.floor(p/2),p-=l,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||to(u,-l,s,h),n.max=n.max||to(r,p,s,h),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,i=n,Co.call(this,i,o),this.intlService=c,this.seriesMin=t,this.seriesMax=e,i.weekStartDay||0);this.totalMin=no(eo(no(t)-1,i.baseUnit,u)),this.totalMax=no(io(no(e)+1,i.baseUnit,u))}(Co=t_)&&(Bo.__proto__=Co),((Bo.prototype=Object.create(Co&&Co.prototype)).constructor=Bo).prototype.clone=function(){return new Bo(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Bo.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Bo.prototype.getDivisions=function(t){var e=this.options;return Math.floor(po(e.min,e.max,e.baseUnit)/t+1)},Bo.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/ro(e.max,e.min),h=e.weekStartDay||0,p=[n],l=1;l<s;l++){var c=n+ro(to(e.min,l*t,e.baseUnit,h),e.min)*a*o;p.push(M(c,K))}return p},Bo.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Bo.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Bo.prototype.getSlot=function(t,e,i){return o_.prototype.getSlot.call(this,lo(this.intlService,t),lo(this.intlService,e),i)},Bo.prototype.getValue=function(t){t=o_.prototype.getValue.call(this,t);return null!==t?$i(t):null},Bo.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Bo.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min,r=(0<r&&(s=to(s,r,o.baseUnit,n)),e.dateFormats[o.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,i));return new qx(s,n,t,null,e)},Bo.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,i=o?i.height():i.width(),n=this.range(),i=i/ro(n.max,n.min),n=M(t/i,tt);return{min:Ki(e.min,n=!o&&!r||o&&r?n:-n),max:Ki(e.max,n),offset:n}},Bo.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=oo(t,e.min)&&oo(t,e.max)<=0},Bo.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(no(t.min),no(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:$i(t.min),max:$i(t.max)}},Bo.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);return{min:$i(i),max:$i(t)}},Bo.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=e*t,e=(1-e)*t,t=$i(no(this.options.min)+i),i=$i(no(this.options.max)-e);return{min:t,max:i=i-t<1e3?$i(no(t)+1e3):i}},Bo.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:$i(_(no(t.min),this.totalMin,this.totalMax)),max:$i(_(no(t.max),this.totalMin,this.totalMax))}},i(e=Bo,{type:J,majorGridLines:{visible:!0,width:1,color:Z},labels:{dateFormats:o}});const r_=e;function Lo(t,e,i,o){var r,n,s,a,h,p=x({majorUnit:10,min:t,max:e},i),l=p.majorUnit,c=(c=M(Ro(h=e,u=l),tt)%1,h<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,Ro(h,u)+.2):Math.pow(u,Math.ceil(Ro(h,u)))),u=(h=t,s=(u=p).majorUnit,(a=h)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(Ro(h,s)))),a),d=(h=u,s=c,a=i,r=(d=p).min,n=d.max,T(d.axisCrossingValue)&&d.axisCrossingValue<=0&&Eo(),T(a.max)?a.max<=0&&Eo():n=s,T(a.min)?a.min<=0&&Eo():r=h,{min:r,max:n});p.max=d.max,p.min=d.min,p.minorUnit=i.minorUnit||M(l-1,tt),Po.call(this,p,o),this.totalMin=T(i.min)?Math.min(u,i.min):u,this.totalMax=T(i.max)?Math.max(c,i.max):c,this.logMin=M(Ro(d.min,l),tt),this.logMax=M(Ro(d.max,l),tt),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function Eo(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Ro(t,e){return Math.log(t)/Math.log(e)}(Po=t_)&&(Lo.__proto__=Po),((Lo.prototype=Object.create(Po&&Po.prototype)).constructor=Lo).prototype.clone=function(){return new Lo(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Lo.prototype.startValue=function(){return this.options.min},Lo.prototype.getSlot=function(t,e,i){var o=this.options,r=this.logMin,n=this.logMax,s=o.majorUnit,a=o.min,o=o.max,h=this.lineInfo(),p=h.axis,l=h.axisDir,c=h.lineBox,u=h.lineSize,h=h.lineStart,u=l*(u/(n-r)),n=O(t,e||1),e=O(e,t||1);if(n<=0||e<=0)return null;i&&(n=_(n,a,o),e=_(e,a,o));n=Ro(n,s),e=Ro(e,s),t=Math.min(n,e)-r,i=Math.max(n,e)-r,a=new E(c.x1,c.y1,c.x1,c.y1);return a[p+1]=ko(h+u*(0<l?t:i)),a[p+2]=ko(h+u*(0<l?i:t)),a},Lo.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:M(Math.pow(e,i+s*((o-i)/r)),tt)},Lo.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Lo.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=M(t/(s/(o-i)),tt);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,i+t),max:Math.pow(e,o+t),offset:t}},Lo.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},Lo.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},Lo.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function h(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(Ii(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),o.visible&&this.traverseMinorTicksPositions(h,o),[]},Lo.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){u(t,n)||(r.position=t,s.append(Bi(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},Lo.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(M(o+r*(a-n),tt),e)},Lo.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this.lineInfo(),a=i.lineStart,h=i.step,p=this.logMin,l=this.logMax,c=Math.floor(p);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;o<=f&&t(M(a+h*(Ro(f,s)-p),tt),e)}},Lo.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,o),i=this.axisLabelText(o,e,i);return new qx(o,i,t,null,e)},Lo.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Lo.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Lo.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},Lo.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=Ro(this.options.min,i),r=Ro(this.options.max,i),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-o),o=Math.pow(i,o+e*t),i=Math.pow(i,r-(1-e)*t);return{min:o,max:i=i-o<1e-6?o+1e-6:i}},Lo.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,i=this.totalMax;return{min:_(t.min,e,i),max:_(t.max,e,i)}},Lo.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,e=e.majorUnit,o=Math.pow(e,t);return{value:o,minorStep:(Math.pow(e,t+1)-o)/i}},Lo.prototype.lineInfo=function(){var t=Po.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},i(o=Lo,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Z},zIndex:1,_deferLabels:!0});const n_=o,s_={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),te(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){o=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,o)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new w.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new w.drawing.Path(r);o&&(n.radius=o(t[a])),h.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(h)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,e=this.intervals(e,i,o,r),i=t.options,s=i.visible&&!1!==(i.line||{}).visible;return Qt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};function Vo(){To.apply(this,arguments)}(To=e_)&&(Vo.__proto__=To),((Vo.prototype=Object.create(To&&To.prototype)).constructor=Vo).prototype.range=function(){return{min:0,max:this.options.categories.length}},Vo.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Vo.prototype.lineBox=function(){return this.box},Vo.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new E,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},Vo.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=i||1,p=[],l=e||0;l<s;l+=h)r=n.reverse?360-l*a:l*a,r=M(r,K)%360,o&&u(r,o)||p.push(r);return p},Vo.prototype.majorIntervals=function(){return this.intervals(1)},Vo.prototype.minorIntervals=function(){return this.intervals(.5)},Vo.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},Vo.prototype.majorAngles=function(){var e=this;return Qt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},Vo.prototype.createLine=function(){return[]},Vo.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},Vo.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,e=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,e)},Vo.prototype.radiusCallback=function(e,t,i){var o,r;if(t.options.type!==N)return t=le(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles(),function(t){return!i&&u(t,r)?e:o}},Vo.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new w.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from),a=(r.startAngle+=s*n.angle,Math.ceil(o.to)-o.to),a=(r.angle-=(a+s)*n.angle,Dx.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}}));e.append(a)}this.appendVisual(e)},Vo.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},Vo.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,i=(i.reverse&&!o&&(t=(t+1)%s),n[t=_(Math.floor(t),0,s-1)]),n=(o&&(i-=a/2)<0&&(i+=360),a*(_(Math.ceil(e||t),t,s-1)-t+1));return new zx(r.center(),0,r.height()/2,i,n)},Vo.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,i=e+t.angle;return new w.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:i,radiusX:t.radius,radiusY:t.radius})},Vo.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},i(e=Vo,{startAngle:90,labels:{margin:P(10)},majorGridLines:{visible:!0},justified:!0}),x(e.prototype,s_);const a_=e;function zo(t,e){Mo.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}(Mo=t_)&&(zo.__proto__=Mo),((zo.prototype=Object.create(Mo&&Mo.prototype)).constructor=zo).prototype.getDivisions=function(t){return o_.prototype.getDivisions.call(this,t)-1},zo.prototype.reflow=function(t){this.box=t,this.reflowLabels()},zo.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new E,n=this.intervals(t.majorUnit,o,i),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},zo.prototype.lineBox=function(){return this.box},zo.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,h=e||0;h<n;h+=a){var p=(360+r+h*t)%360;o&&u(p,o)||s.push(p)}return s},zo.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},zo.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},zo.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},zo.prototype.createLine=function(){return[]},zo.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},zo.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,e=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,e)},zo.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},zo.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=_(t,i.min,i.max),e=_(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(i=t,t=e,e=i),new zx(o.center(),0,o.height()/2,t,e-t)},zo.prototype.slot=function(t,e){var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=i.reverse?(s=n,t):(s=360-t,360-n),s=(s+o)%360;return new w.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+o)%360,radiusX:r.radius,radiusY:r.radius})},zo.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,t=t.y-i.y,i=Math.round(ie(Math.atan2(t,o))),t=e.startAngle;return e.reverse||(i*=-1,t*=-1),(i+t+360)%360},zo.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},i(o=zo,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:P(10)},majorGridLines:{color:Z,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(o.prototype,s_,{createPlotBands:a_.prototype.createPlotBands,majorAngles:a_.prototype.majorAngles,range:o_.prototype.range,labelsCount:o_.prototype.labelsCount,createAxisLabel:o_.prototype.createAxisLabel});const h_=o;function jo(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Do,e={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new w.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],h={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new zx(r,r.y-a.y2,r.y-a.y1,0,360),a=e===N?Dx.current.createRing(a,h):w.drawing.Path.fromPoints(this.plotBandPoints(a,o),h).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new w.geometry.Circle(r,t.innerRadius),s=new w.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),te(r,this.renderGridLines(t,i,o,e.minorGridLines))),r},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip,s=(void 0===n&&(n=0),o.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),h=n;h<e.length;h+=s){var p=t.y-e[h];if(0<p){var l=new w.geometry.Circle([t.x,t.y],p);if(o.type===N)a.append(new w.drawing.Circle(l,r));else{for(var c=new w.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(l.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,i,o=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==N&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,i=(ie(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return jo(t,i)-jo(e,i)}),r=90-jo(n[0],n[1])/2,t=180-jo(i,n[0])-r,a=s*(Math.sin(le(t))/Math.sin(le(r)))),this.axisType().prototype.getValue.call(this,new L(o.x1,o.y2-a))}},o,Fo,Ho,Uo,o;function No(){Do.apply(this,arguments)}(Do=o_)&&(No.__proto__=Do),((No.prototype=Object.create(Do&&Do.prototype)).constructor=No).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},No.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},No.prototype.axisType=function(){return Do},x((o=No).prototype,e);const p_=o;function Go(){Fo.apply(this,arguments)}(Fo=n_)&&(Go.__proto__=Fo),((Go.prototype=Object.create(Fo&&Fo.prototype)).constructor=Go).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Go.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Go.prototype.axisType=function(){return Fo},x((o=Go).prototype,e);const l_=o;function Wo(t){return t<=0?-1:1}(Ho=w.Class)&&(Xo.__proto__=Ho),((Xo.prototype=Object.create(Ho&&Ho.prototype)).constructor=Xo).prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),!(r<2||2===r&&e[0].equals(e[1]))){var n,s=e[0],a=e[1],h=e[2];for(i.push(new w.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),he(i).controlOut(this.firstControlPoint(t,s,a,y,v)),i.push(new w.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{o?(s=e[r-1],a=e[0],h=e[1],l=(t=this.controlPoints(s,a,h))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var p,l,c=l,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],h=e[u+2],p=this.controlPoints(s,a,h),he(i).controlOut(c),c=p[1],p=p[0],i.push(new w.geometry.Segment(a,p)));o?(s=e[r-2],a=e[r-1],h=e[0],t=this.controlPoints(s,a,h),he(i).controlOut(c),i.push(new w.geometry.Segment(a,t[0])),he(i).controlOut(t[1]),i.push(new w.geometry.Segment(h,n))):(l=this.tangent(a,h,y,v),he(i).controlOut(c),i.push(new w.geometry.Segment(h,this.secondControlPoint(l,a,h,y,v))))}}return i},Xo.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)},Xo.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},Xo.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||M(o,1)===M(i.y,1)},Xo.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Xo.prototype.controlPoints=function(t,e,i){var o,r=y,n=v,s=!1,a=!1,h=(this.isLine(t,e,i)?o=this.tangent(t,e,y,v):(h={x:this.isMonotonicByField(t,e,i,y),y:this.isMonotonicByField(t,e,i,v)}).x&&h.y?(o=this.tangent(t,i,y,v),s=!0):(this.invertAxis(t,e,i)&&(r=v,n=y),h[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Wo((i[n]-t[n])*(e[r]-t[r])):-Wo((i[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(o,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(o,e,i,r,n));return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,a,o)),[h,a]},Xo.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},Xo.prototype.tangent=function(t,e,i,o){i=e[i]-t[i],e=e[o]-t[o];return 0==i?0:e/i},Xo.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},Xo.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},Xo.prototype.secondControlPoint=function(t,e,i,o,r){var e=e[o],n=i[o],e=.333*(n-e);return this.point(n-e,i[r]-e*t,o,r)},Xo.prototype.point=function(t,e,i,o){var r=new w.geometry.Point;return r[i]=t,r[o]=e,r},Xo.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};const c_=Xo;function Xo(t){Ho.call(this),this.closed=t}function Yo(t){Uo.call(this),this._axis=t,this.options=t.options}(Uo=w.Class)&&(Yo.__proto__=Uo),((Yo.prototype=Object.create(Uo&&Uo.prototype)).constructor=Yo).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Yo.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},Yo.prototype.range=function(){return this._axis.range()},Yo.prototype.valueRange=function(){return this._axis.valueRange()};const u_=Yo;function qo(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new u_(e[i])}function Zo(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Zo.prototype.findAxisByName=function(t){return qo(t,this._pane.axes)};const d_=Zo,f_=((F=w.Class)&&(Qo.__proto__=F),(Qo.prototype=Object.create(F&&F.prototype)).constructor=Qo);function Qo(t){F.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Ko(t){for(var e=t.length,i=0,o=0;o<e;o++)m(t[o])&&i++;return i}var $o={min:function(t){for(var e=t.length,i=st,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.min(i,r))}return i===st?t[0]:i},max:function(t){for(var e=t.length,i=at,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.max(i,r))}return i===at?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];m(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return e=Ko(t)?$o.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&T(r)&&i++}return i},avg:function(t){var e=Ko(t),i=t[0];return i=0<e?$o.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&T(o))return o}return t[0]}},Jo,e;const g_=$o;function tr(t,e){return null===e?e:Ut(t)(e)}function er(){Jo.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}(Jo=w.Class)&&(er.__proto__=Jo),((er.prototype=Object.create(Jo&&Jo.prototype)).constructor=er).prototype.register=function(t,e,i){void 0===e&&(e=[ft]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},er.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},er.prototype.valueFields=function(t){return this._valueFields[t.type]||[ft]},er.prototype.otherFields=function(t){return this._otherFields[t.type]||[ft]},er.prototype.bindPoint=function(t,e,i){var o,r,n,s,a=t.data,i=T(i)?i:a[e],a={valueFields:{value:i}},e=this.valueFields(t),h=this._otherFields[t.type];return null===i?o=this._nullValue[t.type]:T(i)?Array.isArray(i)?(r=i.slice(e.length),o=this._bindFromArray(i,e),r=this._bindFromArray(r,h)):"object"==typeof i&&(n=this.sourceFields(t,e),s=this.sourceFields(t,h),o=this._bindFromObject(i,e,n),r=this._bindFromObject(i,h,s)):o=this._undefinedValue[t.type],T(o)&&(1===e.length?a.valueFields.value=o[e[0]]:a.valueFields=o),a.fields=r||{},a},er.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},er.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},er.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=tr(a,t))}return o},er.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===ft?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},(e=er).current=new e;const y_=e;var ir,or=/percent(?:\w*)\((\d+)\)/,rr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");function nr(t,e,i){ir.call(this),this.initGlobalRanges(t,e,i)}(ir=w.Class)&&(nr.__proto__=ir),((nr.prototype=Object.create(ir&&ir.prototype)).constructor=nr).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,h=rr.exec(t);h?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),h=h[1]?parseFloat(h[1]):1,n={low:o.value-r*h,high:o.value+r*h},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},nr.prototype.createValueGetter=function(t,e){var i,o=t.data,r=y_.current,n=r.valueFields(t),o=T(o[0])?o[0]:{};return mt(o)?i=Ut("["+(e?n.indexOf(e):0)+"]"):m(o)?i=Ut():typeof o==pt&&(i=Ut(r.sourceFields(t,n)[n.indexOf(e)])),i},nr.prototype.getErrorRange=function(t,e){var i;if(!T(e))return null;if(this.globalRange)return this.globalRange(t);if(mt(e))o=t-e[0],r=t+e[1];else if(m(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=or.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(i[1])/100),o=t-Math.abs(e),r=t+Math.abs(e)}return{low:o,high:r}},nr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},nr.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},nr.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(i+=n,o++)}return{value:i/o,count:o}};const v_=nr;var sr,ar,o=w.support.browser||{},hr=600,pr="fadeIn",lr=o.msie?.001:0,cr="errorLow",ur="errorHigh",dr="zero",fr="interpolate",gr="above",yr="below",vr="smooth",mr="step",xr="area",_r="bar",br="boxPlot",wr="bubble",kr="bullet",Sr="candlestick",Ar="column",Cr="donut",Pr="funnel",Tr="pyramid",Mr="heatmap",Or="horizontalWaterfall",Ir="line",Br="ohlc",Lr="pie",Er="polarArea",Rr="polarLine",Vr="polarScatter",zr="radarArea",jr="radarColumn",Dr="radarLine",Fr="rangeArea",Hr="rangeBar",Ur="rangeColumn",Nr="scatter",Gr="scatterLine",Wr="verticalArea",Xr="verticalBoxPlot",Yr="verticalBullet",qr="verticalLine",Zr="verticalRangeArea",Qr="waterfall",Kr=[_r,Ar,Br,Sr,br,Xr,kr,Ur,Hr,Qr,Or],e,o,$r,Jr,tn,h,en=[e="exponentialTrendline",o="linearTrendline",$r="logarithmicTrendline",Jr="movingAverageTrendline",tn="polynomialTrendline",h="powerTrendline"],on="legendItemClick",rn="seriesClick",nn="seriesHover",sn="seriesOver",an="seriesLeave",hn="plotAreaHover",pn="plotAreaLeave",ln="drag",cn="dragEnd",un="dragStart",dn="zoomStart",fn="zoom",gn="zoomEnd",yn="selectStart",vn="select",mn="selectEnd",xn="showTooltip",_n="hideTooltip",e="graphics-symbol",o="k-chart-point",$r="Point",bn="log",Jr="category",wn="insideEnd",kn="outsideEnd",Sn="wheel",tn="drilldown",h;function An(t,e,i,o,r,n){sr.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}(sr=R)&&(An.__proto__=sr),((An.prototype=Object.create(sr&&sr.prototype)).constructor=An).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,o),s=o?n.x:n.y,a=s-t,s=s+t;o?(e=[new L(n.x,r.y1),new L(n.x,r.y2)],i&&e.push(new L(a,r.y1),new L(s,r.y1),new L(a,r.y2),new L(s,r.y2)),this.box=new E(a,r.y1,s,r.y2)):(e=[new L(r.x1,n.y),new L(r.x2,n.y)],i&&e.push(new L(r.x1,a),new L(r.x1,s),new L(r.x2,a),new L(r.x2,s)),this.box=new E(r.x1,a,r.x2,s)),this.linePoints=e},An.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},An.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},An.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};sr.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new w.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);wt(r),this.visual.append(r)}},i(h=An,{animation:{type:pr,delay:hr},endCaps:!0,line:{width:2},zIndex:1});const m_=h;function Cn(){ar.apply(this,arguments)}(ar=m_)&&(Cn.__proto__=ar),((Cn.prototype=Object.create(ar&&ar.prototype)).constructor=Cn).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const x_=Cn;function Pn(t){for(var e=0;e<t.length;e++)if(T(t[e].zIndex))return!0}function Tn(t,e){null!==e&&t.push(e)}function Mn(t){return Ko(t)===t.length}function On(t,e,i){var e=e.visible;return T(e)?e:(e=t.pointVisibility)?e[i]:void 0}function In(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=y_.current.bindPoint(t,n),a=s.valueFields.value;m(a=St(a)?parseFloat(a):a)?(s.visible=!1!==On(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function Bn(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function Ln(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var En=5;function Rn(t,e,i,o){void 0===o&&(o=!1);var r,n,s=(i=void 0===i?{}:i).defaults=i.defaults||{},a=i.depth=i.depth||0,h=!1;if(i.excluded=i.excluded||[],En<a)return null;for(r in t)!u(r,i.excluded)&&Le(t,r)&&(Mt(n=t[r])?(h=!0,o||(t[r]=O(n(e),s[r]))):Bt(n)&&(o||(i.defaults=s[r]),i.depth++,h=Rn(n,e,i,o)||h,i.depth--));return h}function Vn(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,o)&&i.push(n)}return i}var zn=new WeakMap;function jn(t,e,i){var o;return null===e||"object"!=typeof e?lo(i,t):((o=zn.get(e))||(o=lo(i,t),zn.set(e,o)),o)}function Dn(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function Fn(t){return T(t)&&null!==t}function Hn(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ln(t,J)}function Un(t){return 1===t.length?t[0]:t}var Nn=/area/i,Gn,h,Wn,h,Xn,h;function Yn(t,e){var i,o=y_.current.bindPoint(t,null,e).valueFields;for(i in o)if(At(o[i]))return!0}function qn(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,p=t.series,l=o;h(l+=r)&&(e=Yn(p,(i=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return i}function Zn(t,e,i,o,r){var n,s,a,h,p=e.min,e=e.max,l=0<p&&p<i,c=e+1<i;(l||c)&&(((h=t).missingValues||(Nn.test(h.type)||h.stack?dr:fr))!==fr?(l&&(n=o(p-1)),c&&(s=o(e+1))):(l&&(n=Yn(t,(a=o(p-1)).item)?a:qn({start:p,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Yn(t,(a=o(e+1)).item)?a:qn({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function Qn(t,e){Gn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}(Gn=R)&&(Qn.__proto__=Gn),((Qn.prototype=Object.create(Gn&&Gn.prototype)).constructor=Qn).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Qn.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=x({},i,{vertical:!this.options.invertAxes},t)),o},Qn.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,h=i[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||m(h.value)&&(r+=Math.abs(h.value),o.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},Qn.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=T(t.series.stack)?t.series.stack:this.options.defaultStack,h=function(t){return!0===t||typeof t==pt&&!t.group};if(a)for(var p=0;p<i.length;p++){var l=i[p];if(t===l)break;var c=T(l.series.stack)?l.series.stack:this.options.defaultStack;!c||typeof a===dt&&a!==c||h(a)&&!h(c)||a.group&&a.group!==c.group||!(0<=(c=this.plotValue(l))&&r||c<0&&!r)||0!==e&&0===c||(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=t.series,u=this.seriesValueAxis(u),u=this.categoryAxisCrossingValue(u);return[u,At(t.value)?t.value:u]},Qn.prototype.stackLimits=function(t,e){for(var i=st,o=at,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],T(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},Qn.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,h=o[a];h||(h=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(h.min=Math.min(h.min,be(n.negative).min)),n.positive.length)&&(h.max=Math.max(h.max,be(n.positive).max)),h.min!==st||h.max!==at?o[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},Qn.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,h=e.fields[cr],e=e.fields[ur];m(h)&&m(e)?o={low:h,high:e}:a&&T(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new v_(a.value,n,ft),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},Qn.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(this.updateRange({value:s},i={categoryIx:e,series:n}),this.updateRange({value:a},i)),new x_(s,a,o,this,n,r));t.errorBars=[e],t.append(e)},Qn.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,t=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:o,high:t}},Qn.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i],s=(n||(this.categoryPoints[i]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,T(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},Qn.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,i=i.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},a=this._evalSeries[i],i=(T(a)||(this._evalSeries[i]=a=Rn(t,{},s,!0)),t);return a&&Rn(i=x({},i),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},s),i},Qn.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,i=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((i=this.valueAxisRanges[e]=i||{min:st,max:at}).min=Math.min(i.min,t),i.max=Math.max(i.max,t))},Qn.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},Qn.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],h=this.points,p=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var i,o=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=h[l++],n=a[o];n||(a[o]=n=s.categorySlot(p,o,e)),r&&(o=s.plotRange(r,e.startValue()),(i=s.valueSlot(e,o))?(n=s.pointSlot(n,i),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=o[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},Qn.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Qn.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(he(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},Qn.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Qn.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},Qn.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Qn.prototype.reflowPoint=function(t,e){t.reflow(e)},Qn.prototype.reflowCategories=function(){},Qn.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new E(o.x1,i.y1,o.x2,i.y2)},Qn.prototype.categorySlot=function(t,e){return t.getSlot(e)},Qn.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=Bn(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],h=this.categoryAxis.categoryAt(n);t(this.plotArea.bindPoint(a,n),{category:h,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var p=0;p<o;p++)this._outOfRangeCallback(e[p],"_outOfRangeMaxPoint",p,t)},Qn.prototype._outOfRangeCallback=function(t,e,i,o){var r,e=t[e];e&&(r=e.categoryIx,o(this.plotArea.bindPoint(t,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:i,dataItem:e.item}))},Qn.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Qn.prototype.pointValue=function(t){return t.valueFields.value},i(h=Qn,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const __=h,b_={click:function(t,e){return t.trigger(rn,this.eventArgs(e))},hover:function(t,e){return t.trigger(nn,this.eventArgs(e))},over:function(t,e){return t.trigger(sn,this.eventArgs(e))},out:function(t,e){return t.trigger(an,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:se(t),originalEvent:t,point:this}}},w_={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&T(e)&&null!==e&&(this.note=new Zx({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};function Kn(){for(var t,e="",i=0;i<32;i++)t=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(e+="-"),e+=(12===i?4:16===i?3&t|8:t).toString(16);return e}function $n(t,e){Wn.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Kn()}(Wn=R)&&($n.__proto__=Wn),(($n.prototype=Object.create(Wn&&Wn.prototype)).constructor=$n).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))},$n.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},$n.prototype.createLabelElement=function(t){return new Xx(this.getLabelText(t),x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(t.zIndex,this.series.zIndex)},t),this.pointData())},$n.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},$n.prototype.getAriaLabelText=function(){var t=this.options.labels,e=Dt(t);return e?e(this.pointData()):this.getLabelText(t)},$n.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return T(t.color)||(t.color=new w.Color(e).brightness(.8).toHex()),t},$n.prototype.createVisual=function(){},$n.prototype.createMarker=function(){var t=this.options.markers;return new Hx({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,zIndex:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:x({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},$n.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},$n.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical,r=(this.render(),(this.box=t).clone());if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(o=t.center(),t=new E(o.x,o.y,o.x,o.y)),this.note.reflow(t))},$n.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===gr?C:e)===yr?k:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},$n.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),o=new Hx({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:O(t.border.opacity,1)},opacity:O(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},$n.prototype.highlightVisual=function(){return(this.marker||{}).visual},$n.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,i=this.box.center(),o=new w.geometry.Rect([i.x-e,i.y-e],[r,r])),{options:this.options,rect:o,visual:t}},$n.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.accessibility.highlight,i=t.size+(t.border.width||0),i=new Hx({type:t.type,width:i,height:i,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()},$n.prototype.tooltipAnchor=function(){var t,e,i=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(i))return o=i.x2+5,e=S,i=this.aboveAxis?(t=i.y1,k):(t=i.y2,C),{point:new L(o,t),align:{horizontal:e,vertical:i}}},$n.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},$n.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},$n.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},$n.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},$n.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},$n.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},$n.prototype.getIndex=function(){return T(this.categoryIx)?this.categoryIx:this.pointIx},(h=$n).prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:Q,border:{width:2},opacity:1},labels:{visible:!1,position:gr,margin:P(3),padding:P(4),animation:{type:pr,delay:hr}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:e,className:o,ariaRoleDescription:$r}},x(h.prototype,b_),x(h.prototype,w_);const k_=h;function Jn(t,e,i){Xn.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}(Xn=R)&&(Jn.__proto__=Xn),((Jn.prototype=Object.create(Xn&&Xn.prototype)).constructor=Jn).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Jn.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},Jn.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&&!T(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Jn.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Mt(i)&&o&&(i=o.color),w.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&o.close(),this.visual=o},Jn.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},i(h=Jn,{closed:!1});const S_=h;function ts(t,e,i,o,r){var t=t.box,n=new w.geometry.Point;return n[e]=t[e+i],n[o]=t[o+r],n}var es,is,h={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?y:v,n=o?v:y,s=e?2:1,a=s,h=ts(t[0],r,s,n,a),p=[h],l=1;l<t.length;l++){var c,u=ts(t[l],r,s,n,a);h[r]!==u[r]&&((c=new w.geometry.Point)[r]=h[r],c[n]=u[n],p.push(c,u)),h=u}return i?h!==he(p)&&p.push(h):p.push(ts(he(t),r,s,n,e?1:2)),p}},p;function os(){es.apply(this,arguments)}(es=S_)&&(os.__proto__=es),((os.prototype=Object.create(es&&es.prototype)).constructor=os).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},x((p=os).prototype,h);const A_=p;function rs(){is.apply(this,arguments)}(is=S_)&&(rs.__proto__=is),((rs.prototype=Object.create(is&&is.prototype)).constructor=rs).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Mt(i)&&e&&(i=e.color),new c_(this.options.closed).process(this.points())),i=new w.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,e),this.visual=i};const C_=rs;var ns,p={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),h=a.length,p=[],l=0;l<h;l++){var c=a[l];c?p.push(c):this.seriesMissingValues(s)!==fr&&(1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t)),p=[])}1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?dr:t||fr},getNearestPoint:function(t,e,i){for(var o,r=new L(t,e),n=this.seriesPoints[i],s=st,a=0;a<n.length;a++){var h,p=n[a];p&&T(p.value)&&null!==p.value&&!1!==p.visible&&(h=p.box.center().distanceTo(r))<s&&(o=p,s=h)}return o}},l,ss,as,l,hs,ps,ls,cs,l,us,l,ds,l,fs,l,gs,l,ys,l,vs,l,ms,l,xs,_s,bs,ws,l,ks,l,Ss,l,As,l,Cs,l,Ps,l,Ts,l,Ms,l,Os,c,Is,c,Bs,c;function Ls(){ns.apply(this,arguments)}(ns=w.drawing.Animation)&&(Ls.__proto__=ns),((Ls.prototype=Object.create(ns&&ns.prototype)).constructor=Ls).prototype.setup=function(){this._setEnd(this.options.box.x1)},Ls.prototype.step=function(t){var e=this.options.box;this._setEnd(Xt(e.x1,e.x2,t))},Ls.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},i(l=Ls,{duration:hr}),w.drawing.AnimationFactory.current.register("clip",l);const P_=l,T_={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=w.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new P_(t,{box:e}),Pn(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&T(o.visual.options.zIndex)&&o.visual.clip(t)}}};function Es(){ss.apply(this,arguments)}(ss=__)&&(Es.__proto__=ss),((Es.prototype=Object.create(ss&&ss.prototype)).constructor=Es).prototype.render=function(){ss.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Es.prototype.pointType=function(){return k_},Es.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(!T(n)||null===n){if(r!==dr)return null;n=0}r=this.pointOptions(i,o),r=this.evalPointOptions(r,n,e),o=t.fields.color||i.color,Mt(i.color)&&(o=r.color),e=new k_(n,r);return e.color=o,this.append(e),e},Es.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},Es.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===mr?A_:o===vr?C_:S_)(t,e,i)},Es.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},Es.prototype.supportsPointInactiveOpacity=function(){return!1},x((l=Es).prototype,p,T_);const M_=l;function Rs(t,e,i,o,r){as.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}(as=S_)&&(Rs.__proto__=as),((Rs.prototype=Object.create(as&&as.prototype)).constructor=Rs).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Mt(o)&&e&&(o=e.color),this.visual=new w.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:x({color:o,opacity:t.opacity,lineCap:"butt"},i)})},Rs.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Rs.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Rs.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Rs.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Rs.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new w.geometry.Segment(t)})},Rs.prototype.createStroke=function(t){t=new w.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Rs.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Rs.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment(),r=(o&&(r=this.stackSegments(),te(i,r)),new w.drawing.Path(t));r.segments.push.apply(r.segments,i),!o&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Rs.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(o),o=o.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=he(e).anchor(),o=i?o.x1:o.y1;i?t.lineTo(o,e.y).lineTo(o,r.y):t.lineTo(e.x,o).lineTo(r.x,o)};const O_=Rs;function Vs(){hs.apply(this,arguments)}(hs=O_)&&(Vs.__proto__=hs),((Vs.prototype=Object.create(hs&&hs.prototype)).constructor=Vs).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Vs.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},x((l=Vs).prototype,h);const I_=l;function zs(){ps.apply(this,arguments)}(ps=O_)&&(zs.__proto__=ps),((zs.prototype=Object.create(ps&&ps.prototype)).constructor=zs).prototype.createStrokeSegments=function(){var t=new c_(this.options.closed),e=this.points();return t.process(e)},zs.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new w.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e};const B_=zs;function js(){ls.apply(this,arguments)}(ls=M_)&&(js.__proto__=ls),((js.prototype=Object.create(ls&&ls.prototype)).constructor=js).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===mr?I_:a===vr?B_:O_)(t,e,i,r,n)},js.prototype.reflow=function(t){ls.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},js.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<n;h++){for(var p,l=h+s,c=e,u=void 0;u=o[--c][l],0<c&&!u;);u?(i!==mr&&r<h&&!o[c][l-1]&&a.push(this._previousSegmentPoint(h,l,l-1,c)),a.push(u),i!==mr&&h+1<n&&!o[c][l+1]&&a.push(this._previousSegmentPoint(h,l,l+1,c))):(p=this._createGapStackPoint(h),this._stackPoints.push(p),a.push(p))}return a},js.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},js.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new k_(0,e);return e.categoryIx=t,e.series={},e},js.prototype.seriesMissingValues=function(t){return t.missingValues||dr},js.prototype.supportsPointInactiveOpacity=function(){return!1};const L_=js;function Ds(){cs.call(this),this.axisRanges={}}(cs=w.Class)&&(Ds.__proto__=cs),((Ds.prototype=Object.create(cs&&cs.prototype)).constructor=Ds).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:st,max:at},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},Ds.prototype.reset=function(t){this.axisRanges[t]=void 0},Ds.prototype.query=function(t){return this.axisRanges[t]};const E_=Ds;function Fs(t,e,i){us.call(this,e),this.textBox=new Xx(t,this.options,i),this.append(this.textBox)}(us=R)&&(Fs.__proto__=us),((Fs.prototype=Object.create(us&&us.prototype)).constructor=Fs).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},Fs.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,h=t;n.align=i?b:S,n.vAlign=i?C:b,e.position===wn?i?(n.vAlign=C,!o&&s.height()<t.height()&&(n.vAlign=k)):n.align=o?A:S:e.position===b?(n.vAlign=b,n.align=b):"insideBase"===e.position?i?n.vAlign=o?k:C:n.align=o?S:A:e.position===kn&&(h=i?o?new E(t.x1,t.y1-s.height(),t.x2,t.y1):new E(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=b,o?new E(t.x2,t.y1,t.x2+s.width(),t.y2):new E(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(h.width()-r.contentBox.width())/2:a.top=a.bottom=(h.height()-r.contentBox.height())/2),r.reflow(h)},Fs.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,i=e+"1",e=e+"2",o=this.children[0],r=this.parent.box;(r[i]<t[i]||t[e]<r[e])&&((o=o.paddingBox.clone())[i]=Math.max(r[i],t[i]),o[e]=Math.min(r[e],t[e]),this.reflow(o))},i(l=Fs,{position:kn,margin:P(3),padding:P(4),color:Z,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:pr,delay:hr},zIndex:2});const R_=l,V_={addAccessibilityAttributesToVisual:function(){this._id=this._id||Kn();var t=x({ariaLabel:this.getAriaLabelText()},this.options.accessibility);si(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=Dt(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)}};function Hs(t,e){ds.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=O(this.options.aboveAxis,!0),this.value=t}(ds=R)&&(Hs.__proto__=ds),((Hs.prototype=Object.create(ds&&ds.prototype)).constructor=Hs).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Hs.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Hs.prototype.createLabelElement=function(t){return new R_(this.getLabelText(t),x({vertical:this.options.vertical},t),this.pointData())},Hs.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},Hs.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Hs.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},Hs.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(ds.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),o?(o=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new w.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},Hs.prototype.createRect=function(t){var e=this.options,i=e.border,o=(T(i.opacity)?i:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=w.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}})),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(wt(r),o<1||i<1)&&(r.options.stroke.lineJoin="round"),t.append(r),Dn(e)&&(o=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(o))},Hs.prototype.createHighlight=function(t){return wt(w.drawing.Path.fromRect(this.box.toRect(),t))},Hs.prototype.highlightVisual=function(){return this.rectVisual},Hs.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Hs.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight.border.width;return wt(w.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},Hs.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return e=T(e)?e:new w.Color(t).brightness(i).toHex()},Hs.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=S,p=C;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),p=k)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(p=k,t=s?(h=A,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,h=A),Math.max(n.y1,a.y1))),{point:new L(t,o),align:{horizontal:h,vertical:p}}},Hs.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Hs.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}},Hs.prototype.getIndex=function(){return this.categoryIx},x((l=Hs).prototype,b_),x(l.prototype,w_),x(l.prototype,V_),l.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:e,className:o,ariaRoleDescription:$r}};const z_=l;function Us(t,e){t.forEach(e)}function Ns(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}function Gs(t){fs.call(this,t),this.forEach=t.rtl?Ns:Us}(fs=R)&&(Gs.__proto__=fs),((Gs.prototype=Object.create(fs&&fs.prototype)).constructor=Gs).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+i+r*(n-1),h=(e?o.height():o.width())/a,p=o[s+1]+i/2*h;this.forEach(t,function(t,e){var i=(t.box||o).clone();i[s+1]=p,i[s+2]=p+h,t.reflow(i),e<n-1&&(p+=h*r),p+=h})},i(l=Gs,{vertical:!1,gap:0,spacing:0});const j_=l;function Ws(){gs.apply(this,arguments)}(gs=R)&&(Ws.__proto__=gs),((Ws.prototype=Object.create(gs&&gs.prototype)).constructor=Ws).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new E,n=0;n<o;n++){var s,a=i[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},i(l=Ws,{vertical:!0});const D_=l;function Xs(){ys.apply(this,arguments)}(ys=__)&&(Xs.__proto__=ys),((Xs.prototype=Object.create(ys&&ys.prototype)).constructor=Xs).prototype.render=function(){ys.prototype.render.call(this),this.updateStackRange()},Xs.prototype.pointType=function(){return z_},Xs.prototype.clusterType=function(){return j_},Xs.prototype.stackType=function(){return D_},Xs.prototype.stackLimits=function(t,e){return ys.prototype.stackLimits.call(this,t,e)},Xs.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=T(o.stack)?o.stack:n.defaultStack,h=this.pointValue(t),r=this.pointOptions(o,r),p=r.labels,p=(a&&p.position===kn&&(p.position=wn),r.isStacked=a,t.fields.color||o.color),t=(h<0&&r.negativeColor&&(p=r.negativeColor),r=this.evalPointOptions(r,h,e),Mt(o.color)&&(p=r.color),new(this.pointType())(h,r)),e=(t.color=p,s[i]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(n.isStacked?this.getStackWrap(a,e):e).append(t),t},Xs.prototype.getStackWrap=function(t,e){var i,o=typeof t==pt?t.group||!0:t,r=e.children;if(typeof o===dt||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},Xs.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(i=i.getSlot(e,e,!0),t[(e=o.invertAxes?y:v)+1]=t[e+2]=i[e+1]),t},Xs.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Xs.prototype.createAnimation=function(){this._setAnimationOptions(),ys.prototype.createAnimation.call(this),Pn(this.options.series)&&this._setChildrenAnimation()},Xs.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&T(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},Xs.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new w.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},i(l=Xs,{animation:{type:_r}});const F_=l;function Ys(t,e){vs.call(this,e),this.value=t}(vs=R)&&(Ys.__proto__=vs),((Ys.prototype=Object.create(vs&&vs.prototype)).constructor=Ys).prototype.getLabelText=function(t){return this.formatValue(t.format)},Ys.prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=e.getSlot(i.open,i.close),e=e.getSlot(i.low,i.high),i=(o.x1=e.x1=t.x1,o.x2=e.x2=t.x2,this.realBody=o,e.center().x),t=[];t.push([[i,e.y1],[i,o.y1]]),t.push([[i,o.y2],[i,e.y2]]),this.lines=t,this.box=e.clone().wrap(o),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},Ys.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Ys.prototype.createVisual=function(){vs.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Ys.prototype.mainVisual=function(t){var e=new w.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Ys.prototype.createBody=function(t,e){var i=w.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:O(e.border.opacity,e.opacity)}),wt(i),t.append(i),Dn(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},Ys.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Ys.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:O(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=w.drawing.Path.fromPoints(i[n],r);wt(s),t.append(s)}},Ys.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=T(e)?e:new w.Color(this.color).brightness(t._brightness).toHex()},Ys.prototype.createOverlay=function(){var t=w.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Ys.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(x({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},Ys.prototype.highlightVisual=function(){return this._mainVisual},Ys.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Ys.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new L(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:C}}},Ys.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ys.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Ys.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}},Ys.prototype.getIndex=function(){return this.categoryIx},(l=Ys).prototype.createFocusHighlight=z_.prototype.createFocusHighlight,i(l,{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:e,className:o,ariaRoleDescription:$r}}),x(l.prototype,b_),x(l.prototype,w_),x(l.prototype,V_);const H_=l;function qs(){ms.apply(this,arguments)}(ms=__)&&(qs.__proto__=ms),((qs.prototype=Object.create(ms&&ms.prototype)).constructor=qs).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},qs.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Mn(this.splitValue(p)),c=n.data[o],u=this.categoryPoints[o],l=(u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e)),a[o]);l||(l=new j_({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),i&&(this.updateRange(p,e),l.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},qs.prototype.pointType=function(){return H_},qs.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=x({},i),s=t.fields.color||i.color,n=this.evalPointOptions(n,r,e),e=(i.type!==Sr&&i.type!==Br||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),Mt(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},qs.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},qs.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),i=this.valueAxisRanges[e]||{min:st,max:at};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([i.min])),max:Math.max.apply(Math,t.concat([i.max]))}},qs.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},qs.prototype.animationPoints=function(){return this.points},x((l=qs).prototype,T_);const U_=l;function Zs(t,e){xs.call(this,t,e),this.createNote()}(xs=H_)&&(Zs.__proto__=xs),((Zs.prototype=Object.create(xs&&xs.prototype)).constructor=Zs).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,o=this.owner.seriesValueAxis(o),n=(this.boxSlot=i=o.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=o.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),o.getSlot(r.median));r.mean&&(o=o.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,o)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},Zs.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Zs.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Zs.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Zs.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},Zs.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Zs.prototype.renderOutliers=function(t){for(var e,i=this.value,o=i.outliers||[],r=3*Math.abs(i.q3-i.q1),n=[],s=(t.markers,0);s<o.length;s++){var a=o[s],h=x({},(e=a<i.q3+r&&a>i.q1-r?t.outliers:t.extremes).border),h=(T(h.color)||(T(this.color)?h.color=this.color:h.color=new w.Color(e.background).brightness(.8).toHex()),new Hx({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:h,opacity:e.opacity}));h.value=a,n.push(h)}return this.reflowOutliers(n),n},Zs.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},Zs.prototype.mainVisual=function(t){for(var e=xs.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},Zs.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)},Zs.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||xs.prototype.getBorderColor.call(this)},i(l=Zs,{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:$,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:Q,background:a,border:{width:2,opacity:1},opacity:0}}),x(l.prototype,b_);const N_=l;function Qs(){_s.apply(this,arguments)}(_s=N_)&&(Qs.__proto__=_s),((Qs.prototype=Object.create(_s&&_s.prototype)).constructor=Qs).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Qs.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Qs.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Qs.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},Qs.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const G_=Qs;function Ks(){bs.apply(this,arguments)}(bs=U_)&&(Ks.__proto__=bs),((Ks.prototype=Object.create(bs&&bs.prototype)).constructor=Ks).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Mn(this.splitValue(p)),c=n.data[o],u=this.categoryPoints[o],l=(u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e)),a[o]);l||(l=new j_({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),i&&(this.updateRange(p,e),l.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Ks.prototype.pointType=function(){return this.options.invertAxes?G_:N_},Ks.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Ks.prototype.updateRange=function(t,e){var e=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers)),t=(T(t.mean)&&(i=i.concat(t.mean)),this.valueAxisRanges[e]||{min:st,max:at});this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([t.min])),max:Math.max.apply(Math,i.concat([t.max]))}},Ks.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Ks.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];T(r)&&null!==r&&i.push(r)}return i},Ks.prototype.supportsPointInactiveOpacity=function(){return!1};const W_=Ks;function $s(){ws.apply(this,arguments)}(ws=m_)&&($s.__proto__=ws),(($s.prototype=Object.create(ws&&ws.prototype)).constructor=$s).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const X_=$s;function Js(t,e){ks.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(ks=R)&&(Js.__proto__=ks),((Js.prototype=Object.create(ks&&ks.prototype)).constructor=Js).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Js.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Js.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=i.seriesIx,a=i.series,h=t.options.errorBars,p=i[e+"ErrorLow"],i=i[e+"ErrorHigh"];m(r)&&(m(p)&&m(i)&&(o={low:p,high:i}),h&&T(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new v_(h[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),o)&&this.addPointErrorBar(o,t,e)},Js.prototype.addPointErrorBar=function(t,e,i){var o=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=i===v,a={},s=(e[i+"Low"]=o,e[i+"High"]=t,e.errorBars=e.errorBars||[],new X_(o,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[i]=o,this.updateRange(a,r),a[i]=t,this.updateRange(a,r)},Js.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=Fn(o)&&Fn(r)?t:this.createMissingValue(t,s))&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,y,e),this.addErrorBar(i,v,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Js.prototype.seriesMissingValues=function(t){return t.missingValues},Js.prototype.createMissingValue=function(){},Js.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[o],s=this.yAxisRanges[e];Fn(r)&&(n=this.xAxisRanges[o]=n||{min:st,max:at},St(r)&&(r=lo(i,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Fn(t)&&(s=this.yAxisRanges[e]=s||{min:st,max:at},St(t)&&(t=lo(i,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Js.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=Rn(t,{},n,!0)),t);return s&&Rn(r=x({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Js.prototype.pointType=function(){return k_},Js.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=x({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Js.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e),e=(Mt(i.color)&&(r=o.color),new k_(t,o));return e.color=r,this.append(e),e},Js.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{x:o,y:i};throw new Error("Unable to locate Y axis with name "+t)},Js.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],e=r.seriesAxes(e.series),o=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);i&&(o&&e?(t=r.pointSlot(o,e),i.reflow(t)):i.visible=!1)}),this.box=t},Js.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},Js.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n),a=s.valueFields,s=s.fields;t(a,x({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s))}}},Js.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Js.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},i(l=Js,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(l.prototype,T_);const Y_=l;function ta(t,e){Ss.call(this,t,e),this.category=t.category}(Ss=k_)&&(ta.__proto__=Ss),((ta.prototype=Object.create(Ss&&Ss.prototype)).constructor=ta).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new w.drawing.Group,s=new w.drawing.Circle(new w.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),o=new w.drawing.Circle(new w.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new w.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,o),n},ta.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight,i=this.options.markers,o=this.box.center(),i=(i.size+i.border.width)/2+e.border.width/2;return new w.drawing.Circle(new w.geometry.Circle([o.x,o.y],i),t)},(l=ta).prototype.defaults=x({},l.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),l.prototype.defaults.highlight.zIndex=void 0;const q_=l;function ea(){As.apply(this,arguments)}(As=Y_)&&(ea.__proto__=As),((ea.prototype=Object.create(As&&As.prototype)).constructor=ea).prototype._initFields=function(){this._maxSize=at,As.prototype._initFields.call(this)},ea.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),As.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},ea.prototype.reflow=function(t){this.updateBubblesSize(t),As.prototype.reflow.call(this,t)},ea.prototype.pointType=function(){return q_},ea.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,o=e.pointIx*(hr/o),r={delay:o,duration:hr-o,type:wr},n=e.color||i.color,o=(t.size<0&&i.negativeValues.visible&&(n=O(i.negativeValues.color,n)),x({labels:{animation:{delay:o,duration:hr-o}}},this.pointOptions(i,e.seriesIx),{markers:{type:Q,border:i.border,opacity:i.opacity,animation:r}})),o=this.evalPointOptions(o,t,e),r=(Mt(i.color)&&(n=o.color),o.markers.background=n,new q_(t,o));return r.color=n,this.append(r),r},ea.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,h=Math.PI*s*s,p=(Math.PI*a*a-h)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*p,c=Math.sqrt((h+c)/Math.PI),u=O(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},ea.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},ea.prototype.createAnimation=function(){},ea.prototype.createVisual=function(){},i(l=ea,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const Z_=l;function ia(){Cs.apply(this,arguments)}(Cs=Hx)&&(ia.__proto__=Cs),x((l=(ia.prototype=Object.create(Cs&&Cs.prototype)).constructor=ia).prototype,b_);const Q_=l;function oa(t,e){Ps.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}(Ps=R)&&(oa.__proto__=Ps),((oa.prototype=Object.create(Ps&&Ps.prototype)).constructor=oa).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,T(this.value.target)&&(this.target=new Q_({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:C,align:A}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},oa.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},oa.prototype.createLabelElement=function(t){return new R_(this.getLabelText(t),t,this.pointData())},oa.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},oa.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),o=o.categorySlot(o.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:o,o=r?o:n,s=(i&&(n=new E(s.x1,o.y1,s.x2,o.y2),i.options.height=r?n.height():e.target.line.width,i.options.width=r?e.target.line.width:n.width(),i.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},oa.prototype.createVisual=function(){Ps.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var t=this.options,e=w.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:O(t.border.opacity,t.opacity)}),wt(this.bodyVisual=e),this.visual.append(e)},oa.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=w.drawing.Animation.create(this.bodyVisual,this.options.animation))},oa.prototype.createHighlight=function(t){return w.drawing.Path.fromRect(this.box.toRect(),t)},oa.prototype.highlightVisual=function(){return this.bodyVisual},oa.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},oa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},oa.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},oa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},oa.prototype.getIndex=function(){return this.categoryIx},(l=oa).prototype.tooltipAnchor=z_.prototype.tooltipAnchor,l.prototype.createFocusHighlight=z_.prototype.createFocusHighlight,i(l,{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:e,className:o,ariaRoleDescription:$r}}),x(l.prototype,b_),x(l.prototype,w_),x(l.prototype,V_);const K_=l;function ra(t,e){for(var i=e.series,o=0;o<i.length;o++){var r=i[o],n=r.data;!n||mt(n[0])||Bt(n[0])||(r.data=[n])}Ts.call(this,t,e)}(Ts=__)&&(ra.__proto__=Ts),((ra.prototype=Object.create(Ts&&Ts.prototype)).constructor=ra).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},ra.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ra.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=x({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),t=t.fields.color||o.color,a=this.evalPointOptions(a,s,e),e=(Mt(o.color)&&(t=a.color),new K_(s,a)),o=(e.color=t,n[i]);return o||(o=new j_({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},ra.prototype.updateRange=function(t,e){var i=t.current,t=t.target,e=e.series.axis,o=this.valueAxisRanges[e];T(i)&&!isNaN(i)&&T(t&&!isNaN(t))&&((o=this.valueAxisRanges[e]=o||{min:st,max:at}).min=Math.min(o.min,i,t),o.max=Math.max(o.max,i,t))},ra.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ra.prototype.pointValue=function(t){return t.valueFields.current},ra.prototype.aboveAxis=function(t){return 0<t.value.current},ra.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},(l=ra).prototype._setAnimationOptions=F_.prototype._setAnimationOptions,i(l,{animation:{type:_r}});const $_=l;function na(t,e){Ms.call(this),this.chartService=t,this.options=x({},this.options,e)}function sa(t,e,i){Os.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}(Ms=w.Class)&&(na.__proto__=Ms),((na.prototype=Object.create(Ms&&Ms.prototype)).constructor=na).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color,e=(e&&(e=e.color||e.options.color,i=O(i,e),o=O(o,e)),P(t.padding||{},"auto"));return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:Lt(t.border.width),paddingTop:Lt(e.top),paddingBottom:Lt(e.bottom),paddingLeft:Lt(e.left),paddingRight:Lt(e.right)}},na.prototype.show=function(t,e,i){t.format=e.format;i=this.getStyle(e,i),t.style=i,i=new w.Color(i.backgroundColor);T(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(xn,t),this.visible=!0},na.prototype.hide=function(){this.chartService&&this.chartService.notify(_n),this.visible=!1},na.prototype.destroy=function(){delete this.chartService},i(l=na,{border:{width:1},opacity:1}),(Os=l)&&(sa.__proto__=Os),((sa.prototype=Object.create(Os&&Os.prototype)).constructor=sa).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},sa.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===J&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},sa.prototype.hide=function(){this.chartService.notify(_n,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},sa.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,o=o.padding,n=!i.axis.options.vertical,i=i.line.bbox(),n=n?(t=b,r===k?(e=C,i.bottomLeft().translate(0,o)):(e=k,i.topLeft().translate(0,-o))):(e=b,r===S?(t=A,i.topLeft().translate(-o,0)):(t=S,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},i(c=sa,{padding:10});const J_=c;function aa(t,e,i){Is.call(this,i),this.axis=e,this.stickyMode=e instanceof e_;i=this.options.tooltip;i.visible&&(this.tooltip=new J_(t,this,x({},i,{stickyMode:this.stickyMode})))}(Is=R)&&(aa.__proto__=Is),((aa.prototype=Object.create(Is&&Is.prototype)).constructor=aa).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},aa.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},aa.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?v:y,n=new w.geometry.Point(o.x1,o.y1),i=i?new w.geometry.Point(o.x2,o.y1):new w.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},aa.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<o;s++){var a=i[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},aa.prototype.createVisual=function(){Is.prototype.createVisual.call(this);var t=this.options;this.line=new w.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},aa.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),Is.prototype.destroy.call(this)},i(c=aa,{color:Z,width:2,zIndex:-1,tooltip:{visible:!1}});const t1=c;function ha(t,e){Bs.call(this,t),this.pane=e}(Bs=R)&&(ha.__proto__=Bs),((ha.prototype=Object.create(Bs&&Bs.prototype)).constructor=ha).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},ha.prototype._clipBox=function(){return this.pane.chartsBox()},ha.prototype.createVisual=function(){var t;this.visual=new w.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),wt(t=w.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},ha.prototype.stackRoot=function(){return this},ha.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},ha.prototype.destroy=function(){Bs.prototype.destroy.call(this),delete this.parent},(c=ha).prototype.isStackRoot=!0;const e1=c;(pa=Fx)&&(ua.__proto__=pa),((ua.prototype=Object.create(pa&&pa.prototype)).constructor=ua).prototype.createTitle=function(){var t=this.options.title;Bt(t)&&(t=x({},t,{align:t.position,position:C})),this.title=Yx.buildTitle(t,ua.prototype.options.title),this.title&&this.append(this.title)},ua.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},ua.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},ua.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},ua.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},ua.prototype.reflow=function(t){var e;he(this.children)===this.content&&(e=this.children.pop()),pa.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},ua.prototype.visualStyle=function(){var t=pa.prototype.visualStyle.call(this);return t.zIndex=-10,t},ua.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},ua.prototype.stackRoot=function(){return this},ua.prototype.clipRoot=function(){return this},ua.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,h=a?o:r,p=0;p<i.length;p++)0===h.length&&a!==(t=i[p]).options.vertical&&te(h,s.createGridLines(t))},ua.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},ua.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new E,o=0;o<e;o++){var r=t[o],n=r.options.vertical?v:y,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,h=0;h<a;h++){var p=s[h];p.options.vertical||(p=p.lineBox(),i.x1=p.x1,i.x2=p.x2)}return i},ua.prototype.clipBox=function(){return this.chartContainer.clipBox},ua.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new d_(this),index:this.paneIndex,name:this.options.name})};var pa,c,la=1,ca,c;function ua(t){pa.call(this,t),this.id="pane"+la++,this.createTitle(),this.content=new R,this.chartContainer=new e1({},this),this.append(this.content),this.axes=[],this.charts=[]}(c=ua).prototype.isStackRoot=!0,i(c,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});const i1=c;function d(t,e,i){ca.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.originalSeries=t,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}function da(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new E}function fa(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}(ca=R)&&(d.__proto__=ca),((d.prototype=Object.create(ca&&ca.prototype)).constructor=d).prototype.initFields=function(){},d.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},d.prototype.bindPoint=function(t,e,i){var o=this._bindCache.get(t);return o||this._bindCache.set(t,o=[]),o[e]||(o[e]=y_.current.bindPoint(t,e,i))},d.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=x({title:{color:t.color}},e),s=0;s<o;s++){var a=x({},n,i[s]),a=(St(a.title)&&(a.title=x({text:a.title},n.title)),new i1(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},d.prototype.crosshairOptions=function(t){return t.options.crosshair},d.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);n&&n.visible&&(r=new t1(this.chartService,r,n),this.crosshairs.push(r),i.content.append(r))}},d.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},d.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},d.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},d.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},d.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},d.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},d.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},d.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},d.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,p,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(l=!d&&jt(n)||jt(o))&&(h=l({text:Fn(h)?h:"",series:u})),l=u._defaults,l=void(Mt(p=u.color)&&l&&(p=l.color)),c=void 0,c=d?(l={},p):(l={color:n.color,font:n.font},r.markers.color),Fn(h))&&""!==h&&s.push({text:h,labels:l,markerColor:c,series:u,active:d})}te(i.data,s)},d.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},d.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},d.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},d.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=P(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},d.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.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 o=0;o<e.length;o++)e[o].refresh()},d.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},d.prototype.alignAxisTo=function(t,e,i,o){var i=t.getSlot(i,i,!0),r=t.options.reverse?2:1,o=e.getSlot(o,o,!0),n=e.options.reverse?2:1,o=t.box.translate(o[y+n]-i[y+r],o[v+n]-i[v+r]);t.pane!==e.pane&&o.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(o)},d.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},h={},p={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,g=fa(t,u)||i,y=r;g!==i&&(y=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[l],y[l]),c.options._overlap||(M(c.lineBox().x1)===M(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),f)&&(s[d]=c),M(c.lineBox().x2)===M(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[l],y[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,A).translate(c.options.margin,0)),f)&&(a[d]=c),(g=fa(e,u)||o)!==c&&(c.alignTo(g),c.reflow(c.box)))}for(var v=0;v<t.length;v++){var m=t[v],x=m.pane,_=x.id,b=!1!==m.options.visible,x=fa(e,x)||o,w=n;x!==o&&(w=this.axisCrossingValues(x,t)),this.alignAxisTo(m,x,r[v],w[v]),m.options._overlap||(M(m.lineBox().y1)===M(x.lineBox().y1)&&(m._mirrored||(m.options.labels.mirror=!m.options.labels.mirror,m._mirrored=!0),this.alignAxisTo(m,x,r[v],w[v]),h[_]&&m.reflow(m.box.alignTo(h[_].box,C).translate(0,-m.options.margin)),b)&&(h[_]=m),M(m.lineBox().y2,K)===M(x.lineBox().y2,K)&&(p[_]&&m.reflow(m.box.alignTo(p[_].box,k).translate(0,m.options.margin)),b)&&(p[_]=m),0!==v&&(m.alignTo(i),m.reflow(m.box)))}},d.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=da(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},d.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,da(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},d.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=da(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),i=Math.max(i,r.x1-s.x1),h=0;h<n.length;h++){var p=n[h];p.reflow(p.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(i,0))}},d.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},d.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=ya(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},d.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},d.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(o)}},d.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var p=0;p<i;p++){var l=e[p];l.options.height||(l.options.height=o/r)}for(var c=0;c<i;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},d.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},d.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},d.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(w.drawing.Path.fromRect(e[i].toRect()))},d.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},d.prototype.createVisual=function(){ca.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border,i=(void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&T(i)||(i=a,e=0),this._bgVisual=new w.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(i),this.appendVisual(i)},d.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&T(s.value)&&null!==s.value&&i.push(s)}}return i},d.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},d.prototype.pointsByPointIndex=function(e){return this.filterPoints(function(t){return t.getIndex()===e})},d.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},d.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},d.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},d.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},d.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},d.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=fa(e,n)||e[0],s=this.createLabelAxis(r,o+i,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},d.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,o=o.visible;if(r!==et&&r!==ut||!1===o)return null;var o=this.groupAxes(this.panes),o=i.options.vertical?o.x:o.y,o=this.axisCrossingValues(i,o),r=r===et,n=i.range(),r=r?n.max:n.min;if(_(o[e],n.min,n.max)-r==0)return null;o.splice(e+1,0,r),i.options.axisCrossingValues=o;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n},d.prototype.isTrendline=function(t){return t&&u(t.type,en)},d.prototype.trendlineFactory=function(){},d.prototype.createTrendlineSeries=function(){var o=this,r=[];return this.series=this.series.map(function(t){if(!o.isTrendline(t))return t;var e,i=o.seriesByName(t.for);if(i)return e=y_.current.valueFields(i),e=he(e),(e=o.trendlineFactory(Object.assign({},{field:e},t),i))&&(!1===i.visible&&(e.visible=!1),e.color===nt&&(e.color=i.color),r.push(e)),e;throw new Error('Invalid Configuration: Unable to locate linked series "'+t.for+'" for trendline "'+t.name+'".')}).filter(function(t){return null!==t}),r},d.prototype.seriesByName=function(e){return this.series.find(function(t){return t.name===e})},d.prototype.getFirstPoint=function(){return this.pointsBySeriesIndex(0)[0]},d.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},d.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},d.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},d.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},d.prototype._getNextPoint=function(o,r,t){function e(t){for(var e,i=0;0===(e=r.call(n,o,i+=t)).length;);return e}var n=this,i=r.call(this,o),t=i.indexOf(o)+t;return t<0?(i=e(-1)).at(-1):t>=i.length?(i=e(1)).at(0):i[t]},d.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},d.prototype._pointsByHorizontal=function(t,e){t=Tt(t.series.index+(e=void 0===e?0:e),this.series.length);return this.pointsBySeriesIndex(t)};var ga,ya=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},va,c,ma,c,xa,_a,c,ba,wa,ka,c,Sa,c,Aa,Ca,Pa,h,Ta,Ma,c;i(c=d,{series:[],plotArea:{margin:{}},background:"",border:{color:Z,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const o1=c,r1={hover:function(t,e){this._dispatchEvent(t,e,hn)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Oa(t,e,i){ga.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var h=0;h<o.length;h++){var p=o[h],l=void 0;if(Bt(a))l=a[p];else{if(0!==h&&!u(p,r))break;l=a}l&&s.push({canonicalName:p,name:n[h],transform:Mt(l)?l:g_[l]})}}(ga=w.Class)&&(Oa.__proto__=ga),((Oa.prototype=Object.create(ga&&ga.prototype)).constructor=Oa).prototype.aggregatePoints=function(t,e){var i,o=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||mt(t)||((i=function(){}).prototype=t,s=new i);for(var a=0;a<r.length;a++){var h=r[a],p=this._bindField(n.values,h.canonicalName),p=h.transform(p,o,n.dataItems,e);if(!(null===p||!Bt(p)||T(p.length)||p instanceof Date)){s=p;break}if(T(p)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=h.name;var c=s;var u=p;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),T(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},Oa.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},Oa.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,s=(T(s[e])?s:n.fields)[e];i.push(s)}return i};const n1=Oa;function Ia(){va.call(this),this._defaults={}}(va=w.Class)&&(Ia.__proto__=va),((Ia.prototype=Object.create(va&&va.prototype)).constructor=Ia).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Ia.prototype.query=function(t){return this._defaults[t]},(c=Ia).current=new c;const s1=c;function Ba(){ma.apply(this,arguments)}(ma=z_)&&(Ba.__proto__=ma),((Ba.prototype=Object.create(ma&&ma.prototype)).constructor=Ba).prototype.createLabel=function(){var t=this.options.labels,e=x({},t,t.from),t=x({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this.createLabelElement(t),this.append(this.labelTo))},Ba.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},(c=Ba).prototype.defaults=x({},c.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const a1=c;function La(){xa.apply(this,arguments)}(xa=F_)&&(La.__proto__=xa),((La.prototype=Object.create(xa&&xa.prototype)).constructor=La).prototype.pointType=function(){return a1},La.prototype.pointValue=function(t){return t.valueFields},La.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)},La.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},La.prototype.updateRange=function(t,e){var e=e.series.axis,i=t.from,o=t.to,r=this.valueAxisRanges[e];null!==t&&m(i)&&m(o)&&((r=this.valueAxisRanges[e]=r||{min:st,max:at}).min=Math.min(r.min,i),r.max=Math.max(r.max,i),r.min=Math.min(r.min,o),r.max=Math.max(r.max,o))},La.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},(c=La).prototype.plotLimits=__.prototype.plotLimits;const h1=c;function Ea(){_a.apply(this,arguments)}(_a=k_)&&(Ea.__proto__=_a),((Ea.prototype=Object.create(_a&&_a.prototype)).constructor=Ea).prototype.aliasFor=function(){return this.parent};const p1=Ea;function Ra(t,e){ba.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Kn(),this.initLabelsFormat()}(ba=R)&&(Ra.__proto__=ba),((Ra.prototype=Object.create(ba&&ba.prototype)).constructor=Ra).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,o=this.value,i=this.fromPoint=new p1(o,x({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new p1(o,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},Ra.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},Ra.prototype.createHighlight=function(){var t=new w.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},Ra.prototype.highlightVisual=function(){return this.visual},Ra.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},Ra.prototype.createFocusHighlight=function(){var t=new w.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},Ra.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return i=(r=this.box).center(),o=S,r=this.options.vertical?(t=i.x,e=r.y1-5,k):(t=r.x2+5,e=i.y,b),{point:new L(t,e),align:{horizontal:o,vertical:r}}},Ra.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ra.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Ra.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},Ra.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}"}))},Ra.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels,o=o.vertical;"auto"===r.position&&(o=o?e.y1<=t.y1?(i=gr,yr):(i=yr,gr):e.x1<=t.x1?(i=S,A):(i=A,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},Ra.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},Ra.prototype.focusVisual=function(){this.fromPoint.focusVisual()},Ra.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},Ra.prototype.getIndex=function(){return this.categoryIx},x((c=Ra).prototype,b_),x(c.prototype,w_),c.prototype.defaults={markers:{visible:!1,background:a,size:8,type:Q,border:{width:2},opacity:1},labels:{visible:!1,margin:P(3),padding:P(4),animation:{type:pr,delay:hr},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:e,className:o,ariaRoleDescription:$r}};const l1=c;function Va(){wa.apply(this,arguments)}(wa=O_)&&(Va.__proto__=wa),((Va.prototype=Object.create(wa&&wa.prototype)).constructor=Va).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},Va.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},Va.prototype.createStroke=function(t){var e=new w.drawing.Path(t),t=new w.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},Va.prototype.hasStackSegment=function(){return!0},Va.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},Va.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const c1=Va;function za(){ka.apply(this,arguments)}(ka=c1)&&(za.__proto__=ka),((za.prototype=Object.create(ka&&ka.prototype)).constructor=za).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},za.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},za.prototype.createCurveSegments=function(t){return(new c_).process(this.toGeometryPoints(t))};const u1=za;function ja(){Sa.apply(this,arguments)}(Sa=c1)&&(ja.__proto__=Sa),((ja.prototype=Object.create(Sa&&Sa.prototype)).constructor=ja).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ja.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},x((c=ja).prototype,h);const d1=c;function Da(){Aa.apply(this,arguments)}(Aa=__)&&(Da.__proto__=Aa),((Da.prototype=Object.create(Aa&&Aa.prototype)).constructor=Da).prototype.render=function(){Aa.prototype.render.call(this),this.renderSegments()},Da.prototype.pointType=function(){return l1},Da.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!Fn(r.from)&&!Fn(r.to)){if(this.seriesMissingValues(i)!==dr)return null;r={from:0,to:0}}o=this.pointOptions(i,o),o=this.evalPointOptions(o,r,e),e=t.fields.color||i.color,Mt(i.color)&&(e=o.color),t=new l1(r,o);return t.color=e,this.append(t),t},Da.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?u1:"step"===o?d1:c1)(t,e,i)},Da.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Da.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(i&&t)return{from:i,to:t}},Da.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new E(o.x1,t.y1,o.x2,t.y2),new E(e.x1,t.y1,e.x2,t.y2)):(i=new E(t.x1,o.y1,t.x2,o.y2),new E(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},Da.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),Aa.prototype.addValue.call(this,t,e)},Da.prototype.updateRange=function(t,e){var i;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:st,max:at},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},Da.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Da.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},x((h=Da).prototype,p,T_);const f1=h;function Fa(){Ca.apply(this,arguments)}(Ca=H_)&&(Fa.__proto__=Ca),((Fa.prototype=Object.create(Ca&&Ca.prototype)).constructor=Fa).prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=[],r=[],n=[],s=e.getSlot(i.low,i.high),a=e.getSlot(i.open,i.open),e=e.getSlot(i.close,i.close),i=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);o.push([a.x1,a.y1]),o.push([i,a.y1]),r.push([i,e.y1]),r.push([e.x2,e.y1]),n.push([i,s.y1]),n.push([i,s.y2]),this.lines=[o,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},Fa.prototype.createBody=function(){};const g1=Fa;function Ha(){Pa.apply(this,arguments)}(Pa=U_)&&(Ha.__proto__=Pa),((Ha.prototype=Object.create(Pa&&Pa.prototype)).constructor=Ha).prototype.pointType=function(){return g1};const y1=Ha;function Ua(t,e,i){Ta.call(this),this.from=t,this.to=e,this.series=i}(Ta=R)&&(Ua.__proto__=Ta),((Ua.prototype=Object.create(Ta&&Ta.prototype)).constructor=Ua).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(t=e.aboveAxis?i.x2:i.x1,r.push([t,i.y1],[t,o.y2])),r},Ua.prototype.createVisual=function(){Ta.prototype.createVisual.call(this);var t=this.series.line||{},t=w.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});wt(t),this.visual.append(t)},i(c=Ua,{animation:{type:pr,delay:hr}});const v1=c;function Na(){Ma.apply(this,arguments)}function Ga(t,e,i){return(t=t[String(e)])?t(i):null}function Wa(t,e){for(var i,o,r=0,n=0,s=0,a=0,h=0,p=Number.MAX_VALUE,l=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,u=u.yValue;isFinite(d)&&null!==d&&isFinite(u)&&null!==u&&(p=Math.min(d,p),l=Math.max(d,l),h++,r+=d,n+=u,s+=Math.pow(d,2),a+=d*u)}return 0<h&&(o=(n-(i=(h*a-r*n)/(h*s-Math.pow(r,2)))*r)/h),{slope:i,intercept:o,count:h,xMin:p,xMax:l}}function Xa(t,e){return t.every(function(t){t=t.valueFields;return!Fn(t[e])||0<t[e]})}function Ya(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i}function qa(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,h=0;h<t.length;h++){var p=e(t[h]),l=p.xValue,p=p.yValue;if(isFinite(p)&&null!==p?(r.push(p),a+=p,s=Math.max(h,s)):r.push(null),n<=h){var p=r.filter(function(t){return null!==t}).length,c=r.shift()||0;if(0<p){o.push([l,a/p]),a-=c;continue}}o.push([l,null])}return o.slice(0,s+1)}function Za(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new Rx,n=new Rx,s=0,a=Number.MAX_VALUE,h=Number.MIN_VALUE,i=function(t){return t},p=[],l=0;l<t.length;l++){var c=e(t[l]),u=c.xValue,c=c.yValue;if(isFinite(u)&&null!==u&&isFinite(c)&&null!==c){a=Math.min(u,a),h=Math.max(u,h),s++,n.set(l,0,c),r.set(l,0,1),r.set(l,1,u);for(var d=2;d<=o;d++)r.set(l,d,Math.pow(r.get(l,1),d))}else r.set(l,0,0)}return r.width=Math.min(o,s),0<s&&(p=function(t,e){for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r}(r,n),i=function(o){return p.reduce(function(t,e,i){return t+e*Math.pow(o,i)},0)}),{coefficients:p,count:s,valueMapper:i,xMin:a,xMax:h}}(Ma=F_)&&(Na.__proto__=Ma),((Na.prototype=Object.create(Ma&&Ma.prototype)).constructor=Na).prototype.render=function(){Ma.prototype.render.call(this),this.createSegments()},Na.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=Bn(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<i;h++){var p=y_.current.bindPoint(n,h),l=p.valueFields.value,c=p.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=p.valueFields.value=s):(d=u-(p.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(p,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},Na.prototype.updateRange=function(t,e){Ma.prototype.updateRange.call(this,{value:e.to},e)},Na.prototype.aboveAxis=function(t){return 0<=t.value},Na.prototype.plotRange=function(t){return[t.from,t.to]},Na.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var h,p=n[a];p&&s&&(h=new v1(s,p,r),i.push(h),this.append(h)),s=p}}};const m1=Na,x1=h={exponentialTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Xa(t,n.field)&&(n=(t=Wa(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:e+1,yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Ya(function(t){return o*Math.exp(r*t)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},linearTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.categoryAxis,s=t.options,t=Wa((0,t.seriesValues)(),(e=s.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),i=t.slope,o=t.intercept,0<t.count?Ya(function(t){return i*t+o},n):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},logarithmicTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,r=t.options,t=Wa((0,t.seriesValues)(),(i=r.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:t[i]}})),r=t.slope,n=t.intercept,0<t.count?(e=r,o=n,Ya(function(t){return e*Math.log(t)+o},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},movingAverageTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,t=(n=(t=t).categoryAxis,i=t.options,o=t.categoryAxis,t=t.seriesValues,r=(i.trendline||{}).period||2,s=o.totalRangeIndices(),o=o.currentRangeIndices(),o={min:Math.floor(Math.max(o.min-r,s.min)),max:Math.ceil(Math.min(o.max+r+2,s.max))},s=qa(t(o),(e=i.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),r),a=[],s.forEach(function(t){var e=t[0],t=t[1];a[e]={category:n.categoryAt(e,!0),value:t}}),0<a.length?a:null);return t?Object.assign({},h,{type:"line",data:t,categoryField:"category",field:"value"}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.seriesValues,i=t.categoryAxis,s=((t=t.options).trendline||{}).order,n=Za(n(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=n.count,o=n.valueMapper,0<t?Ya(function(t){return o(t)},i):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},powerTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Xa(t,n.field)&&(n=(t=Wa(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Ya(function(t){return o*Math.pow(t,r)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}};var Qa,Ka,$a=[xr,Wr,Fr,Zr],Ja=[Ir,qr].concat($a),c,th,h,eh,ih,oh,c,rh,h,nh,c,sh,h,ah,c,hh,h;function f(){Qa.apply(this,arguments)}function ph(t,e,i){x([].concat(e instanceof e_?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}(Qa=o1)&&(f.__proto__=Qa),((f.prototype=Object.create(Qa&&Qa.prototype)).constructor=f).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new E_,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[_r,kr,qr,Wr,Zr,Hr,Or,Xr]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},f.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)},f.prototype.removeAxis=function(t){var e=t.options.name;Qa.prototype.removeAxis.call(this,t),t instanceof e_?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},f.prototype.trendlineFactory=function(t,e){var i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),t=Ga(x1,t.type,{options:t,categoryAxis:i,seriesValues:o});return t&&(t.categoryAxis=e.categoryAxis,t.valueAxis=e.valueAxis,this.filterSeries(t,i))},f.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})},f.prototype.seriesValues=function(t,e){var i=[],o=this.srcSeries[t],t=this.seriesCategoryAxis(o);Ln(t.options.type,J)&&(this._seriesPointsCache={},this._currentPointsCache={},t.options.dataItems=[],o=this.aggregateSeries(o,t,t.totalRangeIndices()));for(var t=e?e.min:0,r=e?e.max:o.data.length,n=t;n<r;n++){var s=this.bindPoint(o,n);i.push({categoryIx:n,category:s.fields.category,valueFields:s.valueFields})}return i},f.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],o)}},f.prototype.createChartGroup=function(t,e){this.createAreaChart(Vn(t,[xr,Wr]),e),this.createRangeAreaChart(Vn(t,[Fr,Zr]),e),this.createBarChart(Vn(t,[Ar,_r]),e),this.createRangeBarChart(Vn(t,[Ur,Hr]),e),this.createBulletChart(Vn(t,[kr,Yr]),e),this.createCandlestickChart(Vn(t,Sr),e),this.createBoxPlotChart(Vn(t,[br,Xr]),e),this.createOHLCChart(Vn(t,Br),e),this.createWaterfallChart(Vn(t,[Qr,Or]),e),this.createLineChart(Vn(t,[Ir,qr]),e)},f.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r,n,s=e[o];this.isTrendline(s)||(r=this.seriesCategoryAxis(s),n=this.findPane(r.options.pane),s=(Ln(r.options.type,J)||s.categoryField)&&u(n,t)?this.aggregateSeries(s,r,r.currentRangeIndices()):this.filterSeries(s,r)),i.push(s)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},f.prototype.filterSeries=function(e,i){var o,t,r,n=(e.data||{}).length;return i._seriesMax=Math.max(i._seriesMax||0,n),T(i.options.min)||T(i.options.max)?(o=i.currentRangeIndices(),t=u(e.type,Ja),(r=x({},e)).data=(r.data||[]).slice(o.min,o.max+1),t&&Zn(r,o,n,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return T(e.data[t])}),r):e},f.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},f.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=Ln(o.type,J),s=t.data,a=[];n||e.indexCategories();for(var h=0;h<s.length;h++){var p,l=y_.current.bindPoint(t,h).fields.category;n&&(l=jn(l,s[h],this.chartService.intl)),T(l)||(l=r[h]),T(l)&&null!==l&&(a[p=e.totalIndex(l)]=a[p]||{items:[],category:l},a[p].items.push(h))}return this._currentPointsCache[i]=a},f.prototype.aggregateSeries=function(t,o,r){if(!t.data.length)return t;for(var n=this.seriesSourcePoints(t,o),e=x({},t),s=new n1(x({},t),y_.current,s1.current),i=e.data=[],a=o.options.dataItems||[],h=function(t){var e=t-r.min,i=n[t];return(i=i||(n[t]={})).categoryIx=e,i.item||(e=o.categoryAt(t,!0),i.category=e,i.item=s.aggregatePoints(i.items,e)),i},p=r.min;p<=r.max;p++){var l=h(p);i[l.categoryIx]=l.item,l.items&&l.items.length&&(a[l.categoryIx]=l.item)}return u(e.type,Ja)&&Zn(e,r,o.totalCount(),h,function(t){return n[t]}),o.options.dataItems=a,e},f.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,Bn(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Qa.prototype.appendChart.call(this,t,e)},f.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=Nt([].concat(e.valueAxis),function(t){return t.name===i})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},f.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},f.prototype.stackableChartOptions=function(t,e){var i=t.some(function(t){return t.stack}),o=t.some(function(t){return t.stack&&"100%"===t.stack.type}),e=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:e}},f.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";Le(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,i){return Nt(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},f.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new F_(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e))),this.appendChart(i,e))},f.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new h1(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new $_(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createLineChart=function(t,e){0!==t.length&&(t=new M_(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new L_(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new f1(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new y1(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new U_(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new W_(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new m1(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.axisRequiresRounding=function(t,e){for(var i=Vn(this.series,Kr),o=0;o<this.series.length;o++){var r,n=this.series[o];u(n.type,$a)&&(r=n.line)&&r.style===mr&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},f.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},f.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof e_&&t[e].createLabels()},f.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,h=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?st:0},n),T(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Hn(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),i_):e_)(n,this.chartService);if(i[r].categories=h.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=h}h.axisIndex=r,o.push(h),this.appendAxis(h)}}var p=this.categoryAxis||o[0];this.categoryAxis=p,e?this.axisY=p:this.axisX=p},f.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,$a))return!1;return!0},f.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var h=o[a];if(u(this.findPane(h.pane),t)){var p=h.name,l=Ln(h.type,bn)?{min:.1,max:1}:{min:0,max:1},l=e.query(p)||i||l,l=(0===a&&l&&i&&(l.min=Math.min(l.min,i.min),l.max=Math.max(l.max,i.max)),new(Ln(h.type,bn)?n_:o_)(l.min,l.max,x({},n,h),this.chartService));if(p){if(this.namedValueAxes[p])throw new Error("Value axis with name "+p+" is already defined");this.namedValueAxes[p]=l}l.axisIndex=a,s.push(l),this.appendAxis(l)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},f.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new L(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,h=0;h<a.length;h++){var p=a[h];p.getValue?Tn(s,p.getValue(r)):Tn(n,p.getCategory(r))}0===n.length&&Tn(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:se(e),originalEvent:e,category:Un(n),value:Un(s)})}},f.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},f.prototype.updateAxisOptions=function(t,e){ph(this.options,t,e),ph(this.originalOptions,t,e)},f.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},f.prototype._pointsByHorizontal=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsByPointIndex(t.getIndex()):(t=this._siblingsBySeriesIndex(t.series.index,e),this.chartService.rtl?t.reverse():t)},f.prototype._siblingsByPointIndex=function(e){for(var t=this.charts,i=[],o=0;o<t.length;o++){var r=t[o];r.pane&&"_navigator"===r.pane.options.name||(r=r.points.filter(function(t){return t&&!1!==t.visible&&t.getIndex()===e}),i.push.apply(i,r.sort(this._getSeriesCompareFn(r[0]))))}return i},f.prototype._siblingsBySeriesIndex=function(t,e){t=Tt(t+e,this.series.length);return this.pointsBySeriesIndex(t)},f.prototype._getSeriesCompareFn=function(t){t=this._isInStackedSeries(t);return t&&this.invertAxes||!t&&!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}},f.prototype._isInStackedSeries=function(t){var e=u(t.series.type,[xr,Wr,Fr,Zr,Ir,qr,Dr,zr]),i=u(t.series.type,[Ar,_r]);return e||i&&t.options.isStacked},i(c=f,{categoryAxis:{},valueAxis:{}}),x(c.prototype,r1);const _1=c;function lh(){Ka.call(this),this._points=[]}function ch(){this._defaultPrevented=!0}(Ka=w.Class)&&(lh.__proto__=Ka),((lh.prototype=Object.create(Ka&&Ka.prototype)).constructor=lh).prototype.destroy=function(){this._points=[]},lh.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},lh.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o&&(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:ch,visual:t.highlightVisual(),show:e}),o._defaultPrevented)||t.toggleHighlight(e,i)},lh.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},lh.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1};const b1=lh;function uh(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function dh(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}function fh(t,e){th.call(this),this.plotArea=t,this.options=x({},this.options,e)}(th=w.Class)&&(fh.__proto__=th),((fh.prototype=Object.create(th&&th.prototype)).constructor=fh).prototype.start=function(t){return this._active=uh(t,this.options.key),this._active},fh.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return dh(this.axisRanges=t)}},fh.prototype.end=function(){var t=this._active;return this._active=!1,t},fh.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},fh.prototype.destroy=function(){delete this.plotArea},fh.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,h=n[s];(e===y&&!h.options.vertical||e===v&&h.options.vertical)&&(a=h.pan(o))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r},(h=fh).prototype.options={key:"none",lock:"none"};const w1=h;function gh(t,e){eh.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}(eh=w.Class)&&(gh.__proto__=eh),((gh.prototype=Object.create(eh&&eh.prototype)).constructor=gh).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},gh.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},gh.prototype.setStyles=function(t){Rt(this._marquee,t)},gh.prototype.start=function(t){if(uh(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i)return e=this._elementOffset(),i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},gh.prototype._elementOffset=function(){var t=this.chart.element,e=Rt(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=oe(t);return{left:i+t.left,top:e+t.top}},gh.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},gh.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(t)).left-=e.left,t.top-=e.top,e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,dh(this.axisRanges)},gh.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},gh.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},gh.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===y&&!a||i===v&&a||!T(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},gh.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(i.x,o),s=Math.min(i.y,t),a=Math.abs(i.x-o),h=Math.abs(i.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,h=e.height()),o>e.x2&&(a=e.x2-i.x),o<e.x1&&(a=i.x-e.x1),t>e.y2&&(h=e.y2-i.y),t<e.y1&&(h=i.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:h}},(c=gh).prototype.options={key:"shift",lock:"none"};const k1=c;function yh(t,e){ih.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}(ih=w.Class)&&(yh.__proto__=ih),((yh.prototype=Object.create(ih&&ih.prototype)).constructor=yh).prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(i===y&&!a||i===v&&a)&&s.zoomRange&&(a=_(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&o.push({axis:s,range:a})}return dh(this.axisRanges=o)},yh.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},yh.prototype.destroy=function(){delete this.chart};const S1=yh;function vh(t,e){oh.call(this,t),this.chartService=e}(oh=R)&&(vh.__proto__=oh),((vh.prototype=Object.create(oh&&oh.prototype)).constructor=vh).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new w.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":vt,reverse:e.rtl,alignItems:i?ut:b});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new E),r.renderVisual()}},vh.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?di(t):new E},vh.prototype.renderVisual=function(){this.addVisual()},vh.prototype.createVisual=function(){};const A1=vh;function mh(){rh.apply(this,arguments)}(rh=Hx)&&(mh.__proto__=rh),((mh.prototype=Object.create(rh&&rh.prototype)).constructor=mh).prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},mh.prototype.markerOptions=function(){return this.options},mh.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return x({},t,{background:t.border.color},t.highlight,t.type===$?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},mh.prototype.createHighlight=function(){var t=new rh(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},i(h=mh,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:C,align:S,highlight:{width:10,height:10,border:{color:a,width:2}}});const C1=h;function xh(){nh.apply(this,arguments)}(nh=Hx)&&(xh.__proto__=nh),((xh.prototype=Object.create(nh&&nh.prototype)).constructor=xh).prototype.getElement=function(){var t=new w.drawing.Group,e=new w.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},i(c=xh,{width:15,height:15,align:A,vAlign:k,margin:{right:-2,bottom:2}});const P1=c;function _h(){sh.apply(this,arguments)}(sh=Hx)&&(_h.__proto__=sh),((_h.prototype=Object.create(sh&&sh.prototype)).constructor=_h).prototype.getElement=function(){var t=new w.drawing.Group,e=new w.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},_h.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},_h.prototype.createHighlightLine=function(){var t=x({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),t=new P1(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},_h.prototype.createHighlightMarker=function(){var t=x({},{background:this.options.background},this.options.highlight.markers),e=new sh(t),i=this.parent.paddingBox,t=t.border.width,o=this.parent.box.clone();return o.pad({left:t-i.x1,top:t-i.y1}),e.reflow(o),this.highlightMarker=e.getElement(),this.highlightMarker},i(h=_h,{border:{width:0},type:"rect",align:S,vAlign:b,highlight:{border:{width:2},markers:{type:Q,width:10,height:10,border:{width:2,color:a},align:S,vAlign:C}}});const T1=h;function bh(){ah.apply(this,arguments)}(ah=Hx)&&(bh.__proto__=ah),((bh.prototype=Object.create(ah&&ah.prototype)).constructor=bh).prototype.createHighlight=function(){var t=x({},{background:this.options.background},this.options.highlight.markers),t=new ah(t),e=this.paddingBox.clone(),i=this.parent.box.clone();return e.align(i,y,S),e.align(i,v,C),t.reflow(e),this.highlight=[t.getElement()],this.highlight},i(c=bh,{highlight:{markers:{type:Q,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});const M1=c;function wh(t){hh.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Kn(),this.options.accessibility.ariaChecked=t.active}(hh=Fx)&&(wh.__proto__=hh),((wh.prototype=Object.create(hh&&hh.prototype)).constructor=wh).prototype.createContainer=function(){this.container=new Gx({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},wh.prototype.createMarker=function(){this.markerWrap=new hh({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))},wh.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,t=t.line,e={border:{color:(t=void 0===t?{}:t).color||e,opacity:t.opacity,dashType:t.dashType}};return this._createLine(e)||this._createMarkerLine(e,t)||this._createSquare()},wh.prototype.markerOptions=function(){var t=this.options,e=t.markers,i=t.markerColor,o=(e=void 0===e?{}:e).border;return void 0===o&&(o={}),e.zIndex=void 0,x({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},wh.prototype._highlightOptions=function(){var t=this.options;return x({markers:{type:t.markers.type}},t.highlight)},wh.prototype._createLine=function(t){var e=this.options;return e.type!==Ir||e.markers.visible||(this._line=new T1(x({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},wh.prototype._createMarkerLine=function(t,e){return this.options.type===Ir&&(this._markerLineArea=new P1(x({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},wh.prototype._createSquare=function(){var t=this.options;return t.type===xr&&(this._square=new M1(Object.assign({},{border:t.border,vAlign:t.markers.visible?k:b,highlight:this._highlightOptions(),visual:t.visual},t.area,{background:t.area.background||t.markerColor})),this.markerWrap.append(this._square)),this._square},wh.prototype._createMarker=function(){return new C1(this.markerOptions())},wh.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},wh.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},wh.prototype._toggleHighlight=function(e){var t,i,o=this;this.options.highlight.visible&&((t=this._marker||this._square||this._line)&&t===this._line&&this._line.visual.visible(!e),t)&&((i=t.highlight)||(i=t.createHighlight()).forEach(function(t){return t&&o.markerWrap.appendVisual(t)}),i.forEach(function(t){return t&&t.visible(e)}))},wh.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new Xx(t.text,e))},wh.prototype.getAriaLabelText=function(){return this.options.text},wh.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},wh.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},wh.prototype.renderComplete=function(){hh.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=w.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},wh.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(on,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},wh.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},wh.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},wh.prototype.eventArgs=function(t){var e=this.options;return{element:se(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},wh.prototype.createVisual=function(){hh.prototype.createVisual.call(this);var t=this.options;this.options.visible&&(t=x({ariaLabel:t.text},t.accessibility),si(this.visual,t))},wh.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{type:t.type,markers:x({background:this.options.markerColor},this.markerOptions()),labels:t.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()):hh.prototype.renderVisual.call(this)},wh.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return w.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},i(h=wh,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const O1=h;var kh,Sh="custom",c,Ah,h,Ch,Ph,c,Th,h,Mh,c,Oh,l,Ih,h,Bh,c,Lh,l,Eh,c;function Rh(t,e){void 0===e&&(e={}),kh.call(this,t),this.chartService=e,u(this.options.position,[C,A,k,S,Sh])||(this.options.position=A),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}(kh=R)&&(Rh.__proto__=kh),((Rh.prototype=Object.create(kh&&kh.prototype)).constructor=Rh).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=b;e===Sh?o=S:u(e,[C,k])?(o=i===ut?S:i===et?A:b,r=e):i&&(i===ut?r=C:i===et&&(r=k)),this.container=new Fx({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Fx({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Rh.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new A1({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s],h=a.series||{},p=h.markers,l=(void 0===p&&(p={}),h.dashType),c=h.legendItem,h=h.opacity,p=x({visible:!1!==p.visible,type:Q},p),p=(delete p.size,x({},{markers:p,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:l},e.line),area:Object.assign({},{opacity:h},e.area),opacity:h,accessibility:e.accessibility},e.item,c,a,{markers:e.markers}));o.append(new O1(p))}o.render(),this.itemsContainer.append(o)},Rh.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Sh&&e!==vt||(T(e)?e!==vt:u(t,[S,A]))},Rh.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Rh.prototype.getItems=function(){return this.itemsContainer.children[0].children},Rh.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Sh?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new E(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Rh.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===C||o===k?y:v,a=this.isVertical(),h=t.clone(),p=t.clone(),o=(o!==S&&o!==A||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,v,i.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,y,i.options.align)),i.reflow(p),(p=i.box).clone());(e.offsetX||e.offsetY)&&(p.translate(e.offsetX,e.offsetY),i.reflow(p)),o[s+1]=t[s+1],o[s+2]=t[s+2],this.box=o},Rh.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),i.reflow(t),t=i.box,i.reflow(new E(o,r,o+t.width(),r+t.height()))},Rh.prototype.renderVisual=function(){this.hasItems()&&kh.prototype.renderVisual.call(this)},Rh.prototype.createLegendTitle=function(t){var e=x({},{color:Z,position:C,align:b},t),i=e.text;t&&!1!==t.visible&&t.text&&(T(e)&&e.visible&&((t=jt(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new Xx(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Rh.prototype.createTitleLayout=function(){this.layout=new Gx({vertical:!0,wrap:!1}),this.container.append(this.layout)},Rh.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},Rh.prototype.appendTitleLayoutContent=function(){this.options.title.position===k?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},i(c=Rh,{position:A,data:[],offsetX:0,offsetY:0,margin:P(2),padding:P(5),border:{color:Z,width:0},item:{cursor:yt,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:yt,opacity:1},area:{type:"square",align:A,width:15,height:15}});const I1=c;function Vh(){Ah.call(this),this._registry=[]}(Ah=w.Class)&&(Vh.__proto__=Ah),((Vh.prototype=Object.create(Ah&&Ah.prototype)).constructor=Vh).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},Vh.prototype.create=function(t,e,i){for(var o=this._registry,r=o[0],n=0;n<o.length;n++){var s=o[n],a=Vn(t,s.seriesTypes),h=Vn(t,en);if(0<a.length-h.length){r=s;break}}return new r.type(a,e,i)},(h=Vh).current=new h;const B1=h;function zh(t){var e=document.createElement("div");return t&&(e.className=t),e}function jh(t){for(var e=t;e&&!Gt(e,"k-handle");)e=e.parentNode;return e}function Dh(t,e,i,o){Ch.call(this);var r=t.element;this.options=x({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof i_,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}(Ch=w.Class)&&(Dh.__proto__=Ch),((Dh.prototype=Object.create(Ch&&Ch.prototype)).constructor=Dh).prototype.onPane=function(t){return this.categoryAxis.pane===t},Dh.prototype.createElements=function(){var t=this.options,e=this.wrapper=zh("k-selector k-pointer-events-none"),i=(Rt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=zh("k-selection k-pointer-events-none")),o=(this.leftMask=zh("k-mask k-pointer-events-none"),this.rightMask=zh("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=zh("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=zh("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=zh("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(zh()),r.appendChild(zh()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),Rt(i,["borderLeftWidth","borderRightWidth","height"])),n=Rt(o,"height").height,s=Rt(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},Rt(o,{top:(i.height-n)/2}),Rt(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},Dh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ee(this.chartElement,((t={})[Sn]=this._mousewheelHandler,t))),this._domEvents=Jx.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)})},Dh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl,i=(this._dateAxis&&x(t,{min:lo(i,t.min),max:lo(i,t.max),from:lo(i,t.from),to:lo(i,t.to)}),Rt(this.chartElement,["paddingLeft","paddingTop"])),o=i.paddingLeft,i=i.paddingTop;this.options=x({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},Dh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(ce(this.chartElement,((t={})[Sn]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Dh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Dh.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},Dh.prototype._start=function(t){var e,i,o=this.options,r=se(t);!this._state&&r&&(e=ne(t),this._pointInPane(e.x,e.y))&&(r=jh(r),i=this.body.getBoundingClientRect(),e=!r&&e.x>=i.x&&e.x<=i.x+i.width&&e.y>=i.y&&e.y<=i.y+i.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(o.from),to:this._index(o.to)}},i=this._rangeEventArgs({from:this._index(o.from),to:this._index(o.to)}),this.trigger(yn,i))&&(this._state=null)},Dh.prototype._press=function(t){(t=this._state?this._state.moveTarget:jh(se(t)))&&xt(t,"k-handle-active")},Dh.prototype._move=function(t){var e,i,o,r,n,s,a,h,p,l,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,i=e.range,u=e.moveTarget,o=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),t=e.startLocation-t.x.location,h=i.from,p=i.to,l=i.to-i.from,c=Rt(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(o?-1:1),u||e.inBody)&&(c=u&&Gt(u,"k-left-handle"),u=u&&Gt(u,"k-right-handle"),e.inBody?(i.from=Math.min(Math.max(s,r-t),a-l),i.to=Math.min(i.from+l,a)):c&&!o||u&&o?(i.from=Math.min(Math.max(s,r-t),a-1),i.to=Math.max(i.from+1,i.to)):(c&&o||u&&!o)&&(i.to=Math.min(Math.max(s+1,n-t),a),i.from=Math.min(i.to-1,i.from)),i.from===h&&i.to===p||(this.move(i.from,i.to),this.trigger(vn,this._rangeEventArgs(i))))},Dh.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&bt(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(mn,this._rangeEventArgs(t)),delete this._state)},Dh.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),o=i.pointCategoryIndex(new L(o.x,i.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},h=3===t.event.which,o=Math.round(r+n/2-o);this._state||h||(this.chart._unsetActivePoint(),i.options.justified||o--,a.from=Math.min(Math.max(s,r-o),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(vn,this._rangeEventArgs(a)),this._end()))},Dh.prototype._mousewheel=function(t){var e,i=this,o=$t(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(vn,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},Dh.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];this._pointInPane(i.pageX,i.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},i=this._rangeEventArgs(this._state.range),this.trigger(yn,i)?this._state=null:t.preventDefault())},Dh.prototype._gestureend=function(){this._state&&(this.trigger(mn,this._rangeEventArgs(this._state.range)),delete this._state)},Dh.prototype._gesturechange=function(t){var e,i,o,r,n,s;this._state&&(r=this.chart,o=this._state,e=this.options,i=this.categoryAxis,o=o.range,s=r._toModelCoordinates(t.touches[0].x.location).x,r=r._toModelCoordinates(t.touches[1].x.location).x,n=Math.min(s,r),s=Math.max(s,r),t.preventDefault(),o.from=i.pointCategoryIndex(new L(n))||e.min,o.to=i.pointCategoryIndex(new L(s))||e.max,this.move(o.from,o.to),this.trigger(vn,this._rangeEventArgs(o)))},Dh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Dh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Dh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Dh.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?t:e,h="x"+(o?2:1),o=this._slot(o?e:t),e=M(o[h]-r.left+n.left),t=(Rt(this.leftMask,{width:e}),Rt(this.selection,{left:e}),o=this._slot(a),M(i.width-(o[h]-r.left+n.left))),a=(Rt(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),Rt(this.rightMask,{left:a}),Rt(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},Dh.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),t=_(this._index(t),o,r),o=_(this._index(e),t+1,r);i.visible&&this.move(t,o),i.from=this._value(t),i.to=this._value(o)},Dh.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=x({},s);if(this._state&&(s=this._state.range),r!==A&&(s.from=_(_(n-t,0,e-1),i,o)),r!==S&&(s.to=_(_(e+t,s.from+1,o),i,o)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Dh.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),i=this._index(i.to),s={from:n,to:i},a=x({},s),h=this.categoryAxis.options.reverse,h=y+(h?"2":"1"),p=this.categoryAxis.lineBox(),h=Math.abs(p[h]-e.x),e=p.width(),p=M(h/e,2),h=M(p*t),e=M((1-p)*t);if((s=this._state?this._state.range:s).from=_(_(n-h,0,i-1),o,r),s.to=_(_(i+e,s.from+1,r),o,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Dh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},i(c=Dh,{visible:!0,mousewheel:{zoom:"both"},min:at,max:st});const L1=c;function Fh(){Ph.apply(this,arguments)}(Ph=l)&&(Fh.__proto__=Ph),((Fh.prototype=Object.create(Ph&&Ph.prototype)).constructor=Fh).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=x({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,Ph.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},Fh.prototype.hide=function(){delete this._current,Ph.prototype.hide.call(this)};const E1=Fh;function Hh(t,e){Th.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}(Th=l)&&(Hh.__proto__=Th),((Hh.prototype=Object.create(Th&&Th.prototype)).constructor=Hh).prototype.showAt=function(t,e){var i,o=Nt(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(o=o[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),e=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:e,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Hh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Hh.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:i?new L(t.x,e.y):new L(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},i(h=Hh,{categoryFormat:"{0:d}"});const R1=h;function Uh(){Mh.apply(this,arguments)}function Nh(){Oh.apply(this,arguments)}function Gh(){Ih.apply(this,arguments)}function Wh(){Bh.apply(this,arguments)}(Mh=w.drawing.Animation)&&(Uh.__proto__=Mh),((Uh.prototype=Object.create(Mh&&Mh.prototype)).constructor=Uh).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,i=i.vertical?v:y,(t=this.fromScale=new w.geometry.Point(1,1))[i]=lr,e.transform(w.geometry.transform().scale(t.x,t.y))):this.abort()},Uh.prototype.step=function(t){var e=Xt(this.fromScale.x,1,t),t=Xt(this.fromScale.y,1,t);this.element.transform(w.geometry.transform().scale(e,t,this.origin))},Uh.prototype.abort=function(){Mh.prototype.abort.call(this),this.element.transform(null)},i(c=Uh,{duration:hr}),w.drawing.AnimationFactory.current.register(_r,c),(Oh=w.drawing.Animation)&&(Nh.__proto__=Oh),((Nh.prototype=Object.create(Oh&&Oh.prototype)).constructor=Nh).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(w.geometry.transform().scale(lr,lr,t))},Nh.prototype.step=function(t){this.element.transform(w.geometry.transform().scale(t,t,this.center))},i(l=Nh,{easing:"easeOutElastic"}),w.drawing.AnimationFactory.current.register(wr,l),(Ih=w.drawing.Animation)&&(Gh.__proto__=Ih),((Gh.prototype=Object.create(Ih&&Ih.prototype)).constructor=Gh).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Gh.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},i(h=Gh,{duration:200,easing:"linear"}),w.drawing.AnimationFactory.current.register(pr,h),(Bh=w.drawing.Animation)&&(Wh.__proto__=Bh),((Wh.prototype=Object.create(Bh&&Bh.prototype)).constructor=Wh).prototype.setup=function(){this.element.transform(w.geometry.transform().scale(lr,lr,this.options.center))},Wh.prototype.step=function(t){this.element.transform(w.geometry.transform().scale(t,t,this.options.center))},i(c=Wh,{easing:"easeOutElastic",duration:hr}),w.drawing.AnimationFactory.current.register(Lr,c);const V1=c;function Xh(){Lh.apply(this,arguments)}function Yh(t,e,i){var o=[],r=e.xMin,n=e.xMax,e=((e=(i||{}).forecast)&&(0<e.before&&(r-=e.before),0<e.after)&&(n+=e.after),(i||{}).samplingInterval),s=O(e,Qe(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function qh(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function Zh(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,n=n.yValue;isFinite(s)&&null!==s&&isFinite(n)&&null!==n&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}}(Lh=Y_)&&(Xh.__proto__=Lh),((Xh.prototype=Object.create(Lh&&Lh.prototype)).constructor=Xh).prototype.render=function(){Lh.prototype.render.call(this),this.renderSegments()},Xh.prototype.createSegment=function(t,e,i){return new(e.style===vr?C_:S_)(t,e,i)},Xh.prototype.animationPoints=function(){return Lh.prototype.animationPoints.call(this).concat(this._segments)},Xh.prototype.createMissingValue=function(t,e){if(e===dr)return Fn((e={x:t.x,y:t.y}).x)||(e.x=0),Fn(e.y)||(e.y=0),e},x((l=Xh).prototype,p);const z1=l,j1=h={exponentialTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Xa(t,s.field)&&(i=(t=Wa(t,(e=s.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:Math.log(t[e])}}))).slope,o=t.intercept,h=t.count,t={xMin:t.xMin,xMax:t.xMax},0<h)?(r=Math.exp(o),n=i,Yh(function(t){return r*Math.exp(n*t)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null},linearTrendline:function(t){var e,i,o,r,n=t.options,s=(t={seriesValues:t.seriesValues,options:n},e=t.options,t=Wa((0,t.seriesValues)(),qh(e.field)),i=t.slope,o=t.intercept,s=t.count,r=t.xMin,t=t.xMax,0<s?Yh(function(t){return i*t+o},{xMin:r,xMax:t},e.trendline):null);return s?Object.assign({},n,{type:"scatterLine",data:s}):null},logarithmicTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,p=(t={seriesValues:t.seriesValues,options:h},a=t.options,t=(0,t.seriesValues)(),Xa(t,"x")&&(i=(p=Wa(t,(e=a.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:t[e]}}))).slope,o=p.intercept,p=p.count,t=Zh(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<p)?(n=i,s=o,Yh(function(t){return n*Math.log(t)+s},t,a.trendline)):null);return p?Object.assign({},h,{type:"scatterLine",data:p}):null},movingAverageTrendline:function(t){var e,i=t.options,o=(o=t.options,t=t.seriesValues,e=(o.trendline||{}).period||2,0<(t=qa(t({before:e,after:e}),qh(o.field),e)).length?t:null);return o?Object.assign({},i,{type:"scatterLine",data:o}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=(t={seriesValues:t.seriesValues,options:r},e=t.seriesValues,i=((t=t.options).trendline||{}).order,n=qh(t.field),e=Za(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?Yh(i,{xMin:o,xMax:e},t.trendline):null);return n?Object.assign({},r,{type:"scatterLine",data:n}):null},powerTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Xa(t,"x")&&(i=(h=Wa(t,(e=s.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:Math.log(t[e])}}))).slope,o=h.intercept,h=h.count,t=Zh(t,qh(s.field)),0<h)?(r=Math.exp(o),n=i,Yh(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null}};function Qh(){Eh.apply(this,arguments)}function Kh(t,e,i,o){x([].concat(i?t.yAxis:t.xAxis)[e],o)}(Eh=o1)&&(Qh.__proto__=Eh),((Qh.prototype=Object.create(Eh&&Eh.prototype)).constructor=Qh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new E_,this.yAxisRangeTracker=new E_},Qh.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(Vn(r,Nr),o),this.createScatterLineChart(Vn(r,Gr),o),this.createBubbleChart(Vn(r,wr),o))}this.createAxes(t)},Qh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Eh.prototype.appendChart.call(this,t,e)},Qh.prototype.removeAxis=function(t){var e=t.options.name;Eh.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},Qh.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Nt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Nt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Qh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Y_(this,{series:t,clip:e.options.clip}),e)},Qh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new z1(this,{series:t,clip:e.options.clip}),e)},Qh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Z_(this,{series:t,clip:e.options.clip}),e)},Qh.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=x({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=Ln(a.type,bn),h=s.query(),p=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||h||p,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===i&&!f){f=y_.current.bindPoint(d,0).valueFields;l.push(f[e?"y":"x"]);break}}0===i&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){o=!0;break}p=new(Ln(a.type,J)||!a.type&&o?r_:t?n_:o_)(s.min,s.max,a,this.chartService);if(p.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=p}return this.appendAxis(p),p},Qh.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},Qh.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new L(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p],c=l.options.vertical?h:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<h.length&&t.trigger(i,{element:se(e),originalEvent:e,x:Un(a),y:Un(h)})},Qh.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Kh(this.options,o,i,e),Kh(this.originalOptions,o,i,e)},Qh.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=Ga(j1,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},Qh.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},i(c=Qh,{xAxis:{},yAxis:{}}),x(c.prototype,r1);const D1=c;($h=R)&&(ap.__proto__=$h),((ap.prototype=Object.create($h&&$h.prototype)).constructor=ap).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},ap.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);t.visible&&(i||0===i)&&(t.position===b||t.position===wn?(t.color||(t.color=Lx(this.options.color)),t.background||(t.background=this.options.color)):(e=e.theme.seriesDefaults.labels,t.color=t.color||e.color,t.background=t.background||e.background),this.label=new Xx(i,x({},t,{align:b,vAlign:"",animation:{type:pr,delay:this.animationDelay}}),this.pointData()),this.append(this.label))},ap.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},ap.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},ap.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,h=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):r.position===wn?(s.radius=s.radius-e/2,t=s.point(h),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(h)).x>=s.center.x?(o=t.x+i,n.orientation=A):(o=t.x-i,n.orientation=S),n.reflow(new E(o,t.y-e,t.x,t.y))))},ap.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;$h.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value&&(o.visual?(t=(i.startAngle+180)%360,(t=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new w.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new w.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},ap.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},o=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},r=i.color,n={color:r,opacity:i.opacity},o=this.createSegment(e,x({fill:n,stroke:{opacity:i.opacity},zIndex:i.zIndex},o));t.append(o),Dn(i)&&t.append(this.createGradientOverlay(o,{baseColor:r,fallbackFill:n},x({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},ap.prototype.createSegment=function(t,e){return e.singleSegment?new w.drawing.Circle(new w.geometry.Circle(new w.geometry.Point(t.center.x,t.center.y),t.radius),e):Dx.current.createRing(t,e)},ap.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),$h.prototype.createAnimation.call(this)},ap.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,x({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},ap.prototype.highlightVisual=function(){return this.visual.children[0]},ap.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new w.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},ap.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight.border.width,t=this.createSegment(this.sector,x({},t,{stroke:{width:2*e}})),e=new w.drawing.MultiPath;return e.paths.push(w.drawing.Path.fromRect(t.bbox())),e.paths.push(this.createSegment(this.sector,{})),t.clip(e),t},ap.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=le(e+180),e=M(Math.sin(t),tt),t=M(Math.cos(t),tt),{horizontal:Math.abs(e)>tp?b:t<0?A:S,vertical:Math.abs(e)<Jh?b:e<0?k:C})}},ap.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ap.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},ap.prototype.getIndex=function(){return this.index};var $h,p=ap,Jh=M(le(30),tt),tp=M(le(60),tt),ep,ip,l,op,h,rp,np,sp,c;function ap(t,e,i){$h.call(this,i),this.value=t,this.sector=e}i(p,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:t,margin:P(.5),align:Q,zIndex:1,position:kn},animation:{type:Lr},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:e,className:o,ariaRoleDescription:$r}}),x(p.prototype,b_),x(p.prototype,V_);const F1=p,H1={createLegendItem:function(t,e,i){var o,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},h=s.labels||{};i&&!1!==i.visibleInLegend&&(a=!(r=!1!==i.visible)&&jt(h)||jt(a),n=i.category,a&&(n=a({text:n,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=(r?(o={},e):(o={color:h.color,font:h.font},s.markers||{})).color,Fn(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,labels:o})}};function hp(t,e){ep.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function pp(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),o=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=o&&(i=n/o,r=new L(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))),r}(ep=R)&&(hp.__proto__=ep),((hp.prototype=Object.create(ep&&ep.prototype)).constructor=hp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},hp.prototype.traverseDataPoints=function(t){for(var e=this.options,i=this.plotArea.options.seriesColors,o=(i=void 0===i?[]:i).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,p=In(a),l=p.total,c=p.points,p=p.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/p),void 0),f=(T(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===kn&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==h.length&&Boolean(y.explode),Mt(a.color)||(a.color=y.color||i[g%o]),t(v,new zx(null,0,0,f,m),{owner:this,category:T(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==l?v/l:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},hp.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Rn(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},hp.prototype.addValue=function(t,e,i){var o=x({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new F1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},hp.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs,r=(void 0===o&&(o=[]),i.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,h=s-.85*s,p=new E(n.x1,n.y1,n.x1+s,n.y1+s),s=p.center(),n=n.center(),l=e.series.length,c=[],u=[],e=O(e.padding,h);this.targetBox=t,e=a-5<e?a-5:e,p.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new L(d+p.x1+e,d+p.y1+e),g=0;g<r;g++){var y=i[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,o.length&&(x=o[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===l-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(p),y.label);x&&x.options.position===kn&&m===l-1&&(x.orientation===A?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=p},hp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},hp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},hp.prototype.distanceBetweenLabels=function(t){var e=he(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=M(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var h=t[a+1].box,n=t[a].box,s=M(h.y1-n.y2);r.push(s)}return s=M(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},hp.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},hp.prototype._takeDistance=function(t,e,i,o){var r;return 0<t[i]&&(o-=r=Math.min(t[i],o),t[i]-=r,t[e]+=r),o},hp.prototype.reflowLabels=function(t,e){var i,o=he(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var p=0;p<s;p++){var l=e[p],c=l.box;h+=t[p],i=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),l.orientation===A),l.orientation===A?(n.align!==Q&&(i=r.radius+r.center.x+a),l.reflow(new E(i+c.width(),h,i,h))):(n.align!==Q&&(i=r.center.x-r.radius-a),l.reflow(new E(i-c.width(),h,i,h))),h+=c.height()}},hp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;ep.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,h,p,l,c=e[o],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new w.drawing.Path({stroke:{color:g,width:t.width},animation:{type:pr,delay:c.animationDelay}}),d.options.position===kn)&&(r=d.box,n=u.center,l=u.point(f),s=new L(r.x1,r.center().y),p=h=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===A?(p=pp(n,l,s,h=new L(r.x1-t.padding,r.center().y)),s=new L(h.x-4,h.y),(p=p||s).x=Math.min(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===Ar||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))):(p=pp(n,l,s,h=new L(r.x2+t.padding,r.center().y)),s=new L(h.x+4,h.y),(p=p||s).x=Math.max(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===Ar||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))),g.lineTo(h.x,h.y),this._connectorLines.push(g),this.visual.append(g))}},hp.prototype.renderVisual=function(){var t,e,i,o;ep.prototype.renderVisual.call(this),we(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),o=this.visual.bbox())&&(i=o.bottomRight(),(o=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1)&&this.visual.transform(w.geometry.transform().scale(o,o,[e.x,e.y]))},hp.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},hp.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,e=e.center,s=e.x,e=e.y,i=Math.min(Math.abs(e-i),Math.abs(e-o));return n<i?t:s+Math.sqrt(n*n-i*i)*(r?1:-1)},hp.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},hp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},hp.prototype.animationDelay=function(t){return 70*t},hp.prototype.stackRoot=function(){return this},i(l=hp,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(l.prototype,H1),l.prototype.isStackRoot=!0;const U1=l;function lp(){ip.apply(this,arguments)}(ip=o1)&&(lp.__proto__=ip),((lp.prototype=Object.create(ip&&ip.prototype)).constructor=lp).prototype.render=function(){this.createPieChart(this.series)},lp.prototype.createPieChart=function(t){var e=t[0],t=new U1(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},lp.prototype.appendChart=function(t,e){ip.prototype.appendChart.call(this,t,e),te(this.options.legend.data,t.legendItems)},lp.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},lp.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)};const N1=lp;function cp(){op.apply(this,arguments)}(op=F1)&&(cp.__proto__=op),((cp.prototype=Object.create(op&&op.prototype)).constructor=cp).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===b?(o.radius-=(o.radius-o.innerRadius)/2,e=o.point(r),i.reflow(new E(e.x,e.y-t/2,e.x,e.y))):op.prototype.reflowLabel.call(this))},cp.prototype.createSegment=function(t,e){return Dx.current.createRing(t,e)},i(h=cp,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:Lr}}),x(h.prototype,b_);const G1=h;function up(){rp.apply(this,arguments)}(rp=U1)&&(up.__proto__=rp),((up.prototype=Object.create(rp&&rp.prototype)).constructor=up).prototype.addValue=function(t,e,i){var o=x({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new G1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},up.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),o=Math.min(o.width(),o.height()),r=o/2,n=i.series,s=n.length,i=O(i.padding,o-.85*o),a=r-(i=r-5<i?r-5:i),h=0,p=0;p<s;p++){var l=n[p];0===p&&T(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),T(l.size)?a-=l.size:h++,T(l.margin)&&p!==s-1&&(a-=l.margin)}T(e)||(a-=e=(r-i)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+O(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}rp.prototype.reflow.call(this,t)},up.prototype.animationDelay=function(t,e,i){return 50*t+hr*(e+1)/(i+1)},i(c=up,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const W1=c;function dp(){np.apply(this,arguments)}(np=N1)&&(dp.__proto__=np),((dp.prototype=Object.create(np&&np.prototype)).constructor=dp).prototype.render=function(){this.createDonutChart(this.series)},dp.prototype.createDonutChart=function(t){var e=t[0],t=new W1(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},dp.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},dp.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)};const X1=dp;function fp(){sp.apply(this,arguments)}(sp=o1)&&(fp.__proto__=sp),((fp.prototype=Object.create(sp&&sp.prototype)).constructor=fp).prototype.initFields=function(){this.valueAxisRangeTracker=new E_},fp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},fp.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),i=this.polarAxis.getSlot(0).center,i=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(i)},fp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,i=e.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=o.type===bn?(t=l_,{min:.1,max:1}):(t=p_,{min:0,max:1}),e=e.query(name)||i||r,r=(e&&i&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max)),new t(e.min,e.max,o,this.chartService));this.valueAxis=r,this.appendAxis(r)},fp.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),t=P(t.padding||{},r),r=o.clone().unpad(t),o=r.clone(),t=(o.y2=o.y1+Math.min(o.width(),o.height()),o.align(r,v,b),o.clone().shrink(0,o.height()/2)),r=(i.reflow(o),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=o,this.alignAxes(o)},fp.prototype.backgroundBox=function(){return this.box},fp.prototype.detachLabels=function(){};var gp,t=fp,p,yp,vp,mp,xp,l,_p,h;function bp(){gp.apply(this,arguments)}(gp=Y_)&&(bp.__proto__=gp),((bp.prototype=Object.create(gp&&gp.prototype)).constructor=bp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=L.onCircle(t.center,t.startAngle,e);return new E(t.x,t.y,t.x,t.y)},i(p=bp,{clip:!1});const Y1=p;function wp(){yp.apply(this,arguments)}(yp=z1)&&(wp.__proto__=yp),(l=(wp.prototype=Object.create(yp&&yp.prototype)).constructor=wp).prototype.pointSlot=Y1.prototype.pointSlot,i(l,{clip:!1});const q1=l;function kp(){vp.apply(this,arguments)}(vp=B_)&&(kp.__proto__=vp),((kp.prototype=Object.create(vp&&vp.prototype)).constructor=kp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},kp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},kp.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new c_(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o};const Z1=kp;function Sp(){mp.apply(this,arguments)}(mp=O_)&&(Sp.__proto__=mp),((Sp.prototype=Object.create(mp&&mp.prototype)).constructor=Sp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new w.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const Q1=Sp;function Ap(){xp.apply(this,arguments)}function Cp(t,e){return t.value.x-e.value.x}(xp=q1)&&(Ap.__proto__=xp),((Ap.prototype=Object.create(xp&&xp.prototype)).constructor=Ap).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===vr?Z1:Q1)(t,e,i)},Ap.prototype.createMissingValue=function(t,e){var i;return Fn(t.x)&&e!==fr&&(i={x:t.x,y:t.y},e===dr)&&(i.y=0),i},Ap.prototype.seriesMissingValues=function(t){return t.missingValues||dr},Ap.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Ap.prototype.sortPoints=function(t){if(t.sort(Cp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||Fn(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t};const K1=Ap;function Pp(){_p.apply(this,arguments)}(_p=t)&&(Pp.__proto__=_p),((Pp.prototype=Object.create(_p&&_p.prototype)).constructor=Pp).prototype.createPolarAxis=function(){var t=new h_(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Pp.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),_p.prototype.render.call(this)},Pp.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:N},minorGridLines:{type:N}},this.options.yAxis)},Pp.prototype.createValueAxis=function(){_p.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Pp.prototype.trendlineFactory=function(t,e){t=D1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=Rr),t},Pp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),o1.prototype.appendChart.call(this,t,e)},Pp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Vn(t,[Rr]),e),this.createScatterChart(Vn(t,[Vr]),e),this.createAreaChart(Vn(t,[Er]),e)},Pp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new q1(this,{series:t}),this.appendChart(t,e))},Pp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new Y1(this,{series:t}),this.appendChart(t,e))},Pp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new K1(this,{series:t}),this.appendChart(t,e))},Pp.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new L(o.x,o.y),r=this.axisX.getValue(o),o=this.axisY.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:se(e),x:r,y:o})},Pp.prototype.createCrosshairs=function(){},i(h=Pp,{xAxis:{},yAxis:{}}),x(h.prototype,r1,{seriesValues:D1.prototype.seriesValues});var Tp,Mp,Op,Ip,c=h,p,Bp,l,Lp,Ep,h,Rp,p,Vp,l;function zp(){Tp.apply(this,arguments)}(Tp=M_)&&(zp.__proto__=Tp),((zp.prototype=Object.create(Tp&&Tp.prototype)).constructor=zp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=L.onCircle(t.center,t.middle(),e);return new E(t.x,t.y,t.x,t.y)},zp.prototype.renderSegments=function(){if(Tp.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],r=he(n),r=he(r.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o)&&r&&he(n).linePoints.push(i)}},zp.prototype.createSegment=function(t,e,i){var i=new(e.style===vr?C_:S_)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==fr||(i.options.closed=!0),i},i(p=zp,{clip:!1,limitPoints:!1});const $1=p;function jp(){Mp.apply(this,arguments)}(Mp=B_)&&(jp.__proto__=Mp),((jp.prototype=Object.create(Mp&&Mp.prototype)).constructor=jp).prototype.fillToAxes=function(){};const J1=jp;function Dp(){Op.apply(this,arguments)}(Op=O_)&&(Dp.__proto__=Op),((Dp.prototype=Object.create(Op&&Op.prototype)).constructor=Dp).prototype.fillToAxes=function(){};const tb=Dp;function Fp(){Ip.apply(this,arguments)}(Ip=$1)&&(Fp.__proto__=Ip),((Fp.prototype=Object.create(Ip&&Ip.prototype)).constructor=Fp).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,h=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),h===vr?(s=new J1(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new tb(t,e,i,r,n)),s},Fp.prototype.seriesMissingValues=function(t){return t.missingValues||dr};const eb=Fp;function Hp(t,e){Bp.call(this,t,null,e)}(Bp=G1)&&(Hp.__proto__=Bp),((Hp.prototype=Object.create(Bp&&Bp.prototype)).constructor=Hp).prototype.getIndex=function(){return this.categoryIx},i(l=Hp,{overlay:{gradient:"none"},labels:{distance:10}});const ib=l;function Up(t){Lp.call(this,t),this.forEach=t.rtl?Ns:Us}(Lp=R)&&(Up.__proto__=Lp),((Up.prototype=Object.create(Lp&&Lp.prototype)).constructor=Up).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,n=i.angle/(t+o+r*(t-1)),s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},i(h=Up,{gap:1,spacing:0});const ob=h;function Np(){Ep.apply(this,arguments)}(Ep=R)&&(Np.__proto__=Ep),((Np.prototype=Object.create(Ep&&Ep.prototype)).constructor=Np).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new E;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const rb=Np;function Gp(){Rp.apply(this,arguments)}(Rp=F_)&&(Gp.__proto__=Rp),((Gp.prototype=Object.create(Rp&&Rp.prototype)).constructor=Gp).prototype.pointType=function(){return ib},Gp.prototype.clusterType=function(){return ob},Gp.prototype.stackType=function(){return rb},Gp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Gp.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Gp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Gp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Rp.prototype.createAnimation.call(this)},(p=Gp).prototype.reflow=__.prototype.reflow,i(p,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const nb=p;function Wp(){Vp.apply(this,arguments)}(Vp=t)&&(Wp.__proto__=Vp),((Wp.prototype=Object.create(Vp&&Vp.prototype)).constructor=Wp).prototype.createPolarAxis=function(){var t=new a_(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},Wp.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:N},minorGridLines:{type:N}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},Wp.prototype.aggregateCategories=function(){_1.prototype.aggregateCategories.call(this,this.panes)},Wp.prototype.createCategoryAxesLabels=function(){_1.prototype.createCategoryAxesLabels.call(this,this.panes)},Wp.prototype.filterSeries=function(t){return t},Wp.prototype.trendlineFactory=function(t,e){t=_1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=Dr),t},Wp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Vn(t,[zr]),e),this.createLineChart(Vn(t,[Dr]),e),this.createBarChart(Vn(t,[jr]),e)},Wp.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},Wp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new eb(this,this.chartOptions(t)),this.appendChart(t,e))},Wp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new $1(this,this.chartOptions(t)),this.appendChart(t,e))},Wp.prototype.createBarChart=function(t,e){var i,o,r,n;0!==t.length&&(n=t[0],i=this.chartOptions(t),o=(t=this.filterVisibleSeries(t)).some(function(t){return t.stack}),r=t.some(function(t){return t.stack&&"100%"===t.stack.type}),i.gap=n.gap,i.spacing=n.spacing,i.defaultStack=n.stack&&1<t.length,i.isStacked=o&&1<t.length,i.isStacked100=r&&1<t.length,n=new nb(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},Wp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Wp.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new L(o.x,o.y),r=this.categoryAxis.getCategory(o),o=this.valueAxis.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:se(e),category:r,value:o})},Wp.prototype.createCrosshairs=function(){},Wp.prototype._pointsByVertical=function(t){return Vp.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},Wp.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},x((l=Wp).prototype,r1,{appendChart:_1.prototype.appendChart,aggregateSeries:_1.prototype.aggregateSeries,seriesSourcePoints:_1.prototype.seriesSourcePoints,seriesValues:_1.prototype.seriesValues}),i(l,{categoryAxis:{categories:[]},valueAxis:{}});var Xp,h=l,p,Yp,qp,Zp,t;function Qp(t,e,i){Xp.call(this,e),this.value=t,this.options.index=i.index}(Xp=R)&&(Qp.__proto__=Xp),((Qp.prototype=Object.create(Xp&&Xp.prototype)).constructor=Qp).prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Qp.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new E(o,e[0].y,r,e[2].y),i&&i.reflow(new E(t.x1,e[0].y,t.x2,e[2].y))},Qp.prototype.createVisual=function(){var t=this,e=this.options;Xp.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},Qp.prototype.createPath=function(){var t=this.options,e=t.border;return w.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Qp.prototype.createHighlight=function(t){return w.drawing.Path.fromPoints(this.points,t)},Qp.prototype.highlightVisual=function(){return this.visual.children[0]},Qp.prototype.highlightVisualArgs=function(){var t=w.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Qp.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight.border.width,t=w.drawing.Path.fromPoints(this.points,x({},t,{stroke:{width:2*e}})).close(),i=new w.drawing.MultiPath;return i.paths.push(w.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(w.drawing.Path.fromPoints(this.points)),t.clip(i),t},Qp.prototype.tooltipAnchor=function(){var t=this.box;return{point:new L(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Qp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Qp.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Qp.prototype.getIndex=function(){return this.index},i(p=Qp,{color:a,border:{width:1},labels:{format:""},accessibility:{role:e,className:o,ariaRoleDescription:$r}}),x(p.prototype,b_),x(p.prototype,V_);const sb=p;function Kp(t,e){Yp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}(Yp=R)&&(Kp.__proto__=Yp),((Kp.prototype=Object.create(Yp&&Yp.prototype)).constructor=Kp).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},Kp.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,i=(void 0===e&&(e=[]),t.series[0]),o=i.data;if(o)for(var t=In(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(a=p.fields,Mt(i.color)||(i.color=a.color||e[s%e.length]),a=x({index:s,owner:this,series:i,seriesIx:0,dataItem:o[s],percentage:p.value/r},a,{visible:p.visible}),p=p.valueFields.value,h=this.createSegment(p,a),p=this.createLabel(p,a),h)&&p&&h.append(p)}},Kp.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Rn(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},Kp.prototype.createSegment=function(t,e){var i=x({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible)return t=new sb(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},Kp.prototype.createLabel=function(t,e){var i,o=e.series,r=e.dataItem,n=x({},this.options.labels,o.labels),s=t;if(n.visible)return i=jt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o},i?s=i(r):n.format&&(s=this.chartService.format.auto(n.format,s)),n.color||(n.color=Lx(o.color),n.background)||(n.background=o.color),this.evalSegmentOptions(n,t,e),i=new Xx(s,x({vAlign:n.position},n),r),this.labels.push(i),i},Kp.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==b&&(o=t[i].box.width(),r===S?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Kp.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var p=s.percentage/a.percentage*e,l=(e-p)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=o.dynamicHeight?i*d:i/n,d=_(d?(e-p*(f/d))/2:f?0:e/2,0,e);g.push(new w.geometry.Point(t.x1+l,t.y1+c)),g.push(new w.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new w.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new w.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+o.segmentSpacing,p=_(e-2*(l=d),0,e)}},Kp.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,h=s?0:(e-e/o.neckRatio)/2,p=((s?e:e-2*h)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?p*d:p/n,d=o.dynamicHeight?i*d:i/n;u.push(new w.geometry.Point(t.x1+h,t.y1+l)),u.push(new w.geometry.Point(t.x1+e-h,t.y1+l)),u.push(new w.geometry.Point(t.x1+e-h-f,t.y1+d+l)),u.push(new w.geometry.Point(t.x1+h+f,t.y1+d+l)),h+=f,l+=d+o.segmentSpacing}},Kp.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},i(t=Kp,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),x(t.prototype,H1);const ab=t;function $p(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,qp.call(this,t,e)}(qp=ab)&&($p.__proto__=qp);const hb=($p.prototype=Object.create(qp&&qp.prototype)).constructor=$p;function Jp(){Zp.apply(this,arguments)}(Zp=o1)&&(Jp.__proto__=Zp),((Jp.prototype=Object.create(Zp&&Zp.prototype)).constructor=Jp).prototype.render=function(){this.createChart(ab,Vn(this.series,[Pr])),this.createChart(hb,Vn(this.series,[Tr]))},Jp.prototype.createChart=function(t,e){var i=e[0];i&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight}),this.appendChart(t))},Jp.prototype.appendChart=function(t,e){Zp.prototype.appendChart.call(this,t,e),te(this.options.legend.data,t.legendItems)},Jp.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},Jp.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},Jp.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)};var tl,l=Jp,p,el,t,il,e;function ol(t,e){tl.call(this),this.options=e,this.color=e.color||a,this.value=t}(tl=R)&&(ol.__proto__=tl),((ol.prototype=Object.create(tl&&tl.prototype)).constructor=ol).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},ol.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},ol.prototype.createLabelElement=function(t){var e=(e=t.color)||Lx(this.color);return new Xx(this.getLabelText(t),x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},ol.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},ol.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ol.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},ol.prototype.createVisual=function(){tl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},ol.prototype.markerBox=function(){var t,e=this.options.markers,i=e.border,o=this.box.toRect(),r=O(e.type,"rect")===ct,i=O(i.width,r?1:0),r=Math.round(i/2);return e.size&&(t=o.center(),o.size.width=o.size.height=e.size,o.origin.x=Math.round(t.x-o.size.width/2),o.origin.y=Math.round(t.y-o.size.height/2)),o.size.width-=i,o.size.height-=i,o.origin.y+=r+.5,o.origin.x+=r+.5,di(o)},ol.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=O(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},ol.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Hx({type:O(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:O(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=e,this.append(e)},ol.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,i=new Hx({type:O(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:O(e.zIndex,this.series.zIndex)}),e=(i.reflow(this.markerBox()),i.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},ol.prototype.highlightVisual=function(){return this.rectVisual},ol.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},ol.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.accessibility.highlight,t=new Hx({type:O(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 t.reflow(this.markerBox()),t.getElement()},ol.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new L(t,e),align:{horizontal:b,vertical:k}}},ol.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ol.prototype.unclipElements=function(){},ol.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},x((p=ol).prototype,b_),x(p.prototype,w_),x(p.prototype,V_),p.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:e,className:o,ariaRoleDescription:$r}};const pb=p;function rl(t,e){el.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(el=R)&&(rl.__proto__=el),((rl.prototype=Object.create(el&&el.prototype)).constructor=rl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:st,max:at},this._evalSeries=[]},rl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},rl.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;T(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))}},rl.prototype.addValue=function(t,e){var i;t&&T(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},rl.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=Rn(t,{},n,!0)),t);return s&&Rn(r=x({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},rl.prototype.pointType=function(){return pb},rl.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=x({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},rl.prototype.createPoint=function(t,e){var i,o,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(Mt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===i&&(i=.05),o=(0,w.parseColor)(e),r=1-i,a=function(t){var e=o.toHSL(),i=100-e.l;return e.l+=Math.min((r-t)*i,i),e.toCss()}(t.value/this.valueRange.max)),new pb(t,s));return n.color=a,this.append(n),n},rl.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{xAxis:o,yAxis:i};throw new Error("Unable to locate Y axis with name "+t)},rl.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,h=0;this.traverseDataPoints(function(t,e){var i=s[h++],e=n.seriesAxes(e.series),o=e.xAxis,e=e.yAxis,r=o.categoryIndex(t.x),t=e.categoryIndex(t.y),o=o.getSlot(r,r,a),r=e.getSlot(t,t,a);i&&(o&&r?(e=n.pointSlot(o,r),i.reflow(e)):i.visible=!1)}),this.box=t},rl.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},rl.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),p=0;p<o.data.length;p++){var l=this.plotArea.bindPoint(o,p),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=h.min<=d&&d<=h.max;u&&d&&t(c,x({pointIx:p,series:o,seriesIx:i,dataItem:o.data[p],owner:this},l))}},rl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},rl.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},i(t=rl,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const lb=t;function nl(){il.apply(this,arguments)}function sl(t,e){return t instanceof Date&&e instanceof Date?so(t,e):t===e}function al(t,e,i,o){x([].concat(i?t.yAxis:t.xAxis)[e],o)}(il=o1)&&(nl.__proto__=il),((nl.prototype=Object.create(il&&il.prototype)).constructor=nl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},nl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},nl.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,r=r.yAxis,s=Ie(n.categories||[]),a=Ie(r.categories||[]),h=0;h<o.length;h++){var p=y_.current.bindPoint(i,h).valueFields,l=p.x,p=p.y;s.has(l)||s.add(l),a.has(p)||a.add(p)}n.categories=s.values(),r.categories=a.values()}},nl.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(Vn(r,[Mr]),o)}},nl.prototype.createHeatmapChart=function(t,e){t=new lb(this,{series:t});this.appendChart(t,e)},nl.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Nt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Nt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},nl.prototype.seriesAxes=function(t){var e=this.options,i=[].concat(e.xAxis),o=t.xAxis,i=o?i.find(function(t){return t.name===o}):i[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!i)throw new Error("Unable to locate X axis with name "+o);if(t)return{xAxis:i,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},nl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},nl.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],h=this.series,p=0;p<h.length;p++){var l=h[p],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===i&&!c){c=y_.current.bindPoint(l,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){o=!0;break}t=new(Ln(s.type,J)||!s.type&&o?i_:e_)(s,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.indexCategories(),t},nl.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},nl.prototype.removeAxis=function(t){var e=t.options.name;il.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},nl.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new L(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p];Tn(l.options.vertical?h:a,l.getCategory(r))}0<a.length&&0<h.length&&t.trigger(i,{element:se(e),originalEvent:e,x:Un(a),y:Un(h)})},nl.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);al(this.options,o,i,e),al(this.originalOptions,o,i,e)},nl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},nl.prototype._pointsByVertical=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisX.options.reverse?-1*e:e),o=this.axisX.children,r=o[Tt(this._getPointAxisXIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return sl(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},nl.prototype._pointsByHorizontal=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisY.options.reverse?-1*e:e),o=this.axisY.children,r=o[Tt(this._getPointAxisYIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return sl(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},nl.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},nl.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},nl.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return sl(e,t.value)})},i(e=nl,{xAxis:{},yAxis:{}}),x(e.prototype,r1);var hl,o=e,$r="color",p="first",t="max",e="noteText",pl=(B1.current.register(_1,[_r,Ar,Ir,qr,xr,Wr,Sr,Br,kr,Yr,br,Xr,Ur,Hr,Qr,Or,Fr,Zr].concat(en)),B1.current.register(D1,[Nr,Gr,wr].concat(en)),B1.current.register(N1,[Lr]),B1.current.register(X1,[Cr]),B1.current.register(l,[Pr,Tr]),B1.current.register(c,[Er,Rr,Vr].concat(en)),B1.current.register(h,[zr,jr,Dr].concat(en)),B1.current.register(o,[Mr]),y_.current.register([_r,Ar,Ir,qr,xr,Wr],[ft],[Jr,$r,e,cr,ur,tn]),y_.current.register([Ur,Hr,Fr,Zr],["from","to"],[Jr,$r,e,tn]),y_.current.register([Qr,Or],[ft],[Jr,$r,e,"summary",tn]),y_.current.register([Er,Rr,Vr],[y,v],[$r,tn]),y_.current.register([zr,jr,Dr],[ft],[Jr,$r,tn]),y_.current.register([Pr,Tr],[ft],[Jr,$r,"visibleInLegend","visible",tn]),s1.current.register([_r,Ar,Ir,qr,xr,Wr,Qr,Or],{value:t,color:p,noteText:p,errorLow:"min",errorHigh:t}),s1.current.register([Ur,Hr,Fr,Zr],{from:"min",to:t,color:p,noteText:p}),s1.current.register([zr,jr,Dr],{value:t,color:p}),y_.current.register([Nr,Gr,wr],[y,v],[$r,e,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),y_.current.register([wr],[y,v,"size"],[$r,Jr,e]),y_.current.register([Mr],[y,v,ft],[$r,e]),y_.current.register([Sr,Br],["open","high","low","close"],[Jr,$r,"downColor",e]),s1.current.register([Sr,Br],{open:t,high:t,low:"min",close:t,color:p,downColor:p,noteText:p}),y_.current.register([br,Xr],["lower","q1","median","q3","upper","mean","outliers"],[Jr,$r,e,tn]),s1.current.register([br,Xr],{lower:t,q1:t,median:t,q3:t,upper:t,mean:t,outliers:p,color:p,noteText:p}),y_.current.register([kr,Yr],["current","target"],[Jr,$r,"visibleInLegend",e,tn]),s1.current.register([kr,Yr],{current:t,target:t,color:p,noteText:p}),y_.current.register([Lr,Cr],[ft],[Jr,$r,"explode","visibleInLegend","visible",tn]),[Jr,ft,y,v]),ll="mousemove",cl="contextmenu",ul="mouseleave",dl="keydown",l;function g(t,e,i,o){var r=this,o=(void 0===o&&(o={}),hl.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new $x(this,o),this.chartService.theme=i,this._initElement(t),x({},this.options,e));this._originalOptions=x({},o),this._theme=i,this._initTheme(o,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),Bx.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function fl(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function gl(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 yl(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}(hl=w.Class)&&(g.__proto__=hl),((g.prototype=Object.create(hl&&hl.prototype)).constructor=g).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");t.firstChild;)t.removeChild(t.firstChild);this.element=t},g.prototype._setElementClass=function(t){xt(t,"k-chart")},g.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i;for(var n=t,s=pl,a=0;a<s.length;a++){var h=s[a]+"Axes";n[h]&&(n[s[a]+"Axis"]=n[h],delete n[h])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,St(t.title)&&(t.title={text:t.title}),this.options=x({},e,t),this.applySeriesColors()},g.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)}},g.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&we(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},g.prototype._resize=function(){this._noTransitionsRedraw()},g.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},g.prototype.getAxis=function(t){return qo(t,this._plotArea.axes)},g.prototype.findAxisByName=function(t){return this.getAxis(t)},g.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new d_(e[i])},g.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new d_(e[t])},g.prototype.plotArea=function(){return new f_(this._plotArea)},g.prototype.toggleHighlight=function(t,e){var i,o,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=Mt(e)?r.filterPoints(e):(Bt(e)?(i=e.series,o=e.category):i=o=e,n.type===Cr?fl(r.pointsBySeriesName(i),o):u(n.type,[Lr,Pr,Tr])?fl((r.charts[0]||{}).points,o):r.pointsBySeriesName(i));e&&this.togglePointsHighlight(t,e)},g.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},g.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;Mt(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&T(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(n=this._plotArea.pointsByCategoryIndex(i),r.showAt(n)):e&&r.show(e)},g.prototype.hideTooltip=function(){this._tooltip.hide()},g.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&re(e,{width:i.width}),i.height&&re(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=w.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},g.prototype._surfaceWrap=function(){return this.element},g.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 b1,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),_l(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},g.prototype._redrawFocusHighlight=function(){var t=this._focusState,e=t.legendInFocus,t=t.preserveHighlight;e&&t&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)},g.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,t=St(t)?t:t.description||t.text;t&&this.element.setAttribute("aria-roledescription",t)},g.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(i=this.options,t=x({},t.options,{chartArea:{width:t.width,height:t.height}}),xl(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),_l(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},g.prototype._sharedTooltip=function(){return this._plotArea instanceof _1&&this.options.tooltip&&this.options.tooltip.shared},g.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new w1(this._plotArea,t.pannable))},g.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new k1(this,e))},g.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new S1(this,e))},g.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==i||this.requiresHandlers([un,ln,cn])),i=(!1===e||!1===o)&&!this.requiresHandlers([dn,fn,gn]),e=this.element;this._dragZoomEnabled&&t&&i?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&i||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!i)},g.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom)&&i.toggleZoom(e)},g.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new E1(this.chartService,t)},g.prototype._createSharedTooltip=function(t){return new R1(this._plotArea,t)},g.prototype.applyDefaults=function(t,e){var i,o,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||o.color,e=x({},s,s[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[i],e}for(var h=0;h<pl.length;h++)o=n.axisDefaults||{},r=(r=[].concat(n[i=pl[h]+"Axis"])).map(a),n[i]=1<r.length?r:r[0];var p=t,t=e,l=p.series,c=l.length,u=p.seriesDefaults,d=x({},p.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);gl(d),gl(g);for(var y=0;y<c;y++){var v=l[y].type||p.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:p.tooltip},d,u[v]);l[y]._defaults=v,l[y]=x({},v,l[y]),l[y].data=l[y].data||[]}},g.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},g.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new Nx(this._modelOptions()),o=(i.chart=this,i._plotArea=e,Yx.buildTitle(t.title)),r=Yx.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return i.append.apply(i,Yx.orderTitles([o,r])),t.legend&&t.legend.visible&&(o=new I1(e.options.legend,this.chartService),i.append(o),i._legend=o),i.append(e),i.reflow(),i},g.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return x({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},g.prototype._createPlotArea=function(t){var e=this.options;return B1.current.create(t?[]:e.series,e,this.chartService)},g.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof e_&&n.select&&!n.vertical&&(o=r.range(),r=new L1(this,r,x({min:o.min,max:o.max},n.select)),e.push(r))}},g.prototype._selectStart=function(t){return this.trigger(yn,t)},g.prototype._select=function(t){return this.trigger(vn,t)},g.prototype._selectEnd=function(t){return this.trigger(mn,t)},g.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._mousemove=(0,w.throttle)(this._mousemove.bind(this),20)},g.prototype.addObserver=function(t){t&&this.observers.push(t)},g.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},g.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},g.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===xn?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===sn?this._updateDrilldownPoint(e.point):t===an?this._resetDrilldownPoint():t===rn?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===on&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},g.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ee(e,((t={})[cl]=this._clickHandler,t[Sn]=this._mousewheelHandler,t[ul]=this._mouseleaveHandler,t[dl]=this._keydownHandler,t.mousedown=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&ee(e,((t={})[ll]=this._mousemove,t)),this.domEvents=Jx.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()},g.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(pn)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},g.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},g.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},g.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(gn,{}))},g.prototype._gesturechange=function(t){var e,i,o=this._mousewheelZoom;o&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e))&&(e=Math.round(10*e),this._gestureDistance=t.distance,i={delta:e,axisRanges:yl(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger(dn,i)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(i.axisRanges=o.updateRanges(e,t))&&!this.trigger(fn,i)&&o.zoom()))},g.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},g.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([un,ln,cn])&&this._startNavigation(t,e,un),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(dn,{axisRanges:yl(this._plotArea.axes),originalEvent:t})},g.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(ln,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,h=n[s];h.options.name&&0!=(a=(a=h.options.vertical?t.y:t.x).startLocation-a.location)&&(r[h.options.name]=h.translateRange(a))}e.axisRanges=r,this.trigger(ln,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},g.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(cn,{axisRanges:yl(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,cn),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(fn,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(gn,{axisRanges:e,originalEvent:t})))},g.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},g.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return O(t.rate,.3)},g.prototype._mousewheel=function(t){var e=this,i=$t(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:yl(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(dn,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger(fn,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(gn,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=o||this._startNavigation(t,r,dn)?o:this._navState){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,h={},p=0;p<a.length;p++){var l=a[p],c=l.options.name;c&&(h[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(fn,{delta:i,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,gn)},150)}}},g.prototype._startNavigation=function(t,e,i){var o,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(o=yl(r),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:o,pane:e,axes:r}))},g.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},g.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},g.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),o=i&&(o=o.closest(i))&&o.aliasFor?o.aliasFor():o},g.prototype._eventCoordinates=function(t){t=ne(t);return this._toModelCoordinates(t.x,t.y)},g.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=Rt(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},g.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=oe(this.element);return{left:M(t.x+e.left+i.left),top:M(t.y+e.top+i.top)}},g.prototype._toModelCoordinates=function(t,e){var i=this.element,o=oe(i),r=this._elementPadding(),i=Ce(i).invert(),t=new w.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new L(t.x,t.y)},g.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},g.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},g.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},g.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===C||t===S)},g.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},g.prototype._keydown=function(t){var e,i=this._focusState,o=i.legendInFocus,i=i.focusedElement,r=this._legend;"Tab"===t.key?(this._clearFocusedElement(),e=this._isLegendBeforeChart(),o&&e!==t.shiftKey?this._navigatePoints(t):!o&&e===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)):"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)},g.prototype._navigatePoints=function(e){var i=this,o=this._focusState,t=this._plotArea;if(o.legendInFocus=!1,o.focusedElement){var r=function(t){o.focusedPoint=t,i._focusElement(o.focusedPoint),i._displayTooltip(t),e.preventDefault()};switch(e.key){case Y:r(t.getPointToTheRight(o.focusedPoint));break;case X:r(t.getPointToTheLeft(o.focusedPoint));break;case W:r(t.getPointBelow(o.focusedPoint));break;case G:r(t.getPointAbove(o.focusedPoint))}}else this._focusFirstPoint(),e.preventDefault()},g.prototype._navigateLegend=function(e){var i=this,o=this._focusState,t=this._legend,r=this.chartService.rtl;if(o.legendInFocus=!0,o.focusedElement){var n=t.getItems().length,s=function(t){o.focusedLegendItemIndex=t(o.focusedLegendItemIndex,n),i._focusElement(i._getFocusedLegendItem()),e.preventDefault()};switch(e.key){case G:case X:s(r?Ct:Pt);break;case W:case Y:s(r?Pt:Ct)}}else this._focusFirstLegendItem(),e.preventDefault()},g.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},g.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},g.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},g.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},g.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},g.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},g.prototype._focusLegendItem=function(e){var t=this._focusState;t.focusedLegendItemIndex=this._legend.getItems().findIndex(function(t){return t.options.series.index===e.seriesIndex&&t.options.pointIndex===e.pointIndex}),t.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},g.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},g.prototype._focusElement=function(t,e){var i=this._focusState;this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e)&&(t.focusVisual(),i.legendInFocus?(e=t.options,this._showSeriesInactiveOpacity(e.series.index,e.pointIndex)):this._showInactiveOpacity(t))},g.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},g.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(q,t._id)},g.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(q)},g.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility,t=(e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription),i.ariaChecked);return T(t)&&e.setAttribute("aria-checked",t),e},g.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},g.prototype._startHover=function(t,e){var i;return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof o1)}),i=this._activePoint,this._updateHoveredPoint(t,e),t&&i!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),this._showInactiveOpacity(t))),t)},g.prototype._displayTooltip=function(t){x({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},g.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},g.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);o&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,o))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},g.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},g.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},g.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},g.prototype._updateDrilldownPoint=function(t){t&&t.series&&y_.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},g.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},g.prototype._startDrilldown=function(t){var e,i;t&&t.series&&(e=t.series,i=y_.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:i,sender:this})},g.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},g.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&(a.highlight||{}).visible&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},g.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},g.prototype._showInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},g.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;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)},g.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},g.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},g.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},g.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),ee(document,((t={})[ll]=this._mouseMoveTrackHandler,t)))},g.prototype._mouseMoveTracking=function(t){var e=this.options,i=this._tooltip,o=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&((this._activePoint=n).hover(this,t)||(x({},e.tooltip,n.options.tooltip).visible&&i.show(n),o.show(n))):(ce(document,((t={})[ll]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},g.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(e),i.hover&&((i=i.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger(pn))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},g.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},g.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,h,p;this._suppressHover||(o=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&i?((p=(h=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=h,0<a.length&&!this.trigger(nn,p)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},g.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},g.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()},g.prototype._deferRedraw=function(){this._redraw()},g.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},g.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},g.prototype.bindCategoryAxisFromSeries=function(i,e){var o=this,r=new Set,t=this.options.series.filter(function(t){return t.categoryAxis===i.name||!t.categoryAxis&&0===e}),n=t.some(function(t){return Boolean(t.categoryField)}),t=t.filter(function(t){return t.data&&0<t.data.length}),s=t.map(function(t){return y_.current.bindPoint(t,0).fields.category}),a=s.reduce(function(t,e){return t||Hn(i,e)},!1);t.filter(function(t,e){return t.categoryField||T(s[e])}).forEach(function(i){return i.data.forEach(function(t,e){e=y_.current.bindPoint(i,e).fields.category;a&&(e=(t=jn(e,t,o.chartService.intl))?t.getTime():void 0),r.add(e)})}),0<r.size?(t=Array.from(r.values()),a&&(t=t.sort().map(function(t){return t&&new Date(t)})),i.categories=t):n&&(i.categories=[])},g.prototype._isBindable=function(t){for(var e=y_.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===ft?r="field":r+="Field",!T(t[r])){i=!1;break}}return i},g.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},g.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},g.prototype._showSeriesInactiveOpacity=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[Lr,Cr,Pr,Tr])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},g.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([hn,pn])},g.prototype.updateMouseMoveHandler=function(){var t;ce(this.element,((t={})[ll]=this._mousemove,t)),this._shouldAttachMouseMove()&&ee(this.element,((t={})[ll]=this._mousemove,t))},g.prototype.applyOptions=function(t,e){xl(this._originalOptions,t),this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},g.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},g.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},g.prototype.setIntlService=function(t){this.chartService.intl=t},g.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},g.prototype.destroy=function(){var t;this._destroyed=!0,ce(this.element,((t={})[cl]=this._clickHandler,t[Sn]=this._mousewheelHandler,t[ll]=this._mousemove,t[ul]=this._mouseleaveHandler,t[dl]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&ce(document,((t={})[ll]=this._mouseMoveTrackHandler,t)),this._focusState=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},g.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},g.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},g.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)};var vl,ml=["data","categories"];function xl(t,e){for(var i in e){var o,r,n;!u(i,ml)&&Le(e,i)&&(o=e[i],r=t[i],T(r))&&((n=null===o)||!T(o)?(delete t[i],n&&delete e[i]):r&&Bt(o)&&Bt(r)&&xl(r,o))}}function _l(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}i(l=g,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{highlight:{border:{opacity:1,color:Z,width:2}}}},categoryAxis:{},seriesDefaults:{type:Ar,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{highlight:{border:{opacity:1,width:2},zIndex:200}}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const cb=l;function bl(){vl.apply(this,arguments)}(vl=R1)&&(bl.__proto__=vl),((bl.prototype=Object.create(vl&&vl.prototype)).constructor=bl).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new L(this.plotArea.box.x2,e.center().y):new L(e.center().x,-2),align:o}},bl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const ub=bl;var wl=[_r,kr],kl,Sl,c,Al,h;function Cl(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function Pl(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function Tl(t){return m(t)?[t]:t}function Ml(){kl.apply(this,arguments)}(kl=cb)&&(Ml.__proto__=kl),((Ml.prototype=Object.create(kl&&kl.prototype)).constructor=Ml).prototype._setElementClass=function(t){xt(t,"k-sparkline")},Ml.prototype._initElement=function(t){kl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(re(t).width)},Ml.prototype._resize=function(){var t=this.element,e=Cl(t.childNodes);this._initialWidth=Math.floor(re(t).width),Pl(t.childNodes,e),kl.prototype._resize.call(this)},Ml.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Cl(e.childNodes),o=document.createElement("span"),t=(o.innerHTML="&nbsp;",e.appendChild(o),x({width:this._autoWidth,height:re(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return re(e,{width:t.width,height:t.height}),e.removeChild(o),Pl(e.childNodes,i),this.surface&&this.surface.resize(),t},Ml.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Ml.prototype._createPlotArea=function(t){t=kl.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Ml.prototype._calculateWidth=function(t){for(var e=this.options,i=P(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],h=(a.options.series||[])[0];if(h){if(h.type===_r)return 150;if(h.type===kr)return 150;if(h.type===Lr)return re(r).height;var p=a.categoryAxis;p&&(p=p.categoriesCount()*(!a.options.isStacked&&u(h.type,[Ar,Yr])?a.seriesOptions.length:1),n=Math.max(n,p))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},Ml.prototype._createSharedTooltip=function(t){return new ub(this._plotArea,t)},Ml.normalizeOptions=function(t){t=Tl(t);return(t=mt(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:Tl(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,wl)||u(t.seriesDefaults.type,wl)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t},i(c=Ml,{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 db=c;function Ol(){Sl.apply(this,arguments)}(Sl=w.drawing.Animation)&&(Ol.__proto__=Sl),((Ol.prototype=Object.create(Sl&&Sl.prototype)).constructor=Ol).prototype.setup=function(){this._initialOpacity=parseFloat(Rt(this.element,"opacity").opacity)},Ol.prototype.step=function(t){Rt(this.element,{opacity:String(Xt(this._initialOpacity,0,t))})},Ol.prototype.abort=function(){Sl.prototype.abort.call(this),Rt(this.element,{display:"none",opacity:String(this._initialOpacity)})},Ol.prototype.cancel=function(){Sl.prototype.abort.call(this),Rt(this.element,{opacity:String(this._initialOpacity)})};const fb=Ol;function Il(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}function Bl(t,e,i){Al.call(this),this.options=x({},this.options,i),this.container=t,this.chartService=e;i=Rt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),t.appendChild(this.element)}(Al=w.Class)&&(Bl.__proto__=Al),((Bl.prototype=Object.create(Al&&Al.prototype)).constructor=Bl).prototype.createElements=function(){var t=this.element=Il("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Il("k-tooltip k-chart-tooltip"),i=this.scroll=Il("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},Bl.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=$i(no(t)+no(e-t)/2),h=.4*i.width(),p=i.center().x-h,l=(i.center().x-p)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=jt(r),r=(this.clearHideTimeout(),this._visible||(Rt(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,Rt(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),Rt(s,["marginTop","borderTopWidth","height"]));Rt(n,{width:h,left:p+a*l,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),Rt(o,{visibility:"visible"})},Bl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Bl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new fb(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},Bl.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},i(h=Bl,{format:"{0:d} - {1:d}",hideDelay:500});const gb=h;var Ll,El="_navigator",Rl=El,Vl="_default",zl,o;function jl(t){Ll.call(this),this.chart=t;var e=this.options=x({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),T(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Ix(this,((i={})[ln]="_drag",i[cn]="_dragEnd",i[fn]="_zoom",i[gn]="_zoomEnd",i)),t.addObserver(this.chartObserver)}function Dl(){}(Ll=w.Class)&&(jl.__proto__=Ll),((jl.prototype=Object.create(Ll&&Ll.prototype)).constructor=jl).prototype.parseDate=function(t){return lo(this.chart.chartService.intl,t)},jl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},jl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},jl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},jl.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,o=o.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,h=(Dl.prototype=i,new Dl);0!==i.categoriesCount()&&(this.clean(),h.box=i.box,this.selection=new L1(t,h,{min:r,max:o,from:s||r,to:a||o,mousewheel:O(n,{zoom:"left"}),visible:e.visible},new Ix(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new gb(t.element,t.chartService,{min:r,max:o,template:jt(e.hint),format:e.hint.format}))},jl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Rl].roundedRange(),e=t.min,t=t.max,i=this.options.select||{},o=i.from||e,r=i.to||t;this.options.select=x({},i,{from:o=o<e?e:o,to:r=t<r?t:r}),this.filterAxes()},jl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(he(e.panes),t)},jl.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==El});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},jl.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(o),o=e._plotArea.categoryAxis,e=t.axisRanges[o.options.name],t=this.options.select;e&&!r&&i&&(o=t.from&&t.to?no(t.to)-no(t.from):no(i.options.to)-no(i.options.from),r=$i(_(no(e.min),n.min,no(n.max)-o)),t=$i(_(no(r)+o,no(n.min)+o,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(r,t),this.showHint(r,t))},jl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},jl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},jl.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,i=(t=void 0===t?{}:t).from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==El&&(n.min=i,n.max=o)}},jl.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:o.from,to:o.to},"category"!==e.options.type&&(e=new i_(x({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,t.from=to(e.min,-e.baseUnitStep,e.baseUnit),t.to=to(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},jl.prototype._zoom=function(t){var e,i,o=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),h=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),i=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<a-e?(r.zoom(h,i),this.readSelection()):(o.options.min=s.from,s.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),i).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},jl.prototype._zoomEnd=function(t){this._dragEnd(t)},jl.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},jl.prototype._selectStart=function(t){return this.chart._selectStart(t)},jl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},jl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},jl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Rl]},jl.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},jl.setup=function(t,e){var i,o,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,i=x({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=x({},i.pane,{name:El}),i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach(function(t){t.name=t.name||Vl}),jl.attachAxes(t,i),jl.attachSeries(t,i,e))},jl.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),i=(o.concat(t).forEach(function(t){t.pane=t.pane||Vl}),0===Vn(i,Kr).length),i=x({type:"date",pane:El,roundToBaseUnit:!i,justified:i,_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]}}),r=e.categoryAxis;o.push(x({},i,{maxDateGroups:200},r,{name:Rl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},i,r,{name:Rl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},i,r,{name:Rl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Rl,pane:El,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},jl.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(x({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Rl,categoryAxis:Rl,autoBind:e.autoBindElements}))};const yb=jl;function Fl(){zl.apply(this,arguments)}(zl=cb)&&(Fl.__proto__=zl),((Fl.prototype=Object.create(zl&&zl.prototype)).constructor=Fl).prototype.applyDefaults=function(t,e){var i=re(this.element).width||600,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&x({},e,i);yb.setup(t,e),zl.prototype.applyDefaults.call(this,t,e)},Fl.prototype._setElementClass=function(t){xt(t,"k-chart k-stockchart")},Fl.prototype.setOptions=function(t){this.destroyNavigator(),zl.prototype.setOptions.call(this,t)},Fl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Fl.prototype._resize=function(){this.noTransitionsRedraw()},Fl.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Fl.prototype._dirty=function(){var t=this.options,t=Nt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Fl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new yb(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),zl.prototype._redraw.call(this),t.initSelection()},Fl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===El?this._unsetActivePoint():zl.prototype._trackSharedTooltip.call(this,t)},Fl.prototype.bindCategories=function(){zl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Fl.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===Rl?t=o.categories:t&&o.pane===El&&(o.categories=t)}},Fl.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Fl.prototype.destroy=function(){this.destroyNavigator(),zl.prototype.destroy.call(this)},Fl.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return zl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===El},Fl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},i(o=Fl,{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 vb=o;var Hl="arrowPointer",Ul="barPointer",Nl=Math.PI/180,Gl="inside",e="linear",Wl="outside",t="radialPointer",p="radialRangePointer";function Xl(t,e){var i=t.getOrigin(),o=t.getSize(),e=P(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var Yl=w.drawing.Group,ql=w.drawing.Path,Zl=w.drawing.Text;function Ql(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=ql.fromRect(new w.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new Zl(t.text,new w.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=Xl(t.bbox().clone(),e.padding),e=ql.fromRect(o,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),o=new Yl;return o.append(i),o.append(e),o.append(t),o}function Kl(t,e,i){var o=T(t.from)?t.from:at,r=T(t.to)?t.to:st;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function $l(t,e){e=P(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Xl(t,e)}var Jl,tc=w.drawing.Path,ec=w.drawing.Surface,$r;function ic(t,e,i,o){void 0===o&&(o={}),Jl.call(this),this.element=t,this.theme=i,this.contextService=new $x(this,o),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(i),this.redraw()}(Jl=w.Class)&&(ic.__proto__=Jl),((ic.prototype=Object.create(Jl&&Jl.prototype)).constructor=ic).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},ic.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},ic.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},ic.prototype.exportVisual=function(){return this._visuals},ic.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(mt(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},ic.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},ic.prototype.resize=function(){this.noTransitionsRedraw()},ic.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},ic.prototype.redraw=function(){var t=this._surfaceSize(),t=new w.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),$l(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},ic.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},ic.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},ic.prototype.setIntlService=function(t){this.contextService.intl=t},ic.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=x({},e,this.options),this.options),i=t.pointer;if(mt(i)){for(var o=[],r=0;r<i.length;r++)o.push(x({},e.pointer,i[r]));t.pointer=o}},ic.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new w.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=$l(e,i.width)),tc.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},ic.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();re(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=ec.create(i,{type:t.renderAs}))},ic.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},ic.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},ic.prototype.getSize=function(){return this._getSize()},ic.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},ic.prototype._defaultSize=function(){return{width:200,height:200}},ic.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},i($r=ic,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const mb=$r;var oc=w.drawing.Path,rc=w.drawing.Group,nc=w.geometry.Point,sc,tn,ac,Jr,hc,l,c,pc,h;function lc(t,e,i,o){var r,n,s,a,h,p,l=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<l;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,p=h=a=s=void 0,a=(r=i).position,h=i.tickX,p=i.tickY,r=i.vertical?(s=new nc(h,a),new nc(h+n.size,a)):(s=new nc(a,p),new nc(a,p+n.size)),new oc({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}function cc(t,e){t=t||{};!T(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),sc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}(sc=o_)&&(cc.__proto__=sc),((cc.prototype=Object.create(sc&&sc.prototype)).constructor=cc).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Qe(t.min,t.max),t},cc.prototype.initFields=function(){},cc.prototype.render=function(){var t=this.elements=new rc,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},cc.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new rc,a=n.length,h=t.rangeSize||t.minorTicks.size/2,p=0;p<a;p++){var l=Kl(n[p],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(oc.fromRect(new w.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},cc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new rc,o=0;o<t.length;o++)i.append(Ql(t[o],e.labels));return i},cc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new rc;return 0<t.width&&t.visible&&((t=new oc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},cc.prototype.renderTicks=function(){var t=new rc,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return lc(t,this.getMajorTickPositions(),o,e.majorTicks),lc(t,this.getMinorTickPositions(),o,x({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},i(tn=cc,{min:0,max:50,majorTicks:{size:15,align:Gl,color:Z,width:.5,visible:!0},minorTicks:{size:10,align:Gl,color:Z,width:.5,visible:!0},line:{width:.5},labels:{position:Gl,padding:2},mirror:!1,_alignLines:!1});const xb=tn;function uc(t,e){ac.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=x({},this.options,e);e.fill=e.color,this.scale=t,T(e.value)?e.value=_(e.value,o,i):e.value=o}function dc(t,e){hc.call(this,t,e),this.options=x({track:{visible:T(e.track)}},this.options)}(ac=w.Class)&&(uc.__proto__=ac),((uc.prototype=Object.create(ac&&ac.prototype)).constructor=uc).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=T(e._oldValue)?e.value:o,e.value=_(t,o,i),this.elements&&this.repaint()},i(Jr=uc,{color:Z}),(hc=l=Jr)&&(dc.__proto__=hc),((dc.prototype=Object.create(hc&&hc.prototype)).constructor=dc).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=o.track.size||o.size,h=o.size/2,p=P(o.margin),p=n?p[s?"left":"right"]:p[s?"bottom":"top"],p=s?-p:p;n?(i=new E(r.x1+p,r.y1,r.x1+p,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==Ul&&(t=e=new E(r.x2+p,r.y1-h,r.x2+p,r.y2+h))):(i=new E(r.x1,r.y1-p,r.x2,r.y1-p),s?i.y2+=a:i.y1-=a,o.shape!==Ul&&(t=e=new E(r.x1-h,r.y1-p,r.x2+h,r.y1-p))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},dc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:T(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},dc.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,i=t.mirror,t=t.vertical,e=P(e.margin);return t?e[i?"left":"right"]:e[i?"bottom":"top"]},i(c=dc,{shape:Ul,track:{border:{width:1}},color:Z,border:{width:1},opacity:1,margin:P(3),animation:{type:Ul},visible:!0});const _b=c;function fc(){pc.apply(this,arguments)}(pc=w.drawing.Animation)&&(fc.__proto__=pc),((fc.prototype=Object.create(pc&&pc.prototype)).constructor=fc).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e),this.fromScale=new w.geometry.Point(i.x1,i.y1)),n=this.toScale=new w.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},fc.prototype.step=function(t){var e=Xt(this.fromScale.x,this.toScale.x,t),t=Xt(this.fromScale.y,this.toScale.y,t);this.element.transform(w.geometry.transform().translate(e,t))},i(h=fc,{easing:e,duration:250}),w.drawing.AnimationFactory.current.register(Hl,h);const bb=h;var gc,yc=w.geometry.Point,vc=w.drawing.Path,mc,o;function xc(t,e){gc.call(this,t,e),T(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(gc=_b)&&(xc.__proto__=gc),((xc.prototype=Object.create(gc&&gc.prototype)).constructor=xc).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new yc(0,0-i),new yc(0-o*e,0),new yc(0,0+i)]:[new yc(0-i,0),new yc(0,0+o*e),new yc(0+i,0)]},xc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new bb(this.elements,x(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},xc.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=Hl,new vc({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close()),o=t.getSlot(e.value);return i.transform(w.geometry.transform().translate(o.x1,o.y1)),this.elements=i};const wb=xc;function _c(){mc.apply(this,arguments)}(mc=w.drawing.Animation)&&(_c.__proto__=mc),((_c.prototype=Object.create(mc&&mc.prototype)).constructor=_c).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},_c.prototype.step=function(t){t=Xt(this.from,this.to,t);this._set(t)},_c.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},i(o=_c,{easing:e,speed:250}),w.drawing.AnimationFactory.current.register(Ul,o);const kb=o;var bc,wc=w.drawing.Group,kc=w.drawing.Path;function Sc(t,e){bc.call(this,t,e),T(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(bc=_b)&&(Sc.__proto__=bc),((Sc.prototype=Object.create(bc&&bc.prototype)).constructor=Sc).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,o=o.vertical,r=r===o?-1:1,i=i.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=o?v:y,s=o?y:v,r=this._margin()*r,a=new w.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new w.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],o?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return o?(t.translate(i,0),e.translate(i,0)):(t.translate(0,i),e.translate(0,i)),[a,n,t,e]},Sc.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue),o=(o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close(),new kb(o,x(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]})));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},Sc.prototype.render=function(){var t=new wc,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new kc({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},Sc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new kc.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const Sb=Sc;var Ac,Cc=w.drawing.Group,$r;function Pc(){Ac.apply(this,arguments)}(Ac=mb)&&(Pc.__proto__=Ac),((Pc.prototype=Object.create(Ac&&Ac.prototype)).constructor=Pc).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new E(i,o,i+t.width(),o+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Pc.prototype._buildVisual=function(){var t=new Cc,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},Pc.prototype._createModel=function(){var t=this.options,e=this.scale=new xb(t.scale,this.contextService);this.pointers=[];for(var i=mt(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=x({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?wb:Sb;this.pointers.push(new n(e,r))}},Pc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Pc.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new E(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new E(t.x1,r.y-e,t.x2,r.y+e))},Pc.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new E(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new E(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},Pc.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},Pc.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},i($r=Pc,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const Ab=$r;var Tc=w.drawing.Arc,Mc=w.drawing.Path,Oc=w.drawing.Group,Ic,tn,Bc,Jr;function Lc(t,e,i,o){var r=new Oc,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),p=new w.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new Mc({stroke:{color:o.color,width:o.width}}).moveTo(h).lineTo(p))}return r}function Ec(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}function Rc(t,e){Ic.call(this,0,1,t,e)}(Ic=o_)&&(Rc.__proto__=Ic),((Rc.prototype=Object.create(Ic&&Ic.prototype)).constructor=Rc).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||Qe(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Rc.prototype.initFields=function(){},Rc.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Rc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!T(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Rc.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-i)/(o-i)*s:(t-i)/(o-i)*s+n)+180},Rc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Rc.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,i=0;return e.visible&&(i=e.size),i=t.visible?Math.max(t.size,i):i},Rc.prototype.labelsCount=function(){var t=Ic.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Rc.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new Oc,s=.05*i,a=(T(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),h=a.position===Gl,p=T(this.labelElements);h&&(i-=this.ticksSize(),this.hasRanges()&&!p&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,c=l.length,r=P(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=o[f],x=(m-180)*Nl,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(h?1:-1),m=m.y+Math.sin(x)*(v+d)*(h?1:-1),x=(g.reflow(new E(_-y,m-v,_+y,m+v)),new w.geometry.Point(g.box.x1,g.box.y1)),_=void 0;p?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||w.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=Ql(g,t.labels),n.append(_)),this.bbox=w.geometry.Rect.union(this.bbox,_.bbox())}return n},Rc.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,e=e.rangeSize,o=this.getRangeRadius();this.options.labels.position===Gl&&(o+=e+i);for(var r=o+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=w.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Rc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Oc;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var h=t[a],p=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-p!=0&&i.append(this.createRange(p,l,s,h))}}return i},Rc.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,i=new w.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new Tc(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},Rc.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(Ec(r,n,s));for(var a=0;a<i;a++)for(var h=Kl(e[a],r,n),p=o.length,l=0;l<p;l++){var c=o[l];if(c.from<=h.from&&h.from<=c.to){o.push(Ec(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&o.push(Ec(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return o},Rc.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Wl?t.getRadiusX()-r-o-i:t.getRadiusX()-i},Rc.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new w.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},Rc.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=Lc(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new Oc),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===Wl&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=Lc(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},Rc.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},Rc.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;o&&(a+=n,h=-h),360<=n&&i.max%e==0&&--s;for(var p=[],l=0;l<s;l++)p.push(M(a,K)),a+=h;return M(a)<=t.endAngle&&p.push(a),p},Rc.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)},Rc.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===Wl&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,p=a.x-h[0].anchor().x,a=a.y-h[0].anchor().y;t[s].transform((new w.geometry.transform).translate(p,a))}},i(tn=Rc,{min:0,max:100,majorTicks:{size:15,align:Gl,color:Z,width:.5,visible:!0},minorTicks:{size:10,align:Gl,color:Z,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Gl,padding:2}});const Cb=tn;function Vc(t,e){Bc.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}(Bc=w.drawing.Animation)&&(Vc.__proto__=Bc),((Vc.prototype=Object.create(Bc&&Bc.prototype)).constructor=Vc).prototype.step=function(t){var e=this.options,t=Xt(e.oldAngle,e.newAngle,t);this.element.transform(w.geometry.transform().rotate(t,e.center))},i(Jr=Vc,{easing:e,duration:150}),w.drawing.AnimationFactory.current.register(t,Jr);const Pb=Jr;var zc,jc=w.drawing.Circle,Dc=w.drawing.Group,Fc=w.drawing.Path,c;function Hc(){zc.apply(this,arguments)}(zc=l)&&(Hc.__proto__=zc),((Hc.prototype=Object.create(zc&&zc.prototype)).constructor=Hc).prototype.setAngle=function(t){this.elements.transform(w.geometry.transform().rotate(t,this.center))},Hc.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new Pb(this.elements,x(e.animation,{oldAngle:i,newAngle:t})).play()},Hc.prototype.render=function(){var t=this.scale,e=this.options,i=new Dc;return!1!==e.animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Nl),i},Hc.prototype.reflow=function(t){var e=this.center=t.center,i=_(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(t*this.options.cap.size);this.bbox=w.geometry.Rect.fromPoints(new w.geometry.Point(e.x-i,e.y-i),new w.geometry.Point(e.x+i,e.y+i))},Hc.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Fc({fill:{color:i},stroke:{color:i,width:.5}});return i.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),i},Hc.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new w.geometry.Circle(this.center,this.capSize);return new jc(e,{fill:{color:t},stroke:{color:t}})},i(c=Hc,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:t,duration:150}});const Tb=c;var Uc,Nc=w.drawing.Group,h,Gc,o,Wc,$r,Xc,Yc,qc,tn,Zc,Jr;function Qc(){Uc.apply(this,arguments)}(Uc=mb)&&(Qc.__proto__=Uc),((Qc.prototype=Object.create(Uc&&Uc.prototype)).constructor=Qc).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=w.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},Qc.prototype._buildVisual=function(t,e,i){var o=this._visuals=new Nc;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Qc.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},Qc.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),h=M(a,K),p=M(-a,K),l=0,c=0;!(!(c++<100)||5<(l=n===o?l+1:0)||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||p!==r&&0<=(o=this.getPlotBox(p,t,s))&&o<=2||(r=0<e&&0<o?2*h:e<0&&o<0?2*p:M((h+p)/2||1,K),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(p=r,o=i):(h=r,e=i)},Qc.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=w.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},Qc.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Qc.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,e=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=w.geometry.Rect.union(r.bbox,n[s].bbox)},Qc.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Cb(t.scale,this.contextService);this.pointers=[];for(var o=mt(e)?e:[e],r=0;r<o.length;r++){var n=new Tb(i,x({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},i(h=Qc,{transitions:!0,gaugeArea:{background:""}});const Mb=h;function Kc(){Gc.apply(this,arguments)}(Gc=Cb)&&(Kc.__proto__=Gc),((Kc.prototype=Object.create(Gc&&Gc.prototype)).constructor=Kc).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},Kc.prototype.hasRanges=function(){return!0},Kc.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},Kc.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),o=this.slotAngle(o?t:e),t=this.createRange(r,o,this.getRangeRadius(),i);return this.ranges.append(t),t},i(o=Kc,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const Ob=o;function $c(t,e){Wc.call(this,t,e);var e=this.options,i=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=_(i,150,800),t.elements.options.get("stroke.color")),i=t.currentColor();e!==i&&(this.startColor=new w.Color(e),this.color=new w.Color(i))}(Wc=w.drawing.Animation)&&($c.__proto__=Wc),(($c.prototype=Object.create(Wc&&Wc.prototype)).constructor=$c).prototype.step=function(t){var e,i=this.options,o=this.startColor,r=this.color,i=Xt(i.oldAngle,i.newAngle,t);this.element.angle(i),r&&(i=M(Xt(o.r,r.r,t)),e=M(Xt(o.g,r.g,t)),o=M(Xt(o.b,r.b,t)),this.element.stroke(new w.Color(i,e,o).toHex()))},i($r=$c,{easing:e,duration:150}),w.drawing.AnimationFactory.current.register(p,$r);const Ib=$r;function Jc(){Xc.apply(this,arguments)}(Xc=l)&&(Jc.__proto__=Xc),((Jc.prototype=Object.create(Xc&&Xc.prototype)).constructor=Jc).prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Ib(this,x(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},Jc.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},Jc.prototype.stroke=function(t){this.elements.stroke(t)},Jc.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&x(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}))},Jc.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,t=this.options,o=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(o)for(var s=0;s<o.length;s++){var a=o[s],h=a.color,p=a.from,a=(void 0===p&&(p=e),a.to);if(void 0===a&&(a=i),p<=n&&n<=a)return h}return r},Jc.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},i(tn=Jc,{animation:{type:p,duration:150}});const Bb=tn;function tu(){Yc.apply(this,arguments)}(Yc=Mb)&&(tu.__proto__=Yc),((tu.prototype=Object.create(Yc&&Yc.prototype)).constructor=tu).prototype._initTheme=function(t){Yc.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},tu.prototype._createModel=function(){var t=this.options,e=this.scale=new Ob(t.scale,this.contextService),e=new Bb(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},tu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},tu.prototype._setValueOptions=function(t){this.options.value=t},tu.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},tu.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,o=o.y-e/2;return t<i.width&&(t=r+t,r=Math.max(r,0),t>i.width)&&(r-=t-i.width),e<i.height&&(i=(t=this.scale.bbox).bottomRight().y,e=o+e,o=Math.max(o,t.origin.y),i<e)&&(o-=e-i),{left:r,top:o}};const Lb=tu;function eu(){qc.apply(this,arguments)}(qc=Lb)&&(eu.__proto__=qc),((eu.prototype=Object.create(qc&&qc.prototype)).constructor=eu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,qc.prototype._createModel.call(this)};const Eb=eu;function iu(t){Zc.call(this),this.setOptions(t),this.initProperties()}(Zc=w.Class)&&(iu.__proto__=Zc),((iu.prototype=Object.create(Zc&&Zc.prototype)).constructor=iu).prototype.initProperties=function(){},iu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},iu.prototype.encode=function(t,e,i){t=T(t)?String(t):t;return this.initValue(t,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},iu.prototype.initValue=function(){},iu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},iu.prototype.addData=function(){},iu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},i(Jr=iu,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var ou,ru=Object.assign,t;function nu(){ou.apply(this,arguments)}(ou=Jr)&&(nu.__proto__=ou),((nu.prototype=Object.create(ou&&ou.prototype)).constructor=nu).prototype.initProperties=function(){ou.prototype.initProperties.call(this),ru(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"})},nu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},nu.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()},nu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},nu.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength&&(i=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=i,this.addPattern(this.characterMap[i]))},nu.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},nu.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},nu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},nu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},nu.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},i(t=nu,{addCheckSum:!0});var su,au,hu=Object.assign,c,h;function pu(){su.apply(this,arguments)}function lu(){au.apply(this,arguments)}(au=Jr)&&(lu.__proto__=au),((lu.prototype=Object.create(au&&au.prototype)).constructor=lu).prototype.initProperties=function(){au.prototype.initProperties.call(this),hu(this,{minBaseUnitLength:.7})},lu.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()},lu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},lu.prototype.addBase=function(){},(su=c=lu)&&(pu.__proto__=su),((pu.prototype=Object.create(su&&su.prototype)).constructor=pu).prototype.initProperties=function(){su.prototype.initProperties.call(this),hu(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"}}})},pu.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},pu.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&i<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw o=Math.ceil(this.getBaseWidth(i)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+o+"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))},pu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},pu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},pu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},pu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},pu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},pu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},pu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},i(h=pu,{addCheckSum:!1});var cu,uu,du,fu,gu,yu,vu,mu,xu,_u,bu,wu={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var i=[],o=0;o<this.specialAsciiCodes[t].length;o++)i.push(this.characterMap[this.shiftCharacters[3]]),i.push(this.characterMap[this.specialAsciiCodes[t][o]]);else e=6*Math.floor(t/32)+(t-27)%32+64,i=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return i}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},o=((yu=h)&&(Ru.__proto__=yu),((Ru.prototype=Object.create(yu&&yu.prototype)).constructor=Ru).prototype.initProperties=function(){yu.prototype.initProperties.call(this),x(this,wu,{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}}})},Ru),ku=Object.assign;(gu=c)&&(Eu.__proto__=gu),((Eu.prototype=Object.create(gu&&gu.prototype)).constructor=Eu).prototype.initProperties=function(){gu.prototype.initProperties.call(this),ku(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"}})},Eu.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},Eu.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)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},Eu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},Eu.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},Eu.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},Eu.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},Eu.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},Eu.prototype._getCheckValues=function(){for(var t,e=this.values,i=e.length,o=0,r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r,this.cCheckSumTotal);for(t=o%this.checkSumMod,o=this.weightedValue(t,1,this.kCheckSumTotal),r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r+1,this.kCheckSumTotal);return[t,o%this.checkSumMod]},Eu.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},Eu.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},Eu.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)};var e,$r=((fu=e=Eu)&&(Lu.__proto__=fu),((Lu.prototype=Object.create(fu&&fu.prototype)).constructor=Lu).prototype.initProperties=function(){fu.prototype.initProperties.call(this),x(this,wu,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,i=0;i<t.length;i++)e=t[i],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},Lu),Su=/^\d+$/,Au=Object.assign,l=((du=Jr)&&(Bu.__proto__=du),((Bu.prototype=Object.create(du&&du.prototype)).constructor=Bu).prototype.initProperties=function(){du.prototype.initProperties.call(this),Au(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},Bu.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},Bu.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()},Bu.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},Bu.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},Bu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},Bu.prototype.validate=function(t){if(Su.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},Bu.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},Bu),Cu=/^\d+$/,Pu=/^[a-z0-9]+$/i,Tu=Object.assign;(uu=w.Class)&&(Iu.__proto__=uu),((Iu.prototype=Object.create(uu&&uu.prototype)).constructor=Iu).prototype.initProperties=function(){},Iu.prototype.addStart=function(){},Iu.prototype.is=function(){},Iu.prototype.isCode=function(){return!1},Iu.prototype.move=function(){},Iu.prototype.pushState=function(){};var p,tn=((cu=p=Iu)&&(Ou.__proto__=cu),((Ou.prototype=Object.create(cu&&cu.prototype)).constructor=Ou).prototype.initProperties=function(){cu.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},Ou.prototype.addStart=function(){this.encoding.addPattern(this.START)},Ou.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Ou.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Ou.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;for(u("C",i)&&(i=o.substr(t.index).match(/\d{4,}/g))&&(r=o.indexOf(i[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Ou.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Ou.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Ou.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},Ou.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Ou),Mu={};function Ou(t,e){cu.call(this,t),this.states=e,this._initMoves(e)}function Iu(t){uu.call(this),this.encoding=t,this.initProperties()}function Bu(){du.apply(this,arguments)}function Lu(){fu.apply(this,arguments)}function Eu(){gu.apply(this,arguments)}function Ru(){yu.apply(this,arguments)}function Vu(t,e){vu.call(this,t),this.states=e}function zu(t,e){mu.call(this,t),this._initSubStates(e)}function ju(){xu.apply(this,arguments)}function Du(){_u.apply(this,arguments)}function Fu(){bu.apply(this,arguments)}Mu.A=((bu=tn)&&(Fu.__proto__=bu),((Fu.prototype=Object.create(bu&&bu.prototype)).constructor=Fu).prototype.initProperties=function(){bu.prototype.initProperties.call(this),Tu(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Fu.prototype.isCode=function(t){return 0<=t&&t<96},Fu.prototype.getValue=function(t){return t<32?t+64:t-32},Fu),Mu.B=((_u=tn)&&(Du.__proto__=_u),((Du.prototype=Object.create(_u&&_u.prototype)).constructor=Du).prototype.initProperties=function(){_u.prototype.initProperties.call(this),Tu(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Du.prototype.isCode=function(t){return 32<=t&&t<128},Du.prototype.getValue=function(t){return t-32},Du),Mu.C=((xu=p)&&(ju.__proto__=xu),((ju.prototype=Object.create(xu&&xu.prototype)).constructor=ju).prototype.initProperties=function(){xu.prototype.initProperties.call(this),Tu(this,{key:"C",MOVE:99,START:105})},ju.prototype.addStart=function(){this.encoding.addPattern(this.START)},ju.prototype.is=function(t,e){var i=ed(t,e,4);return(e+4<=t.length||2===t.length)&&Cu.test(i)},ju.prototype.move=function(){this.encoding.addPattern(this.MOVE)},ju.prototype.pushState=function(t){for(var e;(e=ed(t.value,t.index,2))&&Cu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},ju.prototype.getValue=function(t){return t},ju),Mu.FNC4=((mu=p)&&(zu.__proto__=mu),((zu.prototype=Object.create(mu&&mu.prototype)).constructor=zu).prototype.initProperties=function(){mu.prototype.initProperties.call(this),Tu(this,{key:"FNC4",dependentStates:["A","B"]})},zu.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},zu.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},zu.prototype.isCode=function(t){return 128<=t&&t<256},zu.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},zu.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},zu.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},zu.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},zu.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]},zu.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},zu),Mu.FNC1=((vu=p)&&(Vu.__proto__=vu),((Vu.prototype=Object.create(vu&&vu.prototype)).constructor=Vu).prototype.initProperties=function(){vu.prototype.initProperties.call(this),Tu(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})},Vu.prototype.addStart=function(){this.encoding[this.startState].addStart()},Vu.prototype.is=function(){return u(this.key,this.states)},Vu.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,h={state:this.startState};for(r.addPattern(this.START);;){if((e=(h.index=0)<(o=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(h.value=n.substring(a,i).replace(s,""),this.validate(e,h.value),r.pushData(h,this.dependentStates),i>=n.length)break;a=i,h.state!==this.startState&&(r[this.startState].move(h),h.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},Vu.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!Cu.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!Pu.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},Vu.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=ed(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},Vu.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},Vu.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,e),t=t.substring(e+1,i),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},Vu.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&u(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},Vu),(Xu=Jr)&&(td.__proto__=Xu),((td.prototype=Object.create(Xu&&Xu.prototype)).constructor=td).prototype.initProperties=function(){Xu.prototype.initProperties.call(this),Tu(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})},td.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Mu[this.states[t]](this,this.states)},td.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},td.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())},td.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var i;t.shifted?(i=t.state,t.state=t.previousState,t.previousState=i,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},td.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},td.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},td.prototype.addStop=function(){this.addPattern(this.STOP)},td.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},td.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},td.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))};var Hu,Uu,Nu,Gu,Wu,Xu,c,tn=((Wu=c=td)&&(Ju.__proto__=Wu),((Ju.prototype=Object.create(Wu&&Wu.prototype)).constructor=Ju).prototype.initProperties=function(){Wu.prototype.initProperties.call(this),Tu(this,{name:"Code 128 A",states:["A"]})},Ju),p=((Gu=c)&&($u.__proto__=Gu),(($u.prototype=Object.create(Gu&&Gu.prototype)).constructor=$u).prototype.initProperties=function(){Gu.prototype.initProperties.call(this),Tu(this,{name:"Code 128 B",states:["B"]})},$u),Yu=((Nu=c)&&(Ku.__proto__=Nu),((Ku.prototype=Object.create(Nu&&Nu.prototype)).constructor=Ku).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),Tu(this,{name:"Code 128 C",states:["C"]})},Ku),qu=((Uu=c)&&(Qu.__proto__=Uu),((Qu.prototype=Object.create(Uu&&Uu.prototype)).constructor=Qu).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),Tu(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Qu),c=((Hu=c)&&(Zu.__proto__=Hu),((Zu.prototype=Object.create(Hu&&Hu.prototype)).constructor=Zu).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Tu(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},Zu);function Zu(){Hu.apply(this,arguments)}function Qu(){Uu.apply(this,arguments)}function Ku(){Nu.apply(this,arguments)}function $u(){Gu.apply(this,arguments)}function Ju(){Wu.apply(this,arguments)}function td(t){Xu.call(this,t),this._initStates()}function ed(t,e,i){return t.substring(e,e+i)}var id,od,rd,nd,sd,ad,hd,pd=Object.assign;(hd=Jr)&&(Cd.__proto__=hd),((Cd.prototype=Object.create(hd&&hd.prototype)).constructor=Cd).prototype.initProperties=function(){hd.prototype.initProperties.call(this),pd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:fd})},Cd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Cd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Cd.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()},Cd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Cd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Cd.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]])};var ld,cd=((ad=ld=Cd)&&(Ad.__proto__=ad),((Ad.prototype=Object.create(ad&&ad.prototype)).constructor=Ad).prototype.initProperties=function(){ad.prototype.initProperties.call(this),pd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Ad),ud=((sd=ld)&&(Sd.__proto__=sd),((Sd.prototype=Object.create(sd&&sd.prototype)).constructor=Sd).prototype.initProperties=function(){sd.prototype.initProperties.call(this),pd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Sd),dd=((nd=ld)&&(kd.__proto__=nd),((kd.prototype=Object.create(nd&&nd.prototype)).constructor=kd).prototype.initProperties=function(){nd.prototype.initProperties.call(this),pd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},kd),ld=((rd=ld)&&(wd.__proto__=rd),((wd.prototype=Object.create(rd&&rd.prototype)).constructor=wd).prototype.initProperties=function(){rd.prototype.initProperties.call(this),pd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},wd),fd={Modulo10:function(t){for(var e,i,o=[0,""],r=t.length%2,n=0;n<t.length;n++)o[(n+r)%2]+=parseInt(t.charAt(n),10);for(i=o[0],e=(2*o[1]).toString(),n=0;n<e.length;n++)i+=parseInt(e.charAt(n),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},gd=Object.assign,Jr=((od=Jr)&&(bd.__proto__=od),((bd.prototype=Object.create(od&&od.prototype)).constructor=bd).prototype.initProperties=function(){od.prototype.initProperties.call(this),gd(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]}})},bd.prototype.initValue=function(t,e,i){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=i,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},bd.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)},bd.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},bd.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},bd.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},bd),yd=Object.assign,vd=((id=Jr)&&(_d.__proto__=id),((_d.prototype=Object.create(id&&id.prototype)).constructor=_d).prototype.initProperties=function(){id.prototype.initProperties.call(this),yd(this,{name:"EAN 8"})},_d.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},_d),md={code11:t,code39:h,code39extended:o,code93:e,code93extended:$r,code128:qu,code128a:tn,code128b:p,code128c:Yu},xd,t;function _d(){id.apply(this,arguments)}function bd(){od.apply(this,arguments)}function wd(){rd.apply(this,arguments)}function kd(){nd.apply(this,arguments)}function Sd(){sd.apply(this,arguments)}function Ad(){ad.apply(this,arguments)}function Cd(){hd.apply(this,arguments)}function Pd(t,e){var i=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=i,e}function Td(t,e,i){void 0===i&&(i=Be),xd.call(this),this.options=x({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&T(e.value)&&this.redraw()}md["gs1-128"]=c,md.msimod10=cd,md.msimod11=ud,md.msimod1010=dd,md.msimod1110=ld,md.postnet=l,md.ean8=vd,md.ean13=Jr,(xd=w.Class)&&(Td.__proto__=xd),((Td.prototype=Object.create(xd&&xd.prototype)).constructor=Td).prototype.destroy=function(){this._destroySurface()},Td.prototype._initElement=function(){xt(this.element,"k-barcode")},Td.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Td.prototype._createSurface=function(){return w.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Td.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Td.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Td.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Td.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},Td.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)},Td.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Td.prototype._resize=function(){this.redraw()},Td.prototype.createVisual=function(){this.visual=this._render()},Td.prototype._render=function(){var t,e=this.options,i=e.value,o=e.text,r=P(o.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new E(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),p=new w.drawing.Group;this.contentBox=s,p.append(this._getBackground(n)),o.visible&&(h-=w.drawing.util.measureText(i,{font:o.font}).height+r.top+r.bottom);try{t=a.encode(i,s.width(),h)}catch(t){return this.onError(t),p}return o.visible&&(n=i,e.checksum&&T(a.checksum)&&(n+=" "+a.checksum),p.append(this._getText(n))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),p.append(this._bandsGroup),p},Td.prototype.exportVisual=function(){return this._render()},Td.prototype._getSize=function(){var t=Pd(this.element,this.options.renderAs),e=new w.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},Td.prototype.value=function(t){if(!T(t))return this.options.value;this.options.value=String(t),this.redraw()},Td.prototype._getBands=function(t,e){for(var i=this.contentBox,o=i.x1,r=new w.drawing.Group,n=0;n<t.length;n++){var s,a=(s=Bt(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=w.geometry.Rect.fromPoints(new w.geometry.Point(o,s.y1+i.y1),new w.geometry.Point(o+a,s.y2+i.y1)),s=w.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),o+=a}return r},Td.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new E(0,0,t.width,t.height).unpad(i.width/2);return w.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},Td.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new Xx(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},Td.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),!md[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new md[this.type],this.options=x({},this.options,t)},i(t=Td,{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 Rb=t;var Md={width:500,height:100};const Vb=function(t,e){if(void 0===e&&(e=Md),!t)throw new Error("Please specify barcode type to validate.");var i,o,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),md[n])return i=new md[n],o=e,r=s,function(t){try{i.encode(r+t,o.width,o.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var Od=Object.assign;function Id(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function Bd(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Ld(t){return parseInt(t,2)}(Fd=w.Class)&&(Kd.__proto__=Fd),((Kd.prototype=Object.create(Fd&&Fd.prototype)).constructor=Kd).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Kd.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}},Kd.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Ed,Rd,Vd,zd,jd,Dd,Fd,Hd=Kd,Ud=((Dd=w.Class)&&(Qd.__proto__=Dd),(Qd.prototype=Object.create(Dd&&Dd.prototype)).constructor=Qd),Nd=((jd=w.Class)&&(Zd.__proto__=jd),((Zd.prototype=Object.create(jd&&jd.prototype)).constructor=Zd).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],i=0,o=n;for(e.push(Mf(o,mf,xf,_f,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=Mf(o,bf,wf,kf,t);r.mode!==t?(t=r.mode,e.push(r),i++):e[i].modeString+=r.modeString,o=o.substr(r.modeString.length)}return e}(),t=Of(function(t){for(var e=0,i=0;i<t.length;i++)e+=Gd[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var i="",o=0;o<t.length;o++)i+=Gd[t[o].mode].encode(t[o].modeString,e);return i}(e,t);return new Ud(e,t)},Zd);(zd=w.Class)&&(qd.__proto__=zd),((qd.prototype=Object.create(zd&&zd.prototype)).constructor=qd).prototype.initProperties=function(){Od(this,{modeIndicator:"",bitsInCharacterCount:[]})},qd.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},qd.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},qd.prototype.getModeCountString=function(t,e){return this.modeIndicator+Bd(t,this.getBitsCharacterCount(e))},qd.prototype.encode=function(){},qd.prototype.getStringBitsLength=function(){},qd.prototype.getValue=function(){};var h,o=((Vd=h=qd)&&(Yd.__proto__=Vd),((Yd.prototype=Object.create(Vd&&Vd.prototype)).constructor=Yd).prototype.initProperties=function(){Vd.prototype.initProperties.call(this),Od(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},Yd.prototype.getValue=function(t){return parseInt(t,10)},Yd.prototype.encode=function(t,e){for(var i=Id(t,3),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Bd(i[r],10);return o+Bd(i[r],1+3*i[r].length)},Yd.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0==i?0:1)},Yd),e=((Rd=h)&&(Xd.__proto__=Rd),((Xd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Xd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Od(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"})},Xd.prototype.getValue=function(t){return this.characters[t]},Xd.prototype.encode=function(t,e){for(var i=Id(t,2),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Bd(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+Bd(2===i[r].length?45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)):this.getValue(i[r].charAt(0)),1+5*i[r].length)},Xd.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},Xd),$r=((Ed=h)&&(Wd.__proto__=Ed),((Wd.prototype=Object.create(Ed&&Ed.prototype)).constructor=Wd).prototype.initProperties=function(){Ed.prototype.initProperties.call(this),Od(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},Wd.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+'".')},Wd.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=Bd(this.getValue(t.charAt(o)),8);return i},Wd.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},Wd),Gd={};function Wd(){Ed.apply(this,arguments)}function Xd(){Rd.apply(this,arguments)}function Yd(){Vd.apply(this,arguments)}function qd(){zd.call(this),this.initProperties()}function Zd(){jd.apply(this,arguments)}function Qd(t,e){Dd.call(this),this.dataString=t,this.version=e}function Kd(t){Fd.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}Gd.numeric=new o,Gd.alphanumeric=new e,Gd.byte=new $r,($d=w.Class)&&(Af.__proto__=$d),((Af.prototype=Object.create($d&&$d.prototype)).constructor=Af).prototype.initProperties=function(){Od(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Af.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=Of(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new Ud(t,e)},Af.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Af.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},Af.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=Bd(t,8);else{for(var e=8-e,r=0;r<i;r++)o=Bd(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},Af.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1};var $d,Jd=Af,tf=[{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}}],ef="numeric",of="alphanumeric",rf="byte",nf={1:0},sf={0:1},af={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},hf=[1,0,1,1,1],pf=[1,0,1],lf={L:"01",M:"00",Q:"11",H:"10"},cf=["11101100","00010001"],uf=93,df=[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}],ff=/^\d+/,qu="A-Z0-9 $%*+./:-",gf=new RegExp("^[A-Z $%*+./:-]+"),yf=new RegExp("^["+qu+"]+"),vf=new RegExp("^[^"+qu+"]+"),mf=8,xf=5,_f=8,bf=17,wf=9,kf=16,Sf=[[1,0],[1,25,0]];function Af(){$d.call(this),this.initProperties(),this.mode=Gd[this.encodingMode]}function Cf(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function Pf(t,e,i,o){for(var r=0;r<df.length;r++)t[r][i][o]=df[r](i,o)?1^e:parseInt(e,10)}function Tf(t,e){for(var i,o=Sf[e-1],r=new Array(e).concat(t),n=new Array(r.length-o.length).concat(o),s=t.length,a=[],h=0;h<s;h++)i=function(t,e){for(var i=[],o=t.length-1;i[o]=sf[(t[o]+e)%255],void 0!==t[--o];);return i}(n,nf[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var i=[],o=t.length-2;0<=o;o--)i[o]=t[o]^e[o];return i}(i,r);for(h=r.length-1;0<=h;h--)a[e-1-h]=Bd(r[h],8);return a}function Mf(t,e,i,o,r){var n,s=ff.exec(t),s=s?s[0]:"",a=gf.exec(t),a=a?a[0]:"",h=yf.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!yf.test(t.charAt(s.length)))?(n=ef,s):h&&(t.length===h.length||h.length>=o||r===of)?(n=of,s||a):(n=rf,h?h+vf.exec(t.substring(h.length))[0]:vf.exec(t)[0]);return{mode:n,modeString:e}}function Of(t,e){for(var i=0,o=tf.length-1,r=Math.floor(tf.length/2);t<tf[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=tf[i][e].totalDataCodewords?r+1:o+1}function If(t,e,i){var o=Ld(e),e=e.length-1,r=t<<e;return Bd(t,i-e)+Bd(function(t,e){for(var i=e.toString(2).length,o=t.toString(2).length,r=t;i<=(o=(r^=e<<o-i).toString(2).length););return r}(r,o),e)}function Bf(t,e){return parseInt(t.charAt(e),10)}function Lf(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&Cf(t,Bf(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&Cf(t,Bf(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)Cf(t,Bf(e,r-1-o++),n,s);for(Cf(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)Cf(t,Bf(e,r-1-o++),n,s)}function Ef(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,h=0;h<e.length;h++)i=Math.floor(h/3),o=h%3,Cf(t,r=Bf(e,e.length-h-1),0+i,s+o),Cf(t,r,a+o,0+i)}function Rf(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var h=a;h<n-a;h++)Cf(t,r=e[a],i+h,o+a),Cf(t,r,i+a,o+h),Cf(t,r,i+s-h,o+s-a),Cf(t,r,i+s-a,o+s-h)}function Vf(t,e,i,o){for(var r=i,n=o,s=t[0];Cf(t,0,r,o),Cf(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function zf(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,e[t][o]===uf&&(i[t]+=40)}function jf(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function Df(t,e,i){var i=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?Jd:Nd)).getEncodingResult(t,e),r=i.version,n=tf[r-1][e],t=function(t,e){for(var i,o=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var h=s[a][0],p=0;p<h;p++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)i=t.substring(o,o+8),c.push(i),u[l-d]=Ld(i),o+=8;r.push(c),n.push(Tf(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,i=0,o=0,r=t;r.length<e&&i<4;)r+="0000".charAt(i++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=cf[o],o^=1;return r}(i.dataString),n),i=function(){for(var t=[],e=17+4*r,i=0;i<df.length;i++){t[i]=new Array(e);for(var o=0;o<e;o++)t[i][o]=new Array(e)}return t}(),o=(l=(s=i)[0].length,Rf(s,hf,0,0),Vf(s,[-1,-1],7,7),Rf(s,hf,l-7,0),Vf(s,[1,-1],l-8,7),Rf(s,hf,0,l-7),Vf(s,[-1,1],7,l-8),i),s=r;if(!(s<2)){var a,h=o[0],p=h.length,l=Math.floor(s/7),c=[6],u=0;for((s=af[s])?a=(p-13-s)/l:s=a=(p-13)/(l+1),c.push(c[u++]+s);c[u]+a<p;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===h[c[d]][c[f]]&&Rf(o,pf,c[d]-2,c[f]-2)}for(var g=i,y=1,v=g[0].length,m=8;m<v-8;m++)Cf(g,y,6,m),Cf(g,y,m,6),y^=1;7<=r&&Ef(i,Bd(0,18)),Lf(i,Bd(0,15));for(var x,_,b,w=i,k=t,S=new Hd(w[0]),A=0;A<k.length;A++)for(x=k[A],_=0;0<x.length;){for(var C=0;C<x.length;C++)for(var P=0;P<8;P++)b=S.getNextCell(),Pf(w,x[C][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)Pf(w,0,b.row,b.column);l=function(t){for(var e,i=[],o=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)s[h]=[r[h]=i[h]=0,0],n[h]=[0,0],o[h]=[];for(var p=0;p<a;p++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[p][l],10),o[c][0]===e[p][l]&&p+1<a&&0<=l-1&&e[p+1][l]===o[c][0]&&e[p+1][l-1]===o[c][0]&&(i[c]+=3),zf(c,n,i,0,e[p][l]),zf(c,n,i,1,e[l][p]),jf(c,i,o,e[p][l],s,0),jf(c,i,o,e[l][p],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<i.length;h++)i[h]+=(d=r[h],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),i[h]<v&&(v=i[h],u=h);return u}(i),s=i[l];return 7<=r&&Ef([s],If(r,"1111100100101",18)),Lf([s],function(t){var e="";if(0===Ld(t))return"101010000010010";for(var i=If(Ld(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e}(lf[e]+Bd(l,3))),s}for(var Ff,Hf=1;Hf<255;Hf++)255<(Ff=2*sf[Hf-1])&&(Ff^=285),sf[Hf]=Ff,nf[Ff]=Hf;Ff=2*sf[Hf-1]^285,sf[Hf]=Ff,sf[-1]=0;for(var Uf=2;Uf<=68;Uf++){var Nf=Sf[Uf-1];Sf[Uf]=function(t,e){for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)i[o+r]=void 0===i[o+r]?(t[o]+(0<=e[r]?e[r]:0))%255:nf[sf[i[o+r]]^sf[(t[o]+e[r])%255]];return i}(Nf,[Uf,0])}var Gf,Wf=Math.round,Xf=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Yf=[[0,1],[1,1],[1,0]],tn;function qf(t,e,i){void 0===i&&(i=Be),Gf.call(this),this.options=x({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)}(Gf=w.Class)&&(qf.__proto__=Gf),((qf.prototype=Object.create(Gf&&Gf.prototype)).constructor=qf).prototype.destroy=function(){this._destroySurface()},qf.prototype._initElement=function(){xt(this.element,"k-qrcode")},qf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},qf.prototype._createSurface=function(){return w.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},qf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},qf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},qf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},qf.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},qf.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,i={width:0,height:0};return 0<e&&(i.width=e),t&&(i.height=t),i},qf.prototype._resize=function(){this.redraw()},qf.prototype.createVisual=function(){this.visual=this._render()},qf.prototype.exportVisual=function(){return this._render()},qf.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,h=s.width||0,p=(s.width=h,new w.drawing.Group);try{n&&(i=Df(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(h+a),t=this._calculateBaseUnit(r,i.length),e=h+a+(r-i.length*t)/2,p.append(this._renderBackground(o,s)),p.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?p.append(this._renderLogo(o,t)):this._isSwiss()&&p.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return p},qf.prototype._renderLogo=function(t,e){var t=Wf(t/2),e=this._getLogoSize(7*e),i=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new w.geometry.Rect(new w.geometry.Point(t.x,t.y),new w.geometry.Size(e.width,e.height));return new w.drawing.Image(i,t)},qf.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,t=t/2,n={},s=new w.drawing.Group;return n.x=n.y=Math.ceil(t-e-i/2),s.append(this._renderShape(n,Math.ceil(i+2*e),Yf,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,Yf,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,Xf,"#fff")),s},qf.prototype._renderShape=function(t,e,i,o){var r=new w.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},qf.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Pd(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},qf.prototype._calculateBaseUnit=function(t,e){var i,o=Math.floor(t/e);return o<1?(i=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))):t<=o*e&&1<=o-1&&o--,o},qf.prototype._renderMatrix=function(t,e,i){for(var o=new w.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+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 a=Wf(i+a*e),h=Wf(n),p=Wf(i+s*e),l=Wf(n+e);o.moveTo(a,h).lineTo(a,l).lineTo(p,l).lineTo(p,h).close()}}return o},qf.prototype._renderBackground=function(t,e){t=new E(0,0,t,t).unpad(e.width/2);return w.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},qf.prototype.setOptions=function(t){this.options=Od(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},qf.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},qf.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},qf.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},qf.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},i(tn=qf,{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 zb=tn,jb=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{Df(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var Zf={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Qf(t){return t*t}var Kf,$f,Jf=Math,tg=Jf.abs,eg=Jf.atan,ig=Jf.atan2,og=Jf.cos,rg=Jf.sin,ng=Jf.tan,sg=(($f=w.Class)&&(_g.__proto__=$f),((_g.prototype=Object.create($f&&$f.prototype)).constructor=_g).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},_g.prototype.toArray=function(){return[this.lat,this.lng]},_g.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},_g.prototype.clone=function(){return new _g(this.lat,this.lng)},_g.prototype.round=function(t){return this.lng=M(this.lng,t),this.lat=M(this.lat,t),this},_g.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},_g.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},_g.prototype.destination=function(t,e,i){var e=le(e),i=i||Zf.WGS84,o=le(this.lat),r=le(this.lng),t=t/i.a,i=Jf.asin(rg(o)*og(t)+og(o)*rg(t)*og(e)),r=r+ig(rg(e)*rg(t)*og(o),og(t)-rg(o)*rg(i));return new _g(ie(i),ie(r))},_g.prototype.greatCircleTo=function(t,e){var i=_g.create(void 0),e=e||Zf.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,r,n=e.a,s=e.b,a=e.f,h=le(i.lng-this.lng),e=eg((1-a)*ng(le(this.lat))),p=rg(e),l=og(e),e=eg((1-a)*ng(le(i.lat))),c=rg(e),u=og(e),d=h,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=rg(d),v=og(d),m=Jf.sqrt(Qf(u*y)+Qf(l*c-p*u*v)),x=ig(m,r=p*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(o=1-Qf(_))&&(b=r-2*p*c/o),d),k=a/16*o*(4+a*(4-3*o)),d=h+(1-k)*a*_*(x+k*m*(b+k*r*(2*Qf(b)-1))),g=tg(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(Qf(n)-Qf(s))/Qf(s),e=1+i/16384*(4096+i*(i*(320-175*i)-768)),n=i/1024*(256+i*(i*(74-47*i)-128)),i=n*m*(b+n/4*(r*(2*Qf(b)-1)-n/6*b*(4*Qf(m)-3)*(4*Qf(b)-3))),n=ig(u*y,l*c-p*u*v),S=ig(l*y,-p*u+l*c*v);return{distance:M(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:ie(n),azimuthTo:ie(S)}},_g.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},_g.fromLngLat=function(t){return new _g(t[1],t[0])},_g.fromLatLng=function(t){return new _g(t[0],t[1])},_g.create=function(t,e){if(T(t))return t instanceof _g?t.clone():1===arguments.length&&2===t.length?_g.fromLatLng(t):new _g(t,e)},_g),ag=Math,hg=ag.atan,pg=ag.exp,lg=ag.pow,cg=ag.sin,ug=ag.log,dg=ag.tan,fg=w.geometry.Point,gg=ag.PI,yg=gg/2,vg=gg/4,mg=gg/180,p=Zf.WGS84,Yu;function xg(t){Kf.call(this),this.initProperties(),this._initOptions(t)}function _g(t,e){$f.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}function bg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function wg(t,e){e.insertBefore(t,e.firstChild)}function kg(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Sg(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(Kf=w.Class)&&(xg.__proto__=Kf),((xg.prototype=Object.create(Kf&&Kf.prototype)).constructor=xg).prototype._initOptions=function(t){this.options=x({},this.options,t)},xg.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},xg.prototype.forward=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,r=_(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?_(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=le(e-i)*o,e=this._projectLat(r);return new fg(t,e)},xg.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=le(t),o=dg(vg+t/2),t=i*cg(t),t=lg((1-t)/(1+t),i/2);return e*ug(o*t)},xg.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,o=t.x/(mg*o)+i,i=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=_(o,-this.MAX_LNG,this.MAX_LNG)),new sg(i,o)},xg.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=pg(-t/i),s=yg-2*hg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=o*cg(s),h=lg((1-h)/(1+h),r),h=yg-2*hg(n*h)-s;if(s+=h,ag.abs(h)<=this.INVERSE_CONVERGENCE)break}return ie(s)},i(Yu=xg,{centralMeridian:0,datum:p}),(Cg=Yu)&&(Lg.__proto__=Cg),((Lg.prototype=Object.create(Cg&&Cg.prototype)).constructor=Lg).prototype.initProperties=function(){Cg.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},Lg.prototype._projectLat=function(t){var e=this.options.datum.a,t=le(t),t=dg(vg+t/2);return e*ug(t)},Lg.prototype._inverseY=function(t){var e=this.options.datum.a,t=pg(-t/e);return ie(yg-2*hg(t))};var Ag,Cg,Pg=Lg,Tg=((Ag=w.Class)&&(Bg.__proto__=Ag),((Bg.prototype=Object.create(Ag&&Ag.prototype)).constructor=Bg).prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},Bg.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},Bg),Mg=Object.defineProperty,Og=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Ig=function(t){var e,i,o=!1,r=[],n={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_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\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,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},h={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(i in n)if(Le(n,i)&&(r=t.match(n[i]))){if("windows"===i&&"plugins"in navigator)return!1;(o={}).device=i,o.tablet=Eg(i,a,!1),o.browser=Eg(t,h,"default"),o.name=Eg(i,s),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=(r[3]||"0").replace("_","."),e=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return o};function Bg(){Ag.call(this);var t=this._proj=new Pg,t=this.c=2*gg*t.options.datum.a;this._tm=w.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=w.geometry.transform().scale(t,-t).translate(-.5,-.5)}function Lg(){Cg.apply(this,arguments)}function Eg(t,e,i){for(var o in e)if(Le(e,o)&&e[o].test(t))return o;return void 0!==i?i:t}function Rg(t,e){return t.bind(e)}function Vg(t,e,i,o,r){Xg(t,e,i,o,r)}function zg(t,e,i,o,r){var n,s,a;n=t,s=i,a=o,(mt(t=e)?t:(t||"").split(" ")).forEach(function(t){Yg(n,t,s,a)})}function jg(t){var e=Gg(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function Dg(t,e){var i=t.prototype;i.events?e.forEach(function(t){i.events.indexOf(t)<0&&i.events.push(t)}):i.events=e}function Fg(){return Number(new Date)}function Hg(){}function Ug(t){var e=[];if(t)for(var i=kg(t).split("-"),o=0;o<i.length;o++)e.push("k-pos-"+i[o]);return e.join(" ")}var Ng,Gg=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=Wg();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},Wg=function(){var t=Ig(navigator.userAgent),e=function(t){var e,i=!1,o=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(Le(r,e)&&(o=t.match(r[e]))){(i={})[e]=!0,i[o[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,i.version=parseInt(document.documentMode||o[2],10);break}return i}(navigator.userAgent),i=e.chrome,o=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!i&&!o&&!r&&!e&&window.PointerEvent,n.msPointers=!i&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,h=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,i="string"==typeof s.style[t+"Transition"];if(i||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),h={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},i&&((a=h).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}),s=null,n.transforms=h,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;var t;if(n.mobileOS.android)return!n.browser.chrome||!(n.browser.version<32||((t=document.querySelector("meta[name=viewport]"))?t.getAttribute("content"):"").match(/user-scalable=no/i))}return!1},n},Xg=function(s,t,a,h,p){(mt(t)?t:(t||"").split(" ")).forEach(function(t){var i,e,o,r,n;n=o=h,(e=a)&&Mt(e)&&!o?n=e:e&&"string"==typeof e&&Mt(n)&&(r=e),(i=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,Mg(t,"currentTarget",{value:e}),Mg(t,"delegateTarget",{value:i}),n(t))},Boolean(p))})},Yg=function(t,e,i,o){t.removeEventListener(e,i,Boolean(o))},qg=((Ng=Vx)&&(Zg.__proto__=Ng),((Zg.prototype=Object.create(Ng&&Ng.prototype)).constructor=Zg).prototype._initOptions=function(t){this.options=x({},this.options,t)},Zg.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Zg.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Zg.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},Zg.prototype.clear=function(){this.items=[],bg(this.element)},Zg.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],i=this._itemText(i);""!==i&&t.push(i)}if(0<t.length){bg(this.element);var o=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=o;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},Zg.prototype.hideElement=function(){this.element.style.display="none"},Zg.prototype.showElement=function(){this.element.style.display=""},Zg.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},Zg.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Zg.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Zg);function Zg(t,e){Ng.call(this),this.element=t,this._initOptions(e),this.items=[],xt(this.element,"k-widget k-attribution")}i(qg,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var Qg={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 Kg(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Qg[t].className+'" aria-label="move '+t+'">'+_e({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Og(t)}($g=Vx)&&(ty.__proto__=$g),((ty.prototype=Object.create($g&&$g.prototype)).constructor=ty).prototype.destroy=function(){this.dispose()},ty.prototype.dispose=function(){zg(this._keyroot,"keydown",this._keydownHandler)},ty.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},ty.prototype._initOptions=function(t){this.options=x({},this.options,t)},ty.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},ty.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},ty.prototype._keydown=function(t){switch(t.which){case Ex.UP:this._pan(0,1),t.preventDefault();break;case Ex.DOWN:this._pan(0,-1),t.preventDefault();break;case Ex.RIGHT:this._pan(1,0),t.preventDefault();break;case Ex.LEFT:this._pan(-1,0),t.preventDefault()}};var $g,Jg=ty;function ty(t,e){$g.call(this),this.element=t,this._initOptions(e);var t=Kg("up",e.icons),i=Kg("right",e.icons),o=Kg("down",e.icons),e=Kg("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(i),this.element.appendChild(o),this.element.appendChild(e),xt(this.element,"k-widget k-navigator"),Vg(this.element,"click",".k-button",Rg(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=Rg(this._keydown,this),Vg(this._keyroot,"keydown",this._keydownHandler)}function ey(t,e,i){t='<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+'">'+_e({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return Og(t)}i(Jg,{name:"Navigator",panStep:1}),Dg(Jg,["pan"]),(iy=Vx)&&(ry.__proto__=iy),((ry.prototype=Object.create(iy&&iy.prototype)).constructor=ry).prototype.destroy=function(){this.element&&zg(this.element,"click",this._clickHandler),this._keyroot&&zg(this._keyroot,"keydown",this._keydownHandler)},ry.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},ry.prototype._initOptions=function(t){this.options=x({},this.options,t)},ry.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},ry.prototype._click=function(t){var e=1;Gt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},ry.prototype._keydown=function(t){switch(t.which){case Ex.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Ex.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var iy,oy=ry;function ry(t,e,i){iy.call(this),this.element=t,this._initOptions(e);t=ey("in","plus",i),e=ey("out","minus",i),this.element.appendChild(t),this.element.appendChild(e),this.element.setAttribute("role","group"),xt(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Vg(this.element,"click",".k-button",this._clickHandler),i=this.element.parentNode.closest("[data-role]");this._keyroot=i||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Vg(this._keyroot,"keydown",this._keydownHandler)}i(oy,{name:"ZoomControl",zoomStep:1}),Dg(oy,["change"]);var ny,sy,c,ay=(c=Math).max,hy=c.min,py=((sy=w.Class)&&(dy.__proto__=sy),cd={World:{configurable:!0}},((dy.prototype=Object.create(sy&&sy.prototype)).constructor=dy).prototype.contains=function(t){var e=this.nw,i=this.se,o=O(t.lng,t[1]),r=O(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},dy.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new sg(e,i)},dy.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},dy.prototype.include=function(t){var e=this.nw,i=this.se,o=O(t.lng,t[1]),t=O(t.lat,t[0]);e.lng=hy(e.lng,o),e.lat=ay(e.lat,t),i.lng=ay(i.lng,o),i.lat=hy(i.lat,t)},dy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},dy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new sg(t.lat,e.lng),se:this.se,sw:new sg(e.lat,t.lng)}},dy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new sg(t.lat,e.lng),e,new sg(e.lat,t.lng)]},dy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},dy.create=function(t,e){return t instanceof dy?t:t&&e?new dy(t,e):t&&4===t.length&&!e?new dy([t[0],t[1]],[t[2],t[3]]):void 0},cd.World.get=function(){return new dy([90,-180],[-90,180])},Object.defineProperties(dy,cd),dy),ly="centerChange",cy=((ny=w.Class)&&(uy.__proto__=ny),ud={anchor:{configurable:!0}},((uy.prototype=Object.create(ny&&ny.prototype)).constructor=uy).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)},uy.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},ud.anchor.get=function(){return this._anchor},ud.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},uy.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(uy.prototype,ud),uy);function uy(t,e){ny.call(this),this.widgetService=t,this.options=x({},this.options,e),this.offset={x:0,y:0}}function dy(t,e){sy.call(this);t=sg.create(t),e=sg.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}i(cy,{border:{width:1},opacity:1}),(fy=w.Class)&&(my.__proto__=fy),((my.prototype=Object.create(fy&&fy.prototype)).constructor=my).prototype.destroy=function(){this._deactivate()},my.prototype._initOptions=function(t){this.options=x({},this.options,t)},my.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},my.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},my.prototype.reset=function(){this._beforeReset(),this._reset()},my.prototype._reset=function(){this._applyExtent()},my.prototype._beforeReset=function(){},my.prototype._resize=function(){},my.prototype._panEnd=function(){this._applyExtent()},my.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!T(t.minZoom)||e>=t.minZoom,e=!T(t.maxZoom)||e<=t.maxZoom,t=py.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},my.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},my.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)},my.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)},my.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},my.prototype._readData=function(){return this.options.data||[]},my.prototype._hasData=function(){return this._data&&0<this._data.length},my.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var fy,dd=my,gy=Math,yy=w.geometry.Point,vy,ld;function my(t,e){fy.call(this),this.support=Wg(),this._initOptions(e),this.map=t;e=document.createElement("div");xt(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.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()}function xy(t){return Mt(t)?t:Mx.compile(t)}function _y(t){var e=t;return"string"!=typeof t&&(e+="px"),e}function by(t,e){vy.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}(vy=dd)&&(by.__proto__=vy),((by.prototype=Object.create(vy&&vy.prototype)).constructor=by).prototype.destroy=function(){vy.prototype.destroy.call(this),this._view.destroy(),this._view=null},by.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},by.prototype._reset=function(){vy.prototype._reset.call(this),this._updateView(),this._view.reset()},by.prototype._viewType=function(){return Sy},by.prototype._activate=function(){vy.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,w.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},by.prototype._deactivate=function(){vy.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},by.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),i={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},by.prototype._resize=function(){this._render()},by.prototype._panEnd=function(t){vy.prototype._panEnd.call(this,t),this._render()},by.prototype._render=function(){this._updateView(),this._view.render()},i(ld=by,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1}),(ky=w.Class)&&(Py.__proto__=ky),((Py.prototype=Object.create(ky&&ky.prototype)).constructor=Py).prototype._initOptions=function(t){this.options=x({},this.options,t)},Py.prototype.center=function(t){this._center=t},Py.prototype.extent=function(t){this._extent=t},Py.prototype.viewOrigin=function(t){this._viewOrigin=t},Py.prototype.zoom=function(t){this._zoom=t},Py.prototype.pointToTileIndex=function(t){return new yy(gy.floor(t.x/this.options.tileSize),gy.floor(t.y/this.options.tileSize))},Py.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,e=this.indexToPoint(e).translate(-i.x,-i.y);return{x:gy.ceil((gy.abs(e.x)+t.width)/this.options.tileSize),y:gy.ceil((gy.abs(e.y)+t.height)/this.options.tileSize)}},Py.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},Py.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new yy(e*this.options.tileSize,t*this.options.tileSize)},Py.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},Py.prototype.destroy=function(){bg(this.element),this.pool.empty()},Py.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},Py.prototype.render=function(){for(var t,e,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw),r=0;r<i.x;r++)for(e=0;e<i.y;e++)(t=this.createTile({x:o.x+r,y:o.y+e})).visible||t.show()},Py.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},Py.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,o=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:new yy(M((e=o).x),M(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},Py.prototype.wrapIndex=function(t){var e=gy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},Py.prototype.wrapValue=function(t,e){var i=gy.abs(t)%e;return 0<=t?i:e-(0==i?e:i)};var wy,ky,Sy=Py,Ay=((wy=w.Class)&&(Cy.__proto__=wy),((Cy.prototype=Object.create(wy&&wy.prototype)).constructor=Cy).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Cy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Cy.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},Cy.prototype.show=function(){var t=this.element,e=(t.style.top=_y(this.options.offset.y),t.style.left=_y(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Cy.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Cy.prototype.url=function(){return xy(this.options.urlTemplate)(this.urlOptions())},Cy.prototype.errorUrl=function(){return xy(this.options.errorUrlTemplate)(this.urlOptions())},Cy.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}},Cy);function Cy(t,e){wy.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function Py(t,e){ky.call(this),this.element=t,this._initOptions(e),this.pool=new My}i(Ay,{urlTemplate:"",errorUrlTemplate:""}),(Ty=w.Class)&&(Oy.__proto__=Ty),((Oy.prototype=Object.create(Ty&&Ty.prototype)).constructor=Oy).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},Oy.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},Oy.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},Oy.prototype._create=function(t){for(var e,i=this._items,o=ae(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new Ay(o,t),this._items.push(e)),e},Oy.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);i<n&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))};var Ty,My=Oy;function Oy(){Ty.call(this),this._items=[]}function Iy(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}i(My,{maxSize:100});var By,Ly,Ey,Ry,Vy,zy,jy,Dy=Object.assign,Fy="change",Hy=((jy=Vx)&&(tv.__proto__=jy),((tv.prototype=Object.create(jy&&jy.prototype)).constructor=tv).prototype.captureNext=function(){this.capture=!0},tv.prototype.cancelCapture=function(){this.capture=!1},tv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},tv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},tv),Uy=((zy=Vx)&&(Jy.__proto__=zy),((Jy.prototype=Object.create(zy&&zy.prototype)).constructor=Jy).prototype.makeVirtual=function(){Dy(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Jy.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Jy.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Jy.prototype.forceEnabled=function(){this.forcedEnabled=!0},Jy.prototype.getSize=function(){return this.container[this.measure]},Jy.prototype.getTotal=function(){return this.element[this.scrollSize]},Jy.prototype.rescale=function(t){this.scale=t},Jy.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();0===i&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||r<o,t)||e.trigger(Fy,e)},Jy),Ny=((Vy=Vx)&&($y.__proto__=Vy),(($y.prototype=Object.create(Vy&&Vy.prototype)).constructor=$y).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},$y.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},$y.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(Fy)},$y),Gy=((Ry=Vx)&&(Ky.__proto__=Ry),((Ky.prototype=Object.create(Ry&&Ry.prototype)).constructor=Ky).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Ky.prototype.dragMove=function(t){var e,i=this.dimension,o=this.axis,r=this.movable,n=r[o]+t;i.enabled&&(e=t,(n<i.min&&t<0||n>i.max&&0<t)&&(e*=this.resistance),r.translateAxis(o,e),this.trigger(Fy,this))},Ky),Wy=((Ey=w.Class)&&(Qy.__proto__=Ey),(Qy.prototype=Object.create(Ey&&Ey.prototype)).constructor=Qy),Xy=((Ly=Vx)&&(Zy.__proto__=Ly),((Zy.prototype=Object.create(Ly&&Ly.prototype)).constructor=Zy).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},Zy.prototype.scaleTo=function(t){this.scale=t,this.refresh()},Zy.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},Zy.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},Zy.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},Zy.prototype.moveTo=function(t){Dy(this,t),this.refresh()},Zy.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=Iy(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(Fy))},Zy.prototype._saveCoordinates=function(t){this.coordinates=t},Zy),Yy=w.drawing.Group,l;function qy(t,e){By.call(this,t,e),this._pan=Rg(this._pan,this),this.surface=w.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.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))}function Zy(t){Ly.call(this);var e=this,t=(e.support=Wg(),this.transformStyle=this.support.transitions.prefix+"Transform",e.element=t,e.element.style.webkitTransformOrigin="left top",e.x=0,e.y=0,e.scale=1,Iy(e.x,e.y,e.scale));e.element.style[this.transformStyle]=t,e._saveCoordinates(t)}function Qy(t){Ey.call(this);var s,a,h,p=this;Dy(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new Gy({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new Gy({axis:"y",dimension:p.dimensions.y,resistance:t,movable:h}),p.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){p.gesture=t,p.offset=oe(p.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=p.gesture,i=e.center,o=t.center,e=t.distance/e.distance,r=p.dimensions.minScale,n=p.dimensions.maxScale,r=(h.scale<=r&&e<1&&(e+=.8*(1-e)),h.scale*e>=n&&(e=n/h.scale),h.x+p.offset.left),n=h.y+p.offset.top,r={x:(r-i.x)*e+o.x-r,y:(n-i.y)*e+o.y-n};h.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),p.dimensions.rescale(h.scale),(p.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function Ky(t){Ry.call(this),Dy(this,t)}function $y(t){Vy.call(this);this.x=new Uy(Dy({horizontal:!0},t)),this.y=new Uy(Dy({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(Fy,t)}function Jy(t){zy.call(this);var e=this;e.forcedEnabled=!1,Dy(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function tv(t,e){jy.call(this);var i=this,o=t[0]||t,t=(i.capture=!1,Gg(navigator.userAgent));o.addEventListener?(t.down.split(" ").forEach(function(t){o.addEventListener(t,Rg(i._press,i),!0)}),t.up.split(" ").forEach(function(t){o.addEventListener(t,Rg(i._release,i),!0)})):(t.down.split(" ").forEach(function(t){o.attachEvent(t,Rg(i._press,i))}),t.up.split(" ").forEach(function(t){o.attachEvent(t,Rg(i._release,i))})),i.bind(["press","release"],e||{})}(By=dd)&&(qy.__proto__=By),((qy.prototype=Object.create(By&&By.prototype)).constructor=qy).prototype.destroy=function(){By.prototype.destroy.call(this),this.surface.destroy()},qy.prototype._reset=function(){By.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},qy.prototype._initRoot=function(){this._root=new Yy,this.surface.draw(this._root)},qy.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},qy.prototype._resize=function(){this.surface.size(this.map.size())},qy.prototype._readData=function(){var t=By.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},qy.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new ov(this.map,this.options.style,this));for(var e=new Yy,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},qy.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof w.drawing.Circle&&this.map.options.renderPointsAsMarkers?T(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},qy.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},qy.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},qy.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},qy.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},qy.prototype._panEnd=function(t){By.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},qy.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},qy.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},qy.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},qy.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},qy.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},qy.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},qy.prototype._activate=function(){By.prototype._activate.call(this),this._panHandler=Rg(this._pan,this),this.map.bind("pan",this.panHandler)},qy.prototype._deactivate=function(){By.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},i(l=qy,{autoBind:!0,zIndex:100}),(iv=w.Class)&&(nv.__proto__=iv),((nv.prototype=Object.create(iv&&iv.prototype)).constructor=nv).prototype.parse=function(t){var e=new Yy,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=i&&e.children.length<2?e.children[0]:e},nv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},nv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},nv.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},nv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(he(e).anchor()))&&(t.options.fill=null)},nv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},nv.prototype._loadPolygon=function(t,e,i){e=this._buildPolygon(e);return e.dataItem=i,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},nv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?w.drawing.MultiPath:w.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(sg.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},nv.prototype._loadPoint=function(t,e,i){var e=sg.fromLngLat(e),o=this.locator.locationToView(e),o=new w.geometry.Circle(o,10),o=new w.drawing.Circle(o,this.style);return o.dataItem=i,o.location=e,this._loadShape(t,o)};var ev,iv,ov=nv,vd;function rv(){ev.apply(this,arguments)}function nv(t,e,i){iv.call(this),this.observer=i,this.locator=t,this.style=e}(ev=l)&&(rv.__proto__=ev),((rv.prototype=Object.create(ev&&ev.prototype)).constructor=rv).prototype._readData=function(){return this.options.data||[]},rv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=Ut(e.valueField),o=t.slice(0);o.sort(function(t,e){return i(e)-i(t)});for(var r=this._scaleType(),n=Ut(this.options.locationField),s=0;s<o.length;s++){var a,h,p,l=o[s],c=n(l),u=i(l);T(c)&&T(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=sg.create(c),p=this.map.locationToView(c),h=a.map(u),(p=this._createSymbol({center:p,size:h,style:e.style,dataItem:l,location:c})).dataItem=l,p.location=c,p.value=u,this._drawSymbol(p))}}},rv.prototype._scaleType=function(){var t=this.options.scale;return Mt(t)?t:hv[t]},rv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Mt(e)?e:pv[e])(t)},rv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},rv.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},rv.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},i(vd=rv,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200}),(av=w.Class)&&(vv.__proto__=av),((vv.prototype=Object.create(av&&av.prototype)).constructor=vv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var sv,av,hv={sqrt:vv},pv={circle:function(t){var e=new w.geometry.Circle(t.center,t.size/2);return new w.drawing.Circle(e,t.style)},square:function(t){var e=new w.drawing.Path(t.style),i=t.size/2,t=t.center;return e.moveTo(t.x-i,t.y-i).lineTo(t.x+i,t.y-i).lineTo(t.x+i,t.y+i).lineTo(t.x-i,t.y+i).close(),e}},lv="mouseenter",cv="mouseleave",uv=Object.assign,dv="k-marker",fv="."+dv,gv=((sv=dd)&&(yv.__proto__=sv),((yv.prototype=Object.create(sv&&sv.prototype)).constructor=yv).prototype.destroy=function(){sv.prototype.destroy.call(this),zg(this.element,"click",this._markerClickHandler),this.clear()},yv.prototype.add=function(t){if(!mt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},yv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},yv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},yv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},yv.prototype._reset=function(){sv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},yv.prototype.bind=function(t,e){t=xv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},yv.prototype._addOne=function(t){t=xv.create(t,this.options);return t.addTo(this),t},yv.prototype._readData=function(){return this.options.data||[]},yv.prototype._load=function(t){this._data=t,this.clear();for(var e=Ut(this.options.locationField),i=Ut(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},yv.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},yv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},yv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},yv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return uv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},yv);function yv(t,e){sv.call(this,t,e),this._markerClickHandler=Rg(this._markerClick,this),Vg(this.element,"click",fv,this._markerClickHandler),this.items=[],this._load(this._readData())}function vv(t,e){av.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}i(gv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""}),(mv=w.Class)&&(bv.__proto__=mv),((bv.prototype=Object.create(mv&&mv.prototype)).constructor=bv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},bv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},bv.prototype.location=function(t){return t?(this.options.location=sg.create(t).toArray(),this.layer&&this.layer.update(this),this):sg.create(this.options.location)},bv.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=Sg(this._anchor.left),this.element.style.top=Sg(this._anchor.top)},bv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},bv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Rg(this._mouseEnter,this),Vg(this.element,lv,fv,this._mouseEnterHandler),this._mouseLeaveHandler=Rg(this._mouseLeave,this),Vg(this.element,cv,fv,this._mouseLeaveHandler))},bv.prototype.unbindEvents=function(){this.element&&(zg(this.element,lv,this._mouseEnterHandler),zg(this.element,cv,this._mouseLeaveHandler))},bv.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,xt(i=document.createElement("span"),dv),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=Og(o),i.appendChild(o)):t.svgIcon?_e(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(o={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(o.icon="map-marker-target",_e(i,o)):"pin"===t.shape?_e(i,o):xt(i,"k-icon k-icon-xxl k-i-marker-"+kg(t.shape||"pin")):_e(i,o)),t.title&&i.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){i.setAttribute(t,r[t])}),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents())},bv.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},bv.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()}},bv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},bv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},bv.prototype._compileTemplate=function(t){return Mx.compile(t,{paramName:"dataItem",useWithBlock:!1})},bv.create=function(t,e){return t instanceof bv?t:new bv(x({},e,t))};var mv,xv=bv,_v=Object.assign;function bv(t){mv.call(this),this.options=t||{}}function wv(t){window.requestAnimationFrame(t)}function kv(t){t.preventDefault()}(Av=w.Class)&&(Dv.__proto__=Av),((Dv.prototype=Object.create(Av&&Av.prototype)).constructor=Dv).prototype.tick=function(){},Dv.prototype.done=function(){},Dv.prototype.onEnd=function(){},Dv.prototype.onCancel=function(){},Dv.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,wv(this._tickProxy)))},Dv.prototype.enabled=function(){return!0},Dv.prototype.cancel=function(){this._started=!1,this.onCancel()},Dv.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):wv(this._tickProxy))};var Sv,Av,Jr,Cv=((Sv=Jr=Dv)&&(jv.__proto__=Sv),((jv.prototype=Object.create(Sv&&Sv.prototype)).constructor=jv).prototype.done=function(){return this.timePassed()>=this.duration},jv.prototype.timePassed=function(){return Math.min(this.duration,Fg()-this.startDate)},jv.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[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=Fg(),e.start()},jv.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},jv.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},jv),Pv=Object.assign,Tv=800,Mv=0,Ov="move",Iv="tap",Bv="doubleTap",Lv="release",Ev="gesturechange",Rv="gestureend",Vv="gesturetap",zv={api:0,touch:0,mouse:9,pointer:9};function jv(t){Sv.call(this),_v(this,t)}function Dv(){Av.call(this);this._tickProxy=Rg(this._tick,this),this._started=!1}function Fv(t){var e,i,o,r=Wg(),n=[],s=t.originalEvent||t,a=t.currentTarget,h=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(i=s?s.changedTouches:[]).length;h<e;h++)o=i[h],n.push({location:o,event:t,target:o.target,currentTarget:a,id:o.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}(Uv=w.Class)&&(Xv.__proto__=Uv),((Xv.prototype=Object.create(Uv&&Uv.prototype)).constructor=Xv).prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Fg(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},Xv.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var Hv,Uv,Nv=Xv,Gv=((Hv=w.Class)&&(Wv.__proto__=Hv),((Wv.prototype=Object.create(Hv&&Hv.prototype)).constructor=Wv).prototype.press=function(){this._holdTimeout=setTimeout(Rg(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},Wv.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(Iv,t):e._trigger(Bv,t),e.userEvents._clicks=0},300))},Wv.prototype._hold=function(){this._trigger("hold",this.pressEvent)},Wv.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(tm.current&&tm.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(Ov,t)}},Wv.prototype.end=function(t){this.endTime=Fg(),this._finished||(this._finished=!0,this._trigger(Lv,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(Iv,t)),clearTimeout(this._holdTimeout),this.dispose())},Wv.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},Wv.prototype.skip=function(){this.dispose()},Wv.prototype.cancel=function(){this.dispose()},Wv.prototype.isMoved=function(){return this._moved},Wv.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Fg(),this._moved=!0,this._trigger("start",t)},Wv.prototype._trigger=function(t,e){var e=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,i)&&e.preventDefault()},Wv.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},Wv);function Wv(t,e,i){Hv.call(this),Pv(this,{x:new Nv("X",i.location),y:new Nv("Y",i.location),type:i.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||zv[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function Xv(t,e){Uv.call(this);this.support=Wg(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=Fg()}function Yv(t){for(var e=Gg(navigator.userAgent).up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}(Jv=Vx)&&(fm.__proto__=Jv),((fm.prototype=Object.create(Jv&&Jv.prototype)).constructor=fm).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},fm.prototype.destroy=function(){var e,i=this,t=this.options,o=this.element;i._destroyed||(i._destroyed=!0,i.captureUpIfMoved&&this.support.eventCapture&&(e=i.surface,Yv(function(t){e.removeEventListener(t,i.preventIfMoving)})),zg(i.surface,jg("move"),this._surfaceMoveHandler),zg(i.surface,jg("up cancel"),this._surfaceEndHandler),zg(o,jg("down"),this._elementStartHandler),i.useClickAsTap&&zg(o,jg("click"),this._elementClickHandler),t.preventDragEvent&&zg(o,jg("dragstart"),this._elementDragStartHandler),zg(o,jg("mousedown"),this._elementSelectHandler),i._disposeAll(),i.unbind(),delete i.surface,delete i.element,delete i.currentTarget)},fm.prototype.capture=function(){fm.current=this},fm.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},fm.prototype.notify=function(t,e){var i,o,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case Ov:a=Ev;break;case"end":a=Rv;break;case Iv:a=Vv}Pv(e,{touches:s},(t=s[0],s=s[1],i=t.x.location,t=t.y.location,r=i-(o=s.x.location),n=t-(s=s.y.location),{center:{x:(i+o)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,Pv(e,{type:a}))},fm.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},fm.prototype.move=function(t,e){this._apiCall("_move",t,e)},fm.prototype.end=function(t,e){this._apiCall("_end",t,e)},fm.prototype._isMultiTouch=function(){return 1<this.touches.length},fm.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},fm.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},fm.prototype._isMoved=function(){return Nt(this.touches,function(t){return t.isMoved()}).length},fm.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},fm.prototype._start=function(t){var e,i,o=this,r=0,n=o.filter,s=Fv(t),a=s.length,h=t.which;if(!(h&&1<h||o._maxTouchesReached()))for(fm.current=null,o.currentTarget=t.currentTarget,o.stopPropagation&&t.stopPropagation();r<a&&!o._maxTouchesReached();r++)i=s[r],(e=n?i.currentTarget:o.element)&&0===e.length||(i=new Gv(o,e,i),o.touches.push(i),i.press(),o._isMultiTouch()&&o.notify("gesturestart",{}))},fm.prototype._move=function(t){this._eachTouch("move",t)},fm.prototype._end=function(t){this._eachTouch("end",t)},fm.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:Fg(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},fm.prototype._eachTouch=function(t,e){for(var i,o,r,n={},s=Fv(e),a=this.touches,h=0;h<a.length;h++)n[(i=a[h]).id]=i;for(h=0;h<s.length;h++)(r=n[(o=s[h]).id])&&r[t](o)},fm.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:Hg,preventDefault:Hg})},fm.defaultThreshold=function(t){Mv=t},fm.minHold=function(t){Tv=t};var qv,Zv,Qv,Kv,$v,Jv,tm=fm,em=Object.assign,im=Math.abs,om="change",rm=(($v=Jr)&&(dm.__proto__=$v),((dm.prototype=Object.create($v&&$v.prototype)).constructor=dm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},dm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},dm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},dm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},dm),nm=((Kv=Jr)&&(um.__proto__=Kv),((um.prototype=Object.create(Kv&&Kv.prototype)).constructor=um).prototype.onCancel=function(){this.transition.cancel()},um.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},um.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},um.prototype.done=function(){return im(this.velocity)<1},um.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),Kv.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),Kv.prototype.start.call(this)))},um.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=i,i=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(i)&&(i=Math.max(Math.min(i,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,i)},um.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},um.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},um.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Cv.easeOutExpo})},um),sm=((Qv=Jr)&&(cm.__proto__=Qv),((cm.prototype=Object.create(Qv&&Qv.prototype)).constructor=cm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},cm.prototype.done=function(){return im(this.offset.y)<5&&im(this.offset.x)<5},cm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},cm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},cm.prototype.setCallback=function(t){t&&Mt(t)&&(this.callback=t)},cm.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}},cm),am=((Zv=w.Class)&&(lm.__proto__=Zv),((lm.prototype=Object.create(Zv&&Zv.prototype)).constructor=lm).prototype.refresh=function(){var t=this.axis,e=this.dimension,i=e.size,o=this.scrollMovable,e=i/e.total,o=Math.round(-o[t]*e),r=Math.round(i*e);this.element.style.display=1<=e?"none":"",i<o+r?r=i-o:o<0&&(r+=o,o=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,o)},lm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},lm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},lm),hm=((qv=Vx)&&(pm.__proto__=qv),((pm.prototype=Object.create(qv&&qv.prototype)).constructor=pm).prototype._initOptions=function(t){this.options=x({},this.options,t)},pm.prototype._wheelScroll=function(t){var e,i,o;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),i=t.originalEvent||t,o=i.wheelDeltaY,i.wheelDelta?void 0!==o&&!o||(e=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(e=10*-i.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},pm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},pm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},pm.prototype.height=function(){return this.dimensions.y.size},pm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},pm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},pm.prototype._resize=function(){this._native||this.contentResized()},pm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},pm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},pm.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)},pm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},pm.prototype.enable=function(){this.enabled=!0},pm.prototype.disable=function(){this.enabled=!1},pm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(im(t)),this.scrollElement.scrollTop(im(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},pm.prototype.animatedScrollTo=function(t,e,i){var o;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(o,{x:t,y:e}),this.animatedScroller.setCallback(i),this.animatedScroller.start())},pm.prototype.pullHandled=function(){},pm.prototype.destroy=function(){var t=this.element;zg(t,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},pm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},pm.prototype._initPullToRefresh=function(){},pm.prototype._dragEnd=function(){},pm.prototype._paneChange=function(){},pm.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new am({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(om,function(){s.refresh()}),n.bind(om,function(){s.show()}),e[t+"inertia"]=new nm({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,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})}})},pm);function pm(t,e){qv.call(this);var s=this;this.element=t,this._initOptions(e);e=navigator.userAgent;e=(e=Ig(e)).ios||e.android,s._native=s.options.useNative&&e,e=Og('<div class="km-scroll-header"/>');if(s._native)xt(t,"km-native-scroller"),wg(e,t),em(s,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",xt(t,"km-scroll-wrapper");var i=t,o=Og('<div class="km-scroll-container"/>');for(i.appendChild(o);i.firstChild!==o;)o.appendChild(i.firstChild);wg(e,t);var e=t.children[1],r=new Hy(t),n=new Xy(e),a=new Ny({element:e,container:t,forcedEnabled:s.options.zoom}),h=this.options.avoidScrolling,p=new tm(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:s.options.zoom,supportDoubleTap:s.options.supportDoubleTap,start:function(t){a.refresh();var e=im(t.x.velocity),i=im(t.y.velocity),o=i<=2*e;r=s.fixedContainer,n=t.event.target;var r,n,e=e<=2*i;!(r===n||function(t){if(n)for(var e=n.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(r))&&!h(t)&&s.enabled&&(a.x.enabled&&o||a.y.enabled&&e)?p.capture():p.cancel()}}),l=new Wy({movable:n,dimensions:a,userEvents:p,elastic:s.options.elastic}),c=new rm({movable:n,dimensions:a,userEvents:p,tapCapture:r}),u=new sm({moveTo:function(t){s.scrollTo(t.x,t.y)}});n.bind(om,function(){s.scrollTop=-n.y,s.scrollLeft=-n.x,s.trigger("scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),s.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Vg(t,"wheel",this._wheelScrollHandler)),em(s,{movable:n,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:p,pane:l,tapCapture:r,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),s._initAxis("x"),s._initAxis("y"),s._wheelEnd=function(){s._wheel=!1,s.userEvents.end(0,s._wheelY)},a.refresh(),s.options.pullToRefresh&&s._initPullToRefresh()}}function lm(t){Zv.call(this);var e="x"===t.axis,i=Og('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');em(this,t,{element:i,elementSize:0,movable:new Xy(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(om,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}function cm(t){Qv.call(this,t),em(this,t,{origin:{},destination:{},offset:{}})}function um(t){Kv.call(this);var e=this;em(e,t,{transition:new Cv({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",Rg(e.start,e)),e.userEvents.bind("gestureend",Rg(e.start,e)),e.userEvents.bind("tap",Rg(e.onEnd,e))}function dm(t){$v.call(this,t);em(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function fm(t,e){Jv.call(this);var i,o,r,n=this,s=Wg(),a=(this.support=s,this.options=e=e||{},i=n.filter=e.filter,n.threshold=e.threshold||Mv,n.minHold=e.minHold||Tv,n.touches=[],n._maxTouches=e.multiTouch?2:1,n.allowSelection=e.allowSelection,n.captureUpIfMoved=e.captureUpIfMoved,n.useClickAsTap=!e.fastTap&&!s.delayedClick(),n._clicks=0,n.supportDoubleTap=e.supportDoubleTap,!s.touch||s.mouseAndTouchPresent);Pv(n,{element:t,surface:e.global&&a?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=Rg(this._move,this),Vg(n.surface,jg("move"),this._surfaceMoveHandler),this._surfaceEndHandler=Rg(this._end,this),Vg(n.surface,jg("up cancel"),this._surfaceEndHandler),this._elementStartHandler=Rg(this._start,this),Vg(t,jg("down"),i,this._elementStartHandler),n.useClickAsTap&&(this._elementClickHandler=Rg(this._click,this),Vg(t,jg("click"),i,this._elementClickHandler)),(s.pointers||s.msPointers)&&(s.browser.version<11?(a="pinch-zoom double-tap-zoom",t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?a+" "+e.touchAction:a):t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=kv,Vg(t,jg("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=Rg(this._select,this),Vg(t,jg("mousedown"),i,this._elementSelectHandler),n.captureUpIfMoved&&s.eventCapture&&(o=n.surface,r=Rg(n.preventIfMoving,n),Yv(function(t){o.addEventListener(t,r,!0)})),n.bind(["press","hold",Iv,Bv,"start",Ov,"end",Lv,"cancel","gesturestart",Ev,Rv,Vv,"select"],e)}function gm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}i(hm,{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"}}),Dg(hm,["pull","scroll","resize"]),gm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const Db=gm;var ym,vm=Math,mm=vm.min,xm=vm.pow,_m=w.geometry.Point,bm="marker",wm="location",km={bubble:vd,shape:l,tile:ld},t;function I(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),ym.call(this),this._init(t,e,i,o)}km[bm]=gv,(ym=Vx)&&(I.__proto__=ym),((I.prototype=Object.create(ym&&ym.prototype)).constructor=I).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(),mt(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();zg(this.element,"wheel",this._mousewheelHandler),ym.prototype.destroy.call(this)},I.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=Wg(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new Tg,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,w.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Vg(this.element,"wheel",this._mousewheelHandler)},I.prototype._initOptions=function(t){this.options=x({},this.options,t)},I.prototype._initElement=function(t){xt(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),bg(t);t=Og("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new Db(this,t)},I.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},I.prototype.addObserver=function(t){t&&this.observers.push(t)},I.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},I.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},I.prototype.trigger=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o||ym.prototype.trigger.call(this,t,e),o},I.prototype._notifyObserver=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},I.prototype.zoom=function(t){var e=this.options,t=T(t)?(t=vm.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},I.prototype.center=function(t){var e=t?(t=sg.create(t),e=sg.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(ly,{center:this.options.center}),this._reset()),this):sg.create(this.options.center);return e},I.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},I.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),bg(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=sg.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},I.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=_m.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},I.prototype.locationToView=function(t){var t=sg.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},I.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=_m.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,i=oe(this.element);return t=t.x&&t.x[wm]||t.y&&t.y[wm]?(e=t.x[wm]-i.left,t.y[wm]-i.top):(t=t.originalEvent||t,e=O(t.pageX,t.clientX)-i.left,O(t.pageY,t.clientY)-i.top),new w.geometry.Point(e,t)},I.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},I.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},I.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},I.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:mm(e,i),height:mm(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},I.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=sg.create(t);return(t=this.locationToLayer(t,e)).x+=i.width/2,t.y+=i.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(ly,{center:this.options.center}),this},I.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},I.prototype._setExtent=function(t){var e=py.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new py(e.nw,i));this.center(o.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(o.nw,s),h=this.locationToLayer(o.se,s),p=vm.abs(h.x-a.x),h=vm.abs(h.y-a.y);if(p<=r&&h<=n)break}this.zoom(s)},I.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize(),i=(e.x+=i.width,e.y+=i.height,this.layerToLocation(e));return new py(t,i)},I.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},I.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))},I.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+Ug(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(xt(i=document.createElement("div"),"k-map-controls "+Ug(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},I.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new qg(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Jg(e,x({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},I.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,o=this.element.clientWidth,r=this.element.clientHeight,i=_(i,t.x.min,t.x.max-o),e=_(e,t.y.min,t.y.max-r);this.scroller.one("scroll",Rg(this._scrollEnd,this)),this.scroller.scrollTo(-i,-e)},I.prototype._navigatorCenter=function(){this.center(this.options.center)},I.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new oy(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},I.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new hm(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",Rg(this._scroll,this)),t.bind("scrollEnd",Rg(this._scrollEnd,this)),t.userEvents.bind("gesturestart",Rg(this._scaleStart,this)),t.userEvents.bind("gestureend",Rg(this._scale,this)),t.userEvents.bind("doubleTap",Rg(this._doubleTap,this)),t.userEvents.bind("tap",Rg(this._tap,this)),this.scrollElement=t.scrollElement},I.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],o=this._createLayer(o);e.push(o)}},I.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===bm?x({},this.options.markerDefaults,t,{icons:this.options.icons}):x({},i,t),t=new km[e](this,i);return e===bm&&(this.markers=t),t},I.prototype._createTooltip=function(){return new cy(this.widgetService,this.options.tooltip)},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===bm}).length||(this.markers=new gv(this,x({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},I.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,i=new w.geometry.Point(i.x,i.y).scale(-1).scale(1/i.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()})},I.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Fg(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},I.prototype._panComplete=function(){return 50<Fg()-(this._panEndTimestamp||0)},I.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},I.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),i=new w.geometry.Point(t.center.x,t.center.y),o=this.viewToLocation(i,e),o=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t})},I.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=vm.log(t)/vm.log(2);return vm.round(t)},I.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")},I.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=xm(2,this.options.minZoom-n),t.dimensions.maxScale=xm(2,this.options.maxZoom-n),{min:-r.x,max:o-r.x}),n={min:-r.y,max:o-r.y};this.options.wraparound&&(t.max=20*o,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),i.makeVirtual(),e.virtualSize(t.min,t.max),i.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},I.prototype._renderLayers=function(){},I.prototype._layerSize=function(t){t=O(t,this.options.zoom);return this.options.minSize*xm(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},I.prototype._doubleTap=function(t){var e,i,o;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._mousewheel=function(t){var e=0<$t(t)?-1:1,i=this.options,o=this.zoom(),e=_(o+e,i.minZoom,i.maxZoom);!1===i.zoomable||e===o||this.trigger("zoomStart",{originalEvent:t})||(i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._toDocumentCoordinates=function(t){var e=oe(this.element);return{left:M(t.x+e.left),top:M(t.y+e.top)}},i(t=I,{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}),Dg(t,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const Fb=t;function Sm(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function Am(t,e){return Tm(t.source,e.source)}function Cm(t,e){return Tm(t.target,e.target)}function Pm(t){return t.value}var Tm=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function Mm(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(Cm)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(Am)})})}function Om(t){var e=t.nodesOptions,i=e.offset,o=(void 0===i&&(i={}),e.align);this.data={nodes:t.nodes.map(function(t){return x({},{offset:i,align:o},t)}),links:t.links.map(function(t){return x({},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}function Im(t){return new Om(t).calculate()}function Bm(t,e,i,o,r,n){n=(n-e)*(i-t),i=(o-e)*(r-t);return i<n?1:n==i?0:-1}function Lm(t,e,i,o){return e=x({},e,e.node),x({},{color:(i=i,o=o,t.color||i[o%i.length])},e,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})}Om.prototype.calculate=function(){var t=this.data,e=t.nodes,t=t.links,t=(this.connectLinksToNodes(e,t),this.calculateNodeValues(e),this.calculateNodeHeights(e));if(t)return{nodes:[],links:[],columns:[],circularLinks:t};this.calculateNodeDepths(e);t=this.calculateNodeColumns(e);return this.calculateNodeBreadths(t),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:t})},Om.prototype.connectLinksToNodes=function(t,e){var i=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,i.set(t.id,t)}),e.forEach(function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)})},Om.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(Sm(t.sourceLinks,Pm),Sm(t.targetLinks,Pm))})},Om.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var h=s.sourceLinks[a];i.add(h.target)}}o++,e=i,i=new Set}},Om.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach(function(t){o.add(t.source)})};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},Om.prototype.calculateNodeColumns=function(t){for(var e,i=Math.max.apply(null,t.map(function(t){return t.depth})),o=(this.width-this.offsetX-this.nodeWidth)/i,r=new Array(i+1),n=0;n<t.length;n++){var s=t[n],a=Math.max(0,Math.min(i,(e=i,"left"===(a=s).align?a.depth:"right"===a.align?e-a.height:a.sourceLinks.length?a.depth:e)));s.x0=this.offsetX+a*o,s.x1=s.x0+this.nodeWidth,r[s.layer=a]=r[a]||[],r[a].push(s)}return r},Om.prototype.calculateNodeBreadths=function(t){var e=this,o=Math.min.apply(null,t.map(function(t){return(e.height-e.offsetY-(t.length-1)*e.nodePadding)/Sm(t,Pm)}));if(t.forEach(function(t){var i=e.offsetY;t.forEach(function(t){t.y0=i,t.y1=i+t.value*o,i=t.y1+e.nodePadding,t.sourceLinks.forEach(function(t){t.width=t.value*o})}),i=(e.height-i+e.nodePadding)/(t.length+1),t.forEach(function(t,e){t.y0+=i*(e+1),t.y1+=i*(e+1)})}),!1!==this.autoLayout)for(var i=void 0!==this.loops?this.loops:t.length-1,r=this.targetColumnIndex||1,n=0;n<i;n++)this.reverse?(this.uncurlLinksToRight(t,r),this.uncurlLinksToLeft(t,r)):(this.uncurlLinksToLeft(t,r),this.uncurlLinksToRight(t,r));t.forEach(Mm)},Om.prototype.applyNodesOffset=function(t){t.forEach(function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i})},Om.prototype.calculateLinkBreadths=function(t){t.forEach(function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach(function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width}),i.forEach(function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width})})},Om.prototype.uncurlLinksToRight=function(t,e){for(var n=this,i=t.length,o=e;o<i;o++){var r=t[o];r.forEach(function(i){var o=0,r=0,t=(i.targetLinks.forEach(function(t){var e=t.value*(i.layer-t.source.layer);o+=n.targetTopPos(t.source,i)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Mm([i])}),r.sort(Tm),this.arrangeNodesVertically(r)}},Om.prototype.uncurlLinksToLeft=function(t,e){for(var n=this,i=t.length-1-e;0<=i;i--){for(var s=t[i],o=0;o<s.length;o++)!function(t){var i=s[t],o=0,r=0,t=(i.sourceLinks.forEach(function(t){var e=t.value*(t.target.layer-i.layer);o+=n.sourceTopPos(i,t.target)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Mm([i])}(o);s.sort(Tm),this.arrangeNodesVertically(s)}},Om.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},Om.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},Om.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;0<=r;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},Om.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},Om.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i},(zm=w.Class)&&(Wm.__proto__=zm),((Wm.prototype=Object.create(zm&&zm.prototype)).constructor=Wm).prototype.createVisual=function(){this.visual=this.createElement()},Wm.prototype.exportVisual=function(){return this.visual},Wm.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()},Wm.prototype.getSender=function(){return this};var Em,Rm,Vm,zm,h,jm=((Vm=h=Wm)&&(Gm.__proto__=Vm),((Gm.prototype=Object.create(Vm&&Vm.prototype)).constructor=Gm).prototype.getElement=function(){var t=this.options.node,t=new w.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0]);return w.drawing.Path.fromRect(t,this.visualOptions())},Gm.prototype.visualOptions=function(){var t=x({},this.options,this.options.node);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:t.node.label.text}},Gm),Dm=((Rm=h)&&(Nm.__proto__=Rm),((Nm.prototype=Object.create(Rm&&Rm.prototype)).constructor=Nm).prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,t=t.y1,r=(e+i)/2;return new w.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([r,o],[r,t],[i,t])},Nm.prototype.visualOptions=function(){var t=this.options,e=this.options.link;return{stroke:{width:t.link.width,color:e.color||t.color,opacity:(T(e.opacity)?e:t).opacity}}},Nm),Fm="before",Hm=((Em=h)&&(Um.__proto__=Em),((Um.prototype=Object.create(Em&&Em.prototype)).constructor=Um).prototype.getElement=function(){var t,e=x({},this.options,this.options.node.label),i=e.node,o=e.totalWidth,r=e.position,n=e.text,s=e.offset;return e.visible&&n?(e=new E(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),(n=new Xx(n,t)).reflow(new E),t=n.box,o=i.x1+t.width()>o,e=e.center().y-t.height()/2,r=[(r===Fm||"inside"===r&&o?Fm:"after")==Fm?i.x0-t.width():i.x1,e],(o=new E(r[0],r[1],r[0]+t.width(),r[1]+t.height())).translate(s.left||0,s.top||0),n.reflow(o),n.renderVisual(),n.visual):null},Um.prototype.visualOptions=function(){var t=x({},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}},Um);function Um(){Em.apply(this,arguments)}function Nm(){Rm.apply(this,arguments)}function Gm(){Vm.apply(this,arguments)}function Wm(t){zm.call(this),this.options=x({},this.options,t),this.createVisual()}function Xm(t,e,i){return x({},e,{node:t,totalWidth:i,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})}i(Hm,{position:"inside"}),(Ym=h)&&(Zm.__proto__=Ym),((Zm.prototype=Object.create(Ym&&Ym.prototype)).constructor=Zm).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;return!1!==t.visible&&i?((i=Yx.buildTitle(i,t)).reflow(e),i.renderVisual(),i.visual):null},Zm.prototype.createElement=function(){return this.getElement()};var Ym,qm=Zm;function Zm(){Ym.apply(this,arguments)}function Qm(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}i(qm,{align:b,border:{width:0},margin:P(5),padding:P(5)}),(Km=h)&&(Jm.__proto__=Km),((Jm.prototype=Object.create(Km&&Km.prototype)).constructor=Jm).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.nodes,o=(void 0===i&&(i=[]),t.item);return!1!==t.visible&&i.length?((i=i.map(function(t){return{text:t.label&&t.label.text||"",area:{background:void 0!==o.areaBackground?o.areaBackground:t.color,opacity:void 0!==o.areaOpacity?o.areaOpacity:t.opacity},node:t}})).sort(Qm),(t=new I1(Object.assign({},t,{data:i}))).reflow(e),t.renderVisual(),t.visual):null},Jm.prototype.createElement=function(){return this.getElement()};var Km,$m=Jm;function Jm(){Km.apply(this,arguments)}i($m,{markers:{visible:!1},item:{type:xr,cursor:yt,opacity:1},position:k,align:b,border:{width:0}});var tx,ex="link",ix="node",ox=((tx=Vx)&&(B.__proto__=tx),((B.prototype=Object.create(tx&&tx.prototype)).constructor=B).prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver()},B.prototype._initElement=function(t){xt(this.element=t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document"),t.tabIndex=t.getAttribute("tabindex")||0;var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},B.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},B.prototype._initResizeObserver=function(){var o=this,t=new ResizeObserver(function(t){t.forEach(function(t){var e=t.contentRect,i=e.width,e=e.height;t.target!==o.element||o.size&&o.size.width===i&&o.size.height===e||(o.size={width:i,height:e},o.surface.setSize(o.size),o.resize=!0,o._redraw())})});(this._resizeObserver=t).observe(this.element)},B.prototype._createSurface=function(){return w.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)})},B.prototype._initTheme=function(t){t=t||this.theme||{};this.theme=t,this.options=x({},t,this.options)},B.prototype.setLinksOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.opacity)})},B.prototype.setLinksInactivityOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.highlight.inactiveOpacity)})},B.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:T(i)?i:e}))},B.prototype.trigger=function(t,e){e=Object.assign({},e,{type:t,targetType:e.element.type,dataItem:e.element.dataItem});return tx.prototype.trigger.call(this,t,e)},B.prototype._mouseenter=function(t){var e=t.element,i=e.type===ex,o=e.type===ix,r=Boolean(e.chartElement&&e.chartElement.options.node);i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t)||(t=this.options.links.highlight,i?(this.setLinksInactivityOpacity(t.inactiveOpacity),this.setOpacity(e,t.opacity,e.linkOptions.highlight.opacity)):o?this.highlightLinks(e,t):r&&(i=this.nodesVisuals.get(e.chartElement.options.node.id),this.highlightLinks(i,t)))},B.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===ex,r=i.type===ix,i=Boolean(i.chartElement&&i.chartElement.options.node),n=t.originalEvent.relatedTarget;o&&n&&"text"===n.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t))||r&&this.trigger("nodeLeave",t)||(o||r||i)&&this.linksVisuals.forEach(function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})},B.prototype._mousemove=function(t){var e,i,o,r=this,n=this.options.tooltip,s=n.followPointer,n=n.delay,a=t.element,h=a.type;h!==ex&&h!==ix||this.tooltipShown&&!s||(e=t.originalEvent,o=this.element.getBoundingClientRect(),i=e.clientX-o.left<o.width/2,o=e.clientY-o.top<o.height/2,t.tooltipData={popupOffset:{left:e.pageX,top:e.pageY},popupAlign:{horizontal:i?"left":"right",vertical:o?"top":"bottom"}},h===ix&&(i=(e=a.dataItem).sourceLinks,h=(o=e.targetLinks).length?o:i,t.nodeValue=h.reduce(function(t,e){return t+e.value},0)),this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),a=s&&this.tooltipShown?0:n,this.tooltipTimeOut=setTimeout(function(){r.trigger("tooltipShow",t),r.tooltipShown=!0,r.tooltipTimeOut=null},a))},B.prototype._click=function(t){var e=t.element,i=e.type===ex;e.type===ix?this.trigger("nodeClick",t):i&&this.trigger("linkClick",t)},B.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach(function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)}))},B.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},B.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},B.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},B.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},B.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},B.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,t=t.height;this.size={width:e,height:t},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},B.prototype._getSize=function(){return this.element.getBoundingClientRect()},B.prototype.createVisual=function(){this.visual=this._render()},B.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new qm(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},B.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new $m(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},B.prototype.calculateSankey=function(o,t){var e=t.title,i=t.legend,r=t.data,n=t.nodes,s=t.labels,a=t.nodeColors,t=!t.disableAutoLayout,h=new E(0,0,o.width,o.height),p=this.titleBox(e,h),l=h.clone(),e=(p&&(c=p.height(),l=e.position===C?(h.unpad({top:c}),new E(0,c,o.width,o.height)):(h.shrink(0,c),new E(0,0,o.width,o.height-c))),this.legendBox(i,r.nodes,l)),c=i&&i.position||$m.prototype.options.position,r=(e&&(c===S&&h.unpad({left:e.width()}),c===A&&h.shrink(e.width(),0),c===C&&h.unpad({top:e.height()}),c===k)&&h.shrink(0,e.height()),Im(Object.assign({},o,{offsetX:0,offsetY:0,width:h.width(),height:h.height()}))),l=r.nodes,i=r.circularLinks;if(i)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],circularLinks:i},legendBox:e,titleBox:p};var u=new E,d=(l.forEach(function(t,e){e=Lm(t,n,a,e),e=new jm(e),u.wrap(di(e.exportVisual().rawBBox())),e=new Hm(Xm(t,s,h.width())).exportVisual();e&&u.wrap(di(e.rawBBox()))}),h.x1),f=h.y1,g=h.width()+d,y=h.height()+f;if(g-=u.x2>h.width()?u.x2-h.width():0,y-=u.y2>h.height()?u.y2-h.height():0,d+=u.x1<0?-u.x1:0,f+=u.y1<0?-u.y1:0,!1==t)return{sankey:Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y,autoLayout:!1})),legendBox:e,titleBox:p};if(this.resize&&t&&this.permutation)this.resize=!1;else{for(var v=Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y,autoLayout:!1})).columns.length,m=[],x=function(t,e){var i=function(t){for(var e=0,i=t.length,o=0;o<i;o++)for(var r=t[o],n=o+1;n<i;n++){var s=t[n],a=Bm((l=r).x0,l.y0,l.x1,l.y1,s.x1,s.y1),h=Bm(l.x0,l.y0,l.x1,l.y1,s.x0,s.y0),p=Bm(l.x0,l.y0,s.x0,s.y0,s.x1,s.y1),l=Bm(l.x1,l.y1,s.x0,s.y0,s.x1,s.y1);a!==h&&p!==l&&(e+=Math.min(r.value,s.value))}return e}(Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y,loops:2,targetColumnIndex:t,reverse:e})).links);return m.push({crosses:i,reverse:e,targetColumnIndex:t}),0===i},_=1;_<=v-1&&!x(_,!1)&&!x(_,!0);_++);var b=Math.min.apply(null,m.map(function(t){return t.crosses})),c=m.find(function(t){return t.crosses===b});this.permutation={targetColumnIndex:c.targetColumnIndex,reverse:c.reverse}}return{sankey:Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y},this.permutation)),legendBox:e,titleBox:p}},B.prototype._render=function(t,e){var s,a,i,t=t||this.options,e=e||this,r=t.data,o=t.labels,n=t.nodes,h=t.links,p=t.nodeColors,l=t.title,c=t.legend,u=e.size,d=u.width,u=u.height,f=Object.assign({},r,{width:d,height:u,nodesOptions:n,title:l,legend:c}),f=this.calculateSankey(f,t),t=f.sankey,g=f.titleBox,f=f.legendBox,y=t.nodes,v=t.links,m=new w.drawing.Group({clip:w.drawing.Path.fromRect(new w.geometry.Rect([0,0],[d,u]))});return g&&(d=new qm(Object.assign({},l,{drawingRect:g})).exportVisual(),m.append(d)),t.circularLinks||(s=new Map,e.nodesVisuals=s,y.forEach(function(t,e){var i=Lm(t,n,p,e),o=new jm(i).exportVisual();o.links=[],o.type=ix,t.color=i.color,t.opacity=i.opacity,o.dataItem=Object.assign({},r.nodes[e],{color:i.color,opacity:i.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}})}),s.set(t.id,o),m.append(o)}),u=v.slice().sort(function(t,e){return e.value-t.value}),a=[],e.linksVisuals=a,u.forEach(function(t){var e,i=t.source,o=t.target,i=s.get(i.id),o=s.get(o.id),r=(r=i,n=o,"source"===(e=x({},h,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight})).colorType?e.color=r.options.fill.color:"target"===e.colorType&&(e.color=n.options.fill.color),e),n=new Dm(r).exportVisual();n.type=ex,n.dataItem={source:Object.assign({},i.dataItem),target:Object.assign({},o.dataItem),value:t.value},n.linkOptions=r,a.push(n),i.links.push(n),o.links.push(n),m.append(n)}),i=y.reduce(function(t,e){return Math.max(t,e.x1)},0),y.forEach(function(t){t=Xm(t,o,i),t=new Hm(t).exportVisual();t&&m.append(t)}),f&&(l=new $m(Object.assign({},c,{drawingRect:f,nodes:y})).exportVisual(),m.append(l))),m},B.prototype.exportVisual=function(t){var e=t&&t.options?x({},this.options,t.options):this.options,t={size:{width:(T(t&&t.width)?t:this.size).width,height:(T(t&&t.height)?t:this.size).height}};return this._render(e,t)},B.prototype._setOptions=function(t){this.options=x({},this.options,t)},B);function B(t,e,i){tx.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver())}i(ox,{title:{position:C},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},align:S,offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2}},tooltip:{followPointer:!1,delay:200}});var rx=function(t,a,h){var p=new Set,l=new Map,c=new Map,o=(t.forEach(function(e){a.forEach(function(t){p.add(t.value(e))});for(var t=0;t<a.length-1;t++){var i=a[t].value(e),o=a[t+1].value(e),r=i+"_"+o,n=h.value(e),s=l.get(r);void 0!==s?l.set(r,s+n):(l.set(r,n),c.set(r,{source:i,target:o}))}}),new Map);return{nodes:Array.from(p).map(function(t,e){return o.set(t,e),{id:e,label:{text:String(t)}}}),links:Array.from(l).map(function(t){var e=t[0],t=t[1],e=c.get(e),i=e.source,e=e.target;return{sourceId:o.get(i),targetId:o.get(e),value:t}})}},nx=1.5,sx=.4,ax="#000",o,hx="11px "+(o="Arial, Helvetica, sans-serif"),px="12px "+o,lx="16px "+o,cx="transparent",ux="#fff",dx={type:Ir},fx={type:xr},gx=Object.assign({},fx,{markers:{visible:!1},highlight:{visible:!1}}),yx=function(){return{icon:{border:{width:1}},label:{font:px,padding:3},line:{length:10,width:2},legendItem:gx,visible:!0}},vx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:fx,opacity:.4}},mx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:fx,opacity:.4}},xx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:ux,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:gx}},_x=function(){return{gap:nx,spacing:sx,target:{color:"#ff0000"},legendItem:gx}},bx=function(){return{width:2,legendItem:dx}},wx=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:fx,opacity:.5}},kx=function(){return{markers:{visible:!1},legendItem:dx,width:2}},Sx=function(){return{gap:.5,line:{color:ax,width:1},legendItem:gx,spacing:sx}},Ax=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:gx}},Cx=Ax,Px=function(t){return Object.assign({color:nt,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:dx},t)},Tx=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:px},notes:yx(),title:{font:lx,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:hx},overlay:t.gradients?{}:{gradient:"none"},area:vx(),rangeArea:mx(),verticalRangeArea:mx(),bar:{gap:nx,spacing:sx,legendItem:gx},boxPlot:xx(),bubble:{border:{width:0},labels:{background:cx},legendItem:gx,opacity:.6},bullet:_x(),candlestick:{border:{_brightness:.8,width:1},downColor:ux,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:ax,width:1},legendItem:gx,spacing:.3},column:{gap:nx,spacing:sx,legendItem:gx},heatmap:{labels:{color:"",background:cx,visible:!0},highlight:{border:{width:0}},legendItem:gx},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:gx},donut:{margin:1,legendItem:gx},funnel:Ax(),pyramid:Cx(),horizontalWaterfall:Sx(),line:bx(),notes:yx(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:gx,spacing:.3},radarArea:wx(),radarLine:kx(),radarColumn:{legendItem:gx},polarArea:wx(),polarLine:kx(),polarScatter:{legendItem:dx},rangeBar:{gap:nx,spacing:sx,legendItem:gx},rangeColumn:{gap:nx,spacing:sx,legendItem:gx},scatter:{legendItem:dx},scatterLine:{width:1,legendItem:dx},verticalArea:vx(),verticalBoxPlot:xx(),verticalBullet:_x(),verticalLine:bx(),waterfall:Sx(),linearTrendline:Px(),exponentialTrendline:Px({style:"smooth"}),logarithmicTrendline:Px({style:"smooth"}),polynomialTrendline:Px({style:"smooth"}),powerTrendline:Px({style:"smooth"}),movingAverageTrendline:Px()},title:{font:lx},subtitle:{font:px},legend:{labels:{font:px}}}}}return H})())}}});
1
+ System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var Hb={};return{setters:[function(t){Hb.Class=t.Class,Hb.Color=t.Color,Hb.drawing=t.drawing,Hb.geometry=t.geometry,Hb.logToConsole=t.logToConsole,Hb.parseColor=t.parseColor,Hb.support=t.support,Hb.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var V={100:t=>{t.exports=Hb}},z={};function j(t){var e=z[t];return void 0!==e||(e=z[t]={exports:{}},V[t](e,e.exports,j)),e.exports}j.d=(t,e)=>{for(var i in e)j.o(e,i)&&!j.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},j.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),j.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var D,F={};{j.r(F),j.d(F,{Aggregates:()=>g_,ArcGauge:()=>Lb,ArcScale:()=>Ob,AreaChart:()=>L_,AreaSegment:()=>O_,ArrowLinearPointer:()=>wb,Axis:()=>t_,AxisGroupRangeTracker:()=>E_,AxisLabel:()=>qx,Bar:()=>z_,BarChart:()=>F_,BarLabel:()=>R_,BarLinearPointer:()=>Sb,Barcode:()=>Rb,Box:()=>E,BoxElement:()=>Fx,BoxPlot:()=>N_,BoxPlotChart:()=>W_,BubbleChart:()=>Z_,Bullet:()=>K_,BulletChart:()=>$_,Candlestick:()=>H_,CandlestickChart:()=>U_,CategoricalChart:()=>__,CategoricalErrorBar:()=>x_,CategoricalPlotArea:()=>_1,CategoryAxis:()=>e_,Chart:()=>cb,ChartAxis:()=>u_,ChartContainer:()=>e1,ChartElement:()=>R,ChartPane:()=>d_,ChartPlotArea:()=>f_,ChartService:()=>$x,CircularGauge:()=>Eb,Class:()=>w.Class,ClipAnimation:()=>P_,ClusterLayout:()=>j_,Crosshair:()=>t1,CrosshairTooltip:()=>J_,CurveProcessor:()=>c_,DateCategoryAxis:()=>i_,DateValueAxis:()=>r_,DefaultAggregates:()=>s1,DomEventsBuilder:()=>Jx,DonutChart:()=>W1,DonutPlotArea:()=>X1,DonutSegment:()=>G1,ErrorBarBase:()=>m_,ErrorRangeCalculator:()=>v_,Extent:()=>By,FloatElement:()=>Gx,FontLoader:()=>Bx,FormatService:()=>Kx,Gauge:()=>mb,Gradients:()=>Ux,HashMap:()=>Ox,Highlight:()=>b1,InstanceObserver:()=>Ix,IntlService:()=>Qx,Legend:()=>I1,LegendItem:()=>O1,LegendLayout:()=>A1,LineChart:()=>M_,LinePoint:()=>k_,LineSegment:()=>S_,LinearGauge:()=>Ab,LinearPointer:()=>_b,LinearScale:()=>xb,Location:()=>Zg,LogarithmicAxis:()=>n_,Map:()=>Fb,Matrix:()=>Rx,MousewheelZoom:()=>S1,Navigator:()=>yb,NavigatorHint:()=>gb,Note:()=>Zx,NumericAxis:()=>o_,OHLCChart:()=>y1,OHLCPoint:()=>g1,Observable:()=>Vx,Pane:()=>i1,Pannable:()=>w1,PieAnimation:()=>V1,PieChart:()=>U1,PieChartMixin:()=>H1,PiePlotArea:()=>N1,PieSegment:()=>F1,PlotAreaBase:()=>o1,PlotAreaEventsMixin:()=>r1,PlotAreaFactory:()=>B1,Point:()=>L,PointEventsMixin:()=>b_,PolarAxis:()=>h_,QRCode:()=>zb,RadarCategoryAxis:()=>a_,RadarLogarithmicAxis:()=>l_,RadarNumericAxis:()=>p_,RadialGauge:()=>Mb,RadialPointer:()=>Tb,RadialScale:()=>Cb,RangeAreaChart:()=>f1,RangeAreaPoint:()=>l1,RangeBar:()=>a1,RangeBarChart:()=>h1,RangePointer:()=>Bb,Ring:()=>zx,RootElement:()=>Nx,Sankey:()=>ox,ScatterChart:()=>Y_,ScatterErrorBar:()=>X_,ScatterLineChart:()=>z1,Sector:()=>jx,Selection:()=>L1,SeriesAggregator:()=>n1,SeriesBinder:()=>y_,ShapeBuilder:()=>Dx,ShapeElement:()=>Hx,SharedTooltip:()=>R1,Sparkline:()=>db,SplineAreaSegment:()=>B_,SplineSegment:()=>C_,StackWrap:()=>D_,StockChart:()=>vb,TemplateService:()=>Mx,Text:()=>Wx,TextBox:()=>Xx,Title:()=>Yx,Tooltip:()=>E1,WaterfallChart:()=>m1,WaterfallSegment:()=>v1,XYPlotArea:()=>D1,ZoomSelection:()=>k1,addClass:()=>mt,alignPathToPixel:()=>bt,anyHasZIndex:()=>ys,append:()=>Jt,appendIfNotNull:()=>vs,areNumbers:()=>ms,autoMajorUnit:()=>Ze,autoTextColor:()=>Lx,barcodeValidator:()=>Vb,bindEvents:()=>te,bindSegments:()=>_s,categoriesCount:()=>bs,chartBaseTheme:()=>Tx,clockwise:()=>wt,constants:()=>H,convertableToNumber:()=>St,countNumbers:()=>Fr,createHashSet:()=>Oe,createOutOfRangePoints:()=>js,createSankeyData:()=>rx,cycleDown:()=>Ct,cycleIndex:()=>Pt,cycleUp:()=>At,deepExtend:()=>x,defaultErrorHandler:()=>Ie,defined:()=>T,deg:()=>ee,elementOffset:()=>ie,elementScale:()=>Ae,elementSize:()=>oe,elementStyles:()=>Et,equalsIgnoreCase:()=>ws,evalOptions:()=>Ss,eventCoordinates:()=>re,eventElement:()=>ne,filterSeriesByType:()=>As,find:()=>be,findAxisByName:()=>zr,getAriaTemplate:()=>jt,getField:()=>Nr,getSpacing:()=>P,getTemplate:()=>zt,getter:()=>Ht,grep:()=>Ut,hasClasses:()=>Nt,hasGradientOverlay:()=>Ts,hasOwnProperty:()=>Be,hasValue:()=>Ms,hashKey:()=>se,inArray:()=>u,interpolateValue:()=>Wt,isArray:()=>vt,isDateAxis:()=>Os,isFunction:()=>Tt,isNumber:()=>m,isObject:()=>It,isPlainObject:()=>qt,isString:()=>kt,keys:()=>Ex,last:()=>ae,limitValue:()=>_,logToConsole:()=>w.logToConsole,map:()=>Zt,mousewheelDelta:()=>Kt,objectKey:()=>he,parseDateCategory:()=>Ps,qrcodeValidator:()=>jb,rad:()=>pe,rectToBox:()=>ui,removeClass:()=>_t,renderIcon:()=>xe,round:()=>M,segmentVisible:()=>xs,setDefaultOptions:()=>i,singleItemOrArray:()=>Is,sparseArrayLimits:()=>_e,styleValue:()=>Bt,unbindEvents:()=>le,valueOrDefault:()=>O});var H={},U=(j.r(H),j.d(H,{DEFAULT_PANE:()=>Ac,NAVIGATOR_AXIS:()=>Sc,NAVIGATOR_PANE:()=>kc}),"arc"),N="ArrowUp",G="ArrowDown",W="ArrowLeft",X="ArrowRight",Y="aria-activedescendant",q="#000",k="bottom",b="center",Z="circle",Q=3,K="cross",$="date",t="12px sans-serif",J=10,tt="end",et=/\{\d+:?/,it="height",ot="inside",rt="inherit",S="left",nt=Number.MAX_VALUE,st=-Number.MAX_VALUE,at="none",ht="object",pt="outside",A="right",lt="roundedRect",ct="start",ut="string",C="top",dt="value",a="#fff",ft="width",y="x",v="y",gt="pointer",yt="horizontal";function vt(t){return Array.isArray(t)}function mt(t,e){for(var i=vt(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var xt=/\s+/g;function _t(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(xt," "))}var w=j(100);function bt(t){var e=.5;t.options.stroke&&w.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function wt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function kt(t){return typeof t===ut}function St(t){return m(t)||kt(t)&&isFinite(t)}function At(t,e){return(t+1)%e}function Ct(t,e){t-=1;return t<0?e-1:t}function Pt(t,e){return 1===e||t%e==0?0:t<0?e+t%e:e<=t?t%e:t}function Tt(t){return"function"==typeof t}var Mt="object",Ot="undefined";function x(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r,n=i[o],s=typeof n;(r=s===Mt&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[o]=new Date(n.getTime()):Tt(n.clone)?e[o]=n.clone():(r=e[o],e[o]=typeof r===Mt&&r||{},t(e[o],n)):s!==Ot&&(e[o]=n)}}(t,e[o]);return t}function It(t){return"object"==typeof t}function Bt(t){return m(t)?t+"px":t}var Lt=/width|height|top|left|bottom|right/i;function Et(t,e){var i=kt(e)?[e]:e;if(vt(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=Lt.test(s)?parseFloat(r[s]):r[s]}return o}if(It(e))for(var a in e)t.style[a]=Bt(e[a])}function P(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[C]=i[A]=i[k]=i[S]=t:(i[C]=t[C]||e,i[A]=t[A]||e,i[k]=t[k]||e,i[S]=t[S]||e),i}function Rt(){}var Vt={compile:function(t){return t}};Rt.register=function(t){Vt=t},Rt.compile=function(t,e){return Vt.compile(t,e)};const Mx=Rt;function zt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=Mx.compile(t.template):Tt(t.content)&&(e=t.content),e}function jt(t){var e;return(t=void 0===t?{}:t).ariaTemplate?t.ariaTemplate=e=Mx.compile(t.ariaTemplate):Tt(t.ariaContent)&&(e=t.ariaContent),e}var Dt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Ft={};function Ht(t){var r;return Ft[t]||(r=[],t.replace(Dt,function(t,e,i,o){r.push(w.drawing.util.defined(e)?e:i||o)}),Ft[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e}),Ft[t]}function Ut(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function Nt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}function Gt(){this._map=new Map}Ft[void 0]=function(t){return t},Gt.prototype.get=function(t){return this._map.get(t)},Gt.prototype.set=function(t,e){this._map.set(t,e)};const Ox=Gt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Wt(t,e,i){return w.drawing.util.round(t+(e-t)*i,Q)}function Xt(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}var Yt="trigger";Xt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[Yt]&&(i=this.callObserver(Yt,t,e)),i},Xt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Xt.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 Ix=Xt;function qt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Zt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);w.drawing.util.defined(n)&&o.push(n)}return o}var Qt=w.support.browser||{};function Kt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Qt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function $t(){}var e,Jt=(e=w.drawing.util).append,te=e.bindEvents,T=e.defined,ee=e.deg,ie=e.elementOffset,oe=e.elementSize,re=e.eventCoordinates,ne=e.eventElement,se=e.hashKey,ae=e.last,_=e.limitValue,he=e.objectKey,pe=e.rad,M=e.round,le=e.unbindEvents,O=e.valueOrDefault;$t.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,$t.fetchFonts(e,o,r),r.depth--))})},$t.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,w.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},$t.preloadFonts=function(t,e){var i=[];$t.fetchFonts(t,i),$t.loadFonts(i,e)};const Bx=$t;function i(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function ce(t,e){this.element=t,this.options=x({},this.options,e),this.wrapper()}var ue,de="k-i-",fe="k-svg-i-",e=(ce.prototype.wrapper=function(){this.addClasses()},ce.prototype.addClasses=function(){},ce.prototype.html=function(){return this.element.outerHTML},i(ce,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(ue=ce)&&(ye.__proto__=ue),((ye.prototype=Object.create(ue&&ue.prototype)).constructor=ye).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(de)}),e=this.options.icon?(this.options.icon.startsWith(de)?"":de)+this.options.icon:"";this._className=e,mt(this.element,"k-icon"),mt(this.element,"k-font-icon"),_t(this.element,t),mt(this.element,e),mt(this.element,this.options.iconClass||""),ue.prototype.wrapper.call(this)},ye),ge,o;function ye(t,e){ue.call(this,t,e)}function ve(t,e){t.innerHTML="",ge.call(this,t,e)}i(e,{name:"HTMLFontIcon",icon:null}),(ge=ce)&&(ve.__proto__=ge),((ve.prototype=Object.create(ge&&ge.prototype)).constructor=ve).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,i=this.element.className.split(" ").find(function(t){return t.startsWith(fe)}),o=(!t&&e&&(o=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=o[1],e=e.replace(o[0],"")),kt(t)&&(t=t.replace("k-i-","").replace(/-./g,function(t){return t[1].toUpperCase()}),t=this.options.svgIcons[t]||this.options.svgIcons[t+"Icon"]),t&&t.name?fe+t.name:"");this._className=o,mt(this.element,"k-svg-icon"),_t(this.element,i),mt(this.element,o),mt(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&qt(t)&&((i=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),i.setAttribute("focusable","false"),i.innerHTML=t.content||"",this.element.appendChild(i)),ge.prototype.wrapper.call(this)},i(o=ve,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var me={svg:o,font:e};function xe(t,e){return t&&(!It(t)||t instanceof HTMLElement)&&!kt(t)||(e=t,t=document.createElement("span")),(e=kt(e)?{icon:e}:e).type||(e.type="svg"),me[e.type]?new me[e.type](t,e).html():null}function _e(t){for(var e=nt,i=st,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===nt?void 0:e,max:i===st?void 0:i}}function be(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var we=w.geometry.Matrix,ke=/matrix\((.*)\)/;function Se(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(ke))||2!==t.length?we.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(we,[null].concat(t))))}function Ae(t){if(!t)return we.unit();for(var e=Se(t),i=t.parentElement;i;)var o=Se(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}const Lx=function(t){return new w.Color(t).isDark()?a:q};var Ce={},Pe=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},o={size:{configurable:!0}},Te=(Pe.prototype.values=function(){return this._values.filter(function(t){return t!==Ce})},Pe.prototype.has=function(t){return void 0!==this._index[t]},Pe.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Pe.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Ce,delete this._index[t])},Pe.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(Pe.prototype,o),function(t){this._set=new Set(t)}),e={size:{configurable:!0}},Me=(Te.prototype.values=function(){return Array.from(this._set)},Te.prototype.has=function(t){return this._set.has(t)},Te.prototype.add=function(t){this._set.add(t)},Te.prototype.delete=function(t){this._set.delete(t)},Te.prototype.clear=function(){this._set.clear()},e.size.get=function(){return this._set.size},Object.defineProperties(Te.prototype,e),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Oe(t){return new(Me()?Te:Pe)(t)}function Ie(t){throw t}const Ex={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 Be(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Le(){this.height=0,this.width=0,this.data=[]}Le.prototype.clone=function(){var t=new Le;return t.height=this.height,t.width=this.width,t.data=this.data.map(function(t){return t.slice()}),t},Le.prototype.get=function(t,e){t=this.data[t];return t?t[e]:null},Le.prototype.set=function(t,e,i){var o=this.data[t];(o=null==o?this.data[t]=[]:o)[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Le.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},Le.prototype.map=function(o,t){var r=new Le;return this.each(function(t,e,i){r.set(e,i,o(t,e,i))},t),r},Le.prototype.transpose=function(){var o=new Le;return this.each(function(t,e,i){o.set(i,e,t)}),o},Le.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;0<=--i;)for(var o=e[i]=new Array(t),r=t;0<=--r;)o[r]=i===r?1:0;return this},Le.prototype.multiply=function(t){for(var e=new Le,i=0;i<this.height;++i)for(var o=0;o<t.width;++o){for(var r=0,n=0;n<this.width;++n){var s=this.get(i,n),a=t.get(n,o);"number"==typeof s&&"number"==typeof a&&(r+=s*a)}e.set(i,o,r)}return e},Le.prototype.inverse=function(){for(var n=this.width,t=this.augment((new Le).unit(n)),s=t.data,e=0;e<n;++e){var i=function(e){var t,i=function(t,e,i){for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);o<s&&(o=s,r=t)}return r}(e,n,function(t){return s[t][e]});if(!s[i][e])return{v:null};e!==i&&(t=s[e],s[e]=s[i],s[i]=t);for(var o=e+1;o<n;++o){for(var r=e+1;r<2*n;++r)s[o][r]-=s[e][r]*s[o][e]/s[e][e];s[o][e]=0}}(e);if(i)return i.v}for(var o=0;o<n;++o)for(var r=s[o][o],a=0;a<2*n;++a)s[o][a]/=r;for(var h=n;0<=--h;)for(var p=h;0<=--p;)if(s[p][h])for(var l=2*n;--l>=n;)s[p][l]-=s[h][l]*s[p][h];return t.slice(0,n,n,n)},Le.prototype.augment=function(t){var o=this.clone(),r=o.width;return t.each(function(t,e,i){o.set(e,i+r,t)}),o},Le.prototype.slice=function(t,e,i,o){for(var r=new Le,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};const Rx=Le;function Ee(){this._defaultPrevented=!0}function Re(){return!0===this._defaultPrevented}var Ve,ze,je,De,Fe,He="function",Ue,o,Ne,e,Ge,o,We,e,Xe,e,Ye,o;function qe(){Ve.call(this),this._events={}}(Ve=w.Class)&&(qe.__proto__=Ve),((qe.prototype=Object.create(Ve&&Ve.prototype)).constructor=qe).prototype.destroy=function(){this.unbind()},qe.prototype.bind=function(t,e,i){var o,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==He;if(void 0===e)for(h in t)n.bind(h,t[h]);else for(var h=0,p=s.length;h<p;h++)!function(){var t=s[h];(r=a?e:e[t])&&(i&&(o=r,(r=function(){n.unbind(t,r),o.apply(n,arguments)}).original=o),(n._events[t]=n._events[t]||[]).push(r))}();return n},qe.prototype.one=function(t,e){return this.bind(t,e,!0)},qe.prototype.first=function(t,e){for(var i,o="string"==typeof t?[t]:t,r=typeof e==He,n=0,s=o.length;n<s;n++){var a=o[n];(i=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(i)}return this},qe.prototype.trigger=function(t,e){var i,o,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=Ee,n.isDefaultPrevented=Re,i=0,o=(r=r.slice()).length;i<o;i++)r[i].call(this,n);return!0===n._defaultPrevented}return!1},qe.prototype.unbind=function(t,e){var i,o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(i=o.length-1;0<=i;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},qe.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events)&&this._events[o]&&delete this._events[o]}this.bind(this.events,t)};const Vx=qe;function Ze(t,e){t=M(e-t,J-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=M(t/e,J);return M(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),J)}(ze=w.Class)&&(Qe.__proto__=ze),((Qe.prototype=Object.create(ze&&ze.prototype)).constructor=Qe).prototype.clone=function(){return new Qe(this.x,this.y)},Qe.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Qe.prototype.rotate=function(t,e){var e=pe(e),i=Math.cos(e),e=Math.sin(e),o=t.x,t=t.y,r=this.x,n=this.y;return this.x=M(o+(r-o)*i+(n-t)*e,Q),this.y=M(t+(n-t)*i-(r-o)*e,Q),this},Qe.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Qe.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Qe.onCircle=function(t,e,i){e=pe(e);return new Qe(t.x-i*Math.cos(e),t.y-i*Math.sin(e))};const L=Qe;function Qe(t,e){ze.call(this),this.x=t||0,this.y=e||0}function Ke(t,e,i,o){je.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function $e(t,e,i,o,r){r=pe(r);return new L(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}(je=w.Class)&&(Ke.__proto__=je),((Ke.prototype=Object.create(je&&je.prototype)).constructor=Ke).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Ke.prototype.width=function(){return this.x2-this.x1},Ke.prototype.height=function(){return this.y2-this.y1},Ke.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Ke.prototype.move=function(t,e){var i=this.height(),o=this.width();return T(t)&&(this.x1=t,this.x2=this.x1+o),T(e)&&(this.y1=e,this.y2=this.y1+i),this},Ke.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},Ke.prototype.wrapPoint=function(t){var e=vt(t),i=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Ke(i,e,i,e)),this},Ke.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},Ke.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===C||e===k?v:y,a=s==v?r:n;return e===b?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===C||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Ke.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Ke.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Ke.prototype.pad=function(t){t=P(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Ke.prototype.unpad=function(t){t=P(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Ke.prototype.clone=function(){return new Ke(this.x1,this.y1,this.x2,this.y2)},Ke.prototype.center=function(){return new L(this.x1+this.width()/2,this.y1+this.height()/2)},Ke.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Ke.prototype.points=function(){return[new L(this.x1,this.y1),new L(this.x2,this.y1),new L(this.x2,this.y2),new L(this.x1,this.y2)]},Ke.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Ke.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Ke.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,o=o.y,n=$e(0,0,r,o,t),s=$e(e,0,r,o,t),a=$e(e,i,r,o,t),r=$e(0,i,r,o,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),i=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+i,this},Ke.prototype.toRect=function(){return new w.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Ke.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Ke.prototype.align=function(t,e,i){var o=e+1,r=e+2,e=e===y?ft:it,n=this[e]();u(i,[S,C])?(this[o]=t[o],this[r]=this[o]+n):u(i,[A,k])?(this[r]=t[r],this[o]=this[r]-n):i===b&&(this[o]=t[o]+(t[e]()-n)/2,this[r]=this[o]+n)};const E=Ke;function Je(t,e,i,o,r){De.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}function ti(t,e){return t-e}(De=w.Class)&&(Je.__proto__=De),((Je.prototype=Object.create(De&&De.prototype)).constructor=Je).prototype.clone=function(){return new Je(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},Je.prototype.middle=function(){return this.startAngle+this.angle/2},Je.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},Je.prototype.point=function(t,e){var t=pe(t),i=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,i=M(this.center.x-i*e,Q),t=M(this.center.y-t*e,Q);return new L(i,t)},Je.prototype.adjacentBox=function(t,e,i){var t=this.clone().expand(t),o=t.middle(),t=t.point(o),r=e/2,n=i/2,s=Math.sin(pe(o)),o=Math.cos(pe(o)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-o/Math.abs(o)),Math.abs(o)<.9&&(t+=n*-s/Math.abs(s)),new E(a,t,a+e,t+i)},Je.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new L(s,t),r=this.point(r),r=new L(r.x-e.x,r.y-e.y),n=this.point(n),n=new L(n.x-e.x,n.y-e.y),e=M(s*s+t*t,Q);return(r.equals(a)||wt(r,a))&&!wt(n,a)&&i*i<=e&&e<=o*o},Je.prototype.getBBox=function(){for(var t=new E(nt,nt,st,st),e=M(this.startAngle%360),i=M((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(ti),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),h=0;h<a.length;h++){var p=this.point(a[h]);t.wrapPoint(p),t.wrapPoint(p,o)}return o||t.wrapPoint(this.center),t},Je.prototype.expand=function(t){return this.radius+=t,this};const zx=Je;function ei(t,e,i,o){Fe.call(this,t,0,e,i,o)}(Fe=zx)&&(ei.__proto__=Fe),((ei.prototype=Object.create(Fe&&Fe.prototype)).constructor=ei).prototype.expand=function(t){return Fe.prototype.expand.call(this,t)},ei.prototype.clone=function(){return new ei(this.center,this.radius,this.startAngle,this.angle)},ei.prototype.setRadius=function(t){return this.radius=t,this};const jx=ei;function ii(){Ue.apply(this,arguments)}(Ue=w.Class)&&(ii.__proto__=Ue),((ii.prototype=Object.create(Ue&&Ue.prototype)).constructor=ii).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i,r=((0===t.angle||0<t.angle&&i===o)&&(o+=.001),new w.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new w.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=w.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},(o=ii).current=new o;const Dx=o;function oi(t){Ne.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}(Ne=w.Class)&&(oi.__proto__=Ne),((oi.prototype=Object.create(Ne&&Ne.prototype)).constructor=oi).prototype.initUserOptions=function(t){return t},oi.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},oi.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},oi.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},oi.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},oi.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},oi.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},oi.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},oi.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},oi.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},oi.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},oi.prototype.createVisual=function(){this.visual=new w.drawing.Group({zIndex:this.options.zIndex,visible:O(this.options.visible,!0)})},oi.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=w.drawing.Animation.create(this.visual,this.options.animation))},oi.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):T(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},oi.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},oi.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},oi.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(O(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},oi.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},oi.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},oi.prototype.renderComplete=function(){},oi.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},oi.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);T(n.options.zIndex)||(n.options.zIndex=O(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},oi.prototype.toggleFocusHighlight=function(t){var e,i=((this.options||{}).accessibility||{}).highlight||{},o=this._focusHighlight;(t||o)&&(o||(e=this.getRoot().options.background,e=Lx(e),e={fill:{opacity:i.opacity,color:i.color},stroke:Object.assign({},{color:e},i.border),zIndex:i.zIndex},o=this._focusHighlight=this.createFocusHighlight(e),this.appendVisual(o)),o.visible(t))},oi.prototype.createGradientOverlay=function(t,e,i){i=new w.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},oi.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},oi.prototype.supportsPointInactiveOpacity=function(){return!0},(e=oi).prototype.options={};const R=e;function ri(t){Ge.call(this,t),this.options.margin=P(this.options.margin),this.options.padding=P(this.options.padding)}(Ge=R)&&(ri.__proto__=Ge),((ri.prototype=Object.create(Ge&&Ge.prototype)).constructor=ri).prototype.reflow=function(t){function e(){o.align(t,y,r.align),o.align(t,v,r.vAlign),o.paddingBox=i.clone().unpad(p).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,p=r.margin,l=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(p).unpad(c).unpad(l),Ge.prototype.reflow.call(this,u),i=h?this.box=new E(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=i.clone(),i.pad(l).pad(c).pad(p),e()),this.translateChildren(i.x1-u.x1+p.left+c+l.left,i.y1-u.y1+p.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},ri.prototype.align=function(t,e,i){this.box.align(t,e,i)},ri.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ri.prototype.createVisual=function(){Ge.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(w.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ri.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},i(o=ri,{align:S,vAlign:C,margin:{},padding:{},border:{color:q,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Fx=o;function ni(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)}function si(t,e){We.call(this,t),this.pointData=e}(We=Fx)&&(si.__proto__=We),((si.prototype=Object.create(We&&We.prototype)).constructor=si).prototype.getElement=function(){var t,e,i=this.options,o=this.paddingBox,r=i.type,n=i.rotation,s=o.center(),a=o.width()/2,h=o.height()/2;return i.visible&&this.hasBox()?(e=this.visualStyle(),r===Z?t=new w.drawing.Circle(new w.geometry.Circle([M(o.x1+a,Q),M(o.y1+h,Q)],Math.min(a,h)),e):"triangle"===r?t=w.drawing.Path.fromPoints([[o.x1+a,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===K?((t=new w.drawing.MultiPath(e)).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):(h=o.toRect(),r===lt&&(a=O(i.borderRadius,h.width()/5),h.setCornerRadius(a)),t=w.drawing.Path.fromRect(h,e)),n&&t.transform(w.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=i.zIndex,t):null},si.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},si.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}},si.prototype.createVisual=function(){this.visual=this.createElement(),ni(this.visual,this.options.accessibilityOptions)},i(e=si,{type:Z,align:b,vAlign:b});const Hx=e,Ux={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:o="radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:o,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:o,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:o,supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:o,center:[.5,.5],radius:.5}};function ai(t){Xe.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}(Xe=R)&&(ai.__proto__=Xe),((ai.prototype=Object.create(Xe&&Xe.prototype)).constructor=ai).prototype.reflow=function(){var t=this.options,e=this.children,i=new E(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o,r,n,s,a,h,p,l,c,u,d,f=0;f<e.length;f++)e[f].reflow(i),o=i,r=e[f].box,d=u=c=l=p=h=a=s=n=void 0,i=(o.x1===r.x1&&o.y1===r.y1&&o.x2===r.x2&&o.y2===r.y2?r:(n=Math.min(o.x1,r.x1),s=Math.max(o.x1,r.x1),a=Math.min(o.x2,r.x2),h=Math.max(o.x2,r.x2),p=Math.min(o.y1,r.y1),l=Math.max(o.y1,r.y1),c=Math.min(o.y2,r.y2),u=Math.max(o.y2,r.y2),(d=[])[0]=new E(s,p,a,l),d[1]=new E(n,l,s,c),d[2]=new E(a,l,h,c),d[3]=new E(s,c,a,u),o.x1===n&&o.y1===p||r.x1===n&&r.y1===p?(d[4]=new E(n,p,s,l),d[5]=new E(a,c,h,u)):(d[4]=new E(a,p,h,l),d[5]=new E(n,c,s,u)),Ut(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new E},ai.prototype.createVisual=function(){this.visual=new w.drawing.Group,this.createBackground()},ai.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),i=w.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(i)},ai.prototype.getRoot=function(){return this},ai.prototype.createGradient=function(t){var e,s,i=this.gradients,o=he(t),r=Ux[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new w.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o}()),(e=new w.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},ai.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},ai.prototype.size=function(){var t=this.options;return new E(0,0,t.width,t.height)},i(e=ai,{width:600,height:400,background:a,border:{color:q,width:0},margin:P(5),zIndex:-2});const Nx=e;function hi(t){Ye.call(this,t),this._initDirection()}(Ye=R)&&(hi.__proto__=Ye),((hi.prototype=Object.create(Ye&&Ye.prototype)).constructor=hi).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=ft,this.elementSizeField=it,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=it,this.elementSizeField=ft,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},hi.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},hi.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,h=s.length,p=e[o+1]+this.alignStart(a,e[n]());if(h){for(var l=p,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=e[i+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[n],u.groupSize),_=new E;_[o+1]=x,_[o+2]=x+m[n],_[i+1]=f,_[i+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}e[o+1]=p,e[o+2]=p+a,e[i+2]=e[i+1]+t}},hi.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===A||o===k?i=e-t:o===b&&(i=(e-t)/2),i},hi.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=M(e[o]()),h=i.length,p=[],l=0,c=0,u=0,d=0,f=[],g=0;g<h;g++){var y=i[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&M(c+n+v[o])>a&&(p.push({groupElements:f,groupSize:l,groupElementsSize:c}),d=Math.max(d,c),u+=s+l,c=l=0,f=[]),l=Math.max(l,v[r]),0<c&&(c+=n),c+=v[o],f.push(y)}return p.push({groupElements:f,groupSize:l,groupElementsSize:c}),{groups:p,groupsSize:u+=l,maxGroupElementsSize:d=Math.max(d,c)}},hi.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},hi.prototype.createVisual=function(){},i(o=hi,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const Gx=o;var pi,li=w.drawing.Text,e;function ci(t,e){pi.call(this,e),this.content=t,this.reflow(new E)}(pi=R)&&(ci.__proto__=pi),((ci.prototype=Object.create(pi&&pi.prototype)).constructor=ci).prototype.reflow=function(t){var e=this.options,e=e.size=w.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new E(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},ci.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,t=t.paintOrder;this.visual=new li(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:t})},i(e=ci,{font:t,color:q});const Wx=e;function ui(t){var e=t.origin,t=t.bottomRight();return new E(e.x,e.y,t.x,t.y)}var di,fi=/\n/m,gi,o,yi,e,vi,o;function mi(t,e,i){di.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new E)}(di=Fx)&&(mi.__proto__=di),((mi.prototype=Object.create(di&&di.prototype)).constructor=mi).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(fi),i=new Gx({vertical:!0,align:t.align,wrap:!1}),o=x({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new Wx(e[r].trim(),o);i.append(n)}},mi.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=ui(o.clippedBBox()||new w.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(di.prototype.reflow.call(this,t),i.rotation&&(o=P(i.margin),e=this.box.unpad(o),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(o.left-o.right,o.top-o.bottom),this.rotatedBox=e.clone(),e.pad(o)))},mi.prototype.createVisual=function(){var t=this.options;this.visual=new w.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=w.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},mi.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!T(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):di.prototype.renderVisual.call(this))},mi.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},mi.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},mi.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},mi.prototype.rotationTransform=function(){var t,e,i,o=this.options.rotation;return o?(t=(e=this.normalBox.center()).x,e=e.y,i=this.rotatedBox.center(),w.geometry.transform().translate(i.x-t,i.y-e).rotate(o,[t,e])):null};const Xx=mi;function xi(t){gi.call(this,t),this._textBox=new Xx(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function _i(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(P(o.options.margin),{bottom:0}),i.options.margin=Object.assign(P(i.options.margin),{top:0})}}(gi=R)&&(xi.__proto__=gi),((xi.prototype=Object.create(gi&&gi.prototype)).constructor=xi).prototype.reflow=function(t){gi.prototype.reflow.call(this,t),this.box.snapTo(t,y)},xi.buildTitle=function(t,e){var i,t="string"==typeof t?{text:t}:t;return i=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new xi(t):i},xi.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==k}),t=t.filter(function(t){return t&&t.options.position===k});return _i(e),_i(t),t.reverse(),e.concat(t)},i(o=xi,{color:q,position:C,align:b,margin:P(5),padding:P(5)});const Yx=o;function bi(t,e,i,o,r){yi.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new E)}(yi=Xx)&&(bi.__proto__=yi),((bi.prototype=Object.create(yi&&yi.prototype)).constructor=bi).prototype.visualContext=function(t){t=yi.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},bi.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:ne(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},bi.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=ui(t.bbox(e.matrix()))):yi.prototype.rotate.call(this),this.box},bi.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return yi.prototype.rotationTransform.call(this);var i=w.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||C,n=t===C||t===k?y:v,s=t===C||t===k?v:y,t=t===C||t===S?r.origin:r.bottomRight(),a=o.topLeft().transformCopy(i),h=o.topRight().transformCopy(i),p=o.bottomRight().transformCopy(i),o=o.bottomLeft().transformCopy(i),i=w.geometry.Rect.fromPoints(a,h,p,o),l={};l[s]=r.origin[s]-i.origin[s];var c,i=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(h[s]+l[s]-t[s]),s=M(i,J)===M(t,J)?(c=a,h):t<i?(c=h,p):(c=a,o),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,w.geometry.transform().translate(l.x,l.y).rotate(e)},i(e=bi,{_autoReflow:!1});const qx=e;function wi(t,e,i){vi.call(this,e),this.fields=t,this.chartService=i,this.render()}(vi=Fx)&&(wi.__proto__=vi),((wi.prototype=Object.create(vi&&vi.prototype)).constructor=wi).prototype.hide=function(){this.options.visible=!1},wi.prototype.show=function(){this.options.visible=!0},wi.prototype.render=function(){var t,e,i,o,r,n,s,a,h=this,p=this.options;p.visible&&(i=p.label,p=p.icon,o=new E,r=function(){return h},n=p.size,s=this.fields.text,T(i)&&i.visible&&((a=zt(i))?s=a(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color=i.position===ot?"#fff":p.background),this.label=new Xx(s,x({},i)),this.label.aliasFor=r,i.position!==ot||T(n)||(p.type===Z?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),p.width=t||n||7,p.height=e||n||7,(a=new Hx(x({},p))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new E),this.wrapperBox=o.wrap(a.box))},wi.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),p=r.line.length,l=r.position;r.visible&&(u(l,[S,A])?l===S?(o=a.alignTo(t,l).translate(-p,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[o.x2,h.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(p,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[o.x1,h.y]],i=o.clone().wrapPoint(e))):l===k?(o=a.alignTo(t,l).translate(t.center().x-a.center().x,p),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(t.center().x-a.center().x,-p),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s)&&(r.label.position===pt&&n.box.alignTo(s.box,l),n.reflow(n.box)),this.contentBox=o,this.targetBox=t,this.box=i||o)},wi.prototype.createVisual=function(){vi.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},wi.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):vi.prototype.renderVisual.call(this)},wi.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(bt(t=w.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},wi.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},wi.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},wi.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},wi.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:ne(t),text:T(e.label)?e.label.text:"",visual:this.visual})},i(o=wi,{icon:{visible:!0,type:Z},label:{position:ot,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:C,zIndex:2});const Zx=o;function ki(){}var Si={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},e={implementation:{configurable:!0}};ki.register=function(t){Si=t},e.implementation.get=function(){return Si},Object.defineProperties(ki,e);const Qx=ki;function Ai(t){this._intlService=t}var Ci=/\{(\d+)(:[^\}]+)?\}/g,o;(o={intl:{configurable:!0}}).intl.get=function(){return this._intlService||Qx.implementation},o.intl.set=function(t){this._intlService=t},Ai.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return kt(t)&&t.match(et)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},Ai.prototype.localeAuto=function(t,o,r){var n=this.intl;return kt(t)&&t.match(et)?t.replace(Ci,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(Ai.prototype,o);const Kx=Ai;function Pi(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Kx(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}(e={intl:{configurable:!0}}).intl.get=function(){return this._intlService||Qx.implementation},e.intl.set=function(t){this._intlService=t,this.format.intl=t},Pi.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Pi.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Pi.prototype,e);const $x=Pi;function Ti(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Mi(t,e){e.insertBefore(t,e.firstChild)}function Oi(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Ii(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}var Bi=Object.defineProperty,Li=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Ei=function(t){var e,i,o=!1,r=[],n={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_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\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,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},h={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(i in n)if(Be(n,i)&&(r=t.match(n[i]))){if("windows"===i&&"plugins"in navigator)return!1;(o={}).device=i,o.tablet=Ri(i,a,!1),o.browser=Ri(t,h,"default"),o.name=Ri(i,s),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=(r[3]||"0").replace("_","."),e=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return o};function Ri(t,e,i){for(var o in e)if(Be(e,o)&&e[o].test(t))return o;return void 0!==i?i:t}function Vi(t,e){return t.bind(e)}function zi(t,e,i,o,r){Yi(t,e,i,o,r)}function ji(t,e,i,o,r){var n,s,a;n=t,s=i,a=o,(vt(t=e)?t:(t||"").split(" ")).forEach(function(t){qi(n,t,s,a)})}function Di(t){var e=Wi(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function Fi(t,e){var i=t.prototype;i.events?e.forEach(function(t){i.events.indexOf(t)<0&&i.events.push(t)}):i.events=e}function Hi(){return Number(new Date)}function Ui(){}function Ni(t){var e=[];if(t)for(var i=Oi(t).split("-"),o=0;o<i.length;o++)e.push("k-pos-"+i[o]);return e.join(" ")}function Gi(t){t.preventDefault()}var Wi=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=Xi();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},Xi=function(){var t=Ei(navigator.userAgent),e=function(t){var e,i=!1,o=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(Be(r,e)&&(o=t.match(r[e]))){(i={})[e]=!0,i[o[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,i.version=parseInt(document.documentMode||o[2],10);break}return i}(navigator.userAgent),i=e.chrome,o=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!i&&!o&&!r&&!e&&window.PointerEvent,n.msPointers=!i&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,h=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,i="string"==typeof s.style[t+"Transition"];if(i||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),h={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},i&&((a=h).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}),s=null,n.transforms=h,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;var t;if(n.mobileOS.android)return!n.browser.chrome||!(n.browser.version<32||((t=document.querySelector("meta[name=viewport]"))?t.getAttribute("content"):"").match(/user-scalable=no/i))}return!1},n},Yi=function(s,t,a,h,p){(vt(t)?t:(t||"").split(" ")).forEach(function(t){var i,e,o,r,n;n=o=h,(e=a)&&Tt(e)&&!o?n=e:e&&"string"==typeof e&&Tt(n)&&(r=e),(i=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,Bi(t,"currentTarget",{value:e}),Bi(t,"delegateTarget",{value:i}),n(t))},Boolean(p))})},qi=function(t,e,i,o){t.removeEventListener(e,i,Boolean(o))},Zi=Object.assign,Qi=800,Ki=0,$i="move",Ji="tap",to="doubleTap",eo="release",io="gesturechange",oo="gestureend",ro="gesturetap",no={api:0,touch:0,mouse:9,pointer:9};function so(t){var e,i,o,r=Xi(),n=[],s=t.originalEvent||t,a=t.currentTarget,h=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(i=s?s.changedTouches:[]).length;h<e;h++)o=i[h],n.push({location:o,event:t,target:o.target,currentTarget:a,id:o.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}(ho=w.Class)&&(uo.__proto__=ho),((uo.prototype=Object.create(ho&&ho.prototype)).constructor=uo).prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Hi(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},uo.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var ao,ho,po=uo,lo=((ao=w.Class)&&(co.__proto__=ao),((co.prototype=Object.create(ao&&ao.prototype)).constructor=co).prototype.press=function(){this._holdTimeout=setTimeout(Vi(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},co.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(Ji,t):e._trigger(to,t),e.userEvents._clicks=0},300))},co.prototype._hold=function(){this._trigger("hold",this.pressEvent)},co.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(mo.current&&mo.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger($i,t)}},co.prototype.end=function(t){this.endTime=Hi(),this._finished||(this._finished=!0,this._trigger(eo,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(Ji,t)),clearTimeout(this._holdTimeout),this.dispose())},co.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},co.prototype.skip=function(){this.dispose()},co.prototype.cancel=function(){this.dispose()},co.prototype.isMoved=function(){return this._moved},co.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Hi(),this._moved=!0,this._trigger("start",t)},co.prototype._trigger=function(t,e){var i=this,e=e.event,o={touch:i,x:i.x,y:i.y,target:i.target,event:e};i.userEvents.notify(t,o)&&e.preventDefault()},co.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},co);function co(t,e,i){ao.call(this),Zi(this,{x:new po("X",i.location),y:new po("Y",i.location),type:i.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||no[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function uo(t,e){ho.call(this);var i=this;i.support=Xi(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=t,i._updateLocationData(e),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=Hi()}function fo(t){for(var e=Wi(navigator.userAgent).up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}function go(){}(vo=Vx)&&(_o.__proto__=vo),((_o.prototype=Object.create(vo&&vo.prototype)).constructor=_o).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},_o.prototype.destroy=function(){var e,i=this,t=this.options,o=this.element;i._destroyed||(i._destroyed=!0,i.captureUpIfMoved&&this.support.eventCapture&&(e=i.surface,fo(function(t){e.removeEventListener(t,i.preventIfMoving)})),ji(i.surface,Di("move"),this._surfaceMoveHandler),ji(i.surface,Di("up cancel"),this._surfaceEndHandler),ji(o,Di("down"),this._elementStartHandler),i.useClickAsTap&&ji(o,Di("click"),this._elementClickHandler),t.preventDragEvent&&ji(o,Di("dragstart"),this._elementDragStartHandler),ji(o,Di("mousedown"),this._elementSelectHandler),i._disposeAll(),i.unbind(),delete i.surface,delete i.element,delete i.currentTarget)},_o.prototype.capture=function(){_o.current=this},_o.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},_o.prototype.notify=function(t,e){var i,o,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case $i:a=io;break;case"end":a=oo;break;case Ji:a=ro}Zi(e,{touches:s},(t=s[0],s=s[1],i=t.x.location,t=t.y.location,r=i-(o=s.x.location),n=t-(s=s.y.location),{center:{x:(i+o)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,Zi(e,{type:a}))},_o.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},_o.prototype.move=function(t,e){this._apiCall("_move",t,e)},_o.prototype.end=function(t,e){this._apiCall("_end",t,e)},_o.prototype._isMultiTouch=function(){return 1<this.touches.length},_o.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},_o.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},_o.prototype._isMoved=function(){return Ut(this.touches,function(t){return t.isMoved()}).length},_o.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},_o.prototype._start=function(t){var e,i,o=this,r=0,n=o.filter,s=so(t),a=s.length,h=t.which;if(!(h&&1<h||o._maxTouchesReached()))for(_o.current=null,o.currentTarget=t.currentTarget,o.stopPropagation&&t.stopPropagation();r<a&&!o._maxTouchesReached();r++)i=s[r],(e=n?i.currentTarget:o.element)&&0===e.length||(i=new lo(o,e,i),o.touches.push(i),i.press(),o._isMultiTouch()&&o.notify("gesturestart",{}))},_o.prototype._move=function(t){this._eachTouch("move",t)},_o.prototype._end=function(t){this._eachTouch("end",t)},_o.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:Hi(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},_o.prototype._eachTouch=function(t,e){for(var i,o,r,n={},s=so(e),a=this.touches,h=0;h<a.length;h++)n[(i=a[h]).id]=i;for(h=0;h<s.length;h++)(r=n[(o=s[h]).id])&&r[t](o)},_o.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:Ui,preventDefault:Ui})},_o.defaultThreshold=function(t){Ki=t},_o.minHold=function(t){Qi=t};var yo,vo,mo=_o,xo,o;function _o(t,e){vo.call(this);var i,o,r,n=this,s=Xi(),a=(this.support=s,this.options=e=e||{},i=n.filter=e.filter,n.threshold=e.threshold||Ki,n.minHold=e.minHold||Qi,n.touches=[],n._maxTouches=e.multiTouch?2:1,n.allowSelection=e.allowSelection,n.captureUpIfMoved=e.captureUpIfMoved,n.useClickAsTap=!e.fastTap&&!s.delayedClick(),n._clicks=0,n.supportDoubleTap=e.supportDoubleTap,!s.touch||s.mouseAndTouchPresent);Zi(n,{element:t,surface:e.global&&a?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=Vi(this._move,this),zi(n.surface,Di("move"),this._surfaceMoveHandler),this._surfaceEndHandler=Vi(this._end,this),zi(n.surface,Di("up cancel"),this._surfaceEndHandler),this._elementStartHandler=Vi(this._start,this),zi(t,Di("down"),i,this._elementStartHandler),n.useClickAsTap&&(this._elementClickHandler=Vi(this._click,this),zi(t,Di("click"),i,this._elementClickHandler)),(s.pointers||s.msPointers)&&(s.browser.version<11?(a="pinch-zoom double-tap-zoom",t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?a+" "+e.touchAction:a):t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=Gi,zi(t,Di("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=Vi(this._select,this),zi(t,Di("mousedown"),i,this._elementSelectHandler),n.captureUpIfMoved&&s.eventCapture&&(o=n.surface,r=Vi(n.preventIfMoving,n),fo(function(t){o.addEventListener(t,r,!0)})),n.bind(["press","hold",Ji,to,"start",$i,"end",eo,"cancel","gesturestart",io,oo,ro,"select"],e)}go.register=function(t){yo=t},go.create=function(t,e){return yo?yo.create(t,e):new mo(t,Object.assign({},{global:!0,multiTouch:!0,fastTap:!0},e))};const Jx=go;function bo(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new w.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),bt(n),n}function wo(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new w.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),bt(e),e}function r(t,e){void 0===e&&(e=new $x),xo.call(this,t),this.chartService=e,this.options.visible||(this.options=x({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==at},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==at},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}(xo=R)&&(r.__proto__=xo),((r.prototype=Object.create(xo&&xo.prototype)).constructor=r).prototype.initFields=function(){},r.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},r.prototype.normalizeLabelRotation=function(t){var e=t.rotation;It(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},r.prototype.createLabels=function(){var t=this.options,e=t.vertical?A:b,i=x({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},s=this.createAxisLabel(n,i,s);s&&(this.append(s),this.labels.push(s))}}},r.prototype.clearLabels=function(){this.children=Ut(this.children,function(t){return!(t instanceof qx)}),this.labels=[]},r.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Ut(this.children,function(t){return t!==e.title}),this.title=void 0)},r.prototype.clear=function(){this.clearLabels(),this.clearTitle()},r.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new E(r,e.y1,r,e.y2-t):new E(e.x1,o,e.x2-t,o)},r.prototype.createTitle=function(){var t=this.options,t=x({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Xx(t.text,t),this.append(t),this.title=t)},r.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=x({},e,i[o]),r=(r.value=this.parseNoteValue(r.value),new Zx({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(T(r.options.position)?t.vertical&&!u(r.options.position,[S,A])?r.options.position=t.reverse?S:A:t.vertical||u(r.options.position,[C,k])||(r.options.position=t.reverse?k:C):t.vertical?r.options.position=t.reverse?S:A:r.options.position=t.reverse?k:C,this.append(r),this.notes.push(r))}},r.prototype.parseNoteValue=function(t){return t},r.prototype.renderVisual=function(){xo.prototype.renderVisual.call(this),this.createPlotBands()},r.prototype.createVisual=function(){xo.prototype.createVisual.call(this),this.createBackground(),this.createLine()},r.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new w.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},r.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),h=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,p={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)T(i)&&n%i==0||(p.tickX=h?a.x2:a.x2-e.size,p.tickY=h?a.y1-e.size:a.y1,p.position=t[n],s.append(bo(p,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},r.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new w.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&bt(e),(i=this._lineGroup=new w.drawing.Group).append(e),this.visual.append(i),this.createTicks(i))},r.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},r.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=w.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},r.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new w.drawing.Group({zIndex:-1}),s=Ut(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var h=i[a],p=void 0,l=void 0,c=h.label,u=void 0,l=o?(p=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(p=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,h,new E(p.x1,l.y1,p.x2,l.y2))),0!==p.width()&&0!==l.height()&&(c=new w.geometry.Rect([p.x1,l.y1],[p.width(),l.height()]),p=w.drawing.Path.fromRect(c,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(p),u)&&n.append(u)}this.appendVisual(n)}},r.prototype.createPlotBandLabel=function(t,e,i){var o,r;return!1===t.visible?null:(o=t.text,T(t)&&t.visible&&((r=zt(t))?o=r({text:o,item:e}):t.format&&(o=this.chartService.format.auto(t.format,o)),t.color||(t.color=this.options.labels.color)),(r=new Xx(o,t)).reflow(i),r.renderVisual(),r.visual)},r.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],p={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=M(t[n]);u(s,l)||n%i==0||a&&h===s||(p.position=s,c.append(wo(p,e)),l.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},r.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?ft:it,o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,h=((this.getRoot()||{}).box||t)[s](),p=0,l=0;l<n;l++){var c=i[l].box[s]();c+a<=h&&(p=Math.max(p,c))}this.box=r?new E(t.x1,t.y1,t.x1+p+a,t.y2):new E(t.x1,t.y1,t.x2,t.y1+p+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},r.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},r.prototype.labelTickIndex=function(t){return t.index},r.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),p=o?a.box.height():a.box.width(),l=n[h],h=n[h+1],c=void 0,u=void 0,u=o?c=i?l+(h-l)/2-p/2:l-p/2:i?(c=l,h):(c=l-p/2)+p;this.positionLabel(a,r,c,u)}},r.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=S):(n-=r+t.box.width(),t.options.rotationOrigin=A),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=k):(n+=r,t.options.rotationOrigin=C),new E(i,n,o,n+t.box.height()));t.reflow(s)},r.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},r.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(o=0!==s?s:o))break}if(0!==o){for(var a=0;a<e.length;a++)e[a].options.rotation=o,e[a].reflow(new E);return!0}},r.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=i?A:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?C:k),e.reflow(this.box))},r.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;T(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},r.prototype.noteSlot=function(t){return this.getSlot(t)},r.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,i=e?v:y;this.box.snapTo(t,i),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[i+1]-=this.lineBox()[i+1]-t[i+1],this.box[i+2]-=this.lineBox()[i+2]-t[i+2]},r.prototype.axisLabelText=function(t,e,i){function o(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=zt(e);return n?n(Object.assign({},i,{get text(){return o()},value:t,format:e.format,culture:e.culture})):o()},r.prototype.slot=function(t,e,i){t=this.getSlot(t,e,i);if(t)return t.toRect()},r.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),i[e+1]-=t.start,i[e+2]+=t.end):(o[0].options.visible&&i.wrap(o[0].box),(e=o[o.length-1]).options.visible&&i.wrap(e.box))),i},r.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,h=0,p=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;i?(d=o[u+s],f=o[u+a]):d=f=o[u],h=Math.max(h,d-c.box[r+1]),p=Math.max(p,c.box[r+2]-f)}return{start:h,end:p}},r.prototype.limitRange=function(t,e,i,o,r){var n,s,a=this.options;return t<i&&r<0&&(!T(a.min)||a.min<=i)||o<e&&0<r&&(!T(a.max)||o<=a.max)?null:e<i&&0<r||o<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<i&&r<0?(n=_(t,i,o),s=_(t+a,i+a,o)):o<e&&0<r&&(s=_(e,i,o),n=_(e-a,i,o-a)),{min:n,max:s})},r.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},r.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},r.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),t=t?v:y,o=this.lineDir(),r=t+(1===o?1:2).toString();return{axis:t,axisOrigin:r,axisDir:o,lineBox:e,lineSize:i,lineStart:e[r]}},r.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<o?t[i]-n[r]:n[r]-t[i])/e},r.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},r.prototype.labelsBetweenTicks=function(){return!this.options.justified},r.prototype.prepareUserOptions=function(){},i(o=r,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:q,visible:!0},title:{visible:!0,position:b},majorTicks:{align:pt,size:4,skip:0,step:1},minorTicks:{align:pt,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:pt,minorTickType:at,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:q,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const t_=o;var ko="milliseconds",So="seconds",Ao="minutes",Co="hours",Po="days",To="weeks",Mo="months",Oo="years",Io=1e3,Bo=60*Io,Lo=60*Bo,Eo=24*Lo,Ro=7*Eo,Vo=31*Eo,zo=365*Eo,jo={years:zo,months:Vo,weeks:Ro,days:Eo,hours:Lo,minutes:Bo,seconds:Io,milliseconds:1},Do,e;function Fo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Bo}function Ho(t,e){return new Date(t.getTime()+e)}function Uo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function No(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Go(t,e,i,r){var o,n,s,a=t;return t&&(o=(t=Uo(t)).getHours(),i===Oo?No(a=new Date(t.getFullYear()+e,0,1),0):i===Mo?No(a=new Date(t.getFullYear(),t.getMonth()+e,1),o):i===To?No(a=Go(function(t,e){void 0===r&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return Ho(t,-i*Eo)}(t,r),7*e,Po),o):i===Po?No(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),o):i===Co?(o=t,n=e,(s=new Date(o)).setMinutes(0,0,0),o=(o.getTimezoneOffset()-s.getTimezoneOffset())*Bo,a=Ho(s,o+n*Lo)):i===Ao?0<(a=Ho(t,e*Bo)).getSeconds()&&a.setSeconds(0):i===So?a=Ho(t,e*Io):i===ko&&(a=Ho(t,e)),i!==ko)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function Wo(t,e,i){return Go(Uo(t),0,e,i)}function Xo(t,e,i){t=Uo(t);return t&&Wo(t,e,i).getTime()===t.getTime()?t:Go(t,1,e,i)}function Yo(t,e){return t&&e?t.getTime()-e.getTime():-1}function qo(t,e){return t.getTime()-e}function Zo(t){if(vt(t)){for(var e=[],i=0;i<t.length;i++)e.push(Zo(t[i]));return e}if(t)return Uo(t).getTime()}function Qo(t,e){return t&&e?Zo(t)===Zo(e):t===e}function Ko(t,e,i){return Fo(t,e)/jo[i]}function $o(t,e,i,o){var t=Uo(t),r=Uo(e);return(i===Mo?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Ko(t,new Date(t.getFullYear(),t.getMonth()),Po)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():i===Oo?t.getFullYear()-r.getFullYear()+$o(t,new Date(t.getFullYear(),0),Mo,1)/12:i===Po||i===To?Ko(t,r,i):qo(t,e)/jo[i])/o}function Jo(t,e,i){return i===Oo?e.getFullYear()-t.getFullYear():i===Mo?12*Jo(t,e,Oo)+e.getMonth()-t.getMonth():i===Po?Math.floor(qo(e,t)/Eo):Math.floor(qo(e,t)/jo[i])}function tr(t,e){return kt(e)&&t.parseDate(e)||Uo(e)}function er(t,e){if(vt(e)){for(var i=[],o=0;o<e.length;o++)i.push(tr(t,e[o]));return i}return tr(t,e)}function ir(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}function n(){Do.apply(this,arguments)}(Do=t_)&&(n.__proto__=Do),((n.prototype=Object.create(Do&&Do.prototype)).constructor=n).prototype.initFields=function(){this._ticks={}},n.prototype.categoriesHash=function(){return""},n.prototype.clone=function(){var t=new n(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},n.prototype.initUserOptions=function(t){var e=t.categories||[],i=T(t.min),o=T(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,o=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,o)),t},n.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},n.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},n.prototype.roundedRange=function(){return this.range()},n.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},n.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(t-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:t}},n.prototype.arrangeLabels=function(){Do.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;0<r.length&&(e=o[(t=this.options.vertical?v:y)+1],o=o[t+2],i=r[0],r=ae(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),r.box[t+1]>o||r.box[t+2]<e)&&(r.options.visible=!1)},n.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},n.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},n.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},n.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,e=e.max,o=Math.ceil(e),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},n.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,e=e.reverse,o=this.scaleOptions(),r=o.scale,n=o.box,s=o.min,a=n[(i?v:y)+(e?2:1)],h=this.tickIndices(t),p=[],l=0;l<h.length;l++)p.push(a+M(r*(h[l]-s),Q));return p},n.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},n.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?v:y,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},n.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,i=this.lineBox(),o=e?i.height():i.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:i,lineSize:o,lineStart:i[r]}},n.prototype.lineDir=function(){return this.options.reverse?-1:1},n.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,o=o.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,h=this.lineInfo(),p=h.axis,h=h.lineStart,l=a.clone(),c=!T(e),t=O(t,0),e=O(e,t),e=Math.max(e-1,t),u=h+(t-n)*s,h=h+(Math.max(t,e)+1-n)*s;return c&&o&&(h=u),i&&(u=_(u,a[p+1],a[p+2]),h=_(h,a[p+1],a[p+2])),l[p+1]=r?h:u,l[p+2]=r?u:h,l},n.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,i=this.lineBox(),o=t.clone();return o[e+1]=_(t[e+1],i[e+1],i[e+2]),o[e+2]=_(t[e+2],i[e+1],i[e+2]),o},n.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=o),Do.prototype.slot.call(this,t,e,i)},n.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,h=s[e+1],s=s[e+2],t=t[e];return t<h||s<t?null:(s=(e=(i?r:a)+(t-h)/n)%1,o?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e))},n.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},n.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},n.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},n.prototype.categoriesCount=function(){return(this.options.categories||[]).length},n.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,t=M(t/(i/e),J);return{min:t,max:e+t}},n.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),o=i.max-i.min,t=this.scaleToDelta(t,o),o=i.min+e*t,i=i.max-(1-e)*t;return{min:o,max:i=i-o<.1?o+.1:i}},n.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,i=i.max,t=this.scaleRange(t,e);return{min:_(t.min,o,i),max:_(t.max,o,i)}},n.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},n.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,o=o.max,n=Math.floor(r),o=e?(r=Math.ceil(r),Math.floor(o)):(r=Math.floor(r),Math.ceil(o));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-n,max:(t.categories.length?o+(e?1:0):0)-n}},n.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,o=O(o.categories[t],""),i=(i.dataItem=r,this.axisLabelText(o,e,i));return new qx(o,i,t,r,e)},n.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},n.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},n.prototype.arrangeNotes=function(){Do.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},n.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?v:y,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},n.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,t=M(t/i,J),i=this.totalRange(),o=e.min+t,e=e.max+t;return this.limitRange(o,e,0,i.max,t)},n.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,i=i.vertical?v:y,r=this.limitedRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[i+(o?2:1)],o=t[i]-n,t=e[i]-n,e=r.min+o/s,i=r.min+t/s,n=Math.min(e,i),o=Math.max(e,i);if(.01<=o-n)return{min:n,max:o}},n.prototype.valueRange=function(){return this.range()},n.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var i=t,o=e.srcCategories;if(i instanceof Date){for(var r=o.length,n=0;n<r;n++)if(Qo(o[n],i))return n;return-1}return o.indexOf(i)},n.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},n.prototype.limitedRangeIndices=function(t){var e=this.options,i=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=_(i,0,t.max),e=_(e,0,t.max)),{min:i,max:e}},n.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},n.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new Ox,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},n.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},i(e=n,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:q},labels:{zIndex:1},justified:!1,_deferLabels:!0});const e_=e;var o={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"},or=[ko,So,Ao,Co,Po,To,Mo,Oo],rr="fit",nr,e;function sr(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=_e(t)).min=Uo(e.min),e.max=Uo(e.max)),e}function ar(t){this.options=t}function hr(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o,r=i.roundToBaseUnit,n=i.justified,s=(this.start=Go(t,0,i.baseUnit,i.weekStartDay),this.roundToTotalStep(e)),a=!n&&Qo(e,s)&&!i.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),i.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=i.max)?(o=!n&&Qo(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,o),this.displayEnd=r?this.roundToTotalStep(t,!n):i.max):(this.valueEnd=s,this.displayEnd=r||a?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,i){for(var o,r,n,s=sr(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,p=t.maxDateGroups,l=t.baseUnit===rr,c=e?or.indexOf(e):0,u=l?or[c++]:t.baseUnit,d=a/jo[u],f=d;!r||p<=d;){for(o=o||h[u].slice(0);(n=o.shift())&&e===u&&n<i;);if(n)d=f/(r=n);else{if(u===ae(or)){r=Math.ceil(f/p);break}if(!l){p<d&&(r=Math.ceil(f/p));break}u=or[c++]||ae(or),f=a/jo[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function s(){nr.apply(this,arguments)}ar.prototype.displayIndices=function(){return{min:0,max:1}},ar.prototype.displayRange=function(){return{}},ar.prototype.total=function(){return{}},ar.prototype.valueRange=function(){return{}},ar.prototype.valueIndex=function(){return-1},ar.prototype.values=function(){return[]},ar.prototype.totalIndex=function(){return-1},ar.prototype.valuesCount=function(){return 0},ar.prototype.totalCount=function(){return 0},ar.prototype.dateAt=function(){return null},hr.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},hr.prototype.displayIndices=function(){var t,e,i;return this._indices||(i=(t=this.options).baseUnit,t=t.baseUnitStep,e=$o(this.displayStart,this.valueStart,i,t),i=$o(this.displayEnd,this.valueStart,i,t),this._indices={min:e,max:i}),this._indices},hr.prototype.total=function(){return{min:this.start,max:this.end}},hr.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},hr.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},hr.prototype.valueIndex=function(t){var e=this.options;return Math.floor($o(t,this.valueStart,e.baseUnit,e.baseUnitStep))},hr.prototype.totalIndex=function(t){var e=this.options;return Math.floor($o(t,this.start,e.baseUnit,e.baseUnitStep))},hr.prototype.dateIndex=function(t){var e=this.options;return $o(t,this.valueStart,e.baseUnit,e.baseUnitStep)},hr.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},hr.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=Go(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},hr.prototype.dateAt=function(t,e){var i=this.options;return Go(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},hr.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,o=o.weekStartDay,s=this.start,t=$o(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return i&&(e+=i),Go(s,e*n,r,o)},(nr=e_)&&(s.__proto__=nr),((s.prototype=Object.create(nr&&nr.prototype)).constructor=s).prototype.clone=function(){var t=new s(Object.assign({},this.options),this.chartService);return t.createLabels(),t},s.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},s.prototype.initUserOptions=function(t){return t},s.prototype.initFields=function(){nr.prototype.initFields.call(this);var t,e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];r._parsed||((r=er(i,r))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:r,min:tr(i,o.min),max:tr(i,o.max),weekStartDay:ir(o,i)}),e.panning&&e.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=r).length?(i=sr(r,!0),e=o.maxDivisions,r=function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==rr&&!u(e,or)){for(var i=t,o,r,n=i.categories,s=T(n)?n.length:0,a=nt,h=0;h<s;h++){var p,l=n[h];l&&o&&0!==(p=Math.abs(Fo(l,o)))&&(r=(a=Math.min(a,p))>=zo?Oo:Vo-3*Eo<=a?Mo:Ro<=a?To:Eo<=a?Po:Lo<=a?Co:Bo<=a?Ao:So),o=l}i.baseUnit=r||Po}return e!==rr&&"auto"!==t.baseUnitStep||pr(t),t}(o),(t=o._forecast)&&(0<t.before&&(i.min=Go(i.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(i.max=Go(i.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new hr(i.min,i.max,r),e?(t=this.dataRange.displayRange(),pr(r=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:t.min,max:t.max,maxDateGroups:e}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new hr(i.min,i.max,r)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||Po,this.dataRange=this.divisionRange=new ar(o)),this.rangeLabels=[]},s.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return nr.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,h=0;h<n.length;h++)r.push(e.dateIndex(n[h])+s),1!==t&&1<=h&&r.splice(h,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},s.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=Yo(t,e.min)&&Yo(t,e.max)<=0&&i.length},s.prototype.parseNoteValue=function(t){return tr(this.chartService.intl,t)},s.prototype.noteSlot=function(t){return this.getSlot(t)},s.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=M(t/r,J);return n.min&&n.max&&(r=Ho(e.min||n.min,t),e=Ho(e.max||n.max,t),n={min:Go(r,0,i,o),max:Go(e,0,i,o)}),n},s.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},s.prototype.pan=function(t){var e,i,o,r,n;return this.isEmpty()?null:(e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,i=this.dataRange.total(),o=Ho(r,t=M(t/(o/(n-r)),J)*(e.reverse?-1:1)),r=Ho(n,t),(n=this.limitRange(Zo(o),Zo(r),Zo(i.min),Zo(i.max),t))?(n.min=Uo(n.min),n.max=Uo(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},s.prototype.pointsRange=function(t,e){var i,o;return this.isEmpty()?null:(t=nr.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),i=qo(e.max,e.min)/(i.max-i.min),o=this.options,{min:Ho(e.min,t.min*i),max:Ho(e.min,t.max*i),baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep})},s.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===rr,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),h=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(o){var p,l,c=i.autoBaseUnitSteps,e=i.maxDateGroups,o=ae(c[h])*e*jo[h],u=qo(n,s),d=qo(a,t),f=or.indexOf(h);if(d<jo[h]&&h!==ko)h=or[f-1],t=Ho(s,l=(u-(e-1)*(p=ae(c[h]))*jo[h])/2),a=Ho(n,-l);else if(o<d&&h!==Oo){var g=0;do{for(h=or[++f],g=0,l=2*jo[h];p=c[h][g],++g<c[h].length&&l*p<u;);}while(h!==Oo&&l*p<u);0<(l=(l*p-u)/2)&&(t=Ho(s,-l),a=Ho(n,l),t=Ho(t,_(a,r.min,r.max)-a),a=Ho(a,_(t,r.min,r.max)-t))}}return t&&a&&0<qo(a,t)?{min:t,max:a,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},s.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<i.min&&(t.min=i.min),t.max>i.max)&&(t.max=i.max),t},s.prototype.range=function(){return this.dataRange.displayRange()},s.prototype.createLabels=function(){nr.prototype.createLabels.call(this),this.createRangeLabels()},s.prototype.clearLabels=function(){nr.prototype.clearLabels.call(this),this.rangeLabels=[]},s.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),nr.prototype.arrangeLabels.call(this)},s.prototype.arrangeRangeLabels=function(){var t,e,i,o,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(i=n[0])&&(o=e?t.y1-i.box.height()/2:t.x1,this.positionLabel(i,r,o)),i=n[1])&&(o=e?t.y2-i.box.height()/2:t.x2,this.positionLabel(i,r,o))},s.prototype.autoRotateLabels=function(){nr.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){nr.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},s.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1))}},s.prototype.contentBox=function(){for(var t=nr.prototype.contentBox.call(this),e=this.rangeLabels,i=0;i<e.length;i++){var o=e[i];o.options.visible&&t.wrap(o.box)}return t},s.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,o=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,i.dataItem=o,this.axisLabelText(r,e,i));if(n)return new qx(r,n,t,o,e)},s.prototype.createRangeLabels=function(){var o=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,i=this.options,r=Object.assign({},i.labels,i.rangeLabels,{align:b,zIndex:i.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,i.autoRotateRangeLabels=!0),i=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||i,(i=function(t,e,i){i&&(e=new qx(e,i,t,null,r),o.append(e),o.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),i(1,t,this.axisLabelText(t,r,{index:1,count:2})))},s.prototype.autoRotateRangeLabels=function(){var t,e,o=this,i=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===i.length&&(t=function(t,e,i){e=2*Math.abs(e[i+1]-e[i]),i=o.autoRotateLabelAngle(t.box,e);0!==i&&(t.options.rotation=i,t.reflow(new E))},e=this.getMajorTickPositions(),t(i[0],e,0),t(i[1],e,e.length-2))},s.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},s.prototype.slot=function(t,e,i){var o=this.dataRange,o=(t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e)),this.getSlot(t,e,i));if(o)return o.toRect()},s.prototype.getSlot=function(t,e,i){return typeof t==ht&&(t=this.categoryIndex(t)),typeof e==ht&&(e=this.categoryIndex(e)),nr.prototype.getSlot.call(this,t,e,i)},s.prototype.valueRange=function(){var t=sr(this.options.srcCategories);return{min:Uo(t.min),max:Uo(t.max)}},s.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},s.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},s.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},s.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},s.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},s.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},s.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalRange=function(){return this.dataRange.total()},s.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalCount=function(){return this.dataRange.totalCount()},s.prototype.isEmpty=function(){return!this.options.srcCategories.length},s.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=sr((t=this.options).srcCategories),new hr(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())},i(e=s,{type:$,labels:{dateFormats:o},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 i_=e;function lr(t,e){return M(Math.floor(t/e)*e,J)}function cr(t,e){return M(Math.ceil(t/e)*e,J)}function ur(t){return Math.max(Math.min(t,3e5),-3e5)}var dr,fr=Math.pow(10,1-J),e,gr,e,yr,o,vr,e,mr,o;function xr(t,e,i,o){dr.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function _r(t,e,i){t=M(Math.abs(t%e),J);return 0===t||e*(1-i)<t}(dr=t_)&&(xr.__proto__=dr),((xr.prototype=Object.create(dr&&dr.prototype)).constructor=xr).prototype.initUserOptions=function(t){a=t.seriesMin,i=t.seriesMax,o=(r=t).narrowRange,e=function(t){if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e}(a),a=function(t,e,i){if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;r=Math.min(0,o-(t-o)/2)}else r=e;return r}(a,i,o),n=Ze(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&_r(e,n,1/3)&&(e-=n),0<a)&&_r(a,n,1/3)&&(a+=n),s.min=lr(e,n),s.max=cr(a,n);var i,o,e,r=s,n=(this.totalOptions=(e=r,{min:T((a=t).min)?Math.min(e.min,a.min):e.min,max:T(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var h=s,p=["min","max"],l=0;l<p.length;l++){var c=p[l];null===h[c]&&(h[c]=void 0)}var u=T(s.min),d=T(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=lr(n.min,s.majorUnit),n.max=cr(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=Ze(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=x(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},xr.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},xr.prototype.clone=function(){return new xr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},xr.prototype.startValue=function(){return 0},xr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},xr.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(M(e/t,Q))+1)},xr.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),h=this.getDivisions(t),p=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&p.push(M(l,Q)),l+=a*r;return p},xr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},xr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},xr.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,h=r.lineSize,r=r.lineStart,h=s*(h/(o.max-o.min)),p=O(t,e||0),e=O(e,t||0),t=(i&&(p=_(p,o.min,o.max),e=_(e,o.min,o.max)),Math.min(p,e)-o.min),i=Math.max(p,e)-o.min,p=new E(a.x1,a.y1,a.x1,a.y1);return p[n+1]=ur(r+h*(0<s?t:i)),p[n+2]=ur(r+h*(0<s?i:t)),p},xr.prototype.getValue=function(t){var e=this.options,i=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:M(e+t*(i-e),J)},xr.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=M(t/(n/(r-e)),J);return{min:e+(t=!i&&!o||i&&o?t:-t),max:r+t,offset:t}},xr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},xr.prototype.createAxisLabel=function(t,e,i){var o=this.options,o=M(o.min+t*o.majorUnit,J),i=this.axisLabelText(o,e,i);return new qx(o,i,t,null,e)},xr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},xr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},xr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(i,t))return{min:i,max:t}},xr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=(1-e)*t,e=M(this.options.min+e*t,J),t=M(this.options.max-i,J);return{min:e,max:t=t-e<fr?e+fr:t}},xr.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,t=this.scaleRange(t,e);return{min:_(t.min,i,o),max:_(t.max,i,o),narrowRange:!1}},xr.prototype.isValidRange=function(t,e){return fr<e-t},i(e=xr,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:q},labels:{format:"#.####################"},zIndex:1});const o_=e;function br(t,e,i,o){var r,n,s,a,h,p,l,t=Uo(t),e=Uo(e),c=o.intl,i=i||{},u=(u=t,r=e,n=i=x(i||{},{min:tr(c,i.min),max:tr(c,i.max),axisCrossingValue:er(c,i.axisCrossingValues||i.axisCrossingValue),weekStartDay:ir(i,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Fo(r,u),a=Co,zo<=s?a=Oo:Vo<=s?a=Mo:Ro<=s?a=To:Eo<=s&&(a=Po),a):Co),a=jo[s],h=n.weekStartDay||0,u=Wo(Zo(u)-1,s,h)||Uo(r),r=Xo(Zo(r)+1,s,h),a=n.majorUnit||cr(Ze(u.getTime(),r.getTime()),a)/a,p=cr(p=Jo(u,r,s),a)-p,l=Math.floor(p/2),p-=l,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Go(u,-l,s,h),n.max=n.max||Go(r,p,s,h),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,i=n,gr.call(this,i,o),this.intlService=c,this.seriesMin=t,this.seriesMax=e,i.weekStartDay||0);this.totalMin=Zo(Wo(Zo(t)-1,i.baseUnit,u)),this.totalMax=Zo(Xo(Zo(e)+1,i.baseUnit,u))}(gr=t_)&&(br.__proto__=gr),((br.prototype=Object.create(gr&&gr.prototype)).constructor=br).prototype.clone=function(){return new br(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},br.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},br.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Jo(e.min,e.max,e.baseUnit)/t+1)},br.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/qo(e.max,e.min),h=e.weekStartDay||0,p=[n],l=1;l<s;l++){var c=n+qo(Go(e.min,l*t,e.baseUnit,h),e.min)*a*o;p.push(M(c,Q))}return p},br.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},br.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},br.prototype.getSlot=function(t,e,i){return o_.prototype.getSlot.call(this,tr(this.intlService,t),tr(this.intlService,e),i)},br.prototype.getValue=function(t){t=o_.prototype.getValue.call(this,t);return null!==t?Uo(t):null},br.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},br.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min,r=(0<r&&(s=Go(s,r,o.baseUnit,n)),e.dateFormats[o.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,i));return new qx(s,n,t,null,e)},br.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,i=o?i.height():i.width(),n=this.range(),i=i/qo(n.max,n.min),n=M(t/i,J);return{min:Ho(e.min,n=!o&&!r||o&&r?n:-n),max:Ho(e.max,n),offset:n}},br.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Yo(t,e.min)&&Yo(t,e.max)<=0},br.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Zo(t.min),Zo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Uo(t.min),max:Uo(t.max)}},br.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);return{min:Uo(i),max:Uo(t)}},br.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=e*t,e=(1-e)*t,t=Uo(Zo(this.options.min)+i),i=Uo(Zo(this.options.max)-e);return{min:t,max:i=i-t<1e3?Uo(Zo(t)+1e3):i}},br.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:Uo(_(Zo(t.min),this.totalMin,this.totalMax)),max:Uo(_(Zo(t.max),this.totalMin,this.totalMax))}},i(e=br,{type:$,majorGridLines:{visible:!0,width:1,color:q},labels:{dateFormats:o}});const r_=e;function wr(t,e,i,o){var r,n,s,a,h,p=x({majorUnit:10,min:t,max:e},i),l=p.majorUnit,c=(c=M(Sr(h=e,u=l),J)%1,h<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,Sr(h,u)+.2):Math.pow(u,Math.ceil(Sr(h,u)))),u=(h=t,s=(u=p).majorUnit,(a=h)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(Sr(h,s)))),a),d=(h=u,s=c,a=i,r=(d=p).min,n=d.max,T(d.axisCrossingValue)&&d.axisCrossingValue<=0&&kr(),T(a.max)?a.max<=0&&kr():n=s,T(a.min)?a.min<=0&&kr():r=h,{min:r,max:n});p.max=d.max,p.min=d.min,p.minorUnit=i.minorUnit||M(l-1,J),yr.call(this,p,o),this.totalMin=T(i.min)?Math.min(u,i.min):u,this.totalMax=T(i.max)?Math.max(c,i.max):c,this.logMin=M(Sr(d.min,l),J),this.logMax=M(Sr(d.max,l),J),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function kr(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Sr(t,e){return Math.log(t)/Math.log(e)}(yr=t_)&&(wr.__proto__=yr),((wr.prototype=Object.create(yr&&yr.prototype)).constructor=wr).prototype.clone=function(){return new wr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},wr.prototype.startValue=function(){return this.options.min},wr.prototype.getSlot=function(t,e,i){var o=this.options,r=this.logMin,n=this.logMax,s=o.majorUnit,a=o.min,o=o.max,h=this.lineInfo(),p=h.axis,l=h.axisDir,c=h.lineBox,u=h.lineSize,h=h.lineStart,u=l*(u/(n-r)),n=O(t,e||1),e=O(e,t||1);if(n<=0||e<=0)return null;i&&(n=_(n,a,o),e=_(e,a,o));n=Sr(n,s),e=Sr(e,s),t=Math.min(n,e)-r,i=Math.max(n,e)-r,a=new E(c.x1,c.y1,c.x1,c.y1);return a[p+1]=ur(h+u*(0<l?t:i)),a[p+2]=ur(h+u*(0<l?i:t)),a},wr.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:M(Math.pow(e,i+s*((o-i)/r)),J)},wr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},wr.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=M(t/(s/(o-i)),J);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,i+t),max:Math.pow(e,o+t),offset:t}},wr.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},wr.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},wr.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function h(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(bo(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),o.visible&&this.traverseMinorTicksPositions(h,o),[]},wr.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){u(t,n)||(r.position=t,s.append(wo(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},wr.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(M(o+r*(a-n),J),e)},wr.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this.lineInfo(),a=i.lineStart,h=i.step,p=this.logMin,l=this.logMax,c=Math.floor(p);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;o<=f&&t(M(a+h*(Sr(f,s)-p),J),e)}},wr.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,o),i=this.axisLabelText(o,e,i);return new qx(o,i,t,null,e)},wr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},wr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},wr.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},wr.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=Sr(this.options.min,i),r=Sr(this.options.max,i),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-o),o=Math.pow(i,o+e*t),i=Math.pow(i,r-(1-e)*t);return{min:o,max:i=i-o<1e-6?o+1e-6:i}},wr.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,i=this.totalMax;return{min:_(t.min,e,i),max:_(t.max,e,i)}},wr.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,e=e.majorUnit,o=Math.pow(e,t);return{value:o,minorStep:(Math.pow(e,t+1)-o)/i}},wr.prototype.lineInfo=function(){var t=yr.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},i(o=wr,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:q},zIndex:1,_deferLabels:!0});const n_=o,s_={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),Jt(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){o=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,o)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new w.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new w.drawing.Path(r);o&&(n.radius=o(t[a])),h.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(h)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,e=this.intervals(e,i,o,r),i=t.options,s=i.visible&&!1!==(i.line||{}).visible;return Zt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};function Ar(){vr.apply(this,arguments)}(vr=e_)&&(Ar.__proto__=vr),((Ar.prototype=Object.create(vr&&vr.prototype)).constructor=Ar).prototype.range=function(){return{min:0,max:this.options.categories.length}},Ar.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Ar.prototype.lineBox=function(){return this.box},Ar.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new E,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},Ar.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=i||1,p=[],l=e||0;l<s;l+=h)r=n.reverse?360-l*a:l*a,r=M(r,Q)%360,o&&u(r,o)||p.push(r);return p},Ar.prototype.majorIntervals=function(){return this.intervals(1)},Ar.prototype.minorIntervals=function(){return this.intervals(.5)},Ar.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},Ar.prototype.majorAngles=function(){var e=this;return Zt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},Ar.prototype.createLine=function(){return[]},Ar.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},Ar.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,e=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,e)},Ar.prototype.radiusCallback=function(e,t,i){var o,r;if(t.options.type!==U)return t=pe(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles(),function(t){return!i&&u(t,r)?e:o}},Ar.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new w.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from),a=(r.startAngle+=s*n.angle,Math.ceil(o.to)-o.to),a=(r.angle-=(a+s)*n.angle,Dx.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}}));e.append(a)}this.appendVisual(e)},Ar.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},Ar.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,i=(i.reverse&&!o&&(t=(t+1)%s),n[t=_(Math.floor(t),0,s-1)]),n=(o&&(i-=a/2)<0&&(i+=360),a*(_(Math.ceil(e||t),t,s-1)-t+1));return new zx(r.center(),0,r.height()/2,i,n)},Ar.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,i=e+t.angle;return new w.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:i,radiusX:t.radius,radiusY:t.radius})},Ar.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},i(e=Ar,{startAngle:90,labels:{margin:P(10)},majorGridLines:{visible:!0},justified:!0}),x(e.prototype,s_);const a_=e;function Cr(t,e){mr.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}(mr=t_)&&(Cr.__proto__=mr),((Cr.prototype=Object.create(mr&&mr.prototype)).constructor=Cr).prototype.getDivisions=function(t){return o_.prototype.getDivisions.call(this,t)-1},Cr.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Cr.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new E,n=this.intervals(t.majorUnit,o,i),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},Cr.prototype.lineBox=function(){return this.box},Cr.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,h=e||0;h<n;h+=a){var p=(360+r+h*t)%360;o&&u(p,o)||s.push(p)}return s},Cr.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},Cr.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},Cr.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},Cr.prototype.createLine=function(){return[]},Cr.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},Cr.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,e=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,e)},Cr.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},Cr.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=_(t,i.min,i.max),e=_(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(i=t,t=e,e=i),new zx(o.center(),0,o.height()/2,t,e-t)},Cr.prototype.slot=function(t,e){var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=i.reverse?(s=n,t):(s=360-t,360-n),s=(s+o)%360;return new w.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+o)%360,radiusX:r.radius,radiusY:r.radius})},Cr.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,t=t.y-i.y,i=Math.round(ee(Math.atan2(t,o))),t=e.startAngle;return e.reverse||(i*=-1,t*=-1),(i+t+360)%360},Cr.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},i(o=Cr,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:P(10)},majorGridLines:{color:q,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(o.prototype,s_,{createPlotBands:a_.prototype.createPlotBands,majorAngles:a_.prototype.majorAngles,range:o_.prototype.range,labelsCount:o_.prototype.labelsCount,createAxisLabel:o_.prototype.createAxisLabel});const h_=o;function Pr(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Tr,e={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new w.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],h={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new zx(r,r.y-a.y2,r.y-a.y1,0,360),a=e===U?Dx.current.createRing(a,h):w.drawing.Path.fromPoints(this.plotBandPoints(a,o),h).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new w.geometry.Circle(r,t.innerRadius),s=new w.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),Jt(r,this.renderGridLines(t,i,o,e.minorGridLines))),r},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip,s=(void 0===n&&(n=0),o.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),h=n;h<e.length;h+=s){var p=t.y-e[h];if(0<p){var l=new w.geometry.Circle([t.x,t.y],p);if(o.type===U)a.append(new w.drawing.Circle(l,r));else{for(var c=new w.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(l.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,i,o=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==U&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,i=(ee(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return Pr(t,i)-Pr(e,i)}),r=90-Pr(n[0],n[1])/2,t=180-Pr(i,n[0])-r,a=s*(Math.sin(pe(t))/Math.sin(pe(r)))),this.axisType().prototype.getValue.call(this,new L(o.x1,o.y2-a))}},o,Mr,Or,Ir,o;function Br(){Tr.apply(this,arguments)}(Tr=o_)&&(Br.__proto__=Tr),((Br.prototype=Object.create(Tr&&Tr.prototype)).constructor=Br).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Br.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Br.prototype.axisType=function(){return Tr},x((o=Br).prototype,e);const p_=o;function Lr(){Mr.apply(this,arguments)}(Mr=n_)&&(Lr.__proto__=Mr),((Lr.prototype=Object.create(Mr&&Mr.prototype)).constructor=Lr).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Lr.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Lr.prototype.axisType=function(){return Mr},x((o=Lr).prototype,e);const l_=o;function Er(t){return t<=0?-1:1}(Or=w.Class)&&(Rr.__proto__=Or),((Rr.prototype=Object.create(Or&&Or.prototype)).constructor=Rr).prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),!(r<2||2===r&&e[0].equals(e[1]))){var n,s=e[0],a=e[1],h=e[2];for(i.push(new w.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),ae(i).controlOut(this.firstControlPoint(t,s,a,y,v)),i.push(new w.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{o?(s=e[r-1],a=e[0],h=e[1],l=(t=this.controlPoints(s,a,h))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var p,l,c=l,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],h=e[u+2],p=this.controlPoints(s,a,h),ae(i).controlOut(c),c=p[1],p=p[0],i.push(new w.geometry.Segment(a,p)));o?(s=e[r-2],a=e[r-1],h=e[0],t=this.controlPoints(s,a,h),ae(i).controlOut(c),i.push(new w.geometry.Segment(a,t[0])),ae(i).controlOut(t[1]),i.push(new w.geometry.Segment(h,n))):(l=this.tangent(a,h,y,v),ae(i).controlOut(c),i.push(new w.geometry.Segment(h,this.secondControlPoint(l,a,h,y,v))))}}return i},Rr.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)},Rr.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},Rr.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||M(o,1)===M(i.y,1)},Rr.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Rr.prototype.controlPoints=function(t,e,i){var o,r=y,n=v,s=!1,a=!1,h=(this.isLine(t,e,i)?o=this.tangent(t,e,y,v):(h={x:this.isMonotonicByField(t,e,i,y),y:this.isMonotonicByField(t,e,i,v)}).x&&h.y?(o=this.tangent(t,i,y,v),s=!0):(this.invertAxis(t,e,i)&&(r=v,n=y),h[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Er((i[n]-t[n])*(e[r]-t[r])):-Er((i[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(o,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(o,e,i,r,n));return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,a,o)),[h,a]},Rr.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},Rr.prototype.tangent=function(t,e,i,o){i=e[i]-t[i],e=e[o]-t[o];return 0==i?0:e/i},Rr.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},Rr.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},Rr.prototype.secondControlPoint=function(t,e,i,o,r){var e=e[o],n=i[o],e=.333*(n-e);return this.point(n-e,i[r]-e*t,o,r)},Rr.prototype.point=function(t,e,i,o){var r=new w.geometry.Point;return r[i]=t,r[o]=e,r},Rr.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};const c_=Rr;function Rr(t){Or.call(this),this.closed=t}function Vr(t){Ir.call(this),this._axis=t,this.options=t.options}(Ir=w.Class)&&(Vr.__proto__=Ir),((Vr.prototype=Object.create(Ir&&Ir.prototype)).constructor=Vr).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Vr.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},Vr.prototype.range=function(){return this._axis.range()},Vr.prototype.valueRange=function(){return this._axis.valueRange()};const u_=Vr;function zr(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new u_(e[i])}function jr(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}jr.prototype.findAxisByName=function(t){return zr(t,this._pane.axes)};const d_=jr,f_=((D=w.Class)&&(Dr.__proto__=D),(Dr.prototype=Object.create(D&&D.prototype)).constructor=Dr);function Dr(t){D.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Fr(t){for(var e=t.length,i=0,o=0;o<e;o++)m(t[o])&&i++;return i}var Hr={min:function(t){for(var e=t.length,i=nt,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.min(i,r))}return i===nt?t[0]:i},max:function(t){for(var e=t.length,i=st,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.max(i,r))}return i===st?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];m(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return e=Fr(t)?Hr.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&T(r)&&i++}return i},avg:function(t){var e=Fr(t),i=t[0];return i=0<e?Hr.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&T(o))return o}return t[0]}},Ur,e;const g_=Hr;function Nr(t,e){return null===e?e:Ht(t)(e)}function Gr(){Ur.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}(Ur=w.Class)&&(Gr.__proto__=Ur),((Gr.prototype=Object.create(Ur&&Ur.prototype)).constructor=Gr).prototype.register=function(t,e,i){void 0===e&&(e=[dt]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Gr.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Gr.prototype.valueFields=function(t){return this._valueFields[t.type]||[dt]},Gr.prototype.otherFields=function(t){return this._otherFields[t.type]||[dt]},Gr.prototype.bindPoint=function(t,e,i){var o,r,n,s,a=t.data,i=T(i)?i:a[e],a={valueFields:{value:i}},e=this.valueFields(t),h=this._otherFields[t.type];return null===i?o=this._nullValue[t.type]:T(i)?Array.isArray(i)?(r=i.slice(e.length),o=this._bindFromArray(i,e),r=this._bindFromArray(r,h)):"object"==typeof i&&(n=this.sourceFields(t,e),s=this.sourceFields(t,h),o=this._bindFromObject(i,e,n),r=this._bindFromObject(i,h,s)):o=this._undefinedValue[t.type],T(o)&&(1===e.length?a.valueFields.value=o[e[0]]:a.valueFields=o),a.fields=r||{},a},Gr.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},Gr.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},Gr.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=Nr(a,t))}return o},Gr.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===dt?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},(e=Gr).current=new e;const y_=e;var Wr,Xr=/percent(?:\w*)\((\d+)\)/,Yr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");function qr(t,e,i){Wr.call(this),this.initGlobalRanges(t,e,i)}(Wr=w.Class)&&(qr.__proto__=Wr),((qr.prototype=Object.create(Wr&&Wr.prototype)).constructor=qr).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,h=Yr.exec(t);h?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),h=h[1]?parseFloat(h[1]):1,n={low:o.value-r*h,high:o.value+r*h},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},qr.prototype.createValueGetter=function(t,e){var i,o=t.data,r=y_.current,n=r.valueFields(t),o=T(o[0])?o[0]:{};return vt(o)?i=Ht("["+(e?n.indexOf(e):0)+"]"):m(o)?i=Ht():typeof o==ht&&(i=Ht(r.sourceFields(t,n)[n.indexOf(e)])),i},qr.prototype.getErrorRange=function(t,e){var i;if(!T(e))return null;if(this.globalRange)return this.globalRange(t);if(vt(e))o=t-e[0],r=t+e[1];else if(m(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Xr.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(i[1])/100),o=t-Math.abs(e),r=t+Math.abs(e)}return{low:o,high:r}},qr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},qr.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},qr.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(i+=n,o++)}return{value:i/o,count:o}};const v_=qr;var Zr,Qr,o=w.support.browser||{},Kr=600,$r="fadeIn",Jr=o.msie?.001:0,tn="errorLow",en="errorHigh",on="zero",rn="interpolate",nn="above",sn="below",an="smooth",hn="step",pn="area",ln="bar",cn="boxPlot",un="bubble",dn="bullet",fn="candlestick",gn="column",yn="donut",vn="funnel",mn="pyramid",xn="heatmap",_n="horizontalWaterfall",bn="line",wn="ohlc",kn="pie",Sn="polarArea",An="polarLine",Cn="polarScatter",Pn="radarArea",Tn="radarColumn",Mn="radarLine",On="rangeArea",In="rangeBar",Bn="rangeColumn",Ln="scatter",En="scatterLine",Rn="verticalArea",Vn="verticalBoxPlot",zn="verticalBullet",jn="verticalLine",Dn="verticalRangeArea",Fn="waterfall",Hn=[ln,gn,wn,fn,cn,Vn,dn,Bn,In,Fn,_n],e,o,Un,Nn,Gn,h,Wn=[e="exponentialTrendline",o="linearTrendline",Un="logarithmicTrendline",Nn="movingAverageTrendline",Gn="polynomialTrendline",h="powerTrendline"],Xn="legendItemClick",Yn="seriesClick",qn="seriesHover",Zn="seriesOver",Qn="seriesLeave",Kn="plotAreaHover",$n="plotAreaLeave",Jn="drag",ts="dragEnd",es="dragStart",is="zoomStart",os="zoom",rs="zoomEnd",ns="selectStart",ss="select",as="selectEnd",hs="showTooltip",ps="hideTooltip",e="graphics-symbol",o="k-chart-point",Un="Point",ls="log",Nn="category",cs="insideEnd",us="outsideEnd",ds="wheel",Gn="drilldown",h;function fs(t,e,i,o,r,n){Zr.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}(Zr=R)&&(fs.__proto__=Zr),((fs.prototype=Object.create(Zr&&Zr.prototype)).constructor=fs).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,o),s=o?n.x:n.y,a=s-t,s=s+t;o?(e=[new L(n.x,r.y1),new L(n.x,r.y2)],i&&e.push(new L(a,r.y1),new L(s,r.y1),new L(a,r.y2),new L(s,r.y2)),this.box=new E(a,r.y1,s,r.y2)):(e=[new L(r.x1,n.y),new L(r.x2,n.y)],i&&e.push(new L(r.x1,a),new L(r.x1,s),new L(r.x2,a),new L(r.x2,s)),this.box=new E(r.x1,a,r.x2,s)),this.linePoints=e},fs.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},fs.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},fs.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Zr.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new w.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);bt(r),this.visual.append(r)}},i(h=fs,{animation:{type:$r,delay:Kr},endCaps:!0,line:{width:2},zIndex:1});const m_=h;function gs(){Qr.apply(this,arguments)}(Qr=m_)&&(gs.__proto__=Qr),((gs.prototype=Object.create(Qr&&Qr.prototype)).constructor=gs).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const x_=gs;function ys(t){for(var e=0;e<t.length;e++)if(T(t[e].zIndex))return!0}function vs(t,e){null!==e&&t.push(e)}function ms(t){return Fr(t)===t.length}function xs(t,e,i){var e=e.visible;return T(e)?e:(e=t.pointVisibility)?e[i]:void 0}function _s(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=y_.current.bindPoint(t,n),a=s.valueFields.value;m(a=kt(a)?parseFloat(a):a)?(s.visible=!1!==xs(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function bs(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function ws(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var ks=5;function Ss(t,e,i,o){void 0===o&&(o=!1);var r,n,s=(i=void 0===i?{}:i).defaults=i.defaults||{},a=i.depth=i.depth||0,h=!1;if(i.excluded=i.excluded||[],ks<a)return null;for(r in t)!u(r,i.excluded)&&Be(t,r)&&(Tt(n=t[r])?(h=!0,o||(t[r]=O(n(e),s[r]))):It(n)&&(o||(i.defaults=s[r]),i.depth++,h=Ss(n,e,i,o)||h,i.depth--));return h}function As(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,o)&&i.push(n)}return i}var Cs=new WeakMap;function Ps(t,e,i){var o;return null===e||"object"!=typeof e?tr(i,t):((o=Cs.get(e))||(o=tr(i,t),Cs.set(e,o)),o)}function Ts(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function Ms(t){return T(t)&&null!==t}function Os(t,e){t=t.type,e=e instanceof Date;return!t&&e||ws(t,$)}function Is(t){return 1===t.length?t[0]:t}var Bs=/area/i,Ls,h,Es,h,Rs,h;function Vs(t,e){var i,o=y_.current.bindPoint(t,null,e).valueFields;for(i in o)if(St(o[i]))return!0}function zs(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,p=t.series,l=o;h(l+=r)&&(e=Vs(p,(i=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return i}function js(t,e,i,o,r){var n,s,a,h,p=e.min,e=e.max,l=0<p&&p<i,c=e+1<i;(l||c)&&(((h=t).missingValues||(Bs.test(h.type)||h.stack?on:rn))!==rn?(l&&(n=o(p-1)),c&&(s=o(e+1))):(l&&(n=Vs(t,(a=o(p-1)).item)?a:zs({start:p,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Vs(t,(a=o(e+1)).item)?a:zs({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function Ds(t,e){Ls.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}(Ls=R)&&(Ds.__proto__=Ls),((Ds.prototype=Object.create(Ls&&Ls.prototype)).constructor=Ds).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Ds.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=x({},i,{vertical:!this.options.invertAxes},t)),o},Ds.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,h=i[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||m(h.value)&&(r+=Math.abs(h.value),o.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},Ds.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=T(t.series.stack)?t.series.stack:this.options.defaultStack,h=function(t){return!0===t||typeof t==ht&&!t.group};if(a)for(var p=0;p<i.length;p++){var l=i[p];if(t===l)break;var c=T(l.series.stack)?l.series.stack:this.options.defaultStack;!c||typeof a===ut&&a!==c||h(a)&&!h(c)||a.group&&a.group!==c.group||!(0<=(c=this.plotValue(l))&&r||c<0&&!r)||0!==e&&0===c||(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=t.series,u=this.seriesValueAxis(u),u=this.categoryAxisCrossingValue(u);return[u,St(t.value)?t.value:u]},Ds.prototype.stackLimits=function(t,e){for(var i=nt,o=st,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],T(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},Ds.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,h=o[a];h||(h=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(h.min=Math.min(h.min,_e(n.negative).min)),n.positive.length)&&(h.max=Math.max(h.max,_e(n.positive).max)),h.min!==nt||h.max!==st?o[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},Ds.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,h=e.fields[tn],e=e.fields[en];m(h)&&m(e)?o={low:h,high:e}:a&&T(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new v_(a.value,n,dt),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},Ds.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(this.updateRange({value:s},i={categoryIx:e,series:n}),this.updateRange({value:a},i)),new x_(s,a,o,this,n,r));t.errorBars=[e],t.append(e)},Ds.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,t=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:o,high:t}},Ds.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i],s=(n||(this.categoryPoints[i]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,T(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},Ds.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,i=i.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},a=this._evalSeries[i],i=(T(a)||(this._evalSeries[i]=a=Ss(t,{},s,!0)),t);return a&&Ss(i=x({},i),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},s),i},Ds.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,i=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((i=this.valueAxisRanges[e]=i||{min:nt,max:st}).min=Math.min(i.min,t),i.max=Math.max(i.max,t))},Ds.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},Ds.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],h=this.points,p=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var i,o=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=h[l++],n=a[o];n||(a[o]=n=s.categorySlot(p,o,e)),r&&(o=s.plotRange(r,e.startValue()),(i=s.valueSlot(e,o))?(n=s.pointSlot(n,i),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=o[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},Ds.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Ds.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(ae(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},Ds.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Ds.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},Ds.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Ds.prototype.reflowPoint=function(t,e){t.reflow(e)},Ds.prototype.reflowCategories=function(){},Ds.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new E(o.x1,i.y1,o.x2,i.y2)},Ds.prototype.categorySlot=function(t,e){return t.getSlot(e)},Ds.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=bs(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],h=this.categoryAxis.categoryAt(n);t(this.plotArea.bindPoint(a,n),{category:h,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var p=0;p<o;p++)this._outOfRangeCallback(e[p],"_outOfRangeMaxPoint",p,t)},Ds.prototype._outOfRangeCallback=function(t,e,i,o){var r,e=t[e];e&&(r=e.categoryIx,o(this.plotArea.bindPoint(t,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:i,dataItem:e.item}))},Ds.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Ds.prototype.pointValue=function(t){return t.valueFields.value},i(h=Ds,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const __=h,b_={click:function(t,e){return t.trigger(Yn,this.eventArgs(e))},hover:function(t,e){return t.trigger(qn,this.eventArgs(e))},over:function(t,e){return t.trigger(Zn,this.eventArgs(e))},out:function(t,e){return t.trigger(Qn,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:ne(t),originalEvent:t,point:this}}},w_={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&T(e)&&null!==e&&(this.note=new Zx({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};function Fs(){for(var t,e="",i=0;i<32;i++)t=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(e+="-"),e+=(12===i?4:16===i?3&t|8:t).toString(16);return e}function Hs(t,e){Es.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Fs()}(Es=R)&&(Hs.__proto__=Es),((Hs.prototype=Object.create(Es&&Es.prototype)).constructor=Hs).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))},Hs.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Hs.prototype.createLabelElement=function(t){return new Xx(this.getLabelText(t),x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(t.zIndex,this.series.zIndex)},t),this.pointData())},Hs.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Hs.prototype.getAriaLabelText=function(){var t=this.options.labels,e=jt(t);return e?e(this.pointData()):this.getLabelText(t)},Hs.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return T(t.color)||(t.color=new w.Color(e).brightness(.8).toHex()),t},Hs.prototype.createVisual=function(){},Hs.prototype.createMarker=function(){var t=this.options.markers;return new Hx({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,zIndex:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:x({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Hs.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Hs.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical,r=(this.render(),(this.box=t).clone());if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(o=t.center(),t=new E(o.x,o.y,o.x,o.y)),this.note.reflow(t))},Hs.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===nn?C:e)===sn?k:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},Hs.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),o=new Hx({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:O(t.border.opacity,1)},opacity:O(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},Hs.prototype.highlightVisual=function(){return(this.marker||{}).visual},Hs.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,i=this.box.center(),o=new w.geometry.Rect([i.x-e,i.y-e],[r,r])),{options:this.options,rect:o,visual:t}},Hs.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.accessibility.highlight,i=t.size+(t.border.width||0),i=new Hx({type:t.type,width:i,height:i,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()},Hs.prototype.tooltipAnchor=function(){var t,e,i=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(i))return o=i.x2+5,e=S,i=this.aboveAxis?(t=i.y1,k):(t=i.y2,C),{point:new L(o,t),align:{horizontal:e,vertical:i}}},Hs.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Hs.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Hs.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Hs.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Hs.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},Hs.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},Hs.prototype.getIndex=function(){return T(this.categoryIx)?this.categoryIx:this.pointIx},(h=Hs).prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:Z,border:{width:2},opacity:1},labels:{visible:!1,position:nn,margin:P(3),padding:P(4),animation:{type:$r,delay:Kr}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:e,className:o,ariaRoleDescription:Un}},x(h.prototype,b_),x(h.prototype,w_);const k_=h;function Us(t,e,i){Rs.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}(Rs=R)&&(Us.__proto__=Rs),((Us.prototype=Object.create(Rs&&Rs.prototype)).constructor=Us).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Us.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},Us.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&&!T(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Us.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Tt(i)&&o&&(i=o.color),w.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&o.close(),this.visual=o},Us.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},i(h=Us,{closed:!1});const S_=h;function Ns(t,e,i,o,r){var t=t.box,n=new w.geometry.Point;return n[e]=t[e+i],n[o]=t[o+r],n}var Gs,Ws,h={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?y:v,n=o?v:y,s=e?2:1,a=s,h=Ns(t[0],r,s,n,a),p=[h],l=1;l<t.length;l++){var c,u=Ns(t[l],r,s,n,a);h[r]!==u[r]&&((c=new w.geometry.Point)[r]=h[r],c[n]=u[n],p.push(c,u)),h=u}return i?h!==ae(p)&&p.push(h):p.push(Ns(ae(t),r,s,n,e?1:2)),p}},p;function Xs(){Gs.apply(this,arguments)}(Gs=S_)&&(Xs.__proto__=Gs),((Xs.prototype=Object.create(Gs&&Gs.prototype)).constructor=Xs).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},x((p=Xs).prototype,h);const A_=p;function Ys(){Ws.apply(this,arguments)}(Ws=S_)&&(Ys.__proto__=Ws),((Ys.prototype=Object.create(Ws&&Ws.prototype)).constructor=Ys).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Tt(i)&&e&&(i=e.color),new c_(this.options.closed).process(this.points())),i=new w.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,e),this.visual=i};const C_=Ys;var qs,p={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),h=a.length,p=[],l=0;l<h;l++){var c=a[l];c?p.push(c):this.seriesMissingValues(s)!==rn&&(1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t)),p=[])}1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?on:t||rn},getNearestPoint:function(t,e,i){for(var o,r=new L(t,e),n=this.seriesPoints[i],s=nt,a=0;a<n.length;a++){var h,p=n[a];p&&T(p.value)&&null!==p.value&&!1!==p.visible&&(h=p.box.center().distanceTo(r))<s&&(o=p,s=h)}return o}},l,Zs,Qs,l,Ks,$s,Js,ta,l,ea,l,ia,l,oa,l,ra,l,na,l,sa,l,aa,l,ha,pa,la,ca,l,ua,l,da,l,fa,l,ga,l,ya,l,va,l,ma,l,xa,c,_a,c,ba,c;function wa(){qs.apply(this,arguments)}(qs=w.drawing.Animation)&&(wa.__proto__=qs),((wa.prototype=Object.create(qs&&qs.prototype)).constructor=wa).prototype.setup=function(){this._setEnd(this.options.box.x1)},wa.prototype.step=function(t){var e=this.options.box;this._setEnd(Wt(e.x1,e.x2,t))},wa.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},i(l=wa,{duration:Kr}),w.drawing.AnimationFactory.current.register("clip",l);const P_=l,T_={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=w.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new P_(t,{box:e}),ys(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&T(o.visual.options.zIndex)&&o.visual.clip(t)}}};function ka(){Zs.apply(this,arguments)}(Zs=__)&&(ka.__proto__=Zs),((ka.prototype=Object.create(Zs&&Zs.prototype)).constructor=ka).prototype.render=function(){Zs.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},ka.prototype.pointType=function(){return k_},ka.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(!T(n)||null===n){if(r!==on)return null;n=0}r=this.pointOptions(i,o),r=this.evalPointOptions(r,n,e),o=t.fields.color||i.color,Tt(i.color)&&(o=r.color),e=new k_(n,r);return e.color=o,this.append(e),e},ka.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},ka.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===hn?A_:o===an?C_:S_)(t,e,i)},ka.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},ka.prototype.supportsPointInactiveOpacity=function(){return!1},x((l=ka).prototype,p,T_);const M_=l;function Sa(t,e,i,o,r){Qs.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}(Qs=S_)&&(Sa.__proto__=Qs),((Sa.prototype=Object.create(Qs&&Qs.prototype)).constructor=Sa).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Tt(o)&&e&&(o=e.color),this.visual=new w.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:x({color:o,opacity:t.opacity,lineCap:"butt"},i)})},Sa.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Sa.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Sa.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Sa.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Sa.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new w.geometry.Segment(t)})},Sa.prototype.createStroke=function(t){t=new w.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Sa.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Sa.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment(),r=(o&&(r=this.stackSegments(),Jt(i,r)),new w.drawing.Path(t));r.segments.push.apply(r.segments,i),!o&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Sa.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(o),o=o.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=ae(e).anchor(),o=i?o.x1:o.y1;i?t.lineTo(o,e.y).lineTo(o,r.y):t.lineTo(e.x,o).lineTo(r.x,o)};const O_=Sa;function Aa(){Ks.apply(this,arguments)}(Ks=O_)&&(Aa.__proto__=Ks),((Aa.prototype=Object.create(Ks&&Ks.prototype)).constructor=Aa).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Aa.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},x((l=Aa).prototype,h);const I_=l;function Ca(){$s.apply(this,arguments)}($s=O_)&&(Ca.__proto__=$s),((Ca.prototype=Object.create($s&&$s.prototype)).constructor=Ca).prototype.createStrokeSegments=function(){var t=new c_(this.options.closed),e=this.points();return t.process(e)},Ca.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new w.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e};const B_=Ca;function Pa(){Js.apply(this,arguments)}(Js=M_)&&(Pa.__proto__=Js),((Pa.prototype=Object.create(Js&&Js.prototype)).constructor=Pa).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===hn?I_:a===an?B_:O_)(t,e,i,r,n)},Pa.prototype.reflow=function(t){Js.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},Pa.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<n;h++){for(var p,l=h+s,c=e,u=void 0;u=o[--c][l],0<c&&!u;);u?(i!==hn&&r<h&&!o[c][l-1]&&a.push(this._previousSegmentPoint(h,l,l-1,c)),a.push(u),i!==hn&&h+1<n&&!o[c][l+1]&&a.push(this._previousSegmentPoint(h,l,l+1,c))):(p=this._createGapStackPoint(h),this._stackPoints.push(p),a.push(p))}return a},Pa.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},Pa.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new k_(0,e);return e.categoryIx=t,e.series={},e},Pa.prototype.seriesMissingValues=function(t){return t.missingValues||on},Pa.prototype.supportsPointInactiveOpacity=function(){return!1};const L_=Pa;function Ta(){ta.call(this),this.axisRanges={}}(ta=w.Class)&&(Ta.__proto__=ta),((Ta.prototype=Object.create(ta&&ta.prototype)).constructor=Ta).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:nt,max:st},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},Ta.prototype.reset=function(t){this.axisRanges[t]=void 0},Ta.prototype.query=function(t){return this.axisRanges[t]};const E_=Ta;function Ma(t,e,i){ea.call(this,e),this.textBox=new Xx(t,this.options,i),this.append(this.textBox)}(ea=R)&&(Ma.__proto__=ea),((Ma.prototype=Object.create(ea&&ea.prototype)).constructor=Ma).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},Ma.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,h=t;n.align=i?b:S,n.vAlign=i?C:b,e.position===cs?i?(n.vAlign=C,!o&&s.height()<t.height()&&(n.vAlign=k)):n.align=o?A:S:e.position===b?(n.vAlign=b,n.align=b):"insideBase"===e.position?i?n.vAlign=o?k:C:n.align=o?S:A:e.position===us&&(h=i?o?new E(t.x1,t.y1-s.height(),t.x2,t.y1):new E(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=b,o?new E(t.x2,t.y1,t.x2+s.width(),t.y2):new E(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(h.width()-r.contentBox.width())/2:a.top=a.bottom=(h.height()-r.contentBox.height())/2),r.reflow(h)},Ma.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,i=e+"1",e=e+"2",o=this.children[0],r=this.parent.box;(r[i]<t[i]||t[e]<r[e])&&((o=o.paddingBox.clone())[i]=Math.max(r[i],t[i]),o[e]=Math.min(r[e],t[e]),this.reflow(o))},i(l=Ma,{position:us,margin:P(3),padding:P(4),color:q,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:$r,delay:Kr},zIndex:2});const R_=l,V_={addAccessibilityAttributesToVisual:function(){this._id=this._id||Fs();var t=x({ariaLabel:this.getAriaLabelText()},this.options.accessibility);ni(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=jt(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)}};function Oa(t,e){ia.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=O(this.options.aboveAxis,!0),this.value=t}(ia=R)&&(Oa.__proto__=ia),((Oa.prototype=Object.create(ia&&ia.prototype)).constructor=Oa).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Oa.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Oa.prototype.createLabelElement=function(t){return new R_(this.getLabelText(t),x({vertical:this.options.vertical},t),this.pointData())},Oa.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.formatValue(t.format)},Oa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Oa.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},Oa.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(ia.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),o?(o=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new w.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},Oa.prototype.createRect=function(t){var e=this.options,i=e.border,o=(T(i.opacity)?i:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=w.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}})),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(bt(r),o<1||i<1)&&(r.options.stroke.lineJoin="round"),t.append(r),Ts(e)&&(o=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(o))},Oa.prototype.createHighlight=function(t){return bt(w.drawing.Path.fromRect(this.box.toRect(),t))},Oa.prototype.highlightVisual=function(){return this.rectVisual},Oa.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Oa.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight.border.width;return bt(w.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},Oa.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return e=T(e)?e:new w.Color(t).brightness(i).toHex()},Oa.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=S,p=C;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),p=k)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(p=k,t=s?(h=A,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,h=A),Math.max(n.y1,a.y1))),{point:new L(t,o),align:{horizontal:h,vertical:p}}},Oa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Oa.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}},Oa.prototype.getIndex=function(){return this.categoryIx},x((l=Oa).prototype,b_),x(l.prototype,w_),x(l.prototype,V_),l.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:e,className:o,ariaRoleDescription:Un}};const z_=l;function Ia(t,e){t.forEach(e)}function Ba(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}function La(t){oa.call(this,t),this.forEach=t.rtl?Ba:Ia}(oa=R)&&(La.__proto__=oa),((La.prototype=Object.create(oa&&oa.prototype)).constructor=La).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+i+r*(n-1),h=(e?o.height():o.width())/a,p=o[s+1]+i/2*h;this.forEach(t,function(t,e){var i=(t.box||o).clone();i[s+1]=p,i[s+2]=p+h,t.reflow(i),e<n-1&&(p+=h*r),p+=h})},i(l=La,{vertical:!1,gap:0,spacing:0});const j_=l;function Ea(){ra.apply(this,arguments)}(ra=R)&&(Ea.__proto__=ra),((Ea.prototype=Object.create(ra&&ra.prototype)).constructor=Ea).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new E,n=0;n<o;n++){var s,a=i[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},i(l=Ea,{vertical:!0});const D_=l;function Ra(){na.apply(this,arguments)}(na=__)&&(Ra.__proto__=na),((Ra.prototype=Object.create(na&&na.prototype)).constructor=Ra).prototype.render=function(){na.prototype.render.call(this),this.updateStackRange()},Ra.prototype.pointType=function(){return z_},Ra.prototype.clusterType=function(){return j_},Ra.prototype.stackType=function(){return D_},Ra.prototype.stackLimits=function(t,e){return na.prototype.stackLimits.call(this,t,e)},Ra.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=T(o.stack)?o.stack:n.defaultStack,h=this.pointValue(t),r=this.pointOptions(o,r),p=r.labels,p=(a&&p.position===us&&(p.position=cs),r.isStacked=a,t.fields.color||o.color),t=(h<0&&r.negativeColor&&(p=r.negativeColor),r=this.evalPointOptions(r,h,e),Tt(o.color)&&(p=r.color),new(this.pointType())(h,r)),e=(t.color=p,s[i]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(n.isStacked?this.getStackWrap(a,e):e).append(t),t},Ra.prototype.getStackWrap=function(t,e){var i,o=typeof t==ht?t.group||!0:t,r=e.children;if(typeof o===ut||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},Ra.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(i=i.getSlot(e,e,!0),t[(e=o.invertAxes?y:v)+1]=t[e+2]=i[e+1]),t},Ra.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Ra.prototype.createAnimation=function(){this._setAnimationOptions(),na.prototype.createAnimation.call(this),ys(this.options.series)&&this._setChildrenAnimation()},Ra.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&T(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},Ra.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new w.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},i(l=Ra,{animation:{type:ln}});const F_=l;function Va(t,e){sa.call(this,e),this.value=t}(sa=R)&&(Va.__proto__=sa),((Va.prototype=Object.create(sa&&sa.prototype)).constructor=Va).prototype.getLabelText=function(t){return this.formatValue(t.format)},Va.prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=e.getSlot(i.open,i.close),e=e.getSlot(i.low,i.high),i=(o.x1=e.x1=t.x1,o.x2=e.x2=t.x2,this.realBody=o,e.center().x),t=[];t.push([[i,e.y1],[i,o.y1]]),t.push([[i,o.y2],[i,e.y2]]),this.lines=t,this.box=e.clone().wrap(o),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},Va.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Va.prototype.createVisual=function(){sa.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Va.prototype.mainVisual=function(t){var e=new w.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Va.prototype.createBody=function(t,e){var i=w.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:O(e.border.opacity,e.opacity)}),bt(i),t.append(i),Ts(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},Va.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Va.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:O(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=w.drawing.Path.fromPoints(i[n],r);bt(s),t.append(s)}},Va.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=T(e)?e:new w.Color(this.color).brightness(t._brightness).toHex()},Va.prototype.createOverlay=function(){var t=w.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Va.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(x({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},Va.prototype.highlightVisual=function(){return this._mainVisual},Va.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Va.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new L(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:C}}},Va.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Va.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Va.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}},Va.prototype.getIndex=function(){return this.categoryIx},(l=Va).prototype.createFocusHighlight=z_.prototype.createFocusHighlight,i(l,{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:e,className:o,ariaRoleDescription:Un}}),x(l.prototype,b_),x(l.prototype,w_),x(l.prototype,V_);const H_=l;function za(){aa.apply(this,arguments)}(aa=__)&&(za.__proto__=aa),((za.prototype=Object.create(aa&&aa.prototype)).constructor=za).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},za.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=ms(this.splitValue(p)),c=n.data[o],u=this.categoryPoints[o],l=(u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e)),a[o]);l||(l=new j_({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),i&&(this.updateRange(p,e),l.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},za.prototype.pointType=function(){return H_},za.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=x({},i),s=t.fields.color||i.color,n=this.evalPointOptions(n,r,e),e=(i.type!==fn&&i.type!==wn||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),Tt(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},za.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},za.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),i=this.valueAxisRanges[e]||{min:nt,max:st};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([i.min])),max:Math.max.apply(Math,t.concat([i.max]))}},za.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},za.prototype.animationPoints=function(){return this.points},x((l=za).prototype,T_);const U_=l;function ja(t,e){ha.call(this,t,e),this.createNote()}(ha=H_)&&(ja.__proto__=ha),((ja.prototype=Object.create(ha&&ha.prototype)).constructor=ja).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,o=this.owner.seriesValueAxis(o),n=(this.boxSlot=i=o.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=o.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),o.getSlot(r.median));r.mean&&(o=o.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,o)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},ja.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},ja.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},ja.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},ja.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},ja.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},ja.prototype.renderOutliers=function(t){for(var e,i=this.value,o=i.outliers||[],r=3*Math.abs(i.q3-i.q1),n=[],s=(t.markers,0);s<o.length;s++){var a=o[s],h=x({},(e=a<i.q3+r&&a>i.q1-r?t.outliers:t.extremes).border),h=(T(h.color)||(T(this.color)?h.color=this.color:h.color=new w.Color(e.background).brightness(.8).toHex()),new Hx({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:h,opacity:e.opacity}));h.value=a,n.push(h)}return this.reflowOutliers(n),n},ja.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},ja.prototype.mainVisual=function(t){for(var e=ha.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},ja.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)},ja.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||ha.prototype.getBorderColor.call(this)},i(l=ja,{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:K,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:Z,background:a,border:{width:2,opacity:1},opacity:0}}),x(l.prototype,b_);const N_=l;function Da(){pa.apply(this,arguments)}(pa=N_)&&(Da.__proto__=pa),((Da.prototype=Object.create(pa&&pa.prototype)).constructor=Da).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Da.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Da.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Da.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},Da.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const G_=Da;function Fa(){la.apply(this,arguments)}(la=U_)&&(Fa.__proto__=la),((Fa.prototype=Object.create(la&&la.prototype)).constructor=Fa).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=ms(this.splitValue(p)),c=n.data[o],u=this.categoryPoints[o],l=(u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e)),a[o]);l||(l=new j_({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),i&&(this.updateRange(p,e),l.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Fa.prototype.pointType=function(){return this.options.invertAxes?G_:N_},Fa.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Fa.prototype.updateRange=function(t,e){var e=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers)),t=(T(t.mean)&&(i=i.concat(t.mean)),this.valueAxisRanges[e]||{min:nt,max:st});this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([t.min])),max:Math.max.apply(Math,i.concat([t.max]))}},Fa.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Fa.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];T(r)&&null!==r&&i.push(r)}return i},Fa.prototype.supportsPointInactiveOpacity=function(){return!1};const W_=Fa;function Ha(){ca.apply(this,arguments)}(ca=m_)&&(Ha.__proto__=ca),((Ha.prototype=Object.create(ca&&ca.prototype)).constructor=Ha).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const X_=Ha;function Ua(t,e){ua.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(ua=R)&&(Ua.__proto__=ua),((Ua.prototype=Object.create(ua&&ua.prototype)).constructor=Ua).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Ua.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Ua.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=i.seriesIx,a=i.series,h=t.options.errorBars,p=i[e+"ErrorLow"],i=i[e+"ErrorHigh"];m(r)&&(m(p)&&m(i)&&(o={low:p,high:i}),h&&T(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new v_(h[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),o)&&this.addPointErrorBar(o,t,e)},Ua.prototype.addPointErrorBar=function(t,e,i){var o=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=i===v,a={},s=(e[i+"Low"]=o,e[i+"High"]=t,e.errorBars=e.errorBars||[],new X_(o,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[i]=o,this.updateRange(a,r),a[i]=t,this.updateRange(a,r)},Ua.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=Ms(o)&&Ms(r)?t:this.createMissingValue(t,s))&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,y,e),this.addErrorBar(i,v,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Ua.prototype.seriesMissingValues=function(t){return t.missingValues},Ua.prototype.createMissingValue=function(){},Ua.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[o],s=this.yAxisRanges[e];Ms(r)&&(n=this.xAxisRanges[o]=n||{min:nt,max:st},kt(r)&&(r=tr(i,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Ms(t)&&(s=this.yAxisRanges[e]=s||{min:nt,max:st},kt(t)&&(t=tr(i,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Ua.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=Ss(t,{},n,!0)),t);return s&&Ss(r=x({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Ua.prototype.pointType=function(){return k_},Ua.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=x({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Ua.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e),e=(Tt(i.color)&&(r=o.color),new k_(t,o));return e.color=r,this.append(e),e},Ua.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{x:o,y:i};throw new Error("Unable to locate Y axis with name "+t)},Ua.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],e=r.seriesAxes(e.series),o=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);i&&(o&&e?(t=r.pointSlot(o,e),i.reflow(t)):i.visible=!1)}),this.box=t},Ua.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},Ua.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n),a=s.valueFields,s=s.fields;t(a,x({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s))}}},Ua.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Ua.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},i(l=Ua,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(l.prototype,T_);const Y_=l;function Na(t,e){da.call(this,t,e),this.category=t.category}(da=k_)&&(Na.__proto__=da),((Na.prototype=Object.create(da&&da.prototype)).constructor=Na).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new w.drawing.Group,s=new w.drawing.Circle(new w.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),o=new w.drawing.Circle(new w.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new w.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,o),n},Na.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight,i=this.options.markers,o=this.box.center(),i=(i.size+i.border.width)/2+e.border.width/2;return new w.drawing.Circle(new w.geometry.Circle([o.x,o.y],i),t)},(l=Na).prototype.defaults=x({},l.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),l.prototype.defaults.highlight.zIndex=void 0;const q_=l;function Ga(){fa.apply(this,arguments)}(fa=Y_)&&(Ga.__proto__=fa),((Ga.prototype=Object.create(fa&&fa.prototype)).constructor=Ga).prototype._initFields=function(){this._maxSize=st,fa.prototype._initFields.call(this)},Ga.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),fa.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Ga.prototype.reflow=function(t){this.updateBubblesSize(t),fa.prototype.reflow.call(this,t)},Ga.prototype.pointType=function(){return q_},Ga.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,o=e.pointIx*(Kr/o),r={delay:o,duration:Kr-o,type:un},n=e.color||i.color,o=(t.size<0&&i.negativeValues.visible&&(n=O(i.negativeValues.color,n)),x({labels:{animation:{delay:o,duration:Kr-o}}},this.pointOptions(i,e.seriesIx),{markers:{type:Z,border:i.border,opacity:i.opacity,animation:r}})),o=this.evalPointOptions(o,t,e),r=(Tt(i.color)&&(n=o.color),o.markers.background=n,new q_(t,o));return r.color=n,this.append(r),r},Ga.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,h=Math.PI*s*s,p=(Math.PI*a*a-h)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*p,c=Math.sqrt((h+c)/Math.PI),u=O(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Ga.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},Ga.prototype.createAnimation=function(){},Ga.prototype.createVisual=function(){},i(l=Ga,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const Z_=l;function Wa(){ga.apply(this,arguments)}(ga=Hx)&&(Wa.__proto__=ga),x((l=(Wa.prototype=Object.create(ga&&ga.prototype)).constructor=Wa).prototype,b_);const Q_=l;function Xa(t,e){ya.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}(ya=R)&&(Xa.__proto__=ya),((Xa.prototype=Object.create(ya&&ya.prototype)).constructor=Xa).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,T(this.value.target)&&(this.target=new Q_({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:C,align:A}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},Xa.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Xa.prototype.createLabelElement=function(t){return new R_(this.getLabelText(t),t,this.pointData())},Xa.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.formatValue(t.format)},Xa.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),o=o.categorySlot(o.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:o,o=r?o:n,s=(i&&(n=new E(s.x1,o.y1,s.x2,o.y2),i.options.height=r?n.height():e.target.line.width,i.options.width=r?e.target.line.width:n.width(),i.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},Xa.prototype.createVisual=function(){ya.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var t=this.options,e=w.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:O(t.border.opacity,t.opacity)}),bt(this.bodyVisual=e),this.visual.append(e)},Xa.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=w.drawing.Animation.create(this.bodyVisual,this.options.animation))},Xa.prototype.createHighlight=function(t){return w.drawing.Path.fromRect(this.box.toRect(),t)},Xa.prototype.highlightVisual=function(){return this.bodyVisual},Xa.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Xa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Xa.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},Xa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Xa.prototype.getIndex=function(){return this.categoryIx},(l=Xa).prototype.tooltipAnchor=z_.prototype.tooltipAnchor,l.prototype.createFocusHighlight=z_.prototype.createFocusHighlight,i(l,{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:e,className:o,ariaRoleDescription:Un}}),x(l.prototype,b_),x(l.prototype,w_),x(l.prototype,V_);const K_=l;function Ya(t,e){for(var i=e.series,o=0;o<i.length;o++){var r=i[o],n=r.data;!n||vt(n[0])||It(n[0])||(r.data=[n])}va.call(this,t,e)}(va=__)&&(Ya.__proto__=va),((Ya.prototype=Object.create(va&&va.prototype)).constructor=Ya).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Ya.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Ya.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=x({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),t=t.fields.color||o.color,a=this.evalPointOptions(a,s,e),e=(Tt(o.color)&&(t=a.color),new K_(s,a)),o=(e.color=t,n[i]);return o||(o=new j_({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},Ya.prototype.updateRange=function(t,e){var i=t.current,t=t.target,e=e.series.axis,o=this.valueAxisRanges[e];T(i)&&!isNaN(i)&&T(t&&!isNaN(t))&&((o=this.valueAxisRanges[e]=o||{min:nt,max:st}).min=Math.min(o.min,i,t),o.max=Math.max(o.max,i,t))},Ya.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Ya.prototype.pointValue=function(t){return t.valueFields.current},Ya.prototype.aboveAxis=function(t){return 0<t.value.current},Ya.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},(l=Ya).prototype._setAnimationOptions=F_.prototype._setAnimationOptions,i(l,{animation:{type:ln}});const $_=l;function qa(t,e){ma.call(this),this.chartService=t,this.options=x({},this.options,e)}function Za(t,e,i){xa.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}(ma=w.Class)&&(qa.__proto__=ma),((qa.prototype=Object.create(ma&&ma.prototype)).constructor=qa).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color,e=(e&&(e=e.color||e.options.color,i=O(i,e),o=O(o,e)),P(t.padding||{},"auto"));return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:Bt(t.border.width),paddingTop:Bt(e.top),paddingBottom:Bt(e.bottom),paddingLeft:Bt(e.left),paddingRight:Bt(e.right)}},qa.prototype.show=function(t,e,i){t.format=e.format;i=this.getStyle(e,i),t.style=i,i=new w.Color(i.backgroundColor);T(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(hs,t),this.visible=!0},qa.prototype.hide=function(){this.chartService&&this.chartService.notify(ps),this.visible=!1},qa.prototype.destroy=function(){delete this.chartService},i(l=qa,{border:{width:1},opacity:1}),(xa=l)&&(Za.__proto__=xa),((Za.prototype=Object.create(xa&&xa.prototype)).constructor=Za).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},Za.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===$&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},Za.prototype.hide=function(){this.chartService.notify(ps,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},Za.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,o=o.padding,n=!i.axis.options.vertical,i=i.line.bbox(),n=n?(t=b,r===k?(e=C,i.bottomLeft().translate(0,o)):(e=k,i.topLeft().translate(0,-o))):(e=b,r===S?(t=A,i.topLeft().translate(-o,0)):(t=S,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},i(c=Za,{padding:10});const J_=c;function Qa(t,e,i){_a.call(this,i),this.axis=e,this.stickyMode=e instanceof e_;i=this.options.tooltip;i.visible&&(this.tooltip=new J_(t,this,x({},i,{stickyMode:this.stickyMode})))}(_a=R)&&(Qa.__proto__=_a),((Qa.prototype=Object.create(_a&&_a.prototype)).constructor=Qa).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},Qa.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},Qa.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?v:y,n=new w.geometry.Point(o.x1,o.y1),i=i?new w.geometry.Point(o.x2,o.y1):new w.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},Qa.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<o;s++){var a=i[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},Qa.prototype.createVisual=function(){_a.prototype.createVisual.call(this);var t=this.options;this.line=new w.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},Qa.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),_a.prototype.destroy.call(this)},i(c=Qa,{color:q,width:2,zIndex:-1,tooltip:{visible:!1}});const t1=c;function Ka(t,e){ba.call(this,t),this.pane=e}(ba=R)&&(Ka.__proto__=ba),((Ka.prototype=Object.create(ba&&ba.prototype)).constructor=Ka).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},Ka.prototype._clipBox=function(){return this.pane.chartsBox()},Ka.prototype.createVisual=function(){var t;this.visual=new w.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),bt(t=w.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Ka.prototype.stackRoot=function(){return this},Ka.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},Ka.prototype.destroy=function(){ba.prototype.destroy.call(this),delete this.parent},(c=Ka).prototype.isStackRoot=!0;const e1=c;($a=Fx)&&(eh.__proto__=$a),((eh.prototype=Object.create($a&&$a.prototype)).constructor=eh).prototype.createTitle=function(){var t=this.options.title;It(t)&&(t=x({},t,{align:t.position,position:C})),this.title=Yx.buildTitle(t,eh.prototype.options.title),this.title&&this.append(this.title)},eh.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},eh.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},eh.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},eh.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},eh.prototype.reflow=function(t){var e;ae(this.children)===this.content&&(e=this.children.pop()),$a.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},eh.prototype.visualStyle=function(){var t=$a.prototype.visualStyle.call(this);return t.zIndex=-10,t},eh.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},eh.prototype.stackRoot=function(){return this},eh.prototype.clipRoot=function(){return this},eh.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,h=a?o:r,p=0;p<i.length;p++)0===h.length&&a!==(t=i[p]).options.vertical&&Jt(h,s.createGridLines(t))},eh.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},eh.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new E,o=0;o<e;o++){var r=t[o],n=r.options.vertical?v:y,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,h=0;h<a;h++){var p=s[h];p.options.vertical||(p=p.lineBox(),i.x1=p.x1,i.x2=p.x2)}return i},eh.prototype.clipBox=function(){return this.chartContainer.clipBox},eh.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new d_(this),index:this.paneIndex,name:this.options.name})};var $a,c,Ja=1,th,c;function eh(t){$a.call(this,t),this.id="pane"+Ja++,this.createTitle(),this.content=new R,this.chartContainer=new e1({},this),this.append(this.content),this.axes=[],this.charts=[]}(c=eh).prototype.isStackRoot=!0,i(c,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});const i1=c;function d(t,e,i){th.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.originalSeries=t,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}function ih(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new E}function oh(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}(th=R)&&(d.__proto__=th),((d.prototype=Object.create(th&&th.prototype)).constructor=d).prototype.initFields=function(){},d.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},d.prototype.bindPoint=function(t,e,i){var o=this._bindCache.get(t);return o||this._bindCache.set(t,o=[]),o[e]||(o[e]=y_.current.bindPoint(t,e,i))},d.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=x({title:{color:t.color}},e),s=0;s<o;s++){var a=x({},n,i[s]),a=(kt(a.title)&&(a.title=x({text:a.title},n.title)),new i1(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},d.prototype.crosshairOptions=function(t){return t.options.crosshair},d.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);n&&n.visible&&(r=new t1(this.chartService,r,n),this.crosshairs.push(r),i.content.append(r))}},d.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},d.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},d.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},d.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},d.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},d.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},d.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},d.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},d.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,p,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(l=!d&&zt(n)||zt(o))&&(h=l({text:Ms(h)?h:"",series:u})),l=u._defaults,l=void(Tt(p=u.color)&&l&&(p=l.color)),c=void 0,c=d?(l={},p):(l={color:n.color,font:n.font},r.markers.color),Ms(h))&&""!==h&&s.push({text:h,labels:l,markerColor:c,series:u,active:d})}Jt(i.data,s)},d.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},d.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},d.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},d.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=P(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},d.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.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 o=0;o<e.length;o++)e[o].refresh()},d.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},d.prototype.alignAxisTo=function(t,e,i,o){var i=t.getSlot(i,i,!0),r=t.options.reverse?2:1,o=e.getSlot(o,o,!0),n=e.options.reverse?2:1,o=t.box.translate(o[y+n]-i[y+r],o[v+n]-i[v+r]);t.pane!==e.pane&&o.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(o)},d.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},h={},p={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,g=oh(t,u)||i,y=r;g!==i&&(y=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[l],y[l]),c.options._overlap||(M(c.lineBox().x1)===M(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),f)&&(s[d]=c),M(c.lineBox().x2)===M(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[l],y[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,A).translate(c.options.margin,0)),f)&&(a[d]=c),(g=oh(e,u)||o)!==c&&(c.alignTo(g),c.reflow(c.box)))}for(var v=0;v<t.length;v++){var m=t[v],x=m.pane,_=x.id,b=!1!==m.options.visible,x=oh(e,x)||o,w=n;x!==o&&(w=this.axisCrossingValues(x,t)),this.alignAxisTo(m,x,r[v],w[v]),m.options._overlap||(M(m.lineBox().y1)===M(x.lineBox().y1)&&(m._mirrored||(m.options.labels.mirror=!m.options.labels.mirror,m._mirrored=!0),this.alignAxisTo(m,x,r[v],w[v]),h[_]&&m.reflow(m.box.alignTo(h[_].box,C).translate(0,-m.options.margin)),b)&&(h[_]=m),M(m.lineBox().y2,Q)===M(x.lineBox().y2,Q)&&(p[_]&&m.reflow(m.box.alignTo(p[_].box,k).translate(0,m.options.margin)),b)&&(p[_]=m),0!==v&&(m.alignTo(i),m.reflow(m.box)))}},d.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=ih(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},d.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,ih(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},d.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=ih(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),i=Math.max(i,r.x1-s.x1),h=0;h<n.length;h++){var p=n[h];p.reflow(p.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(i,0))}},d.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},d.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=nh(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},d.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},d.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(o)}},d.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var p=0;p<i;p++){var l=e[p];l.options.height||(l.options.height=o/r)}for(var c=0;c<i;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},d.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},d.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},d.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(w.drawing.Path.fromRect(e[i].toRect()))},d.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},d.prototype.createVisual=function(){th.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border,i=(void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&T(i)||(i=a,e=0),this._bgVisual=new w.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(i),this.appendVisual(i)},d.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&T(s.value)&&null!==s.value&&i.push(s)}}return i},d.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},d.prototype.pointsByPointIndex=function(e){return this.filterPoints(function(t){return t.getIndex()===e})},d.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},d.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},d.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},d.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},d.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},d.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=oh(e,n)||e[0],s=this.createLabelAxis(r,o+i,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},d.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,o=o.visible;if(r!==tt&&r!==ct||!1===o)return null;var o=this.groupAxes(this.panes),o=i.options.vertical?o.x:o.y,o=this.axisCrossingValues(i,o),r=r===tt,n=i.range(),r=r?n.max:n.min;if(_(o[e],n.min,n.max)-r==0)return null;o.splice(e+1,0,r),i.options.axisCrossingValues=o;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n},d.prototype.isTrendline=function(t){return t&&u(t.type,Wn)},d.prototype.trendlineFactory=function(){},d.prototype.createTrendlineSeries=function(){var o=this,r=[];return this.series=this.series.map(function(t){if(!o.isTrendline(t))return t;var e,i=o.seriesByName(t.for);if(i)return e=y_.current.valueFields(i),e=ae(e),(e=o.trendlineFactory(Object.assign({},{field:e},t),i))&&(!1===i.visible&&(e.visible=!1),e.color===rt&&(e.color=i.color),r.push(e)),e;throw new Error('Invalid Configuration: Unable to locate linked series "'+t.for+'" for trendline "'+t.name+'".')}).filter(function(t){return null!==t}),r},d.prototype.seriesByName=function(e){return this.series.find(function(t){return t.name===e})},d.prototype.getFirstPoint=function(){return this.pointsBySeriesIndex(0)[0]},d.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},d.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},d.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},d.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},d.prototype._getNextPoint=function(o,r,t){function e(t){for(var e,i=0;0===(e=r.call(n,o,i+=t)).length;);return e}var n=this,i=r.call(this,o),t=i.indexOf(o)+t;return t<0?(i=e(-1)).at(-1):t>=i.length?(i=e(1)).at(0):i[t]},d.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},d.prototype._pointsByHorizontal=function(t,e){t=Pt(t.series.index+(e=void 0===e?0:e),this.series.length);return this.pointsBySeriesIndex(t)};var rh,nh=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},sh,c,ah,c,hh,ph,c,lh,ch,uh,c,dh,c,fh,gh,yh,h,vh,mh,c;i(c=d,{series:[],plotArea:{margin:{}},background:"",border:{color:q,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const o1=c,r1={hover:function(t,e){this._dispatchEvent(t,e,Kn)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function xh(t,e,i){rh.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var h=0;h<o.length;h++){var p=o[h],l=void 0;if(It(a))l=a[p];else{if(0!==h&&!u(p,r))break;l=a}l&&s.push({canonicalName:p,name:n[h],transform:Tt(l)?l:g_[l]})}}(rh=w.Class)&&(xh.__proto__=rh),((xh.prototype=Object.create(rh&&rh.prototype)).constructor=xh).prototype.aggregatePoints=function(t,e){var i,o=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||vt(t)||((i=function(){}).prototype=t,s=new i);for(var a=0;a<r.length;a++){var h=r[a],p=this._bindField(n.values,h.canonicalName),p=h.transform(p,o,n.dataItems,e);if(!(null===p||!It(p)||T(p.length)||p instanceof Date)){s=p;break}if(T(p)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=h.name;var c=s;var u=p;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),T(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},xh.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},xh.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,s=(T(s[e])?s:n.fields)[e];i.push(s)}return i};const n1=xh;function _h(){sh.call(this),this._defaults={}}(sh=w.Class)&&(_h.__proto__=sh),((_h.prototype=Object.create(sh&&sh.prototype)).constructor=_h).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},_h.prototype.query=function(t){return this._defaults[t]},(c=_h).current=new c;const s1=c;function bh(){ah.apply(this,arguments)}(ah=z_)&&(bh.__proto__=ah),((bh.prototype=Object.create(ah&&ah.prototype)).constructor=bh).prototype.createLabel=function(){var t=this.options.labels,e=x({},t,t.from),t=x({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this.createLabelElement(t),this.append(this.labelTo))},bh.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},(c=bh).prototype.defaults=x({},c.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const a1=c;function wh(){hh.apply(this,arguments)}(hh=F_)&&(wh.__proto__=hh),((wh.prototype=Object.create(hh&&hh.prototype)).constructor=wh).prototype.pointType=function(){return a1},wh.prototype.pointValue=function(t){return t.valueFields},wh.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)},wh.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},wh.prototype.updateRange=function(t,e){var e=e.series.axis,i=t.from,o=t.to,r=this.valueAxisRanges[e];null!==t&&m(i)&&m(o)&&((r=this.valueAxisRanges[e]=r||{min:nt,max:st}).min=Math.min(r.min,i),r.max=Math.max(r.max,i),r.min=Math.min(r.min,o),r.max=Math.max(r.max,o))},wh.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},(c=wh).prototype.plotLimits=__.prototype.plotLimits;const h1=c;function kh(){ph.apply(this,arguments)}(ph=k_)&&(kh.__proto__=ph),((kh.prototype=Object.create(ph&&ph.prototype)).constructor=kh).prototype.aliasFor=function(){return this.parent};const p1=kh;function Sh(t,e){lh.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Fs(),this.initLabelsFormat()}(lh=R)&&(Sh.__proto__=lh),((Sh.prototype=Object.create(lh&&lh.prototype)).constructor=Sh).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,o=this.value,i=this.fromPoint=new p1(o,x({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new p1(o,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},Sh.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},Sh.prototype.createHighlight=function(){var t=new w.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},Sh.prototype.highlightVisual=function(){return this.visual},Sh.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},Sh.prototype.createFocusHighlight=function(){var t=new w.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},Sh.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return i=(r=this.box).center(),o=S,r=this.options.vertical?(t=i.x,e=r.y1-5,k):(t=r.x2+5,e=i.y,b),{point:new L(t,e),align:{horizontal:o,vertical:r}}},Sh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Sh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Sh.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},Sh.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}"}))},Sh.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels,o=o.vertical;"auto"===r.position&&(o=o?e.y1<=t.y1?(i=nn,sn):(i=sn,nn):e.x1<=t.x1?(i=S,A):(i=A,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},Sh.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},Sh.prototype.focusVisual=function(){this.fromPoint.focusVisual()},Sh.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},Sh.prototype.getIndex=function(){return this.categoryIx},x((c=Sh).prototype,b_),x(c.prototype,w_),c.prototype.defaults={markers:{visible:!1,background:a,size:8,type:Z,border:{width:2},opacity:1},labels:{visible:!1,margin:P(3),padding:P(4),animation:{type:$r,delay:Kr},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:e,className:o,ariaRoleDescription:Un}};const l1=c;function Ah(){ch.apply(this,arguments)}(ch=O_)&&(Ah.__proto__=ch),((Ah.prototype=Object.create(ch&&ch.prototype)).constructor=Ah).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},Ah.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},Ah.prototype.createStroke=function(t){var e=new w.drawing.Path(t),t=new w.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},Ah.prototype.hasStackSegment=function(){return!0},Ah.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},Ah.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const c1=Ah;function Ch(){uh.apply(this,arguments)}(uh=c1)&&(Ch.__proto__=uh),((Ch.prototype=Object.create(uh&&uh.prototype)).constructor=Ch).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},Ch.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},Ch.prototype.createCurveSegments=function(t){return(new c_).process(this.toGeometryPoints(t))};const u1=Ch;function Ph(){dh.apply(this,arguments)}(dh=c1)&&(Ph.__proto__=dh),((Ph.prototype=Object.create(dh&&dh.prototype)).constructor=Ph).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},Ph.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},x((c=Ph).prototype,h);const d1=c;function Th(){fh.apply(this,arguments)}(fh=__)&&(Th.__proto__=fh),((Th.prototype=Object.create(fh&&fh.prototype)).constructor=Th).prototype.render=function(){fh.prototype.render.call(this),this.renderSegments()},Th.prototype.pointType=function(){return l1},Th.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!Ms(r.from)&&!Ms(r.to)){if(this.seriesMissingValues(i)!==on)return null;r={from:0,to:0}}o=this.pointOptions(i,o),o=this.evalPointOptions(o,r,e),e=t.fields.color||i.color,Tt(i.color)&&(e=o.color),t=new l1(r,o);return t.color=e,this.append(t),t},Th.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?u1:"step"===o?d1:c1)(t,e,i)},Th.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Th.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(i&&t)return{from:i,to:t}},Th.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new E(o.x1,t.y1,o.x2,t.y2),new E(e.x1,t.y1,e.x2,t.y2)):(i=new E(t.x1,o.y1,t.x2,o.y2),new E(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},Th.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),fh.prototype.addValue.call(this,t,e)},Th.prototype.updateRange=function(t,e){var i;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:nt,max:st},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},Th.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Th.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},x((h=Th).prototype,p,T_);const f1=h;function Mh(){gh.apply(this,arguments)}(gh=H_)&&(Mh.__proto__=gh),((Mh.prototype=Object.create(gh&&gh.prototype)).constructor=Mh).prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=[],r=[],n=[],s=e.getSlot(i.low,i.high),a=e.getSlot(i.open,i.open),e=e.getSlot(i.close,i.close),i=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);o.push([a.x1,a.y1]),o.push([i,a.y1]),r.push([i,e.y1]),r.push([e.x2,e.y1]),n.push([i,s.y1]),n.push([i,s.y2]),this.lines=[o,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},Mh.prototype.createBody=function(){};const g1=Mh;function Oh(){yh.apply(this,arguments)}(yh=U_)&&(Oh.__proto__=yh),((Oh.prototype=Object.create(yh&&yh.prototype)).constructor=Oh).prototype.pointType=function(){return g1};const y1=Oh;function Ih(t,e,i){vh.call(this),this.from=t,this.to=e,this.series=i}(vh=R)&&(Ih.__proto__=vh),((Ih.prototype=Object.create(vh&&vh.prototype)).constructor=Ih).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(t=e.aboveAxis?i.x2:i.x1,r.push([t,i.y1],[t,o.y2])),r},Ih.prototype.createVisual=function(){vh.prototype.createVisual.call(this);var t=this.series.line||{},t=w.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});bt(t),this.visual.append(t)},i(c=Ih,{animation:{type:$r,delay:Kr}});const v1=c;function Bh(){mh.apply(this,arguments)}function Lh(t,e,i){return(t=t[String(e)])?t(i):null}function Eh(t,e){for(var i,o,r=0,n=0,s=0,a=0,h=0,p=Number.MAX_VALUE,l=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,u=u.yValue;isFinite(d)&&null!==d&&isFinite(u)&&null!==u&&(p=Math.min(d,p),l=Math.max(d,l),h++,r+=d,n+=u,s+=Math.pow(d,2),a+=d*u)}return 0<h&&(o=(n-(i=(h*a-r*n)/(h*s-Math.pow(r,2)))*r)/h),{slope:i,intercept:o,count:h,xMin:p,xMax:l}}function Rh(t,e){return t.every(function(t){t=t.valueFields;return!Ms(t[e])||0<t[e]})}function Vh(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i}function zh(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,h=0;h<t.length;h++){var p=e(t[h]),l=p.xValue,p=p.yValue;if(isFinite(p)&&null!==p?(r.push(p),a+=p,s=Math.max(h,s)):r.push(null),n<=h){var p=r.filter(function(t){return null!==t}).length,c=r.shift()||0;if(0<p){o.push([l,a/p]),a-=c;continue}}o.push([l,null])}return o.slice(0,s+1)}function jh(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new Rx,n=new Rx,s=0,a=Number.MAX_VALUE,h=Number.MIN_VALUE,i=function(t){return t},p=[],l=0;l<t.length;l++){var c=e(t[l]),u=c.xValue,c=c.yValue;if(isFinite(u)&&null!==u&&isFinite(c)&&null!==c){a=Math.min(u,a),h=Math.max(u,h),s++,n.set(l,0,c),r.set(l,0,1),r.set(l,1,u);for(var d=2;d<=o;d++)r.set(l,d,Math.pow(r.get(l,1),d))}else r.set(l,0,0)}return r.width=Math.min(o,s),0<s&&(p=function(t,e){for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r}(r,n),i=function(o){return p.reduce(function(t,e,i){return t+e*Math.pow(o,i)},0)}),{coefficients:p,count:s,valueMapper:i,xMin:a,xMax:h}}(mh=F_)&&(Bh.__proto__=mh),((Bh.prototype=Object.create(mh&&mh.prototype)).constructor=Bh).prototype.render=function(){mh.prototype.render.call(this),this.createSegments()},Bh.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=bs(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<i;h++){var p=y_.current.bindPoint(n,h),l=p.valueFields.value,c=p.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=p.valueFields.value=s):(d=u-(p.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(p,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},Bh.prototype.updateRange=function(t,e){mh.prototype.updateRange.call(this,{value:e.to},e)},Bh.prototype.aboveAxis=function(t){return 0<=t.value},Bh.prototype.plotRange=function(t){return[t.from,t.to]},Bh.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var h,p=n[a];p&&s&&(h=new v1(s,p,r),i.push(h),this.append(h)),s=p}}};const m1=Bh,x1=h={exponentialTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Rh(t,n.field)&&(n=(t=Eh(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:e+1,yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Vh(function(t){return o*Math.exp(r*t)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},linearTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.categoryAxis,s=t.options,t=Eh((0,t.seriesValues)(),(e=s.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),i=t.slope,o=t.intercept,0<t.count?Vh(function(t){return i*t+o},n):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},logarithmicTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,r=t.options,t=Eh((0,t.seriesValues)(),(i=r.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:t[i]}})),r=t.slope,n=t.intercept,0<t.count?(e=r,o=n,Vh(function(t){return e*Math.log(t)+o},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},movingAverageTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,t=(n=(t=t).categoryAxis,i=t.options,o=t.categoryAxis,t=t.seriesValues,r=(i.trendline||{}).period||2,s=o.totalRangeIndices(),o=o.currentRangeIndices(),o={min:Math.floor(Math.max(o.min-r,s.min)),max:Math.ceil(Math.min(o.max+r+2,s.max))},s=zh(t(o),(e=i.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),r),a=[],s.forEach(function(t){var e=t[0],t=t[1];a[e]={category:n.categoryAt(e,!0),value:t}}),0<a.length?a:null);return t?Object.assign({},h,{type:"line",data:t,categoryField:"category",field:"value"}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.seriesValues,i=t.categoryAxis,s=((t=t.options).trendline||{}).order,n=jh(n(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=n.count,o=n.valueMapper,0<t?Vh(function(t){return o(t)},i):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},powerTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Rh(t,n.field)&&(n=(t=Eh(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Vh(function(t){return o*Math.pow(t,r)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}};var Dh,Fh,Hh=[pn,Rn,On,Dn],Uh=[bn,jn].concat(Hh),c,Nh,h,Gh,Wh,Xh,c,Yh,h,qh,c,Zh,h,Qh,c,Kh,h;function f(){Dh.apply(this,arguments)}function $h(t,e,i){x([].concat(e instanceof e_?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}(Dh=o1)&&(f.__proto__=Dh),((f.prototype=Object.create(Dh&&Dh.prototype)).constructor=f).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new E_,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[ln,dn,jn,Rn,Dn,In,_n,Vn]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},f.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)},f.prototype.removeAxis=function(t){var e=t.options.name;Dh.prototype.removeAxis.call(this,t),t instanceof e_?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},f.prototype.trendlineFactory=function(t,e){var i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),t=Lh(x1,t.type,{options:t,categoryAxis:i,seriesValues:o});return t&&(t.categoryAxis=e.categoryAxis,t.valueAxis=e.valueAxis,this.filterSeries(t,i))},f.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})},f.prototype.seriesValues=function(t,e){var i=[],o=this.srcSeries[t],t=this.seriesCategoryAxis(o);ws(t.options.type,$)&&(this._seriesPointsCache={},this._currentPointsCache={},t.options.dataItems=[],o=this.aggregateSeries(o,t,t.totalRangeIndices()));for(var t=e?e.min:0,r=e?e.max:o.data.length,n=t;n<r;n++){var s=this.bindPoint(o,n);i.push({categoryIx:n,category:s.fields.category,valueFields:s.valueFields})}return i},f.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],o)}},f.prototype.createChartGroup=function(t,e){this.createAreaChart(As(t,[pn,Rn]),e),this.createRangeAreaChart(As(t,[On,Dn]),e),this.createBarChart(As(t,[gn,ln]),e),this.createRangeBarChart(As(t,[Bn,In]),e),this.createBulletChart(As(t,[dn,zn]),e),this.createCandlestickChart(As(t,fn),e),this.createBoxPlotChart(As(t,[cn,Vn]),e),this.createOHLCChart(As(t,wn),e),this.createWaterfallChart(As(t,[Fn,_n]),e),this.createLineChart(As(t,[bn,jn]),e)},f.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r,n,s=e[o];this.isTrendline(s)||(r=this.seriesCategoryAxis(s),n=this.findPane(r.options.pane),s=(ws(r.options.type,$)||s.categoryField)&&u(n,t)?this.aggregateSeries(s,r,r.currentRangeIndices()):this.filterSeries(s,r)),i.push(s)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},f.prototype.filterSeries=function(e,i){var o,t,r,n=(e.data||{}).length;return i._seriesMax=Math.max(i._seriesMax||0,n),T(i.options.min)||T(i.options.max)?(o=i.currentRangeIndices(),t=u(e.type,Uh),(r=x({},e)).data=(r.data||[]).slice(o.min,o.max+1),t&&js(r,o,n,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return T(e.data[t])}),r):e},f.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},f.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=ws(o.type,$),s=t.data,a=[];n||e.indexCategories();for(var h=0;h<s.length;h++){var p,l=y_.current.bindPoint(t,h).fields.category;n&&(l=Ps(l,s[h],this.chartService.intl)),T(l)||(l=r[h]),T(l)&&null!==l&&(a[p=e.totalIndex(l)]=a[p]||{items:[],category:l},a[p].items.push(h))}return this._currentPointsCache[i]=a},f.prototype.aggregateSeries=function(t,o,r){if(!t.data.length)return t;for(var n=this.seriesSourcePoints(t,o),e=x({},t),s=new n1(x({},t),y_.current,s1.current),i=e.data=[],a=o.options.dataItems||[],h=function(t){var e=t-r.min,i=n[t];return(i=i||(n[t]={})).categoryIx=e,i.item||(e=o.categoryAt(t,!0),i.category=e,i.item=s.aggregatePoints(i.items,e)),i},p=r.min;p<=r.max;p++){var l=h(p);i[l.categoryIx]=l.item,l.items&&l.items.length&&(a[l.categoryIx]=l.item)}return u(e.type,Uh)&&js(e,r,o.totalCount(),h,function(t){return n[t]}),o.options.dataItems=a,e},f.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,bs(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Dh.prototype.appendChart.call(this,t,e)},f.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=Ut([].concat(e.valueAxis),function(t){return t.name===i})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},f.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},f.prototype.stackableChartOptions=function(t,e){var i=t.some(function(t){return t.stack}),o=t.some(function(t){return t.stack&&"100%"===t.stack.type}),e=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:e}},f.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";Be(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,i){return Ut(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},f.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new F_(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e))),this.appendChart(i,e))},f.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new h1(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new $_(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createLineChart=function(t,e){0!==t.length&&(t=new M_(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new L_(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new f1(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new y1(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new U_(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new W_(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new m1(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.axisRequiresRounding=function(t,e){for(var i=As(this.series,Hn),o=0;o<this.series.length;o++){var r,n=this.series[o];u(n.type,Hh)&&(r=n.line)&&r.style===hn&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},f.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},f.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof e_&&t[e].createLabels()},f.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,h=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?nt:0},n),T(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Os(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),i_):e_)(n,this.chartService);if(i[r].categories=h.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=h}h.axisIndex=r,o.push(h),this.appendAxis(h)}}var p=this.categoryAxis||o[0];this.categoryAxis=p,e?this.axisY=p:this.axisX=p},f.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Hh))return!1;return!0},f.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var h=o[a];if(u(this.findPane(h.pane),t)){var p=h.name,l=ws(h.type,ls)?{min:.1,max:1}:{min:0,max:1},l=e.query(p)||i||l,l=(0===a&&l&&i&&(l.min=Math.min(l.min,i.min),l.max=Math.max(l.max,i.max)),new(ws(h.type,ls)?n_:o_)(l.min,l.max,x({},n,h),this.chartService));if(p){if(this.namedValueAxes[p])throw new Error("Value axis with name "+p+" is already defined");this.namedValueAxes[p]=l}l.axisIndex=a,s.push(l),this.appendAxis(l)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},f.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new L(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,h=0;h<a.length;h++){var p=a[h];p.getValue?vs(s,p.getValue(r)):vs(n,p.getCategory(r))}0===n.length&&vs(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:ne(e),originalEvent:e,category:Is(n),value:Is(s)})}},f.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},f.prototype.updateAxisOptions=function(t,e){$h(this.options,t,e),$h(this.originalOptions,t,e)},f.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},f.prototype._pointsByHorizontal=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsByPointIndex(t.getIndex()):(t=this._siblingsBySeriesIndex(t.series.index,e),this.chartService.rtl?t.reverse():t)},f.prototype._siblingsByPointIndex=function(e){for(var t=this.charts,i=[],o=0;o<t.length;o++){var r=t[o];r.pane&&"_navigator"===r.pane.options.name||(r=r.points.filter(function(t){return t&&!1!==t.visible&&t.getIndex()===e}),i.push.apply(i,r.sort(this._getSeriesCompareFn(r[0]))))}return i},f.prototype._siblingsBySeriesIndex=function(t,e){t=Pt(t+e,this.series.length);return this.pointsBySeriesIndex(t)},f.prototype._getSeriesCompareFn=function(t){t=this._isInStackedSeries(t);return t&&this.invertAxes||!t&&!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}},f.prototype._isInStackedSeries=function(t){var e=u(t.series.type,[pn,Rn,On,Dn,bn,jn,Mn,Pn]),i=u(t.series.type,[gn,ln]);return e||i&&t.options.isStacked},i(c=f,{categoryAxis:{},valueAxis:{}}),x(c.prototype,r1);const _1=c;function Jh(){Fh.call(this),this._points=[]}function tp(){this._defaultPrevented=!0}(Fh=w.Class)&&(Jh.__proto__=Fh),((Jh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Jh).prototype.destroy=function(){this._points=[]},Jh.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Jh.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o&&(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:tp,visual:t.highlightVisual(),show:e}),o._defaultPrevented)||t.toggleHighlight(e,i)},Jh.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Jh.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1};const b1=Jh;function ep(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function ip(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}function op(t,e){Nh.call(this),this.plotArea=t,this.options=x({},this.options,e)}(Nh=w.Class)&&(op.__proto__=Nh),((op.prototype=Object.create(Nh&&Nh.prototype)).constructor=op).prototype.start=function(t){return this._active=ep(t,this.options.key),this._active},op.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return ip(this.axisRanges=t)}},op.prototype.end=function(){var t=this._active;return this._active=!1,t},op.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},op.prototype.destroy=function(){delete this.plotArea},op.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,h=n[s];(e===y&&!h.options.vertical||e===v&&h.options.vertical)&&(a=h.pan(o))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r},(h=op).prototype.options={key:"none",lock:"none"};const w1=h;function rp(t,e){Gh.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}(Gh=w.Class)&&(rp.__proto__=Gh),((rp.prototype=Object.create(Gh&&Gh.prototype)).constructor=rp).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},rp.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},rp.prototype.setStyles=function(t){Et(this._marquee,t)},rp.prototype.start=function(t){if(ep(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i)return e=this._elementOffset(),i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},rp.prototype._elementOffset=function(){var t=this.chart.element,e=Et(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=ie(t);return{left:i+t.left,top:e+t.top}},rp.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},rp.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(t)).left-=e.left,t.top-=e.top,e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,ip(this.axisRanges)},rp.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},rp.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},rp.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===y&&!a||i===v&&a||!T(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},rp.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(i.x,o),s=Math.min(i.y,t),a=Math.abs(i.x-o),h=Math.abs(i.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,h=e.height()),o>e.x2&&(a=e.x2-i.x),o<e.x1&&(a=i.x-e.x1),t>e.y2&&(h=e.y2-i.y),t<e.y1&&(h=i.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:h}},(c=rp).prototype.options={key:"shift",lock:"none"};const k1=c;function np(t,e){Wh.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}(Wh=w.Class)&&(np.__proto__=Wh),((np.prototype=Object.create(Wh&&Wh.prototype)).constructor=np).prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(i===y&&!a||i===v&&a)&&s.zoomRange&&(a=_(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&o.push({axis:s,range:a})}return ip(this.axisRanges=o)},np.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},np.prototype.destroy=function(){delete this.chart};const S1=np;function sp(t,e){Xh.call(this,t),this.chartService=e}(Xh=R)&&(sp.__proto__=Xh),((sp.prototype=Object.create(Xh&&Xh.prototype)).constructor=sp).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new w.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":yt,reverse:e.rtl,alignItems:i?ct:b});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new E),r.renderVisual()}},sp.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?ui(t):new E},sp.prototype.renderVisual=function(){this.addVisual()},sp.prototype.createVisual=function(){};const A1=sp;function ap(){Yh.apply(this,arguments)}(Yh=Hx)&&(ap.__proto__=Yh),((ap.prototype=Object.create(Yh&&Yh.prototype)).constructor=ap).prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},ap.prototype.markerOptions=function(){return this.options},ap.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return x({},t,{background:t.border.color},t.highlight,t.type===K?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},ap.prototype.createHighlight=function(){var t=new Yh(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},i(h=ap,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:C,align:S,highlight:{width:10,height:10,border:{color:a,width:2}}});const C1=h;function hp(){qh.apply(this,arguments)}(qh=Hx)&&(hp.__proto__=qh),((hp.prototype=Object.create(qh&&qh.prototype)).constructor=hp).prototype.getElement=function(){var t=new w.drawing.Group,e=new w.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},i(c=hp,{width:15,height:15,align:A,vAlign:k,margin:{right:-2,bottom:2}});const P1=c;function pp(){Zh.apply(this,arguments)}(Zh=Hx)&&(pp.__proto__=Zh),((pp.prototype=Object.create(Zh&&Zh.prototype)).constructor=pp).prototype.getElement=function(){var t=new w.drawing.Group,e=new w.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},pp.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},pp.prototype.createHighlightLine=function(){var t=x({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),t=new P1(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},pp.prototype.createHighlightMarker=function(){var t=x({},{background:this.options.background},this.options.highlight.markers),e=new Zh(t),i=this.parent.paddingBox,t=t.border.width,o=this.parent.box.clone();return o.pad({left:t-i.x1,top:t-i.y1}),e.reflow(o),this.highlightMarker=e.getElement(),this.highlightMarker},i(h=pp,{border:{width:0},type:"rect",align:S,vAlign:b,highlight:{border:{width:2},markers:{type:Z,width:10,height:10,border:{width:2,color:a},align:S,vAlign:C}}});const T1=h;function lp(){Qh.apply(this,arguments)}(Qh=Hx)&&(lp.__proto__=Qh),((lp.prototype=Object.create(Qh&&Qh.prototype)).constructor=lp).prototype.createHighlight=function(){var t=x({},{background:this.options.background},this.options.highlight.markers),t=new Qh(t),e=this.paddingBox.clone(),i=this.parent.box.clone();return e.align(i,y,S),e.align(i,v,C),t.reflow(e),this.highlight=[t.getElement()],this.highlight},i(c=lp,{highlight:{markers:{type:Z,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});const M1=c;function cp(t){Kh.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Fs(),this.options.accessibility.ariaChecked=t.active}(Kh=Fx)&&(cp.__proto__=Kh),((cp.prototype=Object.create(Kh&&Kh.prototype)).constructor=cp).prototype.createContainer=function(){this.container=new Gx({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},cp.prototype.createMarker=function(){this.markerWrap=new Kh({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))},cp.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,t=t.line,e={border:{color:(t=void 0===t?{}:t).color||e,opacity:t.opacity,dashType:t.dashType}};return this._createLine(e)||this._createMarkerLine(e,t)||this._createSquare()},cp.prototype.markerOptions=function(){var t=this.options,e=t.markers,i=t.markerColor,o=(e=void 0===e?{}:e).border;return void 0===o&&(o={}),e.zIndex=void 0,x({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},cp.prototype._highlightOptions=function(){var t=this.options;return x({markers:{type:t.markers.type}},t.highlight)},cp.prototype._createLine=function(t){var e=this.options;return e.type!==bn||e.markers.visible||(this._line=new T1(x({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},cp.prototype._createMarkerLine=function(t,e){return this.options.type===bn&&(this._markerLineArea=new P1(x({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},cp.prototype._createSquare=function(){var t=this.options;return t.type===pn&&(this._square=new M1(Object.assign({},{border:t.border,vAlign:t.markers.visible?k:b,highlight:this._highlightOptions(),visual:t.visual},t.area,{background:t.area.background||t.markerColor})),this.markerWrap.append(this._square)),this._square},cp.prototype._createMarker=function(){return new C1(this.markerOptions())},cp.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},cp.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},cp.prototype._toggleHighlight=function(e){var t,i,o=this;this.options.highlight.visible&&((t=this._marker||this._square||this._line)&&t===this._line&&this._line.visual.visible(!e),t)&&((i=t.highlight)||(i=t.createHighlight()).forEach(function(t){return t&&o.markerWrap.appendVisual(t)}),i.forEach(function(t){return t&&t.visible(e)}))},cp.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new Xx(t.text,e))},cp.prototype.getAriaLabelText=function(){return this.options.text},cp.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},cp.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},cp.prototype.renderComplete=function(){Kh.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=w.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},cp.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(Xn,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},cp.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},cp.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},cp.prototype.eventArgs=function(t){var e=this.options;return{element:ne(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},cp.prototype.createVisual=function(){Kh.prototype.createVisual.call(this);var t=this.options;this.options.visible&&(t=x({ariaLabel:t.text},t.accessibility),ni(this.visual,t))},cp.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{type:t.type,markers:x({background:this.options.markerColor},this.markerOptions()),labels:t.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()):Kh.prototype.renderVisual.call(this)},cp.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return w.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},i(h=cp,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const O1=h;var up,dp="custom",c,fp,h,gp,yp,c,vp,h,mp,c,xp,l,_p,h,bp,c,wp,l,kp,c;function Sp(t,e){void 0===e&&(e={}),up.call(this,t),this.chartService=e,u(this.options.position,[C,A,k,S,dp])||(this.options.position=A),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}(up=R)&&(Sp.__proto__=up),((Sp.prototype=Object.create(up&&up.prototype)).constructor=Sp).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=b;e===dp?o=S:u(e,[C,k])?(o=i===ct?S:i===tt?A:b,r=e):i&&(i===ct?r=C:i===tt&&(r=k)),this.container=new Fx({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Fx({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Sp.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new A1({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s],h=a.series||{},p=h.markers,l=(void 0===p&&(p={}),h.dashType),c=h.legendItem,h=h.opacity,p=x({visible:!1!==p.visible,type:Z},p),p=(delete p.size,x({},{markers:p,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:l},e.line),area:Object.assign({},{opacity:h},e.area),opacity:h,accessibility:e.accessibility},e.item,c,a,{markers:e.markers}));o.append(new O1(p))}o.render(),this.itemsContainer.append(o)},Sp.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===dp&&e!==yt||(T(e)?e!==yt:u(t,[S,A]))},Sp.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Sp.prototype.getItems=function(){return this.itemsContainer.children[0].children},Sp.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===dp?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new E(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Sp.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===C||o===k?y:v,a=this.isVertical(),h=t.clone(),p=t.clone(),o=(o!==S&&o!==A||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,v,i.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,y,i.options.align)),i.reflow(p),(p=i.box).clone());(e.offsetX||e.offsetY)&&(p.translate(e.offsetX,e.offsetY),i.reflow(p)),o[s+1]=t[s+1],o[s+2]=t[s+2],this.box=o},Sp.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),i.reflow(t),t=i.box,i.reflow(new E(o,r,o+t.width(),r+t.height()))},Sp.prototype.renderVisual=function(){this.hasItems()&&up.prototype.renderVisual.call(this)},Sp.prototype.createLegendTitle=function(t){var e=x({},{color:q,position:C,align:b},t),i=e.text;t&&!1!==t.visible&&t.text&&(T(e)&&e.visible&&((t=zt(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new Xx(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Sp.prototype.createTitleLayout=function(){this.layout=new Gx({vertical:!0,wrap:!1}),this.container.append(this.layout)},Sp.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},Sp.prototype.appendTitleLayoutContent=function(){this.options.title.position===k?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},i(c=Sp,{position:A,data:[],offsetX:0,offsetY:0,margin:P(2),padding:P(5),border:{color:q,width:0},item:{cursor:gt,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:gt,opacity:1},area:{type:"square",align:A,width:15,height:15}});const I1=c;function Ap(){fp.call(this),this._registry=[]}(fp=w.Class)&&(Ap.__proto__=fp),((Ap.prototype=Object.create(fp&&fp.prototype)).constructor=Ap).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},Ap.prototype.create=function(t,e,i){for(var o=this._registry,r=o[0],n=0;n<o.length;n++){var s=o[n],a=As(t,s.seriesTypes),h=As(t,Wn);if(0<a.length-h.length){r=s;break}}return new r.type(a,e,i)},(h=Ap).current=new h;const B1=h;function Cp(t){var e=document.createElement("div");return t&&(e.className=t),e}function Pp(t){for(var e=t;e&&!Nt(e,"k-handle");)e=e.parentNode;return e}function Tp(t,e,i,o){gp.call(this);var r=t.element;this.options=x({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof i_,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}(gp=w.Class)&&(Tp.__proto__=gp),((Tp.prototype=Object.create(gp&&gp.prototype)).constructor=Tp).prototype.onPane=function(t){return this.categoryAxis.pane===t},Tp.prototype.createElements=function(){var t=this.options,e=this.wrapper=Cp("k-selector k-pointer-events-none"),i=(Et(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=Cp("k-selection k-pointer-events-none")),o=(this.leftMask=Cp("k-mask k-pointer-events-none"),this.rightMask=Cp("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=Cp("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=Cp("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=Cp("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(Cp()),r.appendChild(Cp()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),Et(i,["borderLeftWidth","borderRightWidth","height"])),n=Et(o,"height").height,s=Et(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},Et(o,{top:(i.height-n)/2}),Et(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},Tp.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),te(this.chartElement,((t={})[ds]=this._mousewheelHandler,t))),this._domEvents=Jx.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)})},Tp.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl,i=(this._dateAxis&&x(t,{min:tr(i,t.min),max:tr(i,t.max),from:tr(i,t.from),to:tr(i,t.to)}),Et(this.chartElement,["paddingLeft","paddingTop"])),o=i.paddingLeft,i=i.paddingTop;this.options=x({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},Tp.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(le(this.chartElement,((t={})[ds]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Tp.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Tp.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},Tp.prototype._start=function(t){var e,i,o=this.options,r=ne(t);!this._state&&r&&(e=re(t),this._pointInPane(e.x,e.y))&&(r=Pp(r),i=this.body.getBoundingClientRect(),e=!r&&e.x>=i.x&&e.x<=i.x+i.width&&e.y>=i.y&&e.y<=i.y+i.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(o.from),to:this._index(o.to)}},i=this._rangeEventArgs({from:this._index(o.from),to:this._index(o.to)}),this.trigger(ns,i))&&(this._state=null)},Tp.prototype._press=function(t){(t=this._state?this._state.moveTarget:Pp(ne(t)))&&mt(t,"k-handle-active")},Tp.prototype._move=function(t){var e,i,o,r,n,s,a,h,p,l,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,i=e.range,u=e.moveTarget,o=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),t=e.startLocation-t.x.location,h=i.from,p=i.to,l=i.to-i.from,c=Et(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(o?-1:1),u||e.inBody)&&(c=u&&Nt(u,"k-left-handle"),u=u&&Nt(u,"k-right-handle"),e.inBody?(i.from=Math.min(Math.max(s,r-t),a-l),i.to=Math.min(i.from+l,a)):c&&!o||u&&o?(i.from=Math.min(Math.max(s,r-t),a-1),i.to=Math.max(i.from+1,i.to)):(c&&o||u&&!o)&&(i.to=Math.min(Math.max(s+1,n-t),a),i.from=Math.min(i.to-1,i.from)),i.from===h&&i.to===p||(this.move(i.from,i.to),this.trigger(ss,this._rangeEventArgs(i))))},Tp.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&_t(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(as,this._rangeEventArgs(t)),delete this._state)},Tp.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),o=i.pointCategoryIndex(new L(o.x,i.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},h=3===t.event.which,o=Math.round(r+n/2-o);this._state||h||(this.chart._unsetActivePoint(),i.options.justified||o--,a.from=Math.min(Math.max(s,r-o),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(ss,this._rangeEventArgs(a)),this._end()))},Tp.prototype._mousewheel=function(t){var e,i=this,o=Kt(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(ss,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},Tp.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];this._pointInPane(i.pageX,i.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},i=this._rangeEventArgs(this._state.range),this.trigger(ns,i)?this._state=null:t.preventDefault())},Tp.prototype._gestureend=function(){this._state&&(this.trigger(as,this._rangeEventArgs(this._state.range)),delete this._state)},Tp.prototype._gesturechange=function(t){var e,i,o,r,n,s;this._state&&(r=this.chart,o=this._state,e=this.options,i=this.categoryAxis,o=o.range,s=r._toModelCoordinates(t.touches[0].x.location).x,r=r._toModelCoordinates(t.touches[1].x.location).x,n=Math.min(s,r),s=Math.max(s,r),t.preventDefault(),o.from=i.pointCategoryIndex(new L(n))||e.min,o.to=i.pointCategoryIndex(new L(s))||e.max,this.move(o.from,o.to),this.trigger(ss,this._rangeEventArgs(o)))},Tp.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Tp.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Tp.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Tp.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?t:e,h="x"+(o?2:1),o=this._slot(o?e:t),e=M(o[h]-r.left+n.left),t=(Et(this.leftMask,{width:e}),Et(this.selection,{left:e}),o=this._slot(a),M(i.width-(o[h]-r.left+n.left))),a=(Et(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),Et(this.rightMask,{left:a}),Et(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},Tp.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),t=_(this._index(t),o,r),o=_(this._index(e),t+1,r);i.visible&&this.move(t,o),i.from=this._value(t),i.to=this._value(o)},Tp.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=x({},s);if(this._state&&(s=this._state.range),r!==A&&(s.from=_(_(n-t,0,e-1),i,o)),r!==S&&(s.to=_(_(e+t,s.from+1,o),i,o)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Tp.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),i=this._index(i.to),s={from:n,to:i},a=x({},s),h=this.categoryAxis.options.reverse,h=y+(h?"2":"1"),p=this.categoryAxis.lineBox(),h=Math.abs(p[h]-e.x),e=p.width(),p=M(h/e,2),h=M(p*t),e=M((1-p)*t);if((s=this._state?this._state.range:s).from=_(_(n-h,0,i-1),o,r),s.to=_(_(i+e,s.from+1,r),o,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Tp.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},i(c=Tp,{visible:!0,mousewheel:{zoom:"both"},min:st,max:nt});const L1=c;function Mp(){yp.apply(this,arguments)}(yp=l)&&(Mp.__proto__=yp),((Mp.prototype=Object.create(yp&&yp.prototype)).constructor=Mp).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=x({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,yp.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},Mp.prototype.hide=function(){delete this._current,yp.prototype.hide.call(this)};const E1=Mp;function Op(t,e){vp.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}(vp=l)&&(Op.__proto__=vp),((Op.prototype=Object.create(vp&&vp.prototype)).constructor=Op).prototype.showAt=function(t,e){var i,o=Ut(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(o=o[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),e=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:e,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Op.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Op.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:i?new L(t.x,e.y):new L(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},i(h=Op,{categoryFormat:"{0:d}"});const R1=h;function Ip(){mp.apply(this,arguments)}function Bp(){xp.apply(this,arguments)}function Lp(){_p.apply(this,arguments)}function Ep(){bp.apply(this,arguments)}(mp=w.drawing.Animation)&&(Ip.__proto__=mp),((Ip.prototype=Object.create(mp&&mp.prototype)).constructor=Ip).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,i=i.vertical?v:y,(t=this.fromScale=new w.geometry.Point(1,1))[i]=Jr,e.transform(w.geometry.transform().scale(t.x,t.y))):this.abort()},Ip.prototype.step=function(t){var e=Wt(this.fromScale.x,1,t),t=Wt(this.fromScale.y,1,t);this.element.transform(w.geometry.transform().scale(e,t,this.origin))},Ip.prototype.abort=function(){mp.prototype.abort.call(this),this.element.transform(null)},i(c=Ip,{duration:Kr}),w.drawing.AnimationFactory.current.register(ln,c),(xp=w.drawing.Animation)&&(Bp.__proto__=xp),((Bp.prototype=Object.create(xp&&xp.prototype)).constructor=Bp).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(w.geometry.transform().scale(Jr,Jr,t))},Bp.prototype.step=function(t){this.element.transform(w.geometry.transform().scale(t,t,this.center))},i(l=Bp,{easing:"easeOutElastic"}),w.drawing.AnimationFactory.current.register(un,l),(_p=w.drawing.Animation)&&(Lp.__proto__=_p),((Lp.prototype=Object.create(_p&&_p.prototype)).constructor=Lp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Lp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},i(h=Lp,{duration:200,easing:"linear"}),w.drawing.AnimationFactory.current.register($r,h),(bp=w.drawing.Animation)&&(Ep.__proto__=bp),((Ep.prototype=Object.create(bp&&bp.prototype)).constructor=Ep).prototype.setup=function(){this.element.transform(w.geometry.transform().scale(Jr,Jr,this.options.center))},Ep.prototype.step=function(t){this.element.transform(w.geometry.transform().scale(t,t,this.options.center))},i(c=Ep,{easing:"easeOutElastic",duration:Kr}),w.drawing.AnimationFactory.current.register(kn,c);const V1=c;function Rp(){wp.apply(this,arguments)}function Vp(t,e,i){var o=[],r=e.xMin,n=e.xMax,e=((e=(i||{}).forecast)&&(0<e.before&&(r-=e.before),0<e.after)&&(n+=e.after),(i||{}).samplingInterval),s=O(e,Ze(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function zp(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function jp(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,n=n.yValue;isFinite(s)&&null!==s&&isFinite(n)&&null!==n&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}}(wp=Y_)&&(Rp.__proto__=wp),((Rp.prototype=Object.create(wp&&wp.prototype)).constructor=Rp).prototype.render=function(){wp.prototype.render.call(this),this.renderSegments()},Rp.prototype.createSegment=function(t,e,i){return new(e.style===an?C_:S_)(t,e,i)},Rp.prototype.animationPoints=function(){return wp.prototype.animationPoints.call(this).concat(this._segments)},Rp.prototype.createMissingValue=function(t,e){if(e===on)return Ms((e={x:t.x,y:t.y}).x)||(e.x=0),Ms(e.y)||(e.y=0),e},x((l=Rp).prototype,p);const z1=l,j1=h={exponentialTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Rh(t,s.field)&&(i=(t=Eh(t,(e=s.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:Math.log(t[e])}}))).slope,o=t.intercept,h=t.count,t={xMin:t.xMin,xMax:t.xMax},0<h)?(r=Math.exp(o),n=i,Vp(function(t){return r*Math.exp(n*t)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null},linearTrendline:function(t){var e,i,o,r,n=t.options,s=(t={seriesValues:t.seriesValues,options:n},e=t.options,t=Eh((0,t.seriesValues)(),zp(e.field)),i=t.slope,o=t.intercept,s=t.count,r=t.xMin,t=t.xMax,0<s?Vp(function(t){return i*t+o},{xMin:r,xMax:t},e.trendline):null);return s?Object.assign({},n,{type:"scatterLine",data:s}):null},logarithmicTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,p=(t={seriesValues:t.seriesValues,options:h},a=t.options,t=(0,t.seriesValues)(),Rh(t,"x")&&(i=(p=Eh(t,(e=a.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:t[e]}}))).slope,o=p.intercept,p=p.count,t=jp(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<p)?(n=i,s=o,Vp(function(t){return n*Math.log(t)+s},t,a.trendline)):null);return p?Object.assign({},h,{type:"scatterLine",data:p}):null},movingAverageTrendline:function(t){var e,i=t.options,o=(o=t.options,t=t.seriesValues,e=(o.trendline||{}).period||2,0<(t=zh(t({before:e,after:e}),zp(o.field),e)).length?t:null);return o?Object.assign({},i,{type:"scatterLine",data:o}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=(t={seriesValues:t.seriesValues,options:r},e=t.seriesValues,i=((t=t.options).trendline||{}).order,n=zp(t.field),e=jh(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?Vp(i,{xMin:o,xMax:e},t.trendline):null);return n?Object.assign({},r,{type:"scatterLine",data:n}):null},powerTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Rh(t,"x")&&(i=(h=Eh(t,(e=s.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:Math.log(t[e])}}))).slope,o=h.intercept,h=h.count,t=jp(t,zp(s.field)),0<h)?(r=Math.exp(o),n=i,Vp(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null}};function Dp(){kp.apply(this,arguments)}function Fp(t,e,i,o){x([].concat(i?t.yAxis:t.xAxis)[e],o)}(kp=o1)&&(Dp.__proto__=kp),((Dp.prototype=Object.create(kp&&kp.prototype)).constructor=Dp).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new E_,this.yAxisRangeTracker=new E_},Dp.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(As(r,Ln),o),this.createScatterLineChart(As(r,En),o),this.createBubbleChart(As(r,un),o))}this.createAxes(t)},Dp.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),kp.prototype.appendChart.call(this,t,e)},Dp.prototype.removeAxis=function(t){var e=t.options.name;kp.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},Dp.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Ut([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Ut([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Dp.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Y_(this,{series:t,clip:e.options.clip}),e)},Dp.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new z1(this,{series:t,clip:e.options.clip}),e)},Dp.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Z_(this,{series:t,clip:e.options.clip}),e)},Dp.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=x({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=ws(a.type,ls),h=s.query(),p=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||h||p,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===i&&!f){f=y_.current.bindPoint(d,0).valueFields;l.push(f[e?"y":"x"]);break}}0===i&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){o=!0;break}p=new(ws(a.type,$)||!a.type&&o?r_:t?n_:o_)(s.min,s.max,a,this.chartService);if(p.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=p}return this.appendAxis(p),p},Dp.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},Dp.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new L(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p],c=l.options.vertical?h:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<h.length&&t.trigger(i,{element:ne(e),originalEvent:e,x:Is(a),y:Is(h)})},Dp.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Fp(this.options,o,i,e),Fp(this.originalOptions,o,i,e)},Dp.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=Lh(j1,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},Dp.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},i(c=Dp,{xAxis:{},yAxis:{}}),x(c.prototype,r1);const D1=c;(Hp=R)&&(Qp.__proto__=Hp),((Qp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Qp).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},Qp.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);t.visible&&(i||0===i)&&(t.position===b||t.position===cs?(t.color||(t.color=Lx(this.options.color)),t.background||(t.background=this.options.color)):(e=e.theme.seriesDefaults.labels,t.color=t.color||e.color,t.background=t.background||e.background),this.label=new Xx(i,x({},t,{align:b,vAlign:"",animation:{type:$r,delay:this.animationDelay}}),this.pointData()),this.append(this.label))},Qp.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},Qp.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Qp.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,h=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):r.position===cs?(s.radius=s.radius-e/2,t=s.point(h),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(h)).x>=s.center.x?(o=t.x+i,n.orientation=A):(o=t.x-i,n.orientation=S),n.reflow(new E(o,t.y-e,t.x,t.y))))},Qp.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;Hp.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value&&(o.visual?(t=(i.startAngle+180)%360,(t=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new w.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new w.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Qp.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},o=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},r=i.color,n={color:r,opacity:i.opacity},o=this.createSegment(e,x({fill:n,stroke:{opacity:i.opacity},zIndex:i.zIndex},o));t.append(o),Ts(i)&&t.append(this.createGradientOverlay(o,{baseColor:r,fallbackFill:n},x({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Qp.prototype.createSegment=function(t,e){return e.singleSegment?new w.drawing.Circle(new w.geometry.Circle(new w.geometry.Point(t.center.x,t.center.y),t.radius),e):Dx.current.createRing(t,e)},Qp.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Hp.prototype.createAnimation.call(this)},Qp.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,x({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Qp.prototype.highlightVisual=function(){return this.visual.children[0]},Qp.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new w.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Qp.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight.border.width,t=this.createSegment(this.sector,x({},t,{stroke:{width:2*e}})),e=new w.drawing.MultiPath;return e.paths.push(w.drawing.Path.fromRect(t.bbox())),e.paths.push(this.createSegment(this.sector,{})),t.clip(e),t},Qp.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=pe(e+180),e=M(Math.sin(t),J),t=M(Math.cos(t),J),{horizontal:Math.abs(e)>Np?b:t<0?A:S,vertical:Math.abs(e)<Up?b:e<0?k:C})}},Qp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Qp.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Qp.prototype.getIndex=function(){return this.index};var Hp,p=Qp,Up=M(pe(30),J),Np=M(pe(60),J),Gp,Wp,l,Xp,h,Yp,qp,Zp,c;function Qp(t,e,i){Hp.call(this,i),this.value=t,this.sector=e}i(p,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:t,margin:P(.5),align:Z,zIndex:1,position:us},animation:{type:kn},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:e,className:o,ariaRoleDescription:Un}}),x(p.prototype,b_),x(p.prototype,V_);const F1=p,H1={createLegendItem:function(t,e,i){var o,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},h=s.labels||{};i&&!1!==i.visibleInLegend&&(a=!(r=!1!==i.visible)&&zt(h)||zt(a),n=i.category,a&&(n=a({text:n,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=(r?(o={},e):(o={color:h.color,font:h.font},s.markers||{})).color,Ms(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,labels:o})}};function Kp(t,e){Gp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function $p(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),o=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=o&&(i=n/o,r=new L(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))),r}(Gp=R)&&(Kp.__proto__=Gp),((Kp.prototype=Object.create(Gp&&Gp.prototype)).constructor=Kp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Kp.prototype.traverseDataPoints=function(t){for(var e=this.options,i=this.plotArea.options.seriesColors,o=(i=void 0===i?[]:i).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,p=_s(a),l=p.total,c=p.points,p=p.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/p),void 0),f=(T(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===us&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==h.length&&Boolean(y.explode),Tt(a.color)||(a.color=y.color||i[g%o]),t(v,new zx(null,0,0,f,m),{owner:this,category:T(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==l?v/l:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},Kp.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ss(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},Kp.prototype.addValue=function(t,e,i){var o=x({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new F1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Kp.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs,r=(void 0===o&&(o=[]),i.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,h=s-.85*s,p=new E(n.x1,n.y1,n.x1+s,n.y1+s),s=p.center(),n=n.center(),l=e.series.length,c=[],u=[],e=O(e.padding,h);this.targetBox=t,e=a-5<e?a-5:e,p.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new L(d+p.x1+e,d+p.y1+e),g=0;g<r;g++){var y=i[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,o.length&&(x=o[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===l-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(p),y.label);x&&x.options.position===us&&m===l-1&&(x.orientation===A?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=p},Kp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Kp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Kp.prototype.distanceBetweenLabels=function(t){var e=ae(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=M(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var h=t[a+1].box,n=t[a].box,s=M(h.y1-n.y2);r.push(s)}return s=M(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Kp.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Kp.prototype._takeDistance=function(t,e,i,o){var r;return 0<t[i]&&(o-=r=Math.min(t[i],o),t[i]-=r,t[e]+=r),o},Kp.prototype.reflowLabels=function(t,e){var i,o=ae(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var p=0;p<s;p++){var l=e[p],c=l.box;h+=t[p],i=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),l.orientation===A),l.orientation===A?(n.align!==Z&&(i=r.radius+r.center.x+a),l.reflow(new E(i+c.width(),h,i,h))):(n.align!==Z&&(i=r.center.x-r.radius-a),l.reflow(new E(i-c.width(),h,i,h))),h+=c.height()}},Kp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;Gp.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,h,p,l,c=e[o],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new w.drawing.Path({stroke:{color:g,width:t.width},animation:{type:$r,delay:c.animationDelay}}),d.options.position===us)&&(r=d.box,n=u.center,l=u.point(f),s=new L(r.x1,r.center().y),p=h=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===A?(p=$p(n,l,s,h=new L(r.x1-t.padding,r.center().y)),s=new L(h.x-4,h.y),(p=p||s).x=Math.min(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===gn||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))):(p=$p(n,l,s,h=new L(r.x2+t.padding,r.center().y)),s=new L(h.x+4,h.y),(p=p||s).x=Math.max(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===gn||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))),g.lineTo(h.x,h.y),this._connectorLines.push(g),this.visual.append(g))}},Kp.prototype.renderVisual=function(){var t,e,i,o;Gp.prototype.renderVisual.call(this),be(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),o=this.visual.bbox())&&(i=o.bottomRight(),(o=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1)&&this.visual.transform(w.geometry.transform().scale(o,o,[e.x,e.y]))},Kp.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Kp.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,e=e.center,s=e.x,e=e.y,i=Math.min(Math.abs(e-i),Math.abs(e-o));return n<i?t:s+Math.sqrt(n*n-i*i)*(r?1:-1)},Kp.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},Kp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Kp.prototype.animationDelay=function(t){return 70*t},Kp.prototype.stackRoot=function(){return this},i(l=Kp,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(l.prototype,H1),l.prototype.isStackRoot=!0;const U1=l;function Jp(){Wp.apply(this,arguments)}(Wp=o1)&&(Jp.__proto__=Wp),((Jp.prototype=Object.create(Wp&&Wp.prototype)).constructor=Jp).prototype.render=function(){this.createPieChart(this.series)},Jp.prototype.createPieChart=function(t){var e=t[0],t=new U1(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Jp.prototype.appendChart=function(t,e){Wp.prototype.appendChart.call(this,t,e),Jt(this.options.legend.data,t.legendItems)},Jp.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},Jp.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)};const N1=Jp;function tl(){Xp.apply(this,arguments)}(Xp=F1)&&(tl.__proto__=Xp),((tl.prototype=Object.create(Xp&&Xp.prototype)).constructor=tl).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===b?(o.radius-=(o.radius-o.innerRadius)/2,e=o.point(r),i.reflow(new E(e.x,e.y-t/2,e.x,e.y))):Xp.prototype.reflowLabel.call(this))},tl.prototype.createSegment=function(t,e){return Dx.current.createRing(t,e)},i(h=tl,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:kn}}),x(h.prototype,b_);const G1=h;function el(){Yp.apply(this,arguments)}(Yp=U1)&&(el.__proto__=Yp),((el.prototype=Object.create(Yp&&Yp.prototype)).constructor=el).prototype.addValue=function(t,e,i){var o=x({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new G1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},el.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),o=Math.min(o.width(),o.height()),r=o/2,n=i.series,s=n.length,i=O(i.padding,o-.85*o),a=r-(i=r-5<i?r-5:i),h=0,p=0;p<s;p++){var l=n[p];0===p&&T(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),T(l.size)?a-=l.size:h++,T(l.margin)&&p!==s-1&&(a-=l.margin)}T(e)||(a-=e=(r-i)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+O(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Yp.prototype.reflow.call(this,t)},el.prototype.animationDelay=function(t,e,i){return 50*t+Kr*(e+1)/(i+1)},i(c=el,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const W1=c;function il(){qp.apply(this,arguments)}(qp=N1)&&(il.__proto__=qp),((il.prototype=Object.create(qp&&qp.prototype)).constructor=il).prototype.render=function(){this.createDonutChart(this.series)},il.prototype.createDonutChart=function(t){var e=t[0],t=new W1(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},il.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},il.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)};const X1=il;function ol(){Zp.apply(this,arguments)}(Zp=o1)&&(ol.__proto__=Zp),((ol.prototype=Object.create(Zp&&Zp.prototype)).constructor=ol).prototype.initFields=function(){this.valueAxisRangeTracker=new E_},ol.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},ol.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),i=this.polarAxis.getSlot(0).center,i=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(i)},ol.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,i=e.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=o.type===ls?(t=l_,{min:.1,max:1}):(t=p_,{min:0,max:1}),e=e.query(name)||i||r,r=(e&&i&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max)),new t(e.min,e.max,o,this.chartService));this.valueAxis=r,this.appendAxis(r)},ol.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),t=P(t.padding||{},r),r=o.clone().unpad(t),o=r.clone(),t=(o.y2=o.y1+Math.min(o.width(),o.height()),o.align(r,v,b),o.clone().shrink(0,o.height()/2)),r=(i.reflow(o),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=o,this.alignAxes(o)},ol.prototype.backgroundBox=function(){return this.box},ol.prototype.detachLabels=function(){};var rl,t=ol,p,nl,sl,al,hl,l,pl,h;function ll(){rl.apply(this,arguments)}(rl=Y_)&&(ll.__proto__=rl),((ll.prototype=Object.create(rl&&rl.prototype)).constructor=ll).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=L.onCircle(t.center,t.startAngle,e);return new E(t.x,t.y,t.x,t.y)},i(p=ll,{clip:!1});const Y1=p;function cl(){nl.apply(this,arguments)}(nl=z1)&&(cl.__proto__=nl),(l=(cl.prototype=Object.create(nl&&nl.prototype)).constructor=cl).prototype.pointSlot=Y1.prototype.pointSlot,i(l,{clip:!1});const q1=l;function ul(){sl.apply(this,arguments)}(sl=B_)&&(ul.__proto__=sl),((ul.prototype=Object.create(sl&&sl.prototype)).constructor=ul).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},ul.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},ul.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new c_(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o};const Z1=ul;function dl(){al.apply(this,arguments)}(al=O_)&&(dl.__proto__=al),((dl.prototype=Object.create(al&&al.prototype)).constructor=dl).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new w.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const Q1=dl;function fl(){hl.apply(this,arguments)}function gl(t,e){return t.value.x-e.value.x}(hl=q1)&&(fl.__proto__=hl),((fl.prototype=Object.create(hl&&hl.prototype)).constructor=fl).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===an?Z1:Q1)(t,e,i)},fl.prototype.createMissingValue=function(t,e){var i;return Ms(t.x)&&e!==rn&&(i={x:t.x,y:t.y},e===on)&&(i.y=0),i},fl.prototype.seriesMissingValues=function(t){return t.missingValues||on},fl.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},fl.prototype.sortPoints=function(t){if(t.sort(gl),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||Ms(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t};const K1=fl;function yl(){pl.apply(this,arguments)}(pl=t)&&(yl.__proto__=pl),((yl.prototype=Object.create(pl&&pl.prototype)).constructor=yl).prototype.createPolarAxis=function(){var t=new h_(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},yl.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),pl.prototype.render.call(this)},yl.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:U},minorGridLines:{type:U}},this.options.yAxis)},yl.prototype.createValueAxis=function(){pl.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},yl.prototype.trendlineFactory=function(t,e){t=D1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=An),t},yl.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),o1.prototype.appendChart.call(this,t,e)},yl.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(As(t,[An]),e),this.createScatterChart(As(t,[Cn]),e),this.createAreaChart(As(t,[Sn]),e)},yl.prototype.createLineChart=function(t,e){0!==t.length&&(t=new q1(this,{series:t}),this.appendChart(t,e))},yl.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new Y1(this,{series:t}),this.appendChart(t,e))},yl.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new K1(this,{series:t}),this.appendChart(t,e))},yl.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new L(o.x,o.y),r=this.axisX.getValue(o),o=this.axisY.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ne(e),x:r,y:o})},yl.prototype.createCrosshairs=function(){},i(h=yl,{xAxis:{},yAxis:{}}),x(h.prototype,r1,{seriesValues:D1.prototype.seriesValues});var vl,ml,xl,_l,c=h,p,bl,l,wl,kl,h,Sl,p,Al,l;function Cl(){vl.apply(this,arguments)}(vl=M_)&&(Cl.__proto__=vl),((Cl.prototype=Object.create(vl&&vl.prototype)).constructor=Cl).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=L.onCircle(t.center,t.middle(),e);return new E(t.x,t.y,t.x,t.y)},Cl.prototype.renderSegments=function(){if(vl.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],r=ae(n),r=ae(r.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o)&&r&&ae(n).linePoints.push(i)}},Cl.prototype.createSegment=function(t,e,i){var i=new(e.style===an?C_:S_)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==rn||(i.options.closed=!0),i},i(p=Cl,{clip:!1,limitPoints:!1});const $1=p;function Pl(){ml.apply(this,arguments)}(ml=B_)&&(Pl.__proto__=ml),((Pl.prototype=Object.create(ml&&ml.prototype)).constructor=Pl).prototype.fillToAxes=function(){};const J1=Pl;function Tl(){xl.apply(this,arguments)}(xl=O_)&&(Tl.__proto__=xl),((Tl.prototype=Object.create(xl&&xl.prototype)).constructor=Tl).prototype.fillToAxes=function(){};const tb=Tl;function Ml(){_l.apply(this,arguments)}(_l=$1)&&(Ml.__proto__=_l),((Ml.prototype=Object.create(_l&&_l.prototype)).constructor=Ml).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,h=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),h===an?(s=new J1(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new tb(t,e,i,r,n)),s},Ml.prototype.seriesMissingValues=function(t){return t.missingValues||on};const eb=Ml;function Ol(t,e){bl.call(this,t,null,e)}(bl=G1)&&(Ol.__proto__=bl),((Ol.prototype=Object.create(bl&&bl.prototype)).constructor=Ol).prototype.getIndex=function(){return this.categoryIx},i(l=Ol,{overlay:{gradient:"none"},labels:{distance:10}});const ib=l;function Il(t){wl.call(this,t),this.forEach=t.rtl?Ba:Ia}(wl=R)&&(Il.__proto__=wl),((Il.prototype=Object.create(wl&&wl.prototype)).constructor=Il).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,n=i.angle/(t+o+r*(t-1)),s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},i(h=Il,{gap:1,spacing:0});const ob=h;function Bl(){kl.apply(this,arguments)}(kl=R)&&(Bl.__proto__=kl),((Bl.prototype=Object.create(kl&&kl.prototype)).constructor=Bl).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new E;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const rb=Bl;function Ll(){Sl.apply(this,arguments)}(Sl=F_)&&(Ll.__proto__=Sl),((Ll.prototype=Object.create(Sl&&Sl.prototype)).constructor=Ll).prototype.pointType=function(){return ib},Ll.prototype.clusterType=function(){return ob},Ll.prototype.stackType=function(){return rb},Ll.prototype.categorySlot=function(t,e){return t.getSlot(e)},Ll.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Ll.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Ll.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Sl.prototype.createAnimation.call(this)},(p=Ll).prototype.reflow=__.prototype.reflow,i(p,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const nb=p;function El(){Al.apply(this,arguments)}(Al=t)&&(El.__proto__=Al),((El.prototype=Object.create(Al&&Al.prototype)).constructor=El).prototype.createPolarAxis=function(){var t=new a_(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},El.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:U},minorGridLines:{type:U}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},El.prototype.aggregateCategories=function(){_1.prototype.aggregateCategories.call(this,this.panes)},El.prototype.createCategoryAxesLabels=function(){_1.prototype.createCategoryAxesLabels.call(this,this.panes)},El.prototype.filterSeries=function(t){return t},El.prototype.trendlineFactory=function(t,e){t=_1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=Mn),t},El.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(As(t,[Pn]),e),this.createLineChart(As(t,[Mn]),e),this.createBarChart(As(t,[Tn]),e)},El.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},El.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new eb(this,this.chartOptions(t)),this.appendChart(t,e))},El.prototype.createLineChart=function(t,e){0!==t.length&&(t=new $1(this,this.chartOptions(t)),this.appendChart(t,e))},El.prototype.createBarChart=function(t,e){var i,o,r,n;0!==t.length&&(n=t[0],i=this.chartOptions(t),o=(t=this.filterVisibleSeries(t)).some(function(t){return t.stack}),r=t.some(function(t){return t.stack&&"100%"===t.stack.type}),i.gap=n.gap,i.spacing=n.spacing,i.defaultStack=n.stack&&1<t.length,i.isStacked=o&&1<t.length,i.isStacked100=r&&1<t.length,n=new nb(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},El.prototype.seriesCategoryAxis=function(){return this.categoryAxis},El.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new L(o.x,o.y),r=this.categoryAxis.getCategory(o),o=this.valueAxis.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ne(e),category:r,value:o})},El.prototype.createCrosshairs=function(){},El.prototype._pointsByVertical=function(t){return Al.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},El.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},x((l=El).prototype,r1,{appendChart:_1.prototype.appendChart,aggregateSeries:_1.prototype.aggregateSeries,seriesSourcePoints:_1.prototype.seriesSourcePoints,seriesValues:_1.prototype.seriesValues}),i(l,{categoryAxis:{categories:[]},valueAxis:{}});var Rl,h=l,p,Vl,zl,jl,t;function Dl(t,e,i){Rl.call(this,e),this.value=t,this.options.index=i.index}(Rl=R)&&(Dl.__proto__=Rl),((Dl.prototype=Object.create(Rl&&Rl.prototype)).constructor=Dl).prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Dl.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new E(o,e[0].y,r,e[2].y),i&&i.reflow(new E(t.x1,e[0].y,t.x2,e[2].y))},Dl.prototype.createVisual=function(){var t=this,e=this.options;Rl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},Dl.prototype.createPath=function(){var t=this.options,e=t.border;return w.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Dl.prototype.createHighlight=function(t){return w.drawing.Path.fromPoints(this.points,t)},Dl.prototype.highlightVisual=function(){return this.visual.children[0]},Dl.prototype.highlightVisualArgs=function(){var t=w.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Dl.prototype.createFocusHighlight=function(t){var e=this.options.accessibility.highlight.border.width,t=w.drawing.Path.fromPoints(this.points,x({},t,{stroke:{width:2*e}})).close(),i=new w.drawing.MultiPath;return i.paths.push(w.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(w.drawing.Path.fromPoints(this.points)),t.clip(i),t},Dl.prototype.tooltipAnchor=function(){var t=this.box;return{point:new L(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Dl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Dl.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Dl.prototype.getIndex=function(){return this.index},i(p=Dl,{color:a,border:{width:1},labels:{format:""},accessibility:{role:e,className:o,ariaRoleDescription:Un}}),x(p.prototype,b_),x(p.prototype,V_);const sb=p;function Fl(t,e){Vl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}(Vl=R)&&(Fl.__proto__=Vl),((Fl.prototype=Object.create(Vl&&Vl.prototype)).constructor=Fl).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},Fl.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,i=(void 0===e&&(e=[]),t.series[0]),o=i.data;if(o)for(var t=_s(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(a=p.fields,Tt(i.color)||(i.color=a.color||e[s%e.length]),a=x({index:s,owner:this,series:i,seriesIx:0,dataItem:o[s],percentage:p.value/r},a,{visible:p.visible}),p=p.valueFields.value,h=this.createSegment(p,a),p=this.createLabel(p,a),h)&&p&&h.append(p)}},Fl.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ss(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},Fl.prototype.createSegment=function(t,e){var i=x({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible)return t=new sb(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},Fl.prototype.createLabel=function(t,e){var i,o=e.series,r=e.dataItem,n=x({},this.options.labels,o.labels),s=t;if(n.visible)return i=zt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o},i?s=i(r):n.format&&(s=this.chartService.format.auto(n.format,s)),n.color||(n.color=Lx(o.color),n.background)||(n.background=o.color),this.evalSegmentOptions(n,t,e),i=new Xx(s,x({vAlign:n.position},n),r),this.labels.push(i),i},Fl.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==b&&(o=t[i].box.width(),r===S?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Fl.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var p=s.percentage/a.percentage*e,l=(e-p)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=o.dynamicHeight?i*d:i/n,d=_(d?(e-p*(f/d))/2:f?0:e/2,0,e);g.push(new w.geometry.Point(t.x1+l,t.y1+c)),g.push(new w.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new w.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new w.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+o.segmentSpacing,p=_(e-2*(l=d),0,e)}},Fl.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,h=s?0:(e-e/o.neckRatio)/2,p=((s?e:e-2*h)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?p*d:p/n,d=o.dynamicHeight?i*d:i/n;u.push(new w.geometry.Point(t.x1+h,t.y1+l)),u.push(new w.geometry.Point(t.x1+e-h,t.y1+l)),u.push(new w.geometry.Point(t.x1+e-h-f,t.y1+d+l)),u.push(new w.geometry.Point(t.x1+h+f,t.y1+d+l)),h+=f,l+=d+o.segmentSpacing}},Fl.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},i(t=Fl,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),x(t.prototype,H1);const ab=t;function Hl(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,zl.call(this,t,e)}(zl=ab)&&(Hl.__proto__=zl);const hb=(Hl.prototype=Object.create(zl&&zl.prototype)).constructor=Hl;function Ul(){jl.apply(this,arguments)}(jl=o1)&&(Ul.__proto__=jl),((Ul.prototype=Object.create(jl&&jl.prototype)).constructor=Ul).prototype.render=function(){this.createChart(ab,As(this.series,[vn])),this.createChart(hb,As(this.series,[mn]))},Ul.prototype.createChart=function(t,e){var i=e[0];i&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight}),this.appendChart(t))},Ul.prototype.appendChart=function(t,e){jl.prototype.appendChart.call(this,t,e),Jt(this.options.legend.data,t.legendItems)},Ul.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},Ul.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},Ul.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)};var Nl,l=Ul,p,Gl,t,Wl,e;function Xl(t,e){Nl.call(this),this.options=e,this.color=e.color||a,this.value=t}(Nl=R)&&(Xl.__proto__=Nl),((Xl.prototype=Object.create(Nl&&Nl.prototype)).constructor=Xl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},Xl.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Xl.prototype.createLabelElement=function(t){var e=(e=t.color)||Lx(this.color);return new Xx(this.getLabelText(t),x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},Xl.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.formatValue(t.format)},Xl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Xl.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())},Xl.prototype.createVisual=function(){Nl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},Xl.prototype.markerBox=function(){var t,e=this.options.markers,i=e.border,o=this.box.toRect(),r=O(e.type,"rect")===lt,i=O(i.width,r?1:0),r=Math.round(i/2);return e.size&&(t=o.center(),o.size.width=o.size.height=e.size,o.origin.x=Math.round(t.x-o.size.width/2),o.origin.y=Math.round(t.y-o.size.height/2)),o.size.width-=i,o.size.height-=i,o.origin.y+=r+.5,o.origin.x+=r+.5,ui(o)},Xl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=O(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},Xl.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Hx({type:O(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:O(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=e,this.append(e)},Xl.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,i=new Hx({type:O(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:O(e.zIndex,this.series.zIndex)}),e=(i.reflow(this.markerBox()),i.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},Xl.prototype.highlightVisual=function(){return this.rectVisual},Xl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Xl.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.accessibility.highlight,t=new Hx({type:O(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 t.reflow(this.markerBox()),t.getElement()},Xl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new L(t,e),align:{horizontal:b,vertical:k}}},Xl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Xl.prototype.unclipElements=function(){},Xl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},x((p=Xl).prototype,b_),x(p.prototype,w_),x(p.prototype,V_),p.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:e,className:o,ariaRoleDescription:Un}};const pb=p;function Yl(t,e){Gl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(Gl=R)&&(Yl.__proto__=Gl),((Yl.prototype=Object.create(Gl&&Gl.prototype)).constructor=Yl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:nt,max:st},this._evalSeries=[]},Yl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},Yl.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;T(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))}},Yl.prototype.addValue=function(t,e){var i;t&&T(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},Yl.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=Ss(t,{},n,!0)),t);return s&&Ss(r=x({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},Yl.prototype.pointType=function(){return pb},Yl.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=x({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Yl.prototype.createPoint=function(t,e){var i,o,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(Tt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===i&&(i=.05),o=(0,w.parseColor)(e),r=1-i,a=function(t){var e=o.toHSL(),i=100-e.l;return e.l+=Math.min((r-t)*i,i),e.toCss()}(t.value/this.valueRange.max)),new pb(t,s));return n.color=a,this.append(n),n},Yl.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{xAxis:o,yAxis:i};throw new Error("Unable to locate Y axis with name "+t)},Yl.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,h=0;this.traverseDataPoints(function(t,e){var i=s[h++],e=n.seriesAxes(e.series),o=e.xAxis,e=e.yAxis,r=o.categoryIndex(t.x),t=e.categoryIndex(t.y),o=o.getSlot(r,r,a),r=e.getSlot(t,t,a);i&&(o&&r?(e=n.pointSlot(o,r),i.reflow(e)):i.visible=!1)}),this.box=t},Yl.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},Yl.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),p=0;p<o.data.length;p++){var l=this.plotArea.bindPoint(o,p),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=h.min<=d&&d<=h.max;u&&d&&t(c,x({pointIx:p,series:o,seriesIx:i,dataItem:o.data[p],owner:this},l))}},Yl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},Yl.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},i(t=Yl,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const lb=t;function ql(){Wl.apply(this,arguments)}function Zl(t,e){return t instanceof Date&&e instanceof Date?Qo(t,e):t===e}function Ql(t,e,i,o){x([].concat(i?t.yAxis:t.xAxis)[e],o)}(Wl=o1)&&(ql.__proto__=Wl),((ql.prototype=Object.create(Wl&&Wl.prototype)).constructor=ql).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},ql.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},ql.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,r=r.yAxis,s=Oe(n.categories||[]),a=Oe(r.categories||[]),h=0;h<o.length;h++){var p=y_.current.bindPoint(i,h).valueFields,l=p.x,p=p.y;s.has(l)||s.add(l),a.has(p)||a.add(p)}n.categories=s.values(),r.categories=a.values()}},ql.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(As(r,[xn]),o)}},ql.prototype.createHeatmapChart=function(t,e){t=new lb(this,{series:t});this.appendChart(t,e)},ql.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Ut([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Ut([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},ql.prototype.seriesAxes=function(t){var e=this.options,i=[].concat(e.xAxis),o=t.xAxis,i=o?i.find(function(t){return t.name===o}):i[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!i)throw new Error("Unable to locate X axis with name "+o);if(t)return{xAxis:i,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},ql.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},ql.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],h=this.series,p=0;p<h.length;p++){var l=h[p],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===i&&!c){c=y_.current.bindPoint(l,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){o=!0;break}t=new(ws(s.type,$)||!s.type&&o?i_:e_)(s,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.indexCategories(),t},ql.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},ql.prototype.removeAxis=function(t){var e=t.options.name;Wl.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},ql.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new L(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p];vs(l.options.vertical?h:a,l.getCategory(r))}0<a.length&&0<h.length&&t.trigger(i,{element:ne(e),originalEvent:e,x:Is(a),y:Is(h)})},ql.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Ql(this.options,o,i,e),Ql(this.originalOptions,o,i,e)},ql.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},ql.prototype._pointsByVertical=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisX.options.reverse?-1*e:e),o=this.axisX.children,r=o[Pt(this._getPointAxisXIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return Zl(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},ql.prototype._pointsByHorizontal=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisY.options.reverse?-1*e:e),o=this.axisY.children,r=o[Pt(this._getPointAxisYIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return Zl(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},ql.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},ql.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},ql.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return Zl(e,t.value)})},i(e=ql,{xAxis:{},yAxis:{}}),x(e.prototype,r1);var Kl,o=e,Un="color",p="first",t="max",e="noteText",$l=(B1.current.register(_1,[ln,gn,bn,jn,pn,Rn,fn,wn,dn,zn,cn,Vn,Bn,In,Fn,_n,On,Dn].concat(Wn)),B1.current.register(D1,[Ln,En,un].concat(Wn)),B1.current.register(N1,[kn]),B1.current.register(X1,[yn]),B1.current.register(l,[vn,mn]),B1.current.register(c,[Sn,An,Cn].concat(Wn)),B1.current.register(h,[Pn,Tn,Mn].concat(Wn)),B1.current.register(o,[xn]),y_.current.register([ln,gn,bn,jn,pn,Rn],[dt],[Nn,Un,e,tn,en,Gn]),y_.current.register([Bn,In,On,Dn],["from","to"],[Nn,Un,e,Gn]),y_.current.register([Fn,_n],[dt],[Nn,Un,e,"summary",Gn]),y_.current.register([Sn,An,Cn],[y,v],[Un,Gn]),y_.current.register([Pn,Tn,Mn],[dt],[Nn,Un,Gn]),y_.current.register([vn,mn],[dt],[Nn,Un,"visibleInLegend","visible",Gn]),s1.current.register([ln,gn,bn,jn,pn,Rn,Fn,_n],{value:t,color:p,noteText:p,errorLow:"min",errorHigh:t}),s1.current.register([Bn,In,On,Dn],{from:"min",to:t,color:p,noteText:p}),s1.current.register([Pn,Tn,Mn],{value:t,color:p}),y_.current.register([Ln,En,un],[y,v],[Un,e,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),y_.current.register([un],[y,v,"size"],[Un,Nn,e]),y_.current.register([xn],[y,v,dt],[Un,e]),y_.current.register([fn,wn],["open","high","low","close"],[Nn,Un,"downColor",e]),s1.current.register([fn,wn],{open:t,high:t,low:"min",close:t,color:p,downColor:p,noteText:p}),y_.current.register([cn,Vn],["lower","q1","median","q3","upper","mean","outliers"],[Nn,Un,e,Gn]),s1.current.register([cn,Vn],{lower:t,q1:t,median:t,q3:t,upper:t,mean:t,outliers:p,color:p,noteText:p}),y_.current.register([dn,zn],["current","target"],[Nn,Un,"visibleInLegend",e,Gn]),s1.current.register([dn,zn],{current:t,target:t,color:p,noteText:p}),y_.current.register([kn,yn],[dt],[Nn,Un,"explode","visibleInLegend","visible",Gn]),[Nn,dt,y,v]),Jl="mousemove",tc="contextmenu",ec="mouseleave",ic="keydown",l;function g(t,e,i,o){var r=this,o=(void 0===o&&(o={}),Kl.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new $x(this,o),this.chartService.theme=i,this._initElement(t),x({},this.options,e));this._originalOptions=x({},o),this._theme=i,this._initTheme(o,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),Bx.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function oc(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function rc(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 nc(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}(Kl=w.Class)&&(g.__proto__=Kl),((g.prototype=Object.create(Kl&&Kl.prototype)).constructor=g).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");t.firstChild;)t.removeChild(t.firstChild);this.element=t},g.prototype._setElementClass=function(t){mt(t,"k-chart")},g.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i;for(var n=t,s=$l,a=0;a<s.length;a++){var h=s[a]+"Axes";n[h]&&(n[s[a]+"Axis"]=n[h],delete n[h])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,kt(t.title)&&(t.title={text:t.title}),this.options=x({},e,t),this.applySeriesColors()},g.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)}},g.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&be(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},g.prototype._resize=function(){this._noTransitionsRedraw()},g.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},g.prototype.getAxis=function(t){return zr(t,this._plotArea.axes)},g.prototype.findAxisByName=function(t){return this.getAxis(t)},g.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new d_(e[i])},g.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new d_(e[t])},g.prototype.plotArea=function(){return new f_(this._plotArea)},g.prototype.toggleHighlight=function(t,e){var i,o,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=Tt(e)?r.filterPoints(e):(It(e)?(i=e.series,o=e.category):i=o=e,n.type===yn?oc(r.pointsBySeriesName(i),o):u(n.type,[kn,vn,mn])?oc((r.charts[0]||{}).points,o):r.pointsBySeriesName(i));e&&this.togglePointsHighlight(t,e)},g.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},g.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;Tt(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&T(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(n=this._plotArea.pointsByCategoryIndex(i),r.showAt(n)):e&&r.show(e)},g.prototype.hideTooltip=function(){this._tooltip.hide()},g.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&oe(e,{width:i.width}),i.height&&oe(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=w.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},g.prototype._surfaceWrap=function(){return this.element},g.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 b1,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),pc(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},g.prototype._redrawFocusHighlight=function(){var t=this._focusState,e=t.legendInFocus,t=t.preserveHighlight;e&&t&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)},g.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,t=kt(t)?t:t.description||t.text;t&&this.element.setAttribute("aria-roledescription",t)},g.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(i=this.options,t=x({},t.options,{chartArea:{width:t.width,height:t.height}}),hc(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),pc(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},g.prototype._sharedTooltip=function(){return this._plotArea instanceof _1&&this.options.tooltip&&this.options.tooltip.shared},g.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new w1(this._plotArea,t.pannable))},g.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new k1(this,e))},g.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new S1(this,e))},g.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==i||this.requiresHandlers([es,Jn,ts])),i=(!1===e||!1===o)&&!this.requiresHandlers([is,os,rs]),e=this.element;this._dragZoomEnabled&&t&&i?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&i||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!i)},g.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom)&&i.toggleZoom(e)},g.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new E1(this.chartService,t)},g.prototype._createSharedTooltip=function(t){return new R1(this._plotArea,t)},g.prototype.applyDefaults=function(t,e){var i,o,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||o.color,e=x({},s,s[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[i],e}for(var h=0;h<$l.length;h++)o=n.axisDefaults||{},r=(r=[].concat(n[i=$l[h]+"Axis"])).map(a),n[i]=1<r.length?r:r[0];var p=t,t=e,l=p.series,c=l.length,u=p.seriesDefaults,d=x({},p.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);rc(d),rc(g);for(var y=0;y<c;y++){var v=l[y].type||p.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:p.tooltip},d,u[v]);l[y]._defaults=v,l[y]=x({},v,l[y]),l[y].data=l[y].data||[]}},g.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},g.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new Nx(this._modelOptions()),o=(i.chart=this,i._plotArea=e,Yx.buildTitle(t.title)),r=Yx.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return i.append.apply(i,Yx.orderTitles([o,r])),t.legend&&t.legend.visible&&(o=new I1(e.options.legend,this.chartService),i.append(o),i._legend=o),i.append(e),i.reflow(),i},g.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return x({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},g.prototype._createPlotArea=function(t){var e=this.options;return B1.current.create(t?[]:e.series,e,this.chartService)},g.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof e_&&n.select&&!n.vertical&&(o=r.range(),r=new L1(this,r,x({min:o.min,max:o.max},n.select)),e.push(r))}},g.prototype._selectStart=function(t){return this.trigger(ns,t)},g.prototype._select=function(t){return this.trigger(ss,t)},g.prototype._selectEnd=function(t){return this.trigger(as,t)},g.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._mousemove=(0,w.throttle)(this._mousemove.bind(this),20)},g.prototype.addObserver=function(t){t&&this.observers.push(t)},g.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},g.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},g.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===hs?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Zn?this._updateDrilldownPoint(e.point):t===Qn?this._resetDrilldownPoint():t===Yn?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===Xn&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},g.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,te(e,((t={})[tc]=this._clickHandler,t[ds]=this._mousewheelHandler,t[ec]=this._mouseleaveHandler,t[ic]=this._keydownHandler,t.mousedown=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&te(e,((t={})[Jl]=this._mousemove,t)),this.domEvents=Jx.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()},g.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger($n)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},g.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},g.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},g.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(rs,{}))},g.prototype._gesturechange=function(t){var e,i,o=this._mousewheelZoom;o&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e))&&(e=Math.round(10*e),this._gestureDistance=t.distance,i={delta:e,axisRanges:nc(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger(is,i)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(i.axisRanges=o.updateRanges(e,t))&&!this.trigger(os,i)&&o.zoom()))},g.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},g.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([es,Jn,ts])&&this._startNavigation(t,e,es),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(is,{axisRanges:nc(this._plotArea.axes),originalEvent:t})},g.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(Jn,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,h=n[s];h.options.name&&0!=(a=(a=h.options.vertical?t.y:t.x).startLocation-a.location)&&(r[h.options.name]=h.translateRange(a))}e.axisRanges=r,this.trigger(Jn,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},g.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(ts,{axisRanges:nc(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,ts),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(os,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(rs,{axisRanges:e,originalEvent:t})))},g.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},g.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return O(t.rate,.3)},g.prototype._mousewheel=function(t){var e=this,i=Kt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:nc(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(is,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger(os,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(rs,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=o||this._startNavigation(t,r,is)?o:this._navState){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,h={},p=0;p<a.length;p++){var l=a[p],c=l.options.name;c&&(h[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(os,{delta:i,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,rs)},150)}}},g.prototype._startNavigation=function(t,e,i){var o,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(o=nc(r),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:o,pane:e,axes:r}))},g.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},g.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},g.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),o=i&&(o=o.closest(i))&&o.aliasFor?o.aliasFor():o},g.prototype._eventCoordinates=function(t){t=re(t);return this._toModelCoordinates(t.x,t.y)},g.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=Et(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},g.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=ie(this.element);return{left:M(t.x+e.left+i.left),top:M(t.y+e.top+i.top)}},g.prototype._toModelCoordinates=function(t,e){var i=this.element,o=ie(i),r=this._elementPadding(),i=Ae(i).invert(),t=new w.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new L(t.x,t.y)},g.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},g.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},g.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},g.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===C||t===S)},g.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},g.prototype._keydown=function(t){var e,i=this._focusState,o=i.legendInFocus,i=i.focusedElement,r=this._legend;"Tab"===t.key?(this._clearFocusedElement(),e=this._isLegendBeforeChart(),o&&e!==t.shiftKey?this._navigatePoints(t):!o&&e===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)):"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)},g.prototype._navigatePoints=function(e){var i=this,o=this._focusState,t=this._plotArea;if(o.legendInFocus=!1,o.focusedElement){var r=function(t){o.focusedPoint=t,i._focusElement(o.focusedPoint),i._displayTooltip(t),e.preventDefault()};switch(e.key){case X:r(t.getPointToTheRight(o.focusedPoint));break;case W:r(t.getPointToTheLeft(o.focusedPoint));break;case G:r(t.getPointBelow(o.focusedPoint));break;case N:r(t.getPointAbove(o.focusedPoint))}}else this._focusFirstPoint(),e.preventDefault()},g.prototype._navigateLegend=function(e){var i=this,o=this._focusState,t=this._legend,r=this.chartService.rtl;if(o.legendInFocus=!0,o.focusedElement){var n=t.getItems().length,s=function(t){o.focusedLegendItemIndex=t(o.focusedLegendItemIndex,n),i._focusElement(i._getFocusedLegendItem()),e.preventDefault()};switch(e.key){case N:case W:s(r?At:Ct);break;case G:case X:s(r?Ct:At)}}else this._focusFirstLegendItem(),e.preventDefault()},g.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},g.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},g.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},g.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},g.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},g.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},g.prototype._focusLegendItem=function(e){var t=this._focusState;t.focusedLegendItemIndex=this._legend.getItems().findIndex(function(t){return t.options.series.index===e.seriesIndex&&t.options.pointIndex===e.pointIndex}),t.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},g.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},g.prototype._focusElement=function(t,e){var i=this._focusState;this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e)&&(t.focusVisual(),i.legendInFocus?(e=t.options,this._showSeriesInactiveOpacity(e.series.index,e.pointIndex)):this._showInactiveOpacity(t))},g.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},g.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(Y,t._id)},g.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(Y)},g.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility,t=(e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription),i.ariaChecked);return T(t)&&e.setAttribute("aria-checked",t),e},g.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},g.prototype._startHover=function(t,e){var i;return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof o1)}),i=this._activePoint,this._updateHoveredPoint(t,e),t&&i!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),this._showInactiveOpacity(t))),t)},g.prototype._displayTooltip=function(t){x({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},g.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},g.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);o&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,o))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},g.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},g.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},g.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},g.prototype._updateDrilldownPoint=function(t){t&&t.series&&y_.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},g.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},g.prototype._startDrilldown=function(t){var e,i;t&&t.series&&(e=t.series,i=y_.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:i,sender:this})},g.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},g.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&(a.highlight||{}).visible&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},g.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},g.prototype._showInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},g.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;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)},g.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},g.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},g.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},g.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),te(document,((t={})[Jl]=this._mouseMoveTrackHandler,t)))},g.prototype._mouseMoveTracking=function(t){var e=this.options,i=this._tooltip,o=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&((this._activePoint=n).hover(this,t)||(x({},e.tooltip,n.options.tooltip).visible&&i.show(n),o.show(n))):(le(document,((t={})[Jl]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},g.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(e),i.hover&&((i=i.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger($n))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},g.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},g.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,h,p;this._suppressHover||(o=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&i?((p=(h=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=h,0<a.length&&!this.trigger(qn,p)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},g.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},g.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()},g.prototype._deferRedraw=function(){this._redraw()},g.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},g.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},g.prototype.bindCategoryAxisFromSeries=function(i,e){var o=this,r=new Set,t=this.options.series.filter(function(t){return t.categoryAxis===i.name||!t.categoryAxis&&0===e}),n=t.some(function(t){return Boolean(t.categoryField)}),t=t.filter(function(t){return t.data&&0<t.data.length}),s=t.map(function(t){return y_.current.bindPoint(t,0).fields.category}),a=s.reduce(function(t,e){return t||Os(i,e)},!1);t.filter(function(t,e){return t.categoryField||T(s[e])}).forEach(function(i){return i.data.forEach(function(t,e){e=y_.current.bindPoint(i,e).fields.category;a&&(e=(t=Ps(e,t,o.chartService.intl))?t.getTime():void 0),r.add(e)})}),0<r.size?(t=Array.from(r.values()),a&&(t=t.sort().map(function(t){return t&&new Date(t)})),i.categories=t):n&&(i.categories=[])},g.prototype._isBindable=function(t){for(var e=y_.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===dt?r="field":r+="Field",!T(t[r])){i=!1;break}}return i},g.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},g.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},g.prototype._showSeriesInactiveOpacity=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[kn,yn,vn,mn])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},g.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Kn,$n])},g.prototype.updateMouseMoveHandler=function(){var t;le(this.element,((t={})[Jl]=this._mousemove,t)),this._shouldAttachMouseMove()&&te(this.element,((t={})[Jl]=this._mousemove,t))},g.prototype.applyOptions=function(t,e){hc(this._originalOptions,t),this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},g.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},g.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},g.prototype.setIntlService=function(t){this.chartService.intl=t},g.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},g.prototype.destroy=function(){var t;this._destroyed=!0,le(this.element,((t={})[tc]=this._clickHandler,t[ds]=this._mousewheelHandler,t[Jl]=this._mousemove,t[ec]=this._mouseleaveHandler,t[ic]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&le(document,((t={})[Jl]=this._mouseMoveTrackHandler,t)),this._focusState=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},g.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},g.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},g.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)};var sc,ac=["data","categories"];function hc(t,e){for(var i in e){var o,r,n;!u(i,ac)&&Be(e,i)&&(o=e[i],r=t[i],T(r))&&((n=null===o)||!T(o)?(delete t[i],n&&delete e[i]):r&&It(o)&&It(r)&&hc(r,o))}}function pc(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}i(l=g,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{highlight:{border:{opacity:1,color:q,width:2}}}},categoryAxis:{},seriesDefaults:{type:gn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{highlight:{border:{opacity:1,width:2},zIndex:200}}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const cb=l;function lc(){sc.apply(this,arguments)}(sc=R1)&&(lc.__proto__=sc),((lc.prototype=Object.create(sc&&sc.prototype)).constructor=lc).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new L(this.plotArea.box.x2,e.center().y):new L(e.center().x,-2),align:o}},lc.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const ub=lc;var cc=[ln,dn],uc,dc,c,fc,h;function gc(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function yc(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function vc(t){return m(t)?[t]:t}function mc(){uc.apply(this,arguments)}(uc=cb)&&(mc.__proto__=uc),((mc.prototype=Object.create(uc&&uc.prototype)).constructor=mc).prototype._setElementClass=function(t){mt(t,"k-sparkline")},mc.prototype._initElement=function(t){uc.prototype._initElement.call(this,t),this._initialWidth=Math.floor(oe(t).width)},mc.prototype._resize=function(){var t=this.element,e=gc(t.childNodes);this._initialWidth=Math.floor(oe(t).width),yc(t.childNodes,e),uc.prototype._resize.call(this)},mc.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=gc(e.childNodes),o=document.createElement("span"),t=(o.innerHTML="&nbsp;",e.appendChild(o),x({width:this._autoWidth,height:oe(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return oe(e,{width:t.width,height:t.height}),e.removeChild(o),yc(e.childNodes,i),this.surface&&this.surface.resize(),t},mc.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},mc.prototype._createPlotArea=function(t){t=uc.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},mc.prototype._calculateWidth=function(t){for(var e=this.options,i=P(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],h=(a.options.series||[])[0];if(h){if(h.type===ln)return 150;if(h.type===dn)return 150;if(h.type===kn)return oe(r).height;var p=a.categoryAxis;p&&(p=p.categoriesCount()*(!a.options.isStacked&&u(h.type,[gn,zn])?a.seriesOptions.length:1),n=Math.max(n,p))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},mc.prototype._createSharedTooltip=function(t){return new ub(this._plotArea,t)},mc.normalizeOptions=function(t){t=vc(t);return(t=vt(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:vc(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,cc)||u(t.seriesDefaults.type,cc)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t},i(c=mc,{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 db=c;function xc(){dc.apply(this,arguments)}(dc=w.drawing.Animation)&&(xc.__proto__=dc),((xc.prototype=Object.create(dc&&dc.prototype)).constructor=xc).prototype.setup=function(){this._initialOpacity=parseFloat(Et(this.element,"opacity").opacity)},xc.prototype.step=function(t){Et(this.element,{opacity:String(Wt(this._initialOpacity,0,t))})},xc.prototype.abort=function(){dc.prototype.abort.call(this),Et(this.element,{display:"none",opacity:String(this._initialOpacity)})},xc.prototype.cancel=function(){dc.prototype.abort.call(this),Et(this.element,{opacity:String(this._initialOpacity)})};const fb=xc;function _c(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}function bc(t,e,i){fc.call(this),this.options=x({},this.options,i),this.container=t,this.chartService=e;i=Et(t,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),t.appendChild(this.element)}(fc=w.Class)&&(bc.__proto__=fc),((bc.prototype=Object.create(fc&&fc.prototype)).constructor=bc).prototype.createElements=function(){var t=this.element=_c("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=_c("k-tooltip k-chart-tooltip"),i=this.scroll=_c("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},bc.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Uo(Zo(t)+Zo(e-t)/2),h=.4*i.width(),p=i.center().x-h,l=(i.center().x-p)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=zt(r),r=(this.clearHideTimeout(),this._visible||(Et(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,Et(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),Et(s,["marginTop","borderTopWidth","height"]));Et(n,{width:h,left:p+a*l,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),Et(o,{visibility:"visible"})},bc.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},bc.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new fb(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},bc.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},i(h=bc,{format:"{0:d} - {1:d}",hideDelay:500});const gb=h;var wc,kc="_navigator",Sc=kc,Ac="_default",Cc,o;function Pc(t){wc.call(this),this.chart=t;var e=this.options=x({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),T(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Ix(this,((i={})[Jn]="_drag",i[ts]="_dragEnd",i[os]="_zoom",i[rs]="_zoomEnd",i)),t.addObserver(this.chartObserver)}function Tc(){}(wc=w.Class)&&(Pc.__proto__=wc),((Pc.prototype=Object.create(wc&&wc.prototype)).constructor=Pc).prototype.parseDate=function(t){return tr(this.chart.chartService.intl,t)},Pc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Pc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Pc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Pc.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,o=o.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,h=(Tc.prototype=i,new Tc);0!==i.categoriesCount()&&(this.clean(),h.box=i.box,this.selection=new L1(t,h,{min:r,max:o,from:s||r,to:a||o,mousewheel:O(n,{zoom:"left"}),visible:e.visible},new Ix(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new gb(t.element,t.chartService,{min:r,max:o,template:zt(e.hint),format:e.hint.format}))},Pc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Sc].roundedRange(),e=t.min,t=t.max,i=this.options.select||{},o=i.from||e,r=i.to||t;this.options.select=x({},i,{from:o=o<e?e:o,to:r=t<r?t:r}),this.filterAxes()},Pc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(ae(e.panes),t)},Pc.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==kc});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},Pc.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(o),o=e._plotArea.categoryAxis,e=t.axisRanges[o.options.name],t=this.options.select;e&&!r&&i&&(o=t.from&&t.to?Zo(t.to)-Zo(t.from):Zo(i.options.to)-Zo(i.options.from),r=Uo(_(Zo(e.min),n.min,Zo(n.max)-o)),t=Uo(_(Zo(r)+o,Zo(n.min)+o,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(r,t),this.showHint(r,t))},Pc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Pc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},Pc.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,i=(t=void 0===t?{}:t).from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==kc&&(n.min=i,n.max=o)}},Pc.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:o.from,to:o.to},"category"!==e.options.type&&(e=new i_(x({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,t.from=Go(e.min,-e.baseUnitStep,e.baseUnit),t.to=Go(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},Pc.prototype._zoom=function(t){var e,i,o=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),h=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),i=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<a-e?(r.zoom(h,i),this.readSelection()):(o.options.min=s.from,s.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),i).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},Pc.prototype._zoomEnd=function(t){this._dragEnd(t)},Pc.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},Pc.prototype._selectStart=function(t){return this.chart._selectStart(t)},Pc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Pc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Pc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Sc]},Pc.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},Pc.setup=function(t,e){var i,o,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,i=x({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=x({},i.pane,{name:kc}),i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach(function(t){t.name=t.name||Ac}),Pc.attachAxes(t,i),Pc.attachSeries(t,i,e))},Pc.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),i=(o.concat(t).forEach(function(t){t.pane=t.pane||Ac}),0===As(i,Hn).length),i=x({type:"date",pane:kc,roundToBaseUnit:!i,justified:i,_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]}}),r=e.categoryAxis;o.push(x({},i,{maxDateGroups:200},r,{name:Sc,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},i,r,{name:Sc+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},i,r,{name:Sc+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Sc,pane:kc,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Pc.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(x({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Sc,categoryAxis:Sc,autoBind:e.autoBindElements}))};const yb=Pc;function Mc(){Cc.apply(this,arguments)}(Cc=cb)&&(Mc.__proto__=Cc),((Mc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Mc).prototype.applyDefaults=function(t,e){var i=oe(this.element).width||600,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&x({},e,i);yb.setup(t,e),Cc.prototype.applyDefaults.call(this,t,e)},Mc.prototype._setElementClass=function(t){mt(t,"k-chart k-stockchart")},Mc.prototype.setOptions=function(t){this.destroyNavigator(),Cc.prototype.setOptions.call(this,t)},Mc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Mc.prototype._resize=function(){this.noTransitionsRedraw()},Mc.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Mc.prototype._dirty=function(){var t=this.options,t=Ut([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Mc.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new yb(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Cc.prototype._redraw.call(this),t.initSelection()},Mc.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===kc?this._unsetActivePoint():Cc.prototype._trackSharedTooltip.call(this,t)},Mc.prototype.bindCategories=function(){Cc.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Mc.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===Sc?t=o.categories:t&&o.pane===kc&&(o.categories=t)}},Mc.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Mc.prototype.destroy=function(){this.destroyNavigator(),Cc.prototype.destroy.call(this)},Mc.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Cc.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===kc},Mc.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},i(o=Mc,{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 vb=o;var Oc="arrowPointer",Ic="barPointer",Bc=Math.PI/180,Lc="inside",e="linear",Ec="outside",t="radialPointer",p="radialRangePointer";function Rc(t,e){var i=t.getOrigin(),o=t.getSize(),e=P(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var Vc=w.drawing.Group,zc=w.drawing.Path,jc=w.drawing.Text;function Dc(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=zc.fromRect(new w.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new jc(t.text,new w.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=Rc(t.bbox().clone(),e.padding),e=zc.fromRect(o,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),o=new Vc;return o.append(i),o.append(e),o.append(t),o}function Fc(t,e,i){var o=T(t.from)?t.from:st,r=T(t.to)?t.to:nt;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Hc(t,e){e=P(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Rc(t,e)}var Uc,Nc=w.drawing.Path,Gc=w.drawing.Surface,Un;function Wc(t,e,i,o){void 0===o&&(o={}),Uc.call(this),this.element=t,this.theme=i,this.contextService=new $x(this,o),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(i),this.redraw()}(Uc=w.Class)&&(Wc.__proto__=Uc),((Wc.prototype=Object.create(Uc&&Uc.prototype)).constructor=Wc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},Wc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},Wc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},Wc.prototype.exportVisual=function(){return this._visuals},Wc.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(vt(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},Wc.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},Wc.prototype.resize=function(){this.noTransitionsRedraw()},Wc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},Wc.prototype.redraw=function(){var t=this._surfaceSize(),t=new w.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),Hc(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},Wc.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},Wc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},Wc.prototype.setIntlService=function(t){this.contextService.intl=t},Wc.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=x({},e,this.options),this.options),i=t.pointer;if(vt(i)){for(var o=[],r=0;r<i.length;r++)o.push(x({},e.pointer,i[r]));t.pointer=o}},Wc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new w.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=Hc(e,i.width)),Nc.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},Wc.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();oe(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Gc.create(i,{type:t.renderAs}))},Wc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},Wc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},Wc.prototype.getSize=function(){return this._getSize()},Wc.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},Wc.prototype._defaultSize=function(){return{width:200,height:200}},Wc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},i(Un=Wc,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const mb=Un;var Xc=w.drawing.Path,Yc=w.drawing.Group,qc=w.geometry.Point,Zc,Gn,Qc,Nn,Kc,l,c,$c,h;function Jc(t,e,i,o){var r,n,s,a,h,p,l=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<l;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,p=h=a=s=void 0,a=(r=i).position,h=i.tickX,p=i.tickY,r=i.vertical?(s=new qc(h,a),new qc(h+n.size,a)):(s=new qc(a,p),new qc(a,p+n.size)),new Xc({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}function tu(t,e){t=t||{};!T(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Zc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}(Zc=o_)&&(tu.__proto__=Zc),((tu.prototype=Object.create(Zc&&Zc.prototype)).constructor=tu).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ze(t.min,t.max),t},tu.prototype.initFields=function(){},tu.prototype.render=function(){var t=this.elements=new Yc,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},tu.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Yc,a=n.length,h=t.rangeSize||t.minorTicks.size/2,p=0;p<a;p++){var l=Fc(n[p],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(Xc.fromRect(new w.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},tu.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Yc,o=0;o<t.length;o++)i.append(Dc(t[o],e.labels));return i},tu.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Yc;return 0<t.width&&t.visible&&((t=new Xc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},tu.prototype.renderTicks=function(){var t=new Yc,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Jc(t,this.getMajorTickPositions(),o,e.majorTicks),Jc(t,this.getMinorTickPositions(),o,x({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},i(Gn=tu,{min:0,max:50,majorTicks:{size:15,align:Lc,color:q,width:.5,visible:!0},minorTicks:{size:10,align:Lc,color:q,width:.5,visible:!0},line:{width:.5},labels:{position:Lc,padding:2},mirror:!1,_alignLines:!1});const xb=Gn;function eu(t,e){Qc.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=x({},this.options,e);e.fill=e.color,this.scale=t,T(e.value)?e.value=_(e.value,o,i):e.value=o}function iu(t,e){Kc.call(this,t,e),this.options=x({track:{visible:T(e.track)}},this.options)}(Qc=w.Class)&&(eu.__proto__=Qc),((eu.prototype=Object.create(Qc&&Qc.prototype)).constructor=eu).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=T(e._oldValue)?e.value:o,e.value=_(t,o,i),this.elements&&this.repaint()},i(Nn=eu,{color:q}),(Kc=l=Nn)&&(iu.__proto__=Kc),((iu.prototype=Object.create(Kc&&Kc.prototype)).constructor=iu).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=o.track.size||o.size,h=o.size/2,p=P(o.margin),p=n?p[s?"left":"right"]:p[s?"bottom":"top"],p=s?-p:p;n?(i=new E(r.x1+p,r.y1,r.x1+p,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==Ic&&(t=e=new E(r.x2+p,r.y1-h,r.x2+p,r.y2+h))):(i=new E(r.x1,r.y1-p,r.x2,r.y1-p),s?i.y2+=a:i.y1-=a,o.shape!==Ic&&(t=e=new E(r.x1-h,r.y1-p,r.x2+h,r.y1-p))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},iu.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:T(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},iu.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,i=t.mirror,t=t.vertical,e=P(e.margin);return t?e[i?"left":"right"]:e[i?"bottom":"top"]},i(c=iu,{shape:Ic,track:{border:{width:1}},color:q,border:{width:1},opacity:1,margin:P(3),animation:{type:Ic},visible:!0});const _b=c;function ou(){$c.apply(this,arguments)}($c=w.drawing.Animation)&&(ou.__proto__=$c),((ou.prototype=Object.create($c&&$c.prototype)).constructor=ou).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e),this.fromScale=new w.geometry.Point(i.x1,i.y1)),n=this.toScale=new w.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},ou.prototype.step=function(t){var e=Wt(this.fromScale.x,this.toScale.x,t),t=Wt(this.fromScale.y,this.toScale.y,t);this.element.transform(w.geometry.transform().translate(e,t))},i(h=ou,{easing:e,duration:250}),w.drawing.AnimationFactory.current.register(Oc,h);const bb=h;var ru,nu=w.geometry.Point,su=w.drawing.Path,au,o;function hu(t,e){ru.call(this,t,e),T(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(ru=_b)&&(hu.__proto__=ru),((hu.prototype=Object.create(ru&&ru.prototype)).constructor=hu).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new nu(0,0-i),new nu(0-o*e,0),new nu(0,0+i)]:[new nu(0-i,0),new nu(0,0+o*e),new nu(0+i,0)]},hu.prototype.repaint=function(){var t=this.scale,e=this.options,t=new bb(this.elements,x(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},hu.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=Oc,new su({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close()),o=t.getSlot(e.value);return i.transform(w.geometry.transform().translate(o.x1,o.y1)),this.elements=i};const wb=hu;function pu(){au.apply(this,arguments)}(au=w.drawing.Animation)&&(pu.__proto__=au),((pu.prototype=Object.create(au&&au.prototype)).constructor=pu).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},pu.prototype.step=function(t){t=Wt(this.from,this.to,t);this._set(t)},pu.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},i(o=pu,{easing:e,speed:250}),w.drawing.AnimationFactory.current.register(Ic,o);const kb=o;var lu,cu=w.drawing.Group,uu=w.drawing.Path;function du(t,e){lu.call(this,t,e),T(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(lu=_b)&&(du.__proto__=lu),((du.prototype=Object.create(lu&&lu.prototype)).constructor=du).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,o=o.vertical,r=r===o?-1:1,i=i.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=o?v:y,s=o?y:v,r=this._margin()*r,a=new w.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new w.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],o?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return o?(t.translate(i,0),e.translate(i,0)):(t.translate(0,i),e.translate(0,i)),[a,n,t,e]},du.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue),o=(o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close(),new kb(o,x(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]})));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},du.prototype.render=function(){var t=new cu,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new uu({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},du.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new uu.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const Sb=du;var fu,gu=w.drawing.Group,Un;function yu(){fu.apply(this,arguments)}(fu=mb)&&(yu.__proto__=fu),((yu.prototype=Object.create(fu&&fu.prototype)).constructor=yu).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new E(i,o,i+t.width(),o+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},yu.prototype._buildVisual=function(){var t=new gu,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},yu.prototype._createModel=function(){var t=this.options,e=this.scale=new xb(t.scale,this.contextService);this.pointers=[];for(var i=vt(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=x({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?wb:Sb;this.pointers.push(new n(e,r))}},yu.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},yu.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new E(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new E(t.x1,r.y-e,t.x2,r.y+e))},yu.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new E(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new E(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},yu.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},yu.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},i(Un=yu,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const Ab=Un;var vu=w.drawing.Arc,mu=w.drawing.Path,xu=w.drawing.Group,_u,Gn,bu,Nn;function wu(t,e,i,o){var r=new xu,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),p=new w.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new mu({stroke:{color:o.color,width:o.width}}).moveTo(h).lineTo(p))}return r}function ku(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}function Su(t,e){_u.call(this,0,1,t,e)}(_u=o_)&&(Su.__proto__=_u),((Su.prototype=Object.create(_u&&_u.prototype)).constructor=Su).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||Ze(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Su.prototype.initFields=function(){},Su.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Su.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!T(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Su.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-i)/(o-i)*s:(t-i)/(o-i)*s+n)+180},Su.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Su.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,i=0;return e.visible&&(i=e.size),i=t.visible?Math.max(t.size,i):i},Su.prototype.labelsCount=function(){var t=_u.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Su.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new xu,s=.05*i,a=(T(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),h=a.position===Lc,p=T(this.labelElements);h&&(i-=this.ticksSize(),this.hasRanges()&&!p&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,c=l.length,r=P(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=o[f],x=(m-180)*Bc,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(h?1:-1),m=m.y+Math.sin(x)*(v+d)*(h?1:-1),x=(g.reflow(new E(_-y,m-v,_+y,m+v)),new w.geometry.Point(g.box.x1,g.box.y1)),_=void 0;p?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||w.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=Dc(g,t.labels),n.append(_)),this.bbox=w.geometry.Rect.union(this.bbox,_.bbox())}return n},Su.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,e=e.rangeSize,o=this.getRangeRadius();this.options.labels.position===Lc&&(o+=e+i);for(var r=o+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=w.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Su.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new xu;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var h=t[a],p=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-p!=0&&i.append(this.createRange(p,l,s,h))}}return i},Su.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,i=new w.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new vu(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},Su.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(ku(r,n,s));for(var a=0;a<i;a++)for(var h=Fc(e[a],r,n),p=o.length,l=0;l<p;l++){var c=o[l];if(c.from<=h.from&&h.from<=c.to){o.push(ku(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&o.push(ku(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return o},Su.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Ec?t.getRadiusX()-r-o-i:t.getRadiusX()-i},Su.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new w.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},Su.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=wu(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new xu),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===Ec&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=wu(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},Su.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},Su.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;o&&(a+=n,h=-h),360<=n&&i.max%e==0&&--s;for(var p=[],l=0;l<s;l++)p.push(M(a,Q)),a+=h;return M(a)<=t.endAngle&&p.push(a),p},Su.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)},Su.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===Ec&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,p=a.x-h[0].anchor().x,a=a.y-h[0].anchor().y;t[s].transform((new w.geometry.transform).translate(p,a))}},i(Gn=Su,{min:0,max:100,majorTicks:{size:15,align:Lc,color:q,width:.5,visible:!0},minorTicks:{size:10,align:Lc,color:q,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Lc,padding:2}});const Cb=Gn;function Au(t,e){bu.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}(bu=w.drawing.Animation)&&(Au.__proto__=bu),((Au.prototype=Object.create(bu&&bu.prototype)).constructor=Au).prototype.step=function(t){var e=this.options,t=Wt(e.oldAngle,e.newAngle,t);this.element.transform(w.geometry.transform().rotate(t,e.center))},i(Nn=Au,{easing:e,duration:150}),w.drawing.AnimationFactory.current.register(t,Nn);const Pb=Nn;var Cu,Pu=w.drawing.Circle,Tu=w.drawing.Group,Mu=w.drawing.Path,c;function Ou(){Cu.apply(this,arguments)}(Cu=l)&&(Ou.__proto__=Cu),((Ou.prototype=Object.create(Cu&&Cu.prototype)).constructor=Ou).prototype.setAngle=function(t){this.elements.transform(w.geometry.transform().rotate(t,this.center))},Ou.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new Pb(this.elements,x(e.animation,{oldAngle:i,newAngle:t})).play()},Ou.prototype.render=function(){var t=this.scale,e=this.options,i=new Tu;return!1!==e.animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Bc),i},Ou.prototype.reflow=function(t){var e=this.center=t.center,i=_(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(t*this.options.cap.size);this.bbox=w.geometry.Rect.fromPoints(new w.geometry.Point(e.x-i,e.y-i),new w.geometry.Point(e.x+i,e.y+i))},Ou.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Mu({fill:{color:i},stroke:{color:i,width:.5}});return i.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),i},Ou.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new w.geometry.Circle(this.center,this.capSize);return new Pu(e,{fill:{color:t},stroke:{color:t}})},i(c=Ou,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:t,duration:150}});const Tb=c;var Iu,Bu=w.drawing.Group,h,Lu,o,Eu,Un,Ru,Vu,zu,Gn,ju,Nn;function Du(){Iu.apply(this,arguments)}(Iu=mb)&&(Du.__proto__=Iu),((Du.prototype=Object.create(Iu&&Iu.prototype)).constructor=Du).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=w.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},Du.prototype._buildVisual=function(t,e,i){var o=this._visuals=new Bu;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Du.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},Du.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),h=M(a,Q),p=M(-a,Q),l=0,c=0;!(!(c++<100)||5<(l=n===o?l+1:0)||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||p!==r&&0<=(o=this.getPlotBox(p,t,s))&&o<=2||(r=0<e&&0<o?2*h:e<0&&o<0?2*p:M((h+p)/2||1,Q),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(p=r,o=i):(h=r,e=i)},Du.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=w.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},Du.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Du.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,e=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=w.geometry.Rect.union(r.bbox,n[s].bbox)},Du.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Cb(t.scale,this.contextService);this.pointers=[];for(var o=vt(e)?e:[e],r=0;r<o.length;r++){var n=new Tb(i,x({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},i(h=Du,{transitions:!0,gaugeArea:{background:""}});const Mb=h;function Fu(){Lu.apply(this,arguments)}(Lu=Cb)&&(Fu.__proto__=Lu),((Fu.prototype=Object.create(Lu&&Lu.prototype)).constructor=Fu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},Fu.prototype.hasRanges=function(){return!0},Fu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},Fu.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),o=this.slotAngle(o?t:e),t=this.createRange(r,o,this.getRangeRadius(),i);return this.ranges.append(t),t},i(o=Fu,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const Ob=o;function Hu(t,e){Eu.call(this,t,e);var e=this.options,i=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=_(i,150,800),t.elements.options.get("stroke.color")),i=t.currentColor();e!==i&&(this.startColor=new w.Color(e),this.color=new w.Color(i))}(Eu=w.drawing.Animation)&&(Hu.__proto__=Eu),((Hu.prototype=Object.create(Eu&&Eu.prototype)).constructor=Hu).prototype.step=function(t){var e,i=this.options,o=this.startColor,r=this.color,i=Wt(i.oldAngle,i.newAngle,t);this.element.angle(i),r&&(i=M(Wt(o.r,r.r,t)),e=M(Wt(o.g,r.g,t)),o=M(Wt(o.b,r.b,t)),this.element.stroke(new w.Color(i,e,o).toHex()))},i(Un=Hu,{easing:e,duration:150}),w.drawing.AnimationFactory.current.register(p,Un);const Ib=Un;function Uu(){Ru.apply(this,arguments)}(Ru=l)&&(Uu.__proto__=Ru),((Uu.prototype=Object.create(Ru&&Ru.prototype)).constructor=Uu).prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Ib(this,x(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},Uu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},Uu.prototype.stroke=function(t){this.elements.stroke(t)},Uu.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&x(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}))},Uu.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,t=this.options,o=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(o)for(var s=0;s<o.length;s++){var a=o[s],h=a.color,p=a.from,a=(void 0===p&&(p=e),a.to);if(void 0===a&&(a=i),p<=n&&n<=a)return h}return r},Uu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},i(Gn=Uu,{animation:{type:p,duration:150}});const Bb=Gn;function Nu(){Vu.apply(this,arguments)}(Vu=Mb)&&(Nu.__proto__=Vu),((Nu.prototype=Object.create(Vu&&Vu.prototype)).constructor=Nu).prototype._initTheme=function(t){Vu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Nu.prototype._createModel=function(){var t=this.options,e=this.scale=new Ob(t.scale,this.contextService),e=new Bb(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Nu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},Nu.prototype._setValueOptions=function(t){this.options.value=t},Nu.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Nu.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,o=o.y-e/2;return t<i.width&&(t=r+t,r=Math.max(r,0),t>i.width)&&(r-=t-i.width),e<i.height&&(i=(t=this.scale.bbox).bottomRight().y,e=o+e,o=Math.max(o,t.origin.y),i<e)&&(o-=e-i),{left:r,top:o}};const Lb=Nu;function Gu(){zu.apply(this,arguments)}(zu=Lb)&&(Gu.__proto__=zu),((Gu.prototype=Object.create(zu&&zu.prototype)).constructor=Gu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,zu.prototype._createModel.call(this)};const Eb=Gu;function Wu(t){ju.call(this),this.setOptions(t),this.initProperties()}(ju=w.Class)&&(Wu.__proto__=ju),((Wu.prototype=Object.create(ju&&ju.prototype)).constructor=Wu).prototype.initProperties=function(){},Wu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},Wu.prototype.encode=function(t,e,i){t=T(t)?String(t):t;return this.initValue(t,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},Wu.prototype.initValue=function(){},Wu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},Wu.prototype.addData=function(){},Wu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},i(Nn=Wu,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Xu,Yu=Object.assign,t;function qu(){Xu.apply(this,arguments)}(Xu=Nn)&&(qu.__proto__=Xu),((qu.prototype=Object.create(Xu&&Xu.prototype)).constructor=qu).prototype.initProperties=function(){Xu.prototype.initProperties.call(this),Yu(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"})},qu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},qu.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},qu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},qu.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength&&(i=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=i,this.addPattern(this.characterMap[i]))},qu.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},qu.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},qu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},qu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},qu.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},i(t=qu,{addCheckSum:!0});var Zu,Qu,Ku=Object.assign,c,h;function $u(){Zu.apply(this,arguments)}function Ju(){Qu.apply(this,arguments)}(Qu=Nn)&&(Ju.__proto__=Qu),((Ju.prototype=Object.create(Qu&&Qu.prototype)).constructor=Ju).prototype.initProperties=function(){Qu.prototype.initProperties.call(this),Ku(this,{minBaseUnitLength:.7})},Ju.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()},Ju.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Ju.prototype.addBase=function(){},(Zu=c=Ju)&&($u.__proto__=Zu),(($u.prototype=Object.create(Zu&&Zu.prototype)).constructor=$u).prototype.initProperties=function(){Zu.prototype.initProperties.call(this),Ku(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"}}})},$u.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},$u.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&i<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw o=Math.ceil(this.getBaseWidth(i)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+o+"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))},$u.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},$u.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},$u.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},$u.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},$u.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},$u.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},$u.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},i(h=$u,{addCheckSum:!1});var td,ed,id,od,rd,nd,sd,ad,hd,pd,ld,cd={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var i=[],o=0;o<this.specialAsciiCodes[t].length;o++)i.push(this.characterMap[this.shiftCharacters[3]]),i.push(this.characterMap[this.specialAsciiCodes[t][o]]);else e=6*Math.floor(t/32)+(t-27)%32+64,i=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return i}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},o=((nd=h)&&(Sd.__proto__=nd),((Sd.prototype=Object.create(nd&&nd.prototype)).constructor=Sd).prototype.initProperties=function(){nd.prototype.initProperties.call(this),x(this,cd,{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}}})},Sd),ud=Object.assign;(rd=c)&&(kd.__proto__=rd),((kd.prototype=Object.create(rd&&rd.prototype)).constructor=kd).prototype.initProperties=function(){rd.prototype.initProperties.call(this),ud(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"}})},kd.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},kd.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)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},kd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},kd.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},kd.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},kd.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},kd.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},kd.prototype._getCheckValues=function(){for(var t,e=this.values,i=e.length,o=0,r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r,this.cCheckSumTotal);for(t=o%this.checkSumMod,o=this.weightedValue(t,1,this.kCheckSumTotal),r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r+1,this.kCheckSumTotal);return[t,o%this.checkSumMod]},kd.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},kd.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},kd.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)};var e,Un=((od=e=kd)&&(wd.__proto__=od),((wd.prototype=Object.create(od&&od.prototype)).constructor=wd).prototype.initProperties=function(){od.prototype.initProperties.call(this),x(this,cd,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,i=0;i<t.length;i++)e=t[i],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},wd),dd=/^\d+$/,fd=Object.assign,l=((id=Nn)&&(bd.__proto__=id),((bd.prototype=Object.create(id&&id.prototype)).constructor=bd).prototype.initProperties=function(){id.prototype.initProperties.call(this),fd(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},bd.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},bd.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()},bd.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},bd.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},bd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},bd.prototype.validate=function(t){if(dd.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},bd.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},bd),gd=/^\d+$/,yd=/^[a-z0-9]+$/i,vd=Object.assign;(ed=w.Class)&&(_d.__proto__=ed),((_d.prototype=Object.create(ed&&ed.prototype)).constructor=_d).prototype.initProperties=function(){},_d.prototype.addStart=function(){},_d.prototype.is=function(){},_d.prototype.isCode=function(){return!1},_d.prototype.move=function(){},_d.prototype.pushState=function(){};var p,Gn=((td=p=_d)&&(xd.__proto__=td),((xd.prototype=Object.create(td&&td.prototype)).constructor=xd).prototype.initProperties=function(){td.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},xd.prototype.addStart=function(){this.encoding.addPattern(this.START)},xd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},xd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},xd.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;for(u("C",i)&&(i=o.substr(t.index).match(/\d{4,}/g))&&(r=o.indexOf(i[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},xd.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},xd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},xd.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},xd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},xd),md={};function xd(t,e){td.call(this,t),this.states=e,this._initMoves(e)}function _d(t){ed.call(this),this.encoding=t,this.initProperties()}function bd(){id.apply(this,arguments)}function wd(){od.apply(this,arguments)}function kd(){rd.apply(this,arguments)}function Sd(){nd.apply(this,arguments)}function Ad(t,e){sd.call(this,t),this.states=e}function Cd(t,e){ad.call(this,t),this._initSubStates(e)}function Pd(){hd.apply(this,arguments)}function Td(){pd.apply(this,arguments)}function Md(){ld.apply(this,arguments)}md.A=((ld=Gn)&&(Md.__proto__=ld),((Md.prototype=Object.create(ld&&ld.prototype)).constructor=Md).prototype.initProperties=function(){ld.prototype.initProperties.call(this),vd(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Md.prototype.isCode=function(t){return 0<=t&&t<96},Md.prototype.getValue=function(t){return t<32?t+64:t-32},Md),md.B=((pd=Gn)&&(Td.__proto__=pd),((Td.prototype=Object.create(pd&&pd.prototype)).constructor=Td).prototype.initProperties=function(){pd.prototype.initProperties.call(this),vd(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Td.prototype.isCode=function(t){return 32<=t&&t<128},Td.prototype.getValue=function(t){return t-32},Td),md.C=((hd=p)&&(Pd.__proto__=hd),((Pd.prototype=Object.create(hd&&hd.prototype)).constructor=Pd).prototype.initProperties=function(){hd.prototype.initProperties.call(this),vd(this,{key:"C",MOVE:99,START:105})},Pd.prototype.addStart=function(){this.encoding.addPattern(this.START)},Pd.prototype.is=function(t,e){var i=Gd(t,e,4);return(e+4<=t.length||2===t.length)&&gd.test(i)},Pd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},Pd.prototype.pushState=function(t){for(var e;(e=Gd(t.value,t.index,2))&&gd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},Pd.prototype.getValue=function(t){return t},Pd),md.FNC4=((ad=p)&&(Cd.__proto__=ad),((Cd.prototype=Object.create(ad&&ad.prototype)).constructor=Cd).prototype.initProperties=function(){ad.prototype.initProperties.call(this),vd(this,{key:"FNC4",dependentStates:["A","B"]})},Cd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},Cd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Cd.prototype.isCode=function(t){return 128<=t&&t<256},Cd.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},Cd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},Cd.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},Cd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},Cd.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]},Cd.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},Cd),md.FNC1=((sd=p)&&(Ad.__proto__=sd),((Ad.prototype=Object.create(sd&&sd.prototype)).constructor=Ad).prototype.initProperties=function(){sd.prototype.initProperties.call(this),vd(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})},Ad.prototype.addStart=function(){this.encoding[this.startState].addStart()},Ad.prototype.is=function(){return u(this.key,this.states)},Ad.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,h={state:this.startState};for(r.addPattern(this.START);;){if((e=(h.index=0)<(o=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(h.value=n.substring(a,i).replace(s,""),this.validate(e,h.value),r.pushData(h,this.dependentStates),i>=n.length)break;a=i,h.state!==this.startState&&(r[this.startState].move(h),h.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},Ad.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!gd.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!yd.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},Ad.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=Gd(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},Ad.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},Ad.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,e),t=t.substring(e+1,i),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},Ad.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&u(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},Ad),(Rd=Nn)&&(Nd.__proto__=Rd),((Nd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Nd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),vd(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})},Nd.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new md[this.states[t]](this,this.states)},Nd.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},Nd.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())},Nd.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var i;t.shifted?(i=t.state,t.state=t.previousState,t.previousState=i,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},Nd.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Nd.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Nd.prototype.addStop=function(){this.addPattern(this.STOP)},Nd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Nd.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},Nd.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))};var Od,Id,Bd,Ld,Ed,Rd,c,Gn=((Ed=c=Nd)&&(Ud.__proto__=Ed),((Ud.prototype=Object.create(Ed&&Ed.prototype)).constructor=Ud).prototype.initProperties=function(){Ed.prototype.initProperties.call(this),vd(this,{name:"Code 128 A",states:["A"]})},Ud),p=((Ld=c)&&(Hd.__proto__=Ld),((Hd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Hd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),vd(this,{name:"Code 128 B",states:["B"]})},Hd),Vd=((Bd=c)&&(Fd.__proto__=Bd),((Fd.prototype=Object.create(Bd&&Bd.prototype)).constructor=Fd).prototype.initProperties=function(){Bd.prototype.initProperties.call(this),vd(this,{name:"Code 128 C",states:["C"]})},Fd),zd=((Id=c)&&(Dd.__proto__=Id),((Dd.prototype=Object.create(Id&&Id.prototype)).constructor=Dd).prototype.initProperties=function(){Id.prototype.initProperties.call(this),vd(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Dd),c=((Od=c)&&(jd.__proto__=Od),((jd.prototype=Object.create(Od&&Od.prototype)).constructor=jd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),vd(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},jd);function jd(){Od.apply(this,arguments)}function Dd(){Id.apply(this,arguments)}function Fd(){Bd.apply(this,arguments)}function Hd(){Ld.apply(this,arguments)}function Ud(){Ed.apply(this,arguments)}function Nd(t){Rd.call(this,t),this._initStates()}function Gd(t,e,i){return t.substring(e,e+i)}var Wd,Xd,Yd,qd,Zd,Qd,Kd,$d=Object.assign;(Kd=Nn)&&(yf.__proto__=Kd),((yf.prototype=Object.create(Kd&&Kd.prototype)).constructor=yf).prototype.initProperties=function(){Kd.prototype.initProperties.call(this),$d(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:rf})},yf.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},yf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},yf.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()},yf.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},yf.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},yf.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]])};var Jd,tf=((Qd=Jd=yf)&&(gf.__proto__=Qd),((gf.prototype=Object.create(Qd&&Qd.prototype)).constructor=gf).prototype.initProperties=function(){Qd.prototype.initProperties.call(this),$d(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},gf),ef=((Zd=Jd)&&(ff.__proto__=Zd),((ff.prototype=Object.create(Zd&&Zd.prototype)).constructor=ff).prototype.initProperties=function(){Zd.prototype.initProperties.call(this),$d(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},ff),of=((qd=Jd)&&(df.__proto__=qd),((df.prototype=Object.create(qd&&qd.prototype)).constructor=df).prototype.initProperties=function(){qd.prototype.initProperties.call(this),$d(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},df),Jd=((Yd=Jd)&&(uf.__proto__=Yd),((uf.prototype=Object.create(Yd&&Yd.prototype)).constructor=uf).prototype.initProperties=function(){Yd.prototype.initProperties.call(this),$d(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},uf),rf={Modulo10:function(t){for(var e,i,o=[0,""],r=t.length%2,n=0;n<t.length;n++)o[(n+r)%2]+=parseInt(t.charAt(n),10);for(i=o[0],e=(2*o[1]).toString(),n=0;n<e.length;n++)i+=parseInt(e.charAt(n),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},nf=Object.assign,Nn=((Xd=Nn)&&(cf.__proto__=Xd),((cf.prototype=Object.create(Xd&&Xd.prototype)).constructor=cf).prototype.initProperties=function(){Xd.prototype.initProperties.call(this),nf(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]}})},cf.prototype.initValue=function(t,e,i){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=i,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},cf.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)},cf.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},cf.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},cf.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},cf),sf=Object.assign,af=((Wd=Nn)&&(lf.__proto__=Wd),((lf.prototype=Object.create(Wd&&Wd.prototype)).constructor=lf).prototype.initProperties=function(){Wd.prototype.initProperties.call(this),sf(this,{name:"EAN 8"})},lf.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},lf),hf={code11:t,code39:h,code39extended:o,code93:e,code93extended:Un,code128:zd,code128a:Gn,code128b:p,code128c:Vd},pf,t;function lf(){Wd.apply(this,arguments)}function cf(){Xd.apply(this,arguments)}function uf(){Yd.apply(this,arguments)}function df(){qd.apply(this,arguments)}function ff(){Zd.apply(this,arguments)}function gf(){Qd.apply(this,arguments)}function yf(){Kd.apply(this,arguments)}function vf(t,e){var i=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=i,e}function mf(t,e,i){void 0===i&&(i=Ie),pf.call(this),this.options=x({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&T(e.value)&&this.redraw()}hf["gs1-128"]=c,hf.msimod10=tf,hf.msimod11=ef,hf.msimod1010=of,hf.msimod1110=Jd,hf.postnet=l,hf.ean8=af,hf.ean13=Nn,(pf=w.Class)&&(mf.__proto__=pf),((mf.prototype=Object.create(pf&&pf.prototype)).constructor=mf).prototype.destroy=function(){this._destroySurface()},mf.prototype._initElement=function(){mt(this.element,"k-barcode")},mf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},mf.prototype._createSurface=function(){return w.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},mf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},mf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},mf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},mf.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},mf.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)},mf.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},mf.prototype._resize=function(){this.redraw()},mf.prototype.createVisual=function(){this.visual=this._render()},mf.prototype._render=function(){var t,e=this.options,i=e.value,o=e.text,r=P(o.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new E(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),p=new w.drawing.Group;this.contentBox=s,p.append(this._getBackground(n)),o.visible&&(h-=w.drawing.util.measureText(i,{font:o.font}).height+r.top+r.bottom);try{t=a.encode(i,s.width(),h)}catch(t){return this.onError(t),p}return o.visible&&(n=i,e.checksum&&T(a.checksum)&&(n+=" "+a.checksum),p.append(this._getText(n))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),p.append(this._bandsGroup),p},mf.prototype.exportVisual=function(){return this._render()},mf.prototype._getSize=function(){var t=vf(this.element,this.options.renderAs),e=new w.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},mf.prototype.value=function(t){if(!T(t))return this.options.value;this.options.value=String(t),this.redraw()},mf.prototype._getBands=function(t,e){for(var i=this.contentBox,o=i.x1,r=new w.drawing.Group,n=0;n<t.length;n++){var s,a=(s=It(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=w.geometry.Rect.fromPoints(new w.geometry.Point(o,s.y1+i.y1),new w.geometry.Point(o+a,s.y2+i.y1)),s=w.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),o+=a}return r},mf.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new E(0,0,t.width,t.height).unpad(i.width/2);return w.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},mf.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new Xx(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},mf.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),!hf[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new hf[this.type],this.options=x({},this.options,t)},i(t=mf,{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 Rb=t;var xf={width:500,height:100};const Vb=function(t,e){if(void 0===e&&(e=xf),!t)throw new Error("Please specify barcode type to validate.");var i,o,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),hf[n])return i=new hf[n],o=e,r=s,function(t){try{i.encode(r+t,o.width,o.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var _f=Object.assign;function bf(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function wf(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function kf(t){return parseInt(t,2)}(Of=w.Class)&&(Hf.__proto__=Of),((Hf.prototype=Object.create(Of&&Of.prototype)).constructor=Hf).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Hf.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}},Hf.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Sf,Af,Cf,Pf,Tf,Mf,Of,If=Hf,Bf=((Mf=w.Class)&&(Ff.__proto__=Mf),(Ff.prototype=Object.create(Mf&&Mf.prototype)).constructor=Ff),Lf=((Tf=w.Class)&&(Df.__proto__=Tf),((Df.prototype=Object.create(Tf&&Tf.prototype)).constructor=Df).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],i=0,o=n;for(e.push(mg(o,ag,hg,pg,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=mg(o,lg,cg,ug,t);r.mode!==t?(t=r.mode,e.push(r),i++):e[i].modeString+=r.modeString,o=o.substr(r.modeString.length)}return e}(),t=xg(function(t){for(var e=0,i=0;i<t.length;i++)e+=Ef[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var i="",o=0;o<t.length;o++)i+=Ef[t[o].mode].encode(t[o].modeString,e);return i}(e,t);return new Bf(e,t)},Df);(Pf=w.Class)&&(jf.__proto__=Pf),((jf.prototype=Object.create(Pf&&Pf.prototype)).constructor=jf).prototype.initProperties=function(){_f(this,{modeIndicator:"",bitsInCharacterCount:[]})},jf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},jf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},jf.prototype.getModeCountString=function(t,e){return this.modeIndicator+wf(t,this.getBitsCharacterCount(e))},jf.prototype.encode=function(){},jf.prototype.getStringBitsLength=function(){},jf.prototype.getValue=function(){};var h,o=((Cf=h=jf)&&(zf.__proto__=Cf),((zf.prototype=Object.create(Cf&&Cf.prototype)).constructor=zf).prototype.initProperties=function(){Cf.prototype.initProperties.call(this),_f(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},zf.prototype.getValue=function(t){return parseInt(t,10)},zf.prototype.encode=function(t,e){for(var i=bf(t,3),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=wf(i[r],10);return o+wf(i[r],1+3*i[r].length)},zf.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0==i?0:1)},zf),e=((Af=h)&&(Vf.__proto__=Af),((Vf.prototype=Object.create(Af&&Af.prototype)).constructor=Vf).prototype.initProperties=function(){Af.prototype.initProperties.call(this),_f(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"})},Vf.prototype.getValue=function(t){return this.characters[t]},Vf.prototype.encode=function(t,e){for(var i=bf(t,2),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=wf(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+wf(2===i[r].length?45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)):this.getValue(i[r].charAt(0)),1+5*i[r].length)},Vf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},Vf),Un=((Sf=h)&&(Rf.__proto__=Sf),((Rf.prototype=Object.create(Sf&&Sf.prototype)).constructor=Rf).prototype.initProperties=function(){Sf.prototype.initProperties.call(this),_f(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},Rf.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+'".')},Rf.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=wf(this.getValue(t.charAt(o)),8);return i},Rf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},Rf),Ef={};function Rf(){Sf.apply(this,arguments)}function Vf(){Af.apply(this,arguments)}function zf(){Cf.apply(this,arguments)}function jf(){Pf.call(this),this.initProperties()}function Df(){Tf.apply(this,arguments)}function Ff(t,e){Mf.call(this),this.dataString=t,this.version=e}function Hf(t){Of.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}Ef.numeric=new o,Ef.alphanumeric=new e,Ef.byte=new Un,(Uf=w.Class)&&(fg.__proto__=Uf),((fg.prototype=Object.create(Uf&&Uf.prototype)).constructor=fg).prototype.initProperties=function(){_f(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},fg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=xg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new Bf(t,e)},fg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},fg.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},fg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=wf(t,8);else{for(var e=8-e,r=0;r<i;r++)o=wf(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},fg.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1};var Uf,Nf=fg,Gf=[{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}}],Wf="numeric",Xf="alphanumeric",Yf="byte",qf={1:0},Zf={0:1},Qf={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},Kf=[1,0,1,1,1],$f=[1,0,1],Jf={L:"01",M:"00",Q:"11",H:"10"},tg=["11101100","00010001"],eg=93,ig=[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}],og=/^\d+/,zd="A-Z0-9 $%*+./:-",rg=new RegExp("^[A-Z $%*+./:-]+"),ng=new RegExp("^["+zd+"]+"),sg=new RegExp("^[^"+zd+"]+"),ag=8,hg=5,pg=8,lg=17,cg=9,ug=16,dg=[[1,0],[1,25,0]];function fg(){Uf.call(this),this.initProperties(),this.mode=Ef[this.encodingMode]}function gg(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function yg(t,e,i,o){for(var r=0;r<ig.length;r++)t[r][i][o]=ig[r](i,o)?1^e:parseInt(e,10)}function vg(t,e){for(var i,o=dg[e-1],r=new Array(e).concat(t),n=new Array(r.length-o.length).concat(o),s=t.length,a=[],h=0;h<s;h++)i=function(t,e){for(var i=[],o=t.length-1;i[o]=Zf[(t[o]+e)%255],void 0!==t[--o];);return i}(n,qf[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var i=[],o=t.length-2;0<=o;o--)i[o]=t[o]^e[o];return i}(i,r);for(h=r.length-1;0<=h;h--)a[e-1-h]=wf(r[h],8);return a}function mg(t,e,i,o,r){var n,s=og.exec(t),s=s?s[0]:"",a=rg.exec(t),a=a?a[0]:"",h=ng.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!ng.test(t.charAt(s.length)))?(n=Wf,s):h&&(t.length===h.length||h.length>=o||r===Xf)?(n=Xf,s||a):(n=Yf,h?h+sg.exec(t.substring(h.length))[0]:sg.exec(t)[0]);return{mode:n,modeString:e}}function xg(t,e){for(var i=0,o=Gf.length-1,r=Math.floor(Gf.length/2);t<Gf[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=Gf[i][e].totalDataCodewords?r+1:o+1}function _g(t,e,i){var o=kf(e),e=e.length-1,r=t<<e;return wf(t,i-e)+wf(function(t,e){for(var i=e.toString(2).length,o=t.toString(2).length,r=t;i<=(o=(r^=e<<o-i).toString(2).length););return r}(r,o),e)}function bg(t,e){return parseInt(t.charAt(e),10)}function wg(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&gg(t,bg(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&gg(t,bg(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)gg(t,bg(e,r-1-o++),n,s);for(gg(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)gg(t,bg(e,r-1-o++),n,s)}function kg(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,h=0;h<e.length;h++)i=Math.floor(h/3),o=h%3,gg(t,r=bg(e,e.length-h-1),0+i,s+o),gg(t,r,a+o,0+i)}function Sg(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var h=a;h<n-a;h++)gg(t,r=e[a],i+h,o+a),gg(t,r,i+a,o+h),gg(t,r,i+s-h,o+s-a),gg(t,r,i+s-a,o+s-h)}function Ag(t,e,i,o){for(var r=i,n=o,s=t[0];gg(t,0,r,o),gg(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function Cg(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,e[t][o]===eg&&(i[t]+=40)}function Pg(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function Tg(t,e,i){var i=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?Nf:Lf)).getEncodingResult(t,e),r=i.version,n=Gf[r-1][e],t=function(t,e){for(var i,o=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var h=s[a][0],p=0;p<h;p++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)i=t.substring(o,o+8),c.push(i),u[l-d]=kf(i),o+=8;r.push(c),n.push(vg(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,i=0,o=0,r=t;r.length<e&&i<4;)r+="0000".charAt(i++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=tg[o],o^=1;return r}(i.dataString),n),i=function(){for(var t=[],e=17+4*r,i=0;i<ig.length;i++){t[i]=new Array(e);for(var o=0;o<e;o++)t[i][o]=new Array(e)}return t}(),o=(l=(s=i)[0].length,Sg(s,Kf,0,0),Ag(s,[-1,-1],7,7),Sg(s,Kf,l-7,0),Ag(s,[1,-1],l-8,7),Sg(s,Kf,0,l-7),Ag(s,[-1,1],7,l-8),i),s=r;if(!(s<2)){var a,h=o[0],p=h.length,l=Math.floor(s/7),c=[6],u=0;for((s=Qf[s])?a=(p-13-s)/l:s=a=(p-13)/(l+1),c.push(c[u++]+s);c[u]+a<p;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===h[c[d]][c[f]]&&Sg(o,$f,c[d]-2,c[f]-2)}for(var g=i,y=1,v=g[0].length,m=8;m<v-8;m++)gg(g,y,6,m),gg(g,y,m,6),y^=1;7<=r&&kg(i,wf(0,18)),wg(i,wf(0,15));for(var x,_,b,w=i,k=t,S=new If(w[0]),A=0;A<k.length;A++)for(x=k[A],_=0;0<x.length;){for(var C=0;C<x.length;C++)for(var P=0;P<8;P++)b=S.getNextCell(),yg(w,x[C][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)yg(w,0,b.row,b.column);l=function(t){for(var e,i=[],o=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)s[h]=[r[h]=i[h]=0,0],n[h]=[0,0],o[h]=[];for(var p=0;p<a;p++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[p][l],10),o[c][0]===e[p][l]&&p+1<a&&0<=l-1&&e[p+1][l]===o[c][0]&&e[p+1][l-1]===o[c][0]&&(i[c]+=3),Cg(c,n,i,0,e[p][l]),Cg(c,n,i,1,e[l][p]),Pg(c,i,o,e[p][l],s,0),Pg(c,i,o,e[l][p],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<i.length;h++)i[h]+=(d=r[h],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),i[h]<v&&(v=i[h],u=h);return u}(i),s=i[l];return 7<=r&&kg([s],_g(r,"1111100100101",18)),wg([s],function(t){var e="";if(0===kf(t))return"101010000010010";for(var i=_g(kf(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e}(Jf[e]+wf(l,3))),s}for(var Mg,Og=1;Og<255;Og++)255<(Mg=2*Zf[Og-1])&&(Mg^=285),Zf[Og]=Mg,qf[Mg]=Og;Mg=2*Zf[Og-1]^285,Zf[Og]=Mg,Zf[-1]=0;for(var Ig=2;Ig<=68;Ig++){var Bg=dg[Ig-1];dg[Ig]=function(t,e){for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)i[o+r]=void 0===i[o+r]?(t[o]+(0<=e[r]?e[r]:0))%255:qf[Zf[i[o+r]]^Zf[(t[o]+e[r])%255]];return i}(Bg,[Ig,0])}var Lg,Eg=Math.round,Rg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Vg=[[0,1],[1,1],[1,0]],Gn;function zg(t,e,i){void 0===i&&(i=Ie),Lg.call(this),this.options=x({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)}(Lg=w.Class)&&(zg.__proto__=Lg),((zg.prototype=Object.create(Lg&&Lg.prototype)).constructor=zg).prototype.destroy=function(){this._destroySurface()},zg.prototype._initElement=function(){mt(this.element,"k-qrcode")},zg.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},zg.prototype._createSurface=function(){return w.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},zg.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},zg.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},zg.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},zg.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},zg.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,i={width:0,height:0};return 0<e&&(i.width=e),t&&(i.height=t),i},zg.prototype._resize=function(){this.redraw()},zg.prototype.createVisual=function(){this.visual=this._render()},zg.prototype.exportVisual=function(){return this._render()},zg.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,h=s.width||0,p=(s.width=h,new w.drawing.Group);try{n&&(i=Tg(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(h+a),t=this._calculateBaseUnit(r,i.length),e=h+a+(r-i.length*t)/2,p.append(this._renderBackground(o,s)),p.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?p.append(this._renderLogo(o,t)):this._isSwiss()&&p.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return p},zg.prototype._renderLogo=function(t,e){var t=Eg(t/2),e=this._getLogoSize(7*e),i=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new w.geometry.Rect(new w.geometry.Point(t.x,t.y),new w.geometry.Size(e.width,e.height));return new w.drawing.Image(i,t)},zg.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,t=t/2,n={},s=new w.drawing.Group;return n.x=n.y=Math.ceil(t-e-i/2),s.append(this._renderShape(n,Math.ceil(i+2*e),Vg,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,Vg,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,Rg,"#fff")),s},zg.prototype._renderShape=function(t,e,i,o){var r=new w.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},zg.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=vf(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},zg.prototype._calculateBaseUnit=function(t,e){var i,o=Math.floor(t/e);return o<1?(i=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))):t<=o*e&&1<=o-1&&o--,o},zg.prototype._renderMatrix=function(t,e,i){for(var o=new w.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+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 a=Eg(i+a*e),h=Eg(n),p=Eg(i+s*e),l=Eg(n+e);o.moveTo(a,h).lineTo(a,l).lineTo(p,l).lineTo(p,h).close()}}return o},zg.prototype._renderBackground=function(t,e){t=new E(0,0,t,t).unpad(e.width/2);return w.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},zg.prototype.setOptions=function(t){this.options=_f(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},zg.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},zg.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},zg.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},zg.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},i(Gn=zg,{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 zb=Gn,jb=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{Tg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var jg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Dg(t){return t*t}var Fg,Hg,Ug=Math,Ng=Ug.abs,Gg=Ug.atan,Wg=Ug.atan2,Xg=Ug.cos,Yg=Ug.sin,qg=Ug.tan,Zg=((Hg=w.Class)&&(py.__proto__=Hg),((py.prototype=Object.create(Hg&&Hg.prototype)).constructor=py).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},py.prototype.toArray=function(){return[this.lat,this.lng]},py.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},py.prototype.clone=function(){return new py(this.lat,this.lng)},py.prototype.round=function(t){return this.lng=M(this.lng,t),this.lat=M(this.lat,t),this},py.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},py.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},py.prototype.destination=function(t,e,i){var e=pe(e),i=i||jg.WGS84,o=pe(this.lat),r=pe(this.lng),t=t/i.a,i=Ug.asin(Yg(o)*Xg(t)+Xg(o)*Yg(t)*Xg(e)),r=r+Wg(Yg(e)*Yg(t)*Xg(o),Xg(t)-Yg(o)*Yg(i));return new py(ee(i),ee(r))},py.prototype.greatCircleTo=function(t,e){var i=py.create(void 0),e=e||jg.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,r,n=e.a,s=e.b,a=e.f,h=pe(i.lng-this.lng),e=Gg((1-a)*qg(pe(this.lat))),p=Yg(e),l=Xg(e),e=Gg((1-a)*qg(pe(i.lat))),c=Yg(e),u=Xg(e),d=h,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Yg(d),v=Xg(d),m=Ug.sqrt(Dg(u*y)+Dg(l*c-p*u*v)),x=Wg(m,r=p*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(o=1-Dg(_))&&(b=r-2*p*c/o),d),k=a/16*o*(4+a*(4-3*o)),d=h+(1-k)*a*_*(x+k*m*(b+k*r*(2*Dg(b)-1))),g=Ng(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(Dg(n)-Dg(s))/Dg(s),e=1+i/16384*(4096+i*(i*(320-175*i)-768)),n=i/1024*(256+i*(i*(74-47*i)-128)),i=n*m*(b+n/4*(r*(2*Dg(b)-1)-n/6*b*(4*Dg(m)-3)*(4*Dg(b)-3))),n=Wg(u*y,l*c-p*u*v),S=Wg(l*y,-p*u+l*c*v);return{distance:M(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:ee(n),azimuthTo:ee(S)}},py.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},py.fromLngLat=function(t){return new py(t[1],t[0])},py.fromLatLng=function(t){return new py(t[0],t[1])},py.create=function(t,e){if(T(t))return t instanceof py?t.clone():1===arguments.length&&2===t.length?py.fromLatLng(t):new py(t,e)},py),Qg=Math,Kg=Qg.atan,$g=Qg.exp,Jg=Qg.pow,ty=Qg.sin,ey=Qg.log,iy=Qg.tan,oy=w.geometry.Point,ry=Qg.PI,ny=ry/2,sy=ry/4,ay=ry/180,p=jg.WGS84,Vd;function hy(t){Fg.call(this),this.initProperties(),this._initOptions(t)}function py(t,e){Hg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}(Fg=w.Class)&&(hy.__proto__=Fg),((hy.prototype=Object.create(Fg&&Fg.prototype)).constructor=hy).prototype._initOptions=function(t){this.options=x({},this.options,t)},hy.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},hy.prototype.forward=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,r=_(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?_(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=pe(e-i)*o,e=this._projectLat(r);return new oy(t,e)},hy.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=pe(t),o=iy(sy+t/2),t=i*ty(t),t=Jg((1-t)/(1+t),i/2);return e*ey(o*t)},hy.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,o=t.x/(ay*o)+i,i=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=_(o,-this.MAX_LNG,this.MAX_LNG)),new Zg(i,o)},hy.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=$g(-t/i),s=ny-2*Kg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=o*ty(s),h=Jg((1-h)/(1+h),r),h=ny-2*Kg(n*h)-s;if(s+=h,Qg.abs(h)<=this.INVERSE_CONVERGENCE)break}return ee(s)},i(Vd=hy,{centralMeridian:0,datum:p}),(uy=Vd)&&(my.__proto__=uy),((my.prototype=Object.create(uy&&uy.prototype)).constructor=my).prototype.initProperties=function(){uy.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},my.prototype._projectLat=function(t){var e=this.options.datum.a,t=pe(t),t=iy(sy+t/2);return e*ey(t)},my.prototype._inverseY=function(t){var e=this.options.datum.a,t=$g(-t/e);return ee(ny-2*Kg(t))};var ly,cy,uy,dy=my,fy=((cy=w.Class)&&(vy.__proto__=cy),((vy.prototype=Object.create(cy&&cy.prototype)).constructor=vy).prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},vy.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},vy),gy=((ly=Vx)&&(yy.__proto__=ly),((yy.prototype=Object.create(ly&&ly.prototype)).constructor=yy).prototype._initOptions=function(t){this.options=x({},this.options,t)},yy.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},yy.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},yy.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},yy.prototype.clear=function(){this.items=[],Ti(this.element)},yy.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],i=this._itemText(i);""!==i&&t.push(i)}if(0<t.length){Ti(this.element);var o=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=o;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},yy.prototype.hideElement=function(){this.element.style.display="none"},yy.prototype.showElement=function(){this.element.style.display=""},yy.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},yy.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},yy.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},yy);function yy(t,e){ly.call(this),this.element=t,this._initOptions(e),this.items=[],mt(this.element,"k-widget k-attribution")}function vy(){cy.call(this);var t=this._proj=new dy,t=this.c=2*ry*t.options.datum.a;this._tm=w.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=w.geometry.transform().scale(t,-t).translate(-.5,-.5)}function my(){uy.apply(this,arguments)}i(gy,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var xy={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 _y(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+xy[t].className+'" aria-label="move '+t+'">'+xe({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Li(t)}(by=Vx)&&(ky.__proto__=by),((ky.prototype=Object.create(by&&by.prototype)).constructor=ky).prototype.destroy=function(){this.dispose()},ky.prototype.dispose=function(){ji(this._keyroot,"keydown",this._keydownHandler)},ky.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},ky.prototype._initOptions=function(t){this.options=x({},this.options,t)},ky.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},ky.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},ky.prototype._keydown=function(t){switch(t.which){case Ex.UP:this._pan(0,1),t.preventDefault();break;case Ex.DOWN:this._pan(0,-1),t.preventDefault();break;case Ex.RIGHT:this._pan(1,0),t.preventDefault();break;case Ex.LEFT:this._pan(-1,0),t.preventDefault()}};var by,wy=ky;function ky(t,e){by.call(this),this.element=t,this._initOptions(e);var t=_y("up",e.icons),i=_y("right",e.icons),o=_y("down",e.icons),e=_y("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(i),this.element.appendChild(o),this.element.appendChild(e),mt(this.element,"k-widget k-navigator"),zi(this.element,"click",".k-button",Vi(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=Vi(this._keydown,this),zi(this._keyroot,"keydown",this._keydownHandler)}function Sy(t,e,i){t='<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+'">'+xe({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return Li(t)}i(wy,{name:"Navigator",panStep:1}),Fi(wy,["pan"]),(Ay=Vx)&&(Py.__proto__=Ay),((Py.prototype=Object.create(Ay&&Ay.prototype)).constructor=Py).prototype.destroy=function(){this.element&&ji(this.element,"click",this._clickHandler),this._keyroot&&ji(this._keyroot,"keydown",this._keydownHandler)},Py.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Py.prototype._initOptions=function(t){this.options=x({},this.options,t)},Py.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Py.prototype._click=function(t){var e=1;Nt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Py.prototype._keydown=function(t){switch(t.which){case Ex.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Ex.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var Ay,Cy=Py;function Py(t,e,i){Ay.call(this),this.element=t,this._initOptions(e);t=Sy("in","plus",i),e=Sy("out","minus",i),this.element.appendChild(t),this.element.appendChild(e),this.element.setAttribute("role","group"),mt(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),zi(this.element,"click",".k-button",this._clickHandler),i=this.element.parentNode.closest("[data-role]");this._keyroot=i||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),zi(this._keyroot,"keydown",this._keydownHandler)}i(Cy,{name:"ZoomControl",zoomStep:1}),Fi(Cy,["change"]);var Ty,My,c,Oy=(c=Math).max,Iy=c.min,By=((My=w.Class)&&(Vy.__proto__=My),tf={World:{configurable:!0}},((Vy.prototype=Object.create(My&&My.prototype)).constructor=Vy).prototype.contains=function(t){var e=this.nw,i=this.se,o=O(t.lng,t[1]),r=O(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},Vy.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new Zg(e,i)},Vy.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},Vy.prototype.include=function(t){var e=this.nw,i=this.se,o=O(t.lng,t[1]),t=O(t.lat,t[0]);e.lng=Iy(e.lng,o),e.lat=Oy(e.lat,t),i.lng=Oy(i.lng,o),i.lat=Iy(i.lat,t)},Vy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Vy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Zg(t.lat,e.lng),se:this.se,sw:new Zg(e.lat,t.lng)}},Vy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Zg(t.lat,e.lng),e,new Zg(e.lat,t.lng)]},Vy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Vy.create=function(t,e){return t instanceof Vy?t:t&&e?new Vy(t,e):t&&4===t.length&&!e?new Vy([t[0],t[1]],[t[2],t[3]]):void 0},tf.World.get=function(){return new Vy([90,-180],[-90,180])},Object.defineProperties(Vy,tf),Vy),Ly="centerChange",Ey=((Ty=w.Class)&&(Ry.__proto__=Ty),ef={anchor:{configurable:!0}},((Ry.prototype=Object.create(Ty&&Ty.prototype)).constructor=Ry).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)},Ry.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},ef.anchor.get=function(){return this._anchor},ef.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},Ry.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(Ry.prototype,ef),Ry);function Ry(t,e){Ty.call(this),this.widgetService=t,this.options=x({},this.options,e),this.offset={x:0,y:0}}function Vy(t,e){My.call(this);t=Zg.create(t),e=Zg.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}i(Ey,{border:{width:1},opacity:1}),(zy=w.Class)&&(Hy.__proto__=zy),((Hy.prototype=Object.create(zy&&zy.prototype)).constructor=Hy).prototype.destroy=function(){this._deactivate()},Hy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Hy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Hy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Hy.prototype.reset=function(){this._beforeReset(),this._reset()},Hy.prototype._reset=function(){this._applyExtent()},Hy.prototype._beforeReset=function(){},Hy.prototype._resize=function(){},Hy.prototype._panEnd=function(){this._applyExtent()},Hy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!T(t.minZoom)||e>=t.minZoom,e=!T(t.maxZoom)||e<=t.maxZoom,t=By.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},Hy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Hy.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)},Hy.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)},Hy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Hy.prototype._readData=function(){return this.options.data||[]},Hy.prototype._hasData=function(){return this._data&&0<this._data.length},Hy.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var zy,of=Hy,jy=Math,Dy=w.geometry.Point,Fy,Jd;function Hy(t,e){zy.call(this),this.support=Xi(),this._initOptions(e),this.map=t;e=document.createElement("div");mt(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.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()}function Uy(t){return Tt(t)?t:Mx.compile(t)}function Ny(t){var e=t;return"string"!=typeof t&&(e+="px"),e}function Gy(t,e){Fy.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}(Fy=of)&&(Gy.__proto__=Fy),((Gy.prototype=Object.create(Fy&&Fy.prototype)).constructor=Gy).prototype.destroy=function(){Fy.prototype.destroy.call(this),this._view.destroy(),this._view=null},Gy.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Gy.prototype._reset=function(){Fy.prototype._reset.call(this),this._updateView(),this._view.reset()},Gy.prototype._viewType=function(){return Yy},Gy.prototype._activate=function(){Fy.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,w.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Gy.prototype._deactivate=function(){Fy.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Gy.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),i={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},Gy.prototype._resize=function(){this._render()},Gy.prototype._panEnd=function(t){Fy.prototype._panEnd.call(this,t),this._render()},Gy.prototype._render=function(){this._updateView(),this._view.render()},i(Jd=Gy,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1}),(Xy=w.Class)&&(Qy.__proto__=Xy),((Qy.prototype=Object.create(Xy&&Xy.prototype)).constructor=Qy).prototype._initOptions=function(t){this.options=x({},this.options,t)},Qy.prototype.center=function(t){this._center=t},Qy.prototype.extent=function(t){this._extent=t},Qy.prototype.viewOrigin=function(t){this._viewOrigin=t},Qy.prototype.zoom=function(t){this._zoom=t},Qy.prototype.pointToTileIndex=function(t){return new Dy(jy.floor(t.x/this.options.tileSize),jy.floor(t.y/this.options.tileSize))},Qy.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,e=this.indexToPoint(e).translate(-i.x,-i.y);return{x:jy.ceil((jy.abs(e.x)+t.width)/this.options.tileSize),y:jy.ceil((jy.abs(e.y)+t.height)/this.options.tileSize)}},Qy.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},Qy.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Dy(e*this.options.tileSize,t*this.options.tileSize)},Qy.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},Qy.prototype.destroy=function(){Ti(this.element),this.pool.empty()},Qy.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},Qy.prototype.render=function(){for(var t,e,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw),r=0;r<i.x;r++)for(e=0;e<i.y;e++)(t=this.createTile({x:o.x+r,y:o.y+e})).visible||t.show()},Qy.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},Qy.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,o=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:new Dy(M((e=o).x),M(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},Qy.prototype.wrapIndex=function(t){var e=jy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},Qy.prototype.wrapValue=function(t,e){var i=jy.abs(t)%e;return 0<=t?i:e-(0==i?e:i)};var Wy,Xy,Yy=Qy,qy=((Wy=w.Class)&&(Zy.__proto__=Wy),((Zy.prototype=Object.create(Wy&&Wy.prototype)).constructor=Zy).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Zy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Zy.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},Zy.prototype.show=function(){var t=this.element,e=(t.style.top=Ny(this.options.offset.y),t.style.left=Ny(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Zy.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Zy.prototype.url=function(){return Uy(this.options.urlTemplate)(this.urlOptions())},Zy.prototype.errorUrl=function(){return Uy(this.options.errorUrlTemplate)(this.urlOptions())},Zy.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}},Zy);function Zy(t,e){Wy.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function Qy(t,e){Xy.call(this),this.element=t,this._initOptions(e),this.pool=new $y}i(qy,{urlTemplate:"",errorUrlTemplate:""}),(Ky=w.Class)&&(Jy.__proto__=Ky),((Jy.prototype=Object.create(Ky&&Ky.prototype)).constructor=Jy).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},Jy.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},Jy.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},Jy.prototype._create=function(t){for(var e,i=this._items,o=se(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new qy(o,t),this._items.push(e)),e},Jy.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);i<n&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))};var Ky,$y=Jy;function Jy(){Ky.call(this),this._items=[]}function tv(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}i($y,{maxSize:100});var ev,iv,ov,rv,nv,sv,av,hv=Object.assign,pv="change",lv=((av=Vx)&&(kv.__proto__=av),((kv.prototype=Object.create(av&&av.prototype)).constructor=kv).prototype.captureNext=function(){this.capture=!0},kv.prototype.cancelCapture=function(){this.capture=!1},kv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},kv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},kv),cv=((sv=Vx)&&(wv.__proto__=sv),((wv.prototype=Object.create(sv&&sv.prototype)).constructor=wv).prototype.makeVirtual=function(){hv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},wv.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},wv.prototype.outOfBounds=function(t){return t>this.max||t<this.min},wv.prototype.forceEnabled=function(){this.forcedEnabled=!0},wv.prototype.getSize=function(){return this.container[this.measure]},wv.prototype.getTotal=function(){return this.element[this.scrollSize]},wv.prototype.rescale=function(t){this.scale=t},wv.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();0===i&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||r<o,t)||e.trigger(pv,e)},wv),uv=((nv=Vx)&&(bv.__proto__=nv),((bv.prototype=Object.create(nv&&nv.prototype)).constructor=bv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},bv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},bv.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(pv)},bv),dv=((rv=Vx)&&(_v.__proto__=rv),((_v.prototype=Object.create(rv&&rv.prototype)).constructor=_v).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},_v.prototype.dragMove=function(t){var e,i=this.dimension,o=this.axis,r=this.movable,n=r[o]+t;i.enabled&&(e=t,(n<i.min&&t<0||n>i.max&&0<t)&&(e*=this.resistance),r.translateAxis(o,e),this.trigger(pv,this))},_v),fv=((ov=w.Class)&&(xv.__proto__=ov),(xv.prototype=Object.create(ov&&ov.prototype)).constructor=xv),gv=((iv=Vx)&&(mv.__proto__=iv),((mv.prototype=Object.create(iv&&iv.prototype)).constructor=mv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},mv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},mv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},mv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},mv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},mv.prototype.moveTo=function(t){hv(this,t),this.refresh()},mv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=tv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(pv))},mv.prototype._saveCoordinates=function(t){this.coordinates=t},mv),yv=w.drawing.Group,l;function vv(t,e){ev.call(this,t,e),this._pan=Vi(this._pan,this),this.surface=w.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new gv(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))}function mv(t){iv.call(this);var e=this,t=(e.support=Xi(),this.transformStyle=this.support.transitions.prefix+"Transform",e.element=t,e.element.style.webkitTransformOrigin="left top",e.x=0,e.y=0,e.scale=1,tv(e.x,e.y,e.scale));e.element.style[this.transformStyle]=t,e._saveCoordinates(t)}function xv(t){ov.call(this);var s,a,h,p=this;hv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new dv({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new dv({axis:"y",dimension:p.dimensions.y,resistance:t,movable:h}),p.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){p.gesture=t,p.offset=ie(p.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=p.gesture,i=e.center,o=t.center,e=t.distance/e.distance,r=p.dimensions.minScale,n=p.dimensions.maxScale,r=(h.scale<=r&&e<1&&(e+=.8*(1-e)),h.scale*e>=n&&(e=n/h.scale),h.x+p.offset.left),n=h.y+p.offset.top,r={x:(r-i.x)*e+o.x-r,y:(n-i.y)*e+o.y-n};h.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),p.dimensions.rescale(h.scale),(p.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function _v(t){rv.call(this),hv(this,t)}function bv(t){nv.call(this);this.x=new cv(hv({horizontal:!0},t)),this.y=new cv(hv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(pv,t)}function wv(t){sv.call(this);var e=this;e.forcedEnabled=!1,hv(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function kv(t,e){av.call(this);var i=this,o=t[0]||t,t=(i.capture=!1,Wi(navigator.userAgent));o.addEventListener?(t.down.split(" ").forEach(function(t){o.addEventListener(t,Vi(i._press,i),!0)}),t.up.split(" ").forEach(function(t){o.addEventListener(t,Vi(i._release,i),!0)})):(t.down.split(" ").forEach(function(t){o.attachEvent(t,Vi(i._press,i))}),t.up.split(" ").forEach(function(t){o.attachEvent(t,Vi(i._release,i))})),i.bind(["press","release"],e||{})}(ev=of)&&(vv.__proto__=ev),((vv.prototype=Object.create(ev&&ev.prototype)).constructor=vv).prototype.destroy=function(){ev.prototype.destroy.call(this),this.surface.destroy()},vv.prototype._reset=function(){ev.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},vv.prototype._initRoot=function(){this._root=new yv,this.surface.draw(this._root)},vv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},vv.prototype._resize=function(){this.surface.size(this.map.size())},vv.prototype._readData=function(){var t=ev.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},vv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Cv(this.map,this.options.style,this));for(var e=new yv,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},vv.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof w.drawing.Circle&&this.map.options.renderPointsAsMarkers?T(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},vv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},vv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},vv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},vv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},vv.prototype._panEnd=function(t){ev.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},vv.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},vv.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},vv.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},vv.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},vv.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},vv.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},vv.prototype._activate=function(){ev.prototype._activate.call(this),this._panHandler=Vi(this._pan,this),this.map.bind("pan",this.panHandler)},vv.prototype._deactivate=function(){ev.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},i(l=vv,{autoBind:!0,zIndex:100}),(Av=w.Class)&&(Tv.__proto__=Av),((Tv.prototype=Object.create(Av&&Av.prototype)).constructor=Tv).prototype.parse=function(t){var e=new yv,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=i&&e.children.length<2?e.children[0]:e},Tv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Tv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Tv.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},Tv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(ae(e).anchor()))&&(t.options.fill=null)},Tv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Tv.prototype._loadPolygon=function(t,e,i){e=this._buildPolygon(e);return e.dataItem=i,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},Tv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?w.drawing.MultiPath:w.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(Zg.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Tv.prototype._loadPoint=function(t,e,i){var e=Zg.fromLngLat(e),o=this.locator.locationToView(e),o=new w.geometry.Circle(o,10),o=new w.drawing.Circle(o,this.style);return o.dataItem=i,o.location=e,this._loadShape(t,o)};var Sv,Av,Cv=Tv,af;function Pv(){Sv.apply(this,arguments)}function Tv(t,e,i){Av.call(this),this.observer=i,this.locator=t,this.style=e}(Sv=l)&&(Pv.__proto__=Sv),((Pv.prototype=Object.create(Sv&&Sv.prototype)).constructor=Pv).prototype._readData=function(){return this.options.data||[]},Pv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=Ht(e.valueField),o=t.slice(0);o.sort(function(t,e){return i(e)-i(t)});for(var r=this._scaleType(),n=Ht(this.options.locationField),s=0;s<o.length;s++){var a,h,p,l=o[s],c=n(l),u=i(l);T(c)&&T(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=Zg.create(c),p=this.map.locationToView(c),h=a.map(u),(p=this._createSymbol({center:p,size:h,style:e.style,dataItem:l,location:c})).dataItem=l,p.location=c,p.value=u,this._drawSymbol(p))}}},Pv.prototype._scaleType=function(){var t=this.options.scale;return Tt(t)?t:Iv[t]},Pv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Tt(e)?e:Bv[e])(t)},Pv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Pv.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},Pv.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},i(af=Pv,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200}),(Ov=w.Class)&&(Fv.__proto__=Ov),((Fv.prototype=Object.create(Ov&&Ov.prototype)).constructor=Fv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var Mv,Ov,Iv={sqrt:Fv},Bv={circle:function(t){var e=new w.geometry.Circle(t.center,t.size/2);return new w.drawing.Circle(e,t.style)},square:function(t){var e=new w.drawing.Path(t.style),i=t.size/2,t=t.center;return e.moveTo(t.x-i,t.y-i).lineTo(t.x+i,t.y-i).lineTo(t.x+i,t.y+i).lineTo(t.x-i,t.y+i).close(),e}},Lv="mouseenter",Ev="mouseleave",Rv=Object.assign,Vv="k-marker",zv="."+Vv,jv=((Mv=of)&&(Dv.__proto__=Mv),((Dv.prototype=Object.create(Mv&&Mv.prototype)).constructor=Dv).prototype.destroy=function(){Mv.prototype.destroy.call(this),ji(this.element,"click",this._markerClickHandler),this.clear()},Dv.prototype.add=function(t){if(!vt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Dv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Dv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Dv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Dv.prototype._reset=function(){Mv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Dv.prototype.bind=function(t,e){t=Uv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Dv.prototype._addOne=function(t){t=Uv.create(t,this.options);return t.addTo(this),t},Dv.prototype._readData=function(){return this.options.data||[]},Dv.prototype._load=function(t){this._data=t,this.clear();for(var e=Ht(this.options.locationField),i=Ht(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},Dv.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},Dv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Dv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Dv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Rv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Dv);function Dv(t,e){Mv.call(this,t,e),this._markerClickHandler=Vi(this._markerClick,this),zi(this.element,"click",zv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Fv(t,e){Ov.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}i(jv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""}),(Hv=w.Class)&&(Gv.__proto__=Hv),((Gv.prototype=Object.create(Hv&&Hv.prototype)).constructor=Gv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Gv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Gv.prototype.location=function(t){return t?(this.options.location=Zg.create(t).toArray(),this.layer&&this.layer.update(this),this):Zg.create(this.options.location)},Gv.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=Ii(this._anchor.left),this.element.style.top=Ii(this._anchor.top)},Gv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},Gv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Vi(this._mouseEnter,this),zi(this.element,Lv,zv,this._mouseEnterHandler),this._mouseLeaveHandler=Vi(this._mouseLeave,this),zi(this.element,Ev,zv,this._mouseLeaveHandler))},Gv.prototype.unbindEvents=function(){this.element&&(ji(this.element,Lv,this._mouseEnterHandler),ji(this.element,Ev,this._mouseLeaveHandler))},Gv.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,mt(i=document.createElement("span"),Vv),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=Li(o),i.appendChild(o)):t.svgIcon?xe(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(o={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(o.icon="map-marker-target",xe(i,o)):"pin"===t.shape?xe(i,o):mt(i,"k-icon k-icon-xxl k-i-marker-"+Oi(t.shape||"pin")):xe(i,o)),t.title&&i.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){i.setAttribute(t,r[t])}),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents())},Gv.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},Gv.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()}},Gv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Gv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Gv.prototype._compileTemplate=function(t){return Mx.compile(t,{paramName:"dataItem",useWithBlock:!1})},Gv.create=function(t,e){return t instanceof Gv?t:new Gv(x({},e,t))};var Hv,Uv=Gv,Nv=Object.assign;function Gv(t){Hv.call(this),this.options=t||{}}function Wv(t){window.requestAnimationFrame(t)}($v=w.Class)&&(fm.__proto__=$v),((fm.prototype=Object.create($v&&$v.prototype)).constructor=fm).prototype.tick=function(){},fm.prototype.done=function(){},fm.prototype.onEnd=function(){},fm.prototype.onCancel=function(){},fm.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Wv(this._tickProxy)))},fm.prototype.enabled=function(){return!0},fm.prototype.cancel=function(){this._started=!1,this.onCancel()},fm.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Wv(this._tickProxy))};var Xv,Yv,qv,Zv,Qv,Kv,$v,Nn,Jv=((Kv=Nn=fm)&&(dm.__proto__=Kv),((dm.prototype=Object.create(Kv&&Kv.prototype)).constructor=dm).prototype.done=function(){return this.timePassed()>=this.duration},dm.prototype.timePassed=function(){return Math.min(this.duration,Hi()-this.startDate)},dm.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[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=Hi(),e.start()},dm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},dm.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},dm),tm=Object.assign,em=Math.abs,im="change",om=((Qv=Nn)&&(um.__proto__=Qv),((um.prototype=Object.create(Qv&&Qv.prototype)).constructor=um).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},um.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},um.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},um.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},um),rm=((Zv=Nn)&&(cm.__proto__=Zv),((cm.prototype=Object.create(Zv&&Zv.prototype)).constructor=cm).prototype.onCancel=function(){this.transition.cancel()},cm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},cm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},cm.prototype.done=function(){return em(this.velocity)<1},cm.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),Zv.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),Zv.prototype.start.call(this)))},cm.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=i,i=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(i)&&(i=Math.max(Math.min(i,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,i)},cm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},cm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},cm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Jv.easeOutExpo})},cm),nm=((qv=Nn)&&(lm.__proto__=qv),((lm.prototype=Object.create(qv&&qv.prototype)).constructor=lm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},lm.prototype.done=function(){return em(this.offset.y)<5&&em(this.offset.x)<5},lm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},lm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},lm.prototype.setCallback=function(t){t&&Tt(t)&&(this.callback=t)},lm.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}},lm),sm=((Yv=w.Class)&&(pm.__proto__=Yv),((pm.prototype=Object.create(Yv&&Yv.prototype)).constructor=pm).prototype.refresh=function(){var t=this.axis,e=this.dimension,i=e.size,o=this.scrollMovable,e=i/e.total,o=Math.round(-o[t]*e),r=Math.round(i*e);this.element.style.display=1<=e?"none":"",i<o+r?r=i-o:o<0&&(r+=o,o=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,o)},pm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},pm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},pm),am=((Xv=Vx)&&(hm.__proto__=Xv),((hm.prototype=Object.create(Xv&&Xv.prototype)).constructor=hm).prototype._initOptions=function(t){this.options=x({},this.options,t)},hm.prototype._wheelScroll=function(t){var e,i,o;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),i=t.originalEvent||t,o=i.wheelDeltaY,i.wheelDelta?void 0!==o&&!o||(e=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(e=10*-i.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},hm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},hm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},hm.prototype.height=function(){return this.dimensions.y.size},hm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},hm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},hm.prototype._resize=function(){this._native||this.contentResized()},hm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},hm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},hm.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)},hm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},hm.prototype.enable=function(){this.enabled=!0},hm.prototype.disable=function(){this.enabled=!1},hm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(em(t)),this.scrollElement.scrollTop(em(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},hm.prototype.animatedScrollTo=function(t,e,i){var o;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(o,{x:t,y:e}),this.animatedScroller.setCallback(i),this.animatedScroller.start())},hm.prototype.pullHandled=function(){},hm.prototype.destroy=function(){var t=this.element;ji(t,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},hm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},hm.prototype._initPullToRefresh=function(){},hm.prototype._dragEnd=function(){},hm.prototype._paneChange=function(){},hm.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new sm({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(im,function(){s.refresh()}),n.bind(im,function(){s.show()}),e[t+"inertia"]=new rm({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,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})}})},hm);function hm(t,e){Xv.call(this);var s=this;this.element=t,this._initOptions(e);e=navigator.userAgent;e=(e=Ei(e)).ios||e.android,s._native=s.options.useNative&&e,e=Li('<div class="km-scroll-header"/>');if(s._native)mt(t,"km-native-scroller"),Mi(e,t),tm(s,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",mt(t,"km-scroll-wrapper");var i=t,o=Li('<div class="km-scroll-container"/>');for(i.appendChild(o);i.firstChild!==o;)o.appendChild(i.firstChild);Mi(e,t);var e=t.children[1],r=new lv(t),n=new gv(e),a=new uv({element:e,container:t,forcedEnabled:s.options.zoom}),h=this.options.avoidScrolling,p=new mo(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:s.options.zoom,supportDoubleTap:s.options.supportDoubleTap,start:function(t){a.refresh();var e=em(t.x.velocity),i=em(t.y.velocity),o=i<=2*e;r=s.fixedContainer,n=t.event.target;var r,n,e=e<=2*i;!(r===n||function(t){if(n)for(var e=n.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(r))&&!h(t)&&s.enabled&&(a.x.enabled&&o||a.y.enabled&&e)?p.capture():p.cancel()}}),l=new fv({movable:n,dimensions:a,userEvents:p,elastic:s.options.elastic}),c=new om({movable:n,dimensions:a,userEvents:p,tapCapture:r}),u=new nm({moveTo:function(t){s.scrollTo(t.x,t.y)}});n.bind(im,function(){s.scrollTop=-n.y,s.scrollLeft=-n.x,s.trigger("scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),s.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),zi(t,"wheel",this._wheelScrollHandler)),tm(s,{movable:n,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:p,pane:l,tapCapture:r,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),s._initAxis("x"),s._initAxis("y"),s._wheelEnd=function(){s._wheel=!1,s.userEvents.end(0,s._wheelY)},a.refresh(),s.options.pullToRefresh&&s._initPullToRefresh()}}function pm(t){Yv.call(this);var e="x"===t.axis,i=Li('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');tm(this,t,{element:i,elementSize:0,movable:new gv(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(im,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}function lm(t){qv.call(this,t),tm(this,t,{origin:{},destination:{},offset:{}})}function cm(t){Zv.call(this);var e=this;tm(e,t,{transition:new Jv({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",Vi(e.start,e)),e.userEvents.bind("gestureend",Vi(e.start,e)),e.userEvents.bind("tap",Vi(e.onEnd,e))}function um(t){Qv.call(this,t);tm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function dm(t){Kv.call(this),Nv(this,t)}function fm(){$v.call(this);this._tickProxy=Vi(this._tick,this),this._started=!1}function gm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}i(am,{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"}}),Fi(am,["pull","scroll","resize"]),gm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const Db=gm;var ym,vm=Math,mm=vm.min,xm=vm.pow,_m=w.geometry.Point,bm="marker",wm="location",km={bubble:af,shape:l,tile:Jd},t;function I(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),ym.call(this),this._init(t,e,i,o)}km[bm]=jv,(ym=Vx)&&(I.__proto__=ym),((I.prototype=Object.create(ym&&ym.prototype)).constructor=I).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(),vt(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();ji(this.element,"wheel",this._mousewheelHandler),ym.prototype.destroy.call(this)},I.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=Xi(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new fy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,w.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},zi(this.element,"wheel",this._mousewheelHandler)},I.prototype._initOptions=function(t){this.options=x({},this.options,t)},I.prototype._initElement=function(t){mt(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Ti(t);t=Li("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new Db(this,t)},I.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},I.prototype.addObserver=function(t){t&&this.observers.push(t)},I.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},I.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},I.prototype.trigger=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o||ym.prototype.trigger.call(this,t,e),o},I.prototype._notifyObserver=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},I.prototype.zoom=function(t){var e=this.options,t=T(t)?(t=vm.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},I.prototype.center=function(t){var e=t?(t=Zg.create(t),e=Zg.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Ly,{center:this.options.center}),this._reset()),this):Zg.create(this.options.center);return e},I.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},I.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Ti(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=Zg.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},I.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=_m.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},I.prototype.locationToView=function(t){var t=Zg.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},I.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=_m.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,i=ie(this.element);return t=t.x&&t.x[wm]||t.y&&t.y[wm]?(e=t.x[wm]-i.left,t.y[wm]-i.top):(t=t.originalEvent||t,e=O(t.pageX,t.clientX)-i.left,O(t.pageY,t.clientY)-i.top),new w.geometry.Point(e,t)},I.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},I.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},I.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},I.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:mm(e,i),height:mm(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},I.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=Zg.create(t);return(t=this.locationToLayer(t,e)).x+=i.width/2,t.y+=i.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(Ly,{center:this.options.center}),this},I.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},I.prototype._setExtent=function(t){var e=By.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new By(e.nw,i));this.center(o.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(o.nw,s),h=this.locationToLayer(o.se,s),p=vm.abs(h.x-a.x),h=vm.abs(h.y-a.y);if(p<=r&&h<=n)break}this.zoom(s)},I.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize(),i=(e.x+=i.width,e.y+=i.height,this.layerToLocation(e));return new By(t,i)},I.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},I.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))},I.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+Ni(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(mt(i=document.createElement("div"),"k-map-controls "+Ni(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},I.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new gy(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new wy(e,x({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},I.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,o=this.element.clientWidth,r=this.element.clientHeight,i=_(i,t.x.min,t.x.max-o),e=_(e,t.y.min,t.y.max-r);this.scroller.one("scroll",Vi(this._scrollEnd,this)),this.scroller.scrollTo(-i,-e)},I.prototype._navigatorCenter=function(){this.center(this.options.center)},I.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Cy(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},I.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new am(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",Vi(this._scroll,this)),t.bind("scrollEnd",Vi(this._scrollEnd,this)),t.userEvents.bind("gesturestart",Vi(this._scaleStart,this)),t.userEvents.bind("gestureend",Vi(this._scale,this)),t.userEvents.bind("doubleTap",Vi(this._doubleTap,this)),t.userEvents.bind("tap",Vi(this._tap,this)),this.scrollElement=t.scrollElement},I.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],o=this._createLayer(o);e.push(o)}},I.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===bm?x({},this.options.markerDefaults,t,{icons:this.options.icons}):x({},i,t),t=new km[e](this,i);return e===bm&&(this.markers=t),t},I.prototype._createTooltip=function(){return new Ey(this.widgetService,this.options.tooltip)},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===bm}).length||(this.markers=new jv(this,x({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},I.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,i=new w.geometry.Point(i.x,i.y).scale(-1).scale(1/i.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()})},I.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Hi(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},I.prototype._panComplete=function(){return 50<Hi()-(this._panEndTimestamp||0)},I.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},I.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),i=new w.geometry.Point(t.center.x,t.center.y),o=this.viewToLocation(i,e),o=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t})},I.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=vm.log(t)/vm.log(2);return vm.round(t)},I.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")},I.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=xm(2,this.options.minZoom-n),t.dimensions.maxScale=xm(2,this.options.maxZoom-n),{min:-r.x,max:o-r.x}),n={min:-r.y,max:o-r.y};this.options.wraparound&&(t.max=20*o,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),i.makeVirtual(),e.virtualSize(t.min,t.max),i.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},I.prototype._renderLayers=function(){},I.prototype._layerSize=function(t){t=O(t,this.options.zoom);return this.options.minSize*xm(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},I.prototype._doubleTap=function(t){var e,i,o;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._mousewheel=function(t){var e=0<Kt(t)?-1:1,i=this.options,o=this.zoom(),e=_(o+e,i.minZoom,i.maxZoom);!1===i.zoomable||e===o||this.trigger("zoomStart",{originalEvent:t})||(i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._toDocumentCoordinates=function(t){var e=ie(this.element);return{left:M(t.x+e.left),top:M(t.y+e.top)}},i(t=I,{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}),Fi(t,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const Fb=t;function Sm(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function Am(t,e){return Tm(t.source,e.source)}function Cm(t,e){return Tm(t.target,e.target)}function Pm(t){return t.value}var Tm=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function Mm(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(Cm)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(Am)})})}function Om(t){var e=t.nodesOptions,i=e.offset,o=(void 0===i&&(i={}),e.align);this.data={nodes:t.nodes.map(function(t){return x({},{offset:i,align:o},t)}),links:t.links.map(function(t){return x({},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}function Im(t){return new Om(t).calculate()}function Bm(t,e,i,o,r,n){n=(n-e)*(i-t),i=(o-e)*(r-t);return i<n?1:n==i?0:-1}function Lm(t,e,i,o){return e=x({},e,e.node),x({},{color:(i=i,o=o,t.color||i[o%i.length])},e,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})}Om.prototype.calculate=function(){var t=this.data,e=t.nodes,t=t.links,t=(this.connectLinksToNodes(e,t),this.calculateNodeValues(e),this.calculateNodeHeights(e));if(t)return{nodes:[],links:[],columns:[],circularLinks:t};this.calculateNodeDepths(e);t=this.calculateNodeColumns(e);return this.calculateNodeBreadths(t),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:t})},Om.prototype.connectLinksToNodes=function(t,e){var i=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,i.set(t.id,t)}),e.forEach(function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)})},Om.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(Sm(t.sourceLinks,Pm),Sm(t.targetLinks,Pm))})},Om.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var h=s.sourceLinks[a];i.add(h.target)}}o++,e=i,i=new Set}},Om.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach(function(t){o.add(t.source)})};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},Om.prototype.calculateNodeColumns=function(t){for(var e,i=Math.max.apply(null,t.map(function(t){return t.depth})),o=(this.width-this.offsetX-this.nodeWidth)/i,r=new Array(i+1),n=0;n<t.length;n++){var s=t[n],a=Math.max(0,Math.min(i,(e=i,"left"===(a=s).align?a.depth:"right"===a.align?e-a.height:a.sourceLinks.length?a.depth:e)));s.x0=this.offsetX+a*o,s.x1=s.x0+this.nodeWidth,r[s.layer=a]=r[a]||[],r[a].push(s)}return r},Om.prototype.calculateNodeBreadths=function(t){var e=this,o=Math.min.apply(null,t.map(function(t){return(e.height-e.offsetY-(t.length-1)*e.nodePadding)/Sm(t,Pm)}));if(t.forEach(function(t){var i=e.offsetY;t.forEach(function(t){t.y0=i,t.y1=i+t.value*o,i=t.y1+e.nodePadding,t.sourceLinks.forEach(function(t){t.width=t.value*o})}),i=(e.height-i+e.nodePadding)/(t.length+1),t.forEach(function(t,e){t.y0+=i*(e+1),t.y1+=i*(e+1)})}),!1!==this.autoLayout)for(var i=void 0!==this.loops?this.loops:t.length-1,r=this.targetColumnIndex||1,n=0;n<i;n++)this.reverse?(this.uncurlLinksToRight(t,r),this.uncurlLinksToLeft(t,r)):(this.uncurlLinksToLeft(t,r),this.uncurlLinksToRight(t,r));t.forEach(Mm)},Om.prototype.applyNodesOffset=function(t){t.forEach(function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i})},Om.prototype.calculateLinkBreadths=function(t){t.forEach(function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach(function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width}),i.forEach(function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width})})},Om.prototype.uncurlLinksToRight=function(t,e){for(var n=this,i=t.length,o=e;o<i;o++){var r=t[o];r.forEach(function(i){var o=0,r=0,t=(i.targetLinks.forEach(function(t){var e=t.value*(i.layer-t.source.layer);o+=n.targetTopPos(t.source,i)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Mm([i])}),r.sort(Tm),this.arrangeNodesVertically(r)}},Om.prototype.uncurlLinksToLeft=function(t,e){for(var n=this,i=t.length-1-e;0<=i;i--){for(var s=t[i],o=0;o<s.length;o++)!function(t){var i=s[t],o=0,r=0,t=(i.sourceLinks.forEach(function(t){var e=t.value*(t.target.layer-i.layer);o+=n.sourceTopPos(i,t.target)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Mm([i])}(o);s.sort(Tm),this.arrangeNodesVertically(s)}},Om.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},Om.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},Om.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;0<=r;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},Om.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},Om.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i},(zm=w.Class)&&(Wm.__proto__=zm),((Wm.prototype=Object.create(zm&&zm.prototype)).constructor=Wm).prototype.createVisual=function(){this.visual=this.createElement()},Wm.prototype.exportVisual=function(){return this.visual},Wm.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()},Wm.prototype.getSender=function(){return this};var Em,Rm,Vm,zm,h,jm=((Vm=h=Wm)&&(Gm.__proto__=Vm),((Gm.prototype=Object.create(Vm&&Vm.prototype)).constructor=Gm).prototype.getElement=function(){var t=this.options.node,t=new w.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0]);return w.drawing.Path.fromRect(t,this.visualOptions())},Gm.prototype.visualOptions=function(){var t=x({},this.options,this.options.node);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:t.node.label.text}},Gm),Dm=((Rm=h)&&(Nm.__proto__=Rm),((Nm.prototype=Object.create(Rm&&Rm.prototype)).constructor=Nm).prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,t=t.y1,r=(e+i)/2;return new w.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([r,o],[r,t],[i,t])},Nm.prototype.visualOptions=function(){var t=this.options,e=this.options.link;return{stroke:{width:t.link.width,color:e.color||t.color,opacity:(T(e.opacity)?e:t).opacity}}},Nm),Fm="before",Hm=((Em=h)&&(Um.__proto__=Em),((Um.prototype=Object.create(Em&&Em.prototype)).constructor=Um).prototype.getElement=function(){var t,e=x({},this.options,this.options.node.label),i=e.node,o=e.totalWidth,r=e.position,n=e.text,s=e.offset;return e.visible&&n?(e=new E(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),(n=new Xx(n,t)).reflow(new E),t=n.box,o=i.x1+t.width()>o,e=e.center().y-t.height()/2,r=[(r===Fm||"inside"===r&&o?Fm:"after")==Fm?i.x0-t.width():i.x1,e],(o=new E(r[0],r[1],r[0]+t.width(),r[1]+t.height())).translate(s.left||0,s.top||0),n.reflow(o),n.renderVisual(),n.visual):null},Um.prototype.visualOptions=function(){var t=x({},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}},Um);function Um(){Em.apply(this,arguments)}function Nm(){Rm.apply(this,arguments)}function Gm(){Vm.apply(this,arguments)}function Wm(t){zm.call(this),this.options=x({},this.options,t),this.createVisual()}function Xm(t,e,i){return x({},e,{node:t,totalWidth:i,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})}i(Hm,{position:"inside"}),(Ym=h)&&(Zm.__proto__=Ym),((Zm.prototype=Object.create(Ym&&Ym.prototype)).constructor=Zm).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;return!1!==t.visible&&i?((i=Yx.buildTitle(i,t)).reflow(e),i.renderVisual(),i.visual):null},Zm.prototype.createElement=function(){return this.getElement()};var Ym,qm=Zm;function Zm(){Ym.apply(this,arguments)}function Qm(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}i(qm,{align:b,border:{width:0},margin:P(5),padding:P(5)}),(Km=h)&&(Jm.__proto__=Km),((Jm.prototype=Object.create(Km&&Km.prototype)).constructor=Jm).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.nodes,o=(void 0===i&&(i=[]),t.item);return!1!==t.visible&&i.length?((i=i.map(function(t){return{text:t.label&&t.label.text||"",area:{background:void 0!==o.areaBackground?o.areaBackground:t.color,opacity:void 0!==o.areaOpacity?o.areaOpacity:t.opacity},node:t}})).sort(Qm),(t=new I1(Object.assign({},t,{data:i}))).reflow(e),t.renderVisual(),t.visual):null},Jm.prototype.createElement=function(){return this.getElement()};var Km,$m=Jm;function Jm(){Km.apply(this,arguments)}i($m,{markers:{visible:!1},item:{type:pn,cursor:gt,opacity:1},position:k,align:b,border:{width:0}});var tx,ex="link",ix="node",ox=((tx=Vx)&&(B.__proto__=tx),((B.prototype=Object.create(tx&&tx.prototype)).constructor=B).prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver()},B.prototype._initElement=function(t){mt(this.element=t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document"),t.tabIndex=t.getAttribute("tabindex")||0;var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},B.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},B.prototype._initResizeObserver=function(){var o=this,t=new ResizeObserver(function(t){t.forEach(function(t){var e=t.contentRect,i=e.width,e=e.height;t.target!==o.element||o.size&&o.size.width===i&&o.size.height===e||(o.size={width:i,height:e},o.surface.setSize(o.size),o.resize=!0,o._redraw())})});(this._resizeObserver=t).observe(this.element)},B.prototype._createSurface=function(){return w.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)})},B.prototype._initTheme=function(t){t=t||this.theme||{};this.theme=t,this.options=x({},t,this.options)},B.prototype.setLinksOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.opacity)})},B.prototype.setLinksInactivityOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.highlight.inactiveOpacity)})},B.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:T(i)?i:e}))},B.prototype.trigger=function(t,e){e=Object.assign({},e,{type:t,targetType:e.element.type,dataItem:e.element.dataItem});return tx.prototype.trigger.call(this,t,e)},B.prototype._mouseenter=function(t){var e=t.element,i=e.type===ex,o=e.type===ix,r=Boolean(e.chartElement&&e.chartElement.options.node);i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t)||(t=this.options.links.highlight,i?(this.setLinksInactivityOpacity(t.inactiveOpacity),this.setOpacity(e,t.opacity,e.linkOptions.highlight.opacity)):o?this.highlightLinks(e,t):r&&(i=this.nodesVisuals.get(e.chartElement.options.node.id),this.highlightLinks(i,t)))},B.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===ex,r=i.type===ix,i=Boolean(i.chartElement&&i.chartElement.options.node),n=t.originalEvent.relatedTarget;o&&n&&"text"===n.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t))||r&&this.trigger("nodeLeave",t)||(o||r||i)&&this.linksVisuals.forEach(function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})},B.prototype._mousemove=function(t){var e,i,o,r=this,n=this.options.tooltip,s=n.followPointer,n=n.delay,a=t.element,h=a.type;h!==ex&&h!==ix||this.tooltipShown&&!s||(e=t.originalEvent,o=this.element.getBoundingClientRect(),i=e.clientX-o.left<o.width/2,o=e.clientY-o.top<o.height/2,t.tooltipData={popupOffset:{left:e.pageX,top:e.pageY},popupAlign:{horizontal:i?"left":"right",vertical:o?"top":"bottom"}},h===ix&&(i=(e=a.dataItem).sourceLinks,h=(o=e.targetLinks).length?o:i,t.nodeValue=h.reduce(function(t,e){return t+e.value},0)),this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),a=s&&this.tooltipShown?0:n,this.tooltipTimeOut=setTimeout(function(){r.trigger("tooltipShow",t),r.tooltipShown=!0,r.tooltipTimeOut=null},a))},B.prototype._click=function(t){var e=t.element,i=e.type===ex;e.type===ix?this.trigger("nodeClick",t):i&&this.trigger("linkClick",t)},B.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach(function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)}))},B.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},B.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},B.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},B.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},B.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},B.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,t=t.height;this.size={width:e,height:t},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},B.prototype._getSize=function(){return this.element.getBoundingClientRect()},B.prototype.createVisual=function(){this.visual=this._render()},B.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new qm(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},B.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new $m(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},B.prototype.calculateSankey=function(o,t){var e=t.title,i=t.legend,r=t.data,n=t.nodes,s=t.labels,a=t.nodeColors,t=!t.disableAutoLayout,h=new E(0,0,o.width,o.height),p=this.titleBox(e,h),l=h.clone(),e=(p&&(c=p.height(),l=e.position===C?(h.unpad({top:c}),new E(0,c,o.width,o.height)):(h.shrink(0,c),new E(0,0,o.width,o.height-c))),this.legendBox(i,r.nodes,l)),c=i&&i.position||$m.prototype.options.position,r=(e&&(c===S&&h.unpad({left:e.width()}),c===A&&h.shrink(e.width(),0),c===C&&h.unpad({top:e.height()}),c===k)&&h.shrink(0,e.height()),Im(Object.assign({},o,{offsetX:0,offsetY:0,width:h.width(),height:h.height()}))),l=r.nodes,i=r.circularLinks;if(i)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],circularLinks:i},legendBox:e,titleBox:p};var u=new E,d=(l.forEach(function(t,e){e=Lm(t,n,a,e),e=new jm(e),u.wrap(ui(e.exportVisual().rawBBox())),e=new Hm(Xm(t,s,h.width())).exportVisual();e&&u.wrap(ui(e.rawBBox()))}),h.x1),f=h.y1,g=h.width()+d,y=h.height()+f;if(g-=u.x2>h.width()?u.x2-h.width():0,y-=u.y2>h.height()?u.y2-h.height():0,d+=u.x1<0?-u.x1:0,f+=u.y1<0?-u.y1:0,!1==t)return{sankey:Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y,autoLayout:!1})),legendBox:e,titleBox:p};if(this.resize&&t&&this.permutation)this.resize=!1;else{for(var v=Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y,autoLayout:!1})).columns.length,m=[],x=function(t,e){var i=function(t){for(var e=0,i=t.length,o=0;o<i;o++)for(var r=t[o],n=o+1;n<i;n++){var s=t[n],a=Bm((l=r).x0,l.y0,l.x1,l.y1,s.x1,s.y1),h=Bm(l.x0,l.y0,l.x1,l.y1,s.x0,s.y0),p=Bm(l.x0,l.y0,s.x0,s.y0,s.x1,s.y1),l=Bm(l.x1,l.y1,s.x0,s.y0,s.x1,s.y1);a!==h&&p!==l&&(e+=Math.min(r.value,s.value))}return e}(Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y,loops:2,targetColumnIndex:t,reverse:e})).links);return m.push({crosses:i,reverse:e,targetColumnIndex:t}),0===i},_=1;_<=v-1&&!x(_,!1)&&!x(_,!0);_++);var b=Math.min.apply(null,m.map(function(t){return t.crosses})),c=m.find(function(t){return t.crosses===b});this.permutation={targetColumnIndex:c.targetColumnIndex,reverse:c.reverse}}return{sankey:Im(Object.assign({},o,{offsetX:d,offsetY:f,width:g,height:y},this.permutation)),legendBox:e,titleBox:p}},B.prototype._render=function(t,e){var s,a,i,t=t||this.options,e=e||this,r=t.data,o=t.labels,n=t.nodes,h=t.links,p=t.nodeColors,l=t.title,c=t.legend,u=e.size,d=u.width,u=u.height,f=Object.assign({},r,{width:d,height:u,nodesOptions:n,title:l,legend:c}),f=this.calculateSankey(f,t),t=f.sankey,g=f.titleBox,f=f.legendBox,y=t.nodes,v=t.links,m=new w.drawing.Group({clip:w.drawing.Path.fromRect(new w.geometry.Rect([0,0],[d,u]))});return g&&(d=new qm(Object.assign({},l,{drawingRect:g})).exportVisual(),m.append(d)),t.circularLinks||(s=new Map,e.nodesVisuals=s,y.forEach(function(t,e){var i=Lm(t,n,p,e),o=new jm(i).exportVisual();o.links=[],o.type=ix,t.color=i.color,t.opacity=i.opacity,o.dataItem=Object.assign({},r.nodes[e],{color:i.color,opacity:i.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}})}),s.set(t.id,o),m.append(o)}),u=v.slice().sort(function(t,e){return e.value-t.value}),a=[],e.linksVisuals=a,u.forEach(function(t){var e,i=t.source,o=t.target,i=s.get(i.id),o=s.get(o.id),r=(r=i,n=o,"source"===(e=x({},h,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight})).colorType?e.color=r.options.fill.color:"target"===e.colorType&&(e.color=n.options.fill.color),e),n=new Dm(r).exportVisual();n.type=ex,n.dataItem={source:Object.assign({},i.dataItem),target:Object.assign({},o.dataItem),value:t.value},n.linkOptions=r,a.push(n),i.links.push(n),o.links.push(n),m.append(n)}),i=y.reduce(function(t,e){return Math.max(t,e.x1)},0),y.forEach(function(t){t=Xm(t,o,i),t=new Hm(t).exportVisual();t&&m.append(t)}),f&&(l=new $m(Object.assign({},c,{drawingRect:f,nodes:y})).exportVisual(),m.append(l))),m},B.prototype.exportVisual=function(t){var e=t&&t.options?x({},this.options,t.options):this.options,t={size:{width:(T(t&&t.width)?t:this.size).width,height:(T(t&&t.height)?t:this.size).height}};return this._render(e,t)},B.prototype._setOptions=function(t){this.options=x({},this.options,t)},B);function B(t,e,i){tx.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver())}i(ox,{title:{position:C},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},align:S,offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2}},tooltip:{followPointer:!1,delay:200}});var rx=function(t,a,h){var p=new Set,l=new Map,c=new Map,o=(t.forEach(function(e){a.forEach(function(t){p.add(t.value(e))});for(var t=0;t<a.length-1;t++){var i=a[t].value(e),o=a[t+1].value(e),r=i+"_"+o,n=h.value(e),s=l.get(r);void 0!==s?l.set(r,s+n):(l.set(r,n),c.set(r,{source:i,target:o}))}}),new Map);return{nodes:Array.from(p).map(function(t,e){return o.set(t,e),{id:e,label:{text:String(t)}}}),links:Array.from(l).map(function(t){var e=t[0],t=t[1],e=c.get(e),i=e.source,e=e.target;return{sourceId:o.get(i),targetId:o.get(e),value:t}})}},nx=1.5,sx=.4,ax="#000",o,hx="11px "+(o="Arial, Helvetica, sans-serif"),px="12px "+o,lx="16px "+o,cx="transparent",ux="#fff",dx={type:bn},fx={type:pn},gx=Object.assign({},fx,{markers:{visible:!1},highlight:{visible:!1}}),yx=function(){return{icon:{border:{width:1}},label:{font:px,padding:3},line:{length:10,width:2},legendItem:gx,visible:!0}},vx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:fx,opacity:.4}},mx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:fx,opacity:.4}},xx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:ux,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:gx}},_x=function(){return{gap:nx,spacing:sx,target:{color:"#ff0000"},legendItem:gx}},bx=function(){return{width:2,legendItem:dx}},wx=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:fx,opacity:.5}},kx=function(){return{markers:{visible:!1},legendItem:dx,width:2}},Sx=function(){return{gap:.5,line:{color:ax,width:1},legendItem:gx,spacing:sx}},Ax=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:gx}},Cx=Ax,Px=function(t){return Object.assign({color:rt,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:dx},t)},Tx=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:px},notes:yx(),title:{font:lx,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:hx},overlay:t.gradients?{}:{gradient:"none"},area:vx(),rangeArea:mx(),verticalRangeArea:mx(),bar:{gap:nx,spacing:sx,legendItem:gx},boxPlot:xx(),bubble:{border:{width:0},labels:{background:cx},legendItem:gx,opacity:.6},bullet:_x(),candlestick:{border:{_brightness:.8,width:1},downColor:ux,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:ax,width:1},legendItem:gx,spacing:.3},column:{gap:nx,spacing:sx,legendItem:gx},heatmap:{labels:{color:"",background:cx,visible:!0},highlight:{border:{width:0}},legendItem:gx},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:gx},donut:{margin:1,legendItem:gx},funnel:Ax(),pyramid:Cx(),horizontalWaterfall:Sx(),line:bx(),notes:yx(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:gx,spacing:.3},radarArea:wx(),radarLine:kx(),radarColumn:{legendItem:gx},polarArea:wx(),polarLine:kx(),polarScatter:{legendItem:dx},rangeBar:{gap:nx,spacing:sx,legendItem:gx},rangeColumn:{gap:nx,spacing:sx,legendItem:gx},scatter:{legendItem:dx},scatterLine:{width:1,legendItem:dx},verticalArea:vx(),verticalBoxPlot:xx(),verticalBullet:_x(),verticalLine:bx(),waterfall:Sx(),linearTrendline:Px(),exponentialTrendline:Px({style:"smooth"}),logarithmicTrendline:Px({style:"smooth"}),polynomialTrendline:Px({style:"smooth"}),powerTrendline:Px({style:"smooth"}),movingAverageTrendline:Px()},title:{font:lx},subtitle:{font:px},legend:{labels:{font:px}}}}}return F})())}}});