if ( ! Object . entries ) Object . entries = function ( obj ) { const data = [ ] ; for ( const key of Object . keys ( obj ) ) data . push ( [ key , obj [ key ] ] ) ; return data ; } ; if ( ! Object . values ) Object . values = function ( obj ) { const data = [ ] ; for ( const key of Object . keys ( obj ) ) data . push ( obj [ key ] ) ; return data ; } ; if ( typeof Element !== "undefined" ) { if ( ! Element . prototype . scrollTo ) Element . prototype . scrollTo = function ( x ? , y ? ) : void { if ( typeof x === "object" ) { this . scrollLeft = x . left ! ; this . scrollTop = x . top ! ; } else { this . scrollLeft = x ! ; this . scrollTop = y ! ; } } ; if ( ! Element . prototype . replaceWith ) Element . prototype . replaceWith = function ( ... nodes ) : void { const parent = this . parentNode ; if ( parent ) { if ( nodes . length === 0 ) parent . removeChild ( this ) ; for ( let i = nodes . length - 1 ; i >= 0 ; i -- ) { let node = nodes [ i ] ; if ( typeof node !== "object" ) node = document . createTextNode ( node ) ; else if ( node . parentNode ) node . parentNode . removeChild ( node ) ; if ( ! i ) parent . replaceChild ( node , this ) ; else parent . insertBefore ( this . previousSibling ! , node ) ; } } } ; }