var $AdfDhtmlChooseColorBasePeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlChooseColorBasePeer");
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer", $AdfDhtmlChooseColorBasePeer$$);
$AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$ = "lastUsedColor";
$AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$ = "colorValue";
$AdfDhtmlChooseColorBasePeer$$.prototype.$handleUpdateFromInputComponent$ = function $$AdfDhtmlChooseColorBasePeer$$$$$handleUpdateFromInputComponent$$($chooseComponent$$, $propertyName$$40$$, $newValue$$41$$) {
  $chooseComponent$$.setProperty($propertyName$$40$$, $newValue$$41$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.handleUpdateFromInputComponent", {$handleUpdateFromInputComponent$:$AdfDhtmlChooseColorBasePeer$$.prototype.$handleUpdateFromInputComponent$});
$AdfDhtmlChooseColorBasePeer$$.$InitSubclass$ = function $$AdfDhtmlChooseColorBasePeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$(AdfRichChooseColor);
  $AdfObject$$.$ensureClassInitialization$(AdfRichInputColor);
  $AdfObject$$.$ensureClassInitialization$(AdfUIValue);
  $AdfObject$$.$ensureClassInitialization$($AdfDhtmlInputColorPeer$$);
  this.$_colorFormat$ = new TrColorConverter(["#RRGGBB"], !0);
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_DOWN_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_UP_EVENT_TYPE$, $AdfDialogEvent$$.$EVENT_TYPE$);
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, $AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, AdfRichChooseColor.DEFAULT_COLOR, AdfRichChooseColor.CUSTOM_COLOR_DATA);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichChooseColor.CUSTOM_COLOR_DATA, AdfRichChooseColor.COLOR_DATA, AdfRichChooseColor.WIDTH, $AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, AdfRichChooseColor.DEFAULT_COLOR);
  this.$_SWATCH_EXPANDO$ = "_adfSw";
  this.$_BUTTON_EXPANDO$ = "_adfSwBtn";
  this.$_COLOR_VALUE_EXPANDO$ = "_adfClr";
  this.$_LAST_USED_COLOR_BTN$ = "LucBtn";
  this.$_DEFAULT_COLOR_BTN$ = "DfcBtn";
  this.$_CUSTOM_COLOR_BTN$ = "cstcBtn";
  this.$_CUSTOM_ROW_ID$ = "ccRow";
  this.$_CUSTOM_PANEL_WRAPPER_ID$ = "ccWrap";
  this.$_CUSTOM_PANEL$ = "ccPnl";
  this.$_CUSTOM_DLG_DRAG_ID$ = "tb";
  this.$_SELECTION_UNKNOWN$ = 0;
  this.$_SELECTION_OLD_SWATCH_KNOWN$ = 1;
  this.$_SELECTION_NEW_SWATCH_KNOWN$ = 2;
  this.$_SELECTION_SWATCHES_KNOWN$ = 3;
  this.$_SELECTION_PROCESSED$ = 4;
  this.$_prevSwatchSelectionMap$ = {};
  this.$_curSwatchSelectionMap$ = {};
  this.$_selectionStateMap$ = {};
  this.$_STANDARD_SWATCH_TABLE_ID$ = "stdTbl";
  this.$_initCustomPanelHandlerClass$();
};
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer.InitSubclass", $AdfDhtmlChooseColorBasePeer$$.$InitSubclass$);
$AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$ = function $$AdfDhtmlChooseColorBasePeer$$$$_convertToColorString$$($colorObj$$) {
  return null == $colorObj$$ ? null : this.$_colorFormat$.getAsString($colorObj$$);
};
$AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$ = function $$AdfDhtmlChooseColorBasePeer$$$$_convertToColorObj$$($colorString$$) {
  return null == $colorString$$ ? null : this.$_colorFormat$.getAsObject($colorString$$);
};
$AdfDhtmlChooseColorBasePeer$$.$parse0To255$ = function $$AdfDhtmlChooseColorBasePeer$$$$parse0To255$$($result$$16_str$$13$$) {
  $AdfAssert$$.$assertString$($result$$16_str$$13$$);
  for (var $charCount$$ = $result$$16_str$$13$$.length, $i$$269$$ = 0;$i$$269$$ < $charCount$$;$i$$269$$++) {
    if (-1 == "0123456789".indexOf($result$$16_str$$13$$.charAt($i$$269$$))) {
      return null;
    }
  }
  $result$$16_str$$13$$ = parseInt($result$$16_str$$13$$);
  return !isNaN($result$$16_str$$13$$) && 0 <= $result$$16_str$$13$$ && 255 >= $result$$16_str$$13$$ ? $result$$16_str$$13$$ : null;
};
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer.parse0To255", $AdfDhtmlChooseColorBasePeer$$.$parse0To255$);
$AdfDhtmlChooseColorBasePeer$$.$parseHexColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$parseHexColor$$($str$$14$$) {
  $AdfAssert$$.$assertString$($str$$14$$);
  var $returnValue$$3$$ = $str$$14$$;
  if (6 != $str$$14$$.length) {
    $returnValue$$3$$ = null;
  } else {
    for (var $i$$270$$ = 0;6 > $i$$270$$;$i$$270$$++) {
      if (-1 == "0123456789ABCDEFabcdef".indexOf($str$$14$$.charAt($i$$270$$))) {
        $returnValue$$3$$ = null;
        break;
      }
    }
  }
  null != $returnValue$$3$$ && ($returnValue$$3$$ = parseInt($str$$14$$, 16));
  return $returnValue$$3$$;
};
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer.parseHexColor", $AdfDhtmlChooseColorBasePeer$$.$parseHexColor$);
$AdfDhtmlChooseColorBasePeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlChooseColorBasePeer$$$$$InitDomElement$$($component$$806$$, $domElement$$99$$) {
  $AdfDhtmlChooseColorBasePeer$$.$superclass$.$InitDomElement$.call(this, $component$$806$$, $domElement$$99$$);
  var $inputColor$$ = $AdfDhtmlInputChooseBindingUtils$$.$getInputComponent$($component$$806$$.$getClientId$());
  null != $inputColor$$ && $inputColor$$.$getPeer$().$initChooseComponentValue$($inputColor$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlChooseColorBasePeer$$.prototype.$InitDomElement$});
