<commit_before>(function poll() {
  if (typeof ynabToolKit !== 'undefined' && ynabToolKit.pageReady === true) {
    ynabToolKit.budgetBalanceToZero = (function () {
      return {
        budgetView: ynab.YNABSharedLib.getBudgetViewModel_AllBudgetMonthsViewModel()._result,

        invoke() {
          var categories = ynabToolKit.budgetBalanceToZero.getCategories();
          var categoryName = ynabToolKit.budgetBalanceToZero.getInspectorName();

          categories.forEach(function (f) {
            if (f.name === categoryName) {
              ynabToolKit.budgetBalanceToZero.updateInspectorButton(f);
            }
          });
        },

        observe(changedNodes) {
          if (changedNodes.has('budget-inspector')) {
            ynabToolKit.budgetBalanceToZero.invoke();
          }
        },

        getCategories() {
          if (ynabToolKit.budgetBalanceToZero === 'undefined') {
            return [];
          }

          // After using Budget Quick Switch, budgetView needs to be reset to the new budget.
          if (ynabToolKit.budgetBalanceToZero.budgetView.categoriesViewModel === null) {
            ynabToolKit.budgetBalanceToZero.budgetView = ynab.YNABSharedLib.
              getBudgetViewModel_AllBudgetMonthsViewModel()._result;
          }
          var categories = [];
          var masterCats = ynabToolKit.budgetBalanceToZero.budgetView
          .categoriesViewModel.masterCategoriesCollection._internalDataArray;
          var masterCategories = [];

          masterCats.forEach(function (c) {<commit_msg>Changes to handle like named sub-categories.<commit_after>(function poll() {
  if (typeof ynabToolKit !== 'undefined' && ynabToolKit.pageReady === true) {
    ynabToolKit.budgetBalanceToZero = (function () {
      return {
        budgetView: ynab.YNABSharedLib.getBudgetViewModel_AllBudgetMonthsViewModel()._result,

        invoke() {
          let categories = ynabToolKit.budgetBalanceToZero.getCategories();
          let categoryName = ynabToolKit.budgetBalanceToZero.getInspectorName();
          let masterCategoryViewId = $('ul.is-checked').prevAll('ul.is-master-category').attr('id');
          let masterCategory = ynabToolKit.shared.getEmberView(masterCategoryViewId).get('data');
          let masterCategoryId = masterCategory.get('categoryId');

          categories.forEach(function (f) {
            if (f.name === categoryName && f.masterCategoryId === masterCategoryId) {
              ynabToolKit.budgetBalanceToZero.updateInspectorButton(f);

              return false;
            }
          });
        },

        observe(changedNodes) {
          if (changedNodes.has('budget-inspector')) {
            ynabToolKit.budgetBalanceToZero.invoke();
          }
        },

        getCategories() {
          if (ynabToolKit.budgetBalanceToZero === 'undefined') {
            return [];
          }

          // After using Budget Quick Switch, budgetView needs to be reset to the new budget.
          if (ynabToolKit.budgetBalanceToZero.budgetView.categoriesViewModel === null) {
            ynabToolKit.budgetBalanceToZero.budgetView = ynab.YNABSharedLib.
              getBudgetViewModel_AllBudgetMonthsViewModel()._result;
          }
          var categories = [];
          var masterCats = ynabToolKit.budgetBalanceToZero.budgetView
          .categoriesViewModel.masterCategoriesCollection._internalDataArray;
          var masterCategories = [];

          masterCats.forEach(function (c) {
{'fraction_non_alphanumeric': 0.10146593848807128, 'fraction_numerical': 0.0, 'mean_word_length': 2.532994923857868, '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': '2978492', 'n_tokens_mistral': 963, 'n_tokens_neox': 959, 'n_words': 148}