<commit_before>Work = 

  populated: false

  paused: false
  timeout: 1000

  active: false

  gigs: [
    'likwid.jpg',
    'lively_card.jpg',
    'lw_labs.jpg',
    'perricone_blog.jpg',
    'lively_branding.jpg',
    'lively_product.jpg',
    'lw_site.jpg',
  ]

  populate:  (complete) ->

    Basal.jsonp 'structures', client: '590a61f45aa59b01b02e2ec2', null, 'Work.callback'

  callback: (data) ->

    for structure in data.data
      if structure.name is 'work'
        entries = structure.entries

    for entry, index in entries

      image = entry.entities.image.value
      thumbnail = entry.entities.thumbnail.value
      name = entry.name
      description = entry.entities.description.value


      gig = $ '<div />', 
        class: "gig off down gig_#{index}"
        style: "background-image: url(#{thumbnail})"

      gig.append  $ '<div />',
        class: 'image off'
        style: "background-image: url(#{image})"

      dot = $ '<div></div>', 
        class: "dot off dot_#{index}"
        'data-num': index

      dot.append $ '<div />', class: 'inner'

      copy = $ '<div />', 
        class: "copy off copy_#{index}"

      copy.append $ '<div />',
        class: 'ctitle'
        html: name

      copy.append $ '<div />',
        class: 'cdescription'
        html: description

      if index is 0
        _.on gig
        _.on dot
        _.on copy

      $('.section.work > .inner > .gigs').append gig
      $('.section.work > .inner > .dots').append dot
      $('.section.work > .inner > .copys').append copy

    $('.section.work > .inner > .gigs > .gig > .image.off').each (i, el) ->
      src = $(el).css('background-image').replace(/url\("?(.*?)"?\)/, "$1")
      image = new Image()
      image.src = src
      image.onload = ->
        _.on el

  i: ->
    @active = true
    @handlers.i()

  d: ->
    @active = false

  handlers: 

    i: ->
      $('.section.work > .inner > .dots > .dot').on 'click', @dot
    d: ->
      $('.section.work > .inner > .dots > .dot').off 'click', @dot

    dot: ->
      previous = $('.section.work > .inner > .dots > .dot.on').data 'num'
      current = $(this).data 'num'

      if previous < current
        Work.slide previous, current, 'down'
      else
        Work.slide previous, current, 'up'

  navigate: (direction) ->

    return true if Work.paused is true<commit_msg>proper deconstruct<commit_after>Work = 

  populated: false

  paused: false
  timeout: 1000

  active: false

  gigs: [
    'likwid.jpg',
    'lively_card.jpg',
    'lw_labs.jpg',
    'perricone_blog.jpg',
    'lively_branding.jpg',
    'lively_product.jpg',
    'lw_site.jpg',
  ]

  populate:  (complete) ->

    Basal.jsonp 'structures', client: '590a61f45aa59b01b02e2ec2', null, 'Work.callback'

  callback: (data) ->

    for structure in data.data
      if structure.name is 'work'
        entries = structure.entries

    for entry, index in entries

      image = entry.entities.image.value
      thumbnail = entry.entities.thumbnail.value
      name = entry.name
      description = entry.entities.description.value


      gig = $ '<div />', 
        class: "gig off down gig_#{index}"
        style: "background-image: url(#{thumbnail})"

      gig.append  $ '<div />',
        class: 'image off'
        style: "background-image: url(#{image})"

      dot = $ '<div></div>', 
        class: "dot off dot_#{index}"
        'data-num': index

      dot.append $ '<div />', class: 'inner'

      copy = $ '<div />', 
        class: "copy off copy_#{index}"

      copy.append $ '<div />',
        class: 'ctitle'
        html: name

      copy.append $ '<div />',
        class: 'cdescription'
        html: description

      if index is 0
        _.on gig
        _.on dot
        _.on copy

      $('.section.work > .inner > .gigs').append gig
      $('.section.work > .inner > .dots').append dot
      $('.section.work > .inner > .copys').append copy

    $('.section.work > .inner > .gigs > .gig > .image.off').each (i, el) ->
      src = $(el).css('background-image').replace(/url\("?(.*?)"?\)/, "$1")
      image = new Image()
      image.src = src
      image.onload = ->
        _.on el

  i: ->
    @active = true
    @handlers.i()

  d: ->
    @active = false
    @handlers.d()

  handlers: 

    i: ->
      $('.section.work > .inner > .dots > .dot').on 'click', @dot
    d: ->
      $('.section.work > .inner > .dots > .dot').off 'click', @dot

    dot: ->
      previous = $('.section.work > .inner > .dots > .dot.on').data 'num'
      current = $(this).data 'num'

      if previous < current
        Work.slide previous, current, 'down'
      else
        Work.slide previous, current, 'up'

  navigate: (direction) ->

    return true if Work.paused is true
{'fraction_non_alphanumeric': 0.16986301369863013, 'fraction_numerical': 0.008851422550052687, 'mean_word_length': 1.9886649874055415, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 77, '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': '3489333', 'n_tokens_mistral': 1642, 'n_tokens_neox': 1568, 'n_words': 381}