function $JSCompiler_StaticMethods__getColorFromSwatch$$($color$$2_swatch$$) {
  $color$$2_swatch$$ = $color$$2_swatch$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$);
  return null != $color$$2_swatch$$ && "No Color" != $color$$2_swatch$$ ? $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$($color$$2_swatch$$) : null;
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentLastUsedColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentLastUsedColor$$($buttonSwatchId_colorString$$1_component$$807_element$$215$$) {
  $buttonSwatchId_colorString$$1_component$$807_element$$215$$ = $AdfRichUIPeer$$.$CreateSubId$($buttonSwatchId_colorString$$1_component$$807_element$$215$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_LAST_USED_COLOR_BTN$);
  if ($buttonSwatchId_colorString$$1_component$$807_element$$215$$ = $AdfAgent$$.$AGENT$.getElementById($buttonSwatchId_colorString$$1_component$$807_element$$215$$)) {
    return $buttonSwatchId_colorString$$1_component$$807_element$$215$$ = $buttonSwatchId_colorString$$1_component$$807_element$$215$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$), $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$($buttonSwatchId_colorString$$1_component$$807_element$$215$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentLastUsedColor", {$GetComponentLastUsedColor$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentLastUsedColor$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentDefaultColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentDefaultColor$$($buttonSwatchId$$1_colorString$$2_component$$808$$) {
  $buttonSwatchId$$1_colorString$$2_component$$808$$ = $AdfRichUIPeer$$.$CreateSubId$($buttonSwatchId$$1_colorString$$2_component$$808$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_DEFAULT_COLOR_BTN$);
  $buttonSwatchId$$1_colorString$$2_component$$808$$ = $AdfAgent$$.$AGENT$.getElementById($buttonSwatchId$$1_colorString$$2_component$$808$$).getAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$);
  return $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$($buttonSwatchId$$1_colorString$$2_component$$808$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentDefaultColor", {$GetComponentDefaultColor$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentDefaultColor$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentWidth$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentWidth$$($component$$809$$) {
  return $JSCompiler_StaticMethods__getSwatchRows$$($component$$809$$).length;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentWidth", {$GetComponentWidth$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentWidth$});
function $JSCompiler_StaticMethods__getSwatchRows$$($agent$$235_component$$810$$) {
  var $swatchTableId_tableElement$$4$$ = $AdfRichUIPeer$$.$CreateSubId$($agent$$235_component$$810$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_STANDARD_SWATCH_TABLE_ID$);
  $agent$$235_component$$810$$ = $AdfAgent$$.$AGENT$;
  $swatchTableId_tableElement$$4$$ = $agent$$235_component$$810$$.getElementById($swatchTableId_tableElement$$4$$);
  return $agent$$235_component$$810$$.$getTableRows$($swatchTableId_tableElement$$4$$);
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentColorData$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentColorData$$($component$$811_rows$$11$$) {
  $component$$811_rows$$11$$ = $JSCompiler_StaticMethods__getSwatchRows$$($component$$811_rows$$11$$);
  for (var $rowsLength$$ = $component$$811_rows$$11$$.length, $colorArray$$ = [], $rowColorArray$$ = null, $i$$271$$ = 0;$i$$271$$ < $rowsLength$$;$i$$271$$++) {
    $rowColorArray$$ = $JSCompiler_StaticMethods__getColorArrayFromSwatchRow$$($component$$811_rows$$11$$[$i$$271$$]), $colorArray$$ = $colorArray$$.concat($rowColorArray$$);
  }
  return $colorArray$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentColorData", {$GetComponentColorData$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentColorData$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentCustomColorData$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentCustomColorData$$($component$$812_customRowId_rowElement$$) {
  $component$$812_customRowId_rowElement$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$812_customRowId_rowElement$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_ROW_ID$);
  if ($component$$812_customRowId_rowElement$$ = $AdfAgent$$.$AGENT$.getElementById($component$$812_customRowId_rowElement$$)) {
    return $JSCompiler_StaticMethods__getColorArrayFromSwatchRow$$($component$$812_customRowId_rowElement$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentCustomColorData", {$GetComponentCustomColorData$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentCustomColorData$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentCustomColorDataChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentCustomColorDataChanged$$($component$$815$$, $customColorRowId_domElement$$106_rowElement$$inline_1619$$, $newValue$$42$$) {
  $customColorRowId_domElement$$106_rowElement$$inline_1619$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$815$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_ROW_ID$);
  $customColorRowId_domElement$$106_rowElement$$inline_1619$$ = $AdfAgent$$.$AGENT$.getElementById($customColorRowId_domElement$$106_rowElement$$inline_1619$$);
  var $colorArray$$inline_1620$$ = $newValue$$42$$, $rowChildrenArray$$inline_1621$$ = $customColorRowId_domElement$$106_rowElement$$inline_1619$$.childNodes, $length$$inline_1622$$ = $rowChildrenArray$$inline_1621$$.length, $childElement$$inline_1623$$ = null, $swatch$$inline_1624$$ = null, $agent$$inline_1625$$ = $AdfAgent$$.$AGENT$, $color$$inline_1626$$ = null, $colorIndex$$inline_1627$$ = 0;
  $agent$$inline_1625$$.$elementsRemoved$($customColorRowId_domElement$$106_rowElement$$inline_1619$$);
  null == $colorArray$$inline_1620$$ && ($colorArray$$inline_1620$$ = []);
  for (var $i$$inline_1628$$ = 0;$i$$inline_1628$$ < $length$$inline_1622$$;$i$$inline_1628$$++) {
    if ($childElement$$inline_1623$$ = $rowChildrenArray$$inline_1621$$[$i$$inline_1628$$], "TD" == $agent$$inline_1625$$.$getNodeName$($childElement$$inline_1623$$)) {
      if ($swatch$$inline_1624$$ = $childElement$$inline_1623$$.firstChild, $color$$inline_1626$$ = $colorArray$$inline_1620$$[$colorIndex$$inline_1627$$], $colorIndex$$inline_1627$$++, $AdfDomUtils$$.$removeCSSClassName$($swatch$$inline_1624$$, "p_AFTransparent"), null != $color$$inline_1626$$) {
        var $colorString$$inline_1629$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($color$$inline_1626$$);
        $swatch$$inline_1624$$.setAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$, $colorString$$inline_1629$$);
        $swatch$$inline_1624$$.style.backgroundColor = $colorString$$inline_1629$$;
        null != $colorString$$inline_1629$$ && ($colorString$$inline_1629$$ = $colorString$$inline_1629$$.substring(1));
        $colorString$$inline_1629$$ += " / " + $color$$inline_1626$$.red + "," + $color$$inline_1626$$.green + "," + $color$$inline_1626$$.blue;
        $swatch$$inline_1624$$.setAttribute("alt", $colorString$$inline_1629$$);
        $swatch$$inline_1624$$.setAttribute("title", $colorString$$inline_1629$$);
        $AdfDomUtils$$.$removeCSSClassName$($childElement$$inline_1623$$, "p_AFDisabled");
      } else {
        $AdfDomUtils$$.$addCSSClassName$($swatch$$inline_1624$$, "p_AFTransparent");
      }
    }
  }
  $agent$$inline_1625$$.$elementsAdded$($customColorRowId_domElement$$106_rowElement$$inline_1619$$);
  $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$815$$, AdfRichChooseColor.CUSTOM_COLOR_DATA, AdfRichInputColor.CUSTOM_COLOR_DATA, $newValue$$42$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentCustomColorDataChanged", {$ComponentCustomColorDataChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentCustomColorDataChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentColorValueChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentColorValueChanged$$($component$$816$$, $clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$, $newSelectNode$$inline_1640_newValue$$43$$, $colorCount$$inline_1636_oldValue$$26$$) {
  var $clientId$$160_newCustomColorData$$inline_1637$$ = $component$$816$$.$getClientId$(), $oldSelectNode$$inline_1641_oldSelectedSwatch$$ = null, $newSelectedSwatch$$ = null;
  switch($JSCompiler_StaticMethods__getSelectionState$$($clientId$$160_newCustomColorData$$inline_1637$$)) {
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_OLD_SWATCH_KNOWN$:
      $oldSelectNode$$inline_1641_oldSelectedSwatch$$ = $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$160_newCustomColorData$$inline_1637$$];
      $newSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$816$$, $newSelectNode$$inline_1640_newValue$$43$$, !1);
      break;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_NEW_SWATCH_KNOWN$:
      $oldSelectNode$$inline_1641_oldSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$816$$, $colorCount$$inline_1636_oldValue$$26$$, !1);
      $newSelectedSwatch$$ = this.$_getCurrentSelection$($clientId$$160_newCustomColorData$$inline_1637$$);
      break;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_UNKNOWN$:
    ;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_PROCESSED$:
      $oldSelectNode$$inline_1641_oldSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$816$$, $colorCount$$inline_1636_oldValue$$26$$, !0);
      $newSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$816$$, $newSelectNode$$inline_1640_newValue$$43$$, !1);
      break;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_SWATCHES_KNOWN$:
      $oldSelectNode$$inline_1641_oldSelectedSwatch$$ = $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$160_newCustomColorData$$inline_1637$$], $newSelectedSwatch$$ = this.$_getCurrentSelection$($clientId$$160_newCustomColorData$$inline_1637$$);
  }
  if (null == $newSelectedSwatch$$ && null != $newSelectNode$$inline_1640_newValue$$43$$) {
    if ($clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$ = this.$GetComponentCustomColorData$($component$$816$$, $clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$)) {
      $colorCount$$inline_1636_oldValue$$26$$ = $clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$.length;
      $clientId$$160_newCustomColorData$$inline_1637$$ = null;
      if (null != $clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$[$colorCount$$inline_1636_oldValue$$26$$ - 1]) {
        $clientId$$160_newCustomColorData$$inline_1637$$ = $clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$.slice(), $clientId$$160_newCustomColorData$$inline_1637$$.splice(0, 1), $clientId$$160_newCustomColorData$$inline_1637$$[$colorCount$$inline_1636_oldValue$$26$$ - 1] = $newSelectNode$$inline_1640_newValue$$43$$;
      } else {
        for ($clientId$$160_newCustomColorData$$inline_1637$$ = $clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$.slice(), i = 0;i < $colorCount$$inline_1636_oldValue$$26$$;i++) {
          if (null == $clientId$$160_newCustomColorData$$inline_1637$$[i]) {
            $clientId$$160_newCustomColorData$$inline_1637$$[i] = $newSelectNode$$inline_1640_newValue$$43$$;
            break;
          }
        }
      }
      $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$816$$, AdfRichChooseColor.CUSTOM_COLOR_DATA, AdfRichInputColor.CUSTOM_COLOR_DATA, $clientId$$160_newCustomColorData$$inline_1637$$);
      $component$$816$$.setProperty(AdfRichChooseColor.CUSTOM_COLOR_DATA, $clientId$$160_newCustomColorData$$inline_1637$$);
    }
    $newSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$816$$, $newSelectNode$$inline_1640_newValue$$43$$, !1);
  }
  $newSelectNode$$inline_1640_newValue$$43$$ = $newSelectedSwatch$$;
  $oldSelectNode$$inline_1641_oldSelectedSwatch$$ != $newSelectNode$$inline_1640_newValue$$43$$ && ($clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$ = this.$getComponent$().$getClientId$(), null != $oldSelectNode$$inline_1641_oldSelectedSwatch$$ && null != $oldSelectNode$$inline_1641_oldSelectedSwatch$$.parentNode && $AdfDomUtils$$.$removeCSSClassName$($oldSelectNode$$inline_1641_oldSelectedSwatch$$.parentNode, "p_AFSelected"), $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$] = 
  $oldSelectNode$$inline_1641_oldSelectedSwatch$$, null != $newSelectNode$$inline_1640_newValue$$43$$ && $AdfDomUtils$$.$addCSSClassName$($newSelectNode$$inline_1640_newValue$$43$$.parentNode, "p_AFSelected"), $AdfDhtmlChooseColorBasePeer$$.$_curSwatchSelectionMap$[$clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$] = $newSelectNode$$inline_1640_newValue$$43$$, $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$inline_1642_customColors$$inline_1635_domElement$$107$$] = 
  $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_PROCESSED$);
  $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$816$$, $AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, AdfUIValue.VALUE);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentColorValueChanged", {$ComponentColorValueChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentColorValueChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentLastUsedColorChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentLastUsedColorChanged$$($component$$817$$, $buttonSwatchId$$2_domElement$$108$$, $newValue$$44$$) {
  if ($buttonSwatchId$$2_domElement$$108$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$817$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_LAST_USED_COLOR_BTN$)) {
    $JSCompiler_StaticMethods__updateButtonSwatch$$($buttonSwatchId$$2_domElement$$108$$, $newValue$$44$$), $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$817$$, $AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, $AdfDhtmlInputColorPeer$$.$__LAST_USED_COLOR$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentLastUsedColorChanged", {$ComponentLastUsedColorChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentLastUsedColorChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentDefaultColorChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentDefaultColorChanged$$($buttonSwatchId$$3_component$$818$$, $domElement$$109$$, $newValue$$45$$) {
  $buttonSwatchId$$3_component$$818$$ = $AdfRichUIPeer$$.$CreateSubId$($buttonSwatchId$$3_component$$818$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_DEFAULT_COLOR_BTN$);
  $JSCompiler_StaticMethods__updateButtonSwatch$$($buttonSwatchId$$3_component$$818$$, $newValue$$45$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentDefaultColorChanged", {$ComponentDefaultColorChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentDefaultColorChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentClick$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentClick$$($componentEvent$$135$$) {
  var $component$$819$$ = $componentEvent$$135$$.getSource(), $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $componentEvent$$135$$.$getNativeEventTarget$(), $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$ = $AdfAgent$$.$AGENT$;
  if (null != this.$_customPanelHandler$) {
    $componentEvent$$135$$.cancel();
  } else {
    var $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1646$$ = $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$;
    "TD" == $AdfAgent$$.$AGENT$.$getNodeName$($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$) && ($oldSelectedSwatch$$1_selectionState_targetElement$$inline_1646$$ = $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.firstChild);
    $JSCompiler_StaticMethods__isSwatch$$($oldSelectedSwatch$$1_selectionState_targetElement$$inline_1646$$) ? ($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = "TD" == $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$.$getNodeName$($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$) ? $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.firstChild : 
    $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$ = $component$$819$$.$getClientId$(), $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1646$$ = this.$_getCurrentSelection$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$), $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$] = 
    $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1646$$, $AdfDhtmlChooseColorBasePeer$$.$_curSwatchSelectionMap$[$agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$] = $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1646$$ = $JSCompiler_StaticMethods__getSelectionState$$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$), 
    $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$] = $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1646$$ != $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_UNKNOWN$ ? $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_SWATCHES_KNOWN$ : $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_NEW_SWATCH_KNOWN$, $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $JSCompiler_StaticMethods__getColorFromSwatch$$($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$), 
    $component$$819$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, !0), $component$$819$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, $AdfUIComponent$$.$PROPAGATE_LOCALLY$), $componentEvent$$135$$.cancel(), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$819$$, 
    !0)) : null != $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_BUTTON_EXPANDO$) && ($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_BUTTON_EXPANDO$), $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ == 
    $AdfDhtmlChooseColorBasePeer$$.$_LAST_USED_COLOR_BTN$ ? ($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $component$$819$$.$getProperty$($AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$), $component$$819$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, !0), $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$819$$, 
    $AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, AdfUIValue.VALUE), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$819$$)) : $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ == $AdfDhtmlChooseColorBasePeer$$.$_DEFAULT_COLOR_BTN$ ? ($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $component$$819$$.$getProperty$(AdfRichChooseColor.DEFAULT_COLOR), $component$$819$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, 
    $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, !0), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$819$$)) : $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ == $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_COLOR_BTN$ && ($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $JSCompiler_StaticMethods__getCustomPanelId$$($component$$819$$), 
    $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$ = $component$$819$$.$getProperty$($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$), null == this.$_customPanelHandler$ && (this.$_customPanelHandler$ = new $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$, $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, this)), 
    $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$ = $JSCompiler_StaticMethods__getCustomPanelId$$($component$$819$$), $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $AdfAgent$$.$AGENT$.getElementById($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$), $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$ = $AdfRichUIPeer$$.$CreateSubId$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$, 
    $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_DLG_DRAG_ID$), $AdfAgent$$.$AGENT$.getElementById($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1650_dragElementId$$inline_1652$$), $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.parentNode.removeChild($buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$), this.$showPopup$($component$$819$$, $buttonExpando_contentDom$$inline_1651_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, 
    null, $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$), this.$_customPanelHandler$.$updateDisplay$(), this.$_customPanelHandler$.$updateOldColorSwatch$()), $componentEvent$$135$$.cancel());
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentClick", {$HandleComponentClick$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentClick$});
function $JSCompiler_StaticMethods__getCustomPanelId$$($component$$820$$) {
  return "old" == $AdfPage$$.$PAGE$.$getLookAndFeel$().$getSkinProperty$("af|dialog-tr-button-type") ? $AdfRichUIPeer$$.$CreateSubId$($component$$820$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$) : "AdfRichPopup" == $component$$820$$.getParent().getTypeName() ? $component$$820$$.getParent().getParent().$getClientId$() + "_" + $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$ : $component$$820$$.$getClientId$() + "_" + $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$;
}
function $JSCompiler_StaticMethods__isSwatch$$($element$$218$$) {
  return $element$$218$$ && $element$$218$$.attributes && null != $element$$218$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$);
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$_handleArrowKeys$ = function $$AdfDhtmlChooseColorBasePeer$$$$$_handleArrowKeys$$($element$$219$$, $key$$66$$) {
  var $targetElement$$28$$, $nexRow_pos$$19_prevRow$$3$$;
  switch($key$$66$$) {
    case $AdfKeyStroke$$.$ARROWUP_KEY$:
    ;
    case $AdfKeyStroke$$.$ARROWDOWN_KEY$:
      if ($targetElement$$28$$ = $key$$66$$ == $AdfKeyStroke$$.$ARROWUP_KEY$ ? $AdfDomUtils$$.$getPreviousElement$($element$$219$$.parentNode) : $AdfDomUtils$$.$getNextElement$($element$$219$$.parentNode)) {
        $nexRow_pos$$19_prevRow$$3$$ = $AdfDomUtils$$.$getElementPosition$($element$$219$$), $targetElement$$28$$ = $AdfDomUtils$$.$getChildElementByPosition$($targetElement$$28$$, $element$$219$$.nodeType, $nexRow_pos$$19_prevRow$$3$$);
      }
      break;
    case $AdfKeyStroke$$.$ARROWRIGHT_KEY$:
      $targetElement$$28$$ = $AdfDomUtils$$.$getNextElement$($element$$219$$);
      $targetElement$$28$$ || null == $element$$219$$.parentNode || ($nexRow_pos$$19_prevRow$$3$$ = $AdfDomUtils$$.$getNextElement$($element$$219$$.parentNode)) && ($targetElement$$28$$ = $AdfDomUtils$$.$getFirstChildElement$($nexRow_pos$$19_prevRow$$3$$));
      $targetElement$$28$$ && $AdfDomUtils$$.$containsCSSClassName$($targetElement$$28$$, "p_AFDisabled") && ($targetElement$$28$$ = null);
      break;
    case $AdfKeyStroke$$.$ARROWLEFT_KEY$:
      $targetElement$$28$$ = $AdfDomUtils$$.$getPreviousElement$($element$$219$$), $targetElement$$28$$ || null == $element$$219$$.parentNode || ($nexRow_pos$$19_prevRow$$3$$ = $AdfDomUtils$$.$getPreviousElement$($element$$219$$.parentNode)) && ($targetElement$$28$$ = $AdfDomUtils$$.$getLastChildElement$($nexRow_pos$$19_prevRow$$3$$));
  }
  $targetElement$$28$$ && ($element$$219$$ && $element$$219$$.setAttribute("tabIndex", "-1"), $targetElement$$28$$.setAttribute("tabIndex", "0"), $AdfFocusUtils$$.$focusElement$($targetElement$$28$$));
};
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentKeyDown$$($componentEvent$$136$$) {
  this.$getComponent$();
  var $agent$$238_keyCode$$46$$ = $AdfAgent$$.$AGENT$, $eventTarget$$49_evt$$89$$ = $componentEvent$$136$$.$getNativeEvent$(), $agent$$238_keyCode$$46$$ = $agent$$238_keyCode$$46$$.$getKeyCode$($eventTarget$$49_evt$$89$$);
  if (!$eventTarget$$49_evt$$89$$.ctrlKey) {
    switch($agent$$238_keyCode$$46$$) {
      case $AdfKeyStroke$$.$ARROWUP_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWDOWN_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWRIGHT_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWLEFT_KEY$:
        return $eventTarget$$49_evt$$89$$ = $componentEvent$$136$$.$getNativeEventTarget$(), null != this.$_customPanelHandler$ ? this.$_customPanelHandler$.$_handleArrowKeys$($eventTarget$$49_evt$$89$$, $agent$$238_keyCode$$46$$) : $JSCompiler_StaticMethods__isSwatch$$($eventTarget$$49_evt$$89$$.firstChild) && this.$_handleArrowKeys$($eventTarget$$49_evt$$89$$, $agent$$238_keyCode$$46$$), $componentEvent$$136$$.cancel(), !1;
    }
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentKeyDown", {$HandleComponentKeyDown$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyDown$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyUp$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentKeyUp$$($componentEvent$$137$$) {
  var $component$$822$$ = this.$getComponent$(), $agent$$239_keyCode$$47$$ = $AdfAgent$$.$AGENT$, $element$$220_evt$$90_newValue$$47$$ = $componentEvent$$137$$.$getNativeEvent$(), $agent$$239_keyCode$$47$$ = $agent$$239_keyCode$$47$$.$getKeyCode$($element$$220_evt$$90_newValue$$47$$);
  if (!$element$$220_evt$$90_newValue$$47$$.ctrlKey) {
    switch($agent$$239_keyCode$$47$$) {
      case $AdfKeyStroke$$.$ENTER_KEY$:
      ;
      case $AdfKeyStroke$$.$SPACE_KEY$:
        $element$$220_evt$$90_newValue$$47$$ = $componentEvent$$137$$.$getNativeEventTarget$().firstChild;
        $JSCompiler_StaticMethods__isSwatch$$($element$$220_evt$$90_newValue$$47$$) && ($AdfDomUtils$$.$addCSSClassName$($element$$220_evt$$90_newValue$$47$$, "p_AFSelected"), $element$$220_evt$$90_newValue$$47$$ = $JSCompiler_StaticMethods__getColorFromSwatch$$($element$$220_evt$$90_newValue$$47$$), $component$$822$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $element$$220_evt$$90_newValue$$47$$, !1, !0), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$822$$, 
        !0), $componentEvent$$137$$.cancel());
        break;
      case $AdfKeyStroke$$.$ESC_KEY$:
        $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$822$$, !0), $componentEvent$$137$$.cancel();
    }
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentKeyUp", {$HandleComponentKeyUp$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyUp$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$PopupClosed$ = function $$AdfDhtmlChooseColorBasePeer$$$$$PopupClosed$$($component$$823_parentId$$4$$, $contentDom$$6_customPanelId$$, $popupId$$33$$) {
  $AdfDhtmlChooseColorBasePeer$$.$superclass$.$PopupClosed$.call(this, $component$$823_parentId$$4$$, $contentDom$$6_customPanelId$$);
  $popupId$$33$$ == $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$ && ($contentDom$$6_customPanelId$$ = $JSCompiler_StaticMethods__getCustomPanelId$$($component$$823_parentId$$4$$), $contentDom$$6_customPanelId$$ = $AdfAgent$$.$AGENT$.getElementById($contentDom$$6_customPanelId$$), $component$$823_parentId$$4$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$823_parentId$$4$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL_WRAPPER_ID$), $AdfAgent$$.$AGENT$.getElementById($component$$823_parentId$$4$$).appendChild($contentDom$$6_customPanelId$$), 
  this.$_customPanelHandler$ = null);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.PopupClosed", {$PopupClosed$:$AdfDhtmlChooseColorBasePeer$$.prototype.$PopupClosed$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentDialog$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentDialog$$($componentEvent$$138$$) {
  var $component$$824$$ = this.$getComponent$();
  if ($componentEvent$$138$$.$getOutcome$() == $AdfDialogEvent$$.$OUTCOME_OK$) {
    var $newColor$$1$$ = this.$_customPanelHandler$.$getCurrentColorObj$(), $clientId$$162$$ = $component$$824$$.$getClientId$(), $oldSelectedSwatch$$2$$ = this.$_getCurrentSelection$($clientId$$162$$);
    $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$162$$] = $oldSelectedSwatch$$2$$;
    $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$162$$] = $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_OLD_SWATCH_KNOWN$;
    $component$$824$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $newColor$$1$$, !1, !0);
    $component$$824$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, $newColor$$1$$, !1, $AdfUIComponent$$.$PROPAGATE_LOCALLY$);
  }
  $componentEvent$$138$$.cancel();
  this.$hidePopup$(this.$getComponent$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$);
  $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$824$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentDialog", {$HandleComponentDialog$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentDialog$});
