<commit_before>import { Component, OnInit, OnDestroy, ViewChild, ElementRef, ViewChildren, QueryList, AfterViewInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { GridsterComponent, GridsterItemComponent, IGridsterOptions } from 'angular2gridster';
import * as ResizeSensor from 'css-element-queries/src/ResizeSensor';

import { config, getDefaultOptions } from '../modules/module-config';
import { Options } from '../modules/module-options';
import { AlertService } from '../../services/alert.service';
import { AuthService } from '../../services/auth.service';
import { ModulesService, Module } from '../../services/modules.service';
import { ScheduleService } from '../../services/schedule.service';
import { UserService } from '../../services/user.service';

@Component({
	selector: 'mymicds-home',
	templateUrl: './home.component.html',
	styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {

	@ViewChild('moduleContainer') moduleContainer: ElementRef;
	moduleWidth: number;
	moduleHeight: number;

	// Possibly show announcement (leave announcement as empty string for no announcement!)
	// tslint:disable-next-line:max-line-length
	announcement = 'MyMICDS now has a Twitter! <a class="alert-link" href="https://twitter.com/MyMICDS" target="_blank">Follow @MyMICDS</a> to get news on the latest features, announcements, and more!';
	dismissAnnouncement = false;
	showAnnouncement = true;

	routeDataSubscription: any;
	editMode = false;

	moduleLayoutSubscription: any;
	ogModuleLayout: Module[];
	moduleLayout: Module[];

	savingModuleLayout = false;

	// Different module names and module config
	moduleNames = Object.keys(config);
	modules = config;

	userSubscription: any;

	// Gridster component
	@ViewChild('gridster') gridster: GridsterComponent;
	@ViewChildren('gridItem') gridItems: QueryList<GridsterItemComponent>;
	// Gridster options
	gridsterOptions: IGridsterOptions = {
		direction: 'vertical',
		lanes: 4,
		widthHeightRatio: 1,
		dragAndDrop: false,
		resizable: false,
		shrink: false,
		responsiveView: true,
		responsiveOptions: [<commit_msg>Add to announcement for last day of school<commit_after>import { Component, OnInit, OnDestroy, ViewChild, ElementRef, ViewChildren, QueryList, AfterViewInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { GridsterComponent, GridsterItemComponent, IGridsterOptions } from 'angular2gridster';
import * as ResizeSensor from 'css-element-queries/src/ResizeSensor';

import { config, getDefaultOptions } from '../modules/module-config';
import { Options } from '../modules/module-options';
import { AlertService } from '../../services/alert.service';
import { AuthService } from '../../services/auth.service';
import { ModulesService, Module } from '../../services/modules.service';
import { ScheduleService } from '../../services/schedule.service';
import { UserService } from '../../services/user.service';

@Component({
	selector: 'mymicds-home',
	templateUrl: './home.component.html',
	styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {

	@ViewChild('moduleContainer') moduleContainer: ElementRef;
	moduleWidth: number;
	moduleHeight: number;

	// Possibly show announcement (leave announcement as empty string for no announcement!)
	// tslint:disable-next-line:max-line-length
	announcement = 'MyMICDS now has a Twitter! <a class="alert-link" href="https://twitter.com/MyMICDS" target="_blank">Follow @MyMICDS</a> to get news on the latest features, announcements, and more! <strong>Happy last day of school, everyone! 🎉</strong>';
	dismissAnnouncement = false;
	showAnnouncement = true;

	routeDataSubscription: any;
	editMode = false;

	moduleLayoutSubscription: any;
	ogModuleLayout: Module[];
	moduleLayout: Module[];

	savingModuleLayout = false;

	// Different module names and module config
	moduleNames = Object.keys(config);
	modules = config;

	userSubscription: any;

	// Gridster component
	@ViewChild('gridster') gridster: GridsterComponent;
	@ViewChildren('gridItem') gridItems: QueryList<GridsterItemComponent>;
	// Gridster options
	gridsterOptions: IGridsterOptions = {
		direction: 'vertical',
		lanes: 4,
		widthHeightRatio: 1,
		dragAndDrop: false,
		resizable: false,
		shrink: false,
		responsiveView: true,
		responsiveOptions: [
{'fraction_non_alphanumeric': 0.1291196388261851, 'fraction_numerical': 0.0013544018058690745, 'mean_word_length': 5.348137535816619, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '6014988', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1262, 'n_words': 346}