var $AdfSingleSelectInputSearchPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfDhtmlInputSearchPeer$$, "AdfSingleSelectInputSearchPeer", !1);
$goog$exportSymbol$$("AdfSingleSelectInputSearchPeer", $AdfSingleSelectInputSearchPeer$$);
$AdfSingleSelectInputSearchPeer$$.$InitSubclass$ = function $$AdfSingleSelectInputSearchPeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$($AdfSingleSelectPanel$$);
  this.$_AUTOCOMPLETE_ANNOUNCE_MSG$ = "af_inputSearch.AUTOCOMPLETE_ANNOUNCE_MSG";
  this.$_MSG_AUTOCOMPLETE_FAILED$ = "af_inputSearch.MSG_AUTOCOMPLETE_FAILED";
  this.$_MSG_AUTCOMPLETE_FAILED_DETAIL$ = "af_inputSearch.MSG_AUTOCOMPLETE_FAILED_DETAIL";
};
$goog$exportSymbol$$("AdfSingleSelectInputSearchPeer.InitSubclass", $AdfSingleSelectInputSearchPeer$$.$InitSubclass$);
$AdfSingleSelectInputSearchPeer$$.prototype.$InitDomElement$ = function $$AdfSingleSelectInputSearchPeer$$$$$InitDomElement$$($component$$2363$$, $element$$394$$) {
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$InitDomElement$.call(this, $component$$2363$$, $element$$394$$);
  this.$_suggestionsPanel$ = new $AdfSingleSelectPanel$$(this);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.InitDomElement", {$InitDomElement$:$AdfSingleSelectInputSearchPeer$$.prototype.$InitDomElement$});
$AdfSingleSelectInputSearchPeer$$.prototype.$delayedHandleAutoCompletingEvent$ = function $$AdfSingleSelectInputSearchPeer$$$$$delayedHandleAutoCompletingEvent$$($autoCompletedValue$$3_componentEvent$$519_page$$252$$) {
  var $component$$2364$$ = this.$getComponent$();
  $autoCompletedValue$$3_componentEvent$$519_page$$252$$.$isCanceled$() ? $component$$2364$$.$getProperty$($AdfDhtmlInputSearchPeer$$.$SELECTION_PROPERTY$) && $AdfDhtmlInputSearchPeer$$.$SetSelectionProp$($component$$2364$$, null) : ($autoCompletedValue$$3_componentEvent$$519_page$$252$$ = $autoCompletedValue$$3_componentEvent$$519_page$$252$$.$getAutoCompletedValue$()) ? (this.$__setComponentValue$($component$$2364$$, $autoCompletedValue$$3_componentEvent$$519_page$$252$$), $autoCompletedValue$$3_componentEvent$$519_page$$252$$ = 
  $AdfPage$$.$PAGE$, $autoCompletedValue$$3_componentEvent$$519_page$$252$$.$announceToAssistiveTechnology$($autoCompletedValue$$3_componentEvent$$519_page$$252$$.$getLookAndFeel$().$getTranslatedString$($AdfSingleSelectInputSearchPeer$$.$_AUTOCOMPLETE_ANNOUNCE_MSG$, $AdfDhtmlEditableValuePeer$$.$GetLabelText$($component$$2364$$), $AdfDhtmlEditableValuePeer$$.$getContentNodeText$($component$$2364$$)))) : $AdfInputSearchUtils$showFacesMessage$$($component$$2364$$, $AdfFacesMessage$$.$TYPE_ERROR$, 
  $AdfSingleSelectInputSearchPeer$$.$_MSG_AUTOCOMPLETE_FAILED$, $AdfSingleSelectInputSearchPeer$$.$_MSG_AUTCOMPLETE_FAILED_DETAIL$);
  this.$GetSuggestionsPanel$().clear();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.delayedHandleAutoCompletingEvent", {$delayedHandleAutoCompletingEvent$:$AdfSingleSelectInputSearchPeer$$.prototype.$delayedHandleAutoCompletingEvent$});
$AdfSingleSelectInputSearchPeer$$.prototype.$RunValidation$ = function $$AdfSingleSelectInputSearchPeer$$$$$RunValidation$$($component$$2365$$, $targetNode$$57$$, $isChangeRequired$$4$$) {
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$RunValidation$.call(this, $component$$2365$$, $targetNode$$57$$, $isChangeRequired$$4$$);
  this.$HideSuggestionPopup$($component$$2365$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.RunValidation", {$RunValidation$:$AdfSingleSelectInputSearchPeer$$.prototype.$RunValidation$});
$AdfSingleSelectInputSearchPeer$$.prototype.$Validate$ = function $$AdfSingleSelectInputSearchPeer$$$$$Validate$$($component$$2366$$, $submittedValue$$33$$) {
  if ($submittedValue$$33$$) {
    if ("string" === typeof $submittedValue$$33$$) {
      var $autoCompletedValue$$4_displayedSuggestions$$inline_5100$$;
      $autoCompletedValue$$4_displayedSuggestions$$inline_5100$$ = ($autoCompletedValue$$4_displayedSuggestions$$inline_5100$$ = this.$GetSuggestionsPanel$().$getDisplayedSuggestions$()) && 1 == $autoCompletedValue$$4_displayedSuggestions$$inline_5100$$.length ? $autoCompletedValue$$4_displayedSuggestions$$inline_5100$$.$at$(0).key : void 0;
      $AdfAutoCompletingEvent$$.$queue$($component$$2366$$, $submittedValue$$33$$, $autoCompletedValue$$4_displayedSuggestions$$inline_5100$$);
      this.$_underAutocompletion$ = !0;
    } else {
      $AdfAssert$$.$assertArray$($submittedValue$$33$$), $AdfSingleSelectInputSearchPeer$$.$superclass$.$Validate$.call(this, $component$$2366$$, $submittedValue$$33$$);
    }
  } else {
    this.$__setComponentValue$($component$$2366$$, null);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.Validate", {$Validate$:$AdfSingleSelectInputSearchPeer$$.prototype.$Validate$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetDisplayValue$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetDisplayValue$$($component$$2367$$, $domElement$$620$$) {
  var $displayValues$$1$$ = [], $contentNodeValue$$5$$ = $AdfDhtmlEditableValuePeer$$.$getContentNodeText$($component$$2367$$, $domElement$$620$$).trim();
  $contentNodeValue$$5$$ && $displayValues$$1$$.push($contentNodeValue$$5$$);
  return $displayValues$$1$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetDisplayValue", {$GetDisplayValue$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetDisplayValue$});
$AdfSingleSelectInputSearchPeer$$.prototype.$ClearTemporaryStorage$ = function $$AdfSingleSelectInputSearchPeer$$$$$ClearTemporaryStorage$$() {
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$ClearTemporaryStorage$.call(this);
  this.$_underAutocompletion$ = null;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.ClearTemporaryStorage", {$ClearTemporaryStorage$:$AdfSingleSelectInputSearchPeer$$.prototype.$ClearTemporaryStorage$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetCombinedDisplayValue$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetCombinedDisplayValue$$($newValues$$19$$) {
  return 0 < $newValues$$19$$.length ? $newValues$$19$$[0] : "";
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetCombinedDisplayValue", {$GetCombinedDisplayValue$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetCombinedDisplayValue$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetRealNewValues$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetRealNewValues$$($newValues$$20$$, $oldValues$$12$$) {
  return ($newValues$$20$$.length ? $newValues$$20$$[0] : null) == ($oldValues$$12$$.length ? $oldValues$$12$$[0] : null) ? $AdfCollections$$.$EMPTY_ARRAY$ : $newValues$$20$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetRealNewValues", {$GetRealNewValues$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetRealNewValues$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionMapContainingSelections$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetSuggestionMapContainingSelections$$() {
  var $suggestions$$28$$ = this.$GetSuggestionsPanel$().$getDisplayedSuggestions$();
  $suggestions$$28$$ || ($suggestions$$28$$ = this.$GetCachedServerSuggestionsList$());
  return $suggestions$$28$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetSuggestionMapContainingSelections", {$GetSuggestionMapContainingSelections$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionMapContainingSelections$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionsPanel$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetSuggestionsPanel$$() {
  return this.$_suggestionsPanel$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetSuggestionsPanel", {$GetSuggestionsPanel$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionsPanel$});
$AdfSingleSelectInputSearchPeer$$.prototype.$ShowSelectionsPopup$ = function $$AdfSingleSelectInputSearchPeer$$$$$ShowSelectionsPopup$$() {
  $AdfAssert$$.assert(!1, "not expected to be invoked on single select inputSearch");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.ShowSelectionsPopup", {$ShowSelectionsPopup$:$AdfSingleSelectInputSearchPeer$$.prototype.$ShowSelectionsPopup$});
$AdfSingleSelectInputSearchPeer$$.prototype.$IsUnderAutocompletion$ = function $$AdfSingleSelectInputSearchPeer$$$$$IsUnderAutocompletion$$() {
  return this.$_underAutocompletion$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.IsUnderAutocompletion", {$IsUnderAutocompletion$:$AdfSingleSelectInputSearchPeer$$.prototype.$IsUnderAutocompletion$});
$AdfSingleSelectInputSearchPeer$$.prototype.$RestoreSelectionOnEscape$ = function $$AdfSingleSelectInputSearchPeer$$$$$RestoreSelectionOnEscape$$($component$$2369$$, $domElement$$621$$, $componentValue$$1_contentNode$$113$$) {
  var $lastValue$$11_value$$278$$ = $AdfDhtmlInputBasePeer$$.$getLastValue$($componentValue$$1_contentNode$$113$$);
  if ("" === $lastValue$$11_value$$278$$ && ($componentValue$$1_contentNode$$113$$ = $AdfDhtmlInputSearchPeer$$.$GetValue$($component$$2369$$), 0 !== $componentValue$$1_contentNode$$113$$.length)) {
    $lastValue$$11_value$$278$$ = $componentValue$$1_contentNode$$113$$[0];
    this.$GetSuggestionMapContainingSelections$().get($lastValue$$11_value$$278$$) && this.$DeriveAndSetDisplayValue$($component$$2369$$, $domElement$$621$$, $componentValue$$1_contentNode$$113$$);
    return;
  }
  this.$SetDisplayValue$($component$$2369$$, $domElement$$621$$, [$lastValue$$11_value$$278$$]);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.RestoreSelectionOnEscape", {$RestoreSelectionOnEscape$:$AdfSingleSelectInputSearchPeer$$.prototype.$RestoreSelectionOnEscape$});
$AdfSingleSelectInputSearchPeer$$.prototype.$SetDisplayValueOnPrefetch$ = function $$AdfSingleSelectInputSearchPeer$$$$$SetDisplayValueOnPrefetch$$($component$$2370$$, $suggestions$$29$$, $isMasterList$$6$$) {
  this.$CacheServerSuggestionsList$($suggestions$$29$$, "", $isMasterList$$6$$);
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$SetDisplayValueOnPrefetch$.call(this, $component$$2370$$, $suggestions$$29$$, $isMasterList$$6$$);
  this.$IsSuggestionPopupVisible$($component$$2370$$) || this.$CacheServerSuggestionsList$(null);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.SetDisplayValueOnPrefetch", {$SetDisplayValueOnPrefetch$:$AdfSingleSelectInputSearchPeer$$.prototype.$SetDisplayValueOnPrefetch$});
$AdfSingleSelectInputSearchPeer$$.prototype.$RenderSelections$ = function $$AdfSingleSelectInputSearchPeer$$$$$RenderSelections$$() {
  $AdfAssert$$.assert(!1, "not expected to be invoked on single select inputSearch");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.RenderSelections", {$RenderSelections$:$AdfSingleSelectInputSearchPeer$$.prototype.$RenderSelections$});
$AdfSingleSelectInputSearchPeer$$.prototype.$ToggleDisplayValueToFiltering$ = function $$AdfSingleSelectInputSearchPeer$$$$$ToggleDisplayValueToFiltering$$() {
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.ToggleDisplayValueToFiltering", {$ToggleDisplayValueToFiltering$:$AdfSingleSelectInputSearchPeer$$.prototype.$ToggleDisplayValueToFiltering$});
$AdfSingleSelectInputSearchPeer$$.prototype.$UpdateDisplayValueAndSelection$ = function $$AdfSingleSelectInputSearchPeer$$$$$UpdateDisplayValueAndSelection$$($component$$2372$$, $domElement$$622$$, $values$$25$$, $freshSuggestions$$2$$, $isMasterList$$7$$) {
  $freshSuggestions$$2$$.get($values$$25$$[0]) && (this.$CacheServerSuggestionsList$($freshSuggestions$$2$$, "", $isMasterList$$7$$), $AdfSingleSelectInputSearchPeer$$.$superclass$.$UpdateDisplayValueAndSelection$.call(this, $component$$2372$$, $domElement$$622$$, $values$$25$$, $freshSuggestions$$2$$, $isMasterList$$7$$), this.$CacheServerSuggestionsList$(null));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.UpdateDisplayValueAndSelection", {$UpdateDisplayValueAndSelection$:$AdfSingleSelectInputSearchPeer$$.prototype.$UpdateDisplayValueAndSelection$});
$AdfSingleSelectInputSearchPeer$$.prototype.$__setComponentValue$ = function $$AdfSingleSelectInputSearchPeer$$$$$__setComponentValue$$($component$$2373$$, $newValue$$191$$) {
  var $oldValues$$13$$ = $AdfDhtmlInputSearchPeer$$.$GetValue$($component$$2373$$), $newValues$$22$$ = null === $newValue$$191$$ ? [] : [$newValue$$191$$];
  ($oldValues$$13$$.length ? $oldValues$$13$$[0] : null) != $newValue$$191$$ ? $AdfSingleSelectInputSearchPeer$$.$superclass$.$Validate$.call(this, $component$$2373$$, $newValues$$22$$) : (this.$DeriveAndSetDisplayValue$($component$$2373$$, this.$getDomElement$(), $newValues$$22$$), $AdfPage$$.$PAGE$.$clearMessages$($component$$2373$$.$getClientId$()));
  this.$HideSuggestionPopup$($component$$2373$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.__setComponentValue", {$__setComponentValue$:$AdfSingleSelectInputSearchPeer$$.prototype.$__setComponentValue$});
$AdfSingleSelectInputSearchPeer$$.$_isDisplayValueUpdatePossible$ = function $$AdfSingleSelectInputSearchPeer$$$$_isDisplayValueUpdatePossible$$($component$$2375$$, $domElement$$623$$, $suggestionMap$$12$$, $values$$26$$) {
  return "" == $AdfDhtmlEditableValuePeer$$.$getContentNodeText$($component$$2375$$, $domElement$$623$$) ? !0 : !!$suggestionMap$$12$$.get($values$$26$$[0]);
};
