<commit_before>_               = require 'underscore'
Backbone        = require 'backbone'
qs              = require 'querystring'
FairBrowseView  = require './view.coffee'

module.exports = class BrowseRouter extends Backbone.Router

  routes:
    ':id'                                  : 'booths'
    ':id/overview'                         : 'booths'
    ':id/browse/artists'                   : 'artists'
    ':id/browse/artist/:artist_id'         : 'artist'
    ':id/browse/booths'                    : 'booths'
    ':id/browse/booths/region/:region'     : 'boothsRegion'
    ':id/browse/booths/section/:section'   : 'boothsSection'
    ':id/browse/category/:category'        : 'category'
    ':id/browse/exhibitors'                : 'exhibitors'
    ':id/browse'                           : 'browse'

  initialize: (options) ->
    _.extend @, options
    { @boothParams, @artworkParams } = @view = new FairBrowseView
      el: $('#fair-browse')
      fair: @fair
      profile: @profile
      router: @

    Backbone.history.start pushState: true

  artist: (id, artistId) =>
    @boothParams.set artist: artistId

  booths: =>
    @boothParams.trigger 'change'

  boothsSection: (id, section) =>
    @boothParams.set section: section

  boothsRegion: (id, region) =>
    @boothParams.set region: region<commit_msg>catch slash as well<commit_after>_               = require 'underscore'
Backbone        = require 'backbone'
qs              = require 'querystring'
FairBrowseView  = require './view.coffee'

module.exports = class BrowseRouter extends Backbone.Router

  routes:
    ':id'                                  : 'booths'
    ':id/'                                 : 'booths'
    ':id/overview'                         : 'booths'
    ':id/browse/artists'                   : 'artists'
    ':id/browse/artist/:artist_id'         : 'artist'
    ':id/browse/booths'                    : 'booths'
    ':id/browse/booths/region/:region'     : 'boothsRegion'
    ':id/browse/booths/section/:section'   : 'boothsSection'
    ':id/browse/category/:category'        : 'category'
    ':id/browse/exhibitors'                : 'exhibitors'
    ':id/browse'                           : 'browse'

  initialize: (options) ->
    _.extend @, options
    { @boothParams, @artworkParams } = @view = new FairBrowseView
      el: $('#fair-browse')
      fair: @fair
      profile: @profile
      router: @

    Backbone.history.start pushState: true

  artist: (id, artistId) =>
    @boothParams.set artist: artistId

  booths: =>
    @boothParams.trigger 'change'

  boothsSection: (id, section) =>
    @boothParams.set section: section

  boothsRegion: (id, region) =>
    @boothParams.set region: region
{'fraction_non_alphanumeric': 0.13212435233160622, 'fraction_numerical': 0.0, 'mean_word_length': 1.9127155172413792, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7137708', 'n_tokens_mistral': 929, 'n_tokens_neox': 843, 'n_words': 160}