       @searching = false
       @updateSearchResult()
 
+
   calculate: (position) =>
     new StoreSupporterTagPrice(Math.floor(position / @RESOLUTION))
+
 
   onSliderValueChanged: (event, ui) =>
     @slider.dataset.lastValue = ui.value
     @cost = @calculate(ui.value)
     @updateCostDisplay()
+
 
   onInput: (event) =>
     if !@searching

      @updateSearchResult()
    @debouncedGetUser(event.currentTarget.value)

  setUserInteraction: (enabled) =>
    StoreCart.setEnabled(enabled)
    # TODO: need to elevate this element when switching over to new store design.
    $(@el).toggleClass('js-store--disabled', !enabled)
    $('.js-slider').slider('disabled': !enabled)

  sliderValue: (price) ->
    price * @RESOLUTION

  updateSearchResult: =>
    if @searching

      slide: @onSliderValueChanged
      change: @onSliderValueChanged


  initializeSliderPresets: =>
    $(@sliderPresets).on 'click', (event) =>
      target = event.currentTarget
      price = StoreSupporterTagPrice.durationToPrice(target.dataset.months)
      $(@slider).slider('value', @sliderValue(price)) if price


  initializeUsernameInput: =>
    $(@usernameInput).on 'input', @onInput


  getUser: (username) =>
    if !username # reset to current user on empty
