(function($dvt$$10$$) {
  function $DvtLegendObjPeer$$($dvt$$10$$, $DvtLegendRenderer$$, $item$$25$$, $tooltip$$18$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$) {
    this.Init($dvt$$10$$, $DvtLegendRenderer$$, $item$$25$$, $tooltip$$18$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$);
  }
  function $DvtLegendKeyboardHandler$$($dvt$$10$$, $DvtLegendRenderer$$) {
    this.Init($dvt$$10$$, $DvtLegendRenderer$$);
  }
  function $DvtLegendEventManager$$($dvt$$10$$) {
    this.Init($dvt$$10$$.$getCtx$(), $dvt$$10$$.$processEvent$, $dvt$$10$$);
    this.$_legend$ = $dvt$$10$$;
  }
  function $DvtLegendDefaults$$() {
    this.Init({skyros:$DvtLegendDefaults$$.$VERSION_1$, alta:$DvtLegendDefaults$$.$SKIN_ALTA$, next:$DvtLegendDefaults$$.$SKIN_NEXT$});
  }
  function $DvtLegendAutomation$$($dvt$$10$$) {
    this.$_legend$ = $dvt$$10$$;
    this.$_options$ = this.$_legend$.$getOptions$();
  }
  $dvt$$10$$.$Legend$ = function $$dvt$$10$$$$Legend$$() {
  };
  $dvt$$10$$.$Obj$.$createSubclass$($dvt$$10$$.$Legend$, $dvt$$10$$.$BaseComponent$);
  $dvt$$10$$.$Legend$.newInstance = function $$dvt$$10$$$$Legend$$newInstance$($context$$267$$, $DvtLegendRenderer$$, $callbackObj$$55$$) {
    var $legend$$3$$ = new $dvt$$10$$.$Legend$;
    $legend$$3$$.Init($context$$267$$, $DvtLegendRenderer$$, $callbackObj$$55$$);
    return $legend$$3$$;
  };
  $dvt$$10$$.$Legend$.$getDefaults$ = function $$dvt$$10$$$$Legend$$$getDefaults$$($dvt$$10$$) {
    return (new $DvtLegendDefaults$$).$getDefaults$($dvt$$10$$);
  };
  $dvt$$10$$.$Legend$.prototype.Init = function $$dvt$$10$$$$Legend$$$Init$($context$$268$$, $DvtLegendRenderer$$, $callbackObj$$56$$) {
    $dvt$$10$$.$Legend$.$superclass$.Init.call(this, $context$$268$$, $DvtLegendRenderer$$, $callbackObj$$56$$);
    this.setId("legend1000" + Math.floor(1E9 * Math.random()));
    this.$Defaults$ = new $DvtLegendDefaults$$;
    this.$EventManager$ = new $DvtLegendEventManager$$(this);
    this.$EventManager$.$addListeners$(this);
    this.$_peers$ = [];
    this.$_navigablePeers$ = [];
    this.$_bounds$ = null;
    this.$_titles$ = [];
  };
  $dvt$$10$$.$Legend$.prototype.$SetOptions$ = function $$dvt$$10$$$$Legend$$$$SetOptions$$($dvt$$10$$) {
    this.$_optionsCache$.$clearCache$();
    $dvt$$10$$ ? (this.$Options$ = this.$Defaults$.$calcOptions$($dvt$$10$$), this.$_transferVisibilityProperties$(this.$Options$.sections)) : this.$Options$ || (this.$Options$ = this.$GetDefaults$());
  };
  $dvt$$10$$.$Legend$.prototype.$getPreferredSize$ = function $$dvt$$10$$$$Legend$$$$getPreferredSize$$($dim$$53_options$$216$$, $DvtLegendDefaults$$, $maxHeight$$8$$) {
    this.$SetOptions$($dim$$53_options$$216$$);
    this.$getOptions$().isLayout = !0;
    $dim$$53_options$$216$$ = $DvtLegendRenderer$$.$render$(this, new $dvt$$10$$.$Rectangle$(0, 0, $DvtLegendDefaults$$, $maxHeight$$8$$));
    this.$getOptions$().isLayout = !1;
    return new $dvt$$10$$.$Dimension$($dim$$53_options$$216$$.$w$, $dim$$53_options$$216$$.$h$);
  };
  $dvt$$10$$.$Legend$.prototype.$render$ = function $$dvt$$10$$$$Legend$$$$render$$($highlightedCategories_options$$217$$, $DvtLegendDefaults$$, $height$$81$$) {
    this.$_cache$.$clearCache$();
    this.$SetOptions$($highlightedCategories_options$$217$$);
    isNaN($DvtLegendDefaults$$) || isNaN($height$$81$$) || (this.$Width$ = $DvtLegendDefaults$$, this.$Height$ = $height$$81$$);
    this.$getOptions$().isLayout = !1;
    this.$removeChildren$();
    this.$_peers$ = [];
    this.$_navigablePeers$ = [];
    this.$_bounds$ = null;
    this.$_titles$ = [];
    $dvt$$10$$.$Agent$.$isTouchDevice$() || this.$EventManager$.$setKeyboardHandler$(new $DvtLegendKeyboardHandler$$(this.$EventManager$, this));
    this.$UpdateAriaAttributes$();
    this.$_contentDimensions$ = $DvtLegendRenderer$$.$render$(this, new $dvt$$10$$.$Rectangle$(0, 0, this.$Width$, this.$Height$));
    ($highlightedCategories_options$$217$$ = this.$getOptions$().highlightedCategories) && 0 < $highlightedCategories_options$$217$$.length && this.$highlight$($highlightedCategories_options$$217$$);
    this.$RenderComplete$();
    return this.$_contentDimensions$;
  };
  $dvt$$10$$.$Legend$.prototype.$highlight$ = function $$dvt$$10$$$$Legend$$$$highlight$$($categories$$11$$) {
    this.$getOptions$().highlightedCategories = $categories$$11$$ && 0 < $categories$$11$$.length ? $categories$$11$$.slice() : null;
    $dvt$$10$$.$CategoryRolloverHandler$.$highlight$($categories$$11$$, this.$_peers$, !0);
  };
  $dvt$$10$$.$Legend$.prototype.$processEvent$ = function $$dvt$$10$$$$Legend$$$$processEvent$$($dvt$$10$$, $DvtLegendRenderer$$) {
    var $type$$193$$ = $dvt$$10$$.type;
    if ("categoryHighlight" == $type$$193$$ && "dim" == this.$getOptions$().hoverBehavior) {
      var $peers$$7$$ = this.$_peers$;
      this != $DvtLegendRenderer$$ && this.$highlight$($dvt$$10$$.categories);
      for (var $DvtLegendDefaults$$ = 0;$DvtLegendDefaults$$ < $peers$$7$$.length;$DvtLegendDefaults$$++) {
        if ($peers$$7$$[$DvtLegendDefaults$$].getId() == $dvt$$10$$.categories) {
          this.$container$.scrollIntoView($peers$$7$$[$DvtLegendDefaults$$].$getDisplayables$()[0]);
          break;
        }
      }
    }
    this != $DvtLegendRenderer$$ && "adfShowPopup" != $type$$193$$ && "adfHidePopup" != $type$$193$$ || this.dispatchEvent($dvt$$10$$);
  };
  $dvt$$10$$.$Legend$.prototype.$__registerObject$ = function $$dvt$$10$$$$Legend$$$$__registerObject$$($peer$$25$$) {
    if ($peer$$25$$.$getDisplayables$()[0] instanceof $dvt$$10$$.$Button$) {
      this.$_navigablePeers$.push($peer$$25$$);
    } else {
      var $DvtLegendRenderer$$ = this.$getOptions$().hideAndShowBehavior;
      (null != $peer$$25$$.$getDatatip$() || null != $peer$$25$$.$getAction$() || $peer$$25$$.$isDrillable$() || "none" != $DvtLegendRenderer$$ && "off" != $DvtLegendRenderer$$) && this.$_navigablePeers$.push($peer$$25$$);
      this.$_peers$.push($peer$$25$$);
    }
  };
  $dvt$$10$$.$Legend$.prototype.$__setBounds$ = function $$dvt$$10$$$$Legend$$$$__setBounds$$($dvt$$10$$) {
    this.$_bounds$ = $dvt$$10$$.clone();
  };
  $dvt$$10$$.$Legend$.prototype.$__registerTitle$ = function $$dvt$$10$$$$Legend$$$$__registerTitle$$($dvt$$10$$) {
    this.$_titles$.push($dvt$$10$$);
  };
  $dvt$$10$$.$Legend$.prototype.$getAutomation$ = function $$dvt$$10$$$$Legend$$$$getAutomation$$() {
    return new $DvtLegendAutomation$$(this);
  };
  $dvt$$10$$.$Legend$.prototype.$getKeyboardFocus$ = function $$dvt$$10$$$$Legend$$$$getKeyboardFocus$$() {
    return null != this.$EventManager$ ? this.$EventManager$.$getFocus$() : null;
  };
  $dvt$$10$$.$Legend$.prototype.$setKeyboardFocus$ = function $$dvt$$10$$$$Legend$$$$setKeyboardFocus$$($dvt$$10$$, $DvtLegendRenderer$$) {
    if (null != this.$EventManager$) {
      for (var $focus$$1_peers$$8$$ = this.$_navigablePeers$, $displayable$$41_i$$508$$ = 0;$displayable$$41_i$$508$$ < $focus$$1_peers$$8$$.length;$displayable$$41_i$$508$$++) {
        if ($focus$$1_peers$$8$$[$displayable$$41_i$$508$$].getId() == $dvt$$10$$.getId()) {
          this.$EventManager$.$setFocusObj$($focus$$1_peers$$8$$[$displayable$$41_i$$508$$]);
          $DvtLegendRenderer$$ && $focus$$1_peers$$8$$[$displayable$$41_i$$508$$].$showKeyboardFocusEffect$();
          break;
        }
      }
      if ($focus$$1_peers$$8$$ = this.$getKeyboardFocus$()) {
        $displayable$$41_i$$508$$ = $focus$$1_peers$$8$$.$getDisplayables$()[0], $displayable$$41_i$$508$$.$setAriaProperty$("label", $focus$$1_peers$$8$$.$getAriaLabel$()), this.$getCtx$().$setActiveElement$($displayable$$41_i$$508$$);
      }
    }
  };
  $dvt$$10$$.$Legend$.prototype.$getDimensions$ = function $$dvt$$10$$$$Legend$$$$getDimensions$$($targetCoordinateSpace$$21$$) {
    var $DvtLegendRenderer$$ = new $dvt$$10$$.$Rectangle$(0, 0, this.$Width$, this.$Height$);
    return $targetCoordinateSpace$$21$$ && $targetCoordinateSpace$$21$$ !== this ? this.$ConvertCoordSpaceRect$($DvtLegendRenderer$$, $targetCoordinateSpace$$21$$) : $DvtLegendRenderer$$;
  };
  $dvt$$10$$.$Legend$.prototype.$getContentDimensions$ = function $$dvt$$10$$$$Legend$$$$getContentDimensions$$($dvt$$10$$) {
    return $dvt$$10$$ && $dvt$$10$$ !== this ? this.$ConvertCoordSpaceRect$(this.$_contentDimensions$, $dvt$$10$$) : this.$_contentDimensions$;
  };
  $dvt$$10$$.$Legend$.prototype.$GetComponentDescription$ = function $$dvt$$10$$$$Legend$$$$GetComponentDescription$$() {
    return $dvt$$10$$.$Bundle$.$getTranslatedString$($dvt$$10$$.$Bundle$.$UTIL_PREFIX$, "LEGEND");
  };
  $dvt$$10$$.$Legend$.prototype.$_transferVisibilityProperties$ = function $$dvt$$10$$$$Legend$$$$_transferVisibilityProperties$$($sections$$2$$) {
    if ($sections$$2$$ && !(0 >= $sections$$2$$.length)) {
      for (var $DvtLegendDefaults$$ = this.$getOptions$().hiddenCategories, $i$$509$$ = 0;$i$$509$$ < $sections$$2$$.length;$i$$509$$++) {
        var $items$$24_section$$4$$ = $sections$$2$$[$i$$509$$];
        $items$$24_section$$4$$.sections && ($DvtLegendDefaults$$ = this.$_transferVisibilityProperties$($items$$24_section$$4$$.sections));
        if (($items$$24_section$$4$$ = $items$$24_section$$4$$.items) && !(0 >= $items$$24_section$$4$$.length)) {
          for (var $DvtLegendAutomation$$ = 0;$DvtLegendAutomation$$ < $items$$24_section$$4$$.length;$DvtLegendAutomation$$++) {
            var $item$$20$$ = $items$$24_section$$4$$[$DvtLegendAutomation$$], $itemCategory$$ = $DvtLegendRenderer$$.$getItemCategory$($item$$20$$);
            "hidden" == $item$$20$$.categoryVisibility && 0 > $dvt$$10$$.$ArrayUtils$.$getIndex$($DvtLegendDefaults$$, $itemCategory$$) && $DvtLegendDefaults$$.push($itemCategory$$);
            $item$$20$$.categoryVisibility = null;
          }
        }
      }
    }
  };
  $dvt$$10$$.$Legend$.prototype.$UpdateAriaAttributes$ = function $$dvt$$10$$$$Legend$$$$UpdateAriaAttributes$$() {
    if (this.$IsParentRoot$()) {
      var $options$$218$$ = this.$getOptions$(), $DvtLegendRenderer$$ = $options$$218$$.hideAndShowBehavior;
      if ("off" != $DvtLegendRenderer$$ && "none" != $DvtLegendRenderer$$ || "dim" == $options$$218$$.hoverBehavior) {
        this.$getCtx$().$setAriaRole$("application"), this.$getCtx$().$setAriaLabel$($dvt$$10$$.$Bundle$.$getTranslatedString$($dvt$$10$$.$Bundle$.$UTIL_PREFIX$, "COLON_SEP_LIST", [$dvt$$10$$.$Bundle$.$getTranslatedString$($dvt$$10$$.$Bundle$.$UTIL_PREFIX$, "DATA_VISUALIZATION"), $dvt$$10$$.$StringUtils$.$processAriaLabel$(this.$GetComponentDescription$())]));
      }
    }
  };
  $dvt$$10$$.$Legend$.prototype.$isNavigable$ = function $$dvt$$10$$$$Legend$$$$isNavigable$$() {
    return 0 < this.$_navigablePeers$.length;
  };
  $dvt$$10$$.$Legend$.$getItemCount$ = function $$dvt$$10$$$$Legend$$$getItemCount$$($legend$$4$$) {
    var $DvtLegendRenderer$$ = $legend$$4$$.$_optionsCache$.$getFromCache$("itemsCount");
    if (null != $DvtLegendRenderer$$) {
      return $DvtLegendRenderer$$;
    }
    for (var $DvtLegendRenderer$$ = 0, $sections$$3$$ = $legend$$4$$.$getOptions$().sections, $i$$510$$ = 0;$i$$510$$ < $sections$$3$$.length;$i$$510$$++) {
      $DvtLegendRenderer$$ += $dvt$$10$$.$Legend$.$getSectionItemsCount$($sections$$3$$[$i$$510$$]);
    }
    $legend$$4$$.$_optionsCache$.$putToCache$("itemsCount", $DvtLegendRenderer$$);
    return $DvtLegendRenderer$$;
  };
  $dvt$$10$$.$Legend$.$getSectionItemsCount$ = function $$dvt$$10$$$$Legend$$$getSectionItemsCount$$($section$$6_sections$$4$$) {
    var $DvtLegendRenderer$$ = 0;
    $section$$6_sections$$4$$.items && ($DvtLegendRenderer$$ += $section$$6_sections$$4$$.items.length);
    if ($section$$6_sections$$4$$.$sections$) {
      $section$$6_sections$$4$$ = $section$$6_sections$$4$$.$sections$;
      for (var $i$$511$$ = 0;$i$$511$$ < $section$$6_sections$$4$$.length;$i$$511$$++) {
        $DvtLegendRenderer$$ += $dvt$$10$$.$Legend$.$getSectionItemsCount$($section$$6_sections$$4$$[$i$$511$$]);
      }
    }
    return $DvtLegendRenderer$$;
  };
  $dvt$$10$$.$Obj$.$createSubclass$($DvtLegendAutomation$$, $dvt$$10$$.$Automation$);
  $DvtLegendAutomation$$.prototype.$GetSubIdForDomElement$ = function $$DvtLegendAutomation$$$$$GetSubIdForDomElement$$($dvt$$10$$) {
    return ($dvt$$10$$ = this.$_legend$.$getEventManager$().$GetLogicalObject$($dvt$$10$$)) && $dvt$$10$$ instanceof $DvtLegendObjPeer$$ && ($dvt$$10$$ = $dvt$$10$$.getData(), $dvt$$10$$ = this.$_getIndicesFromItem$($dvt$$10$$, this.$_options$)) ? "section" + $dvt$$10$$ : null;
  };
  $DvtLegendAutomation$$.prototype.$_getIndicesFromItem$ = function $$DvtLegendAutomation$$$$$_getIndicesFromItem$$($dvt$$10$$, $DvtLegendRenderer$$) {
    if ($DvtLegendRenderer$$.sections && 0 < $DvtLegendRenderer$$.sections.length) {
      for (var $i$$512_s$$122$$ = 0;$i$$512_s$$122$$ < $DvtLegendRenderer$$.sections.length;$i$$512_s$$122$$++) {
        if ($DvtLegendRenderer$$.sections[$i$$512_s$$122$$] == $dvt$$10$$) {
          return "[" + $i$$512_s$$122$$ + "]";
        }
        var $itemIndex$$47$$ = this.$_getIndicesFromItem$($dvt$$10$$, $DvtLegendRenderer$$.sections[$i$$512_s$$122$$]);
        if ($itemIndex$$47$$) {
          return "[" + $i$$512_s$$122$$ + "]" + $itemIndex$$47$$;
        }
      }
      return null;
    }
    if ($DvtLegendRenderer$$.items && 0 < $DvtLegendRenderer$$.items.length) {
      for ($i$$512_s$$122$$ = 0;$i$$512_s$$122$$ < $DvtLegendRenderer$$.items.length;$i$$512_s$$122$$++) {
        if ($DvtLegendRenderer$$.items[$i$$512_s$$122$$] == $dvt$$10$$) {
          return ":item[" + $i$$512_s$$122$$ + "]";
        }
      }
      return null;
    }
  };
  $DvtLegendAutomation$$.prototype.$getIndicesFromSeries$ = function $$DvtLegendAutomation$$$$$getIndicesFromSeries$$($dvt$$10$$, $DvtLegendRenderer$$) {
    if ($DvtLegendRenderer$$.sections && 0 < $DvtLegendRenderer$$.sections.length) {
      for (var $i$$513_s$$123$$ = 0;$i$$513_s$$123$$ < $DvtLegendRenderer$$.sections.length;$i$$513_s$$123$$++) {
        var $itemIndex$$48$$ = this.$getIndicesFromSeries$($dvt$$10$$, $DvtLegendRenderer$$.sections[$i$$513_s$$123$$]);
        if ($itemIndex$$48$$) {
          return "[" + $i$$513_s$$123$$ + "]" + $itemIndex$$48$$;
        }
      }
      return null;
    }
    if ($DvtLegendRenderer$$.items && 0 < $DvtLegendRenderer$$.items.length) {
      for ($i$$513_s$$123$$ = 0;$i$$513_s$$123$$ < $DvtLegendRenderer$$.items.length;$i$$513_s$$123$$++) {
        if ($DvtLegendRenderer$$.items[$i$$513_s$$123$$].text == $dvt$$10$$.name) {
          return ":item[" + $i$$513_s$$123$$ + "]";
        }
      }
      return null;
    }
  };
  $DvtLegendAutomation$$.prototype.$getLegendItem$ = function $$DvtLegendAutomation$$$$$getLegendItem$$($dvt$$10$$, $DvtLegendRenderer$$) {
    var $index$$168_openParen$$3$$ = $DvtLegendRenderer$$.indexOf("["), $closeParen$$3_nextCloseParen$$ = $DvtLegendRenderer$$.indexOf("]");
    if (0 <= $index$$168_openParen$$3$$ && 0 <= $closeParen$$3_nextCloseParen$$) {
      var $index$$168_openParen$$3$$ = $DvtLegendRenderer$$.substring($index$$168_openParen$$3$$ + 1, $closeParen$$3_nextCloseParen$$), $DvtLegendDefaults$$ = $DvtLegendRenderer$$.indexOf(":");
      $DvtLegendRenderer$$ = $DvtLegendRenderer$$.substring($closeParen$$3_nextCloseParen$$ + 1);
      $closeParen$$3_nextCloseParen$$ = $DvtLegendRenderer$$.indexOf("]");
      return 0 <= $DvtLegendRenderer$$.indexOf("[") && 0 <= $closeParen$$3_nextCloseParen$$ ? this.$getLegendItem$($dvt$$10$$.sections[$index$$168_openParen$$3$$], $DvtLegendRenderer$$) : 0 == $DvtLegendDefaults$$ ? $dvt$$10$$.items[$index$$168_openParen$$3$$] : $dvt$$10$$.sections[$index$$168_openParen$$3$$];
    }
  };
  $DvtLegendAutomation$$.prototype.$getDomElementForSubId$ = function $$DvtLegendAutomation$$$$$getDomElementForSubId$$($legendItem$$3_subId$$24$$) {
    if ($legendItem$$3_subId$$24$$ == $dvt$$10$$.$Automation$.$TOOLTIP_SUBID$) {
      return this.$GetTooltipElement$(this.$_legend$);
    }
    $legendItem$$3_subId$$24$$ = this.$getLegendItem$(this.$_options$, $legendItem$$3_subId$$24$$);
    for (var $DvtLegendRenderer$$ = this.$_legend$.$_peers$, $i$$514$$ = 0;$i$$514$$ < $DvtLegendRenderer$$.length;$i$$514$$++) {
      var $item$$23$$ = $DvtLegendRenderer$$[$i$$514$$].getData();
      if ($legendItem$$3_subId$$24$$ == $item$$23$$) {
        return $DvtLegendRenderer$$[$i$$514$$].$getDisplayables$()[0].$getElem$();
      }
    }
    return null;
  };
  $DvtLegendAutomation$$.prototype.$getTitle$ = function $$DvtLegendAutomation$$$$$getTitle$$() {
    return this.$_options$.title;
  };
  $DvtLegendAutomation$$.prototype.getItem = function $$DvtLegendAutomation$$$$getItem$($dvt$$10$$) {
    for (var $DvtLegendRenderer$$, $index$$169$$ = $dvt$$10$$.shift(), $options$$220$$ = this.$_options$;void 0 != $index$$169$$;) {
      0 < $dvt$$10$$.length ? $options$$220$$ = $options$$220$$.sections[$index$$169$$] : $DvtLegendRenderer$$ = $options$$220$$.items[$index$$169$$], $index$$169$$ = $dvt$$10$$.shift();
    }
    return $DvtLegendRenderer$$ ? {text:$DvtLegendRenderer$$.text ? $DvtLegendRenderer$$.text : null} : null;
  };
  $DvtLegendAutomation$$.prototype.$getSection$ = function $$DvtLegendAutomation$$$$$getSection$$($dvt$$10$$) {
    for (var $DvtLegendRenderer$$, $index$$170$$ = $dvt$$10$$.shift(), $options$$221$$ = this.$_options$;void 0 != $index$$170$$;) {
      0 < $dvt$$10$$.length ? $options$$221$$ = $options$$221$$.sections[$index$$170$$] : $DvtLegendRenderer$$ = $options$$221$$.sections[$index$$170$$], $index$$170$$ = $dvt$$10$$.shift();
    }
    return {title:$DvtLegendRenderer$$.title ? $DvtLegendRenderer$$.title : null, items:$DvtLegendRenderer$$.items ? this.$_generateItemObjects$($DvtLegendRenderer$$.items) : null, sections:$DvtLegendRenderer$$.sections ? this.$_generateSectionObjects$($DvtLegendRenderer$$.sections) : null};
  };
  $DvtLegendAutomation$$.prototype.$_generateItemObjects$ = function $$DvtLegendAutomation$$$$$_generateItemObjects$$($dvt$$10$$) {
    for (var $DvtLegendRenderer$$ = [], $i$$515$$ = 0;$i$$515$$ < $dvt$$10$$.length;$i$$515$$++) {
      $DvtLegendRenderer$$.push({text:$dvt$$10$$[$i$$515$$].text});
    }
    return $DvtLegendRenderer$$;
  };
  $DvtLegendAutomation$$.prototype.$_generateSectionObjects$ = function $$DvtLegendAutomation$$$$$_generateSectionObjects$$($dvt$$10$$) {
    for (var $DvtLegendRenderer$$ = [], $i$$516$$ = 0;$i$$516$$ < $dvt$$10$$.length;$i$$516$$++) {
      $DvtLegendRenderer$$.push({title:$dvt$$10$$[$i$$516$$].title ? $dvt$$10$$[$i$$516$$].title : null, items:$dvt$$10$$[$i$$516$$].items ? this.$_generateItemObjects$($dvt$$10$$[$i$$516$$].items) : null, sections:$dvt$$10$$[$i$$516$$].sections ? this.$_generateSectionObjects$($dvt$$10$$[$i$$516$$].sections) : null});
    }
    return $DvtLegendRenderer$$;
  };
  $dvt$$10$$.$Obj$.$createSubclass$($DvtLegendDefaults$$, $dvt$$10$$.$BaseComponentDefaults$);
  $DvtLegendDefaults$$.$SKIN_NEXT$ = {skin:$dvt$$10$$.$CSSStyle$.$SKIN_NEXT$, titleStyle:new $dvt$$10$$.$CSSStyle$("color: #737373;"), _sectionTitleStyle:new $dvt$$10$$.$CSSStyle$("color: #737373;"), layout:{titleGapWidth:17, titleGapHeight:9, symbolGapWidth:7, symbolGapHeight:4, rowGap:4, columnGap:10, sectionGapHeight:16, sectionGapWidth:24}};
  $DvtLegendDefaults$$.$SKIN_ALTA$ = {skin:$dvt$$10$$.$CSSStyle$.$SKIN_ALTA$, textStyle:new $dvt$$10$$.$CSSStyle$($dvt$$10$$.$BaseComponentDefaults$.$FONT_FAMILY_ALTA$), titleStyle:new $dvt$$10$$.$CSSStyle$($dvt$$10$$.$BaseComponentDefaults$.$FONT_FAMILY_ALTA_11$ + "color: #333333;"), _sectionTitleStyle:new $dvt$$10$$.$CSSStyle$($dvt$$10$$.$BaseComponentDefaults$.$FONT_FAMILY_ALTA_11$ + "color: #333333;")};
  $DvtLegendDefaults$$.$VERSION_1$ = {skin:$dvt$$10$$.$CSSStyle$.$SKIN_SKYROS$, orientation:"vertical", position:null, backgroundColor:null, borderColor:null, textStyle:new $dvt$$10$$.$CSSStyle$($dvt$$10$$.$BaseComponentDefaults$.$FONT_FAMILY_SKYROS$ + "font-size: 11px; color: #333333;"), titleStyle:new $dvt$$10$$.$CSSStyle$($dvt$$10$$.$BaseComponentDefaults$.$FONT_FAMILY_SKYROS$ + "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};
  $DvtLegendDefaults$$.$getGapSize$ = function $$DvtLegendDefaults$$$$getGapSize$$($legend$$5$$, $DvtLegendRenderer$$) {
    var $scalingFactor$$2$$ = Math.min($dvt$$10$$.$TextUtils$.$getTextStringHeight$($legend$$5$$.$getCtx$(), $legend$$5$$.$getOptions$().textStyle) / 14, 1);
    return Math.ceil($DvtLegendRenderer$$ * $scalingFactor$$2$$);
  };
  $DvtLegendDefaults$$.prototype.$getNoCloneObject$ = function $$DvtLegendDefaults$$$$$getNoCloneObject$$() {
    return {sections:{items:{_dataContext:!0}}};
  };
  $dvt$$10$$.$Obj$.$createSubclass$($DvtLegendEventManager$$, $dvt$$10$$.$EventManager$);
  $DvtLegendEventManager$$.prototype.$OnClick$ = function $$DvtLegendEventManager$$$$$OnClick$$($dvt$$10$$) {
    $DvtLegendEventManager$$.$superclass$.$OnClick$.call(this, $dvt$$10$$);
    var $DvtLegendRenderer$$ = this.$GetLogicalObject$($dvt$$10$$.target);
    if ($DvtLegendRenderer$$) {
      var $hideShow$$ = this.$processHideShowEvent$($DvtLegendRenderer$$), $DvtLegendRenderer$$ = this.$handleClick$($DvtLegendRenderer$$, $dvt$$10$$);
      ($hideShow$$ || $DvtLegendRenderer$$) && $dvt$$10$$.stopPropagation();
    }
  };
  $DvtLegendEventManager$$.prototype.$OnMouseOver$ = function $$DvtLegendEventManager$$$$$OnMouseOver$$($event$$331_obj$$170$$) {
    $DvtLegendEventManager$$.$superclass$.$OnMouseOver$.call(this, $event$$331_obj$$170$$);
    if ($event$$331_obj$$170$$ = this.$GetLogicalObject$($event$$331_obj$$170$$.target)) {
      var $DvtLegendRenderer$$ = $event$$331_obj$$170$$ instanceof $dvt$$10$$.$SimpleObjPeer$ ? $event$$331_obj$$170$$.$_params$ : null;
      $DvtLegendRenderer$$ && $DvtLegendRenderer$$.isCollapsible && $DvtLegendRenderer$$.button && $DvtLegendRenderer$$.button.$drawOverState$();
      this.$UpdateActiveElement$($event$$331_obj$$170$$);
    }
  };
  $DvtLegendEventManager$$.prototype.$OnMouseOut$ = function $$DvtLegendEventManager$$$$$OnMouseOut$$($event$$332_obj$$171_params$$43$$) {
    $DvtLegendEventManager$$.$superclass$.$OnMouseOut$.call(this, $event$$332_obj$$171_params$$43$$);
    ($event$$332_obj$$171_params$$43$$ = this.$GetLogicalObject$($event$$332_obj$$171_params$$43$$.target)) && ($event$$332_obj$$171_params$$43$$ = $event$$332_obj$$171_params$$43$$ instanceof $dvt$$10$$.$SimpleObjPeer$ ? $event$$332_obj$$171_params$$43$$.$_params$ : null) && $event$$332_obj$$171_params$$43$$.isCollapsible && $event$$332_obj$$171_params$$43$$.button && $event$$332_obj$$171_params$$43$$.button.$drawUpState$();
  };
  $DvtLegendEventManager$$.prototype.$HandleTouchClickInternal$ = function $$DvtLegendEventManager$$$$$HandleTouchClickInternal$$($dvt$$10$$) {
    var $DvtLegendRenderer$$ = this.$GetLogicalObject$($dvt$$10$$.target);
    if ($DvtLegendRenderer$$) {
      var $touchEvent$$1$$ = $dvt$$10$$.$touchEvent$, $hideShow$$1$$ = this.$processHideShowEvent$($DvtLegendRenderer$$);
      $dvt$$10$$ = this.$handleClick$($DvtLegendRenderer$$, $dvt$$10$$);
      ($hideShow$$1$$ || $dvt$$10$$) && $touchEvent$$1$$ && $touchEvent$$1$$.preventDefault();
    }
  };
  $DvtLegendEventManager$$.prototype.$processHideShowEvent$ = function $$DvtLegendEventManager$$$$$processHideShowEvent$$($event$$333_id$$139_obj$$173$$) {
    var $DvtLegendDefaults$$ = this.$_legend$.$getOptions$().hideAndShowBehavior;
    if ("none" == $DvtLegendDefaults$$ || "off" == $DvtLegendDefaults$$) {
      return !1;
    }
    var $categories$$12$$ = $event$$333_id$$139_obj$$173$$.$getCategories$ ? $event$$333_id$$139_obj$$173$$.$getCategories$() : null;
    if (!$categories$$12$$ || 0 >= $categories$$12$$.length) {
      return !1;
    }
    for (var $category$$14$$ = $event$$333_id$$139_obj$$173$$.$getCategories$()[0], $DvtLegendDefaults$$ = this.$_legend$.$getOptions$().hiddenCategories || [], $DvtLegendDefaults$$ = $DvtLegendDefaults$$.slice(), $DvtLegendAutomation$$ = $event$$333_id$$139_obj$$173$$.$getDisplayables$(), $i$$517$$ = 0;$i$$517$$ < $DvtLegendAutomation$$.length;$i$$517$$++) {
      var $displayable$$43$$ = $DvtLegendAutomation$$[$i$$517$$];
      $displayable$$43$$ instanceof $dvt$$10$$.$SimpleMarker$ ? $displayable$$43$$.$setHollow$($event$$333_id$$139_obj$$173$$.$getColor$()) : $displayable$$43$$ instanceof $dvt$$10$$.Rect && $event$$333_id$$139_obj$$173$$.$updateAriaLabel$();
    }
    $event$$333_id$$139_obj$$173$$ = $categories$$12$$[0];
    $DvtLegendRenderer$$.$isCategoryHidden$($category$$14$$, this.$_legend$) ? ($DvtLegendDefaults$$.splice($dvt$$10$$.$ArrayUtils$.$getIndex$($DvtLegendDefaults$$, $category$$14$$), 1), $event$$333_id$$139_obj$$173$$ = $dvt$$10$$.$EventFactory$.$newCategoryShowEvent$($event$$333_id$$139_obj$$173$$, $DvtLegendDefaults$$)) : ($DvtLegendDefaults$$.push($category$$14$$), $event$$333_id$$139_obj$$173$$ = $dvt$$10$$.$EventFactory$.$newCategoryHideEvent$($event$$333_id$$139_obj$$173$$, $DvtLegendDefaults$$));
    this.$_legend$.$getOptions$().hiddenCategories = $DvtLegendDefaults$$;
    this.$FireEvent$($event$$333_id$$139_obj$$173$$, this.$_legend$);
    return !0;
  };
  $DvtLegendEventManager$$.prototype.$handleClick$ = function $$DvtLegendEventManager$$$$$handleClick$$($obj$$174$$, $DvtLegendRenderer$$) {
    if ($obj$$174$$ && $obj$$174$$.$getAction$ && $obj$$174$$.$getAction$()) {
      return this.$FireEvent$($dvt$$10$$.$EventFactory$.$newActionEvent$("action", $obj$$174$$.$getAction$(), $obj$$174$$.getId()), this.$_legend$), !0;
    }
    if ($obj$$174$$ instanceof $DvtLegendObjPeer$$ && $obj$$174$$.$isDrillable$()) {
      var $id$$140_params$$44$$ = $obj$$174$$.getId();
      this.$FireEvent$($dvt$$10$$.$EventFactory$.$newChartDrillEvent$($id$$140_params$$44$$, $id$$140_params$$44$$, null), this.$_legend$);
      return !0;
    }
    return ($id$$140_params$$44$$ = $obj$$174$$ instanceof $dvt$$10$$.$SimpleObjPeer$ ? $obj$$174$$.$_params$ : null) && $id$$140_params$$44$$.isCollapsible ? (this.$toggleSectionCollapse$($DvtLegendRenderer$$, $id$$140_params$$44$$.id), !0) : !1;
  };
  $DvtLegendEventManager$$.prototype.$ProcessRolloverEvent$ = function $$DvtLegendEventManager$$$$$ProcessRolloverEvent$$($event$$335_hoverBehaviorDelay$$2_options$$222$$, $DvtLegendRenderer$$, $bOver$$9_rolloverEvent$$3$$) {
    $event$$335_hoverBehaviorDelay$$2_options$$222$$ = this.$_legend$.$getOptions$();
    "none" == $event$$335_hoverBehaviorDelay$$2_options$$222$$.hoverBehavior || $DvtLegendRenderer$$.$getDisplayables$ && $DvtLegendRenderer$$.$getDisplayables$()[0] instanceof $dvt$$10$$.$Button$ || ($DvtLegendRenderer$$ = $DvtLegendRenderer$$.$getCategories$ ? $DvtLegendRenderer$$.$getCategories$() : [], $event$$335_hoverBehaviorDelay$$2_options$$222$$.highlightedCategories = $bOver$$9_rolloverEvent$$3$$ ? $DvtLegendRenderer$$.slice() : null, $bOver$$9_rolloverEvent$$3$$ = $dvt$$10$$.$EventFactory$.$newCategoryHighlightEvent$($event$$335_hoverBehaviorDelay$$2_options$$222$$.highlightedCategories, 
    $bOver$$9_rolloverEvent$$3$$), $event$$335_hoverBehaviorDelay$$2_options$$222$$ = $dvt$$10$$.$StyleUtils$.$getTimeMilliseconds$($event$$335_hoverBehaviorDelay$$2_options$$222$$.hoverBehaviorDelay), this.$RolloverHandler$.$processEvent$($bOver$$9_rolloverEvent$$3$$, this.$_legend$.$_peers$, $event$$335_hoverBehaviorDelay$$2_options$$222$$, !0));
  };
  $DvtLegendEventManager$$.prototype.$onCollapseButtonClick$ = function $$DvtLegendEventManager$$$$$onCollapseButtonClick$$($dvt$$10$$, $DvtLegendRenderer$$) {
    var $buttonId$$1$$ = $DvtLegendRenderer$$.getId();
    this.$toggleSectionCollapse$($dvt$$10$$, $buttonId$$1$$);
  };
  $DvtLegendEventManager$$.prototype.$toggleSectionCollapse$ = function $$DvtLegendEventManager$$$$$toggleSectionCollapse$$($event$$337$$, $DvtLegendRenderer$$) {
    for (var $bounds$$108_focus$$2_peer$$26_section$$8$$ = this.$_legend$.$getOptions$(), $i$$518_isShowingFocusEffect$$2$$ = 0;$i$$518_isShowingFocusEffect$$2$$ < $DvtLegendRenderer$$.length;$i$$518_isShowingFocusEffect$$2$$++) {
      $bounds$$108_focus$$2_peer$$26_section$$8$$ = $bounds$$108_focus$$2_peer$$26_section$$8$$.sections[$DvtLegendRenderer$$[$i$$518_isShowingFocusEffect$$2$$]];
    }
    $bounds$$108_focus$$2_peer$$26_section$$8$$.expanded = "off" == $bounds$$108_focus$$2_peer$$26_section$$8$$.expanded ? "on" : "off";
    $event$$337$$.type == $dvt$$10$$.MouseEvent.$CLICK$ && ($bounds$$108_focus$$2_peer$$26_section$$8$$ = this.$GetLogicalObject$(this.$GetCurrentTargetForEvent$($event$$337$$)), $bounds$$108_focus$$2_peer$$26_section$$8$$.$getNextNavigable$ && this.$setFocusObj$($bounds$$108_focus$$2_peer$$26_section$$8$$.$getNextNavigable$($event$$337$$)));
    $i$$518_isShowingFocusEffect$$2$$ = ($bounds$$108_focus$$2_peer$$26_section$$8$$ = this.$_legend$.$getKeyboardFocus$()) ? $bounds$$108_focus$$2_peer$$26_section$$8$$.$isShowingKeyboardFocusEffect$() : !1;
    this.$_legend$.$render$();
    $bounds$$108_focus$$2_peer$$26_section$$8$$ && this.$_legend$.$setKeyboardFocus$($bounds$$108_focus$$2_peer$$26_section$$8$$, $i$$518_isShowingFocusEffect$$2$$);
    this.$hideTooltip$();
    $bounds$$108_focus$$2_peer$$26_section$$8$$ = this.$_legend$.$getContentDimensions$();
    this.$FireEvent$(new $dvt$$10$$.$ResizeEvent$($bounds$$108_focus$$2_peer$$26_section$$8$$.$w$, $bounds$$108_focus$$2_peer$$26_section$$8$$.$h$, $bounds$$108_focus$$2_peer$$26_section$$8$$.x, $bounds$$108_focus$$2_peer$$26_section$$8$$.y), this.$_legend$);
  };
  $DvtLegendEventManager$$.prototype.$GetTouchResponse$ = function $$DvtLegendEventManager$$$$$GetTouchResponse$$() {
    return this.$_legend$.$getOptions$()._isScrollingLegend ? $dvt$$10$$.$EventManager$.$TOUCH_RESPONSE_TOUCH_HOLD$ : $dvt$$10$$.$EventManager$.$TOUCH_RESPONSE_TOUCH_START$;
  };
  $DvtLegendEventManager$$.prototype.$getComponent$ = function $$DvtLegendEventManager$$$$$getComponent$$() {
    return this.$_legend$;
  };
  $DvtLegendEventManager$$.prototype.$isDndSupported$ = function $$DvtLegendEventManager$$$$$isDndSupported$$() {
    return !0;
  };
  $DvtLegendEventManager$$.prototype.$GetDragSourceType$ = function $$DvtLegendEventManager$$$$$GetDragSourceType$$() {
    var $dvt$$10$$ = this.$DragSource$.$_dragObj$;
    return $dvt$$10$$ instanceof $DvtLegendObjPeer$$ && null != $dvt$$10$$.getData()._dataContext ? "series" : null;
  };
  $DvtLegendEventManager$$.prototype.$GetDragDataContexts$ = function $$DvtLegendEventManager$$$$$GetDragDataContexts$$() {
    var $dvt$$10$$ = this.$DragSource$.$_dragObj$;
    return $dvt$$10$$ instanceof $DvtLegendObjPeer$$ ? [$dvt$$10$$.getData()._dataContext] : [];
  };
  $DvtLegendEventManager$$.prototype.$GetDropTargetType$ = function $$DvtLegendEventManager$$$$$GetDropTargetType$$($dvt$$10$$) {
    $dvt$$10$$ = this.$_legend$.$stageToLocal$(this.$getCtx$().$pageToStageCoords$($dvt$$10$$.pageX, $dvt$$10$$.pageY));
    return this.$_legend$.$_bounds$.$containsPoint$($dvt$$10$$.x, $dvt$$10$$.y) ? "legend" : null;
  };
  $DvtLegendEventManager$$.prototype.$GetDropEventPayload$ = function $$DvtLegendEventManager$$$$$GetDropEventPayload$$() {
    return {};
  };
  $DvtLegendEventManager$$.prototype.$ShowDropEffect$ = function $$DvtLegendEventManager$$$$$ShowDropEffect$$($dvt$$10$$) {
    if ("legend" == this.$GetDropTargetType$($dvt$$10$$)) {
      $dvt$$10$$ = this.$_legend$.$getOptions$()._dropColor;
      var $DvtLegendRenderer$$ = this.$_legend$.$_cache$.$getFromCache$("background");
      $DvtLegendRenderer$$ && $DvtLegendRenderer$$.$setSolidFill$($dvt$$10$$);
    }
  };
  $DvtLegendEventManager$$.prototype.$ClearDropEffect$ = function $$DvtLegendEventManager$$$$$ClearDropEffect$$() {
    var $dvt$$10$$ = this.$_legend$.$_cache$.$getFromCache$("background");
    if ($dvt$$10$$) {
      var $DvtLegendRenderer$$ = this.$_legend$.$getOptions$().backgroundColor;
      $DvtLegendRenderer$$ ? $dvt$$10$$.$setSolidFill$($DvtLegendRenderer$$) : $dvt$$10$$.$setInvisibleFill$();
    }
  };
  $dvt$$10$$.$Obj$.$createSubclass$($DvtLegendKeyboardHandler$$, $dvt$$10$$.$KeyboardHandler$);
  $DvtLegendKeyboardHandler$$.prototype.Init = function $$DvtLegendKeyboardHandler$$$$Init$($dvt$$10$$, $DvtLegendRenderer$$) {
    $DvtLegendKeyboardHandler$$.$superclass$.Init.call(this, $dvt$$10$$);
    this.$_legend$ = $DvtLegendRenderer$$;
  };
  $DvtLegendKeyboardHandler$$.prototype.$processKeyDown$ = function $$DvtLegendKeyboardHandler$$$$$processKeyDown$$($event$$342$$) {
    var $DvtLegendRenderer$$ = $event$$342$$.keyCode, $currentNavigable$$8$$ = this.$_eventManager$.$getFocus$(), $isButton$$ = $currentNavigable$$8$$ && $currentNavigable$$8$$.$getDisplayables$()[0] instanceof $dvt$$10$$.$Button$, $DvtLegendDefaults$$ = null;
    null == $currentNavigable$$8$$ && $DvtLegendRenderer$$ == $dvt$$10$$.KeyboardEvent.$TAB$ ? ($DvtLegendRenderer$$ = this.$_legend$.$_navigablePeers$, 0 < $DvtLegendRenderer$$.length && ($dvt$$10$$.$EventManager$.$consumeEvent$($event$$342$$), $DvtLegendDefaults$$ = this.$getDefaultNavigable$($DvtLegendRenderer$$))) : $currentNavigable$$8$$ && ($DvtLegendRenderer$$ == $dvt$$10$$.KeyboardEvent.$TAB$ ? ($dvt$$10$$.$EventManager$.$consumeEvent$($event$$342$$), $DvtLegendDefaults$$ = $currentNavigable$$8$$) : 
    $DvtLegendRenderer$$ == $dvt$$10$$.KeyboardEvent.$ENTER$ || $DvtLegendRenderer$$ == $dvt$$10$$.KeyboardEvent.$SPACE$ ? ($DvtLegendRenderer$$ == $dvt$$10$$.KeyboardEvent.$ENTER$ && this.$_eventManager$.$handleClick$($currentNavigable$$8$$, $event$$342$$), $isButton$$ ? this.$_eventManager$.$onCollapseButtonClick$($event$$342$$, $currentNavigable$$8$$.$getDisplayables$()[0]) : this.$_eventManager$.$processHideShowEvent$($currentNavigable$$8$$), $dvt$$10$$.$EventManager$.$consumeEvent$($event$$342$$)) : 
    !$isButton$$ || $DvtLegendRenderer$$ != $dvt$$10$$.KeyboardEvent.$LEFT_ARROW$ && $DvtLegendRenderer$$ != $dvt$$10$$.KeyboardEvent.$RIGHT_ARROW$ ? $DvtLegendDefaults$$ = $DvtLegendKeyboardHandler$$.$superclass$.$processKeyDown$.call(this, $event$$342$$) : (this.$_eventManager$.$onCollapseButtonClick$($event$$342$$, $currentNavigable$$8$$.$getDisplayables$()[0]), $dvt$$10$$.$EventManager$.$consumeEvent$($event$$342$$)));
    $DvtLegendDefaults$$ && this.$_legend$.$container$.scrollIntoView($DvtLegendDefaults$$.$getDisplayables$()[0]);
    return $DvtLegendDefaults$$;
  };
  $dvt$$10$$.$Obj$.$createSubclass$($DvtLegendObjPeer$$, $dvt$$10$$.$Obj$);
  $DvtLegendObjPeer$$.prototype.Init = function $$DvtLegendObjPeer$$$$Init$($dvt$$10$$, $DvtLegendDefaults$$, $item$$26$$, $tooltip$$19$$, $DvtLegendAutomation$$, $drillable$$6$$) {
    this.$_legend$ = $dvt$$10$$;
    this.$_displayables$ = $DvtLegendDefaults$$;
    this.$_item$ = $item$$26$$;
    this.$_id$ = (this.$_category$ = $DvtLegendRenderer$$.$getItemCategory$(this.$_item$)) ? this.$_category$ : $item$$26$$.title;
    this.$_action$ = $item$$26$$.action;
    this.$_drillable$ = $drillable$$6$$;
    this.$_spb$ = $item$$26$$._spb;
    this.$_tooltip$ = $tooltip$$19$$;
    this.$_datatip$ = $DvtLegendAutomation$$;
    this.$_isShowingKeyboardFocusEffect$ = !1;
    if (this.$_action$ || this.$_drillable$) {
      for ($dvt$$10$$ = 0;$dvt$$10$$ < this.$_displayables$.length;$dvt$$10$$++) {
        this.$_displayables$[$dvt$$10$$].setCursor("pointer");
      }
    }
  };
  $DvtLegendObjPeer$$.$associate$ = function $$DvtLegendObjPeer$$$$associate$$($dvt$$10$$, $DvtLegendRenderer$$, $identObj$$1_item$$27$$, $i$$520_tooltip$$20$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$) {
    if (!$dvt$$10$$ || !$identObj$$1_item$$27$$) {
      return null;
    }
    $identObj$$1_item$$27$$ = new $DvtLegendObjPeer$$($DvtLegendRenderer$$, $dvt$$10$$, $identObj$$1_item$$27$$, $i$$520_tooltip$$20$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$);
    $DvtLegendRenderer$$.$__registerObject$($identObj$$1_item$$27$$);
    for ($i$$520_tooltip$$20$$ = 0;$i$$520_tooltip$$20$$ < $dvt$$10$$.length;$i$$520_tooltip$$20$$++) {
      $DvtLegendRenderer$$.$getEventManager$().$associate$($dvt$$10$$[$i$$520_tooltip$$20$$], $identObj$$1_item$$27$$);
    }
    return $identObj$$1_item$$27$$;
  };
  $DvtLegendObjPeer$$.prototype.getData = function $$DvtLegendObjPeer$$$$getData$() {
    return this.$_item$;
  };
  $DvtLegendObjPeer$$.prototype.$getColor$ = function $$DvtLegendObjPeer$$$$$getColor$$() {
    return this.$_item$.color;
  };
  $DvtLegendObjPeer$$.prototype.getId = function $$DvtLegendObjPeer$$$$getId$() {
    return this.$_id$;
  };
  $DvtLegendObjPeer$$.prototype.$getDisplayables$ = function $$DvtLegendObjPeer$$$$$getDisplayables$$() {
    return this.$_displayables$;
  };
  $DvtLegendObjPeer$$.prototype.$getCategories$ = function $$DvtLegendObjPeer$$$$$getCategories$$() {
    return null != this.$_category$ ? [this.$_category$] : null;
  };
  $DvtLegendObjPeer$$.prototype.$getAction$ = function $$DvtLegendObjPeer$$$$$getAction$$() {
    return this.$_action$;
  };
  $DvtLegendObjPeer$$.prototype.$isDrillable$ = function $$DvtLegendObjPeer$$$$$isDrillable$$() {
    return this.$_drillable$;
  };
  $DvtLegendObjPeer$$.prototype.$getShowPopupBehaviors$ = function $$DvtLegendObjPeer$$$$$getShowPopupBehaviors$$() {
    return this.$_spb$;
  };
  $DvtLegendObjPeer$$.prototype.$getAriaLabel$ = function $$DvtLegendObjPeer$$$$$getAriaLabel$$() {
    var $states$$11$$ = [], $DvtLegendDefaults$$ = this.$_legend$.$getOptions$(), $hideAndShow$$3$$ = this.$_legend$.$getOptions$().hideAndShowBehavior, $bHiddenCategory$$ = $DvtLegendRenderer$$.$isCategoryHidden$(this.$_category$, this.$_legend$), $DvtLegendAutomation$$ = this.getData();
    if (this.$_displayables$[0] instanceof $dvt$$10$$.$Button$) {
      return $states$$11$$.push($dvt$$10$$.$Bundle$.$getTranslatedString$($dvt$$10$$.$Bundle$.$UTIL_PREFIX$, "off" == $DvtLegendAutomation$$.expanded ? "STATE_COLLAPSED" : "STATE_EXPANDED")), $dvt$$10$$.$Displayable$.$generateAriaLabel$($DvtLegendAutomation$$.title, $states$$11$$);
    }
    "off" != $hideAndShow$$3$$ && "none" != $hideAndShow$$3$$ && $states$$11$$.push($dvt$$10$$.$Bundle$.$getTranslatedString$($dvt$$10$$.$Bundle$.$UTIL_PREFIX$, $bHiddenCategory$$ ? "STATE_HIDDEN" : "STATE_VISIBLE"));
    this.$isDrillable$() && $states$$11$$.push($dvt$$10$$.$Bundle$.$getTranslation$($DvtLegendDefaults$$, "stateDrillable", $dvt$$10$$.$Bundle$.$UTIL_PREFIX$, "STATE_DRILLABLE"));
    return null != $DvtLegendAutomation$$.shortDesc ? $dvt$$10$$.$Displayable$.$generateAriaLabel$($DvtLegendAutomation$$.shortDesc, $states$$11$$) : 0 < $states$$11$$.length ? $dvt$$10$$.$Displayable$.$generateAriaLabel$($DvtLegendAutomation$$.text, $states$$11$$) : null;
  };
  $DvtLegendObjPeer$$.prototype.$updateAriaLabel$ = function $$DvtLegendObjPeer$$$$$updateAriaLabel$$() {
    !$dvt$$10$$.$Agent$.$deferAriaCreation$() && this.$_displayables$[0] && this.$_displayables$[0].$setAriaProperty$("label", this.$getAriaLabel$());
  };
  $DvtLegendObjPeer$$.prototype.$getNextNavigable$ = function $$DvtLegendObjPeer$$$$$getNextNavigable$$($event$$343$$) {
    return $event$$343$$.type == $dvt$$10$$.MouseEvent.$CLICK$ ? this : $dvt$$10$$.$KeyboardHandler$.$getNextNavigable$(this, $event$$343$$, this.$_legend$.$_navigablePeers$, !0);
  };
  $DvtLegendObjPeer$$.prototype.$getKeyboardBoundingBox$ = function $$DvtLegendObjPeer$$$$$getKeyboardBoundingBox$$($targetCoordinateSpace$$23$$) {
    return this.$_displayables$[0] ? this.$_displayables$[0].$getDimensions$($targetCoordinateSpace$$23$$) : new $dvt$$10$$.$Rectangle$(0, 0, 0, 0);
  };
  $DvtLegendObjPeer$$.prototype.$getTargetElem$ = function $$DvtLegendObjPeer$$$$$getTargetElem$$() {
    return this.$_displayables$[0] ? this.$_displayables$[0].$getElem$() : null;
  };
  $DvtLegendObjPeer$$.prototype.$showKeyboardFocusEffect$ = function $$DvtLegendObjPeer$$$$$showKeyboardFocusEffect$$() {
    this.$_isShowingKeyboardFocusEffect$ = !0;
    this.$_displayables$[0] && (this.$_displayables$[0] instanceof $dvt$$10$$.$Button$ ? this.$_displayables$[0].$drawOverState$() : this.$_displayables$[0].$setSolidStroke$($dvt$$10$$.$Agent$.$getFocusColor$()));
  };
  $DvtLegendObjPeer$$.prototype.$hideKeyboardFocusEffect$ = function $$DvtLegendObjPeer$$$$$hideKeyboardFocusEffect$$() {
    this.$_isShowingKeyboardFocusEffect$ = !1;
    this.$_displayables$[0] && (this.$_displayables$[0] instanceof $dvt$$10$$.$Button$ ? this.$_displayables$[0].$drawUpState$() : this.$_displayables$[0].$setStroke$(null));
  };
  $DvtLegendObjPeer$$.prototype.$isShowingKeyboardFocusEffect$ = function $$DvtLegendObjPeer$$$$$isShowingKeyboardFocusEffect$$() {
    return this.$_isShowingKeyboardFocusEffect$;
  };
  $DvtLegendObjPeer$$.prototype.$getTooltip$ = function $$DvtLegendObjPeer$$$$$getTooltip$$() {
    return this.$_tooltip$;
  };
  $DvtLegendObjPeer$$.prototype.$getDatatip$ = function $$DvtLegendObjPeer$$$$$getDatatip$$() {
    return this.$_datatip$;
  };
  $DvtLegendObjPeer$$.prototype.$getDatatipColor$ = function $$DvtLegendObjPeer$$$$$getDatatipColor$$() {
    return this.$_item$.color;
  };
  $DvtLegendObjPeer$$.prototype.$isDragAvailable$ = function $$DvtLegendObjPeer$$$$$isDragAvailable$$() {
    return !0;
  };
  $DvtLegendObjPeer$$.prototype.$getDragTransferable$ = function $$DvtLegendObjPeer$$$$$getDragTransferable$$() {
    return [this.getId()];
  };
  $DvtLegendObjPeer$$.prototype.$getDragFeedback$ = function $$DvtLegendObjPeer$$$$$getDragFeedback$$() {
    return this.$getDisplayables$();
  };
  var $DvtLegendRenderer$$ = {};
  $dvt$$10$$.$Obj$.$createSubclass$($DvtLegendRenderer$$, $dvt$$10$$.$Obj$);
  $DvtLegendRenderer$$.$_DEFAULT_LINE_WIDTH_WITH_MARKER$ = 2;
  $DvtLegendRenderer$$.$_LINE_MARKER_SIZE_FACTOR$ = .6;
  $DvtLegendRenderer$$.$_DEFAULT_SYMBOL_SIZE$ = 10;
  $DvtLegendRenderer$$.$_BUTTON_SIZE$ = 12;
  $DvtLegendRenderer$$.$_FOCUS_GAP$ = 2;
  $DvtLegendRenderer$$.$render$ = function $$DvtLegendRenderer$$$$render$$($legend$$13$$, $availSpace$$93$$) {
    var $options$$224_titles$$ = $legend$$13$$.$getOptions$(), $context$$269_totalDim$$ = $legend$$13$$.$getCtx$(), $DvtLegendAutomation$$ = $dvt$$10$$.$Agent$.$isRightToLeft$($context$$269_totalDim$$);
    $legend$$13$$.$__setBounds$($availSpace$$93$$);
    $options$$224_titles$$.isLayout || $DvtLegendRenderer$$.$_renderBackground$($legend$$13$$, $availSpace$$93$$);
    var $container$$138_translateX$$ = new $dvt$$10$$.$SimpleScrollableContainer$($context$$269_totalDim$$, $availSpace$$93$$.$w$, $availSpace$$93$$.$h$), $contentContainer$$3_i$$521$$ = new $dvt$$10$$.$Container$($context$$269_totalDim$$);
    $container$$138_translateX$$.$_container$.$addChild$($contentContainer$$3_i$$521$$);
    $legend$$13$$.$addChild$($container$$138_translateX$$);
    $legend$$13$$.$container$ = $container$$138_translateX$$;
    var $gapWidth$$2$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$13$$, $options$$224_titles$$.layout.outerGapWidth), $gapHeight$$2$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$13$$, $options$$224_titles$$.layout.outerGapHeight);
    $availSpace$$93$$.x += $gapWidth$$2$$;
    $availSpace$$93$$.y += $gapHeight$$2$$;
    $availSpace$$93$$.$w$ -= 2 * $gapWidth$$2$$;
    $availSpace$$93$$.$h$ -= 2 * $gapHeight$$2$$;
    if (0 >= $availSpace$$93$$.$w$ || 0 >= $availSpace$$93$$.$h$) {
      return new $dvt$$10$$.$Dimension$(0, 0);
    }
    $context$$269_totalDim$$ = $DvtLegendRenderer$$.$_renderContents$($legend$$13$$, $contentContainer$$3_i$$521$$, new $dvt$$10$$.$Rectangle$($availSpace$$93$$.x, $availSpace$$93$$.y, $availSpace$$93$$.$w$, $availSpace$$93$$.$h$));
    if (0 == $context$$269_totalDim$$.$w$ || 0 == $context$$269_totalDim$$.$h$) {
      return new $dvt$$10$$.$Dimension$(0, 0);
    }
    $container$$138_translateX$$.$prepareContentPane$();
    $context$$269_totalDim$$.$h$ > $availSpace$$93$$.$h$ ? ($context$$269_totalDim$$.$h$ = $availSpace$$93$$.$h$, $options$$224_titles$$._isScrollingLegend = !0) : $options$$224_titles$$._isScrollingLegend = !1;
    var $translateY$$ = $container$$138_translateX$$ = 0, $halign$$12$$ = null != $options$$224_titles$$.hAlign ? $options$$224_titles$$.hAlign : $options$$224_titles$$.halign;
    "center" == $halign$$12$$ ? $container$$138_translateX$$ = $availSpace$$93$$.x - $context$$269_totalDim$$.x + ($availSpace$$93$$.$w$ - $context$$269_totalDim$$.$w$) / 2 : "end" == $halign$$12$$ && ($container$$138_translateX$$ = $DvtLegendAutomation$$ ? $availSpace$$93$$.x - $context$$269_totalDim$$.x : $availSpace$$93$$.x - $context$$269_totalDim$$.x + $availSpace$$93$$.$w$ - $context$$269_totalDim$$.$w$);
    $DvtLegendAutomation$$ = null != $options$$224_titles$$.vAlign ? $options$$224_titles$$.vAlign : $options$$224_titles$$.valign;
    "middle" == $DvtLegendAutomation$$ ? $translateY$$ = $availSpace$$93$$.y - $context$$269_totalDim$$.y + ($availSpace$$93$$.$h$ - $context$$269_totalDim$$.$h$) / 2 : "bottom" == $DvtLegendAutomation$$ && ($translateY$$ = $availSpace$$93$$.y - $context$$269_totalDim$$.y + $availSpace$$93$$.$h$ - $context$$269_totalDim$$.$h$);
    $DvtLegendAutomation$$ = new $dvt$$10$$.$Rectangle$($context$$269_totalDim$$.x + $container$$138_translateX$$ - $gapWidth$$2$$, $context$$269_totalDim$$.y + $translateY$$ - $gapHeight$$2$$, $context$$269_totalDim$$.$w$ + 2 * $gapWidth$$2$$, $context$$269_totalDim$$.$h$ + 2 * $gapHeight$$2$$);
    if ($options$$224_titles$$.isLayout) {
      return $DvtLegendAutomation$$;
    }
    ($container$$138_translateX$$ || $translateY$$) && $contentContainer$$3_i$$521$$.$setTranslate$($container$$138_translateX$$, $translateY$$);
    $options$$224_titles$$ = $legend$$13$$.$_titles$;
    for ($contentContainer$$3_i$$521$$ = 0;$contentContainer$$3_i$$521$$ < $options$$224_titles$$.length;$contentContainer$$3_i$$521$$++) {
      $dvt$$10$$.$LayoutUtils$.align($context$$269_totalDim$$, $options$$224_titles$$[$contentContainer$$3_i$$521$$].$halign$, $options$$224_titles$$[$contentContainer$$3_i$$521$$].text, $options$$224_titles$$[$contentContainer$$3_i$$521$$].text.$measureDimensions$().$w$);
    }
    return $DvtLegendAutomation$$;
  };
  $DvtLegendRenderer$$.$_renderContents$ = function $$DvtLegendRenderer$$$$_renderContents$$($dvt$$10$$, $container$$139$$, $availSpace$$94$$) {
    var $options$$225$$ = $dvt$$10$$.$getOptions$();
    $availSpace$$94$$ = $availSpace$$94$$.clone();
    var $DvtLegendAutomation$$ = $DvtLegendRenderer$$.$_renderTitle$($dvt$$10$$, $container$$139$$, $options$$225$$.title, $availSpace$$94$$, null, !0);
    if ($DvtLegendAutomation$$) {
      var $titleDim$$ = $DvtLegendAutomation$$.$measureDimensions$(), $titleGap$$ = $DvtLegendDefaults$$.$getGapSize$($dvt$$10$$, $options$$225$$.layout.titleGapHeight);
      $availSpace$$94$$.y += $titleDim$$.$h$ + $titleGap$$;
      $availSpace$$94$$.$h$ -= Math.floor($titleDim$$.$h$ + $titleGap$$);
    }
    $dvt$$10$$ = $DvtLegendRenderer$$.$_renderSections$($dvt$$10$$, $container$$139$$, $options$$225$$.sections, $availSpace$$94$$, []);
    return $DvtLegendAutomation$$ ? $titleDim$$.$getUnion$($dvt$$10$$) : $dvt$$10$$;
  };
  $DvtLegendRenderer$$.$_renderBackground$ = function $$DvtLegendRenderer$$$$_renderBackground$$($legend$$15$$, $DvtLegendRenderer$$) {
    var $legendDrop_options$$226_rect$$21$$ = $legend$$15$$.$getOptions$(), $backgroundColor$$20$$ = $legendDrop_options$$226_rect$$21$$.backgroundColor, $DvtLegendDefaults$$ = $legendDrop_options$$226_rect$$21$$.borderColor, $legendDrop_options$$226_rect$$21$$ = $legendDrop_options$$226_rect$$21$$.dnd ? $legendDrop_options$$226_rect$$21$$.dnd.drop.legend : {};
    if ($backgroundColor$$20$$ || $DvtLegendDefaults$$ || 0 < Object.keys($legendDrop_options$$226_rect$$21$$).length) {
      $legendDrop_options$$226_rect$$21$$ = new $dvt$$10$$.Rect($legend$$15$$.$getCtx$(), $DvtLegendRenderer$$.x, $DvtLegendRenderer$$.y, $DvtLegendRenderer$$.$w$, $DvtLegendRenderer$$.$h$), $backgroundColor$$20$$ ? $legendDrop_options$$226_rect$$21$$.$setSolidFill$($backgroundColor$$20$$) : $legendDrop_options$$226_rect$$21$$.$setInvisibleFill$(), $DvtLegendDefaults$$ && ($legendDrop_options$$226_rect$$21$$.$setSolidStroke$($DvtLegendDefaults$$), $legendDrop_options$$226_rect$$21$$.$setPixelHinting$()), 
      $legend$$15$$.$addChild$($legendDrop_options$$226_rect$$21$$), $legend$$15$$.$_cache$.$putToCache$("background", $legendDrop_options$$226_rect$$21$$);
    }
  };
  $DvtLegendRenderer$$.$_renderTitle$ = function $$DvtLegendRenderer$$$$_renderTitle$$($legend$$16$$, $DvtLegendRenderer$$, $title$$14_titleStr$$, $availSpace$$96$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$, $id$$141$$, $button$$65$$) {
    var $options$$227$$ = $legend$$16$$.$getOptions$(), $context$$270_titleStyle$$1$$ = $DvtLegendRenderer$$.$getCtx$(), $isRTL$$48$$ = $dvt$$10$$.$Agent$.$isRightToLeft$($context$$270_titleStyle$$1$$);
    if (!$title$$14_titleStr$$) {
      return null;
    }
    $title$$14_titleStr$$ = new $dvt$$10$$.$OutputText$($context$$270_titleStyle$$1$$, $title$$14_titleStr$$, $availSpace$$96$$.x, $availSpace$$96$$.y);
    $context$$270_titleStyle$$1$$ = $options$$227$$.titleStyle;
    $DvtLegendDefaults$$ && $DvtLegendDefaults$$.titleStyle ? $context$$270_titleStyle$$1$$ = new $dvt$$10$$.$CSSStyle$($DvtLegendDefaults$$.titleStyle) : $DvtLegendDefaults$$ && $options$$227$$._sectionTitleStyle && ($context$$270_titleStyle$$1$$ = $options$$227$$._sectionTitleStyle);
    $title$$14_titleStr$$.$setCSSStyle$($context$$270_titleStyle$$1$$);
    return $dvt$$10$$.$TextUtils$.$fitText$($title$$14_titleStr$$, $availSpace$$96$$.$w$, Infinity, $DvtLegendRenderer$$) ? ($isRTL$$48$$ && $title$$14_titleStr$$.$setX$($availSpace$$96$$.x + $availSpace$$96$$.$w$ - $title$$14_titleStr$$.$measureDimensions$().$w$), $options$$227$$.isLayout ? $DvtLegendRenderer$$.removeChild($title$$14_titleStr$$) : ($DvtLegendRenderer$$ = {id:$id$$141$$, button:$button$$65$$}, $DvtLegendRenderer$$.isCollapsible = $DvtLegendDefaults$$ && ("on" == $DvtLegendDefaults$$.collapsible || 
    1 == $DvtLegendDefaults$$.collapsible), $legend$$16$$.$getEventManager$().$associate$($title$$14_titleStr$$, new $dvt$$10$$.$SimpleObjPeer$($title$$14_titleStr$$.$getUntruncatedTextString$(), null, null, $DvtLegendRenderer$$)), $DvtLegendAutomation$$ && $legend$$16$$.$__registerTitle$({text:$title$$14_titleStr$$, $halign$:$DvtLegendDefaults$$ && $DvtLegendDefaults$$.titleHalign ? $DvtLegendDefaults$$.titleHalign : $options$$227$$.titleHalign})), $title$$14_titleStr$$) : null;
  };
  $DvtLegendRenderer$$.$_renderSections$ = function $$DvtLegendRenderer$$$$_renderSections$$($legend$$17$$, $container$$141$$, $sections$$6$$, $availSpace$$97$$, $DvtLegendAutomation$$) {
    var $isHoriz$$17_options$$228$$ = $legend$$17$$.$getOptions$();
    null == $isHoriz$$17_options$$228$$.symbolWidth && null == $isHoriz$$17_options$$228$$.symbolHeight ? ($isHoriz$$17_options$$228$$.symbolWidth = $DvtLegendRenderer$$.$_DEFAULT_SYMBOL_SIZE$, $isHoriz$$17_options$$228$$.symbolHeight = $DvtLegendRenderer$$.$_DEFAULT_SYMBOL_SIZE$) : (null == $isHoriz$$17_options$$228$$.symbolWidth ? $isHoriz$$17_options$$228$$.symbolWidth = $isHoriz$$17_options$$228$$.symbolHeight : null == $isHoriz$$17_options$$228$$.symbolHeight && ($isHoriz$$17_options$$228$$.symbolHeight = 
    $isHoriz$$17_options$$228$$.symbolWidth), $isHoriz$$17_options$$228$$.symbolWidth = parseInt($isHoriz$$17_options$$228$$.symbolWidth), $isHoriz$$17_options$$228$$.symbolHeight = parseInt($isHoriz$$17_options$$228$$.symbolHeight));
    for (var $sectionGapHeight$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$17$$, $isHoriz$$17_options$$228$$.layout.sectionGapHeight), $titleGapHeight$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$17$$, $isHoriz$$17_options$$228$$.layout.titleGapHeight), $gapWidth$$3$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$17$$, $isHoriz$$17_options$$228$$.layout.sectionGapWidth), $rowHeight$$2$$ = $DvtLegendRenderer$$.$_getRowHeight$($legend$$17$$), $isHoriz$$17_options$$228$$ = "vertical" != $isHoriz$$17_options$$228$$.orientation, 
    $totalDim$$1$$ = null, $horizAvailSpace$$ = $availSpace$$97$$.clone(), $sectionDim$$, $i$$522$$ = 0;$i$$522$$ < $sections$$6$$.length;$i$$522$$++) {
      var $sectionId$$2$$ = $DvtLegendAutomation$$.concat([$i$$522$$]), $gapHeight$$3$$ = "off" == $sections$$6$$[$i$$522$$].expanded || 0 == $sections$$6$$[$i$$522$$].expanded ? $titleGapHeight$$ : $sectionGapHeight$$;
      $isHoriz$$17_options$$228$$ ? ($sectionDim$$ = $DvtLegendRenderer$$.$_renderHorizontalSection$($legend$$17$$, $container$$141$$, $sections$$6$$[$i$$522$$], $horizAvailSpace$$, $rowHeight$$2$$), $sectionDim$$.$w$ > $horizAvailSpace$$.$w$ ? ($horizAvailSpace$$.$w$ < $availSpace$$97$$.$w$ && ($availSpace$$97$$.y += $sectionDim$$.$h$ + $gapHeight$$3$$, $availSpace$$97$$.$h$ -= $sectionDim$$.$h$ + $gapHeight$$3$$), $sectionDim$$ = $sectionDim$$.$w$ <= $availSpace$$97$$.$w$ ? $DvtLegendRenderer$$.$_renderHorizontalSection$($legend$$17$$, 
      $container$$141$$, $sections$$6$$[$i$$522$$], $availSpace$$97$$, $rowHeight$$2$$) : $DvtLegendRenderer$$.$_renderVerticalSection$($legend$$17$$, $container$$141$$, $sections$$6$$[$i$$522$$], $availSpace$$97$$, $rowHeight$$2$$, $sectionId$$2$$, !0), $availSpace$$97$$.y += $sectionDim$$.$h$ + $gapHeight$$3$$, $availSpace$$97$$.$h$ -= $sectionDim$$.$h$ + $gapHeight$$3$$, $horizAvailSpace$$ = $availSpace$$97$$.clone()) : ($horizAvailSpace$$.$w$ -= $sectionDim$$.$w$ + $gapWidth$$3$$, $dvt$$10$$.$Agent$.$isRightToLeft$($legend$$17$$.$getCtx$()) || 
      ($horizAvailSpace$$.x += $sectionDim$$.$w$ + $gapWidth$$3$$))) : ($sectionDim$$ = $DvtLegendRenderer$$.$_renderVerticalSection$($legend$$17$$, $container$$141$$, $sections$$6$$[$i$$522$$], $availSpace$$97$$, $rowHeight$$2$$, $sectionId$$2$$, !1), $availSpace$$97$$.y += $sectionDim$$.$h$ + $gapHeight$$3$$, $availSpace$$97$$.$h$ -= $sectionDim$$.$h$ + $gapHeight$$3$$);
      $totalDim$$1$$ = $totalDim$$1$$ ? $totalDim$$1$$.$getUnion$($sectionDim$$) : $sectionDim$$;
    }
    return $totalDim$$1$$;
  };
  $DvtLegendRenderer$$.$_createButton$ = function $$DvtLegendRenderer$$$$_createButton$$($button$$66_context$$271$$, $DvtLegendDefaults$$, $item$$28$$, $downState$$9_resources$$8$$, $DvtLegendAutomation$$, $x$$175$$, $y$$154$$, $tooltip$$21$$, $id$$143$$, $callback$$130$$, $callbackObj$$57$$) {
    var $upState$$12$$ = $DvtLegendRenderer$$.$_createButtonImage$($button$$66_context$$271$$, $downState$$9_resources$$8$$, $DvtLegendAutomation$$ + "Enabled", $x$$175$$, $y$$154$$), $overState$$9$$ = $DvtLegendRenderer$$.$_createButtonImage$($button$$66_context$$271$$, $downState$$9_resources$$8$$, $DvtLegendAutomation$$ + "Over", $x$$175$$, $y$$154$$);
    $downState$$9_resources$$8$$ = $DvtLegendRenderer$$.$_createButtonImage$($button$$66_context$$271$$, $downState$$9_resources$$8$$, $DvtLegendAutomation$$ + "Down", $x$$175$$, $y$$154$$);
    $button$$66_context$$271$$ = new $dvt$$10$$.$Button$($button$$66_context$$271$$, $upState$$12$$, $overState$$9$$, $downState$$9_resources$$8$$, null, $id$$143$$, $callback$$130$$, $callbackObj$$57$$);
    $DvtLegendDefaults$$ = $DvtLegendObjPeer$$.$associate$([$button$$66_context$$271$$], $DvtLegendDefaults$$, $item$$28$$, $tooltip$$21$$, null, !1);
    $button$$66_context$$271$$.$setAriaRole$("button");
    $DvtLegendDefaults$$.$updateAriaLabel$();
    return $button$$66_context$$271$$;
  };
  $DvtLegendRenderer$$.$_createButtonImage$ = function $$DvtLegendRenderer$$$$_createButtonImage$$($context$$272_image$$10$$, $DvtLegendDefaults$$, $name$$99$$, $x$$176$$, $DvtLegendAutomation$$) {
    var $suffix$$2$$ = $dvt$$10$$.$Agent$.$isRightToLeft$($context$$272_image$$10$$) ? "RTL" : "";
    $context$$272_image$$10$$ = new $dvt$$10$$.Image($context$$272_image$$10$$, $DvtLegendDefaults$$[$name$$99$$ + $suffix$$2$$] ? $DvtLegendDefaults$$[$name$$99$$ + $suffix$$2$$] : $DvtLegendDefaults$$[$name$$99$$], $x$$176$$, $DvtLegendAutomation$$, $DvtLegendRenderer$$.$_BUTTON_SIZE$, $DvtLegendRenderer$$.$_BUTTON_SIZE$);
    $context$$272_image$$10$$.$setInvisibleFill$();
    return $context$$272_image$$10$$;
  };
  $DvtLegendRenderer$$.$_renderVerticalSection$ = function $$DvtLegendRenderer$$$$_renderVerticalSection$$($legend$$19$$, $container$$142$$, $section$$10$$, $availSpace$$98_sectionSpace$$, $DvtLegendAutomation$$, $id$$144_nestedSectionDim_numRows$$, $minimizeNumRows_numCols$$) {
    if ($section$$10$$) {
      var $options$$229_textSpace$$ = $legend$$19$$.$getOptions$(), $currRow_symbolGap$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$19$$, $options$$229_textSpace$$.layout.symbolGapWidth), $rowGap$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$19$$, $options$$229_textSpace$$.layout.rowGap), $colGap$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$19$$, $options$$229_textSpace$$.layout.columnGap), $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$ = $legend$$19$$.$getCtx$(), $isRTL$$49$$ = 
      $dvt$$10$$.$Agent$.$isRightToLeft$($buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$);
      $availSpace$$98_sectionSpace$$ = $availSpace$$98_sectionSpace$$.clone();
      "off" != $options$$229_textSpace$$.scrolling && ($availSpace$$98_sectionSpace$$.$h$ = Infinity);
      var $buttonDim_buttonX_colInitY$$, $colInfo_colWidth_isCollapsible_titleGap$$1$$ = "on" == $section$$10$$.collapsible || 1 == $section$$10$$.collapsible, $button$$67_buttonType_contentWidth$$3_currCol$$;
      if ($colInfo_colWidth_isCollapsible_titleGap$$1$$) {
        $buttonDim_buttonX_colInitY$$ = $isRTL$$49$$ ? $availSpace$$98_sectionSpace$$.x + $availSpace$$98_sectionSpace$$.$w$ - $DvtLegendRenderer$$.$_BUTTON_SIZE$ : $availSpace$$98_sectionSpace$$.x;
        if (!$options$$229_textSpace$$.isLayout) {
          var $buttonTooltip_isCollapsed_numItems$$4$$ = "off" == $section$$10$$.expanded || 0 == $section$$10$$.expanded;
          $button$$67_buttonType_contentWidth$$3_currCol$$ = $buttonTooltip_isCollapsed_numItems$$4$$ ? "closed" : "open";
          var $buttonTooltip_isCollapsed_numItems$$4$$ = $dvt$$10$$.$Bundle$.$getTranslatedString$($dvt$$10$$.$Bundle$.$UTIL_PREFIX$, $buttonTooltip_isCollapsed_numItems$$4$$ ? "EXPAND" : "COLLAPSE", null), $em$$4_i$$523$$ = $legend$$19$$.$getEventManager$();
          $button$$67_buttonType_contentWidth$$3_currCol$$ = $DvtLegendRenderer$$.$_createButton$($buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$, $legend$$19$$, $section$$10$$, $options$$229_textSpace$$._resources, $button$$67_buttonType_contentWidth$$3_currCol$$, $buttonDim_buttonX_colInitY$$, $availSpace$$98_sectionSpace$$.y, $buttonTooltip_isCollapsed_numItems$$4$$, $id$$144_nestedSectionDim_numRows$$, $em$$4_i$$523$$.$onCollapseButtonClick$, $em$$4_i$$523$$);
          $container$$142$$.$addChild$($button$$67_buttonType_contentWidth$$3_currCol$$);
        }
        $buttonDim_buttonX_colInitY$$ = new $dvt$$10$$.$Rectangle$($buttonDim_buttonX_colInitY$$, $availSpace$$98_sectionSpace$$.y, $DvtLegendRenderer$$.$_BUTTON_SIZE$, $DvtLegendRenderer$$.$_BUTTON_SIZE$);
        $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$19$$, $options$$229_textSpace$$.layout.symbolGapWidth);
        $isRTL$$49$$ || ($availSpace$$98_sectionSpace$$.x += $DvtLegendRenderer$$.$_BUTTON_SIZE$ + $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$);
        $availSpace$$98_sectionSpace$$.$w$ -= $DvtLegendRenderer$$.$_BUTTON_SIZE$ + $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$;
      }
      $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$ = ($buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$ = $DvtLegendRenderer$$.$_renderTitle$($legend$$19$$, $container$$142$$, $section$$10$$.title, $availSpace$$98_sectionSpace$$, $section$$10$$, !$colInfo_colWidth_isCollapsible_titleGap$$1$$ && 1 >= $id$$144_nestedSectionDim_numRows$$.length, $id$$144_nestedSectionDim_numRows$$, $button$$67_buttonType_contentWidth$$3_currCol$$)) ? $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$.$measureDimensions$() : 
      new $dvt$$10$$.$Rectangle$($isRTL$$49$$ ? $availSpace$$98_sectionSpace$$.x + $availSpace$$98_sectionSpace$$.$w$ : $availSpace$$98_sectionSpace$$.x, $availSpace$$98_sectionSpace$$.y, 0, 0);
      $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$ = $buttonDim_buttonX_colInitY$$ ? $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$.$getUnion$($buttonDim_buttonX_colInitY$$) : $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$;
      if (!$section$$10$$.items && !$section$$10$$.sections || "off" == $section$$10$$.expanded || 0 == $section$$10$$.expanded) {
        return $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$;
      }
      0 < $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$.$h$ && ($colInfo_colWidth_isCollapsible_titleGap$$1$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$19$$, $options$$229_textSpace$$.layout.titleGapHeight), $availSpace$$98_sectionSpace$$.y += $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$.$h$ + $colInfo_colWidth_isCollapsible_titleGap$$1$$, $availSpace$$98_sectionSpace$$.$h$ -= $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$.$h$ + $colInfo_colWidth_isCollapsible_titleGap$$1$$);
      $section$$10$$.sections && ($id$$144_nestedSectionDim_numRows$$ = $DvtLegendRenderer$$.$_renderSections$($legend$$19$$, $container$$142$$, $section$$10$$.sections, $availSpace$$98_sectionSpace$$, $id$$144_nestedSectionDim_numRows$$), $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$ = $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$.$getUnion$($id$$144_nestedSectionDim_numRows$$));
      if (!$section$$10$$.items) {
        return $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$;
      }
      $colInfo_colWidth_isCollapsible_titleGap$$1$$ = $DvtLegendRenderer$$.$_calcColumns$($legend$$19$$, $availSpace$$98_sectionSpace$$, $DvtLegendAutomation$$, $section$$10$$.items, $minimizeNumRows_numCols$$);
      $minimizeNumRows_numCols$$ = $colInfo_colWidth_isCollapsible_titleGap$$1$$.numCols;
      $id$$144_nestedSectionDim_numRows$$ = $colInfo_colWidth_isCollapsible_titleGap$$1$$.numRows;
      $colInfo_colWidth_isCollapsible_titleGap$$1$$ = $colInfo_colWidth_isCollapsible_titleGap$$1$$.width;
      $buttonDim_buttonX_colInitY$$ = $availSpace$$98_sectionSpace$$.y;
      if (0 == $id$$144_nestedSectionDim_numRows$$ || 0 == $minimizeNumRows_numCols$$) {
        return $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$;
      }
      $button$$67_buttonType_contentWidth$$3_currCol$$ = Math.min($minimizeNumRows_numCols$$ * ($colInfo_colWidth_isCollapsible_titleGap$$1$$ + $colGap$$) - $colGap$$, $availSpace$$98_sectionSpace$$.$w$);
      $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$ = $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$.$getUnion$(new $dvt$$10$$.$Rectangle$($isRTL$$49$$ ? $availSpace$$98_sectionSpace$$.x + $availSpace$$98_sectionSpace$$.$w$ - $button$$67_buttonType_contentWidth$$3_currCol$$ : $availSpace$$98_sectionSpace$$.x, $availSpace$$98_sectionSpace$$.y, $button$$67_buttonType_contentWidth$$3_currCol$$, $id$$144_nestedSectionDim_numRows$$ * ($DvtLegendAutomation$$ + $rowGap$$) - 
      $rowGap$$));
      if ($options$$229_textSpace$$.isLayout) {
        return $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$;
      }
      $options$$229_textSpace$$ = $colInfo_colWidth_isCollapsible_titleGap$$1$$ - $options$$229_textSpace$$.symbolWidth - $currRow_symbolGap$$;
      $currRow_symbolGap$$ = 0;
      $button$$67_buttonType_contentWidth$$3_currCol$$ = 1;
      $buttonTooltip_isCollapsed_numItems$$4$$ = $section$$10$$.items.length;
      for ($em$$4_i$$523$$ = 0;$em$$4_i$$523$$ < $buttonTooltip_isCollapsed_numItems$$4$$ && ($DvtLegendRenderer$$.$_createLegendItem$($legend$$19$$, $container$$142$$, $section$$10$$.items[$em$$4_i$$523$$], $availSpace$$98_sectionSpace$$, $options$$229_textSpace$$, $DvtLegendAutomation$$, $em$$4_i$$523$$), $availSpace$$98_sectionSpace$$.y += $DvtLegendAutomation$$ + $rowGap$$, $currRow_symbolGap$$++, $currRow_symbolGap$$ === $id$$144_nestedSectionDim_numRows$$ && $button$$67_buttonType_contentWidth$$3_currCol$$ !== 
      $minimizeNumRows_numCols$$ && ($availSpace$$98_sectionSpace$$.y = $buttonDim_buttonX_colInitY$$, $availSpace$$98_sectionSpace$$.$w$ -= $colInfo_colWidth_isCollapsible_titleGap$$1$$ + $colGap$$, $isRTL$$49$$ || ($availSpace$$98_sectionSpace$$.x += $colInfo_colWidth_isCollapsible_titleGap$$1$$ + $colGap$$), $currRow_symbolGap$$ = 0, $button$$67_buttonType_contentWidth$$3_currCol$$++), $currRow_symbolGap$$ !== $id$$144_nestedSectionDim_numRows$$);$em$$4_i$$523$$++) {
      }
      return $buttonGap_context$$273_sectionDim$$1_title$$15_titleDim$$1$$;
    }
  };
  $DvtLegendRenderer$$.$_renderHorizontalSection$ = function $$DvtLegendRenderer$$$$_renderHorizontalSection$$($legend$$20$$, $container$$143$$, $section$$11$$, $availSpace$$99_colWidth$$1$$, $DvtLegendAutomation$$) {
    if ($section$$11$$) {
      var $options$$230$$ = $legend$$20$$.$getOptions$(), $symbolWidth$$ = $options$$230$$.symbolWidth, $symbolGap$$1$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$20$$, $options$$230$$.layout.symbolGapWidth), $colGap$$1$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$20$$, $options$$230$$.layout.columnGap), $textWidths_titleGap$$2$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$20$$, $options$$230$$.layout.titleGapWidth), $numItems$$5$$ = $section$$11$$.items.length, $isRTL$$50$$ = $dvt$$10$$.$Agent$.$isRightToLeft$($legend$$20$$.$getCtx$()), 
      $sectionSpace$$1$$ = $availSpace$$99_colWidth$$1$$.clone(), $title$$16$$ = $DvtLegendRenderer$$.$_renderTitle$($legend$$20$$, $container$$143$$, $section$$11$$.title, $availSpace$$99_colWidth$$1$$, $section$$11$$, !1), $sectionDim$$2_titleDim$$2$$ = $title$$16$$ ? $title$$16$$.$measureDimensions$() : new $dvt$$10$$.$Rectangle$($isRTL$$50$$ ? $availSpace$$99_colWidth$$1$$.x + $availSpace$$99_colWidth$$1$$.$w$ : $availSpace$$99_colWidth$$1$$.x, $availSpace$$99_colWidth$$1$$.y, 0, 0);
      if (!$section$$11$$.items) {
        return $sectionDim$$2_titleDim$$2$$;
      }
      0 < $sectionDim$$2_titleDim$$2$$.$w$ && ($sectionSpace$$1$$.$w$ -= $sectionDim$$2_titleDim$$2$$.$w$ + $textWidths_titleGap$$2$$, $isRTL$$50$$ || ($sectionSpace$$1$$.x += $sectionDim$$2_titleDim$$2$$.$w$ + $textWidths_titleGap$$2$$));
      var $textWidths_titleGap$$2$$ = [], $totalWidth$$5$$ = $availSpace$$99_colWidth$$1$$.$w$ - $sectionSpace$$1$$.$w$, $item$$30_textWidth$$2$$, $i$$524$$;
      for ($i$$524$$ = 0;$i$$524$$ < $numItems$$5$$;$i$$524$$++) {
        $item$$30_textWidth$$2$$ = $section$$11$$.items[$i$$524$$], $item$$30_textWidth$$2$$ = Math.ceil($dvt$$10$$.$TextUtils$.$getTextStringWidth$($legend$$20$$.$getCtx$(), $item$$30_textWidth$$2$$.text, $options$$230$$.textStyle)), $totalWidth$$5$$ += $item$$30_textWidth$$2$$ + $symbolWidth$$ + $symbolGap$$1$$ + $colGap$$1$$, $textWidths_titleGap$$2$$.push($item$$30_textWidth$$2$$);
      }
      0 < $numItems$$5$$ && ($totalWidth$$5$$ -= $colGap$$1$$);
      $sectionDim$$2_titleDim$$2$$ = new $dvt$$10$$.$Rectangle$($isRTL$$50$$ ? $availSpace$$99_colWidth$$1$$.x + $availSpace$$99_colWidth$$1$$.$w$ - $totalWidth$$5$$ : $availSpace$$99_colWidth$$1$$.x, $availSpace$$99_colWidth$$1$$.y, $totalWidth$$5$$, Math.max($DvtLegendAutomation$$, $sectionDim$$2_titleDim$$2$$.$h$));
      if ($options$$230$$.isLayout || $totalWidth$$5$$ > $availSpace$$99_colWidth$$1$$.$w$) {
        return $container$$143$$.removeChild($title$$16$$), $sectionDim$$2_titleDim$$2$$;
      }
      for ($i$$524$$ = 0;$i$$524$$ < $numItems$$5$$;$i$$524$$++) {
        $item$$30_textWidth$$2$$ = $section$$11$$.items[$i$$524$$], $DvtLegendRenderer$$.$_createLegendItem$($legend$$20$$, $container$$143$$, $item$$30_textWidth$$2$$, $sectionSpace$$1$$, $textWidths_titleGap$$2$$[$i$$524$$], $DvtLegendAutomation$$, $i$$524$$), $availSpace$$99_colWidth$$1$$ = $textWidths_titleGap$$2$$[$i$$524$$] + $symbolWidth$$ + $symbolGap$$1$$, $sectionSpace$$1$$.$w$ -= $availSpace$$99_colWidth$$1$$ + $colGap$$1$$, $isRTL$$50$$ || ($sectionSpace$$1$$.x += $availSpace$$99_colWidth$$1$$ + 
        $colGap$$1$$);
      }
      return $sectionDim$$2_titleDim$$2$$;
    }
  };
  $DvtLegendRenderer$$.$_calcColumns$ = function $$DvtLegendRenderer$$$$_calcColumns$$($colGap$$2_legend$$21$$, $DvtLegendRenderer$$, $numRows$$1_rowHeight$$5$$, $items$$26$$, $DvtLegendAutomation$$) {
    for (var $options$$231$$ = $colGap$$2_legend$$21$$.$getOptions$(), $hasLargeItemsCount_symbolWidth$$1$$ = 100 < $dvt$$10$$.$Legend$.$getItemCount$($colGap$$2_legend$$21$$), $fullColWidth_textWidth$$3$$ = 0, $i$$525_rowGap$$1$$ = 0;$i$$525_rowGap$$1$$ < $items$$26$$.length;$i$$525_rowGap$$1$$++) {
      var $item$$31_outputText_symbolGap$$2_tempWidth$$ = $items$$26$$[$i$$525_rowGap$$1$$];
      $hasLargeItemsCount_symbolWidth$$1$$ ? ($item$$31_outputText_symbolGap$$2_tempWidth$$ = new $dvt$$10$$.$OutputText$($colGap$$2_legend$$21$$.$getCtx$(), $item$$31_outputText_symbolGap$$2_tempWidth$$.text), $item$$31_outputText_symbolGap$$2_tempWidth$$.$setCSSStyle$($options$$231$$.textStyle), $item$$31_outputText_symbolGap$$2_tempWidth$$ = $dvt$$10$$.$TextUtils$.$guessTextDimensions$($item$$31_outputText_symbolGap$$2_tempWidth$$).$w$) : $item$$31_outputText_symbolGap$$2_tempWidth$$ = $dvt$$10$$.$TextUtils$.$getTextStringWidth$($colGap$$2_legend$$21$$.$getCtx$(), 
      $item$$31_outputText_symbolGap$$2_tempWidth$$.text, $options$$231$$.textStyle);
      $item$$31_outputText_symbolGap$$2_tempWidth$$ > $fullColWidth_textWidth$$3$$ && ($fullColWidth_textWidth$$3$$ = $item$$31_outputText_symbolGap$$2_tempWidth$$);
    }
    $hasLargeItemsCount_symbolWidth$$1$$ = $options$$231$$.symbolWidth;
    $item$$31_outputText_symbolGap$$2_tempWidth$$ = $DvtLegendDefaults$$.$getGapSize$($colGap$$2_legend$$21$$, $options$$231$$.layout.symbolGapWidth);
    $i$$525_rowGap$$1$$ = $DvtLegendDefaults$$.$getGapSize$($colGap$$2_legend$$21$$, $options$$231$$.layout.rowGap);
    $colGap$$2_legend$$21$$ = $DvtLegendDefaults$$.$getGapSize$($colGap$$2_legend$$21$$, $options$$231$$.layout.columnGap);
    $fullColWidth_textWidth$$3$$ = Math.ceil($hasLargeItemsCount_symbolWidth$$1$$ + $item$$31_outputText_symbolGap$$2_tempWidth$$ + $fullColWidth_textWidth$$3$$);
    $DvtLegendAutomation$$ ? ($DvtLegendAutomation$$ = Math.min(Math.floor(($DvtLegendRenderer$$.$w$ + $colGap$$2_legend$$21$$) / ($fullColWidth_textWidth$$3$$ + $colGap$$2_legend$$21$$)), $items$$26$$.length), $numRows$$1_rowHeight$$5$$ = Math.min(Math.floor(($DvtLegendRenderer$$.$h$ + $i$$525_rowGap$$1$$) / ($numRows$$1_rowHeight$$5$$ + $i$$525_rowGap$$1$$)), Math.ceil($items$$26$$.length / $DvtLegendAutomation$$)), $DvtLegendAutomation$$ = Math.ceil($items$$26$$.length / $numRows$$1_rowHeight$$5$$), 
    $numRows$$1_rowHeight$$5$$ = Math.ceil($items$$26$$.length / $DvtLegendAutomation$$)) : Infinity == $DvtLegendRenderer$$.$h$ ? ($DvtLegendAutomation$$ = 1, $numRows$$1_rowHeight$$5$$ = $items$$26$$.length) : ($numRows$$1_rowHeight$$5$$ = Math.min(Math.floor(($DvtLegendRenderer$$.$h$ + $i$$525_rowGap$$1$$) / ($numRows$$1_rowHeight$$5$$ + $i$$525_rowGap$$1$$)), $items$$26$$.length), $DvtLegendAutomation$$ = Math.ceil($items$$26$$.length / $numRows$$1_rowHeight$$5$$), $numRows$$1_rowHeight$$5$$ = 
    Math.ceil($items$$26$$.length / $DvtLegendAutomation$$));
    $DvtLegendRenderer$$ = Math.min($fullColWidth_textWidth$$3$$, ($DvtLegendRenderer$$.$w$ - $colGap$$2_legend$$21$$ * ($DvtLegendAutomation$$ - 1)) / $DvtLegendAutomation$$);
    return $DvtLegendRenderer$$ < $hasLargeItemsCount_symbolWidth$$1$$ ? {width:0, numCols:0, numRows:0} : {width:$DvtLegendRenderer$$, numCols:$DvtLegendAutomation$$, numRows:$numRows$$1_rowHeight$$5$$};
  };
  $DvtLegendRenderer$$.$_getRowHeight$ = function $$DvtLegendRenderer$$$$_getRowHeight$$($legend$$22_symbolHeight$$) {
    var $DvtLegendRenderer$$ = $legend$$22_symbolHeight$$.$getOptions$(), $text$$68_textHeight$$2$$ = new $dvt$$10$$.$OutputText$($legend$$22_symbolHeight$$.$getCtx$(), "Test");
    $text$$68_textHeight$$2$$.$setCSSStyle$($DvtLegendRenderer$$.textStyle);
    $text$$68_textHeight$$2$$.$alignMiddle$();
    $text$$68_textHeight$$2$$ = $dvt$$10$$.$TextUtils$.$guessTextDimensions$($text$$68_textHeight$$2$$).$h$;
    $legend$$22_symbolHeight$$ = $DvtLegendRenderer$$.symbolHeight + $DvtLegendDefaults$$.$getGapSize$($legend$$22_symbolHeight$$, $DvtLegendRenderer$$.layout.symbolGapHeight);
    return Math.ceil(Math.max($text$$68_textHeight$$2$$, $legend$$22_symbolHeight$$));
  };
  $DvtLegendRenderer$$.$_createLegendItem$ = function $$DvtLegendRenderer$$$$_createLegendItem$$($legend$$23$$, $container$$144_displayables$$17$$, $item$$32$$, $availSpace$$101_itemRect$$, $DvtLegendAutomation$$, $rowHeight$$6$$) {
    var $hideAndShow$$4_options$$233$$ = $legend$$23$$.$getOptions$(), $context$$274$$ = $legend$$23$$.$getCtx$(), $isRTL$$51$$ = $dvt$$10$$.$Agent$.$isRightToLeft$($context$$274$$), $symbolWidth$$2$$ = $hideAndShow$$4_options$$233$$.symbolWidth, $symbolGap$$3$$ = $DvtLegendDefaults$$.$getGapSize$($legend$$23$$, $hideAndShow$$4_options$$233$$.layout.symbolGapWidth), $symbolX$$ = $isRTL$$51$$ ? $availSpace$$101_itemRect$$.x + $availSpace$$101_itemRect$$.$w$ - $symbolWidth$$2$$ : $availSpace$$101_itemRect$$.x, 
    $textX$$ = $isRTL$$51$$ ? $availSpace$$101_itemRect$$.x + $availSpace$$101_itemRect$$.$w$ - $symbolWidth$$2$$ - $symbolGap$$3$$ : $availSpace$$101_itemRect$$.x + $symbolWidth$$2$$ + $symbolGap$$3$$, $marker$$12$$ = $DvtLegendRenderer$$.$_createLegendSymbol$($legend$$23$$, $symbolX$$, $availSpace$$101_itemRect$$.y, $rowHeight$$6$$, $item$$32$$), $label$$61$$ = $item$$32$$.text, $peer$$28_text$$69$$;
    $label$$61$$ && ($peer$$28_text$$69$$ = $DvtLegendRenderer$$.$_createLegendText$($container$$144_displayables$$17$$, $DvtLegendAutomation$$, $label$$61$$, $hideAndShow$$4_options$$233$$.textStyle)) && ($peer$$28_text$$69$$.$setX$($textX$$), $dvt$$10$$.$TextUtils$.$centerTextVertically$($peer$$28_text$$69$$, $availSpace$$101_itemRect$$.y + $rowHeight$$6$$ / 2), $isRTL$$51$$ && $peer$$28_text$$69$$.$alignRight$());
    $container$$144_displayables$$17$$.$addChild$($marker$$12$$);
    $availSpace$$101_itemRect$$ = new $dvt$$10$$.Rect($context$$274$$, $isRTL$$51$$ ? $textX$$ - $DvtLegendAutomation$$ - $DvtLegendRenderer$$.$_FOCUS_GAP$ : $symbolX$$ - $DvtLegendRenderer$$.$_FOCUS_GAP$, $availSpace$$101_itemRect$$.y - $DvtLegendRenderer$$.$_FOCUS_GAP$, $symbolWidth$$2$$ + $symbolGap$$3$$ + $DvtLegendAutomation$$ + 2 * $DvtLegendRenderer$$.$_FOCUS_GAP$, $rowHeight$$6$$ + 2 * $DvtLegendRenderer$$.$_FOCUS_GAP$);
    $availSpace$$101_itemRect$$.$setInvisibleFill$();
    $hideAndShow$$4_options$$233$$ = $hideAndShow$$4_options$$233$$.hideAndShowBehavior;
    "none" != $hideAndShow$$4_options$$233$$ && "off" != $hideAndShow$$4_options$$233$$ && $availSpace$$101_itemRect$$.setCursor("pointer");
    $container$$144_displayables$$17$$.$addChild$($availSpace$$101_itemRect$$);
    $container$$144_displayables$$17$$ = [$availSpace$$101_itemRect$$, $marker$$12$$];
    null != $peer$$28_text$$69$$ && $container$$144_displayables$$17$$.push($peer$$28_text$$69$$);
    $peer$$28_text$$69$$ = $DvtLegendObjPeer$$.$associate$($container$$144_displayables$$17$$, $legend$$23$$, $item$$32$$, null != $peer$$28_text$$69$$ ? $peer$$28_text$$69$$.$getUntruncatedTextString$() : null, $item$$32$$.shortDesc, $DvtLegendRenderer$$.$_isItemDrillable$($legend$$23$$, $item$$32$$));
    $DvtLegendRenderer$$.$isCategoryHidden$($DvtLegendRenderer$$.$getItemCategory$($item$$32$$), $legend$$23$$) && ($marker$$12$$.$setHollow$($peer$$28_text$$69$$.$getColor$()), $marker$$12$$.$setStyle$().$setClassName$());
    if ("none" != $hideAndShow$$4_options$$233$$ && "off" != $hideAndShow$$4_options$$233$$ || null != $item$$32$$.shortDesc) {
      $availSpace$$101_itemRect$$.$setAriaRole$("img"), $peer$$28_text$$69$$.$updateAriaLabel$();
    }
  };
  $DvtLegendRenderer$$.$_isItemDrillable$ = function $$DvtLegendRenderer$$$$_isItemDrillable$$($dvt$$10$$, $DvtLegendRenderer$$) {
    return "on" == $DvtLegendRenderer$$.drilling ? !0 : "off" == $DvtLegendRenderer$$.drilling ? !1 : "on" == $dvt$$10$$.$getOptions$().drilling;
  };
  $DvtLegendRenderer$$.$_createLegendText$ = function $$DvtLegendRenderer$$$$_createLegendText$$($container$$145$$, $DvtLegendRenderer$$, $label$$62_text$$70$$, $style$$92$$) {
    $label$$62_text$$70$$ = new $dvt$$10$$.$OutputText$($container$$145$$.$getCtx$(), $label$$62_text$$70$$);
    $label$$62_text$$70$$.$setCSSStyle$($style$$92$$);
    return $label$$62_text$$70$$ = $dvt$$10$$.$TextUtils$.$fitText$($label$$62_text$$70$$, $DvtLegendRenderer$$, Infinity, $container$$145$$) ? $label$$62_text$$70$$ : null;
  };
  $DvtLegendRenderer$$.$_createLegendSymbol$ = function $$DvtLegendRenderer$$$$_createLegendSymbol$$($legend$$25$$, $DvtLegendDefaults$$, $y$$156$$, $rowHeight$$7$$, $DvtLegendAutomation$$) {
    var $legendOptions$$6_symbolHeight$$1$$ = $legend$$25$$.$getOptions$(), $context$$275_symbol$$2$$ = $legend$$25$$.$getCtx$(), $symbolType$$ = null != $DvtLegendAutomation$$.type ? $DvtLegendAutomation$$.type : $DvtLegendAutomation$$.symbolType;
    $DvtLegendAutomation$$.markerShape || ($DvtLegendAutomation$$.markerShape = $legendOptions$$6_symbolHeight$$1$$._markerShape);
    $DvtLegendAutomation$$.color || ($DvtLegendAutomation$$.color = $legendOptions$$6_symbolHeight$$1$$._color);
    $DvtLegendAutomation$$.lineWidth || ($DvtLegendAutomation$$.lineWidth = "lineWithMarker" == $symbolType$$ ? $DvtLegendRenderer$$.$_DEFAULT_LINE_WIDTH_WITH_MARKER$ : $legendOptions$$6_symbolHeight$$1$$._lineWidth);
    var $symbolWidth$$3$$ = $legendOptions$$6_symbolHeight$$1$$.symbolWidth, $legendOptions$$6_symbolHeight$$1$$ = $legendOptions$$6_symbolHeight$$1$$.symbolHeight, $cy$$26$$ = $y$$156$$ + $rowHeight$$7$$ / 2, $cx$$25$$ = $DvtLegendDefaults$$ + $symbolWidth$$3$$ / 2;
    "line" == $symbolType$$ ? $context$$275_symbol$$2$$ = $DvtLegendRenderer$$.$_createLine$($context$$275_symbol$$2$$, $DvtLegendDefaults$$, $y$$156$$, $symbolWidth$$3$$, $rowHeight$$7$$, $DvtLegendAutomation$$) : "lineWithMarker" == $symbolType$$ ? ($context$$275_symbol$$2$$ = $DvtLegendRenderer$$.$_createLine$($context$$275_symbol$$2$$, $DvtLegendDefaults$$, $y$$156$$, $symbolWidth$$3$$, $rowHeight$$7$$, $DvtLegendAutomation$$), $DvtLegendRenderer$$.$isCategoryHidden$($DvtLegendRenderer$$.$getItemCategory$($DvtLegendAutomation$$), 
    $legend$$25$$) || $context$$275_symbol$$2$$.$addChild$($DvtLegendRenderer$$.$_createMarker$($legend$$25$$, $cx$$25$$, $cy$$26$$, $symbolWidth$$3$$ * $DvtLegendRenderer$$.$_LINE_MARKER_SIZE_FACTOR$, $legendOptions$$6_symbolHeight$$1$$ * $DvtLegendRenderer$$.$_LINE_MARKER_SIZE_FACTOR$, $DvtLegendAutomation$$))) : "image" == $symbolType$$ ? $context$$275_symbol$$2$$ = $DvtLegendRenderer$$.$_createImage$($legend$$25$$, $DvtLegendDefaults$$, $y$$156$$, $symbolWidth$$3$$, $legendOptions$$6_symbolHeight$$1$$, 
    $rowHeight$$7$$, $DvtLegendAutomation$$) : "_verticalBoxPlot" == $symbolType$$ ? ($legendOptions$$6_symbolHeight$$1$$ = Math.max(4 * Math.round($legendOptions$$6_symbolHeight$$1$$ / 4), 4), $context$$275_symbol$$2$$ = new $dvt$$10$$.$Container$($context$$275_symbol$$2$$), $context$$275_symbol$$2$$.$addChild$($DvtLegendRenderer$$.$_createMarker$($legend$$25$$, $cx$$25$$, $cy$$26$$ + $legendOptions$$6_symbolHeight$$1$$ / 4, $symbolWidth$$3$$, $legendOptions$$6_symbolHeight$$1$$ / 2, $DvtLegendRenderer$$.$_getBoxPlotOptions$($DvtLegendAutomation$$, 
    "q2"))), $context$$275_symbol$$2$$.$addChild$($DvtLegendRenderer$$.$_createMarker$($legend$$25$$, $cx$$25$$, $cy$$26$$ - $legendOptions$$6_symbolHeight$$1$$ / 4, $symbolWidth$$3$$, $legendOptions$$6_symbolHeight$$1$$ / 2, $DvtLegendRenderer$$.$_getBoxPlotOptions$($DvtLegendAutomation$$, "q3")))) : "_horizontalBoxPlot" == $symbolType$$ ? ($DvtLegendDefaults$$ = $dvt$$10$$.$Agent$.$isRightToLeft$($context$$275_symbol$$2$$), $symbolWidth$$3$$ = Math.max(4 * Math.round($symbolWidth$$3$$ / 4), 4), 
    $DvtLegendDefaults$$ = $symbolWidth$$3$$ / 4 * ($DvtLegendDefaults$$ ? 1 : -1), $context$$275_symbol$$2$$ = new $dvt$$10$$.$Container$($context$$275_symbol$$2$$), $context$$275_symbol$$2$$.$addChild$($DvtLegendRenderer$$.$_createMarker$($legend$$25$$, $cx$$25$$ + $DvtLegendDefaults$$, $cy$$26$$, $symbolWidth$$3$$ / 2, $legendOptions$$6_symbolHeight$$1$$, $DvtLegendRenderer$$.$_getBoxPlotOptions$($DvtLegendAutomation$$, "q2"))), $context$$275_symbol$$2$$.$addChild$($DvtLegendRenderer$$.$_createMarker$($legend$$25$$, 
    $cx$$25$$ - $DvtLegendDefaults$$, $cy$$26$$, $symbolWidth$$3$$ / 2, $legendOptions$$6_symbolHeight$$1$$, $DvtLegendRenderer$$.$_getBoxPlotOptions$($DvtLegendAutomation$$, "q3")))) : $context$$275_symbol$$2$$ = $DvtLegendRenderer$$.$_createMarker$($legend$$25$$, $cx$$25$$, $cy$$26$$, $symbolWidth$$3$$, $legendOptions$$6_symbolHeight$$1$$, $DvtLegendAutomation$$);
    return $context$$275_symbol$$2$$;
  };
  $DvtLegendRenderer$$.$_createImage$ = function $$DvtLegendRenderer$$$$_createImage$$($legend$$26$$, $DvtLegendRenderer$$, $y$$157$$, $symbolWidth$$4$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$, $item$$35$$) {
    return new $dvt$$10$$.$ImageMarker$($legend$$26$$.$getCtx$(), $DvtLegendRenderer$$ + $symbolWidth$$4$$ / 2, $y$$157$$ + $DvtLegendAutomation$$ / 2, $symbolWidth$$4$$, $DvtLegendDefaults$$, null, $item$$35$$.source);
  };
  $DvtLegendRenderer$$.$_createMarker$ = function $$DvtLegendRenderer$$$$_createMarker$$($legend$$27_shape$$64$$, $DvtLegendRenderer$$, $cy$$27$$, $legendMarker_symbolWidth$$5$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$) {
    var $context$$277$$ = $legend$$27_shape$$64$$.$getCtx$(), $legendOptions$$7$$ = $legend$$27_shape$$64$$.$getOptions$();
    $legend$$27_shape$$64$$ = $DvtLegendAutomation$$.markerShape;
    var $color$$47$$ = $DvtLegendAutomation$$.markerColor ? $DvtLegendAutomation$$.markerColor : $DvtLegendAutomation$$.color, $style$$93$$ = $DvtLegendAutomation$$.markerStyle || $DvtLegendAutomation$$.markerSvgStyle ? $DvtLegendAutomation$$.markerStyle || $DvtLegendAutomation$$.markerSvgStyle : $DvtLegendAutomation$$.style || $DvtLegendAutomation$$.svgStyle, $className$$21$$ = $DvtLegendAutomation$$.markerClassName || $DvtLegendAutomation$$.markerSvgClassName ? $DvtLegendAutomation$$.markerClassName || 
    $DvtLegendAutomation$$.markerSvgClassName : $DvtLegendAutomation$$.className || $DvtLegendAutomation$$.svgClassName, $pattern$$7$$ = $DvtLegendAutomation$$.pattern;
    $pattern$$7$$ && "none" != $pattern$$7$$ ? ($legendMarker_symbolWidth$$5$$ = new $dvt$$10$$.$SimpleMarker$($context$$277$$, $legend$$27_shape$$64$$, $legendOptions$$7$$.skin, 0, 0, $legendMarker_symbolWidth$$5$$, $DvtLegendDefaults$$, null, null, !0), $legendMarker_symbolWidth$$5$$.$setFill$(new $dvt$$10$$.$PatternFill$($pattern$$7$$, $color$$47$$, "#FFFFFF")), $legendMarker_symbolWidth$$5$$.$setTranslate$($DvtLegendRenderer$$, $cy$$27$$)) : ($legendMarker_symbolWidth$$5$$ = new $dvt$$10$$.$SimpleMarker$($context$$277$$, 
    $legend$$27_shape$$64$$, $legendOptions$$7$$.skin, $DvtLegendRenderer$$, $cy$$27$$, $legendMarker_symbolWidth$$5$$, $DvtLegendDefaults$$, null, null, !0), $legendMarker_symbolWidth$$5$$.$setSolidFill$($color$$47$$));
    $DvtLegendAutomation$$.borderColor && $legendMarker_symbolWidth$$5$$.$setSolidStroke$($DvtLegendAutomation$$.borderColor, null, $DvtLegendAutomation$$._borderWidth ? $DvtLegendAutomation$$._borderWidth : 1);
    "square" != $legend$$27_shape$$64$$ && "rectangle" != $legend$$27_shape$$64$$ || $legendMarker_symbolWidth$$5$$.$setPixelHinting$();
    $legendMarker_symbolWidth$$5$$.$setClassName$($className$$21$$).$setStyle$($style$$93$$);
    return $legendMarker_symbolWidth$$5$$;
  };
  $DvtLegendRenderer$$.$_createLine$ = function $$DvtLegendRenderer$$$$_createLine$$($context$$278_line$$17$$, $DvtLegendRenderer$$, $lineY_y$$158$$, $colWidth$$3_style$$94$$, $DvtLegendDefaults$$, $DvtLegendAutomation$$) {
    $lineY_y$$158$$ += $DvtLegendDefaults$$ / 2;
    $context$$278_line$$17$$ = new $dvt$$10$$.$Line$($context$$278_line$$17$$, $DvtLegendRenderer$$, $lineY_y$$158$$, $DvtLegendRenderer$$ + $colWidth$$3_style$$94$$, $lineY_y$$158$$);
    $DvtLegendRenderer$$ = new $dvt$$10$$.$SolidStroke$($DvtLegendAutomation$$.color, 1, $DvtLegendAutomation$$.lineWidth);
    $colWidth$$3_style$$94$$ = $DvtLegendAutomation$$.lineStyle;
    "dashed" == $colWidth$$3_style$$94$$ ? $DvtLegendRenderer$$.$setType$($dvt$$10$$.$Stroke$.$convertTypeString$($colWidth$$3_style$$94$$), "4,2,4") : "dotted" == $colWidth$$3_style$$94$$ && $DvtLegendRenderer$$.$setType$($dvt$$10$$.$Stroke$.$convertTypeString$($colWidth$$3_style$$94$$), "2");
    $context$$278_line$$17$$.$setClassName$($DvtLegendAutomation$$.className || $DvtLegendAutomation$$.svgClassName).$setStyle$($DvtLegendAutomation$$.style || $DvtLegendAutomation$$.svgStyle);
    $context$$278_line$$17$$.$setStroke$($DvtLegendRenderer$$);
    $context$$278_line$$17$$.$setPixelHinting$();
    return $context$$278_line$$17$$;
  };
  $DvtLegendRenderer$$.$_getBoxPlotOptions$ = function $$DvtLegendRenderer$$$$_getBoxPlotOptions$$($dvt$$10$$, $DvtLegendRenderer$$) {
    return {markerShape:"rectangle", color:$dvt$$10$$._boxPlot[$DvtLegendRenderer$$ + "Color"], pattern:$dvt$$10$$._boxPlot["_" + $DvtLegendRenderer$$ + "Pattern"], className:$dvt$$10$$._boxPlot[$DvtLegendRenderer$$ + "ClassName"] || $dvt$$10$$._boxPlot[$DvtLegendRenderer$$ + "svgClassName"], style:$dvt$$10$$._boxPlot[$DvtLegendRenderer$$ + "Style"] || $dvt$$10$$._boxPlot[$DvtLegendRenderer$$ + "svgStyle"]};
  };
  $DvtLegendRenderer$$.$getItemCategory$ = function $$DvtLegendRenderer$$$$getItemCategory$$($dvt$$10$$) {
    var $DvtLegendRenderer$$ = null;
    return $DvtLegendRenderer$$ = $dvt$$10$$.categories && 0 < $dvt$$10$$.categories.length ? $dvt$$10$$.categories[0] : $dvt$$10$$.id ? $dvt$$10$$.id : $dvt$$10$$.text;
  };
  $DvtLegendRenderer$$.$isCategoryHidden$ = function $$DvtLegendRenderer$$$$isCategoryHidden$$($category$$17$$, $DvtLegendRenderer$$) {
    var $hiddenCategories$$10$$ = $DvtLegendRenderer$$.$getOptions$().hiddenCategories;
    return !$hiddenCategories$$10$$ || 0 >= $hiddenCategories$$10$$.length ? !1 : -1 !== $dvt$$10$$.$ArrayUtils$.$getIndex$($hiddenCategories$$10$$, $category$$17$$);
  };
  $dvt$$10$$.$exportProperty$($dvt$$10$$, "Legend", $dvt$$10$$.$Legend$);
  $dvt$$10$$.$exportProperty$($dvt$$10$$.$Legend$, "newInstance", $dvt$$10$$.$Legend$.newInstance);
  $dvt$$10$$.$exportProperty$($dvt$$10$$.$Legend$.prototype, "destroy", $dvt$$10$$.$Legend$.prototype.$destroy$);
  $dvt$$10$$.$exportProperty$($dvt$$10$$.$Legend$.prototype, "getAutomation", $dvt$$10$$.$Legend$.prototype.$getAutomation$);
  $dvt$$10$$.$exportProperty$($dvt$$10$$.$Legend$.prototype, "getPreferredSize", $dvt$$10$$.$Legend$.prototype.$getPreferredSize$);
  $dvt$$10$$.$exportProperty$($dvt$$10$$.$Legend$.prototype, "highlight", $dvt$$10$$.$Legend$.prototype.$highlight$);
  $dvt$$10$$.$exportProperty$($dvt$$10$$.$Legend$.prototype, "render", $dvt$$10$$.$Legend$.prototype.$render$);
  $dvt$$10$$.$exportProperty$($DvtLegendAutomation$$.prototype, "getDomElementForSubId", $DvtLegendAutomation$$.prototype.$getDomElementForSubId$);
  $dvt$$10$$.$exportProperty$($DvtLegendAutomation$$.prototype, "getItem", $DvtLegendAutomation$$.prototype.getItem);
  $dvt$$10$$.$exportProperty$($DvtLegendAutomation$$.prototype, "getSection", $DvtLegendAutomation$$.prototype.$getSection$);
  $dvt$$10$$.$exportProperty$($DvtLegendAutomation$$.prototype, "getTitle", $DvtLegendAutomation$$.prototype.$getTitle$);
})(dvt);
