/* @license Copyright (C) Exontrol. All rights reserved. */ !function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):(t="undefined"!=typeof globalThis?globalThis:t||self,o(t.exontrol||{}))}(this,function(t){"use strict";function o(){}function e(t,o){return pi(ui(t,o||re))}function i(t,o){return t&&s(o)&&(t=""+t+""),t}function n(t){var o=t[0];t[0]=t[1],t[1]=o}function r(t,o,e,i){var n;o&&t&&((n=t.exontrol=t.exontrol||{}).ll1x=n.ll1x||0,n.ll1x++),e&&e.call(i),n&&--n.ll1x}function s(t){return null!=t}function a(t){return null==t}function l(t){return t instanceof Array}function u(t){return t instanceof Map}function h(t){return t instanceof Function}function c(t){return l(t)?2:ni(t)?1:0}function p(t,o,e){return t>=o&&t=0&&(t=Je(t.toFixed(o))),t}function C(t,o,e){if(o=~~o){if(1==o)t=function(t){return l(t)&&(t=t[0]),y(t)}(t);else if(ii(t)&&(t=t.split($o)),c(t)){l(t)||(t=[y(t)]);for(i=t.length;ir)&&(r=e)}}),!i&&ni(n)&&ni(r)&&(n=hi(n,0),r=ui(r,0)),o=o||{},o.m=n,o.M=r,o}return e>1?function(t,o,e,i,n){var r=NaN,s=r;if(wt(t,e,function(t){if(l(t)){if(l(r))for(o=0;o=A&&!((e-A)%T)&&l.set(u+Ze).push(D(H(t,o,i),M))})),s(i.o.shapeChart)&&l.set(u+_e).push(Bo.p(fo(i,M),{s:a.toShape(i.o.shapeChart)})),l}function E(t,o,e,i,n,r,a,l,u){var h,c,p,f,g=a.getRS(),v=a.getMisc(),d=i.s,y=Ii[d],S=Xi[d],m=jo[d].nfs,C=i.o,x=i.a.l,A=i.a.c,T=F(i,r,a),b=g.csz,G=T.l-b,O=Je(v.showTicksIf,ke),E=Je(v.showLabelsIf,De),L=Je(v.showGridLinesIf,Pe),M=ui(0,Je(v.categoryAxisSize,ve)),k=ui(0,Je(v.categoryAxisPad,de)),P=C.majorTicks,D=ui(0,$e(P&&P.skip)),U=ui(1,$e(P&&P.step)),z=Mt(C,"labels",d),I=Mt(C,"title",d),W=x.length,X=A.length,H=C==g.gdC().o,B=function(t,o,e){var i,n=t.a.s,r=o.s;n&&(i=n[n.length-1],r=(i.i+i.l)*e.getMV().t/n.length);return r}(i,T,a),N=C.reverse&&!H?-1:1,Z=N<0&&!H?W:ui(g.l,W),j=g.csz,K=R(r),_=Yi[d];if(l=l||new Bo,Q(i)&&(W&&!ei(e)&&St(t,C.tfi,function(){if(!ei(o)&&s(C.shape)&&l.set(u+Be).push(Bo.p(o,{s:a.toShape(C.shape)})),l.set(u).push([Y(i,T.i,o,T,d),Y(i,T.i+G,o,T,d)]),p=B>=O,f=B>=E,p||f)for(var n=T.i,r=N<0?Z-1-n:n,h=N<0?Z-n:n,c=n+G;n<=c;n++,r+=N,h+=N){var g,v,R=Y(i,n,o,T,d),A=V(R,y,M),L=r>=0&&r=0&&et=0&&etL){h=ui(0,$e(n.skip)),c=ui(1,$e(n.step));for(var ot=T.i,et=N<0?Z-1-ot:ot,it=N<0?Z-ot:ot,nt=ot+G;ot<=nt;ot++,et+=N,it+=N)q(it,h,c)&&l.set(u+Ze).push(_(Y(i,ot,o,T,d),K))}return l}function L(t,o,e,i,n,r,s){var a=n.getRS().gdV(),l=It(n),u=l[o.s.GetIndex()%l.length];return r=r||new Bo,Et(o).forEach(function(t){var l=[];t.forEach(function(t,r){l.push(Bo.p(function(t,o,e,i){var n=R(e),r=qe.R2C(n),s=Ct(Io(i.getMisc())),a=H(t[1],[[0,0],[0,n[3]/2]],o)[1];return oo(r,a,s+Ct(t[0]),!0)}(t,a,i,n),{i:r,s:o.s,iiV:t,v:t[1],b:u,r:e}))}),r.set(s).push(l)}),r}function M(t,o,e,i,n,r,a){var l,u,h=n.getRS(),c=It(n),p=o.s,f=c[p.GetIndex()%c.length],g=n.getAx(),v=g.x,d=g.y;return 3==h.d&&s(e)&&(l=Qo.Mrg(h.ooZ,{s:"l"}),u=[[0,0],[0,e]]),r=r||new Bo,a=a||Dt(p),Et(o).forEach(function(t){var o=[],n=Je(e);t.forEach(function(t,e){s(u)&&(n=H(t[2],u,l)[1]),o.push(Bo.p(function(t,o,e,i,n){var r=R(i);return[H(t[0],r,o)[0],H(t[1],r,e)[1]]}(t,v,d,i),{i:e,s:p,iiV:t,b:f,r:n}))}),r.set(a).push(o)}),r}function k(t,o,e){return t?e.gdV().o==o&&Re:e.gdC().o==o&&Zo}function P(t,o,e,i,n){var r,s=e.getRS(),a=e.getAx(),l=o[t],u=a[t];if(l&&u)return r=jo[t],l=l.slice(),po(t,s)&&(l=Qo.ORt(r.ext(l,o.c),-o.s.x,-o.s.y)),wt(u,null,function(t){return i.call(n,t,r.next(l,t))})}function D(t,o,e,i,n,r){var s,a,l=i.getRS(),u=e[o];return n=n||new Bo,s=a=po(o,l)?O:E,P(o,e,i,function(o,h){s(t,h,!ei(h)&&u,o.oR,o.oR.o.majorGridLines||k(a,o.oR.o,l),e,i,n,r.n+(r.i||"")),r.i++}),n}function U(t,o,e){return e=e||[1,1],[qe.X(t)+qe.X(e)*qe.X(o),qe.Y(t)+qe.Y(e)*qe.Y(o)]}function z(t){return l(t)?t:[qe.X(t),qe.Y(t)]}function I(t,o,e){var i,n=o.length;if((e=hi(e||0,n))1&&i[0]!=t.o&&(n=p*v-f,r=g*v,v=(h.l-d)*v/(s-d),f=(p=$e(n/v))*v-n,g=hi(s-p,d+2+ai(r/v))),{i:p,o:f,l:g,s:v}}function Y(t,o,e,i,n){var r,s=i.o,a=b(e,Wi[n])[0],l=Xi[n],u=t.a.s;return u?o=hi(l,u)&&t=hi(s,a)&&t=o&&!((t-o)%e)}function J(t){return!t||ui(0,Je(t.width,1))}function $(t,o,e,i){var n,r,a;o&&(s(o.color)&&(n=t.strokeStyle,t.strokeStyle=o.color),s(o.width)&&(r=t.lineWidth,t.lineWidth=o.width),s(o.style)&&(a=t.getLineDash(),t.setLineDash(l(o.style)?o.style:[o.style]))),J(o)&&e(i),o&&(a&&t.setLineDash(a),r&&(t.lineWidth=r),n&&(t.strokeStyle=n))}function tt(t,o,e,i){var n,r,a;o&&(s(o.frameColor)&&(n=t.strokeStyle,t.strokeStyle=o.frameColor),s(o.frameSize)&&(r=t.lineWidth,t.lineWidth=o.frameSize),s(o.frameDash)&&(a=t.getLineDash(),t.setLineDash(l(o.frameDash)?o.frameDash:[o.frameDash]))),vo(t,o&&o.opacity,e,i),o&&(a&&t.setLineDash(a),r&&(t.lineWidth=r),n&&(t.strokeStyle=n))}function ot(t,o,e){if(o){var i=ui(0,Je((e=e||{}).width,1));i&&o.forEach(function(o){!function(o){t.drawShape(qe.C2R(o,2*i,2*i),{fillColor:e.color||"black",primitive:e.primitive||"Circle"})}(o)})}}function et(t,o,e,i,n){n&&i&&(i.extby=(i.extby||0)+Je(n.getMisc().valueLineExt,Oe)),o.p&&(o.p.dv=function(t,o,e,i){var n,r,l,u,h,c,p,g,v,d,y="C",S=32,m=[2,2],C=o;if(i=i||{},d=f(i.flags,Qo.Graph.ShowValueEnum,-1),e=ti(e),n=!(128&d)||e){if(e=4&d&&e,r=2&d&&i.to,u=2&d&&i.line,l=1&d&&i.point,h=4&d&&i.back,v=i.fit,u&&r&&e){var x,R=qe.X(r)-qe.X(o),A=qe.Y(r)-qe.Y(o);R||A?(i.extby&&(x=Ct(At(o,[[qe.X(o),-128]],r)),C=oo(o,i.extby,x),r=oo(r,i.extby,x)),a((u=Qo.Cpy(u)).frameColor)&&(u.frameColor="black"),s(u.length)&&(S=Je(u.length,0)),s(u.pad)&&(m=Qo.pad2A(pad)),ci(R)<8?y=A<0?"BC":"TC":S&&(y=R<0?"MR":"ML",p=[qe.X(r)+S*Math.sign(R),qe.Y(r)]),p?(g=p.slice())[0]+=m[0]*Math.sign(R):(g=r.slice())[1]+=m[1]*Math.sign(A)):u=null}else u=null;if(e){var T=t.sizeHTMLText(e,0);if(!l||r&&(R||A)||(y="BC",(g=o.slice())[1]-=(l.size||0)/2+m[1],r=o),c=qe.C2R(g||u&&r||o,T.width,T.height,y),v){var b=c.slice();c=Qo.FRt(c,v),Qo.EqR(c,b)||(b=Qo.PRt(c.slice(),m),r=qe.cL2R(b,o,p||r)||qe.cL2R(b,o,r)||qe.cL2R(b,o,qe.R2C(c)),p=null)}}u&&((u.pArg=u.pArg||{}).closed=!1,u.primitive=function(t,o){t.moveTo.apply(t,C),t.lineTo.apply(t,r),p&&t.lineTo.apply(t,p)},t.drawShape(Qo.URt(qe.C2R(C,1,1),qe.C2R(p||r,1,1)),u)),l&&l.size&&t.drawShape(qe.C2R(o,l.size,l.size),l,o),e&&t.drawShape(ro(c,h&&t),Qo.Mrg({text:e,formatText:0},h))}return!!n}(t,o,e,i))}function it(t,o,e){if(o){ui(0,Je((e=e||{}).width,1))&&$(t,e,function(){o.forEach(function(o){at(t,o)})})}}function nt(t,o,e,i){o&&St(t,e,function(){o.forEach(function(o){!function(t,o,e,i){if(o){var n=t.sizeHTMLText(o,256);ut(t,qe.C2R(e,n.width,n.height),i,function(e){t.drawHTMLText(o,e,256)})}}(t,o.p.l,function(t){return i&&(l()||(i=ti(i).split(",")),t=[qe.X(t)+Je(i[0]),qe.Y(t)+Je(i[1])]),t}(o),o.p.a)})})}function rt(t,o){o&&o.forEach(function(o){o.p&&o.p.s&&t.drawShape(o,o.p.s)})}function st(t,o,e,i){o&&J(e)&&$(t,e,function(){o.forEach(function(o){i?at(t,o,!0):(t.beginPath(),Qo.D.P.Circle(t,o),t.stroke())})})}function at(t,o,e,i){o&&o.length&&$(t,i,function(){t.beginPath(),Qo.D.P.Polygon(t,null,o),e&&t.closePath(),t.stroke()})}function lt(t,o,e){if(o&&o.length){var i;s(e)&&(i=t.fillStyle,t.fillStyle=e),t.beginPath(),Qo.D.P.Polygon(t,null,o),t.closePath(),t.fill(),s(i)&&(t.fillStyle=i)}}function ut(t,o,e,i,n){if(o&&i){var r,s=Ct(e);s&&(t.save(),t.translate.apply(t,r=qe.R2C(o)),t.rotate(s),o=[-o[2]/2,-o[3]/2,o[2],o[3]]),i.call(n,o,r),s&&t.restore()}}function ht(t,o,e,i,n,r,s){1&(s=$e(s,-1))&&rt(t,o.get(e+_e)),8&s&&rt(t,o.get(e+Qe+1)),2&s&&n&&J(n)&&it(t,o.get(e+Ze),n),i&&Q(i)&&(32&s&&rt(t,o.get(e+Be)),16&s&&rt(t,o.get(e+Qe+2)),64&s&&it(t,o.get(e),i.axisLine),128&s&&it(t,o.get(e+Ne),i.majorTicks),r&&t.resClip(),256&s&&nt(t,o.get(e+je),i.tfi,i.offsetLabel),512&s&&nt(t,o.get(e+Ke),i.tfi,i.offsetTitle),r&&t.selClip(r))}function ct(t,o,e,i,n,r,s,a){var l=oi(s.getMisc().radarPolygonal,Te);a=$e(a,-1),n&&(2&a&&st(t,o.get(e+Ze),n.o.majorGridLines||Re,l),64&a&&it(t,o.get(e),n.o.axisLine),128&a&&ot(t,o.get(e+Ne),n.o.majorTicks),256&a&&nt(t,o.get(e+je),n.o.tfi,n.o.offsetLabel),512&a&&nt(t,o.get(e+Ke),n.o.tfi,n.o.offsetTitle)),r&&(2&a&&it(t,o.get(i+Ze),r.o.majorGridLines||Re),64&a&&st(t,o.get(i),r.o.axisLine,l),128&a&&ot(t,o.get(i+Ne),r.o.majorTicks),256&a&&nt(t,o.get(i+je),r.o.tfi,r.o.offsetLabel),512&a&&nt(t,o.get(i+Ke),r.o.tfi))}function pt(t,o,e,i,n,r,s){var a,l,u,h,c,p=i.getRS(),f=i.getAx()[o],g=R(e);f&&(a=e&&e[o],l=po(o,p),i.getMV().t,i.getMisc(),u=Je(s&&s.flags,-1),h=[],c=[],f.forEach(function(t){var e=t.oR.o,i=e.majorGridLines||k(l,e,p),n=ii(r)?r:r.n+(r.i||"");h.push({n:n,a:e,x:l&&(e.start||e.end)&&Qo.NRt(fo(t.oR,jo[o].ext(a,g)),a)}),(l||i||t.oR.m)&&c.push({n:n,g:i,x:l&&(e.start||e.end)&&fo(t.oR,g)}),!ii(r)&&r.i++}),e.x&&t.selClip(e.x),c.forEach(function(o){o.x&&t.selClip(o.x),ht(t,n,o.n,null,o.g,null,u&ue),o.x&&t.resClip()}),e.x&&t.resClip(),a&&t.selClip(a),h.forEach(function(o){o.x&&t.selClip(o.x),ht(t,n,o.n,o.a,null,!o.x&&a,u&le),o.x&&t.resClip()}),a&&t.resClip())}function ft(t,o,e,i,n,r,s){var a={n:r||We,i:0},l={n:n||Xe,i:0};pt(t,"l",o,e,i,l,s),pt(t,"r",o,e,i,l,s),pt(t,"t",o,e,i,a,s),pt(t,"b",o,e,i,a,s)}function gt(t,o,e){var i;return s(t)&&s(t[o])&&(i=t[o],h(t[o])&&(i=i.apply(t.thisArg,e))),i}function vt(t,o,e,n,s,a,l){if(e){var u=$e(a.getMisc().digits,fe);(n=Qo.Cpy(n)||{frameColor:"black"}).primitive=n.primitive||"Polygon",n.pArg=n.pArg||{},n.pArg.closed=oi(n.pArg.closed,!l||oi(l.closed,!0)),r(t,oi(l&&l.lock1PX,!0),function(){e.forEach(function(e){l&&l.group&&l.group(e);var r=e,h=go(a,s);1==s.getStyle()&&(r=qe.ToCR(r,null,n.pArg.tension,n.pArg.alpha,n.pArg.closed)),n.pArg.points=r,r.length>1&&t.drawShape(o,n,e),h&&e.forEach(function(o,n){if(o.p){var r=s.getValuePointShape(jt(a,o.p.b)),c=r&&r.size||0;et(t,o,i(to(o.p,s.getValueFormat(),u),o.p.b),{flags:h,point:r,line:_t(a,o.p.b),back:qt(a,o.p.b),to:gt(l,"to",[o,c,n,e]),extby:gt(l,"extby",[o,c,n,e])},a)}})})})}}function dt(t,o,e,i,n,r,s){var a=r.getMisc(),l=Je(a.valueDistOuterCircular,Ge),u=qe.R2C(o);vt(t,o,e,i,n,r,Qo.Mrg({to:function(t,o){return eo(t,l,Ct(Tt(u,[qe.X(u),-128],t)),r)},extby:function(t,o){return o/2}},s))}function yt(t,o,e,n,s,l,u){if(e){var c=$e(l.getMisc().digits,fe),p=new Map,f=new Map,g=new Map;r(t,oi(u&&u.lock1PX,!0),function(){e.forEach(function(o){u&&u.group&&u.group(o),o.forEach(function(e,r){var v,d,y,S,m,C,x,R,A=u&&u.draw&&u.draw.call(u.thisArg,e,r,o),T=s.getValuePointShape(n);A||(d=(v=e.p)&&(v.b2||v.b)||"black",y=to(v,s.getValueFormat(),c),S=qt(l,d),T&&v&&v.b2&&!(T=f.get(v.b2))&&f.set(v.b2,T=s.getValuePointShape(jt(l,v.b2))),!(m=p.get(d))&&p.set(d,m=_t(l,d)),(C=a(R=T&&u&&h(u.size)?u.size.call(u.thisArg,e):ni(u.size)?Je(u.size):null))||(T=Qo.Mrg(Qo.Cpy(T),{size:R})),R=T&&T.size||0,C&&g.has(x=e[0]+" "+e[1]+" "+y)||(C&&g.set(x,1),et(t,e,v&&i(y,d),{flags:u.flags,point:T,line:m,back:S,to:gt(u,"to",[e,R,r,o]),extby:gt(u,"extby",[e,R,r,o])},l)))})})})}}function St(t,o,e,i){var n=Qo.TFI.bCTX(t,o),r=e.call(i,t);return Qo.TFI.eCTX(t,n),r}function mt(t,o){return qe.Dist(t,o)}function Ct(t){return qe.D2R(t)}function xt(t){return qe.R2D(t)}function Rt(t){return qe.D236(t)}function At(t,o,e){return qe.Angle(t,o,e)}function Tt(t,o,e){return Rt(At(t,o,e))}function bt(t,o){if(o){var e=Ct(o),i=[0,0,t.width,t.height],n=qe.R2C(i),r=qe.RPO(qe.R2C(i,17),n,e),s=qe.RPO(qe.R2C(i,68),n,e),a=qe.RPO(qe.R2C(i,65),n,e),l=qe.RPO(qe.R2C(i,20),n,e);t={width:ui(ci(qe.X(s)-qe.X(r)),ci(qe.X(l)-qe.X(a))),height:ui(ci(qe.Y(s)-qe.Y(r)),ci(qe.Y(l)-qe.Y(a)))}}return t}function Vt(t){return t.p.r||ge}function wt(t,o,e,i,n){if(t){var r,s=(o=o||{}).i||0,a=t.length,l=1,u=0;u=(a=hi(s+$e(o.l,a),a))-s,n&&(l=-1,s=a-1);for(var h=0;!r&&h=s-e&&r=n-e&&i=0?(t.iiV?e=t.iiV[o]:o||(e=t.v),s(e)&&(e=i(e))):-1==o?e=i(t.v):-2==o?e=t.s&&t.s.getName():-3==o?e=t.c:-4==o?e=i(t.p):-5==o?e=t.ii:-6==o?e=t.i:-7==o?e=t.s&&t.s.getUserData():-8==o&&(e=t.v,t.s&&(e=t.s.getValue(t.i,e)),s(e)&&(e=i(e))),ti(e)}):i(t.v)}}function oo(t,o,e,i){return i||(e=Qo.Def.G.getAngle(e)),[qe.X(t)+Math.cos(e)*o,qe.Y(t)+Math.sin(e)*o]}function eo(t,o,e,i){var n,r,a=t;return o&&(s(n=i.getMisc().valueLineAddAngle)&&(r=Ct(n=Je(n)),e=n<=0?r:e+r),a=oo(t,o,e)),a}function io(t,o,e,i){return eo(t,o,Ct(e<0?Je(i.getMisc().valueLineUpAngle,Ee):Je(i.getMisc().valueLineDownAngle,Le)),i)}function no(t,o,e){var i,n,r,s=e[1],a=e[2];return(qe.X(s)-qe.X(a)||qe.Y(s)-qe.Y(a))&&(n=mt(s,o),(i=Ct(Tt(o,s,a)))||(i=Ye),(r={startAngle:Ct(Tt(o,[qe.X(o),-128],s)),sweepAngle:i,width:n-mt(e[0],o),outsideRadius:n,p:e.p}).from=oo(o,r.outsideRadius+Je(t.getMisc().valueDistInnerCircular,we),r.startAngle+r.sweepAngle/2)),r}function ro(t,o){return o&&1==o.getTransform().a&&Qo.RRt(t),t}function so(t,o,e,i,n){return console.assert(e>0,"Size must be a positive value"),i?(t=[qe.X(t),qe.Y(t)-e/2],o=[qe.X(o),qe.Y(o)+e/2]):(t=[qe.X(t)-e/2,qe.Y(t)],o=[qe.X(o)+e/2,qe.Y(o)]),ro(qe.Rect(t,o),n)}function ao(t,o,e,i,r,s,a,l){t=[e,H(t,r,s.oY)[1-a]],o=[e,H(o,r,s.oY)[1-a]],a&&(n(t),n(o));var u=so(t,o,i,a,l);return u[2]=ui(1,u[2]),u[3]=ui(1,u[3]),u}function lo(t,o,e,i){var n,r,s=o[2]<=1,a=o[3]<=1;s&&a||(s?(n=qe.R2C(o,"TL"),(r=qe.R2C(o,"BL"))[1]--):a&&(n=qe.R2C(o,"TL"),(r=qe.R2C(o,"TR"))[0]--),n&&r?tt(t,e,function(){t.drawLine(n,r)}):t.drawShape(o,e,i))}function uo(t,o,e,i,n,r,s){Ot(e,function(e){(function(t,o,e,i){var a=this.getRS().v,l=It(this),u=Ft(this),h=e.s,c=R(o),p=Qt(this),f=Kt(this),g=h.GetIndex(),v=l[g%l.length],d=Bt(this,l),y=this.toShape(h)||this.toShape(n)||r,S=u.length&&u[g%u.length],m=S&&Bt(this,u),C=this.getMV().sOf(e),x=function(){function t(t){return t&&((t=Qo.Cpy(t)).fillColor=null,t.patternColor=null,t.fillGradientColor=null),t}var o=Zt(y,v,d[g%d.length]),e=o,i=S&&Zt(y,S,m[g%m.length]),n=i;return y.hollow&&(e=t(e),n=t(n)),{s:o,h:e||o,sD:i||o,hD:n||o}}(),A=go(this,h);yt(t,0,i,null,h,this,{flags:0,lock1PX:!1,draw:function(o,i,n){if(!(i%4)){var r,l=n[i+0].p.v,u=n[i+1].p.v,h=n[i+2].p.v,p=n[i+3].p.v,f=i?n[i-1].p.v:p;r=p0&&(lo(t,so(v,f,y,c,t),o,p),lo(t,so(g,d,y,c,t),o,p))}function co(t,o,e,i,r,s,a,l,u,h,c,p){function f(o,e){var i=[0,(v-1)/2];return c&&n(i),ro(Qo.IRt(ao(o,o,e,l/2,u,h,c),i[0],i[1]),t)}var g,v=Je(o.size,1),d=ao(r,i,a,v,u,h,c);v>0&&(g=Qo.URt(f(r,a),f(i,a)),d[1-c]=g[1-c],d[3-c]=g[3-c],lo(t,ro(d,t),o,p),lo(t,f(e,d[c]-l/4),o,p),lo(t,f(s,d[c]+d[2+c]+l/4),o,p))}function po(t,o){return o.v?~"tb".indexOf(t):~"lr".indexOf(t)}function fo(t,o){if(t.s&&(t.o.start||t.o.end)){o=o.slice();var e=~"lr".indexOf(t.s)?1:0,i=G(t),n=H(i.m,o,t),r=H(i.M,o,t);o[e]=hi(n[e],r[e]),o[2+e]=ci(r[e]-n[e])}return o}function go(t,o){var e=o.getShowValue();return 1==t.getRS().type()&&t.getMV().t=45&&o<135?e="r":o>=135&&o<225?e="b":o>=225&&o<315&&(e="l"),e}function Vo(t,o){var e,i=o.getVP().c;return Gt(o.getRS().all(),null,function(o){return Gt(i[Dt(o.s)],null,function(i){return Gt(i,null,function(i){if(mt(t,i)<=Vt(i)/2){var n=(e=e||new Map).get(o);return!n&&e.set(o,n=[]),n.push(i),!0}})})}),e}function wo(t,o,e,i){var n,r=R(e),s=qe.R2C(r),a=i.getVP().c,l=2==i.oCr.getShowCursorSerieTooltip();return Gt(i.getRS().all(),null,function(e){return Gt(a[Dt(e.s)],null,function(e){return Gt(e,null,function(e){var r,a=no(i,s,e);return a&&(p(t,a.startAngle,a.startAngle+a.sweepAngle)||p(t+2*Fe,a.startAngle,a.startAngle+a.sweepAngle)||p(function(t){return qe.R2PI(t)}(t),a.startAngle,a.startAngle+a.sweepAngle))&&(l&&!(r=p(o,a.outsideRadius-a.width,a.outsideRadius))||(n=n||[]).push({rg3:e,pR:a})),r})})}),n}function Go(t,o){if(t){var e,i=[],r=(o=o||{}).h?1:0,s=o.fit,a=!0;if(t.forEach(function(t){i.push(t)}),(e=i.length)>1)for(i.sort(function(t,o){return qe.R2C(t.c)[1-r]-qe.R2C(o.c)[1-r]});a;){a=!1;for(var l=0;l=n.length||!c(n[o]))&&e.push(i)}),e.length&&Oo(t,e)}function Lo(t){var o=0==t;if(l(t))for(var e=0,i=t.length;e=0&&o1&&((e=~~o)<0||e>=i)&&(e=0),e}(l,i),p:a}))},i.sep),n}function Uo(t,o,e,i){function r(t,o){return Qo.bin(t.length,function(e){return t[e].i<=o})}function s(t,o){return o-1-t}i=i||{},$(t,e.g,function(){var a=f(e.g.align,Qo.DrawTextFormatEnum,8),l=ui(0,$e(e.g.skip)),u=ui(1,$e(e.g.step)),h=$e(i.f,-1),c=ci(i.l||0),p=(i.l||0)<0,g=i.v||0,v=i.n,d=i.s||0,y=Qo.pad2A(i.p),S=i.u||0,m=i.r,C=i.b||0,x=o[1-g],R=x+o[3-g],A=e.l,T=A.length,b=0,V=T,w=[];m&&(p?(b=s(r(A,s(m[0],c)),T),V=s(r(A,s(m[1],c)),T)+1):(b=r(A,m[0]),V=r(A,m[1])+1));for(var G=b;G=l&&!((U-l)%u)&&(E=[O=d+((p?s(k,c)+1:k)-C)*S,x],L=[O,R],g&&(n(E),n(L)),1&h&&t.drawLine(E,L),w.push({l:M.l,x:O}))}if(2&h)for(var P,D,U=0,z=w.length;Ut.tZ+256&&(i.call(this),t.tZ=null),n&&(r.sT=r.sT||n.sT,clearTimeout(t.hrV),t.hrV=this.setTimeout(function(){this.oGV.GetCanvas()&&i.call(this)},32))}.call(this),arguments.length&&(s=t&&this.oCD&&!o)!=this.in&&(!s&&this.in?this.show(!1):s&&!this.in&&this.show(!0),this.in=s),this.in&&this.inv()}},Ho.prototype.show=function(t){t?this.oCEF&&this.oCEF.oHE.classList.add(ce):(this.oCEF&&this.oCEF.oHE.classList.remove(ce),this.dCD=null,this.xAF())},Ho.prototype.onpaint=function(t,o){this.oCD&&this.oGV.dCTX(t,o,function(o){this.draw(t,o)},this)},Ho.prototype.inv=function(){function t(){var t=this.oIAF.oA,o=t.t,e=t.f,i=this.oCD,n=i&&i.sp,r=hi(1,t.p+t.s),a=this.oGV.gCT();t.p=r,n&&e&&o&&n.forEach(function(t){var n,l=a&&a.length&&a[function(t){for(var o;t&&!ri(o=parseInt(t));)t=t.substr(1);return o||0}(t)%a.length],u=So(e,t);if(s(u)&&s(n=So(o,t)))for(var h=So(i,t),c=0,p=h&&h.length;c=0&&o=0&&o=0&&(!function(t){return t.split($o).forEachU(function(t){return this.has(t)},this)}.call(e,o)||e.has(t))},t.Options={scrollBars:null,scrollBarsOrigin:void 0,tfi:null,locked:null,readOnly:!1,wheelChange:null,smooth:null,shapes:null,cursors:null,zoom:null,zoomLevels:null,formatText:null,invalid:null,pad:null,imageSize:null,imageAlign:null,allowActions:null,scrollPos:null,toolTipDelay:null,toolTipPopDelay:null,toolTipWidth:null,allowDrop:null,data:null,misc:null,background:null,series:null,autoFit:null,valueAxis:null,categoryAxis:null,xAxis:null,yAxis:null,toolTipFormat:null,valueSize:null,cursor:null,legend:null,sort:null,overview:null,multiColorSerie:null,allowStack:null,serieType:null,order:null,serieDef:null},t.bSCTX=function(t,o,e,i){var n;return o&&(t.drawShape(e,o,i),n=Qo.TFI.bCTX(t,o.tfi),s(o.opacity)&&((n=n||{}).opacity=t.globalAlpha,t.globalAlpha=o.opacity)),n},t.eSCTX=function(t,o){s(o.opacity)&&(t.globalAlpha=o.opacity),o instanceof Qo.TFI&&Qo.TFI.eCTX(t,o)},t.prototype.init=function(o,e){this.lnt=this.lnt||0,this.lnt++,this.oS=new t.Series(this),this.oGV=null,this.rgGV=[],this.sSA="smth-"+Qo.Rand(),this.iLts(),this.oCW=new Qo.CW(o,{AllowXChg:0,ScrollBars:this.defOpt().scrollBars}),this.oCW.oT=this,this.Shortcuts=this.oCW.oSts,this.initCW(),this.import(),Qo.expO(t.Options,this,this.oGV),Qo.RUR.Listeners.Add("srur",this),Qo.RUR.Listeners.Add("erur",this),Qo.A.Listeners.Add("ea",this),this.cwbU(),this.SetOptions(e,!0),this.cweU(),Qo.DPR.Reg(this),--this.lnt},t.prototype.defOpt=function(){return Qo[this.constructor.type].Options},t.prototype.GetCanvas=function(){return this.oCW.GetCanvas()},t.prototype.defAA=function(){return"overview-selection-resize,fit(Shift+MButton,Alt+MButton),value-resize(Ctrl+MButton),zoom(MButton),scroll"},t.prototype.roAA=function(){return"overview-selection-resize,scroll,zoom,fit,value-resize"},t.prototype.allP=function(){return"view(Graph.GV),legend(Graph.Legend),overview(Graph.Overview)"},t.prototype.luoYD=function(t){zo(this.oGV.getMisc())&&(2&(t=Je(t,3))&&function(){var t,o=!0;return this.feGV(function(e){var i,n=e.gdVA();e.loYD&&!--e.loYD&&o&&(e.resXY(),(o=function(t,o){var e=t.size==o.size;return e&&t.forEach(function(t,i){if(e){var n=o.get(i);e=t.m==n.m&&t.M==n.M&&t.mU==n.mU}}),e}(n,i=e.gdVA()))||(t=t||new Map).set(e,{b:n,a:i}))}),!o&&t.forEach(function(t,o){o.loYD++,t.a.forEach(function(o,e){var i=t.b.get(e);for(var n in o)o[n]=i[n]})}),!o}.call(this)&&this.Smooth(function(){this.feGV(function(t){t.loYD&&!--t.loYD&&t.resXY()})},this,{sorg:"luoyd"}),1&t&&this.feGV(function(t){!t.loYD&&t.loYD++}))},t.prototype.srur=function(t){this.luoYD(1)},t.prototype.erur=function(t){clearTimeout(this.hluoYD),this.GetCanvas()&&!(Qo.A.Rng("ssp")||Qo.A.Rng("ssw"))&&this.luoYD(2)},t.prototype.ea=function(t){this.GetCanvas()&&("ssp"==t.name||"ssw"==t.name)&&this.luoYD(2)},t.prototype.lRA=function(t){t&=!1,this.oCW.lRA(t)},t.prototype.onAddSerie=function(t){this.onRL()},t.prototype.onDelSerie=function(t){this.onRL()},t.prototype.feGV=function(t,o){Qo.Graph.GV.prototype[t]?this.rgGV.forEach(function(o){o[t].call(o)},this):this.rgGV.forEach(t,o)},t.prototype.feGVU=function(t,o){return Qo.Graph.GV.prototype[t]?this.rgGV.forEachU(function(o){o[t].call(o)},this):this.rgGV.forEachU(t,o)},t.prototype.feI=function(t,o){o=o||this,this.oS.forEach(function(e){t.call(o,e)})},t.prototype.feIU=function(t,o){return o=o||this,this.oS.forEachU(t,o)},t.prototype.BeginUpdate=function(){this.oCW.CWs().forEach(function(t){t.bU()})},t.prototype.bU=t.prototype.cwbU=t.prototype.BeginUpdate,t.prototype.EndUpdate=function(){1==this.oCW.lR&&this.fU(),this.oCW.CWs().forEach(function(t){t.eU()})},t.prototype.eU=t.prototype.cweU=t.prototype.EndUpdate,t.prototype.Update=function(t,o){this.bU(),h(t)&&t.call(o||this),this.eU()},t.prototype.fU=function(){},t.prototype.Refresh=function(){this.bU(),this.onRL(),this.eU()},t.prototype.Reset=function(){this.bU(),this.oS.Clear(),this.SetCategoryAxis(null),this.SetValueAxis(null),this.SetXAxis(null),this.SetYAxis(null),this.eU()},t.prototype.res=function(t){t&&this.feGV(function(o){1&t&&o.onRL(),2&t&&o.resAx(),4&t&&o.resXY(),8&t&&o.resMV(),16&t&&o.resVP()})},t.prototype.onRL=function(){this.oGV.oRS&&this.feGV("onRL")},t.prototype.onVis=function(){this.oGV.oRS&&this.feGV("onVis")},t.prototype.resXY=function(t,o){function e(){h(t)&&t.call(o||this),this.oGV.oXY&&this.feGV("resXY")}t?this.Update(e):e.call(this)},t.prototype.updSPR=function(){this.feGV("updSPR")},t.prototype.iLts=function(){this.Listeners=this.oLts=new Qo.Lts,this.oLts.Add("onclick"),this.oLts.Add("onanchorclick"),this.oLts.Add("onload"),this.oLts.Add("onerror"),this.oLts.Add("onscroll"),this.oLts.Add("onmovevalue")},Qo.Lts.Onf(t.prototype),t.prototype.addGV=function(t,o){function e(o){return o.repAll("name",t)}var i=null;if(!a(t)&&v(t).length||(t="graph"+this.rgGV.length),!this.oCW.W(t)){var n,r,s,l=!this.rgGV.length,u=(this.oCW.W("main")||this.oCW).Add(t,Qo.Mrg({Dock:l?5:4,Size:256},o));i=new Qo.Graph.GV(this),this.rgGV.push(i),this.oGV=this.oGV||i,!(u.GetDock()%2)&&u.SetPosition(this.oCW.W("graph").GetPosition()+1),u.Add("client",{Dock:5,HoverExtends:e("control,top,bottom,vertical,vscroll,grip,name,name.hscroll"),Extends:e("name.hscroll,vertical"),HScroll:e("name.hscroll"),VScroll:"vscroll",Control:i}),(r=u.Add("overview",{Dock:1,Resizable:!1,Size:24,Control:i.oOv})).GetVisible=i.oOv.isVisible.bind(i.oOv),this.aSizeW(r),(n=u.Add("legend",{Dock:2,Size:0,Resizable:!1})).Add("client",{Dock:5,Control:i.oLg,HScroll:e("name.legend.hscroll"),VScroll:e("name.legend.vertical.vscroll")}),(s=n.Add("vertical",{Dock:4,Resizable:!1,VisibleExtends:e("name.legend.client,name.legend.vertical.vscroll"),Size:16})).Add("grip",{Dock:2,AllowXChg:!1,Size:16,Resizable:!1,VisibleExtends:e("name.legend.hscroll,name.legend.vertical.vscroll")}),s.Add("vscroll",{Dock:5,AllowXChg:!1,Resizable:!1,Control:new Qo.ScrollBar(null,null)}),n.Add("hscroll",{Dock:2,Resizable:!1,Size:16,Control:new Qo.ScrollBar(null,null),SizeExtends:e("name.legend.hscroll,name.legend.vertical.vscroll"),VisibleExtends:e("name.legend.client")}),n.GetVisible=i.oLg.isVisible.bind(i.oLg),this.aSizeW(n,i.oLg),u.Add("hscroll",{Dock:2,Resizable:!1,Size:16,VisibleExtends:e("name.client"),Opacity:0,HoverOpacity:1,Control:new Qo.ScrollBar(null,null)})}return i},t.prototype.AddGraphView=function(t,o){this.bU();var e=this.addGV(t,o);return this.eU(),e},t.prototype.delGV=function(t){!a(t)&&v(t).length||(t=this.rgGV[this.rgGV.length-1].oW.opW.GetName());var o=!1,e=this.oCW.W(t);if(e){var i=null,n=this.oCW.W(e.GetName()+".client");if(n&&(i=n.GetC())instanceof Qo.Graph.GV&&i!=this.oGV){var r=this.rgGV.indexOf(i);(o=r>=0)&&(this.rgGV.splice(r,1),this.oCW.Remove(e))}}return o},t.prototype.RemoveGraphView=function(t){this.bU(),this.delGV(t),this.eU()},t.prototype.GraphView=function(t){var o=this.oCW.W(t+".client");return o&&o.oC&&~this.rgGV.indexOf(o.oC)&&o.oC||null},t.prototype.initCW=function(){function t(){var t="grip",o=Jo,e=null,i=this.oCW.W(t);this.rgGV.forEach(function(i){i.oW&&i.oW.opW&&(t+=$o+(o=i.oW.opW.GetShortName()+".hscroll"),e=e||this.oCW.W(o))},this),e&&e.SetSizeExtends(t),i&&i.SetVisibleExtends(t)}var o,e=this,i=this.oCW;this.oCW.canvas.addEventListener("dragover",this.localdragover=function(t){return e.ondragover(t)}),this.oCW.canvas.addEventListener("drop",this.localdrop=function(t){return e.ondrop(t)}),this.oCW.onAdd=function(o){return function(){return t.call(e),o.apply(this,arguments)}}(this.oCW.onAdd),this.oCW.onRemove=function(o){return function(){return t.call(e),o.apply(this,arguments)}}(this.oCW.onRemove),this.oCW.SetClientRect=function(t){return function(o){this.bU(),t.apply(this,arguments),this.eU()}}(this.oCW.SetClientRect),this.oCW.onWLD=function(t){return function(){t.apply(this,arguments),this.oT.feGV(function(t){t.onWLD()})}}(this.oCW.onWLD),(o=(i=i.Add("control",{Dock:5})).Add("main",{Dock:5}).Add("vertical",{Dock:4,Resizable:!1,Size:16,VisibleExtends:"graph.client,vscroll",Opacity:0,HoverOpacity:1})).Add("grip",{Dock:2,AllowXChg:!1,Size:16,Resizable:!1}),o.Add("vscroll",{Dock:5,AllowXChg:!1,Resizable:!1,Control:new Qo.ScrollBar(null,null)}),this.addGV("graph")},t.prototype.aSizeW=function(t,o){o=o||t.GetC(),t&&o&&o.gSize&&(t.aClient=function(t){return function(){if(!this.IsMinRec()){var e,i=this.client,n=o.gSize(),r=n.width,a=n.height;this.GetResizable()&&(e=o.aSize&&o.aSize())&&(s(e.height)&&(a=ui(a||0,e.height)),s(e.width)&&(r=ui(r||0,e.width))),(s(a)&&(a=o.unscaled(a))!=i[3]||s(r)&&(r=o.unscaled(r))!=i[2])&&(s(a)&&(i[3]=a),s(r)&&(i[2]=r),this.updCWN())}return t.apply(this,arguments)}}(t.aClient),t.setClient=function(t){return function(){var e=t.apply(this,arguments);if(!this.IsMinRec()&&this.GetResizable()){var i=Qo.C2R(this.client);o.aSize&&o.aSize({width:o.scaled(i[2]),height:o.scaled(i[3])})}return e}}(t.setClient))},t.prototype.w2P=function(t){function o(){function t(t){var o=[];return Qo.B.split(t).forEach(function(t){t.caption&&t.subText&&o.push({n:t.caption,p:function(t){var o=Qo;return t.split(".").forEach(function(t){o=o[t]}),o.prototype}(t.subText)})}),o}return this._allP||(this._allP=t.call(this,this.allP()))}var e,i=t&&t.oC&&Object.getPrototypeOf(t.oC);if(i)for(var n,r=o.call(this),s=0,a=r.length;!e&&s1&&(i=Je(t[1],-1)),i>=0&&i<=e&&(i=-1),(e||i>0)&&(o=[e,i])),o}(Je(r.valueSizeRange,Me)))&&(h=ui(h,n[0]),n[1]>0&&(h=hi(h,n[1]))),h}function w(t,o,e){this.init(t,o,e)}function I(t){var o=this.gdC();if(o)for(var e=t.length,i=o.a.l.length;e=0&&tt[1]?e={page:o[0],range:t[0]}:i={page:o[1],range:t[1]},this.SetSI(e,i)},v.prototype.p2O=function(t){if(this.isSelectable()){var o=this.ptCA(t),e=this.off();return this.gLO().p2O(qe.X(o)-e[0],qe.Y(o)-e[1])}},v.prototype.getCursor=function(t){var o,e=this.getCursors();return!Qo.H.lA&&this.p2A(t)?o=Qo.GP.Get("anchor",e):this.p2O(t)&&(o=Qo.GP.Get("legend",e)),o||null},v.prototype.onmousemove=function(t){var o,e=this.gPtr(t),i=this.getCursor(e);return i&&(o=this.GetCanvas())&&(o.style.cursor=i),i},v.prototype.isSelectable=function(t){return function(){return t.apply(this,arguments)&&this.oGV.isSelectable()}}(v.prototype.isSelectable),v.prototype.ondown=function(t){return this.isSelectable()&&this.oGV.ondown(t)},v.prototype.rurScroll=function(t,o){function e(t,o){this.SetScroll({x:i.x+this.scaled(t),y:i.y+this.scaled(o)})}if(t){var i=this.GetScroll();this.doRUR(t,function(t){switch(t.drag.status){case 7:t.drag.cancel&&e.call(this,0,0);break;case 2:e.call(this,-t.drag.offset.dx,-t.drag.offset.dy);break;case 6:var i=t.drag.swipe;if(i.dx&&i.dy){var n=ci(i.dx),r=ci(i.dy);ui(n,r)-hi(n,r)>32&&(n>r?i.dy=0:i.dx=0)}this.oW.SSw(i);break;case 4:case 5:o&&o.rurStatus&&o.rurStatus.call(o.thisArg||this,t)}},this)}},v.prototype.onRurActionClickD=function(t,o){if(this.gAA().Has("scroll","view")){var e=this.gPtr(o),i=this.p2O(e);i&&this.onLO(i)}},v.prototype.rurActionClick=function(t,o){var e=this.gPtr(o),i=this.p2O(e);i&&this.onLO(i),this.oGV.onClick(o)},v.prototype.onLO=function(t){this.oGV.Smooth(function(){!function(t,o){var e,i,n,r=t.r.s;t.c?(n=t.r.v,p(i=t.pos,0,n.length)&&(o?s(e=r.mHV&&r.mHV.get(i))&&(n[i]=e,r.mHV.delete(i)):((r.mHV=r.mHV||new Map).set(i,n[i]),ni(n[i])?e=0:l(n[i])&&(e=[],n[i].forEach(function(){e.push(0)})),n[i]=e))):r.SetVisible(o)}(t,!Po(t)),this.getRS().per()},this.oGV,{sorg:"onlo"})},v.prototype.off=function(){var t=this.getAlign(),o=this.GetClientRect(),e=this.isVdk(),i=this.gLO(),n=[0,0];return t&&!this.oW.GetSB(e).isVisible()&&(n[1-e]=ui(0,o[3-e]-this.unscaled(i.m[1-e])),1==t&&(n[1-e]=n[1-e]>>1)),n[0]=this.scaled(n[0]),n[1]=this.scaled(n[1]),n},v.prototype.draw=function(t,o,e){!this.sRng()&&this.updSPR();var i,n,r,s=this.gLO(),a=this.GetScroll(),l=this.off();this.ctxScale(t,o,function(o){Qo.ORt(i=o.slice(),a.x,a.y),t.translate(n=-a.x+l[0],r=-a.y+l[1]),s.forEach(function(o,e){Qo.NRt(o,i)&&this.drawLO(t,o,e)},this),t.translate(-n,-r)},this)},v.prototype.drawLO=function(t,o,e){var i,n,r=this.getFormatText(),s=this.toShape("legendUnit"),a=Po(e),l=e.b,u=Xt(this.oGV),h=Ht(this.oGV);(s=a?s:this.toShape("legendUnitHidden"))&&t.drawShape(o,Zt(s,l,zt(l,u,h))),o.s&&(i=this.toShape("legendSymbol"),t.drawShape(o.s,Zt(a?i:this.toShape("legendSymbolHidden")||i,l,zt(l,u,h)))),o.l&&(n=this.toShape("legendLabel"),t.drawShape(o.l,Qo.Inh(Zt(a?n:this.toShape("legendLabelHidden")||n,l,zt(l,u,h)),{text:e.l,formatText:r})))},v.prototype.resLO=function(){this.mLO=null},v.prototype.gLO=function(){function t(){function t(t,o){return li(ui(0,Je(ni(t)?t:o)))}function o(){function t(t,o){l.set(t,o),(r=r||[]).push(t)}function o(t){var o;return t.forEach(function(t){o=Qo.URt(o,l.get(t))}),o}var r,s,l=new Qo.M1,u=a[0],h=a[1],c=u,p=h,g=n.gMx(),v=g[2],d=g[3],y=n.getGrid(),S=y[0]&&y[1],m=y.slice(),C=1-n.getFlow(),x=C?function(e,i){r&&(!m[1]||R+1=m[0]||c+2*u+i[2]>v)&&(R++,c=u,p+=h+o(r)[3],r=null,i[0]=c,i[1]=p),t(e,i),c+=u+i[2]}:function(e,i){r&&(!m[0]||R+1=m[1]||p+2*h+i[3]>d)&&(R++,c+=u+o(r)[2],p=h,r=null,i[0]=c,i[1]=p),t(e,i),p+=h+i[3]},R=0;return S&&(m[C]=0),i.forEach(function(t){var o=function(t){var o,i,n,r=t.m;if(e&&!r)n=[0,0,e[0],e[1]];else if(!e&&r)i=[0,0,r[0],r[1]];else if(e&&r)switch(15&f){case 1:n=[0,0,e[0],e[1]],i=[0,h+n[3],r[0],r[1]];break;case 2:i=[0,0,r[0],r[1]],n=[0,h+i[3],e[0],e[1]];break;case 3:n=[0,0,e[0],e[1]],i=[u+n[2],0,r[0],r[1]];break;case 4:i=[0,0,r[0],r[1]],n=[u+i[2],0,e[0],e[1]];break;default:n=(i=[0,0,r[0],r[1]]).slice()}return(n||i)&&((o=Qo.URt(n,i)).s=n,o.l=i),o}(t);o&&(Qo.ORt(o,c,p),x(t,o))}),l.forEach(function(t,o){!function(t){var o,e=15&f;if(e&&t.s&&t.l&&(o=(240&f)>>4))if(o--,o=1-o,3==e||4==e){var i=t.l[3]-t.s[3]>>o;i&&Qo.ORt(t[i<0?"l":"s"],0,ci(i))}else if(1==e||2==e){var n=t.l[2]-t.s[2]>>o;n&&Qo.ORt(t[n<0?"l":"s"],ci(n),0)}}(t),t.s&&Qo.ORt(t.s,t[0],t[1]),t.l&&Qo.ORt(t.l,t[0],t[1]),s=Qo.URt(s,t)}),l.m=s&&[2*u+s[2],2*h+s[3]]||[0,0],l.x=l.m.slice(),S&&(l.x[C]=l.x[C]*y[C]/R-a[C]),l}var e,i,n=this,r=this.oGV,a=this.getPad(),l=this.gCtx(),u=this.getFormatText(),h=this.getLabelFixedWidth(),p=this.getLabelFixedHeight(),f=this.getSymbolAlign(),g=r.getRS(),v=It(r);return this.ctxTfi(function(){var o=t(this.getSymbolWidth(),l.fontHeight()),n=t(this.getSymbolHeight(),l.fontHeight());15&f&&o&&n&&(e=[o,n]),(i=r.isLC()?function(){for(var t,o=[],e=g[0],i=g.gdC(),n=i&&i.a.l,s=e.s,a=Yt(r,s,"fillColor",null,{})||Yt(r,s,"frameColor",null,{})||Yt(r,s,"patternColor",null,{}),l=0,u=e.v.length;l1&&(!function(t){t=t||1,r=0;do{i=C/(T/++r-1)}while(ii&&e.push([i,n,l[0]-i,o[3]]),tn&&e.push([i,n,o[2],l[1]-n]),ts.pos+s.page)&&(l=ai(l-s.page/2),a?(i.SetScroll({y:l}),o.oV=i.GetSI(!1)):(i.SetScroll({x:l}),o.oH=i.GetSI(!0)))},o.rurSwipe=function(t){t.w=i.oW,t.s.dx=-t.s.dx,t.s.dy=-t.s.dy},this.oGV.rurScroll(t,o)},y.prototype.onRurScrollD=function(t){function o(t){return this.unscaled(this.gSI().range*t/this.GetClientRect()[2+e])}var e=1-this.isVdk();if(e?(t.dx=0,t.dy=-o.call(this,t.dy)):(t.dx=-o.call(this,t.dx),t.dy=0),this.oGV.getRS().v!=e){var i=t.dx;t.dx=t.dy,t.dy=i}},b.prototype.gSI=function(){var t=this.getRS().v,o=this.GetSI(1-t),e=this.GetClientRect()[2+t]-this.gCnt().c[2+t];return o.page-=e,o.range-=e,o},b.prototype.rTo=function(t,o,e){if(e=e||{},oe?0:(o[3]-u)/2),~~(l+1),~~(u+1)]||null})}.call(this),inner:n.call(this,r),onpaint:function(t,o){this.ctxTfi(function(t){i.call(this,r,t,o,a)},this,t)},alwaysPaint:!0,thisArg:this}},{thisArg:this,ttD:this.getToolTipDelay(),ttP:this.getToolTipPopDelay()})}},b.prototype.xA=function(){Qo.A.Cancel("ss*"),Qo.A.Cancel(this.sEvcA)},b.prototype.ondown=function(t){return this.isSelectable()&&(this.xA(),this.gAA().Do(this,t),!Qo.RUR.Rng()&&this.doRUR(t,function(t){switch(t.drag.status){case 4:case 5:this.rurActionClick(null,t)}},this)),!0},b.toClick=function(t){return{uiEvent:t,dblClick:t.drag&&(t.drag.long||1!=t.drag.click)||!1,button:Qo.e2B(t),modifiers:Qo.ModK(t)}},b.prototype.toClick=function(t,o){function e(t){return u(t)&&t.entries().next().value[1]}var i,n=this.e2C(t),r=this.p2VP(this.gPtr(t));n&&((i=e(n.xT))&&(o.x=i.t),(i=e(n.yT))&&(o.y=i.t),(i=e(n.sT))&&(o.valueCategory=i.t)),r&&(o.value=r.v,r.iiV&&(o.innerValues=r.iiV),o.percent=r.p,o.serie=r.s,o.index=r.i)},b.prototype.e2C=function(t){return this.e2W(t)==this.oW&&this.p2C(this.gPtr(t))||null},b.prototype.onA=function(t,o){t&&(Qo.H.VisitA(this,t),this.inv(),this.onanchorclick(t))},b.prototype.onClick=function(t){var o=b.toClick(t),e=this.e2V(t),i=this.gPtr(t);e&&(o.view=e,e.toClick&&e.toClick(t,o)),this.onA(this.p2A(i),o),this.onclick(o)},b.prototype.onclick=function(t){this.oLts.onclick.do(t)},b.prototype.onanchorclick=function(t){this.oLts.onanchorclick.do(t)},b.prototype.onDblClk=function(t){},b.prototype.e2RUR=function(t){var o=this.gPtr(t),e=this.e2W(t)||this.oW,i=e.GetClientRect();return{w:e,c:e.oC,x:qe.X(o)-i[0],y:qe.Y(o)-i[1]}},b.prototype.doRUR=function(t,o,e,i){var n,r,s,a=this.gAA(),l=this.oT.lRA.bind(this.oT);return Qo.RUR.Do(t,function(t){switch(s=t.drag.status){case 1:l(7),r=this.oT.oRUR=this.e2RUR(t),this.lRURLong&&t.drag.setCursor(Qo.GP.Get("long",this.getCursors()));break;case 3:a.CanDo(t,1)&&(Qo.RUR.Cancel(),this.norurAction(t,1)||(this.lRURLong=(this.lRURLong||0)+1,a.Do(this,t,1),--this.lRURLong));break;case 5:this.norurAction(t,2);break;case 2:case 6:n||(n=!0,this.oT.srur2&&this.oT.srur2()),l(4),this.oCr.upd(this.gPtr(t))}!(r&&r.c&&r.c.bRUR&&r.c.bRUR(t))&&o.call(e,t),r&&r.c&&r.c.eRUR&&r.c.eRUR(t),7==s&&(r&&(r=this.oT.oRUR=null),l(t.drag.click||t.drag.long?46:62),n&&this.oT.erur2&&this.oT.erur2())},this,i)},b.prototype.bRUR=function(t){return this.gAA().Has("zoom")&&this.exZ(t),t.drag.extra},b.prototype.exZ=function(t){var o;t.drag.extra&&(o=t.drag.extra[0])&&this.zBy(o.offset,this.oT.oRUR.oZI=this.oT.oRUR.oZI||this.p2ZI(o.start))},b.prototype.rurScroll=function(t,o){if(t){var e={oH:this.GetSI(!0),oV:this.GetSI(!1)};this.doRUR(t,function(t){var i=this.oT.oRUR||{};switch(t.drag.status){case 1:i.ao=o&&o.rurOnlyAO,this.rAO(),function(t,e){o&&o.rurScrollS&&o.rurScrollS(t,e)}(t,e);break;case 7:i.ao=null,t.drag.cancel?(i.cancel=!0,this.Smooth(function(){this.rurScrollD(0,0,e)})):!t.drag.swipe&&this.rAO(),function(t,e){o&&o.rurScrollE&&o.rurScrollE(t,e)}(t,e);break;case 2:i.dRSD||this.rurScrollD(-t.drag.offset.dx,-t.drag.offset.dy,e);break;case 6:var n={w:i.w,s:t.drag.swipe},r=n.s;if(r.dx&&r.dy){var s=ci(r.dx),a=ci(r.dy);ui(s,a)-hi(s,a)>32&&(s>a?r.dy=0:r.dx=0)}o&&o.rurSwipe&&o.rurSwipe.call(o.thisArg||this,n),n.w&&n.w.SSw.call(n.w,n.s);break;case 4:case 5:o&&o.rurStatus&&o.rurStatus.call(o.thisArg||this,t)}},this)}},b.prototype.onRurScrollD=function(t){var o=this.oT.oRUR;o&&o.c!=this&&o.c.onRurScrollD&&o.c.onRurScrollD.call(o.c,t)},b.prototype.rurScrollD=function(t,o,e){var i,n=s(e);(e=e||{oH:this.GetSI(!0),oV:this.GetSI(!1)}).oH=e.oH||{pos:0,page:0},e.oV=e.oV||{pos:0,page:0},i={dx:t,dy:o},this.onRurScrollD(i),(n||i.dx||i.dy)&&this.SetScroll({x:e.oH.pos+this.scaled(i.dx),y:e.oV.pos+this.scaled(i.dy)})},b.prototype.rurDrag=function(t,o){function e(t){return!o||a(o.rurAllow)||t==(o.rurAllow&t)}function i(){l.frame=qe.Rect(l.from,l.to),o&&o.rurDrag&&o.rurDrag.call(g,l),l.frame=function(t,e){return o.noCA?t:n().rtCA(t,e)}(l.frame,!1),c.onRurDragD&&c.onRurDragD.call(c,o,l),o&&o.rurDragD&&o.rurDragD(l),u&&u.SetClient(l.frame)}function n(){return s||(s=function(){var t=h;return u&&u.oO.relative!=h.GetCanvas()&&(t=c),t}())}function r(t,e){return o.noCA?t:n().ptCA(t,e)}if(t){var s,l,u,h=this,c=this.e2V(t)||h,p=c.getRurDragScrollOut?c.getRurDragScrollOut():c.GetClientRect(),f=[{oGV:this,oH:this.GetSI(!0),oV:this.GetSI(!1)}],g=this,v=0,d=0;this.oT.feGV(function(t){t!=this&&f.push({oGV:t,oH:t.GetSI(!0),oV:t.GetSI(!1)})},this),this.doRUR(t,function(t){switch((l=l||function(t){s=null;var o=r(h.gPtr(t));return{from:o,to:o,event:t,frame:qe.Rect(o,o)}}(t)).event=t,t.drag.status){case 1:if(function(){c.onRurDragS&&(o=c.onRurDragS.call(c,o,l)),o&&o.rurDragS&&o.rurDragS(l)}.call(this),g=o&&o.thisArg||g,o&&(this.onRURDragStart(o.rurName,t),o.rurDragStart&&o.rurDragStart.call(g,l)),this.oT.oRUR.ao=o&&o.rurOnlyAO,this.rAO(),o&&o.rurEFPaint){i();var n={name:"frame",client:l.frame,relative:h.GetCanvas(),clip:h.GetCanvas(),inflateClient:8,onpaint:function(t,e){o.rurEFPaint.call(g,l,t,e,this)}};o.rurEFOpts&&o.rurEFOpts.call(g,l,n),u=Qo.EF.Create(n)}break;case 7:var a=t.drag.cancel?this.oT:this,y=this.oT.oRUR;y&&(y.ao=null),a.bU(),t.drag.cancel?(y&&(y.cancel=!0),this.Smooth(function(){f.forEach(function(t){t.oGV.rurScrollD(0,0,t)}),o&&o.rurCancel&&o.rurCancel.call(g,l)})):!t.drag.click&&o&&o.rurDrop&&o.rurDrop.call(g,l),this.rAO(),a.eU(),Qo.EF.Destroy(u),o&&(o.rurDragEnd&&o.rurDragEnd.call(g,l),t.drag.click&&o.rurStatus&&o.rurStatus.call(g,t),this.onRURDragEnd(o.rurName,t)),function(){c.onRurDragE&&c.onRurDragE.call(c,o,l),o&&o.rurDragE&&o.rurDragE(l)}.call(this);break;case 2:var S=!1,m=v!=t.drag.offset.dx||d!=t.drag.offset.dy;if(m&&(v=t.drag.offset.dx,d=t.drag.offset.dy),!Qo.EyR(p)&&function(t){return!0}.call(this,t)){var C=t.drag.current.x,x=t.drag.current.y,R=e(1)&&C-Qo.LOf(p)||0;R>0&&(R=ui(0,C-Qo.ROf(p)));var A=e(2)&&x-Qo.TOf(p)||0;A>0&&(A=ui(0,x-Qo.BOf(p))),(S=R||A)&&this.rurScrollD(R,A)}(S||m)&&(l.to=r(t.drag.current),l.dx=l.to.x-l.from.x,l.dy=l.to.y-l.from.y,i())}},this,{contiguously:!0,client:p})}},b.prototype.onRURDragStart=function(t,o){},b.prototype.onRURDragEnd=function(t,o){},b.prototype.rurAO=function(t){return{}},b.prototype.allowRur=function(t,o){function e(t){return Qo.Graph.allowRurPart(this.oT.w2P(o.rurOnlyW),t||"view",o.rurFlags)}var i=s(t);if(i)switch(o.rurName){case"scroll":i=e.call(this,"view,legend");break;case"fit":i=e.call(this,"view,overview")}return i},b.prototype.rurAction=function(t,o,e){var i={rurName:t,rurFlags:o,rurOnlyW:this.e2W(e),rurOnlyAO:this.rurAO(e),rurStatus:function(o){this.rurActionClick(t,o)}};if(this.allowRur(e,i)){var n="rur"+Qo.getP(function(t){for(var o,e=Jo,i=0,n=t.length;i2048},b.prototype.Smooth=function(t,o,e){function i(t){e.cbkI&&e.cbkI.call(o,t)}function n(t){e.cbkT&&e.cbkT.call(o,t)}function r(t){e.cbkR&&e.cbkR.call(o,t)}function a(){var t=this.oCnt,o=new Map;return this.getRS().feA(function(e){var i=e.s.isVisible()&&Et(e,t&&t.s),n=null;i&&i.forEach(function(t){n=n||new Map,t.forEach(function(o,e){n.set(t.iO+e,o)})}),o.set(e.s.GetIndex(),n)}),o}function u(){var t=this.oCnt,o=new Map;return this.getRS().feA(function(e){var i=e.s.isVisible()&&Et(e,t&&t.s),n=e.p,r=null;i&&i.forEach(function(t){r=r||new Map,t.forEach(function(o,e){e+=t.iO,r.set(e,n&&e1||function(){var o=0;return t.mV2FT.forEach(function(t,e){o|=e.oLg.isVisible()|e.oOv.isVisible()}),o}())&&(t.oWRend=null)}function g(){t.call(o)}if(h(t))if(o=o||this,e=e||{},!this.getSmooth()||Qo.A.Rng(this.oT.sSA))i(),this.cwbU(),g.call(this),r(),this.cweU(),n();else{var v=this.gCW(),d=this.oT.rgGV,y=new Map,S=G,m=Et,C=Lt;d.forEach(function(t){y.set(t,{dva:t.gdVA(),val:a.call(t),per:u.call(t),msv:c.call(t),vpi:p.call(t),scr:t.GetScroll(),ord:t.getRS().o,typ:t.getRS().type()})}),this.oW.Smooth(function(){g.call(this)},{name:this.oT.sSA,thisArg:this,duration:this.getSmooth(),cbkR:function(t){t.mV2FT.forEach(function(o,e){e.resVP(),e.resLO(),e.lI++,(o.scr.from.x-o.scr.to.x||o.scr.from.y-o.scr.to.y)&&e.SetScroll({x:yo(o.scr.from.x,o.scr.to.x,t.progress),y:yo(o.scr.from.y,o.scr.to.y,t.progress)}),--e.lI}),v.Render(t.oWRend),r(t)},cbkI:f,cbkT:function(t){v.lSiz--,1==t.progress&&(G=S,Et=m,Lt=C,t.mV2FT.forEach(function(t,o){o.resVP(),o.getMV=b.prototype.getMV,o.getVP=b.prototype.getVP}),this.oT.bU(),n(t),this.oT.eU())}})}},b.prototype.sRng=function(){return Qo.A.Rng(this.oT.sSA)},b.prototype.Smoothless=function(t,o){h(t)&&(this.cwbU(),t.call(o||this),this.cweU())},b.prototype.getRS=function(){return this.oRS||(this.oRS=function(){var t=new w(this.oS,{c:this.getCategoryAxis(),v:this.getValueAxis(),x:this.getXAxis(),y:this.getyAxis()},this),o="cRS"+t.type();return this[o]&&this[o].call(this,t),t}.call(this))},b.prototype.getMV=function(){return this.oMV||(this.oMV=new it(this))},b.prototype.getAx=function(){return this.oAx||(this.oAx=new J(this))},b.prototype.getXY=function(){return this.oXY||(this.oXY=new ot(this))},b.prototype.getVP=function(){return this.oVP||function(){var t,o=this.getRS(),e=o.type();return this.ctxTfi(function(i){this.ctxScale(i,this.GetClientRect(),function(n){var r=this.getXY().view(n),s=new Bo;o.forEach(function(t){(function(t,o,e,i){return this["gC"+e.s.getType()](t,o,e,i)}).call(this,i,r,t,s)},this),t={ax:e&&this["gAx"+e](i,r)||new Bo,c:s}})},this),this.oVP=t,!this.gCW().lR&&this.inv(),t}.call(this)},b.prototype.ptCA=function(t,o){var e={x:qe.X(t),y:qe.Y(t)},i=this.GetScroll(),n=this.GetClientRect();return a(o)||o?(e.x-=n[0],e.y-=n[1],e.x=this.scaled(e.x),e.y=this.scaled(e.y),e.x+=i.x,e.y+=i.y):(e.x-=i.x,e.y-=i.y,e.x=this.unscaled(e.x),e.y=this.unscaled(e.y),e.x+=n[0],e.y+=n[1]),e},b.prototype.rtCA=function(t,o){return qe.Rect(this.ptCA(qe.R2C(t,17),o),this.ptCA(qe.R2C(t,68),o))},b.prototype.isExtSBS=function(){var t=this.gCW();return t&&12288==(12288&t.gSBs())},b.prototype.updSPR=function(){if(this.oW){var t=!1,o=this.oW.GetSI(!0),e=this.oW.GetSI(!1),i=this.GetPageSize(),n=this.getXY(),r=this.gCnt(),s=[n.w+r.fS[0],n.h+r.fS[1]];o||(s[0]=i[0]),e||(s[1]=i[1]),[o,e].forEach(function(o,e){o&&(i[e]!=o.page&&(t=!0,o.page=i[e]),s[e]!=o.range&&(t=!0,o.range=s[e]))},this),t&&(this.resXY(),this.oW.SetSI(o,e),!this.lI&&this.invAO())}},b.prototype.getScale=function(){return a(this.scale)&&(this.scale=this.getZoom()/100),this.scale},b.prototype.scaled=function(t){return t/this.getScale()},b.prototype.unscaled=function(t){return t*this.getScale()},b.prototype.ctxScale=function(t,o,e,i){t.translate(o[0],o[1]),t.save(),t.scale(this.getScale(),this.getScale()),e.call(i||this,[0,0,this.scaled(o[2]),this.scaled(o[3])]),t.restore(),t.translate(-o[0],-o[1])},b.prototype.dCTX=function(t,o,e,i){Qo.pCTX(t,function(){this.ctxScale(t,o,function(o){this.ctxTfi(function(){e.call(i||this,o)},this,t)},this)},this)},b.prototype.onDrawPartScroll=function(t,o,e,i,n){function r(t,o){var e=(t-a[u])/a[u+2];return o?e:1-e}if(640==e){var a,l,u,h=this.getScrollBarsOrigin(),c=this.getRS();c.isXY()&&s(h)&&(a=[c.ooX.a.m,c.ooY.a.m,c.ooX.a.M-c.ooX.a.m,c.ooY.a.M-c.ooY.a.m],u=t.isV()?1:0,t.isV()&&Q(c.ooX)?l=qe.C2R([i[0]+i[2]/2,i[1]+r(0,c.ooY.o.reverse)*i[3]],3,3):!t.isV()&&Q(c.ooY)&&(l=qe.C2R([i[0]+r(0,!c.ooX.o.reverse)*i[2],i[1]+i[3]/2],3,3)),l&&o.drawShape(l,{fillColor:h,primitive:"Ellipse"}))}},b.prototype.onZoom=function(){this.scale=null,this.updSPR(),this.oT.onZoom()},b.prototype.GetZoom=function(){return this.oO.zoom},b.prototype.SetZoom=function(t){this.cwbU(),this.oO.zoom=t,this.onZoom(),this.cweU()},b.prototype.getZoom=function(){var t=this.GetZoom(),o=this.getZoomLevels();return a(t)&&(t=100),ui(o[0],hi(o[o.length-1],t))},b.prototype.GetZoomLevels=function(){return this.oO.zoomLevels},b.prototype.SetZoomLevels=function(t){this.cwbU(),this.oO.zoomLevels=t,this.onZoom(),this.cweU()},b.prototype.getZoomLevels=function(){var t=[100],o=new Qo.Arr;return ti(this.GetZoomLevels(),"25,50,75,100,110,125,150,175,200,250,300,400,500").split($o).forEach(function(t){o.push(ui(10,hi(1e3,Je(t,100))))}),o.isEmpty()||(t=o.byO()).sort(function(t,o){return t-o}),t},b.zoomToLevel=function(t,o){var e=0,i=o.length;if(t>=o[e])for(;t>=o[e+1]&&eci(n)?i:n)),e=this.ptCA(o.ptA,!1),this.rurScrollD(e.x-qe.X(o.pt)-i,e.y-qe.Y(o.pt)-n),this.onRurScrollD({dx:-i,dy:-n}),this.cweU()},b.prototype.rurFit=function(t,o){o.rurOnlyAO={},o.rurEFPaint=function(t,o,e,i){o.drawShape(e,this.toShape("frameFit"))},1!=this.getRS().type()||o.rurFlags&&o.rurFlags.has("zoom")?o.rurDrop=function(t){this.FitToClient(qe.Rect(t.from,t.to))}:(o.rurDrag=function(t){var o=this.rtCA(this.GetClientRect(),!0),e=this.getRS().v;t.frame[1-e]=o[1-e],t.frame[3-e]=o[3-e]},o.rurDrop=function(t){this.Smooth(function(){var o=this.getRS().v,e=this.gCnt().c[o],i=z(t.from)[o]-e,n=z(t.to)[o]-e;this.rTo(i,n)})}),this.rurDrag(t,o)},b.prototype.Soom=function(t,o){function e(){var t=this.GetClientRect();r=this.ptCA(o,!1),a={x:t[0],y:t[1]}}var i=s(t),n=s(o);if(i||n){var r,a,l=100*this.getScale();e.call(this),((i&=l!=t)||(n&=r.x!=a.x||r.y!=a.y))&&(Qo.A.Cancel("soom"),Qo.A.Progress(function(o){this.cwbU(),i&&this.SetZoom(l+(t-l)*o),n&&(e.call(this),this.rurScrollD((r.x-a.x)*o,(r.y-a.y)*o)),this.cweU()},{name:"soom",thisArg:this,duration:this.getSmooth(),onXDoL:!1,transition:"swipe"}))}},b.prototype.Home=function(){this.Soom(100,[0,0])},b.prototype.FitToClient=function(t){function o(t){return{x:t[0],y:t[1]}}var e=a(t);if(e)this.Home();else if(!Qo.EyR(t)){var i=this.GetClientRect(),n=this.getScale(),r=hi(i[2]/t[2],i[3]/t[3]),s=o(t);e&&r>n?r=null:r=0&&g=0&&t=M&&m<=k&&j.add("r",{p:[m],o:u,s:D.toShape("cursorLine")}),(T=e&&function(t){var o,i,n,r,a,l,u=D.toShape("cursorValueAxisTooltip"),h=ui(0,Je(F.valueAxisPad,Se)),c=Qo.pad2A(u&&u.pad||0)[0];return s(i=Z(t,e,Y,D))&&(n=Ro(i,e.o.cursorFormat,B))&&(r=I.sizeHTMLText(n,0,Qo.ToTFI(u&&u.tfi)),a=[(l=qe.C2R(U(N(0,null,i,e,Y,D),qe.RPO([r.width/2+h+c,0],[0,0],Ct(V+90)),[-1,-1]),r.width,r.height))[0]+l[2]+c+ae,l[1]+l[3]/2],(o=o||new Map).set("0",{t:n,a:Mt(e.o,"labels","l")+V+90,c:Qo.FRt(l,Y.x),s:u,o:a})),o}(m))&&(j.add("yT",T),T.forEach(function(t,o){j.asp("yT."+o+".c"),j.asp("yT."+o+".o")})),y&&v.length&&(2==y&&function(t,o,i){var n=[];v.forEach(function(o,r){var a,u=Z(i,e,Y,D),h=!s(u);h||(h=l(a=o.v[t])?uui.apply(ui,a):uui(0,a)),h&&n.push(r)}),n.length&&Oo(v,n)}(g,0,m),(A=o(g))&&(j.add("sT",A),A.forEach(function(t,o){j.asp("sT."+o+".c"),j.asp("sT."+o+".o")}))))}))),j.get()},b.prototype["cRS-3"]=function(t){var o=t.gdC();o&&(t.l=o.a.l.length)},b.prototype["gAx-3"]=b.prototype["gAx-1"],b.prototype["gVA-3"]=b.prototype["gVA-1"],b.prototype["dAx-3"]=b.prototype["dAx-1"],b.prototype["p2C-3"]=function(t){var o,e,i,n,r,a,u,h,c,p,f,g,v,d,y,S,m,C,x,A,T,b,V,w=this,O=w.gCtx(),E=w.getMisc(),L=w.oCnt,M=w.oCr,k=w.back("cursorSerieTooltipAlpha",!0),P=w.back("cursorSerieTooltipBlend",!0),D=$e(E.digits,fe),I=Hi();return I.reset(),L&&(u=z(w.p2V(t)),n=R(L),r=qe.R2C(n),mt(u,r)<=hi(n[2],n[3])/2&&(a=w.getRS(),h=w.getMV(),S=Io(E),w.getAx(),o=a.gdV(),(i=a.gdC())&&i.a.l,m=(e=G(o)).m,C=e.M,x=N(0,null,m,o,L,w),A=N(0,null,C,o,L,w),o.o.reverse&&(V=m,m=C,C=V,V=x,x=A,A=V),T=mt(r,x),b=mt(r,A),w.dCTX(O,w.GetClientRect(),function(){c=Ct(Tt(r,A,u)),(p=~~(c/h.t))>=0&&p=0&&t=T&&g<=b&&I.add("r",{p:[g],o:r,s:w.toShape("cursorLine")}),(y=o&&function(t){var e,i,n,r,a,l,u=w.toShape("cursorValueAxisTooltip"),h=ui(0,Je(E.valueAxisPad,Se)),c=Qo.pad2A(u&&u.pad||0)[0];return s(i=Z(t,o,L,w))&&(n=Ro(i,o.o.cursorFormat,D))&&(r=O.sizeHTMLText(n,0,Qo.ToTFI(u&&u.tfi)),a=[(l=qe.C2R(U(N(0,null,i,o,L,w),qe.RPO([r.width/2+h+c,0],[0,0],Ct(S+90)),[-1,-1]),r.width,r.height))[0]+l[2]+c+ae,l[1]+l[3]/2],(e=e||new Map).set("0",{t:n,a:Mt(o.o,"labels","l")+S+90,c:Qo.FRt(l,L.x),s:u,o:a})),e}(g))&&(I.add("yT",y),y.forEach(function(t,o){I.asp("yT."+o+".c"),I.asp("yT."+o+".o")})),M.getShowCursorSerieTooltip()&&(d=function(t){var o,e=w.toShape("cursorSerieTooltip"),i=bo(xt(c)+(S+90)),n=Vo(t,w);return n&&n.forEach(function(t,n){t.forEach(function(t,r){var s,a,u,h,c=t.p.iiV,p=xo(c,!0),f=t.p.b;(a=Ro({iiV:l(c)?c:null,v:p,s:n.s},n.s.getCursorFormat(),D))&&(s=Zt(e,f,zt(f,k,P)),u=To(t,O.sizeHTMLText(a,0,Qo.ToTFI(s&&s.tfi)),i,Vt(t)/2+ae,s,h=[]),(o=o||new Map).set(ti(n.s.GetIndex())+":"+r,{t:a,c:u,s:s,o:h}))})}),Go(o,{h:~"tb".indexOf(i),fit:L.x,and:!1}),o}(u))&&(I.add("sT",d),d.forEach(function(t,o){I.asp("sT."+o+".c"),I.asp("sT."+o+".o")})))}))),I.get()},b.prototype.gAx1=function(t,o){return function(t,o,e,i,r){var s,a,l,u,h=e.getRS(),c=e.getAx().cc,p=c&&c[0].oR;return i=i||new Bo,r=r||He,p&&(l=[(s=R(o))[a=~"tb".indexOf(p.s)?0:1],H(0,s,h.gdV())[1-a]],u=[s[2+a],0],a&&(n(l),n(u)),E(t,[l[0],l[1],u[0],u[1]],s,p,p.o.majorGridLines||k(!1,p.o,h),o,e,i,r)),i}(t,o,this,function(t,o,e,i,n,r){var s={n:r||We,i:0},a={n:n||Xe,i:0};return i=i||new Bo,D(t,"l",o,e,i,a),D(t,"r",o,e,i,a),D(t,"t",o,e,i,s),D(t,"b",o,e,i,s),i}(t,o,this))},b.prototype.gVA1=function(t){for(var o,e=this.getRS(),i=this.getAx(),n=e.v?"tb":"lr",r=0,s=n.length;r=0&&f=0&&pui.apply(ui,a):uui(0,a)),c&&i.push(n)}),i.length&&Oo(g,i)}(f,0,S),(x=o(f,m))&&(k.add("sT",x),x.forEach(function(t,o){k.asp("sT."+o+".c"),k.asp("sT."+o+".o")}))))}))),k.get()},b.prototype.gAx2=function(t,o){var e=new Bo,i=o.x,n=this.getAx(),r=n.x,s=n.y;return O(t,A(o,s),i,r,r.o.majorGridLines||Re,o,this,e,We),O(t,T(o,r),i,s,s.o.majorGridLines||Re,o,this,e,Xe),e},b.prototype.gVA2=function(t){var o=this.getAx();t.set(o.x.o.name="x",G(o.x)),t.set(o.y.o.name="y",G(o.y))},b.prototype.dAx2=function(t,o,e,i){if(!i){var n=this.getAx(),r=n.x,s=n.y;ht(t,e,We,null,r.o.majorGridLines||Re),ht(t,e,Xe,null,s.o.majorGridLines||Re),ht(t,e,We,r.o),ht(t,e,Xe,s.o)}},b.prototype.p2C2=function(t){function o(t,o,e,i,n){if(o&&e){var r,l,u,h,c,p=d.toShape(n),f=e.s;return s(l=B(t,a,e,i))&&(u=Ro(l,e.o.cursorFormat,w))&&(c=To(H(l,o,e),y.sizeHTMLText(u,0,Qo.ToTFI(p&&p.tfi)),f,ui(0,Je(S.valueAxisSize,ye))+ui(0,Je(S.valueAxisPad,Se)),p,h=[]),(r=r||new Map).set("0",{t:u,a:Mt(e.o,"labels",f),c:Qo.FRt(c,m.x),s:p,o:h})),r}}var e,i,r,a,u,h,c,p,f,g,v,d=this,y=d.gCtx(),S=d.getMisc(),m=d.oCnt,C=d.oCr,x=Hi(),b=d.back("cursorSerieTooltipAlpha",!0),V=d.back("cursorSerieTooltipBlend",!0),w=$e(S.digits,fe);return x.reset(),m&&(h=d.getAx(),u=d.getRS(),e=z(d.p2V(t)),a=R(m),c=A(m,h.y),p=T(m,h.x),i=u.v,d.dCTX(y,d.GetClientRect(),function(){x.add("v",i),g=e[i],C.getShowCursorXLine()&&x.add("x",{p:[g],s:d.toShape("cursorLine")}),(f=o(g,i?p:c,i?h.y:h.x,i,"cursorXAxisTooltip"))&&(x.add("xT",f),f.forEach(function(t,o){x.asp("xT."+o+".c"),x.asp("xT."+o+".o")})),v=e[1-i],C.getShowCursorYLine()&&x.add("y",{p:[v],s:d.toShape("cursorLine")}),(f=o(v,i?c:p,i?h.x:h.y,1-i,"cursorYAxisTooltip"))&&(x.add("yT",f),f.forEach(function(t,o){x.asp("yT."+o+".c"),x.asp("yT."+o+".o")})),C.getShowCursorSerieTooltip()&&(r=function(t){var o,e=d.toShape("cursorSerieTooltip"),r=Vo(t,d);return i&&n(t),r&&r.forEach(function(t,i){t.forEach(function(t,n){var r,s,a,u,h=t.p.iiV,c=xo(h,!0),p=t.p.b;(s=Ro({iiV:l(h)?h:null,v:c,s:i.s},i.s.getCursorFormat(),w))&&(r=Zt(e,p,zt(p,b,V)),a=To(t,y.sizeHTMLText(s,0,Qo.ToTFI(r&&r.tfi)),"t",Vt(t)/2+ae,r,u=[]),(o=o||new Map).set(ti(i.s.GetIndex())+":"+n,{t:s,c:a,s:r,o:u}))})}),Go(o,{h:i,fit:m.x}),o}([g,v]))&&(x.add("sT",r),r.forEach(function(t,o){x.asp("sT."+o+".c"),x.asp("sT."+o+".o")}))})),x.get()},b.prototype.gCradarline=K,b.prototype.dCradarline=function(t,o,e,i){Ot(e,function(e){(function(t,o,e,i,n,r){var s=It(this),a=e.s;dt(t,R(o),i,Zt(this.toShape(a)||this.toShape(n)||r,s[a.GetIndex()%s.length]),e.s,this)}).call(this,t,o,e,i.get(Dt(e.s)),"radarLine",di)},this,!0)},b.prototype.p2Vradarline=_,b.prototype.gCradararea=K,b.prototype.dCradararea=function(t,o,e,i){Ot(e,function(e){(function(t,o,e,i,n,r){var s=It(this),a=e.s,l=a.GetIndex(),u=s[l%s.length],h=Bt(this,s);dt(t,R(o),i,Zt(this.toShape(a)||this.toShape(n)||r,u,h[l%h.length]),e.s,this)}).call(this,t,o,e,i.get(Dt(e.s)),"radarArea",yi)},this,!0)},b.prototype.p2Vradararea=_,b.prototype.gCradarcolumn=function(t,o,e,i){var n;if(this.isLC()){var r=It(this),s=this.getRS();n=function(t){t.p.i=s.goI(t.p.i),t.p.b=t.p.b2=r[t.p.i%r.length]}}return K.call(this,t,o,e,i,n)},b.prototype.dCradarcolumn=function(t,o,e,n){var s=Xt(this),a=Ht(this),l=It(this);Bt(this,l);Ot(e,function(e){!function(t,o,e,n,u,h){if(e){function c(t){return Ct(Tt(d,[qe.X(d),-128],t))}function p(t){return mt(d,t)}var f,g,v,d=qe.R2C(o),y=h.getMisc(),S=u.s,m=h.getMV().sOf(u),C=Je(y.valueDistOuterCircular,Ge),x=Kt(h),R=go(h,S),A=$e(h.getMisc().digits,fe),T=new Map,b=new Map,V=l[u.s.GetIndex()%l.length];(f=Zt(n,V,zt(V,s,a))).primitive=f.primitive||"Pie",f.pArg=f.pArg||{},h.isLC()&&(g=function(t){var o=t.p.b2||t.p.b,e=Zt(n,o,zt(o,s,a));return e.primitive=e.primitive||"Pie",e.pArg=e.pArg||{},e},v=Mo),r(t,!0,function(){e.forEach(function(o){o.forEach(function(o){var e=2*p(o),i=g&&g(o)||f,n=!v||v(o);return n&&(i.pArg.startAngle=c(o)-m/2,i.pArg.sweepAngle=m,t.drawShape(qe.C2R(d,e,e),i,o)),!n}),R&&o.forEach(function(o){if(!v||v(o)){var e=b.get(o.p.b),n=T.get(o.p.b),r=qt(h,o.p.b);!e&&b.set(o.p.b,e=S.getValuePointShape(jt(h,o.p.b))),!n&&T.set(o.p.b,n=_t(h,o.p.b)),et(t,o,i(to(o.p,S.getValueFormat(),A),o.p.b),{flags:R,point:e,line:n,back:r,to:oo(d,p(o)+C,c(o)),extby:x/2},h)}})})})}}(t,R(o),n.get(Dt(e.s)),this.toShape(e.s)||this.toShape("radarColumn")||Si,e,this)},this,!0)},b.prototype.p2Vradarcolumn=_,b.prototype.gCpolarline=function(t,o,e,i){return L(0,e,(this.toShape(e.s)||this.toShape("polarLine")||Ci).size,o,this,i,Dt(e.s))},b.prototype.dCpolarline=function(t,o,e,i){var n=It(this),r=e.s;dt(t,R(o),i.get(Dt(r)),Zt(this.toShape(r)||this.toShape("polarLine")||Ci,n[r.GetIndex()%n.length]),r,this,{closed:!1})},b.prototype.p2Vpolarline=_,b.prototype.gCpolararea=function(t,o,e,i){return L(0,e,(this.toShape(e.s)||this.toShape("polarArea")||xi).size,o,this,i,Dt(e.s))},b.prototype.dCpolararea=function(t,o,e,i){var n=It(this),r=e.s,s=r.GetIndex(),a=n[s%n.length],l=Bt(this,n);dt(t,R(o),i.get(Dt(r)),Zt(this.toShape(r)||this.toShape("polarArea")||xi,a,l[s%l.length]),r,this)},b.prototype.p2Vpolararea=_,b.prototype.gCpolarscatter=function(t,o,e,i){return L(0,e,(this.toShape(e.s)||this.toShape("polarScatter")||mi).size,o,this,i,Dt(e.s))},b.prototype.dCpolarscatter=function(t,o,e,i){var n=It(this),r=e.s,s=r.GetIndex(),a=n[s%n.length],l=Bt(this,n),u=Je(this.getMisc().valueDistOuterCircular,Ge),h=qe.R2C(R(o));yt(t,R(o),i.get(Dt(r)),Zt(this.toShape(r)||this.toShape("polarScatter")||mi,a,l[s%l.length]),r,this,{flags:1|go(this,r),to:function(t,o){return eo(t,u,Ct(Tt(h,[qe.X(h),-128],t)),this)},extby:function(t,o){return o/2},thisArg:this})},b.prototype.p2Vpolarscatter=_,b.prototype.gCpie=function(t,o,e,i){var n,r,s,a,l,u,h,c,p,f,g=this.getMisc(),v=this.getRS().dis(),d=ui(0,v.indexOf(e)),y=v.length||1,S=Yo(this,e);return i=i||new Bo,S.length&&(n=Ct(Io(g)+90),r=ui(0,Je(g.paddingInsidePie,0)),s=R(o),a=qe.R2C(s),l=s[2]/2,c=(h=l-d*(u=l/y))-u+hi(r,u),p=n,f=Dt(e.s),S.forEach(function(t){t.t=Qo.Def.G.getAngle(p),i.set(f).push([Bo.p([oo(a,c,p),oo(a,h,p),oo(a,h,p+t.a)],t)]),p+=t.a})),i},b.prototype.dCpie=function(t,o,e,n){var s,a=this,l=a.getMisc(),u=Je(l.valueDistOuterCircular,Ge),h=Kt(a),c=e.s,p=R(o),f=qe.R2C(p),g=a.toShape(c)||a.toShape("pie")||Ri,v=Xt(this),d=Ht(this),y=go(a,c),S=n.get(Dt(c)),m=$e(a.getMisc().digits,fe),C=new Map,x=new Map;r(t,!0,function(){S&&$t(S,function(o){!function(o){var e,n=no(a,f,o);if(n&&(e=Qo.Cpy(function(t){var o=t.b2||t.b;return Zt(g,o,zt(o,v,d))}(n.p))||{fillColor:"black"},e.primitive=e.primitive||"PieRing",e.pArg=n,t.drawShape(qe.C2R(f,2*n.outsideRadius,2*n.outsideRadius),e,o),y)){var r=x.get(o.p.b),l=C.get(o.p.b),p=qt(a,o.p.b);!r&&x.set(o.p.b,r=jt(a,o.p.b)),!l&&C.set(o.p.b,l=_t(a,o.p.b)),(s=s||[]).push({from:n.from,value:i(to(o.p,c.getValueFormat(),m),o.p.b),point:r,line:l,back:p,to:oo(f,n.outsideRadius+u,n.startAngle+n.sweepAngle/2),extby:h/2})}}(o)}),s&&s.forEach(function(e){Qo.PInR(qe.X(e.to),qe.Y(e.to),o.x)||(e.fit=p),e.flags=y,et(t,e.from,e.value,e,a)})})},b.prototype.p2Vpie=function(t,o,e){if(this.oCnt){var i=this,n=Kt(this),r=qe.R2C(R(this.oCnt)),s=e.get(Dt(o.s));return n&&go(this,o.s)&&1&&$t(s,function(o){var e=no(i,r,o);return e&&Jt(t,e.from,n)&&e.p})}},b.prototype.gCscatterline=function(t,o,e,i){return M(0,e,null,o,this,i)},b.prototype.dCscatterline=function(t,o,e,i){var n=It(this),r=e.s,s=Qt(this),a=Kt(this);vt(t,R(o),i.get(Dt(r)),Zt(this.toShape(r)||this.toShape("scatterLine")||Ti,n[r.GetIndex()%n.length]),r,this,{lock1PX:1==r.getStyle(),closed:!1,to:function(t,o){return eo(t,s,Ct(90),this)},extby:a/2,thisArg:this})},b.prototype.p2Vscatterline=_,b.prototype.gCscatterarea=b.prototype.gCscatterline,b.prototype.dCscatterarea=function(t,o,e,i){var n=It(this),r=e.s,s=r.GetIndex(),a=Qt(this),l=Kt(this),u=n[s%n.length],h=Bt(this,n);vt(t,R(o),i.get(Dt(r)),Zt(this.toShape(r)||this.toShape("scatterArea")||bi,u,h[s%h.length]),r,this,{lock1PX:1==r.getStyle(),to:function(t,o){return eo(t,a,Ct(90),this)},extby:l/2,thisArg:this})},b.prototype.p2Vscatterarea=_,b.prototype.gCscatter=function(t,o,e,i){return M(0,e,(this.toShape(e.s)||this.toShape("scatter")||Vi).size,o,this,i)},b.prototype.dCscatter=function(t,o,e,i){var n=It(this),r=e.s,s=r.GetIndex(),a=Qt(this),l=n[s%n.length],u=Bt(this,n);yt(t,R(o),i.get(Dt(r)),Zt(this.toShape(r)||this.toShape("scatter")||Ai,l,u[s%u.length]),r,this,{flags:1,to:function(t,o){return eo(t,a,Ct(90),this)},extby:function(t,o){return o/2},thisArg:this})},b.prototype.p2Vscatter=_,b.prototype.gCbubble=function(t,o,e,i){return M(0,e,(this.toShape(e.s)||this.toShape("bubble")||Vi).size,o,this,i)},b.prototype.dCbubble=function(t,o,e,i){var n=It(this),r=e.s,s=r.GetIndex(),a=Qt(this),l=n[s%n.length],u=Bt(this,n);yt(t,R(o),i.get(Dt(r)),Zt(this.toShape(r)||this.toShape("bubble")||Vi,l,u[s%u.length]),r,this,{flags:1,to:function(t,o){return eo(t,a,Ct(90),this)},extby:function(t,o){return o/2},size:function(t){return ui(1,t.p.r)},thisArg:this})},b.prototype.p2Vbubble=_,b.prototype.gCline=j,b.prototype.dCline=function(t,o,e,i){Ot(e,function(e){(function(t,o,e,i,n,r){var s=It(this),a=e.s,l=Qt(this),u=Kt(this);vt(t,R(o),i,Zt(this.toShape(a)||this.toShape(n)||r,s[a.GetIndex()%s.length]),e.s,this,{lock1PX:1==a.getStyle(),closed:!1,to:function(t,o,i,n){var r=t.p.v;return io(t,l,(e.oY.o.reverse?-1:1)*(i&&n[i-1].p.v-r||-r),this)},extby:u/2,thisArg:this})}).call(this,t,o,e,i.get(Dt(e.s)),"line",wi)},this,!0)},b.prototype.p2Vline=_,b.prototype.gCarea=j,b.prototype.dCarea=function(t,o,e,i){Ot(e,function(e){(function(t,o,e,i,r,s){var a=this.getRS().v,l=It(this),u=e.s,h=R(o),c=Qt(this),p=Kt(this),f=u.GetIndex(),g=l[f%l.length],v=Bt(this,l);vt(t,h,i,Zt(this.toShape(u)||this.toShape(r)||s,g,v[f%v.length]),u,this,{lock1PX:1==u.getStyle(),group:function(t){if(!t._lg){t._lg=!0;var o=H(0,h,e.oY)[1-a],i=[t[0][a],o],r=[t[t.length-1][a],o];a&&(n(i),n(r)),t.splice(0,0,i),t.push(r)}},to:function(t,o,i,n){var r=t.p.v;return io(t,c,(e.oY.o.reverse?-1:1)*(i&&n[i-1].p&&n[i-1].p.v-r||-r),this)},extby:p/2,thisArg:this})}).call(this,t,o,e,i.get(Dt(e.s)),"area",Gi)},this,!0)},b.prototype.p2Varea=_,b.prototype.gCcolumn=function(t,o,e,i){var n;if(this.isLC()){var r=It(this),s=this.getRS();n=function(t){t.p.i=s.goI(t.p.i),t.p.b=t.p.b2=r[t.p.i%r.length]}}return j.call(this,t,o,e,i,null,n)},b.prototype.dCcolumn=function(t,o,e,i){Ot(e,function(e){(function(t,o,e,i,r,s){var a,l,u=this.getRS().v,h=It(this),c=e.s,p=R(o),f=Qt(this),g=Kt(this),v=h[c.GetIndex()%h.length],d=Xt(this),y=Ht(this),S=this.toShape(c)||this.toShape(r)||s,m=Zt(S,v,zt(v,d,y)),C=this.getMV().sOf(e);this.isLC()&&(a=function(t){var o=t.p.b2||t.p.b;return Zt(S,o,zt(o,d,y))},l=Mo),yt(t,0,i,jt(this,v),c,this,{flags:go(this,c),to:function(t,o){return io(t,f,(e.oY.o.reverse?-1:1)*-t.p.v,this)},extby:g/2,draw:function(o){var i,r=H(0,p,e.oY)[1-u],s=[o[u],r],h=!l||l(o);return h&&(u&&n(s),t.drawShape(i=so(s,o,C,u,t),a&&a(o)||m,o),o.p.rt=i),!h},thisArg:this})}).call(this,t,o,e,i.get(Dt(e.s)),"column",Oi)},this,!0)},b.prototype.p2Vcolumn=_,b.prototype.gCwaterfall=function(t,o,e,i){return j.call(this,t,o,e,i,null,function(t,o,e,i){var n=Ft(this),r=n.length&&n[i.s.GetIndex()%n.length];r&&Je(o&&e[o-1].p.v)>t.p.v&&(t.p.b2=r)})},b.prototype.dCwaterfall=function(t,o,e,i){Ot(e,function(e){(function(t,o,e,i,r,a){function l(t,o){return Je(t)=0;e-=2)o.push(t.splice(e,1)[0]);t.push.apply(t,o)}},to:function(t,o,i,n){var r=t.p.v;return io(t,u,(e.oY.o.reverse?-1:1)*(n[n.length-i-1].p.v-r),this)},extby:h/2,thisArg:this})}).call(this,t,o,e,i.get(Dt(e.s)),"rangeArea",Mi)},this,!0)},b.prototype.p2Vrangearea=_,b.prototype.gCcandlestick=function(t,o,e,i){return j.call(this,t,o,e,i,function(t,o){o(t[0],t),o(t[1],t),o(t[2],t),o(t[3],t)},function(t,o,e,i){var n,r,s=Ft(this);if(s.length&&!(o%4)&&(r=e[o+3].p.v)<(o?e[o-1].p.v:r)){n=s.length&&s[i.s.GetIndex()%s.length];for(var a=0;a<4;a++)e[o+a].p.b2=n}t.p.ii=o%4})},b.prototype.dCcandlestick=function(t,o,e,i){uo.call(this,t,o,e,i,"candleStick",ki,ho)},b.prototype.p2Vcandlestick=_,b.prototype.gCohlc=b.prototype.gCcandlestick,b.prototype.dCohlc=function(t,o,e,i){uo.call(this,t,o,e,i,"ohlc",Pi,co)},b.prototype.p2Vohlc=_,b.prototype.isDef=function(){return this==this.oT.oGV},b.prototype.GetTfi=function(){return this.oO.tfi},b.prototype.SetTfi=function(t){this.oT.resXY(function(){this.resAx(),this.nFH=0,this.oO.tfi=t||null},this)},b.prototype.getTfi=function(){return this.opt("tfi")},b.prototype.getFH=function(){return this.nFH||(this.nFH=function(){return this.ctxTfi(function(t){return t.fontHeight()})}.call(this))},b.prototype.ctxTfi=function(t,o,e){return St(e||this.gCtx(),this.getTfi(),t,o||this)},b.prototype.getFont=function(){return this.ctxTfi(function(t){return Qo.GetFont(t)})},b.prototype.GetLocked=function(){return this.oO.locked},b.prototype.SetLocked=function(t){this.oT.resXY(function(){this.oO.locked=t},this)},b.prototype.getLocked=function(){return this.opt("locked",!1)},b.prototype.GetReadOnly=function(){return this.oO.readOnly},b.prototype.SetReadOnly=function(t){this.oT.resXY(function(){this.oAA=null,this.oO.readOnly=t},this)},b.prototype.isReadOnly=function(){return this.opt("readOnly",!1)},b.prototype.GetWheelChange=function(){return this.oO.wheelChange},b.prototype.SetWheelChange=function(t){this.oT.resXY(function(){this.oO.wheelChange=t},this)},b.prototype.getWheelChange=function(){return this.opt("wheelChange",18)},b.prototype.GetSmooth=function(){return this.oO.smooth},b.prototype.SetSmooth=function(t){this.oO.smooth=t,!this.lI&&this.rAO()},b.prototype.getSmooth=function(t){return!t&&this.islow()?0:ui(0,Je(this.opt("smooth",125)))},b.prototype.GetShapes=function(){return this.oO.shapes},b.prototype.SetShapes=function(t){this.oT.resXY(function(){this.sShs=null,this.oO.shapes=t},this)},b.prototype.defShp=function(){return'{"frameColor":null,"length": "18"}(valueLine),{"primitive":"Circle","fillColor":"white","frameColor":null,"frameSize":"2","size": "8"}(valuePoint),{"frameColor":null,"pad": "4"}(valueBack),{"frameColor":null,"frameSize":"2"}(line,radarLine,polarLine,scatterLine),{"fillColor":null,"frameColor":null,"frameSize":"2"}(radarArea,polarArea,column,area,scatterArea),{"primitive":"Circle","fillColor":null,"frameColor":null,"size": "4"}(scatter,polarScatter),{"fillColor":null,"frameColor":"white","frameSize":"2"}(pie),{"primitive":"Circle","fillColor":null,"frameColor":null}(bubble),{"fillColor":null,"frameColor":null}(radarColumn,waterFall,rangeArea,rangeColumn,candleStick,ohlc,legendSymbol),{"frameDash":"2"}(cursorLine),{"fillColor":"black","tfi":"","pad":"2"}(cursorCategoryAxisTooltip,cursorValueAxisTooltip,cursorXAxisTooltip,cursorYAxisTooltip),{"fillColor":null,"frameColor":null,"pad":"4"}(cursorSerieTooltip),{"fillColor":"gray"}(legendSymbolHidden),{"opacity":"0.5"}(legendSymbolHidden,legendLabelHidden),FrameSel(select-overview),FrameFit(frameFit),'},b.prototype.getShapes=function(){return a(this.sShs)&&(this.sShs=ti(this.opt("shapes"))),this.sShs},b.prototype.toShapes=function(t){return t&&Qo.S.GetOf(t.GetShape&&t.GetShape()||b.typeOf(t),this.getShapes(),this.oT.constructor.type)||null},b.prototype.toShape=function(t,o){var e=this.toShapes(Qo.S.A2S(t)),i=e&&e.normal||e;return i&&o&&e&&e.disabled&&(i=Qo.Inh(e.disabled,i)),i},b.prototype.GetCursors=function(){return this.oO.cursors},b.prototype.SetCursors=function(t){this.oT.resXY(function(){this.sCrs=null,this.oO.cursors=t},this)},b.prototype.defCrs=function(){return"pointer(anchor,legend)"},b.prototype.getCursors=function(){return a(this.sCrs)&&(this.sCrs=ti(this.opt("cursors"))),this.sCrs},b.prototype.GetFormatText=function(){return this.oO.formatText},b.prototype.SetFormatText=function(t){this.oT.resXY(function(){this.nFT=null,this.oO.formatText=t},this)},b.prototype.getFormatText=function(){return a(this.nFT)&&(this.nFT=f(this.opt("formatText"),Qo.DrawTextFormatEnum,Qo.DrawTextFormatEnum.exTextAlignLeft|Qo.DrawTextFormatEnum.exTextAlignVCenter|Qo.DrawTextFormatEnum.exTextWordBreak|Qo.DrawTextFormatEnum.exTextWordEllipsis)),this.nFT},b.prototype.GetInvalid=function(){return this.oO.invalid},b.prototype.SetInvalid=function(t){this.bU(),this.oO.invalid=t,this.eU()},b.prototype.getInvalid=function(){return this.opt("invalid")},b.prototype.GetPad=function(){return this.oO.pad},b.prototype.SetPad=function(t){this.oT.resXY(function(){this.rgPad=null,this.oO.pad=t},this)},b.prototype.getPad=function(){return this.rgPad||(this.rgPad=Qo.pad2A(this.opt("pad",[4,4]))),this.rgPad},b.prototype.GetImageSize=function(){return this.oO.imageSize},b.prototype.SetImageSize=function(t){this.oT.resXY(function(){this.aIS=void 0,this.oO.imageSize=t},this)},b.prototype.getImageSize=function(){return void 0===this.aIS&&(this.aIS=this.opt("imageSize",null)),this.aIS},b.prototype.GetImageAlign=function(){return this.oO.imageAlign},b.prototype.SetImageAlign=function(t){this.oT.resXY(function(){this.nIA=null,this.oO.imageAlign=t},this)},b.prototype.getImageAlign=function(){return a(this.nIA)&&(this.nIA=~~this.opt("imageAlign",0)),this.nIA},b.prototype.GetAllowActions=function(){return this.oO.allowActions},b.prototype.SetAllowActions=function(t){this.cwbU(),this.oAA=null,this.oO.allowActions=t,this.cweU()},b.prototype.gAA=function(){return this.oAA||(this.oAA=new Qo.AA(this.opt("allowActions",this.oT.defAA()),this.isReadOnly()?this.oT.roAA():Jo)),this.oAA},b.prototype.Scroll=function(t){return this.oW.Scroll(t,this.getWheelChange())},b.prototype.GetScrollPos=function(){return this.GetScroll()},b.prototype.SetScrollPos=function(t){this.SetScroll(t)},b.prototype.getScrollPos=function(){return this.GetScrollPos()},b.prototype.GetScrollBarsOrigin=function(){return this.oO.scrollBarsOrigin},b.prototype.SetScrollBarsOrigin=function(t){this.bU(),this.oO.scrollBarsOrigin=t,this.eU()},b.prototype.getScrollBarsOrigin=function(){var t=this.GetScrollBarsOrigin();return void 0===t&&(t="black"),t||null},b.prototype.GetToolTipDelay=function(){return this.oO.toolTipDelay},b.prototype.SetToolTipDelay=function(t){this.oO.toolTipDelay=t},b.prototype.getToolTipDelay=function(){return this.opt("toolTipDelay",500)},b.prototype.GetToolTipPopDelay=function(){return this.oO.toolTipPopDelay},b.prototype.SetToolTipPopDelay=function(t){this.oO.toolTipPopDelay=t},b.prototype.getToolTipPopDelay=function(){return this.opt("toolTipPopDelay",5e3)},b.prototype.GetToolTipWidth=function(){return this.oO.toolTipWidth},b.prototype.SetToolTipWidth=function(t){this.oO.toolTipWidth=t},b.prototype.getToolTipWidth=function(){return this.opt("toolTipWidth",-1)},b.prototype.allowTT=function(){return Qo.TT&&this.getToolTipWidth()&&this.getToolTipPopDelay()},b.prototype.GetAllowDrop=function(){return this.oO.allowDrop},b.prototype.SetAllowDrop=function(t){this.oO.allowDrop=t},b.prototype.getAllowDrop=function(){return this.opt("allowDrop",!1)},b.prototype.GetMisc=function(){return this.oO.misc},b.prototype.SetMisc=function(t){this.cwbU(),this.oMsc=null,this.rgCT=null,this.oO.misc=t,this.onRL(),this.updSPR(),this.cweU()},b.prototype.getMisc=function(){return this.oMsc||(this.oMsc=this.opt("misc",rt)||{})},b.prototype.gCT=function(){return this.rgCT||function(){var t=[];ti(this.getMisc().cursorTrans,ze).split(",").forEach(function(o){t.push(new qe.Bezier(o))}),this.rgCT=t}.call(this)},b.prototype.GetBackground=function(){return this.oO.background},b.prototype.SetBackground=function(t){this.cwbU(),this.oO.background=t,this.cweU()},b.prototype.getBackground=function(){return this.opt("background",st)},b.prototype.back=function(t,o){var e,i=this.getBackground(),n=i&&i[t];return a(n)&&(o&&t in i||null==(n=(e=this.defOpt().background)&&e[t])&&(n=st[t])),n},b.prototype.GetAutoFit=function(){return this.oO.autoFit},b.prototype.SetAutoFit=function(t){this.cwbU(),this.oO.autoFit=t,this.resXY(),this.resMV(),this.cweU()},b.prototype.getAutoFit=function(){return this.opt("autoFit",!1)},b.prototype.GetValueAxis=function(){return this.oO.valueAxis},b.prototype.SetValueAxis=function(t){this.bU(),this.mVA=null,this.oO.valueAxis=t,this.onRL(),this.eU()},b.prototype.getValueAxis=function(){var t,o,e=this.mVA;return e||(e=new Map,s(t=this.opt("valueAxis"))&&(l(t)&&t||[t]).forEach(function(t){e.set(d(t.name),t)}),!e.size&&e.set(Jo,{}),!e.has(Jo)&&e.forEach(function(t,e){a(o)&&(o=e)}),e.d=o||Jo,this.mVA=e),e},b.prototype.GetCategoryAxis=function(){return this.oO.categoryAxis},b.prototype.SetCategoryAxis=function(t){this.bU(),this.rgCA=null,this.oO.categoryAxis=t,this.getCategoryAxis().forEachU(function(t){return t&&"reverse"in t&&(this.SetOrder()||!0)},this),this.onRL(),this.eU()},b.prototype.getCategoryAxis=function(){var t,o=this.rgCA;return o||(o=[],(l(t=this.GetCategoryAxis())&&t||[t]).forEach(function(t){o.push(t)}),this.rgCA=o),o},b.prototype.GetXAxis=function(){return this.oO.xAxis},b.prototype.SetXAxis=function(t){this.bU(),this.oO.xAxis=t,this.onRL(),this.eU()},b.prototype.getXAxis=b.prototype.GetXAxis,b.prototype.GetYAxis=function(){return this.oO.yAxis},b.prototype.SetYAxis=function(t){this.bU(),this.oO.yAxis=t,this.onRL(),this.eU()},b.prototype.getyAxis=b.prototype.GetYAxis,b.prototype.GetToolTipFormat=function(){return this.oO.toolTipFormat},b.prototype.SetToolTipFormat=function(t){this.bU(),this.oO.toolTipFormat=t,this.eU()},b.prototype.getToolTipFormat=function(){return this.opt("toolTipFormat","(name ? name + ': ' : '') + value")},b.prototype.GetValueSize=function(){return this.oO.valueSize},b.prototype.SetValueSize=function(t){this.bU(),this.oO.valueSize=t,this.resVP(),this.resXY(),this.resMV(),this.updSPR(),this.eU()},b.prototype.getValueSize=function(){return Je(this.opt("valueSize",16))},b.prototype.ValueAutoFit=function(){this.SetValueSize(function(t){var o=this.getRS(),e=this.gCnt().c;return V.call(this,e[2+o.v]-1,o.l-o.csz,null,t)}.call(this))},b.prototype.rurValueResize=function(t,o){function e(t){t=t||0;var o={};this.bU(),this.SetValueSize(ui(c,V.call(this,l+t,h))),o[s]=ai(this.getMV().t*(u+l)/p.t)-(l+t),this.SetScrollPos(o),this.eU()}if(t){var i,n,r,s,a,l,u,h,c,p=this.getMV();!this.getAutoFit()&&p.t&&(r=this.getRS().v,s=r?"y":"x",a=r?"dy":"dx",u=this.getScrollPos()[s],i=this.gCnt().c,n=this.GetClientRect(),l=function(t){var o=this.gPtr(t);return{x:o.x-this.unscaled(i[0]-n[0]),y:o.y-this.unscaled(i[1]-n[1])}}.call(this,t)[s],h=l/p.t,c=0,this.doRUR(t,function(t){switch(t.drag.status){case 1:this.oT.oRUR.ao=o&&o.rurOnlyAO,this.rAO();break;case 7:this.oT.oRUR&&(this.oT.oRUR.ao=null),t.drag.cancel?e.call(this,0):this.rAO();break;case 2:e.call(this,t.drag.offset[a]);break;case 4:case 5:o&&o.rurStatus&&o.rurStatus.call(o.thisArg||this,t)}},this))}},b.prototype.onMoveValue=function(){this.onmovevalue()},b.prototype.onmovevalue=function(){this.oLts.onmovevalue.do()},b.prototype.rurMoveValue=function(t,o){function e(t){return(!o.rurFlags||!o.rurFlags.has("disablemovecategory"))&&s(a.i)&&s(t.i)&&a.i!=t.i}function i(t){return o.rurFlags&&o.rurFlags.has("enablemoveserie")&&s(a.s)&&s(t.s)&&a.s!=t.s}function n(t){return o.rurFlags&&o.rurFlags.has("enablemovedata")&&s(a.i)&&s(t.i)&&a.i!=t.i}function r(t){var o,r,s=this.getRS(),u=a.i,h=t.i,c=a.s,p=t.s;this.Smooth(function(){if(n(t)){var a,f,g=s.s2RS(c),v=g.cv.v;if(g&&v){for(r=!0,a=v.length,f=ui(v.length,h+1);a=0&&isNaN(v[a]);a--);v.splice(a+1,f-a),c.SetData(l(c.GetData())?v:function(t){var o="";return t&&t.forEach(function(t,e){o+=e?$o:Jo,isNaN(t)||(o+=t)}),o}(v))}}i(t)&&(r=!0,c.SetPosition(p.GetPosition())),e(t)&&(r=!0,o=s.gRO(),this.isLC()&&(u=o.indexOf(u),h=o.indexOf(h)),o.splice(h,0,o.splice(u,1)[0]),this.SetOrder(o.join($o))),this.oT.luoYD(3)}),r&&this.onMoveValue()}var a;t&&(a=Xo.call(this,this.gPtr(t)))&&this.doRUR(t,function(t){var s;switch(t.drag.status){case 2:s=Xo.call(this,this.gPtr(t)),t.drag.setCursor(Qo.GP.Get(s&&(function(t,o){return t==o||t.s==o.s&&t.i==o.i}(a,s)||e(s)||i(s)||n(s))?"move-value-drag":"no",this.getCursors()));break;case 4:case 5:o&&o.rurStatus&&o.rurStatus.call(o.thisArg||this,t);break;case 7:t.drag.cancel||t.drag.click||(s=Xo.call(this,this.gPtr(t)))&&r.call(this,s)}},this)},b.prototype.GetCursor=function(){return this.oCr.GetOptions()},b.prototype.SetCursor=function(t){this.oCr.SetOptions(t)},b.prototype.GetLegend=function(){return this.oLg.GetOptions()},b.prototype.SetLegend=function(t){this.oLg.SetOptions(t)},b.prototype.GetSort=function(){return this.oO.sort},b.prototype.SetSort=function(t){this.bU(),this.SetOrder(),this.oO.sort=t,this.onRL(),this.eU()},b.prototype.getSort=function(){return this.opt("sort")},b.prototype.GetOverview=function(){return this.oOv.GetOptions()},b.prototype.SetOverview=function(t){this.oOv.SetOptions(t)},b.prototype.GetMultiColorSerie=function(){return this.oO.multiColorSerie},b.prototype.SetMultiColorSerie=function(t){this.cwbU(),this.oO.multiColorSerie=t,this.onRL(),this.cweU()},b.prototype.getMultiColorSerie=function(){return this.opt("multiColorSerie",!0)},b.prototype.GetAllowStack=function(){return this.oO.allowStack},b.prototype.SetAllowStack=function(t){this.cwbU(),this.oO.allowStack=t,this.onRL(),this.cweU()},b.prototype.getAllowStack=function(){return this.opt("allowStack",!0)},b.prototype.GetSerieType=function(){return this.oO.serieType},b.prototype.SetSerieType=function(t){this.cwbU(),this.sT=null,this.oO.serieType=t,this.onRL(),this.cweU()},b.prototype.getSerieType=function(){return this.sT||(this.sT=Pt(this.opt("serieType","column")))},b.prototype.GetOrder=function(){return this.getRS().gRO().join($o)},b.prototype.SetOrder=function(t){this.bU(),Wo.call(this,t),this.onRL(),this.eU()},b.prototype.getOrder=function(){if(void 0===this.mcO){var t=ti(this.opt("order")),o=null;t&&t.split($o).forEach(function(t,e){ni(t=t.trim())&&(t=$e(t),!(o=o||new Qo.BiM).hasValue(t)&&o.set(e,t))}),this.mcO=o}return this.mcO},b.prototype.i2c=function(t){return this.isLC()?t:this.getRS().gRO()[t]},b.prototype.GetSerieDef=function(){return this.oO.serieDef},b.prototype.SetSerieDef=function(t){this.oO.serieDef=t},b.prototype.getSerieDef=function(){return this.opt("serieDef")},Object.addPrototypeOf(w.prototype,Array.prototype),w.prototype.init=function(t,o,e){function i(){var t;if(this.isXY())t={o:v||{}};else{function o(t,o,e){return t.Evaluate(function(t){var i;return-1==t&&(i=e),-2==t&&(i=o),i})}function i(t,e,i,n){var r,s=Qo.E.Create(e,"index,value");(i||s.IsValid())&&(r=s.IsValid()?function(t,e){return o(s,t,e)}:function(t,o){return t},t.forEach(function(t,o){n(r(t,o),o)}))}function n(t,o){var e=[];return i(t,o,!0,function(t){e.push(ti(t))}),e}function r(t,o){var e,n;return t&&t.format&&i(o,t.format,!1,function(t,o){t=ti(t),n!=t&&((e=e||[]).push({i:o,p:e.length,l:t}),n=t)}),e&&{g:t,l:e}}function a(t){var o,i=[];return t&&(o=t.categories,o=h&&h.col(o)||o,i=ii(o)?o.split(","):l(o)?o:[o]),t=t||{},{a:{c:i,l:n(i,t.format)},ogl:r(t.overviewGridLines,i),cgl:r(t.chartGridLines,i),m:function(t){var o;return s(t.mark)&&(l(t.mark)&&t.mark||[t.mark]).forEach(function(t){if(s(t.shape)&&(ni(t.applyTo)||l(t.applyTo)||ii(t.applyTo))){var i,n=f(t.showIn,Qo.Graph.ShowInEnum,1),r=t.applyTo;n&&(ii(r)||(r="index in ("+(l(r)&&r||[r]).join($o)+")"),(i=Qo.E.Create(r,"index,value,label"))&&i.IsValid()&&(o=o||[]).push({s:e.toShape(t.shape),e:i,in:n}))}}),o}(t),o:t}}var p=[];c&&c.length&&(c.forEach(function(t){p.push(a(t))}),u&&(p[0].a.c=u.rgE,p[0].a.l=n(p[0].a.c,p[0].o.format)),p.forEach(function(t){if(t.o&&t.o.split){var e,i,n,r,s,a,l,u=Qo.E.Create(t.o.format,"index,value");if(u.IsValid()){a=(s=t.a.c).length,e=[],i=[],n=[];for(var h=0;h>2)%4)&&t.length>2+(nt+=nt>>2)%4&&(t[(nt+=nt>>2)%t.length]=NaN,(nt+=nt>>2)%4&&(t[(nt+=nt>>2)%t.length]=NaN))}(o),x(o,o,e.mmd,null,e.ex0),1==e.mmd&&t.oY&&X(t.oY.o.type)&&(o.m=ui(0,o.m),o.M=ui(0,o.M))},this)}o=o||{},this.oMsc=e&&e.getMisc(),this.bAS=oi(e&&e.getAllowStack(),!0);var u,h=e&&e.oT.oD,c=o.c,p=o.v,v=o.x,d=o.y,y=kt();(function(){var o,e;t.forEach(function(t){t.isValid()&&(e=y.get(t.getType()),o||(o={o:e}),e&&o&&o.o&&e.c==o.o.c&&this.push({s:t,cv:t.uCatVal(e.d)}))},this),this.lV=this.length,this.sort(function(t,o){return y.get(t.s.getType()).z-y.get(o.s.getType()).z}),o&&o.o&&(this.c=o.o.c,this.d=o.o.d,this.mmd=o.o.mmd),this.forEach(function(t){t.cv.c&&(u=u||new Qo.Arr,t.cv.c.forEach(function(t,o){u.add(o)}))}),this.forEach(function(t){var o=t.cv.v,e=t.cv.c;e&&(o=[],e.forEach(function(t,e){for(var i=u.getPos(e),n=hi(o.length,i);n=h)&&c.push(l);for(var v,f=0;f=0&&v1){var o=ui(0,wt(t,null,function(t,o){return t.s.isVisible()&&o+1})-1),e=t[o],i=new Map;console.assert(e,"The base-runtime serie that holds stacked serie is not found."),o&&(t.splice(o,1),t.splice(0,0,e));for(var n=1,r=t.length;n2?t.m[2]:0,M:o>2?t.M[2]:0},this.aM3vl(this.ooX,this.ooX.a),this.aM3vl(this.ooY,this.ooY.a),this.aM3vl(this.ooZ,this.ooZ.a)}else{var e,i,n,r,s=new Map,a=Fo(this.oMsc);this.feA(function(t){!(e=s.get(t.oY))&&s.set(t.oY,e=[]),e.push(t)}),this.ooY.forEach(function(t){if(e=s.get(t)){if(n||(n=t),r||ti(t.o.name)!=Jo||(r=t),t.a={},this.mMOf(e,t.a),this.mmd>1&&(t.a.m=Je(t.a.m[1]),t.a.M=Je(t.a.M[1])),t.o.asPercent){var o=t.a.m,l=1/(t.a.M-o);e.forEach(function(t){var e=[];t.v.forEach(function(t){ni(t)&&(t=m((t-o)*l,a)),e.push(t)}),e.m=0,e.M=1,t.v=e}),t.a.m=0,t.a.M=1}this.aM3vl(t,t.a)}else(i=i||[]).push(t)},this),i&&(r=r||n)&&i.forEach(function(t){t.a=r.a,t.o.format!=r.o.format&&(t.a=Qo.Cpy(t.a),this.aM3vl(t,t.a))},this)}}.call(this),function(){var t,o,e=0;this.feA(function(t){e=ui(e,t.v.length)}),(t=this.gdC())&&(e=ui(e,t.a.c.length)),this.l=e,this.isXY()&&this.v&&(o=this.ooX,this.ooX=this.ooY,this.ooY=o,this.feA(function(t){t.v.forEach(function(t){l(t)&&n(t)})})),this.per()}.call(this)},w.prototype.type=function(){return parseInt(this.c)||0},w.prototype.moYs=function(){return 1==this.type()},w.prototype.isXY=function(){return 2==this.type()},w.prototype.mMOf=function(t,o){var e=[],i=kt(),n=!0;return t&&t.forEach(function(t){Ot(t,function(t){n&=!i.get(t.s.getType()).ex0,e.push(t.v.m),e.push(t.v.M)})}),x(e,e,this.mmd,null,!n),o=o||{},o.m=e.m,o.M=e.M,o},w.prototype.aM3u=function(t,o,e){function i(t){return t.sort(function(t,o){return t-o}),t}function n(t,o){o=o||[1,10];for(var e,i=a[0],n=o[0],r=o[1],s=t/i>r,l=1,u=0,h=0;!e&&h<16;)u=0,a.forEach(function(o){var i=ai(t/(o*=l));ir?!i&&u++:(!e||i>e.c)&&(e={c:i,mU:o})}),e||(l=s?10*l:l/10,h++);return e}var r,s=0,a=function(t){var o=[];return ti(t).split(",").forEach(function(t){(t=ui(0,Je(t)))&&o.push(t)}),!o.length&&o.push(1),i(o)}(this.oMsc.baseMajorUnits||"1,2,2.5,5"),u=function(t){var o=l(t)&&t||ti(t).split(",");return o=[ui(1,Je(o[0])),ui(1,Je(o[1]))],i(o)}(this.oMsc.rangeMajorUnits||pe),h=o.m,c=o.M,p=o.mU||1,f=t.o.asPercent;ni(t.o.min)?h=Je(t.o.min):f||(s|=1),ni(t.o.max)?c=Je(t.o.max):f||(s|=2),r=h,h=hi(h,c),c=ui(r,c),(r=ni(t.o.majorUnit)&&ui(0,Je(t.o.majorUnit))||0)?p=r:s|=4,!e&&s&&(4&s&&(c==h&&(c+=function(t){var o=1;if(t)for(;t<1;)t*=10,o/=10;return o}(ci(c))),p=function(t,o){for(var e,i=o-t,r=1;i<1;)i*=10,r*=10;return i=ai(i),(e=n(i,u)||n(i,[1,10]))&&e.mU/r}(h,c)),1&s&&(h=p*ai(h/p),o.mc-p*ui(0,Je(this.oMsc.extVisibleAfterAxis,.5))&&(c+=p))),o.m=h,o.M=c,o.mU=p},w.prototype.aM3vl=function(t,o,e){function i(t){var o=m(t,c);s.push(o),a.push(ti(h(o)))}this.aM3u(t,o,e);var n,r,s=[],a=[],l=ti(t.o.format),u=l&&Qo.E.Create(l,"value"),h=u&&u.IsValid()?function(t){return u.Evaluate(function(){return t})}:function(t){return t},c=Fo(this.oMsc),p=o.m,f=o.M,g=X(t.o.type);if(ni(p)&&ni(f)){if(o.mU<1){n=0;for(var v=o.mU;v<1;v*=10,n++);c=ui(c,n)}if(g){for(i(p),r=ui(p,1);r<=f;r*=10)i(r);s.length<2&&(p+=o.mU,g=!1)}if(!g)for(r=p;r<=f;r+=o.mU)i(r)}o.v=s,o.l=a},w.prototype.oYD=function(t){if(t){var o,e,i=kt();this.feA(function(e){var n,r=x(e.v,null,this.mmd,t,i.get(e.s.getType()).ex0);r&&c(r.m)&&c(r.M)&&((n=(o=o||new Map).get(e.oY))&&(r.m=hi(r.m,n.m),r.M=ui(r.M,n.M)),o.set(e.oY,r||n))},this),o&&(o.forEach(function(t,o){this.aM3vl(o,o.d=t)},this),this.ooY.size-o.size&&(e=this.gdV())&&e.d&&this.ooY.forEach(function(t){if(!o.has(t)){var i=(this.ooY.get(d(t.o.idemmM))||e).d;this.aM3vl(t,t.d={m:i.m,M:i.M,mU:i.mU},!0)}},this))}else this.ooY.forEach(function(t){t.d=null})},w.prototype.gdC=function(){var t=this.ooX;return t.length&&t[0]||null},w.prototype.gdV=function(){var t=this.ooY;return t.size&&t.get(t.d)||null},w.prototype.goI=function(t){var o=this.o;return o&&t1)for(var t=n[0].p,o=1,e=n.length;o1&&(t.forEach(function(t){(function(t){for(var o=0,i=n&&n.length;oe.m&&00)},t):e(t,i(!0,f(t.o.align,Qo.AlignEnum,p)),h,c)}),a.ooY.forEach(function(t){e(t,i(!1,t.o.align),g,v)});for(var d in r)o.call(this,d,r[d]);this.cc=n&&[{oR:n}]},J.prototype.aAx2=function(t){var o=this.oGV.getRS(),e=(o.ooX.a.m+o.ooX.a.M)/2,i=(o.ooY.a.m+o.ooY.a.M)/2;this.x=Qo.Mrg({s:"t"},o.ooX),this.y=Qo.Mrg({s:"l"},o.ooY),(o.ooY.o.reverse?0i)&&(this.x.s="b"),(o.ooX.o.reverse?0>e:00&&(a--,l-=s,u++),u=hi(++u,e.l-a),t.s={i:a,o:l,l:u},!this.oGV.loYD&&e.oYD(zo(i)&&(a||u!=e.l)?t.s:null)}).call(this,r[n?"y":"x"],t.c[n?3:2]),r[n?"y":"x"]=0,t.c[n?2:3]=this[n?"w":"h"],t.s=Qo.Mrg(t.s,r)},ot.prototype.sWH2=o,ot.prototype.svw2=function(t){t.c[2]=this.w,t.c[3]=this.h},it.prototype.init=function(t){function o(t){function o(){s.length>1&&(e=e||[]).push(s)}var e,n,r=0,s=[];return i.dis().forEach(function(t){var e=!0;(!s.length||(e=function(t,o){var e=h.get(t.s.getType()).sbs;return e&&e==h.get(o.s.getType()).sbs&&t.oY==o.oY}(t,s[0])))&&s.push(t),e||(o(),s=[t])}),o(),e&&(e.forEach(function(o){r=ui(r,o.length),n=n||new Map;var e=[];o.forEach(function(t,i){Ot(t,function(t){n.set(t,{p:i,c:o.length}),e.push(t)})}),e.c=o.length,(t.sbs=t.sbs||[]).push(e)}),n&&(t.M=r)),n}var e,i=t.getRS(),n=i.type(),r=t.getMisc(),a=ui(0,t.getValueSize()),l=ui(0,Je(r.marginValueRatio,Ce)),u=ui(0,Je(r.paddingValueRatio,xe)),h=kt();this.oGV=t,this.mpc=o.call(this,this),e=n?this["tot"+n]():0,this.mmv=function(o,e){function n(o,e){s(o)&&(a=V.call(t,o,ui(1,i.l-i.csz),e));var n=a*l,r=a*u;return{m:n,p:r,s:a,t:2*n+e*(a+r)-r}}var r=this.mpc,h=this.M,c=n(o,r&&h||1),p=new Map;return r&&(this.sbs.forEach(function(t){var o=c;t.length!=h&&(o=n(c.t*i.l,t.c),console.assert(ci(o.t-c.t)=ne)return!0;o=e},this))return o},it.prototype.o2RS=function(t){var o,e=[],i=this.oGV.getRS().all();return this.sbs?(o=new Map,this.sbs.forEach(function(i){i.forEach(function(i){if(o.set(i,!0),i.s.isVisible()){var n=this.mvOf(i),r=n.m,s=n.p/2,a=n.s/2,l=this.pos(i),u=this.pOf(i),h=u?s:r,c=this.mpc&&u!=this.mpc.get(i).c-1?s:r;t>=l-(h+a)&&t