import * as equalImpl from 'fast-deep-equal' ; /**
 * deep equal comparison
 */ export function equal ( a , b ) { const f = typeof equalImpl === 'function' ? equalImpl : ( equalImpl as any ) . default ; return f ( a , b ) ; } internal export function equalArrays < T > ( a , b ) { if ( a . length !== b . length ) { return false ; } return a . every ( ( ai , i ) => ai === b [ i ] ) ; } param id return { string | void } internal export function fixCSS ( id ) { return id . replace ( /[\s!#$%&'()*+,./:;<=>?@[\\\]^`{|}~]+/g , '_' ) ; } param node internal export function clear < T extends Node > ( node ) { while ( node . lastChild ) { node . removeChild ( node . lastChild ) ; } return node ; } internal param arrs export function concat < T > ( arrs ) { const r = [ ] ; for ( const a of arrs ) { if ( ! Array . isArray ( a ) ) { r . push ( a ) ; continue ; } for ( const ai of a ) { r . push ( ai ) ; } } return r ; } internal param method export function getSortLabel ( method ) { switch ( method ) { case 'min' : return 'Minimum' ; case 'max' : return 'Maximum' ; case 'median' : return 'Median' ; case 'mean' : return 'Mean' ; case 'q1' : return '25% Quantile' ; case 'q3' : return '75% Quantile' ; default : return String ( method ) ; } }