       hintsUsed: {}
     })
     @updateHint()
-    
+
     debouncedRender = _.debounce(@render)
     @listenTo(@state, 'change', debouncedRender)
     @listenTo(@hintsState, 'change', debouncedRender)

    @playSound 'menu-button-click'
    @updateHintTimer()

  hideView: -> @hintsState?.set('hidden', true)

  visibilityChanged: (e) ->
    @updateHintTimer()

    hintsViewTime[hintIndex] ?= 0
    hintsViewTime[hintIndex]++
    hintsUsed = @state.get('hintsUsed')
    if hintsViewTime[hintIndex] > @hintUsedThresholdSeconds and not hintsUsed[hintIndex]
      window.tracker?.trackEvent 'Hint Used', category: 'Students', levelSlug: @level.get('slug'), hintCount: @hintsState.get('hints')?.length ? 0, hintCurrent: hintIndex, ['Mixpanel']
      hintsUsed[hintIndex] = true
      @state.set('hintsUsed', hintsUsed)
      clearInterval(@timerIntervalID)
    @state.set('hintsViewTime', hintsViewTime)
