export function isIE11 ( ) { return ! ( ( window as any ) . ActiveXObject ) && 'ActiveXObject' in window ; } if ( typeof Math . sign === 'undefined' ) { Math . sign = function ( n ) : number { if ( n > 0 ) { return 1 ; } else if ( n < 0 ) { return - 1 ; } else { return 0 ; } } ; } if ( typeof Number . isNaN === 'undefined' ) { Number . isNaN = function ( value ) { return typeof value === 'number' && isNaN ( value ) ; } ; } if ( typeof Number . isFinite === 'undefined' ) { Number . isFinite = function ( n ) : boolean { return n !== Infinity && n !== - Infinity && ! Number . isNaN ( n ) ; } ; } if ( ! String . prototype . startsWith ) { String . prototype . startsWith = function ( search , pos ? ) { return this . substr ( ! pos || pos < 0 ? 0 : + pos , search . length ) === search ; } ; } if ( ! Array . prototype . find ) { const arrayFind = function ( this , predicate ) { if ( this == null ) { throw new TypeError ( '"this" is null or not defined' ) ; } var o = Object ( this ) ; var len = o . length >>> 0 ; if ( typeof predicate !== 'function' ) { throw new TypeError ( 'predicate must be a function' ) ; } var thisArg = arguments [ 1 ] ; var k = 0 ; while ( k < len ) { var kValue = o [ k ] ; if ( predicate . call ( thisArg , kValue , k , o ) ) { return kValue ; } k ++ ; } return undefined ; } ; Object . defineProperty ( Array . prototype , 'find' , { value : arrayFind } ) ; } if ( ! Array . prototype . findIndex ) { Object . defineProperty ( Array . prototype , 'findIndex' , { value : function ( predicate ) { if ( this == null ) { throw new TypeError ( '"this" is null or not defined' ) ; } var o = Object ( this ) ; var len = o . length >>> 0 ; if ( typeof predicate !== 'function' ) { throw new TypeError ( 'predicate must be a function' ) ; } var thisArg = arguments [ 1 ] ; var k = 0 ; while ( k < len ) { var kValue = o [ k ] ; if ( predicate . call ( thisArg , kValue , k , o ) ) { return k ; } k ++ ; } return - 1 ; } , configurable : true , writable : true } ) ; } ( function ( arr ) { arr . forEach ( function ( item ) { if ( item . hasOwnProperty ( 'remove' ) ) { return ; } Object . defineProperty ( item , 'remove' , { configurable : true , enumerable : true , writable : true , value : function remove ( this ) { if ( this . parentNode !== null ) { this . parentNode . removeChild ( this ) ; } } } ) ; } ) ; } ) ( [ Element . prototype , CharacterData . prototype , DocumentType . prototype ] ) ;