function $JSCompiler_StaticMethods__findSwatchByColor$$($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$, $colorToMatch$$2_colorToMatchStr$$, $selected$$5_swatch$$inline_1671$$) {
  $colorToMatch$$2_colorToMatchStr$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($colorToMatch$$2_colorToMatchStr$$);
  var $rows$$inline_1658_swatch$$4$$ = null;
  a: {
    for (var $rows$$inline_1658_swatch$$4$$ = $JSCompiler_StaticMethods__getSwatchRows$$($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$), $rowsLength$$inline_1659$$ = $rows$$inline_1658_swatch$$4$$.length, $i$$inline_1660$$ = 0;$i$$inline_1660$$ < $rowsLength$$inline_1659$$;$i$$inline_1660$$++) {
      for (var $element$$inline_1661$$ = $AdfDomUtils$$.$getFirstChildElement$($rows$$inline_1658_swatch$$4$$[$i$$inline_1660$$]);$element$$inline_1661$$;) {
        if (!$selected$$5_swatch$$inline_1671$$ || $AdfDomUtils$$.$containsCSSClassName$($element$$inline_1661$$, "p_AFSelected")) {
          var $swatch$$inline_1662$$ = $AdfDomUtils$$.$getFirstChildElement$($element$$inline_1661$$), $color$$inline_1663$$ = $swatch$$inline_1662$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$);
          "No Color" == $color$$inline_1663$$ && ($color$$inline_1663$$ = null);
          if ($color$$inline_1663$$ == $colorToMatch$$2_colorToMatchStr$$) {
            $rows$$inline_1658_swatch$$4$$ = $swatch$$inline_1662$$;
            break a;
          }
        }
        $element$$inline_1661$$ = $AdfDomUtils$$.$getNextElement$($element$$inline_1661$$);
      }
    }
    $rows$$inline_1658_swatch$$4$$ = null;
  }
  if (!$rows$$inline_1658_swatch$$4$$) {
    a: {
      $component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_ROW_ID$);
      if ($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$ = $AdfAgent$$.$AGENT$.getElementById($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$)) {
        for ($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$ = $AdfDomUtils$$.$getFirstChildElement$($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$);$component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$;) {
          if (!$AdfDomUtils$$.$containsCSSClassName$($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$, "p_AFDisabled") && ($selected$$5_swatch$$inline_1671$$ = $AdfDomUtils$$.$getFirstChildElement$($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$), $selected$$5_swatch$$inline_1671$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$) == $colorToMatch$$2_colorToMatchStr$$)) {
            $rows$$inline_1658_swatch$$4$$ = $selected$$5_swatch$$inline_1671$$;
            break a;
          }
          $component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$ = $AdfDomUtils$$.$getNextElement$($component$$827_customRowId$$inline_1668_element$$inline_1670_rowElement$$inline_1669$$);
        }
      }
      $rows$$inline_1658_swatch$$4$$ = null;
    }
  }
  return $rows$$inline_1658_swatch$$4$$;
}
function $JSCompiler_StaticMethods__updateButtonSwatch$$($buttonSwatchId$$4$$, $newColor$$2$$) {
  var $swatchElement$$ = $AdfAgent$$.$AGENT$.getElementById($buttonSwatchId$$4$$);
  if ($swatchElement$$) {
    if ($AdfDomUtils$$.$removeCSSClassName$($swatchElement$$, "p_AFTransparent"), null != $newColor$$2$$) {
      var $colorString$$4$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($newColor$$2$$);
      $swatchElement$$.style.backgroundColor = $colorString$$4$$;
      $swatchElement$$.setAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$, $colorString$$4$$);
    } else {
      $AdfDomUtils$$.$addCSSClassName$($swatchElement$$, "p_AFTransparent"), $swatchElement$$.removeAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$);
    }
  }
}
function $JSCompiler_StaticMethods__getColorArrayFromSwatchRow$$($rowChildrenArray$$1_rowElement$$3$$) {
  var $colorArray$$2$$ = [];
  $rowChildrenArray$$1_rowElement$$3$$ = $rowChildrenArray$$1_rowElement$$3$$.childNodes;
  for (var $length$$51$$ = $rowChildrenArray$$1_rowElement$$3$$.length, $childElement$$7_swatch$$6$$ = null, $agent$$241$$ = $AdfAgent$$.$AGENT$, $childElement$$7_swatch$$6$$ = null, $colorIndex$$1$$ = 0, $i$$274$$ = 0;$i$$274$$ < $length$$51$$;$i$$274$$++) {
    $childElement$$7_swatch$$6$$ = $rowChildrenArray$$1_rowElement$$3$$[$i$$274$$], "TD" == $agent$$241$$.$getNodeName$($childElement$$7_swatch$$6$$) && ($childElement$$7_swatch$$6$$ = $childElement$$7_swatch$$6$$.firstChild, $JSCompiler_StaticMethods__isSwatch$$($childElement$$7_swatch$$6$$) ? $colorArray$$2$$[$colorIndex$$1$$] = $JSCompiler_StaticMethods__getColorFromSwatch$$($childElement$$7_swatch$$6$$) : $colorArray$$2$$[$colorIndex$$1$$] = null, $colorIndex$$1$$++);
  }
  return $colorArray$$2$$;
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$_getCurrentSelection$ = function $$AdfDhtmlChooseColorBasePeer$$$$$_getCurrentSelection$$($clientId$$168$$) {
  return $AdfDhtmlChooseColorBasePeer$$.$_curSwatchSelectionMap$[$clientId$$168$$];
};
function $JSCompiler_StaticMethods__getSelectionState$$($clientId$$169$$) {
  var $state$$30$$ = $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$169$$];
  $state$$30$$ || ($AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$169$$] = $state$$30$$ = $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_UNKNOWN$);
  return $state$$30$$;
}
$AdfDhtmlChooseColorBasePeer$$.$_initSwatchSelectionHandlerClass$ = function $$AdfDhtmlChooseColorBasePeer$$$$_initSwatchSelectionHandlerClass$$() {
  $AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$ = function $$AdfDhtmlChooseColorBasePeer$$$$_SwatchSelectionHandler$$() {
    this.Init();
  };
  $AdfObject$$.$createSubclass$($AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$, $AdfObject$$, "AdfDhtmlChooseColorBasePeer._SwatchSelectionHandler");
  $AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$.prototype.Init = function $$AdfDhtmlChooseColorBasePeer$$$$_SwatchSelectionHandler$$$Init$() {
    $AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$.$superclass$.Init.call(this);
    this.$_prevSwatchSelectionMap$ = {};
    this.$_curSwatchSelectionMap$ = {};
    this.$_selectionStateMap$ = {};
  };
};
$AdfDhtmlChooseColorBasePeer$$.$_initCustomPanelHandlerClass$ = function $$AdfDhtmlChooseColorBasePeer$$$$_initCustomPanelHandlerClass$$() {
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$($rgbOriginalColor$$, $clientId$$176$$, $callPeer$$) {
    this.Init($rgbOriginalColor$$, $clientId$$176$$, $callPeer$$);
  };
  $AdfObject$$.$createSubclass$($AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$, $AdfObject$$, "AdfDhtmlChooseColorBasePeer._CustomPanelHandler");
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.Init = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$Init$($rgbOriginalColor$$1$$, $clientId$$177$$) {
    $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$superclass$.Init.call(this);
    this.$_clientId$ = $clientId$$177$$;
    var $colorString$$5_parsedRgbTotal$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($rgbOriginalColor$$1$$), $colorString$$5_parsedRgbTotal$$ = null != $colorString$$5_parsedRgbTotal$$ && 0 != $rgbOriginalColor$$1$$.alpha ? $colorString$$5_parsedRgbTotal$$.substring(1) : "3F7B7B", $thisClass$$ = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$;
    this.$_hueSaturationMapId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_HUE_SATUR_MAP_ID$);
    this.$_crossHairImgId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_CROSSHAIR_ID$);
    this.$_luminosityMapId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_LUM_MAP_ID$);
    this.$_luminosityImgId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_LUM_IMG_ID$);
    this.$_sliderThumbId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_THUMB_ID$);
    this.$_currentColorSwatchId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_CUR_SWATCH_ID$);
    this.$_oldColorSwatchId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_PREV_SWATCH_ID$);
    this.$_hexFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_H_EDIT_ID$);
    this.$_rFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_R_EDIT_ID$);
    this.$_gFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_G_EDIT_ID$);
    this.$_bFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_B_EDIT_ID$);
    this.$_sliderBackgroundColor$ = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.$createInstanceFromRgbTotal$(16777215);
    $colorString$$5_parsedRgbTotal$$ = $AdfDhtmlChooseColorBasePeer$$.$parseHexColor$($colorString$$5_parsedRgbTotal$$);
    this.$_currentColor$ = this.$_oldColor$ = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.$createInstanceFromRgbTotal$($colorString$$5_parsedRgbTotal$$);
    this.$_initElementDimensions$();
    this.$_bindToCustomEditDOM$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_initElementDimensions$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_initElementDimensions$$() {
    var $agent$$242$$ = $AdfAgent$$.$AGENT$, $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_crossHairImgId$);
    this.$_CROSSHAIR_IMG_WIDTH$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "width");
    this.$_CROSSHAIR_IMG_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
    this.$_CROSSHAIR_IMG_MID_WIDTH$ = Math.floor(this.$_CROSSHAIR_IMG_WIDTH$ / 2);
    this.$_CROSSHAIR_IMG_MID_HEIGHT$ = Math.floor(this.$_CROSSHAIR_IMG_HEIGHT$ / 2);
    $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_sliderThumbId$);
    this.$_SLIDERTHUMB_IMG_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
    $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_luminosityMapId$);
    this.$_SLIDERDIV_ELEMENT_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
    $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_hueSaturationMapId$);
    this.$_HUESATURATIONMAP_WIDTH$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "width");
    this.$_HUESATURATIONMAP_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$InitClass$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$InitClass$$() {
    this.$_HUE_SATUR_MAP_ID$ = "hueSatMap";
    this.$_CROSSHAIR_ID$ = "crossHair";
    this.$_LUM_MAP_ID$ = "lumMap";
    this.$_LUM_IMG_ID$ = "lumImg";
    this.$_THUMB_ID$ = "thumb";
    this.$_H_EDIT_ID$ = "hEdit";
    this.$_R_EDIT_ID$ = "rEdit";
    this.$_G_EDIT_ID$ = "gEdit";
    this.$_B_EDIT_ID$ = "bEdit";
    this.$_PREV_SWATCH_ID$ = "cstPrevSwtch";
    this.$_CUR_SWATCH_ID$ = "cstCurSwtch";
    $AdfPage$$.$PAGE$.$getLookAndFeel$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_getStyleCSSLength$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_getStyleCSSLength$$($agent$$243_widthString$$, $element$$223_style$$18$$, $styleName$$1$$) {
    var $length$$52$$ = 0;
    $element$$223_style$$18$$ = $agent$$243_widthString$$.getComputedStyle($element$$223_style$$18$$);
    $agent$$243_widthString$$ = $agent$$243_widthString$$.$getStyleProperty$($element$$223_style$$18$$, $styleName$$1$$);
    null != $agent$$243_widthString$$ && ($length$$52$$ = $AdfAgent$$.$getCSSLengthAsInt$($agent$$243_widthString$$));
    return $length$$52$$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_bindToCustomEditDOM$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_bindToCustomEditDOM$$() {
    var $bFieldId_clientId$$178$$ = this.$_clientId$;
    customHandlerClass = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$;
    var $agent$$244$$ = $AdfAgent$$.$AGENT$, $domNode$$27_gFieldId_hexFieldId_rFieldId$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_H_EDIT_ID$), $domNode$$27_gFieldId_hexFieldId_rFieldId$$ = $agent$$244$$.getElementById($domNode$$27_gFieldId_hexFieldId_rFieldId$$), $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$27_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
    $domNode$$27_gFieldId_hexFieldId_rFieldId$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_R_EDIT_ID$);
    $domNode$$27_gFieldId_hexFieldId_rFieldId$$ = $agent$$244$$.getElementById($domNode$$27_gFieldId_hexFieldId_rFieldId$$);
    $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$27_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
    $domNode$$27_gFieldId_hexFieldId_rFieldId$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_G_EDIT_ID$);
    $domNode$$27_gFieldId_hexFieldId_rFieldId$$ = $AdfAgent$$.$AGENT$.getElementById($domNode$$27_gFieldId_hexFieldId_rFieldId$$);
    $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$27_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
    $bFieldId_clientId$$178$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_B_EDIT_ID$);
    $domNode$$27_gFieldId_hexFieldId_rFieldId$$ = $AdfAgent$$.$AGENT$.getElementById($bFieldId_clientId$$178$$);
    $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$27_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$getCurrentColorObj$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$getCurrentColorObj$$() {
    return $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$("#" + this.$_currentColor$.$getRgbHex$());
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_handleDomChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_handleDomChange$$($domEvent$$25$$) {
    targetElementId = $AdfAgent$$.$AGENT$.$getEventTarget$($domEvent$$25$$).getAttribute("id");
    targetElementId == this.$_hexFieldId$ ? this.$_onHexFieldChange$($domEvent$$25$$) : targetElementId == this.$_rFieldId$ ? this.$_onRFieldChange$($domEvent$$25$$) : targetElementId == this.$_gFieldId$ ? this.$_onGFieldChange$($domEvent$$25$$) : targetElementId == this.$_bFieldId$ && this.$_onBFieldChange$($domEvent$$25$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$updateOldColorSwatch$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$updateOldColorSwatch$$() {
    this.$_updateSwatch$(this.$_oldColorSwatchId$, this.$_oldColor$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$updateNewColorSwatch$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$updateNewColorSwatch$$() {
    this.$_updateSwatch$(this.$_currentColorSwatchId$, this.$_currentColor$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateSwatch$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateSwatch$$($swatchId$$, $advancedColor$$) {
    $AdfAgent$$.$AGENT$.getElementById($swatchId$$).style.backgroundColor = "#" + $advancedColor$$.$getRgbHex$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$updateDisplay$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$updateDisplay$$($skipElementId$$) {
    this.$updateNewColorSwatch$();
    $skipElementId$$ != this.$_hueSaturationMapId$ && $skipElementId$$ != this.$_luminosityMapId$ && (this.$_updateHueSaturationMap$(), this.$_updateLuminosityMapThumb$());
    $skipElementId$$ != this.$_luminosityMapId$ && this.$_updateLuminosityMapBackground$();
    $skipElementId$$ != this.$_hexFieldId$ && this.$_updateHexField$();
    $skipElementId$$ != this.$_rFieldId$ && $skipElementId$$ != this.$_gFieldId$ && $skipElementId$$ != this.$_bFieldId$ && (this.$_updateRField$(), this.$_updateGField$(), this.$_updateBField$());
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$handleComponentMouseDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$handleComponentMouseDown$$($componentEvent$$139$$) {
    var $eventTarget$$52$$ = $componentEvent$$139$$.$getNativeEventTarget$(), $nativeEvent$$29$$ = $componentEvent$$139$$.$getNativeEvent$();
    targetElementId = $eventTarget$$52$$.getAttribute("id");
    if (targetElementId == this.$_hueSaturationMapId$ || targetElementId == this.$_crossHairImgId$) {
      this.$_onHueImageMouseDown$($nativeEvent$$29$$), $componentEvent$$139$$.cancel();
    } else {
      if (targetElementId == this.$_luminosityMapId$ || targetElementId == this.$_luminosityImgId$ || targetElementId == this.$_sliderThumbId$) {
        this.$_onBSliderMouseDown$($nativeEvent$$29$$), $componentEvent$$139$$.cancel();
      }
    }
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateHueSaturationMap$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateHueSaturationMap$$() {
    var $color$$6$$ = this.$_currentColor$, $crossHairImg$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_crossHairImgId$), $mapWidth$$ = this.$_HUESATURATIONMAP_WIDTH$;
    $crossHairImg$$.style.top = (1 - $color$$6$$.$_saturation$) * this.$_HUESATURATIONMAP_HEIGHT$ - this.$_CROSSHAIR_IMG_MID_HEIGHT$ + "px";
    $AdfPage$$.$PAGE$.$getLocaleContext$().$isRightToLeft$() ? $crossHairImg$$.style.left = $mapWidth$$ - $color$$6$$.$_hue$ * $mapWidth$$ / 360 - this.$_CROSSHAIR_IMG_MID_WIDTH$ + "px" : $crossHairImg$$.style.left = $color$$6$$.$_hue$ * $mapWidth$$ / 360 - this.$_CROSSHAIR_IMG_MID_WIDTH$ + "px";
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_handleArrowKeys$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_handleArrowKeys$$($eventTarget$$53$$, $keyCode$$48$$) {
    switch($keyCode$$48$$) {
      case $AdfKeyStroke$$.$ARROWUP_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWDOWN_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWRIGHT_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWLEFT_KEY$:
        var $targetElementId$$1$$ = $eventTarget$$53$$.getAttribute("id"), $targetElement$$31$$ = $AdfAgent$$.$AGENT$.getElementById($targetElementId$$1$$), $deltaX$$14$$ = $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWRIGHT_KEY$ ? 1 : $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWLEFT_KEY$ ? -1 : 0, $deltaY$$17$$ = $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWDOWN_KEY$ ? 1 : $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWUP_KEY$ ? -1 : 0;
        if ($targetElementId$$1$$ == this.$_hueSaturationMapId$ || $targetElementId$$1$$ == this.$_crossHairImgId$) {
          this.$_moveCrossHairByArrow$($deltaX$$14$$, $deltaY$$17$$), $AdfFocusUtils$$.$focusElement$($targetElement$$31$$);
        } else {
          if ($targetElementId$$1$$ == this.$_luminosityMapId$ || $targetElementId$$1$$ == this.$_luminosityImgId$ || $targetElementId$$1$$ == this.$_sliderThumbId$) {
            $keyCode$$48$$ != $AdfKeyStroke$$.$ARROWUP_KEY$ && $keyCode$$48$$ != $AdfKeyStroke$$.$ARROWDOWN_KEY$ || this.$_moveBThumbByArrow$($deltaY$$17$$), $AdfFocusUtils$$.$focusElement$($targetElement$$31$$);
          }
        }
      ;
    }
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateLuminosityMapBackground$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateLuminosityMapBackground$$() {
    var $color$$7$$ = this.$_currentColor$, $luminosityImgElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_luminosityImgId$);
    this.$_sliderBackgroundColor$.$setHsb$($color$$7$$.$_hue$, $color$$7$$.$_saturation$, .5);
    $luminosityImgElement$$.style.backgroundColor = "#" + this.$_sliderBackgroundColor$.$getRgbHex$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateLuminosityMapThumb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateLuminosityMapThumb$$() {
    var $color$$8$$ = this.$_currentColor$;
    $AdfAgent$$.$AGENT$.getElementById(this.$_sliderThumbId$).style.top = (1 - $color$$8$$.$_luminosity$) * this.$_SLIDERDIV_ELEMENT_HEIGHT$ - this.$_SLIDERTHUMB_IMG_HEIGHT$ / 2 + "px";
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateHexField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateHexField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_hexFieldId$).value = this.$_currentColor$.$getRgbHex$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateRField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateRField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_rFieldId$).value = this.$_currentColor$.$_red$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateGField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateGField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_gFieldId$).value = this.$_currentColor$.$_green$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateBField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateBField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_bFieldId$).value = this.$_currentColor$.$_blue$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onHexFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onHexFieldChange$$($domEvent$$26$$) {
    var $inputElememt$$4$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_hexFieldId$), $parsedValue$$ = $AdfDhtmlChooseColorBasePeer$$.$parseHexColor$($inputElememt$$4$$.value);
    null == $parsedValue$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($domEvent$$26$$), this.$_showHexValidationError$($inputElememt$$4$$.value), $AdfFocusUtils$$.$focusElement$($inputElememt$$4$$), this.$_updateHexField$()) : (this.$_currentColor$.$setRgbByTotal$($parsedValue$$), this.$updateDisplay$());
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_showRGBValidationError$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_showRGBValidationError$$($errorMessage$$2_inputString$$) {
    var $laf$$64$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$();
    $errorMessage$$2_inputString$$ = TrFastMessageFormatUtils.format($laf$$64$$.$getTranslatedString$("af_chooseColor.MSG_RGB_INVALID"), $errorMessage$$2_inputString$$);
    alert($errorMessage$$2_inputString$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_showHexValidationError$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_showHexValidationError$$($errorMessage$$3_inputString$$1$$) {
    var $laf$$65$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$();
    $errorMessage$$3_inputString$$1$$ = TrFastMessageFormatUtils.format($laf$$65$$.$getTranslatedString$("af_chooseColor.MSG_HEX_INVALID"), $errorMessage$$3_inputString$$1$$);
    alert($errorMessage$$3_inputString$$1$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onRFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onRFieldChange$$($event$$169$$) {
    var $fieldElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_rFieldId$), $parsedValue$$1$$ = $AdfDhtmlChooseColorBasePeer$$.$parse0To255$($fieldElement$$.value);
    null == $parsedValue$$1$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($event$$169$$), this.$_showRGBValidationError$($fieldElement$$.value), $AdfFocusUtils$$.$focusElement$($fieldElement$$), this.$_updateRField$()) : (this.$_currentColor$.$setRed$($parsedValue$$1$$), this.$updateDisplay$(this.$_rFieldId$));
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onGFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onGFieldChange$$($event$$170$$) {
    var $fieldElement$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_gFieldId$), $parsedValue$$2$$ = $AdfDhtmlChooseColorBasePeer$$.$parse0To255$($fieldElement$$1$$.value);
    null == $parsedValue$$2$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($event$$170$$), this.$_showRGBValidationError$($fieldElement$$1$$.value), $AdfFocusUtils$$.$focusElement$($fieldElement$$1$$), this.$_updateGField$()) : (this.$_currentColor$.$setGreen$($parsedValue$$2$$), this.$updateDisplay$(this.$_gFieldId$));
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onBFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onBFieldChange$$($event$$171$$) {
    var $fieldElement$$2$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_bFieldId$), $parsedValue$$3$$ = $AdfDhtmlChooseColorBasePeer$$.$parse0To255$($fieldElement$$2$$.value);
    null == $parsedValue$$3$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($event$$171$$), this.$_showRGBValidationError$($fieldElement$$2$$.value), $AdfFocusUtils$$.$focusElement$($fieldElement$$2$$), this.$_updateBField$()) : (this.$_currentColor$.$setBlue$($parsedValue$$3$$), this.$updateDisplay$(this.$_bFieldId$));
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onHueImageMouseDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onHueImageMouseDown$$($event$$172$$) {
    this.$_moveCrossHairToMousePosition$($event$$172$$);
    $AdfPage$$.$PAGE$.$startDrag$($event$$172$$, this.$createCallback$(this.$_onHueImageDrag$));
    $AdfAgent$$.$getAgent$().$eatEvent$($event$$172$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onBSliderMouseDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onBSliderMouseDown$$($event$$173$$) {
    this.$_moveBThumbToMousePosition$($event$$173$$);
    $AdfPage$$.$PAGE$.$startDrag$($event$$173$$, this.$createCallback$(this.$_onBThumbDrag$));
    $AdfAgent$$.$getAgent$().$eatEvent$($event$$173$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveCrossHairToMousePosition$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveCrossHairToMousePosition$$($event$$174_hueMapElement$$) {
    var $agent$$245_hue_relativeX$$ = $AdfAgent$$.$getAgent$(), $mousePosition$$4_relativeY$$ = $agent$$245_hue_relativeX$$.$getMousePosition$($event$$174_hueMapElement$$);
    $event$$174_hueMapElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_hueSaturationMapId$);
    var $hueSaturationMapHeight_mapElementPosition$$ = $agent$$245_hue_relativeX$$.$getElementPosition$($event$$174_hueMapElement$$), $agent$$245_hue_relativeX$$ = $mousePosition$$4_relativeY$$.x - $hueSaturationMapHeight_mapElementPosition$$.x, $mousePosition$$4_relativeY$$ = $mousePosition$$4_relativeY$$.y - $hueSaturationMapHeight_mapElementPosition$$.y, $hueSaturationMapWidth$$ = this.$_HUESATURATIONMAP_WIDTH$, $hueSaturationMapHeight_mapElementPosition$$ = this.$_HUESATURATIONMAP_HEIGHT$, $agent$$245_hue_relativeX$$ = 
    Math.min($agent$$245_hue_relativeX$$, $hueSaturationMapWidth$$), $agent$$245_hue_relativeX$$ = Math.max(0, $agent$$245_hue_relativeX$$), $mousePosition$$4_relativeY$$ = Math.min($mousePosition$$4_relativeY$$, this.$_HUESATURATIONMAP_HEIGHT$), $mousePosition$$4_relativeY$$ = Math.max(0, $mousePosition$$4_relativeY$$), $crossHairImg$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_crossHairImgId$), $newLeft$$2_newTop$$2$$ = $mousePosition$$4_relativeY$$ - this.$_CROSSHAIR_IMG_MID_HEIGHT$;
    0 == $mousePosition$$4_relativeY$$ && $newLeft$$2_newTop$$2$$++;
    $crossHairImg$$1$$.style.top = $newLeft$$2_newTop$$2$$ + "px";
    $newLeft$$2_newTop$$2$$ = $agent$$245_hue_relativeX$$ - this.$_CROSSHAIR_IMG_MID_WIDTH$;
    0 == $agent$$245_hue_relativeX$$ && $newLeft$$2_newTop$$2$$++;
    $crossHairImg$$1$$.style.left = $newLeft$$2_newTop$$2$$ + "px";
    $agent$$245_hue_relativeX$$ = Math.round(360 * $agent$$245_hue_relativeX$$ / $hueSaturationMapWidth$$);
    360 == $agent$$245_hue_relativeX$$ && ($agent$$245_hue_relativeX$$ = 0);
    this.$_currentColor$.$setHsb$($agent$$245_hue_relativeX$$, 1 - $mousePosition$$4_relativeY$$ / $hueSaturationMapHeight_mapElementPosition$$, this.$_currentColor$.$_luminosity$);
    this.$updateDisplay$($event$$174_hueMapElement$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveCrossHairByArrow$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveCrossHairByArrow$$($deltaX$$15$$, $deltaY$$18$$) {
    var $hueMapElement$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_hueSaturationMapId$), $crossHairImg$$2_hue$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_crossHairImgId$), $centerX$$ = $crossHairImg$$2_hue$$1$$.offsetLeft + this.$_CROSSHAIR_IMG_MID_WIDTH$ + $deltaX$$15$$, $centerY$$ = $crossHairImg$$2_hue$$1$$.offsetTop + this.$_CROSSHAIR_IMG_MID_HEIGHT$ + $deltaY$$18$$, $hueSaturationMapWidth$$1$$ = this.$_HUESATURATIONMAP_WIDTH$, $hueSaturationMapHeight$$1$$ = this.$_HUESATURATIONMAP_HEIGHT$, 
    $centerX$$ = Math.min($centerX$$, $hueSaturationMapWidth$$1$$), $centerX$$ = Math.max(0, $centerX$$), $centerY$$ = Math.min($centerY$$, $hueSaturationMapHeight$$1$$), $centerY$$ = Math.max(0, $centerY$$);
    $crossHairImg$$2_hue$$1$$.style.top = $centerY$$ - this.$_CROSSHAIR_IMG_MID_HEIGHT$ + "px";
    $crossHairImg$$2_hue$$1$$.style.left = $centerX$$ - this.$_CROSSHAIR_IMG_MID_WIDTH$ + "px";
    $crossHairImg$$2_hue$$1$$ = Math.round(360 * $centerX$$ / $hueSaturationMapWidth$$1$$);
    360 == $crossHairImg$$2_hue$$1$$ && ($crossHairImg$$2_hue$$1$$ = 0);
    this.$_currentColor$.$setHsb$($crossHairImg$$2_hue$$1$$, 1 - $centerY$$ / $hueSaturationMapHeight$$1$$, this.$_currentColor$.$_luminosity$);
    this.$updateDisplay$($hueMapElement$$1$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveBThumbToMousePosition$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveBThumbToMousePosition$$($event$$175_sliderElement$$) {
    var $agent$$246_relativeY$$1_sliderElementPosition$$ = $AdfAgent$$.$getAgent$(), $mousePosition$$5_sliderDivElementHeight$$ = $agent$$246_relativeY$$1_sliderElementPosition$$.$getMousePosition$($event$$175_sliderElement$$);
    $event$$175_sliderElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_luminosityMapId$);
    $agent$$246_relativeY$$1_sliderElementPosition$$ = $agent$$246_relativeY$$1_sliderElementPosition$$.$getElementPosition$($event$$175_sliderElement$$);
    $agent$$246_relativeY$$1_sliderElementPosition$$ = $mousePosition$$5_sliderDivElementHeight$$.y - $agent$$246_relativeY$$1_sliderElementPosition$$.y;
    $mousePosition$$5_sliderDivElementHeight$$ = this.$_SLIDERDIV_ELEMENT_HEIGHT$;
    $agent$$246_relativeY$$1_sliderElementPosition$$ = Math.min($agent$$246_relativeY$$1_sliderElementPosition$$, $mousePosition$$5_sliderDivElementHeight$$);
    $agent$$246_relativeY$$1_sliderElementPosition$$ = Math.max(0, $agent$$246_relativeY$$1_sliderElementPosition$$);
    $AdfAgent$$.$AGENT$.getElementById(this.$_sliderThumbId$).style.top = $agent$$246_relativeY$$1_sliderElementPosition$$ - Math.floor(this.$_SLIDERTHUMB_IMG_HEIGHT$ / 2) + "px";
    this.$_currentColor$.$setHsb$(this.$_currentColor$.$_hue$, this.$_currentColor$.$_saturation$, 1 - $agent$$246_relativeY$$1_sliderElementPosition$$ / $mousePosition$$5_sliderDivElementHeight$$);
    this.$updateDisplay$($event$$175_sliderElement$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveBThumbByArrow$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveBThumbByArrow$$($deltaY$$19_newTop$$5$$) {
    var $sliderElement$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_luminosityMapId$), $thumbImg$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_sliderThumbId$), $sliderDivElementHeight$$1$$ = this.$_SLIDERDIV_ELEMENT_HEIGHT$, $sliderThumbImgHeight$$2$$ = this.$_SLIDERTHUMB_IMG_HEIGHT$, $relativeY$$2$$ = $thumbImg$$1$$.offsetTop + Math.floor($sliderThumbImgHeight$$2$$ / 2) + $deltaY$$19_newTop$$5$$, $relativeY$$2$$ = Math.min($relativeY$$2$$, $sliderDivElementHeight$$1$$), $relativeY$$2$$ = 
    Math.max(0, $relativeY$$2$$);
    $deltaY$$19_newTop$$5$$ = Math.min($thumbImg$$1$$.offsetTop + $deltaY$$19_newTop$$5$$, $sliderDivElementHeight$$1$$ - Math.floor($sliderThumbImgHeight$$2$$ / 2));
    $deltaY$$19_newTop$$5$$ = Math.max(-Math.floor($sliderThumbImgHeight$$2$$ / 2), $deltaY$$19_newTop$$5$$);
    $thumbImg$$1$$.style.top = $deltaY$$19_newTop$$5$$ + "px";
    this.$_currentColor$.$setHsb$(this.$_currentColor$.$_hue$, this.$_currentColor$.$_saturation$, 1 - $relativeY$$2$$ / $sliderDivElementHeight$$1$$);
    this.$updateDisplay$($sliderElement$$1$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onBThumbDrag$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onBThumbDrag$$($event$$176$$) {
    this.$_moveBThumbToMousePosition$($event$$176$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onHueImageDrag$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onHueImageDrag$$($event$$177$$) {
    this.$_moveCrossHairToMousePosition$($event$$177$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$() {
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.$createInstanceFromRgbTotal$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$createInstanceFromRgbTotal$$($validRGBTotal$$) {
    $AdfAssert$$.$assertNumber$($validRGBTotal$$, "createInstanceFromRgbTotal: input must be number.");
    var $advancedColor$$1$$ = new $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$;
    $advancedColor$$1$$.$setRgbByTotal$($validRGBTotal$$);
    return $advancedColor$$1$$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setRgbByTotal$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setRgbByTotal$$($validRGBTotal$$1$$) {
    var $rg$$ = Math.floor($validRGBTotal$$1$$ / 256);
    this.$_red$ = Math.floor($rg$$ / 256);
    this.$_green$ = $rg$$ % 256;
    this.$_blue$ = $validRGBTotal$$1$$ % 256;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setHsb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setHsb$$($hue$$4$$, $saturation$$2$$, $luminosity$$4$$) {
    this.$_hue$ = $hue$$4$$;
    this.$_saturation$ = $saturation$$2$$;
    this.$_luminosity$ = $luminosity$$4$$;
    this.$_populateRgb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setRed$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setRed$$($red$$3$$) {
    this.$_red$ = $red$$3$$;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setGreen$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setGreen$$($green$$3$$) {
    this.$_green$ = $green$$3$$;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setBlue$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setBlue$$($blue$$3$$) {
    this.$_blue$ = $blue$$3$$;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$getRgbHex$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$getRgbHex$$() {
    return this.$_getHex$(this.$_red$) + this.$_getHex$(this.$_green$) + this.$_getHex$(this.$_blue$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$_getHex$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$_getHex$$($dec$$) {
    return "0123456789ABCDEF".charAt(Math.floor($dec$$ / 16)) + "0123456789ABCDEF".charAt($dec$$ % 16);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$_populateHsb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$_populateHsb$$() {
    var $red$$4$$ = this.$_red$ / 255, $green$$4$$ = this.$_green$ / 255, $blue$$4$$ = this.$_blue$ / 255, $min$$3$$ = Math.min(Math.min($red$$4$$, $green$$4$$), $blue$$4$$), $max$$1$$ = Math.max(Math.max($red$$4$$, $green$$4$$), $blue$$4$$), $delta$$8$$ = $max$$1$$ - $min$$3$$, $hue$$5$$ = null, $saturation$$3$$ = null, $luminosity$$5$$ = ($max$$1$$ + $min$$3$$) / 2;
    0 != $max$$1$$ ? ($saturation$$3$$ = 0 == $delta$$8$$ ? 0 : .5 >= $luminosity$$5$$ ? $delta$$8$$ / ($max$$1$$ + $min$$3$$) : $delta$$8$$ / (2 - $max$$1$$ - $min$$3$$), 0 == $delta$$8$$ ? $hue$$5$$ = 0 : ($hue$$5$$ = 60 * ($red$$4$$ == $max$$1$$ ? ($green$$4$$ - $blue$$4$$) / $delta$$8$$ : $green$$4$$ == $max$$1$$ ? 2 + ($blue$$4$$ - $red$$4$$) / $delta$$8$$ : 4 + ($red$$4$$ - $green$$4$$) / $delta$$8$$), 0 > $hue$$5$$ && ($hue$$5$$ += 360))) : $hue$$5$$ = $saturation$$3$$ = 0;
    this.$_hue$ = $hue$$5$$;
    this.$_saturation$ = $saturation$$3$$;
    this.$_luminosity$ = $luminosity$$5$$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$_populateRgb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$_populateRgb$$() {
    var $hue$$6$$ = this.$_hue$, $saturation$$4_sectorIndex$$ = this.$_saturation$, $delta$$9_luminosity$$6$$ = this.$_luminosity$, $red$$5$$ = null, $green$$5$$ = null, $blue$$5$$ = null;
    if (0 == $saturation$$4_sectorIndex$$) {
      $red$$5$$ = $green$$5$$ = $blue$$5$$ = $delta$$9_luminosity$$6$$;
    } else {
      var $max$$2$$ = null, $factor$$2_min$$4$$ = null, $mid$$ = null, $factor$$2_min$$4$$ = null, $factor$$2_min$$4$$ = .5 <= $delta$$9_luminosity$$6$$ ? (1 - $delta$$9_luminosity$$6$$) * $saturation$$4_sectorIndex$$ : $delta$$9_luminosity$$6$$ * $saturation$$4_sectorIndex$$, $max$$2$$ = $factor$$2_min$$4$$ + $delta$$9_luminosity$$6$$, $factor$$2_min$$4$$ = $delta$$9_luminosity$$6$$ - $factor$$2_min$$4$$, $saturation$$4_sectorIndex$$ = Math.floor($hue$$6$$ / 60), $delta$$9_luminosity$$6$$ = $max$$2$$ - 
      $factor$$2_min$$4$$;
      switch($saturation$$4_sectorIndex$$) {
        case 0:
        ;
        case 2:
        ;
        case 4:
          $mid$$ = ($hue$$6$$ / 60 - $saturation$$4_sectorIndex$$) * $delta$$9_luminosity$$6$$ + $factor$$2_min$$4$$;
          break;
        case 1:
        ;
        case 3:
        ;
        case 5:
          $mid$$ = ($saturation$$4_sectorIndex$$ + 1 - $hue$$6$$ / 60) * $delta$$9_luminosity$$6$$ + $factor$$2_min$$4$$;
      }
      switch($saturation$$4_sectorIndex$$) {
        case 0:
          $red$$5$$ = $max$$2$$;
          $green$$5$$ = $mid$$;
          $blue$$5$$ = $factor$$2_min$$4$$;
          break;
        case 1:
          $red$$5$$ = $mid$$;
          $green$$5$$ = $max$$2$$;
          $blue$$5$$ = $factor$$2_min$$4$$;
          break;
        case 2:
          $red$$5$$ = $factor$$2_min$$4$$;
          $green$$5$$ = $max$$2$$;
          $blue$$5$$ = $mid$$;
          break;
        case 3:
          $red$$5$$ = $factor$$2_min$$4$$;
          $green$$5$$ = $mid$$;
          $blue$$5$$ = $max$$2$$;
          break;
        case 4:
          $red$$5$$ = $mid$$;
          $green$$5$$ = $factor$$2_min$$4$$;
          $blue$$5$$ = $max$$2$$;
          break;
        case 5:
          $red$$5$$ = $max$$2$$, $green$$5$$ = $factor$$2_min$$4$$, $blue$$5$$ = $mid$$;
      }
    }
    this.$_red$ = Math.round(255 * $red$$5$$);
    this.$_green$ = Math.round(255 * $green$$5$$);
    this.$_blue$ = Math.round(255 * $blue$$5$$);
  };
};
