<commit_before>
'use strict';

var angular = require('angular');
var angularRoute = require('angular-route');

var filters = require('./filters');
var localisationService = require('./services/localisationService');
var analyticsService = require('./services/analyticsService');

var viewMain = require('./views/main/main');
var viewAbout = require('./views/about/about');
var viewTax = require('./views/tax/tax');
var viewDetail = require('./views/detail/detail');

angular.module('myApp', [
	filters.name,
	localisationService.name,
	analyticsService.name,
	viewMain.name,
	viewAbout.name,
	viewTax.name,
	viewDetail.name,
	'ngRoute'
])
.config(function (
	$routeProvider, $provide
) {
	// handle pages / routing
	$routeProvider
		.when('/', { template: '<my:view-main></my:view-main>' })
		.when('/about', { template: '<my:view-about></my:view-about>' })
		.when('/tax', { template: '<my:view-tax></my:view-tax>' })
		.when('/project/:key', {
			template: function (params) {
				return '<my:view-detail data-key="' + params.key + '"></my:view-detail>';
			}
		})
		.otherwise({ redirectTo: '/' });

	// decorate the $q service with 'allSettled' which unlike 'all' resolves if a promise fails
	$provide.decorator('$q', function($delegate) {
		var $q = $delegate;
		$q.allSettled = function(promises) {<commit_msg>code tidy and ui-router todo<commit_after>
'use strict';

var angular = require('angular');
var angularRoute = require('angular-route');

var filters = require('./filters');
var localisationService = require('./services/localisationService');
var analyticsService = require('./services/analyticsService');

var viewMain = require('./views/main/main');
var viewAbout = require('./views/about/about');
var viewDetail = require('./views/detail/detail');
var viewTax = require('./views/tax/tax');

angular.module('myApp', [
	filters.name,
	localisationService.name,
	analyticsService.name,
	viewMain.name,
	viewAbout.name,
	viewDetail.name,
	viewTax.name,
	'ngRoute'
])
.config(function (
	$routeProvider, $provide
) {
	// TODO: Migrate to ui:router
	// handle pages / routing
	$routeProvider
		.when('/', { template: '<my:view-main></my:view-main>' })
		.when('/about', { template: '<my:view-about></my:view-about>' })
		.when('/project/:key', {
			template: function (params) {
				return '<my:view-detail data-key="' + params.key + '"></my:view-detail>';
			}
		})
		.when('/tax', { template: '<my:view-tax></my:view-tax>' })
		.otherwise({ redirectTo: '/' });

	// decorate the $q service with 'allSettled' which unlike 'all' resolves if a promise fails
	$provide.decorator('$q', function($delegate) {
		var $q = $delegate;
		$q.allSettled = function(promises) {
{'fraction_non_alphanumeric': 0.19529499626587005, 'fraction_numerical': 0.0, 'mean_word_length': 4.628151260504202, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '4389788', 'n_tokens_mistral': 902, 'n_tokens_neox': 859, 'n_words': 182}