text: /**
   * Copyright (c) 2014, 2016, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   */
  "use strict";
  define(['./DvtToolkit'], function(dvt) {
    // Internal use only.  All APIs and functionality are subject to change at any time.
  
  var p;function ba(a,b){0==a.indexOf("dvt.")&&(a=a.substring(4));var c=a.split("."),d=eval("dvt");c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}Math.floor(2147483648*Math.random()).toString(36);
  (function(a){function b(a,b,c,d,e,h){this.Init(a,b,c,d,e,h)}function c(a,b){this.Init(a,b)}function d(a){this.Init(a.u(),a.Ef,a);this.Dc=a}function e(){this.Init({skyros:e.ji,alta:e.Xe,next:e.Gz})}function f(a){this.Dc=a;this.hg=this.Dc.F()}a.df=function(){};a.v.D(a.df,a.xe);a.df.newInstance=function(b,c,d){var e=new a.df;e.Init(b,c,d);return e};a.df.Xq=function(a){return(new e).Xq(a)};a.df.prototype.Init=function(b,c,h){a.df.C.Init.call(this,b,c,h);this.setId("legend1000"+Math.floor(1E9*Math.random()));
  this.hh=new e;this.H=new d(this);this.H.ig(this);this.$u=[];this.Jw=[];this.fe=null;this.Loa=[]};a.df.prototype.Hf=function(a){this.Wj.tO();a?(this.X=this.hh.an(a),this.OKa(this.X.sections)):this.X||(this.X=this.jE())};a.df.prototype.cs=function(b,c,d){this.Hf(b);this.F().isLayout=!0;b=h.ya(this,new a.Y(0,0,c,d));this.F().isLayout=!1;return new a.hk(b.a,b.b)};a.df.prototype.ya=function(b,d,e){this.Hc.tO();this.Hf(b);isNaN(d)||isNaN(e)||(this.Cb=d,this.Pb=e);this.F().isLayout=!1;this.Em();this.$u=
  [];this.Jw=[];this.fe=null;this.Loa=[];a.B.Ua()||this.H.ws(new c(this.H,this));this.Br();this.cja=h.ya(this,new a.Y(0,0,this.Cb,this.Pb));(b=this.F().highlightedCategories)&&0<b.length&&this.Oe(b);this.su();return this.cja};a.df.prototype.Oe=function(b){this.F().highlightedCategories=b&&0<b.length?b.slice():null;a.Vg.Oe(b,this.$u,!0)};a.df.prototype.Ef=function(a,b){var c=a.type;if("categoryHighlight"==c&&"dim"==this.F().hoverBehavior){var d=this.$u;this!=b&&this.Oe(a.categories);for(var e=0;e<d.length;e++)if(d[e].getId()==
  a.categories){this.LLa.scrollIntoView(d[e].Ce()[0]);break}}this!=b&&"adfShowPopup"!=c&&"adfHidePopup"!=c||this.dispatchEvent(a)};a.df.prototype.Jha=function(b){if(b.Ce()[0]instanceof a.ea)this.Jw.push(b);else{var c=this.F().hideAndShowBehavior;(null!=b.ug()||null!=b.bh()||b.Jj()||"none"!=c&&"off"!=c)&&this.Jw.push(b);this.$u.push(b)}};a.df.prototype.Kha=function(a){this.fe=a.clone()};a.df.prototype.x0a=function(a){this.Loa.push(a)};a.df.prototype.ti=function(){return new f(this)};a.df.prototype.gK=
  function(){return null!=this.H?this.H.$e():null};a.df.prototype.vca=function(a,b){if(null!=this.H){for(var c=this.Jw,d=0;d<c.length;d++)if(c[d].getId()==a.getId()){this.H.vs(c[d]);b&&c[d].Qf();break}if(c=this.gK())d=c.Ce()[0],d.yd("label",c.Fd()),this.u().XG(d)}};a.df.prototype.aa=function(b){var c=new a.Y(0,0,this.Cb,this.Pb);return b&&b!==this?this.Zi(c,b):c};a.df.prototype.VA=function(a){return a&&a!==this?this.Zi(this.cja,a):this.cja};a.df.prototype.Im=function(){return a.K.ua(a.K.Ma,"LEGEND")};
  a.df.prototype.OKa=function(b){if(b&&!(0>=b.length))for(var c=this.F().hiddenCategories,d=0;d<b.length;d++){var e=b[d];e.sections&&(c=this.OKa(e.sections));if((e=e.items)&&!(0>=e.length))for(var f=0;f<e.length;f++){var t=e[f],v=h.yaa(t);"hidden"==t.categoryVisibility&&0>a.na.qb(c,v)&&c.push(v);t.categoryVisibility=null}}};a.df.prototype.Br=function(){if(this.b4()){var b=this.F(),c=b.hideAndShowBehavior;if("off"!=c&&"none"!=c||"dim"==b.hoverBehavior)this.u().Of("application"),this.u().c2(a.K.ua(a.K.Ma,
  "COLON_SEP_LIST",[a.K.ua(a.K.Ma,"DATA_VISUALIZATION"),a.Kd.SG(this.Im())]))}};a.df.prototype.MG=function(){return 0<this.Jw.length};a.df.fK=function(b){var c=b.Wj.ek("itemsCount");if(null!=c)return c;for(var c=0,d=b.F().sections,e=0;e<d.length;e++)c+=a.df.xOa(d[e]);b.Wj.Bh("itemsCount",c);return c};a.df.xOa=function(b){var c=0;b.items&&(c+=b.items.length);if(b.Djb){b=b.Djb;for(var d=0;d<b.length;d++)c+=a.df.xOa(b[d])}return c};a.v.D(f,a.Ud);f.prototype.Po=function(a){return(a=this.Dc.Za().kb(a))&&
  a instanceof b&&(a=a.getData(),a=this.QEa(a,this.hg))?"section"+a:null};f.prototype.QEa=function(a,b){if(b.sections&&0<b.sections.length){for(var c=0;c<b.sections.length;c++){if(b.sections[c]==a)return"["+c+"]";var d=this.QEa(a,b.sections[c]);if(d)return"["+c+"]"+d}return null}if(b.items&&0<b.items.length){for(c=0;c<b.items.length;c++)if(b.items[c]==a)return":item["+c+"]";return null}};f.prototype.tNa=function(a,b){if(b.sections&&0<b.sections.length){for(var c=0;c<b.sections.length;c++){var d=this.tNa(a,
  b.sections[c]);if(d)return"["+c+"]"+d}return null}if(b.items&&0<b.items.length){for(c=0;c<b.items.length;c++)if(b.items[c].text==a.name)return":item["+c+"]";return null}};f.prototype.Jqa=function(a,b){var c=b.indexOf("["),d=b.indexOf("]");if(0<=c&&0<=d){var c=b.substring(c+1,d),e=b.indexOf(":");b=b.substring(d+1);d=b.indexOf("]");return 0<=b.indexOf("[")&&0<=d?this.Jqa(a.sections[c],b):0==e?a.items[c]:a.sections[c]}};f.prototype.vi=function(b){if(b==a.Ud.UB)return this.nE(this.Dc);b=this.Jqa(this.hg,
  b);for(var c=this.Dc.$u,d=0;d<c.length;d++){var e=c[d].getData();if(b==e)return c[d].Ce()[0].pb()}return null};f.prototype.bB=function(){return this.hg.title};f.prototype.getItem=function(a){for(var b,c=a.shift(),d=this.hg;void 0!=c;)0<a.length?d=d.sections[c]:b=d.items[c],c=a.shift();return b?{text:b.text?b.text:null}:null};f.prototype.qfb=function(a){for(var b,c=a.shift(),d=this.hg;void 0!=c;)0<a.length?d=d.sections[c]:b=d.sections[c],c=a.shift();return{title:b.title?b.title:null,items:b.items?
  this.pEa(b.items):null,sections:b.sections?this.sEa(b.sections):null}};f.prototype.pEa=function(a){for(var b=[],c=0;c<a.length;c++)b.push({text:a[c].text});return b};f.prototype.sEa=function(a){for(var b=[],c=0;c<a.length;c++)b.push({title:a[c].title?a[c].title:null,items:a[c].items?this.pEa(a[c].items):null,sections:a[c].sections?this.sEa(a[c].sections):null});return b};a.v.D(e,a.ab);e.Gz={skin:a.j.Gz,titleStyle:new a.j("color: #737373;"),_sectionTitleStyle:new a.j("color: #737373;"),layout:{titleGapWidth:17,
  titleGapHeight:9,symbolGapWidth:7,symbolGapHeight:4,rowGap:4,columnGap:10,sectionGapHeight:16,sectionGapWidth:24}};e.Xe={skin:a.j.Xe,textStyle:new a.j(a.ab.im),titleStyle:new a.j(a.ab.mL+"color: #333333;"),_sectionTitleStyle:new a.j(a.ab.mL+"color: #333333;")};e.ji={skin:a.j.pg,orientation:"vertical",position:null,backgroundColor:null,borderColor:null,textStyle:new a.j(a.ab.Gs+"font-size: 11px; color: #333333;"),titleStyle:new a.j(a.ab.Gs+"font-size: 12px; color: #003d5b;"),titleHalign:"start",hiddenCategories:[],
  hideAndShowBehavior:"off",hoverBehavior:"none",hoverBehaviorDelay:200,scrolling:"asNeeded",halign:"start",valign:"top",drilling:"off",_color:"#a6acb1",_markerShape:"square",_lineWidth:3,layout:{outerGapWidth:3,outerGapHeight:3,titleGapWidth:8,titleGapHeight:3,symbolGapWidth:5,symbolGapHeight:4,rowGap:0,columnGap:8,sectionGapHeight:6,sectionGapWidth:15},isLayout:!1};e.dh=function(b,c){var d=Math.min(a.Da.aB(b.u(),b.F().textStyle)/14,1);return Math.ceil(c*d)};a.v.D(d,a.H);d.prototype.sj=function(a){d.C.sj.call(this,
  a);var b=this.kb(a.target);if(b){var c=this.Osa(b),b=this.Ara(b,a);(c||b)&&a.stopPropagation()}};d.prototype.Ox=function(b){d.C.Ox.call(this,b);if(b=this.kb(b.target)){var c=b instanceof a.Th?b.Tq:null;c&&c.isCollapsible&&c.button&&c.button.m0();this.WB(b)}};d.prototype.Sn=function(b){d.C.Sn.call(this,b);(b=this.kb(b.target))&&(b=b instanceof a.Th?b.Tq:null)&&b.isCollapsible&&b.button&&b.button.tD()};d.prototype.Uv=function(a){var b=this.kb(a.target);if(b){var c=a.Fta,d=this.Osa(b);a=this.Ara(b,a);
  (d||a)&&c&&c.preventDefault()}};d.prototype.Osa=function(b){var c=this.Dc.F().hideAndShowBehavior;if("none"==c||"off"==c)return!1;var d=b.we?b.we():null;if(!d||0>=d.length)return!1;for(var e=b.we()[0],c=this.Dc.F().hiddenCategories||[],c=c.slice(),f=b.Ce(),t=0;t<f.length;t++){var v=f[t];v instanceof a.wa?v.m2(b.sc()):v instanceof a.Rect&&b.Jta()}b=d[0];h.rba(e,this.Dc)?(c.splice(a.na.qb(c,e),1),b=a.Xa.Zhb(b,c)):(c.push(e),b=a.Xa.Yhb(b,c));this.Dc.F().hiddenCategories=c;this.Kk(b,this.Dc);return!0};
  d.prototype.Ara=function(c,d){if(c&&c.bh&&c.bh())return this.Kk(a.Xa.QG("action",c.bh(),c.getId()),this.Dc),!0;if(c instanceof b&&c.Jj()){var e=c.getId();this.Kk(a.Xa.Lba(e,e,null),this.Dc);return!0}return(e=c instanceof a.Th?c.Tq:null)&&e.isCollapsible?(this.jRa(d,e.id),!0):!1};d.prototype.Jp=function(b,c,d){b=this.Dc.F();"none"==b.hoverBehavior||c.Ce&&c.Ce()[0]instanceof a.ea||(c=c.we?c.we():[],b.highlightedCategories=d?c.slice():null,d=a.Xa.RG(b.highlightedCategories,d),b=a.Sa.hs(b.hoverBehaviorDelay),
  this.NH.Ef(d,this.Dc.$u,b,!0))};d.prototype.tsa=function(a,b){var c=b.getId();this.jRa(a,c)};d.prototype.jRa=function(b,c){for(var d=this.Dc.F(),e=0;e<c.length;e++)d=d.sections[c[e]];d.expanded="off"==d.expanded?"on":"off";b.type==a.MouseEvent.ye&&(d=this.kb(this.Zd(b)),d.Xd&&this.vs(d.Xd(b)));e=(d=this.Dc.gK())?d.Od():!1;this.Dc.ya();d&&this.Dc.vca(d,e);this.ce();d=this.Dc.VA();this.Kk(new a.Nm(d.a,d.b,d.x,d.y),this.Dc)};d.prototype.yz=function(){return this.Dc.F()._isScrollingLegend?a.H.GE:a.H.Tx};
  d.prototype.dk=function(){return this.Dc};d.prototype.J1=function(){return!0};d.prototype.rL=function(){var a=this.lf.hA;return a instanceof b&&null!=a.getData()._dataContext?"series":null};d.prototype.zW=function(){var a=this.lf.hA;return a instanceof b?[a.getData()._dataContext]:[]};d.prototype.tQ=function(a){a=this.Dc.Ad(this.u().Kg(a.pageX,a.pageY));return this.Dc.fe.Ej(a.x,a.y)?"legend":null};d.prototype.hea=function(){return{}};d.prototype.rga=function(a){if("legend"==this.tQ(a)){a=this.Dc.F()._dropColor;
  var b=this.Dc.Hc.ek("background");b&&b.fb(a)}};d.prototype.kda=function(){var a=this.Dc.Hc.ek("background");if(a){var b=this.Dc.F().backgroundColor;b?a.fb(b):a.Ub()}};a.v.D(c,a.Eb);c.prototype.Init=function(a,b){c.C.Init.call(this,a);this.Dc=b};c.prototype.Ik=function(b){var d=b.keyCode,e=this.ub.$e(),h=e&&e.Ce()[0]instanceof a.ea,f=null;null==e&&d==a.KeyboardEvent.Uh?(d=this.Dc.Jw,0<d.length&&(a.H.oc(b),f=this.aK(d))):e&&(d==a.KeyboardEvent.Uh?(a.H.oc(b),f=e):d==a.KeyboardEvent.Ci||d==a.KeyboardEvent.Di?
  (d==a.KeyboardEvent.Ci&&this.ub.Ara(e,b),h?this.ub.tsa(b,e.Ce()[0]):this.ub.Osa(e),a.H.oc(b)):!h||d!=a.KeyboardEvent.ag&&d!=a.KeyboardEvent.bg?f=c.C.Ik.call(this,b):(this.ub.tsa(b,e.Ce()[0]),a.H.oc(b)));f&&this.Dc.LLa.scrollIntoView(f.Ce()[0]);return f};a.v.D(b,a.v);b.prototype.Init=function(a,b,c,d,e,f){this.Dc=a;this.gg=b;this.jo=c;this.nc=(this.uM=h.yaa(this.jo))?this.uM:c.title;this.Ss=c.action;this.rw=f;this.A$a=c._spb;this.rl=d;this.e7=e;this.dd=!1;if(this.Ss||this.rw)for(a=0;a<this.gg.length;a++)this.gg[a].setCursor("pointer")};
  b.mb=function(a,c,d,e,h,f){if(!a||!d)return null;d=new b(c,a,d,e,h,f);c.Jha(d);for(e=0;e<a.length;e++)c.Za().mb(a[e],d);return d};b.prototype.getData=function(){return this.jo};b.prototype.sc=function(){return this.jo.color};b.prototype.getId=function(){return this.nc};b.prototype.Ce=function(){return this.gg};b.prototype.we=function(){return null!=this.uM?[this.uM]:null};b.prototype.bh=function(){return this.Ss};b.prototype.Jj=function(){return this.rw};b.prototype.hf=function(){return this.A$a};
  b.prototype.Fd=function(){var b=[],c=this.Dc.F(),d=this.Dc.F().hideAndShowBehavior,e=h.rba(this.uM,this.Dc),f=this.getData();if(this.gg[0]instanceof a.ea)return b.push(a.K.ua(a.K.Ma,"off"==f.expanded?"STATE_COLLAPSED":"STATE_EXPANDED")),a.oa.Ck(f.title,b);"off"!=d&&"none"!=d&&b.push(a.K.ua(a.K.Ma,e?"STATE_HIDDEN":"STATE_VISIBLE"));this.Jj()&&b.push(a.K.Qg(c,"stateDrillable",a.K.Ma,"STATE_DRILLABLE"));return null!=f.shortDesc?a.oa.Ck(f.shortDesc,b):0<b.length?a.oa.Ck(f.text,b):null};b.prototype.Jta=
  function(){!a.B.Ki()&&this.gg[0]&&this.gg[0].yd("label",this.Fd())};b.prototype.Xd=function(b){return b.type==a.MouseEvent.ye?this:a.Eb.Xd(this,b,this.Dc.Jw,!0)};b.prototype.wf=function(b){return this.gg[0]?this.gg[0].aa(b):new a.Y(0,0,0,0)};b.prototype.Bm=function(){return this.gg[0]?this.gg[0].pb():null};b.prototype.Qf=function(){this.dd=!0;this.gg[0]&&(this.gg[0]instanceof a.ea?this.gg[0].m0():this.gg[0].Nb(a.B.uqa()))};b.prototype.Md=function(){this.dd=!1;this.gg[0]&&(this.gg[0]instanceof a.ea?
  this.gg[0].tD():this.gg[0].Ea(null))};b.prototype.Od=function(){return this.dd};b.prototype.zi=function(){return this.rl};b.prototype.ug=function(){return this.e7};b.prototype.tl=function(){return this.jo.color};b.prototype.bm=function(){return!0};b.prototype.ym=function(){return[this.getId()]};b.prototype.Ft=function(){return this.Ce()};var h={};a.v.D(h,a.v);h.bha=2;h.LAa=.6;h.mAa=10;h.Qk=12;h.tX=2;h.ya=function(b,c){var d=b.F(),f=b.u(),q=a.B.fa(f);b.Kha(c);d.isLayout||h.cv(b,c);var t=new a.lh(f,
  c.a,c.b),v=new a.ia(f);t.Ca.A(v);b.A(t);b.LLa=t;var x=e.dh(b,d.layout.outerGapWidth),w=e.dh(b,d.layout.outerGapHeight);c.x+=x;c.y+=w;c.a-=2*x;c.b-=2*w;if(0>=c.a||0>=c.b)return new a.hk(0,0);f=h.h9a(b,v,new a.Y(c.x,c.y,c.a,c.b));if(0==f.a||0==f.b)return new a.hk(0,0);t.X1();f.b>c.b?(f.b=c.b,d._isScrollingLegend=!0):d._isScrollingLegend=!1;var z=t=0,u=null!=d.hAlign?d.hAlign:d.halign;"center"==u?t=c.x-f.x+(c.a-f.a)/2:"end"==u&&(t=q?c.x-f.x:c.x-f.x+c.a-f.a);q=null!=d.vAlign?d.vAlign:d.valign;"middle"==
  q?z=c.y-f.y+(c.b-f.b)/2:"bottom"==q&&(z=c.y-f.y+c.b-f.b);q=new a.Y(f.x+t-x,f.y+z-w,f.a+2*x,f.b+2*w);if(d.isLayout)return q;(t||z)&&v.Ka(t,z);d=b.Loa;for(v=0;v<d.length;v++)a.Pn.align(f,d[v].xgb,d[v].text,d[v].text.Pc().a);return q};h.h9a=function(a,b,c){var d=a.F();c=c.clone();var f=h.YN(a,b,d.title,c,null,!0);if(f){var t=f.Pc(),v=e.dh(a,d.layout.titleGapHeight);c.y+=t.b+v;c.b-=Math.floor(t.b+v)}a=h.zJa(a,b,d.sections,c,[]);return f?t.pj(a):a};h.cv=function(b,c){var d=b.F(),e=d.backgroundColor,h=
  d.borderColor,d=d.dnd?d.dnd.drop.legend:{};if(e||h||0<Object.keys(d).length)d=new a.Rect(b.u(),c.x,c.y,c.a,c.b),e?d.fb(e):d.Ub(),h&&(d.Nb(h),d.ud()),b.A(d),b.Hc.Bh("background",d)};h.YN=function(b,c,d,e,h,f,v,x){var w=b.F(),z=c.u(),u=a.B.fa(z);if(!d)return null;d=new a.ba(z,d,e.x,e.y);z=w.titleStyle;h&&h.titleStyle?z=new a.j(h.titleStyle):h&&w._sectionTitleStyle&&(z=w._sectionTitleStyle);d.Db(z);return a.Da.qd(d,e.a,Infinity,c)?(u&&d.Ia(e.x+e.a-d.Pc().a),w.isLayout?c.removeChild(d):(c={id:v,button:x},
  c.isCollapsible=h&&("on"==h.collapsible||1==h.collapsible),b.Za().mb(d,new a.Th(d.js(),null,null,c)),f&&b.x0a({text:d,xgb:h&&h.titleHalign?h.titleHalign:w.titleHalign})),d):null};h.zJa=function(b,c,d,f,q){var t=b.F();null==t.symbolWidth&&null==t.symbolHeight?(t.symbolWidth=h.mAa,t.symbolHeight=h.mAa):(null==t.symbolWidth?t.symbolWidth=t.symbolHeight:null==t.symbolHeight&&(t.symbolHeight=t.symbolWidth),t.symbolWidth=parseInt(t.symbolWidth),t.symbolHeight=parseInt(t.symbolHeight));for(var v=e.dh(b,
  t.layout.sectionGapHeight),x=e.dh(b,t.layout.titleGapHeight),w=e.dh(b,t.layout.sectionGapWidth),z=h.x5a(b),t="vertical"!=t.orientation,u=null,B=f.clone(),y,C=0;C<d.length;C++){var G=q.concat([C]),J="off"==d[C].expanded||0==d[C].expanded?x:v;t?(y=h.rJa(b,c,d[C],B,z),y.a>B.a?(B.a<f.a&&(f.y+=y.b+J,f.b-=y.b+J),y=y.a<=f.a?h.rJa(b,c,d[C],f,z):h.CJa(b,c,d[C],f,z,G,!0),f.y+=y.b+J,f.b-=y.b+J,B=f.clone()):(B.a-=y.a+w,a.B.fa(b.u())||(B.x+=y.a+w))):(y=h.CJa(b,c,d[C],f,z,G,!1),f.y+=y.b+J,f.b-=y.b+J);u=u?u.pj(y):
  y}return u};h.M2a=function(c,d,e,f,q,t,v,x,w,z,u){var B=h.kja(c,f,q+"Enabled",t,v),y=h.kja(c,f,q+"Over",t,v);f=h.kja(c,f,q+"Down",t,v);c=new a.ea(c,B,y,f,null,w,z,u);d=b.mb([c],d,e,x,null,!1);c.Of("button");d.Jta();return c};h.kja=function(b,c,d,e,f){var t=a.B.fa(b)?"RTL":"";b=new a.Image(b,c[d+t]?c[d+t]:c[d],e,f,h.Qk,h.Qk);b.Ub();return b};h.CJa=function(b,c,d,f,q,t,v){if(d){var x=b.F(),w=e.dh(b,x.layout.symbolGapWidth),z=e.dh(b,x.layout.rowGap),u=e.dh(b,x.layout.columnGap),B=b.u(),y=a.B.fa(B);f=
  f.clone();"off"!=x.scrolling&&(f.b=Infinity);var C,G="on"==d.collapsible||1==d.collapsible,J;if(G){C=y?f.x+f.a-h.Qk:f.x;if(!x.isLayout){var A="off"==d.expanded||0==d.expanded;J=A?"closed":"open";var A=a.K.ua(a.K.Ma,A?"EXPAND":"COLLAPSE",null),F=b.Za();J=h.M2a(B,b,d,x._resources,J,C,f.y,A,t,F.tsa,F);c.A(J)}C=new a.Y(C,f.y,h.Qk,h.Qk);B=e.dh(b,x.layout.symbolGapWidth);y||(f.x+=h.Qk+B);f.a-=h.Qk+B}B=(B=h.YN(b,c,d.title,f,d,!G&&1>=t.length,t,J))?B.Pc():new a.Y(y?f.x+f.a:f.x,f.y,0,0);B=C?B.pj(C):B;if(!d.items&&
  !d.sections||"off"==d.expanded||0==d.expanded)return B;0<B.b&&(G=e.dh(b,x.layout.titleGapHeight),f.y+=B.b+G,f.b-=B.b+G);d.sections&&(t=h.zJa(b,c,d.sections,f,t),B=B.pj(t));if(!d.items)return B;G=h.a2a(b,f,q,d.items,v);v=G.numCols;t=G.numRows;G=G.width;C=f.y;if(0==t||0==v)return B;J=Math.min(v*(G+u)-u,f.a);B=B.pj(new a.Y(y?f.x+f.a-J:f.x,f.y,J,t*(q+z)-z));if(x.isLayout)return B;x=G-x.symbolWidth-w;w=0;J=1;A=d.items.length;for(F=0;F<A&&(h.mY(b,c,d.items[F],f,x,q,F),f.y+=q+z,w++,w===t&&J!==v&&(f.y=C,
  f.a-=G+u,y||(f.x+=G+u),w=0,J++),w!==t);F++);return B}};h.rJa=function(b,c,d,f,q){if(d){var t=b.F(),v=t.symbolWidth,x=e.dh(b,t.layout.symbolGapWidth),w=e.dh(b,t.layout.columnGap),z=e.dh(b,t.layout.titleGapWidth),u=d.items.length,B=a.B.fa(b.u()),y=f.clone(),C=h.YN(b,c,d.title,f,d,!1),G=C?C.Pc():new a.Y(B?f.x+f.a:f.x,f.y,0,0);if(!d.items)return G;0<G.a&&(y.a-=G.a+z,B||(y.x+=G.a+z));var z=[],J=f.a-y.a,A,F;for(F=0;F<u;F++)A=d.items[F],A=Math.ceil(a.Da.cba(b.u(),A.text,t.textStyle)),J+=A+v+x+w,z.push(A);
  0<u&&(J-=w);G=new a.Y(B?f.x+f.a-J:f.x,f.y,J,Math.max(q,G.b));if(t.isLayout||J>f.a)return c.removeChild(C),G;for(F=0;F<u;F++)A=d.items[F],h.mY(b,c,A,y,z[F],q,F),f=z[F]+v+x,y.a-=f+w,B||(y.x+=f+w);return G}};h.a2a=function(b,c,d,h,f){for(var t=b.F(),v=100<a.df.fK(b),x=0,w=0;w<h.length;w++){var z=h[w];v?(z=new a.ba(b.u(),z.text),z.Db(t.textStyle),z=a.Da.fk(z).a):z=a.Da.cba(b.u(),z.text,t.textStyle);z>x&&(x=z)}v=t.symbolWidth;z=e.dh(b,t.layout.symbolGapWidth);w=e.dh(b,t.layout.rowGap);b=e.dh(b,t.layout.columnGap);
  x=Math.ceil(v+z+x);f?(f=Math.min(Math.floor((c.a+b)/(x+b)),h.length),d=Math.min(Math.floor((c.b+w)/(d+w)),Math.ceil(h.length/f)),f=Math.ceil(h.length/d),d=Math.ceil(h.length/f)):Infinity==c.b?(f=1,d=h.length):(d=Math.min(Math.floor((c.b+w)/(d+w)),h.length),f=Math.ceil(h.length/d),d=Math.ceil(h.length/f));c=Math.min(x,(c.a-b*(f-1))/f);return c<v?{width:0,numCols:0,numRows:0}:{width:c,numCols:f,numRows:d}};h.x5a=function(b){var c=b.F(),d=new a.ba(b.u(),"Test");d.Db(c.textStyle);d.Ig();d=a.Da.fk(d).b;
  b=c.symbolHeight+e.dh(b,c.layout.symbolGapHeight);return Math.ceil(Math.max(d,b))};h.mY=function(c,d,f,m,q,t){var v=c.F(),x=c.u(),w=a.B.fa(x),z=v.symbolWidth,u=e.dh(c,v.layout.symbolGapWidth),B=w?m.x+m.a-z:m.x,y=w?m.x+m.a-z-u:m.x+z+u,C=h.X2a(c,B,m.y,t,f),G=f.text,J;G&&(J=h.Y2a(d,q,G,v.textStyle))&&(J.Ia(y),a.Da.eU(J,m.y+t/2),w&&J.Dj());d.A(C);m=new a.Rect(x,w?y-q-h.tX:B-h.tX,m.y-h.tX,z+u+q+2*h.tX,t+2*h.tX);m.Ub();v=v.hideAndShowBehavior;"none"!=v&&"off"!=v&&m.setCursor("pointer");d.A(m);d=[m,C];null!=
  J&&d.push(J);J=b.mb(d,c,f,null!=J?J.js():null,f.shortDesc,h.N6a(c,f));h.rba(h.yaa(f),c)&&(C.m2(J.sc()),C.la().Ut());if("none"!=v&&"off"!=v||null!=f.shortDesc)m.Of("img"),J.Jta()};h.N6a=function(a,b){return"on"==b.drilling?!0:"off"==b.drilling?!1:"on"==a.F().drilling};h.Y2a=function(b,c,d,e){d=new a.ba(b.u(),d);d.Db(e);return d=a.Da.qd(d,c,Infinity,b)?d:null};h.X2a=function(a,b,c,d,e){var f=a.F(),v=null!=e.type?e.type:e.symbolType;e.markerShape||(e.markerShape=f._markerShape);e.color||(e.color=f._color);
  e.lineWidth||(e.lineWidth="lineWithMarker"==v?h.bha:f._lineWidth);var x=f.symbolWidth,f=f.symbolHeight,w=c+d/2,z=b+x/2;"line"==v?b=h.iDa(a.u(),b,c,x,d,e):"lineWithMarker"==v?(b=h.iDa(a.u(),b,c,x,d,e),h.rba(h.yaa(e),a)||b.A(h.zM(a,z,w,x*h.LAa,f*h.LAa,e))):b="image"==v?h.mja(a,b,c,x,f,d,e):h.zM(a,z,w,x,f,e);return b};h.mja=function(b,c,d,e,h,f,v){return new a.zf(b.u(),c+e/2,d+f/2,e,h,null,v.source)};h.zM=function(b,c,d,e,h,f){var v=b.u(),x=b.F();b=f.markerShape;var w=f.markerColor?f.markerColor:f.color,
  z=f.markerStyle?f.markerStyle:f.style,u=f.markerClassName?f.markerClassName:f.className,B=f.pattern;B&&"none"!=B?(e=new a.wa(v,b,x.skin,0,0,e,h,null,null,!0),e.ra(new a.mc(B,w,"#FFFFFF")),e.Ka(c,d)):(e=new a.wa(v,b,x.skin,c,d,e,h,null,null,!0),e.fb(w));f.borderColor&&e.Nb(f.borderColor,null,f._borderWidth?f._borderWidth:1);"square"==b&&e.ud();e.Ut(u).la(z);return e};h.iDa=function(b,c,d,e,h,f){d+=h/2;b=new a.Gc(b,c,d,c+e,d);c=new a.Ba(f.color,1,f.lineWidth);e=f.lineStyle;"dashed"==e?c.Ln(a.Qc.Tw(e),
  "4,2,4"):"dotted"==e&&c.Ln(a.Qc.Tw(e),"2");b.Ut(f.className).la(f.style);b.Ea(c);b.ud();return b};h.yaa=function(a){var b=null;return b=a.categories&&0<a.categories.length?a.categories[0]:a.id?a.id:a.text};h.rba=function(b,c){var d=c.F().hiddenCategories;return!d||0>=d.length?!1:-1!==a.na.qb(d,b)};a.Ta(a,"Legend",a.df);a.Ta(a.df,"newInstance",a.df.newInstance);a.Ta(a.df.prototype,"destroy",a.df.prototype.va);a.Ta(a.df.prototype,"getAutomation",a.df.prototype.ti);a.Ta(a.df.prototype,"getPreferredSize",
  a.df.prototype.cs);a.Ta(a.df.prototype,"highlight",a.df.prototype.Oe);a.Ta(a.df.prototype,"render",a.df.prototype.ya);a.Ta(f.prototype,"getDomElementForSubId",f.prototype.vi);a.Ta(f.prototype,"getItem",f.prototype.getItem);a.Ta(f.prototype,"getSection",f.prototype.qfb);a.Ta(f.prototype,"getTitle",f.prototype.bB)})(dvt);
    return dvt;
  });
  