<commit_before>class Factlink.Balloon
  constructor: (fact) ->
    @_mouseOutTimeoutID = null
    @_loadingTimeoutID = null
    @_loading = false
    @_fact = fact

    @$el = $(Factlink.templates.indicator)
    @$el.appendTo(Factlink.el)
    @$el.bind "mouseenter", => @_fact.focus()
    @$el.bind "mouseleave", => @_fact.blur()
    @$el.bind "click", => @_fact.click()

  _hideAll: ->
    @$el.closest("#fl").find(".fl-popup").hide()

  show: (top, left, fast) ->
    window.clearTimeout @_mouseOutTimeoutID
    if fast
      @_hideAll()
      @$el.show()
    else
      @_mouseOutTimeoutID = window.setTimeout (=> @_hideAll(); @$el.fadeIn "fast"), 200

    Factlink.set_position_of_element top, left, window, @$el

  hide: (callback) ->
    window.clearTimeout @_mouseOutTimeoutID
    @$el.fadeOut "fast", callback
    @_fact.stopHighlighting()

  isVisible: ->
    @$el.is ":visible"

  destroy: ->
    @$el.remove()

  startLoading: ->
    @_loading = true
    @_loadingTimeoutID = setTimeout (=> @stopLoading()), 17000
    @$el.addClass "fl-loading"

  stopLoading: ->
    window.clearTimeout @_loadingTimeoutID
    @_loading = false
    @hide => @$el.removeClass "fl-loading"

  loading: -> @_loading<commit_msg>Removed `= null`s<commit_after>class Factlink.Balloon
  constructor: (fact) ->
    @_fact = fact

    @$el = $(Factlink.templates.indicator)
    @$el.appendTo(Factlink.el)
    @$el.bind "mouseenter", => @_fact.focus()
    @$el.bind "mouseleave", => @_fact.blur()
    @$el.bind "click", => @_fact.click()

  _hideAll: ->
    @$el.closest("#fl").find(".fl-popup").hide()

  show: (top, left, fast) ->
    window.clearTimeout @_mouseOutTimeoutID
    if fast
      @_hideAll()
      @$el.show()
    else
      @_mouseOutTimeoutID = window.setTimeout (=> @_hideAll(); @$el.fadeIn "fast"), 200

    Factlink.set_position_of_element top, left, window, @$el

  hide: (callback) ->
    window.clearTimeout @_mouseOutTimeoutID
    @$el.fadeOut "fast", callback
    @_fact.stopHighlighting()

  isVisible: ->
    @$el.is ":visible"

  destroy: ->
    @$el.remove()

  startLoading: ->
    @_loading = true
    @_loadingTimeoutID = setTimeout (=> @stopLoading()), 17000
    @$el.addClass "fl-loading"

  stopLoading: ->
    window.clearTimeout @_loadingTimeoutID
    @_loading = false
    @hide => @$el.removeClass "fl-loading"

  loading: -> !!@_loading
{'fraction_non_alphanumeric': 0.17153748411689962, 'fraction_numerical': 0.006776789495976281, 'mean_word_length': 3.217857142857143, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4539406', 'n_tokens_mistral': 870, 'n_tokens_neox': 825, 'n_words': 154}