<commit_before>/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	var Exercise = __webpack_require__(1);
	var Food = __webpack_require__(15);

	$(document).ready(function () {

	  var holdFoods = document.getElementById("hold-foods-table");
	  var holdExercises = document.getElementById("hold-exercises-table");
	  var exercises = JSON.parse(localStorage.getItem("hold-exercises-table"));
	  var foods = JSON.parse(localStorage.getItem('hold-foods-table'));
	  var addBreakfast = document.getElementById("add-breakfast");
	  var addLunch = document.getElementById("add-lunch");
	  var addDinner = document.getElementById("add-dinner");
	  var addSnacks = document.getElementById("add-snack");
	  var addExercises = document.getElementById("add-exercise");
	  var holdBreakfast = document.getElementById("breakfast-table");
	  var holdLunch = document.getElementById("lunch-table");
	  var holdDinner = document.getElementById("dinner-table");
	  var holdSnacks = document.getElementById("snack-table");
	  var holdCompletedExercises = document.getElementById("completed-exercise-table");
	  var dateBlock = document.getElementById("date-holder");

	  $(addBreakfast).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdBreakfast);
<<<<<<< HEAD
	    calorieCounter();
=======
	    BreakfastCalorieCounter();
>>>>>>> master
	  });

	  $(addLunch).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdLunch);
	    LunchCalorieCounter();
	  });

	  $(addDinner).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdDinner);
	  });

	  $(addSnacks).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdSnacks);
	  });

	  $(addExercises).on("click", function (e) {
	    var selectedExercises = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedExercises, holdCompletedExercises);
	    storeDay(dateBlock.innerHTML);
	  });

	  function setTableItems(selectedItems, specificTable) {
	    for (var i = 0; i <= Object.keys(selectedItems).length; i++) {
	      var specificRow = selectedItems[i];
	      specificTable.innerHTML += specificRow.innerHTML;
	      var dateBlock = document.getElementById("date-holder");
<<<<<<< HEAD
	      calorieCounter();
=======
	      // calorieCounter();
>>>>>>> master
	      storeDay(dateBlock.innerHTML);
	    };
	  };

