import { enableDebugTools , disableDebugTools } from '@angular/platform-browser' ; import { ApplicationRef , enableProdMode } from '@angular/core' ; let PROVIDERS = [ { provide : 'DEFAULT_USERNAME' , useValue : '_anonymous_' } , { provide : 'DEFAULT_PASSWORD' , useValue : '' } , { provide : 'SWELLRT_DOMAIN' , useValue : 'demo.swellrt.org' } , { provide : 'JETPAD_URL' , useValue : 'https://demo.jetpad.net' } , { provide : 'RECOVER_PASSWORD_URL' , useValue : 'https://demo.jetpad.net/recover/*$token*$user-id*' } ] ; let _decorateModuleRef = < T > ( value ) : T => { return value ; } ; if ( 'production' === ENV ) { enableProdMode ( ) ; _decorateModuleRef = ( modRef ) => { disableDebugTools ( ) ; return modRef ; } ; PROVIDERS = [ ... PROVIDERS , ] ; } else { _decorateModuleRef = ( modRef ) => { const appRef = modRef . injector . get ( ApplicationRef ) ; const cmpRef = appRef . components [ 0 ] ; let _ng = ( < any > window ) . ng ; enableDebugTools ( cmpRef ) ; ( < any > window ) . ng . probe = _ng . probe ; ( < any > window ) . ng . coreTokens = _ng . coreTokens ; return modRef ; } ; PROVIDERS = [ ... PROVIDERS , ] ; } export const decorateModuleRef = _decorateModuleRef ; export const ENV_PROVIDERS = [ ... PROVIDERS ] ;