<commit_before>Discourse.SiteMapController = Ember.ArrayController.extend(Discourse.HasCurrentUser, {
  itemController: "siteMapCategory",

  showAdminLinks: function() {
    return this.get("currentUser.staff");
  }.property("currentUser.staff"),

  flaggedPostsCount: function() {
    return this.get("currentUser.site_flagged_posts_count");
  }.property("currentUser.site_flagged_posts_count"),

  faqUrl: function() {
    return Discourse.SiteSettings.faq_url ? Discourse.SiteSettings.faq_url : Discourse.getURL('/faq');
  }.property(),

  showMobileToggle: function() {
    return Discourse.SiteSettings.enable_mobile_theme;
  }.property(),

  mobileViewLinkTextKey: function() {
    return Discourse.Mobile.mobileView ? "desktop_view" : "mobile_view";
  }.property(),

  categories: function() {
    return Discourse.Category.list();
  }.property(),

  actions: {
    toggleMobileView: function() {<commit_msg>Don't show uncategorized in hamburger menu if it's empty, unless you're staff<commit_after>Discourse.SiteMapController = Ember.ArrayController.extend(Discourse.HasCurrentUser, {
  itemController: "siteMapCategory",

  showAdminLinks: function() {
    return this.get("currentUser.staff");
  }.property("currentUser.staff"),

  flaggedPostsCount: function() {
    return this.get("currentUser.site_flagged_posts_count");
  }.property("currentUser.site_flagged_posts_count"),

  faqUrl: function() {
    return Discourse.SiteSettings.faq_url ? Discourse.SiteSettings.faq_url : Discourse.getURL('/faq');
  }.property(),

  showMobileToggle: function() {
    return Discourse.SiteSettings.enable_mobile_theme;
  }.property(),

  mobileViewLinkTextKey: function() {
    return Discourse.Mobile.mobileView ? "desktop_view" : "mobile_view";
  }.property(),

  categories: function() {
    if (Discourse.SiteSettings.allow_uncategorized_topics) {
      return Discourse.Category.list();
    } else {
      // Exclude the uncategorized category if it's empty
      return Discourse.Category.list().reject(function(c) {
        return c.get('isUncategorizedCategory') && !Discourse.User.currentProp('staff');
      });
    }
  }.property(),

  actions: {
    toggleMobileView: function() {
{'fraction_non_alphanumeric': 0.13302961275626424, 'fraction_numerical': 0.0, 'mean_word_length': 4.856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '138941', 'n_tokens_mistral': 681, 'n_tokens_neox': 649, 'n_words': 108}