<<<<<<< HEAD
	  function calorieCounter() {
	    var calCells = document.querySelectorAll("#breakfast-table .f-count");

	    var total = 0;

	    for (var i = 0; i < calCells.length; i++) {
	      var thisCount = calCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    debugger;
	    var placeForCalories = document.getElementById('total-breakfast-cals');
	    placeForCalories.innerHTML = "Calorie Counter: " + total;
	  }

=======
	  function BreakfastCalorieCounter() {
	    var BreakCalCells = document.querySelectorAll("#breakfast-table .f-count");
	    var total = 0;
	    for (var i = 0; i < BreakCalCells.length; i++) {
	      var thisCount = BreakCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-breakfast-cals');
	    placeForCalories.innerHTML = "CALORIE COUNTER: " + total;
	  }

	  function LunchCalorieCounter() {
	    var LunchCalCells = document.querySelectorAll("#lunch-table .f-count");
	    var total = 0;
	    for (var i = 0; i < LunchCalCells.length; i++) {
	      var thisCount = LunchCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-lunch-cals');
	    placeForCalories.innerHTML = "CALORIE COUNTER: " + total;
	  }

	  // function BreakfastCalorieCounter() {
	  //   var calCells = document.querySelectorAll("#breakfast-table .f-count");
	  //   var total = 0
	  //   for(var i=0; i < calCells.length; i++) {
	  //     var thisCount = calCells[i].innerHTML;
	  //     total += parseInt(thisCount);
	  //   };
	  //   var placeForCalories = document.getElementById('total-breakfast-cals');
	  //   placeForCalories.innerHTML =  "CALORIE COUNTER: " + total;
	  // }
	  //
	  // function BreakfastCalorieCounter() {
	  //   var calCells = document.querySelectorAll("#breakfast-table .f-count");
	  //   var total = 0
	  //   for(var i=0; i < calCells.length; i++) {
	  //     var thisCount = calCells[i].innerHTML;
	  //     total += parseInt(thisCount);
	  //   };
	  //   var placeForCalories = document.getElementById('total-breakfast-cals');
	  //   placeForCalories.innerHTML =  "CALORIE COUNTER: " + total;
	  // }

>>>>>>> master
	  var storeDay = function (date) {
	    var diaryJSON = localStorage.getItem('diary');
	    if (diaryJSON === null) {
	      diaryJSON = '{}';
	    }
	    var allDays = JSON.parse(diaryJSON);

<<<<<<< HEAD
	    var breakfastArray = $('breakfast-table tr').slice(1).map(function (index, row) {
=======
	    var breakfastArray = $('#breakfast-table tr').map(function (index, row) {
>>>>>>> master
	      var foodName = row.cells[0].textContent;
	      var calories = row.cells[1].textContent;
	      return { name: foodName, calories: calories };
	    });

	    var lunchArray = $('#lunch-table tr').map(function (index, row) {
	      var foodName = row.cells[0].textContent;<commit_msg>fix merge conflicts<commit_after>/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	var Exercise = __webpack_require__(1);
	var Food = __webpack_require__(15);

	$(document).ready(function () {

	  var holdFoods = document.getElementById("hold-foods-table");
	  var holdExercises = document.getElementById("hold-exercises-table");
	  var exercises = JSON.parse(localStorage.getItem("hold-exercises-table"));
	  var foods = JSON.parse(localStorage.getItem('hold-foods-table'));
	  var addBreakfast = document.getElementById("add-breakfast");
	  var addLunch = document.getElementById("add-lunch");
	  var addDinner = document.getElementById("add-dinner");
	  var addSnacks = document.getElementById("add-snack");
	  var addExercises = document.getElementById("add-exercise");
	  var holdBreakfast = document.getElementById("breakfast-table");
	  var holdLunch = document.getElementById("lunch-table");
	  var holdDinner = document.getElementById("dinner-table");
	  var holdSnacks = document.getElementById("snack-table");
	  var holdCompletedExercises = document.getElementById("completed-exercise-table");
	  var dateBlock = document.getElementById("date-holder");

	  $(addBreakfast).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdBreakfast);
	    BreakfastCalorieCounter();
	  });

	  $(addLunch).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdLunch);
	    LunchCalorieCounter();
	  });

	  $(addDinner).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdDinner);
	    DinnerCalorieCounter();
	  });

	  $(addSnacks).on("click", function (e) {
	    var selectedFoods = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedFoods, holdSnacks);
	    SnackCalorieCounter();
	  });

	  $(addExercises).on("click", function (e) {
	    var selectedExercises = $('input[type=checkbox]:checked').parent().parent();
	    setTableItems(selectedExercises, holdCompletedExercises);
	    ExerciseCalorieCounter();
	    // storeDay(dateBlock.innerHTML);
	  });

	  function setTableItems(selectedItems, specificTable) {
	    for (var i = 0; i <= Object.keys(selectedItems).length; i++) {
	      var specificRow = selectedItems[i];
	      specificTable.innerHTML += specificRow.innerHTML;
	      var dateBlock = document.getElementById("date-holder");
	      BreakfastCalorieCounter();
	      LunchCalorieCounter();
	      DinnerCalorieCounter();
	      SnackCalorieCounter();
	      ExerciseCalorieCounter();
	      storeDay(dateBlock.innerHTML);
	    };
	  };

	  function BreakfastCalorieCounter() {
	    var BreakCalCells = document.querySelectorAll("#breakfast-table .f-count");

	    var total = 0;

	    for (var i = 0; i < BreakCalCells.length; i++) {
	      var thisCount = BreakCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-breakfast-cals');
	    placeForCalories.innerHTML = "CALORIE COUNTER: " + total;
	  }

	  function LunchCalorieCounter() {
	    var LunchCalCells = document.querySelectorAll("#lunch-table .f-count");
	    var total = 0;
	    for (var i = 0; i < LunchCalCells.length; i++) {
	      var thisCount = LunchCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-lunch-cals');
	    placeForCalories.innerHTML = "CALORIE COUNTER: " + total;
	  }

	  function LunchCalorieCounter() {
	    var LunchCalCells = document.querySelectorAll("#lunch-table .f-count");

	    var total = 0;

	    for (var i = 0; i < LunchCalCells.length; i++) {
	      var thisCount = LunchCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-lunch-cals');
	    placeForCalories.innerHTML = "Calorie Counter: " + total;
	  }

	  function DinnerCalorieCounter() {
	    var DinnerCalCells = document.querySelectorAll("#dinner-table .f-count");

	    var total = 0;

	    for (var i = 0; i < DinnerCalCells.length; i++) {
	      var thisCount = DinnerCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-dinner-cals');
	    placeForCalories.innerHTML = "Calorie Counter: " + total;
	  }

	  function SnackCalorieCounter() {
	    var SnackCalCells = document.querySelectorAll("#snack-table .f-count");

	    var total = 0;

	    for (var i = 0; i < SnackCalCells.length; i++) {
	      var thisCount = SnackCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-snack-cals');
	    placeForCalories.innerHTML = "Calorie Counter: " + total;
	  }

	  function ExerciseCalorieCounter() {
	    var ExerciseCalCells = document.querySelectorAll("#completed-exercise-table .ex-count");

	    var total = 0;

	    for (var i = 0; i < ExerciseCalCells.length; i++) {
	      var thisCount = ExerciseCalCells[i].innerHTML;
	      total += parseInt(thisCount);
	    };
	    var placeForCalories = document.getElementById('total-exercise-cals');
	    placeForCalories.innerHTML = "Calories Burned: " + total;
	  }

	  var storeDay = function (date) {
	    var diaryJSON = localStorage.getItem('diary');
	    if (diaryJSON === null) {
	      diaryJSON = '{}';
	    }
	    var allDays = JSON.parse(diaryJSON);

	    var breakfastArray = $('#breakfast-table tr').map(function (index, row) {
	      var foodName = row.cells[0].textContent;
	      var calories = row.cells[1].textContent;
	      return { name: foodName, calories: calories };
	    });

	    var lunchArray = $('#lunch-table tr').map(function (index, row) {
	      var foodName = row.cells[0].textContent;
{'fraction_non_alphanumeric': 0.18176678445229683, 'fraction_numerical': 0.0028975265017667845, 'mean_word_length': 3.5885214007782102, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 31, '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': '5236405', 'n_tokens_mistral': 4555, 'n_tokens_neox': 4190, 'n_words': 819}