license import { ɵComponentType as ComponentType } from '@angular/core' ; /**
 * Convert a camelCased string to kebab-cased.
 */ export function camelToDashCase ( input ) { return input . replace ( /[A-Z]/g , char => `-${ char . toLowerCase ( ) }` ) ; } /**
 * Create a `CustomEvent` (even on browsers where `CustomEvent` is not a constructor).
 */ export function createCustomEvent ( doc , name , detail ) { const bubbles = true ; const cancelable = false ; if ( typeof CustomEvent !== 'function' ) { const event = doc . createEvent ( 'CustomEvent' ) ; event . initCustomEvent ( name , bubbles , cancelable , detail ) ; return event ; } return new CustomEvent ( name , { bubbles , cancelable , detail } ) ; } /**
 * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.
 */ export function strictEquals ( value1 , value2 ) { return value1 === value2 || ( value1 !== value1 && value2 !== value2 ) ; } /** Gets a map of default set of attributes to observe and the properties they affect. */ export function getDefaultAttributeToPropertyInputs ( inputs ) { const attributeToPropertyInputs = { } ; inputs . forEach ( ( { propName } ) => { attributeToPropertyInputs [ camelToDashCase ( propName ) ] = propName ; } ) ; return attributeToPropertyInputs ; } /**
 * Gets a component's set of inputs.
 */ export function getComponentInputs ( component ) { const inputs = Object . keys ( component . ngComponentDef [ 'inputs' ] ) . map ( input => { return { propName : input , templateName : component . ngComponentDef [ 'inputs' ] [ input ] } ; } ) ; return inputs ; }