<commit_before>import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HttpClient } from '@angular/common/http';

import '@clr/icons';
import '@clr/icons/shapes/all-shapes';

import { ToastrModule } from 'ngx-toastr';

import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';

import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';

import { ClarityModule } from '@clr/angular';
import { SortablejsModule } from 'angular-sortablejs';
import { SharedModule } from './shared/shared.module';

import { reducer, metaReducers, reducerToken, reducerProvider } from './reducers';

import { QueryEffects } from './effects/query';
import { WindowsEffects } from './effects/windows';
import { QueryCollectionEffects } from './effects/query-collection';

import { DirectivesModule } from './directives';
import { ComponentModule } from './components';
import { DocViewerModule } from './components/doc-viewer/doc-viewer.module';
import { SmartInputModule } from './components/smart-input/smart-input.module';

import { AppComponent } from './containers/app/app.component';
import { WindowComponent } from './containers/window/window.component';


import * as services from './services';

// AoT requires an exported function for factories
export function createTranslateLoader(http: HttpClient) {
  // Using relative path to the translation files to ensure cross platform compatibility (majorly because of the electron apps)
  return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}

export function mapValuesToArray(obj: any): Array<any> {
    return Object.keys(obj).map(function(key) {
        return obj[key];
    });
};

const servicesArray: Array<any> = mapValuesToArray(services);

const providers = [
    services.ApiService,
    services.GqlService,
    services.DbService,
    services.QueryService,
    services.WindowService,
    services.NotifyService,
    services.DonationService,
    services.ElectronAppService,
    services.KeybinderService,
    services.StorageService,
    services.QueryCollectionService,
    services.EnvironmentService,
    reducerProvider,
];

@NgModule({
  declarations: [
    AppComponent,
    WindowComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpClientModule,
    SharedModule.forRoot(),
    ClarityModule,
    SortablejsModule.forRoot({ animation: 150 }),
    ComponentModule,
    DocViewerModule,
    SmartInputModule,
    DirectivesModule,
    StoreModule.forRoot(reducerToken, { metaReducers }),
    EffectsModule.forRoot([ QueryEffects, WindowsEffects, QueryCollectionEffects ]),
    StoreDevtoolsModule.instrument(),
    ToastrModule.forRoot({
      newestOnTop: false,
      closeButton: true,
      positionClass: 'toast-top-center',
      enableHtml: true,
    }),
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: createTranslateLoader,
        deps: [ HttpClient ]
      }
    }),
  ],
  providers: providers,
  bootstrap: [ AppComponent ]
})
export class AppModule { }
<commit_msg>Added CUSTOM_ELEMENTS_SCHEMA schema to app module.<commit_after>import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HttpClient } from '@angular/common/http';

import '@clr/icons';
import '@clr/icons/shapes/all-shapes';

import { ToastrModule } from 'ngx-toastr';

import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';

import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';

import { ClarityModule } from '@clr/angular';
import { SortablejsModule } from 'angular-sortablejs';
import { SharedModule } from './shared/shared.module';

import { reducer, metaReducers, reducerToken, reducerProvider } from './reducers';

import { QueryEffects } from './effects/query';
import { WindowsEffects } from './effects/windows';
import { QueryCollectionEffects } from './effects/query-collection';

import { DirectivesModule } from './directives';
import { ComponentModule } from './components';
import { DocViewerModule } from './components/doc-viewer/doc-viewer.module';
import { SmartInputModule } from './components/smart-input/smart-input.module';

import { AppComponent } from './containers/app/app.component';
import { WindowComponent } from './containers/window/window.component';


import * as services from './services';

// AoT requires an exported function for factories
export function createTranslateLoader(http: HttpClient) {
  // Using relative path to the translation files to ensure cross platform compatibility (majorly because of the electron apps)
  return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}

export function mapValuesToArray(obj: any): Array<any> {
    return Object.keys(obj).map(function(key) {
        return obj[key];
    });
};

const servicesArray: Array<any> = mapValuesToArray(services);

const providers = [
    services.ApiService,
    services.GqlService,
    services.DbService,
    services.QueryService,
    services.WindowService,
    services.NotifyService,
    services.DonationService,
    services.ElectronAppService,
    services.KeybinderService,
    services.StorageService,
    services.QueryCollectionService,
    services.EnvironmentService,
    reducerProvider,
];

@NgModule({
  declarations: [
    AppComponent,
    WindowComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpClientModule,
    SharedModule.forRoot(),
    ClarityModule,
    SortablejsModule.forRoot({ animation: 150 }),
    ComponentModule,
    DocViewerModule,
    SmartInputModule,
    DirectivesModule,
    StoreModule.forRoot(reducerToken, { metaReducers }),
    EffectsModule.forRoot([ QueryEffects, WindowsEffects, QueryCollectionEffects ]),
    StoreDevtoolsModule.instrument(),
    ToastrModule.forRoot({
      newestOnTop: false,
      closeButton: true,
      positionClass: 'toast-top-center',
      enableHtml: true,
    }),
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: createTranslateLoader,
        deps: [ HttpClient ]
      }
    }),
  ],
  providers: providers,
  bootstrap: [ AppComponent ],
  schemas: [
    CUSTOM_ELEMENTS_SCHEMA
  ]
})
export class AppModule { }

{'fraction_non_alphanumeric': 0.11678200692041522, 'fraction_numerical': 0.0014417531718569781, 'mean_word_length': 4.295419847328244, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6848749', 'n_tokens_mistral': 1994, 'n_tokens_neox': 1963, 'n_words': 450}