g a m e _ a v i a t o r \ j s \ b o o t s t r a p . b u n d l e . m i n . j s : ! f u n c t i o n ( t , e ) { " o b j e c t " = = t y p e o f   e x p o r t s & & " u n d e f i n e d " ! = t y p e o f   m o d u l e ? m o d u l e . e x p o r t s = e ( ) : " f u n c t i o n " = = t y p e o f   d e f i n e & & d e f i n e . a m d ? d e f i n e ( e ) : ( t = " u n d e f i n e d " ! = t y p e o f   g l o b a l T h i s ? g l o b a l T h i s : t | | s e l f ) . b o o t s t r a p = e ( ) } ( t h i s , ( f u n c t i o n ( ) { " u s e   s t r i c t " ; c o n s t   t = " t r a n s i t i o n e n d " , e = t = > { l e t   e = t . g e t A t t r i b u t e ( " d a t a - b s - t a r g e t " ) ; i f ( ! e | | " # " = = = e ) { l e t   i = t . g e t A t t r i b u t e ( " h r e f " ) ; i f ( ! i | | ! i . i n c l u d e s ( " # " ) & & ! i . s t a r t s W i t h ( " . " ) ) r e t u r n   n u l l ; i . i n c l u d e s ( " # " ) & & ! i . s t a r t s W i t h ( " # " ) & & ( i = ` # $ { i . s p l i t ( " # " ) [ 1 ] } ` ) , e = i & & " # " ! = = i ? i . t r i m ( ) : n u l l } r e t u r n   e } , i = t = > { c o n s t   i = e ( t ) ; r e t u r n   i & & d o c u m e n t . q u e r y S e l e c t o r ( i ) ? i : n u l l } , n = t = > { c o n s t   i = e ( t ) ; r e t u r n   i ? d o c u m e n t . q u e r y S e l e c t o r ( i ) : n u l l } , s = e = > { e . d i s p a t c h E v e n t ( n e w   E v e n t ( t ) ) } , o = t = > ! ( ! t | | " o b j e c t " ! = t y p e o f   t ) & & ( v o i d   0 ! = = t . j q u e r y & & ( t = t [ 0 ] ) , v o i d   0 ! = = t . n o d e T y p e ) , r = t = > o ( t ) ? t . j q u e r y ? t [ 0 ] : t : " s t r i n g " = = t y p e o f   t & & t . l e n g t h > 0 ? d o c u m e n t . q u e r y S e l e c t o r ( t ) : n u l l , a = ( t , e , i ) = > { O b j e c t . k e y s ( i ) . f o r E a c h ( ( n = > { c o n s t   s = i [ n ] , r = e [ n ] , a = r & & o ( r ) ? " e l e m e n t " : n u l l = = ( l = r ) ? ` $ { l } ` : { } . t o S t r i n g . c a l l ( l ) . m a t c h ( / \ s ( [ a - z ] + ) / i ) [ 1 ] . t o L o w e r C a s e ( ) ; v a r   l ; i f ( ! n e w   R e g E x p ( s ) . t e s t ( a ) ) t h r o w   n e w   T y p e E r r o r ( ` $ { t . t o U p p e r C a s e ( ) } :   O p t i o n   " $ { n } "   p r o v i d e d   t y p e   " $ { a } "   b u t   e x p e c t e d   t y p e   " $ { s } " . ` ) } ) ) } , l = t = > ! ( ! o ( t ) | | 0 = = = t . g e t C l i e n t R e c t s ( ) . l e n g t h ) & & " v i s i b l e " = = = g e t C o m p u t e d S t y l e ( t ) . g e t P r o p e r t y V a l u e ( " v i s i b i l i t y " ) , c = t = > ! t | | t . n o d e T y p e ! = = N o d e . E L E M E N T _ N O D E | | ! ! t . c l a s s L i s t . c o n t a i n s ( " d i s a b l e d " ) | | ( v o i d   0 ! = = t . d i s a b l e d ? t . d i s a b l e d : t . h a s A t t r i b u t e ( " d i s a b l e d " ) & & " f a l s e " ! = = t . g e t A t t r i b u t e ( " d i s a b l e d " ) ) , h = t = > { i f ( ! d o c u m e n t . d o c u m e n t E l e m e n t . a t t a c h S h a d o w ) r e t u r n   n u l l ; i f ( " f u n c t i o n " = = t y p e o f   t . g e t R o o t N o d e ) { c o n s t   e = t . g e t R o o t N o d e ( ) ; r e t u r n   e   i n s t a n c e o f   S h a d o w R o o t ? e : n u l l } r e t u r n   t   i n s t a n c e o f   S h a d o w R o o t ? t : t . p a r e n t N o d e ? h ( t . p a r e n t N o d e ) : n u l l } , d = ( ) = > { } , u = t = > { t . o f f s e t H e i g h t } , f = ( ) = > { c o n s t { j Q u e r y : t } = w i n d o w ; r e t u r n   t & & ! d o c u m e n t . b o d y . h a s A t t r i b u t e ( " d a t a - b s - n o - j q u e r y " ) ? t : n u l l } , p = [ ] , m = ( ) = > " r t l " = = = d o c u m e n t . d o c u m e n t E l e m e n t . d i r , g = t = > { v a r   e ; e = ( ) = > { c o n s t   e = f ( ) ; i f ( e ) { c o n s t   i = t . N A M E , n = e . f n [ i ] ; e . f n [ i ] = t . j Q u e r y I n t e r f a c e , e . f n [ i ] . C o n s t r u c t o r = t , e . f n [ i ] . n o C o n f l i c t = ( ) = > ( e . f n [ i ] = n , t . j Q u e r y I n t e r f a c e ) } } , " l o a d i n g " = = = d o c u m e n t . r e a d y S t a t e ? ( p . l e n g t h | | d o c u m e n t . a d d E v e n t L i s t e n e r ( " D O M C o n t e n t L o a d e d " , ( ( ) = > { p . f o r E a c h ( ( t = > t ( ) ) ) } ) ) , p . p u s h ( e ) ) : e ( ) } , _ = t = > { " f u n c t i o n " = = t y p e o f   t & & t ( ) } , b = ( e , i , n = ! 0 ) = > { i f ( ! n ) r e t u r n   v o i d   _ ( e ) ; c o n s t   o = ( t = > { i f ( ! t ) r e t u r n   0 ; l e t { t r a n s i t i o n D u r a t i o n : e , t r a n s i t i o n D e l a y : i } = w i n d o w . g e t C o m p u t e d S t y l e ( t ) ; c o n s t   n = N u m b e r . p a r s e F l o a t ( e ) , s = N u m b e r . p a r s e F l o a t ( i ) ; r e t u r n   n | | s ? ( e = e . s p l i t ( " , " ) [ 0 ] , i = i . s p l i t ( " , " ) [ 0 ] , 1 e 3 * ( N u m b e r . p a r s e F l o a t ( e ) + N u m b e r . p a r s e F l o a t ( i ) ) ) : 0 } ) ( i ) + 5 ; l e t   r = ! 1 ; c o n s t   a = ( { t a r g e t : n } ) = > { n = = = i & & ( r = ! 0 , i . r e m o v e E v e n t L i s t e n e r ( t , a ) , _ ( e ) ) } ; i . a d d E v e n t L i s t e n e r ( t , a ) , s e t T i m e o u t ( ( ( ) = > { r | | s ( i ) } ) , o ) } , v = ( t , e , i , n ) = > { l e t   s = t . i n d e x O f ( e ) ; i f ( - 1 = = = s ) r e t u r n   t [ ! i & & n ? t . l e n g t h - 1 : 0 ] ; c o n s t   o = t . l e n g t h ; r e t u r n   s + = i ? 1 : - 1 , n & & ( s = ( s + o ) % o ) , t [ M a t h . m a x ( 0 , M a t h . m i n ( s , o - 1 ) ) ] } , y = / [ ^ . ] * ( ? = \ . . * ) \ . | . * / , w = / \ . . * / , E = / : : \ d + $ / , A = { } ; l e t   T = 1 ; c o n s t   O = { m o u s e e n t e r : " m o u s e o v e r " , m o u s e l e a v e : " m o u s e o u t " } , C = / ^ ( m o u s e e n t e r | m o u s e l e a v e ) / i , k = n e w   S e t ( [ " c l i c k " , " d b l c l i c k " , " m o u s e u p " , " m o u s e d o w n " , " c o n t e x t m e n u " , " m o u s e w h e e l " , " D O M M o u s e S c r o l l " , " m o u s e o v e r " , " m o u s e o u t " , " m o u s e m o v e " , " s e l e c t s t a r t " , " s e l e c t e n d " , " k e y d o w n " , " k e y p r e s s " , " k e y u p " , " o r i e n t a t i o n c h a n g e " , " t o u c h s t a r t " , " t o u c h m o v e " , " t o u c h e n d " , " t o u c h c a n c e l " , " p o i n t e r d o w n " , " p o i n t e r m o v e " , " p o i n t e r u p " , " p o i n t e r l e a v e " , " p o i n t e r c a n c e l " , " g e s t u r e s t a r t " , " g e s t u r e c h a n g e " , " g e s t u r e e n d " , " f o c u s " , " b l u r " , " c h a n g e " , " r e s e t " , " s e l e c t " , " s u b m i t " , " f o c u s i n " , " f o c u s o u t " , " l o a d " , " u n l o a d " , " b e f o r e u n l o a d " , " r e s i z e " , " m o v e " , " D O M C o n t e n t L o a d e d " , " r e a d y s t a t e c h a n g e " , " e r r o r " , " a b o r t " , " s c r o l l " ] ) ; f u n c t i o n   L ( t , e ) { r e t u r n   e & & ` $ { e } : : $ { T + + } ` | | t . u i d E v e n t | | T + + } f u n c t i o n   x ( t ) { c o n s t   e = L ( t ) ; r e t u r n   t . u i d E v e n t = e , A [ e ] = A [ e ] | | { } , A [ e ] } f u n c t i o n   D ( t , e , i = n u l l ) { c o n s t   n = O b j e c t . k e y s ( t ) ; f o r ( l e t   s = 0 , o = n . l e n g t h ; s < o ; s + + ) { c o n s t   o = t [ n [ s ] ] ; i f ( o . o r i g i n a l H a n d l e r = = = e & & o . d e l e g a t i o n S e l e c t o r = = = i ) r e t u r n   o } r e t u r n   n u l l } f u n c t i o n   S ( t , e , i ) { c o n s t   n = " s t r i n g " = = t y p e o f   e , s = n ? i : e ; l e t   o = P ( t ) ; r e t u r n   k . h a s ( o ) | | ( o = t ) , [ n , s , o ] } f u n c t i o n   N ( t , e , i , n , s ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n ; i f ( i | | ( i = n , n = n u l l ) , C . t e s t ( e ) ) { c o n s t   t = t = > f u n c t i o n ( e ) { i f ( ! e . r e l a t e d T a r g e t | | e . r e l a t e d T a r g e t ! = = e . d e l e g a t e T a r g e t & & ! e . d e l e g a t e T a r g e t . c o n t a i n s ( e . r e l a t e d T a r g e t ) ) r e t u r n   t . c a l l ( t h i s , e ) } ; n ? n = t ( n ) : i = t ( i ) } c o n s t [ o , r , a ] = S ( e , i , n ) , l = x ( t ) , c = l [ a ] | | ( l [ a ] = { } ) , h = D ( c , r , o ? i : n u l l ) ; i f ( h ) r e t u r n   v o i d ( h . o n e O f f = h . o n e O f f & & s ) ; c o n s t   d = L ( r , e . r e p l a c e ( y , " " ) ) , u = o ? f u n c t i o n ( t , e , i ) { r e t u r n   f u n c t i o n   n ( s ) { c o n s t   o = t . q u e r y S e l e c t o r A l l ( e ) ; f o r ( l e t { t a r g e t : r } = s ; r & & r ! = = t h i s ; r = r . p a r e n t N o d e ) f o r ( l e t   a = o . l e n g t h ; a - - ; ) i f ( o [ a ] = = = r ) r e t u r n   s . d e l e g a t e T a r g e t = r , n . o n e O f f & & j . o f f ( t , s . t y p e , e , i ) , i . a p p l y ( r , [ s ] ) ; r e t u r n   n u l l } } ( t , i , n ) : f u n c t i o n ( t , e ) { r e t u r n   f u n c t i o n   i ( n ) { r e t u r n   n . d e l e g a t e T a r g e t = t , i . o n e O f f & & j . o f f ( t , n . t y p e , e ) , e . a p p l y ( t , [ n ] ) } } ( t , i ) ; u . d e l e g a t i o n S e l e c t o r = o ? i : n u l l , u . o r i g i n a l H a n d l e r = r , u . o n e O f f = s , u . u i d E v e n t = d , c [ d ] = u , t . a d d E v e n t L i s t e n e r ( a , u , o ) } f u n c t i o n   I ( t , e , i , n , s ) { c o n s t   o = D ( e [ i ] , n , s ) ; o & & ( t . r e m o v e E v e n t L i s t e n e r ( i , o , B o o l e a n ( s ) ) , d e l e t e   e [ i ] [ o . u i d E v e n t ] ) } f u n c t i o n   P ( t ) { r e t u r n   t = t . r e p l a c e ( w , " " ) , O [ t ] | | t } c o n s t   j = { o n ( t , e , i , n ) { N ( t , e , i , n , ! 1 ) } , o n e ( t , e , i , n ) { N ( t , e , i , n , ! 0 ) } , o f f ( t , e , i , n ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n ; c o n s t [ s , o , r ] = S ( e , i , n ) , a = r ! = = e , l = x ( t ) , c = e . s t a r t s W i t h ( " . " ) ; i f ( v o i d   0 ! = = o ) { i f ( ! l | | ! l [ r ] ) r e t u r n ; r e t u r n   v o i d   I ( t , l , r , o , s ? i : n u l l ) } c & & O b j e c t . k e y s ( l ) . f o r E a c h ( ( i = > { ! f u n c t i o n ( t , e , i , n ) { c o n s t   s = e [ i ] | | { } ; O b j e c t . k e y s ( s ) . f o r E a c h ( ( o = > { i f ( o . i n c l u d e s ( n ) ) { c o n s t   n = s [ o ] ; I ( t , e , i , n . o r i g i n a l H a n d l e r , n . d e l e g a t i o n S e l e c t o r ) } } ) ) } ( t , l , i , e . s l i c e ( 1 ) ) } ) ) ; c o n s t   h = l [ r ] | | { } ; O b j e c t . k e y s ( h ) . f o r E a c h ( ( i = > { c o n s t   n = i . r e p l a c e ( E , " " ) ; i f ( ! a | | e . i n c l u d e s ( n ) ) { c o n s t   e = h [ i ] ; I ( t , l , r , e . o r i g i n a l H a n d l e r , e . d e l e g a t i o n S e l e c t o r ) } } ) ) } , t r i g g e r ( t , e , i ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n   n u l l ; c o n s t   n = f ( ) , s = P ( e ) , o = e ! = = s , r = k . h a s ( s ) ; l e t   a , l = ! 0 , c = ! 0 , h = ! 1 , d = n u l l ; r e t u r n   o & & n & & ( a = n . E v e n t ( e , i ) , n ( t ) . t r i g g e r ( a ) , l = ! a . i s P r o p a g a t i o n S t o p p e d ( ) , c = ! a . i s I m m e d i a t e P r o p a g a t i o n S t o p p e d ( ) , h = a . i s D e f a u l t P r e v e n t e d ( ) ) , r ? ( d = d o c u m e n t . c r e a t e E v e n t ( " H T M L E v e n t s " ) , d . i n i t E v e n t ( s , l , ! 0 ) ) : d = n e w   C u s t o m E v e n t ( e , { b u b b l e s : l , c a n c e l a b l e : ! 0 } ) , v o i d   0 ! = = i & & O b j e c t . k e y s ( i ) . f o r E a c h ( ( t = > { O b j e c t . d e f i n e P r o p e r t y ( d , t , { g e t : ( ) = > i [ t ] } ) } ) ) , h & & d . p r e v e n t D e f a u l t ( ) , c & & t . d i s p a t c h E v e n t ( d ) , d . d e f a u l t P r e v e n t e d & & v o i d   0 ! = = a & & a . p r e v e n t D e f a u l t ( ) , d } } , M = n e w   M a p , H = { s e t ( t , e , i ) { M . h a s ( t ) | | M . s e t ( t , n e w   M a p ) ; c o n s t   n = M . g e t ( t ) ; n . h a s ( e ) | | 0 = = = n . s i z e ? n . s e t ( e , i ) : c o n s o l e . e r r o r ( ` B o o t s t r a p   d o e s n ' t   a l l o w   m o r e   t h a n   o n e   i n s t a n c e   p e r   e l e m e n t .   B o u n d   i n s t a n c e :   $ { A r r a y . f r o m ( n . k e y s ( ) ) [ 0 ] } . ` ) } , g e t : ( t , e ) = > M . h a s ( t ) & & M . g e t ( t ) . g e t ( e ) | | n u l l , r e m o v e ( t , e ) { i f ( ! M . h a s ( t ) ) r e t u r n ; c o n s t   i = M . g e t ( t ) ; i . d e l e t e ( e ) , 0 = = = i . s i z e & & M . d e l e t e ( t ) } } ; c l a s s   B { c o n s t r u c t o r ( t ) { ( t = r ( t ) ) & & ( t h i s . _ e l e m e n t = t , H . s e t ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . D A T A _ K E Y , t h i s ) ) } d i s p o s e ( ) { H . r e m o v e ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . D A T A _ K E Y ) , j . o f f ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E V E N T _ K E Y ) , O b j e c t . g e t O w n P r o p e r t y N a m e s ( t h i s ) . f o r E a c h ( ( t = > { t h i s [ t ] = n u l l } ) ) } _ q u e u e C a l l b a c k ( t , e , i = ! 0 ) { b ( t , e , i ) } s t a t i c   g e t I n s t a n c e ( t ) { r e t u r n   H . g e t ( r ( t ) , t h i s . D A T A _ K E Y ) } s t a t i c   g e t O r C r e a t e I n s t a n c e ( t , e = { } ) { r e t u r n   t h i s . g e t I n s t a n c e ( t ) | | n e w   t h i s ( t , " o b j e c t " = = t y p e o f   e ? e : n u l l ) } s t a t i c   g e t   V E R S I O N ( ) { r e t u r n " 5 . 1 . 3 " } s t a t i c   g e t   N A M E ( ) { t h r o w   n e w   E r r o r ( ' Y o u   h a v e   t o   i m p l e m e n t   t h e   s t a t i c   m e t h o d   " N A M E " ,   f o r   e a c h   c o m p o n e n t ! ' ) } s t a t i c   g e t   D A T A _ K E Y ( ) { r e t u r n ` b s . $ { t h i s . N A M E } ` } s t a t i c   g e t   E V E N T _ K E Y ( ) { r e t u r n ` . $ { t h i s . D A T A _ K E Y } ` } } c o n s t   R = ( t , e = " h i d e " ) = > { c o n s t   i = ` c l i c k . d i s m i s s $ { t . E V E N T _ K E Y } ` , s = t . N A M E ; j . o n ( d o c u m e n t , i , ` [ d a t a - b s - d i s m i s s = " $ { s } " ] ` , ( f u n c t i o n ( i ) { i f ( [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & i . p r e v e n t D e f a u l t ( ) , c ( t h i s ) ) r e t u r n ; c o n s t   o = n ( t h i s ) | | t h i s . c l o s e s t ( ` . $ { s } ` ) ; t . g e t O r C r e a t e I n s t a n c e ( o ) [ e ] ( ) } ) ) } ; c l a s s   W   e x t e n d s   B { s t a t i c   g e t   N A M E ( ) { r e t u r n " a l e r t " } c l o s e ( ) { i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " c l o s e . b s . a l e r t " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w " ) ; c o n s t   t = t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " f a d e " ) ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > t h i s . _ d e s t r o y E l e m e n t ( ) ) , t h i s . _ e l e m e n t , t ) } _ d e s t r o y E l e m e n t ( ) { t h i s . _ e l e m e n t . r e m o v e ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " c l o s e d . b s . a l e r t " ) , t h i s . d i s p o s e ( ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = W . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] | | t . s t a r t s W i t h ( " _ " ) | | " c o n s t r u c t o r " = = = t ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } R ( W , " c l o s e " ) , g ( W ) ; c o n s t   $ = ' [ d a t a - b s - t o g g l e = " b u t t o n " ] ' ; c l a s s   z   e x t e n d s   B { s t a t i c   g e t   N A M E ( ) { r e t u r n " b u t t o n " } t o g g l e ( ) { t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - p r e s s e d " , t h i s . _ e l e m e n t . c l a s s L i s t . t o g g l e ( " a c t i v e " ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = z . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; " t o g g l e " = = = t & & e [ t ] ( ) } ) ) } } f u n c t i o n   q ( t ) { r e t u r n " t r u e " = = = t | | " f a l s e " ! = = t & & ( t = = = N u m b e r ( t ) . t o S t r i n g ( ) ? N u m b e r ( t ) : " " = = = t | | " n u l l " = = = t ? n u l l : t ) } f u n c t i o n   F ( t ) { r e t u r n   t . r e p l a c e ( / [ A - Z ] / g , ( t = > ` - $ { t . t o L o w e r C a s e ( ) } ` ) ) } j . o n ( d o c u m e n t , " c l i c k . b s . b u t t o n . d a t a - a p i " , $ , ( t = > { t . p r e v e n t D e f a u l t ( ) ; c o n s t   e = t . t a r g e t . c l o s e s t ( $ ) ; z . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( ) } ) ) , g ( z ) ; c o n s t   U = { s e t D a t a A t t r i b u t e ( t , e , i ) { t . s e t A t t r i b u t e ( ` d a t a - b s - $ { F ( e ) } ` , i ) } , r e m o v e D a t a A t t r i b u t e ( t , e ) { t . r e m o v e A t t r i b u t e ( ` d a t a - b s - $ { F ( e ) } ` ) } , g e t D a t a A t t r i b u t e s ( t ) { i f ( ! t ) r e t u r n { } ; c o n s t   e = { } ; r e t u r n   O b j e c t . k e y s ( t . d a t a s e t ) . f i l t e r ( ( t = > t . s t a r t s W i t h ( " b s " ) ) ) . f o r E a c h ( ( i = > { l e t   n = i . r e p l a c e ( / ^ b s / , " " ) ; n = n . c h a r A t ( 0 ) . t o L o w e r C a s e ( ) + n . s l i c e ( 1 , n . l e n g t h ) , e [ n ] = q ( t . d a t a s e t [ i ] ) } ) ) , e } , g e t D a t a A t t r i b u t e : ( t , e ) = > q ( t . g e t A t t r i b u t e ( ` d a t a - b s - $ { F ( e ) } ` ) ) , o f f s e t ( t ) { c o n s t   e = t . g e t B o u n d i n g C l i e n t R e c t ( ) ; r e t u r n { t o p : e . t o p + w i n d o w . p a g e Y O f f s e t , l e f t : e . l e f t + w i n d o w . p a g e X O f f s e t } } , p o s i t i o n : t = > ( { t o p : t . o f f s e t T o p , l e f t : t . o f f s e t L e f t } ) } , V = { f i n d : ( t , e = d o c u m e n t . d o c u m e n t E l e m e n t ) = > [ ] . c o n c a t ( . . . E l e m e n t . p r o t o t y p e . q u e r y S e l e c t o r A l l . c a l l ( e , t ) ) , f i n d O n e : ( t , e = d o c u m e n t . d o c u m e n t E l e m e n t ) = > E l e m e n t . p r o t o t y p e . q u e r y S e l e c t o r . c a l l ( e , t ) , c h i l d r e n : ( t , e ) = > [ ] . c o n c a t ( . . . t . c h i l d r e n ) . f i l t e r ( ( t = > t . m a t c h e s ( e ) ) ) , p a r e n t s ( t , e ) { c o n s t   i = [ ] ; l e t   n = t . p a r e n t N o d e ; f o r ( ; n & & n . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E & & 3 ! = = n . n o d e T y p e ; ) n . m a t c h e s ( e ) & & i . p u s h ( n ) , n = n . p a r e n t N o d e ; r e t u r n   i } , p r e v ( t , e ) { l e t   i = t . p r e v i o u s E l e m e n t S i b l i n g ; f o r ( ; i ; ) { i f ( i . m a t c h e s ( e ) ) r e t u r n [ i ] ; i = i . p r e v i o u s E l e m e n t S i b l i n g } r e t u r n [ ] } , n e x t ( t , e ) { l e t   i = t . n e x t E l e m e n t S i b l i n g ; f o r ( ; i ; ) { i f ( i . m a t c h e s ( e ) ) r e t u r n [ i ] ; i = i . n e x t E l e m e n t S i b l i n g } r e t u r n [ ] } , f o c u s a b l e C h i l d r e n ( t ) { c o n s t   e = [ " a " , " b u t t o n " , " i n p u t " , " t e x t a r e a " , " s e l e c t " , " d e t a i l s " , " [ t a b i n d e x ] " , ' [ c o n t e n t e d i t a b l e = " t r u e " ] ' ] . m a p ( ( t = > ` $ { t } : n o t ( [ t a b i n d e x ^ = " - " ] ) ` ) ) . j o i n ( " ,   " ) ; r e t u r n   t h i s . f i n d ( e , t ) . f i l t e r ( ( t = > ! c ( t ) & & l ( t ) ) ) } } , K = " c a r o u s e l " , X = { i n t e r v a l : 5 e 3 , k e y b o a r d : ! 0 , s l i d e : ! 1 , p a u s e : " h o v e r " , w r a p : ! 0 , t o u c h : ! 0 } , Y = { i n t e r v a l : " ( n u m b e r | b o o l e a n ) " , k e y b o a r d : " b o o l e a n " , s l i d e : " ( b o o l e a n | s t r i n g ) " , p a u s e : " ( s t r i n g | b o o l e a n ) " , w r a p : " b o o l e a n " , t o u c h : " b o o l e a n " } , Q = " n e x t " , G = " p r e v " , Z = " l e f t " , J = " r i g h t " , t t = { A r r o w L e f t : J , A r r o w R i g h t : Z } , e t = " s l i d . b s . c a r o u s e l " , i t = " a c t i v e " , n t = " . a c t i v e . c a r o u s e l - i t e m " ; c l a s s   s t   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ i t e m s = n u l l , t h i s . _ i n t e r v a l = n u l l , t h i s . _ a c t i v e E l e m e n t = n u l l , t h i s . _ i s P a u s e d = ! 1 , t h i s . _ i s S l i d i n g = ! 1 , t h i s . t o u c h T i m e o u t = n u l l , t h i s . t o u c h S t a r t X = 0 , t h i s . t o u c h D e l t a X = 0 , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ i n d i c a t o r s E l e m e n t = V . f i n d O n e ( " . c a r o u s e l - i n d i c a t o r s " , t h i s . _ e l e m e n t ) , t h i s . _ t o u c h S u p p o r t e d = " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t | | n a v i g a t o r . m a x T o u c h P o i n t s > 0 , t h i s . _ p o i n t e r E v e n t = B o o l e a n ( w i n d o w . P o i n t e r E v e n t ) , t h i s . _ a d d E v e n t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   X } s t a t i c   g e t   N A M E ( ) { r e t u r n   K } n e x t ( ) { t h i s . _ s l i d e ( Q ) } n e x t W h e n V i s i b l e ( ) { ! d o c u m e n t . h i d d e n & & l ( t h i s . _ e l e m e n t ) & & t h i s . n e x t ( ) } p r e v ( ) { t h i s . _ s l i d e ( G ) } p a u s e ( t ) { t | | ( t h i s . _ i s P a u s e d = ! 0 ) , V . f i n d O n e ( " . c a r o u s e l - i t e m - n e x t ,   . c a r o u s e l - i t e m - p r e v " , t h i s . _ e l e m e n t ) & & ( s ( t h i s . _ e l e m e n t ) , t h i s . c y c l e ( ! 0 ) ) , c l e a r I n t e r v a l ( t h i s . _ i n t e r v a l ) , t h i s . _ i n t e r v a l = n u l l } c y c l e ( t ) { t | | ( t h i s . _ i s P a u s e d = ! 1 ) , t h i s . _ i n t e r v a l & & ( c l e a r I n t e r v a l ( t h i s . _ i n t e r v a l ) , t h i s . _ i n t e r v a l = n u l l ) , t h i s . _ c o n f i g & & t h i s . _ c o n f i g . i n t e r v a l & & ! t h i s . _ i s P a u s e d & & ( t h i s . _ u p d a t e I n t e r v a l ( ) , t h i s . _ i n t e r v a l = s e t I n t e r v a l ( ( d o c u m e n t . v i s i b i l i t y S t a t e ? t h i s . n e x t W h e n V i s i b l e : t h i s . n e x t ) . b i n d ( t h i s ) , t h i s . _ c o n f i g . i n t e r v a l ) ) } t o ( t ) { t h i s . _ a c t i v e E l e m e n t = V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) ; c o n s t   e = t h i s . _ g e t I t e m I n d e x ( t h i s . _ a c t i v e E l e m e n t ) ; i f ( t > t h i s . _ i t e m s . l e n g t h - 1 | | t < 0 ) r e t u r n ; i f ( t h i s . _ i s S l i d i n g ) r e t u r n   v o i d   j . o n e ( t h i s . _ e l e m e n t , e t , ( ( ) = > t h i s . t o ( t ) ) ) ; i f ( e = = = t ) r e t u r n   t h i s . p a u s e ( ) , v o i d   t h i s . c y c l e ( ) ; c o n s t   i = t > e ? Q : G ; t h i s . _ s l i d e ( i , t h i s . _ i t e m s [ t ] ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . X , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( K , t , Y ) , t } _ h a n d l e S w i p e ( ) { c o n s t   t = M a t h . a b s ( t h i s . t o u c h D e l t a X ) ; i f ( t < = 4 0 ) r e t u r n ; c o n s t   e = t / t h i s . t o u c h D e l t a X ; t h i s . t o u c h D e l t a X = 0 , e & & t h i s . _ s l i d e ( e > 0 ? J : Z ) } _ a d d E v e n t L i s t e n e r s ( ) { t h i s . _ c o n f i g . k e y b o a r d & & j . o n ( t h i s . _ e l e m e n t , " k e y d o w n . b s . c a r o u s e l " , ( t = > t h i s . _ k e y d o w n ( t ) ) ) , " h o v e r " = = = t h i s . _ c o n f i g . p a u s e & & ( j . o n ( t h i s . _ e l e m e n t , " m o u s e e n t e r . b s . c a r o u s e l " , ( t = > t h i s . p a u s e ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " m o u s e l e a v e . b s . c a r o u s e l " , ( t = > t h i s . c y c l e ( t ) ) ) ) , t h i s . _ c o n f i g . t o u c h & & t h i s . _ t o u c h S u p p o r t e d & & t h i s . _ a d d T o u c h E v e n t L i s t e n e r s ( ) } _ a d d T o u c h E v e n t L i s t e n e r s ( ) { c o n s t   t = t = > t h i s . _ p o i n t e r E v e n t & & ( " p e n " = = = t . p o i n t e r T y p e | | " t o u c h " = = = t . p o i n t e r T y p e ) , e = e = > { t ( e ) ? t h i s . t o u c h S t a r t X = e . c l i e n t X : t h i s . _ p o i n t e r E v e n t | | ( t h i s . t o u c h S t a r t X = e . t o u c h e s [ 0 ] . c l i e n t X ) } , i = t = > { t h i s . t o u c h D e l t a X = t . t o u c h e s & & t . t o u c h e s . l e n g t h > 1 ? 0 : t . t o u c h e s [ 0 ] . c l i e n t X - t h i s . t o u c h S t a r t X } , n = e = > { t ( e ) & & ( t h i s . t o u c h D e l t a X = e . c l i e n t X - t h i s . t o u c h S t a r t X ) , t h i s . _ h a n d l e S w i p e ( ) , " h o v e r " = = = t h i s . _ c o n f i g . p a u s e & & ( t h i s . p a u s e ( ) , t h i s . t o u c h T i m e o u t & & c l e a r T i m e o u t ( t h i s . t o u c h T i m e o u t ) , t h i s . t o u c h T i m e o u t = s e t T i m e o u t ( ( t = > t h i s . c y c l e ( t ) ) , 5 0 0 + t h i s . _ c o n f i g . i n t e r v a l ) ) } ; V . f i n d ( " . c a r o u s e l - i t e m   i m g " , t h i s . _ e l e m e n t ) . f o r E a c h ( ( t = > { j . o n ( t , " d r a g s t a r t . b s . c a r o u s e l " , ( t = > t . p r e v e n t D e f a u l t ( ) ) ) } ) ) , t h i s . _ p o i n t e r E v e n t ? ( j . o n ( t h i s . _ e l e m e n t , " p o i n t e r d o w n . b s . c a r o u s e l " , ( t = > e ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " p o i n t e r u p . b s . c a r o u s e l " , ( t = > n ( t ) ) ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " p o i n t e r - e v e n t " ) ) : ( j . o n ( t h i s . _ e l e m e n t , " t o u c h s t a r t . b s . c a r o u s e l " , ( t = > e ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " t o u c h m o v e . b s . c a r o u s e l " , ( t = > i ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " t o u c h e n d . b s . c a r o u s e l " , ( t = > n ( t ) ) ) ) } _ k e y d o w n ( t ) { i f ( / i n p u t | t e x t a r e a / i . t e s t ( t . t a r g e t . t a g N a m e ) ) r e t u r n ; c o n s t   e = t t [ t . k e y ] ; e & & ( t . p r e v e n t D e f a u l t ( ) , t h i s . _ s l i d e ( e ) ) } _ g e t I t e m I n d e x ( t ) { r e t u r n   t h i s . _ i t e m s = t & & t . p a r e n t N o d e ? V . f i n d ( " . c a r o u s e l - i t e m " , t . p a r e n t N o d e ) : [ ] , t h i s . _ i t e m s . i n d e x O f ( t ) } _ g e t I t e m B y O r d e r ( t , e ) { c o n s t   i = t = = = Q ; r e t u r n   v ( t h i s . _ i t e m s , e , i , t h i s . _ c o n f i g . w r a p ) } _ t r i g g e r S l i d e E v e n t ( t , e ) { c o n s t   i = t h i s . _ g e t I t e m I n d e x ( t ) , n = t h i s . _ g e t I t e m I n d e x ( V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) ) ; r e t u r n   j . t r i g g e r ( t h i s . _ e l e m e n t , " s l i d e . b s . c a r o u s e l " , { r e l a t e d T a r g e t : t , d i r e c t i o n : e , f r o m : n , t o : i } ) } _ s e t A c t i v e I n d i c a t o r E l e m e n t ( t ) { i f ( t h i s . _ i n d i c a t o r s E l e m e n t ) { c o n s t   e = V . f i n d O n e ( " . a c t i v e " , t h i s . _ i n d i c a t o r s E l e m e n t ) ; e . c l a s s L i s t . r e m o v e ( i t ) , e . r e m o v e A t t r i b u t e ( " a r i a - c u r r e n t " ) ; c o n s t   i = V . f i n d ( " [ d a t a - b s - t a r g e t ] " , t h i s . _ i n d i c a t o r s E l e m e n t ) ; f o r ( l e t   e = 0 ; e < i . l e n g t h ; e + + ) i f ( N u m b e r . p a r s e I n t ( i [ e ] . g e t A t t r i b u t e ( " d a t a - b s - s l i d e - t o " ) , 1 0 ) = = = t h i s . _ g e t I t e m I n d e x ( t ) ) { i [ e ] . c l a s s L i s t . a d d ( i t ) , i [ e ] . s e t A t t r i b u t e ( " a r i a - c u r r e n t " , " t r u e " ) ; b r e a k } } } _ u p d a t e I n t e r v a l ( ) { c o n s t   t = t h i s . _ a c t i v e E l e m e n t | | V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) ; i f ( ! t ) r e t u r n ; c o n s t   e = N u m b e r . p a r s e I n t ( t . g e t A t t r i b u t e ( " d a t a - b s - i n t e r v a l " ) , 1 0 ) ; e ? ( t h i s . _ c o n f i g . d e f a u l t I n t e r v a l = t h i s . _ c o n f i g . d e f a u l t I n t e r v a l | | t h i s . _ c o n f i g . i n t e r v a l , t h i s . _ c o n f i g . i n t e r v a l = e ) : t h i s . _ c o n f i g . i n t e r v a l = t h i s . _ c o n f i g . d e f a u l t I n t e r v a l | | t h i s . _ c o n f i g . i n t e r v a l } _ s l i d e ( t , e ) { c o n s t   i = t h i s . _ d i r e c t i o n T o O r d e r ( t ) , n = V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) , s = t h i s . _ g e t I t e m I n d e x ( n ) , o = e | | t h i s . _ g e t I t e m B y O r d e r ( i , n ) , r = t h i s . _ g e t I t e m I n d e x ( o ) , a = B o o l e a n ( t h i s . _ i n t e r v a l ) , l = i = = = Q , c = l ? " c a r o u s e l - i t e m - s t a r t " : " c a r o u s e l - i t e m - e n d " , h = l ? " c a r o u s e l - i t e m - n e x t " : " c a r o u s e l - i t e m - p r e v " , d = t h i s . _ o r d e r T o D i r e c t i o n ( i ) ; i f ( o & & o . c l a s s L i s t . c o n t a i n s ( i t ) ) r e t u r n   v o i d ( t h i s . _ i s S l i d i n g = ! 1 ) ; i f ( t h i s . _ i s S l i d i n g ) r e t u r n ; i f ( t h i s . _ t r i g g e r S l i d e E v e n t ( o , d ) . d e f a u l t P r e v e n t e d ) r e t u r n ; i f ( ! n | | ! o ) r e t u r n ; t h i s . _ i s S l i d i n g = ! 0 , a & & t h i s . p a u s e ( ) , t h i s . _ s e t A c t i v e I n d i c a t o r E l e m e n t ( o ) , t h i s . _ a c t i v e E l e m e n t = o ; c o n s t   f = ( ) = > { j . t r i g g e r ( t h i s . _ e l e m e n t , e t , { r e l a t e d T a r g e t : o , d i r e c t i o n : d , f r o m : s , t o : r } ) } ; i f ( t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s l i d e " ) ) { o . c l a s s L i s t . a d d ( h ) , u ( o ) , n . c l a s s L i s t . a d d ( c ) , o . c l a s s L i s t . a d d ( c ) ; c o n s t   t = ( ) = > { o . c l a s s L i s t . r e m o v e ( c , h ) , o . c l a s s L i s t . a d d ( i t ) , n . c l a s s L i s t . r e m o v e ( i t , h , c ) , t h i s . _ i s S l i d i n g = ! 1 , s e t T i m e o u t ( f , 0 ) } ; t h i s . _ q u e u e C a l l b a c k ( t , n , ! 0 ) } e l s e   n . c l a s s L i s t . r e m o v e ( i t ) , o . c l a s s L i s t . a d d ( i t ) , t h i s . _ i s S l i d i n g = ! 1 , f ( ) ; a & & t h i s . c y c l e ( ) } _ d i r e c t i o n T o O r d e r ( t ) { r e t u r n [ J , Z ] . i n c l u d e s ( t ) ? m ( ) ? t = = = Z ? G : Q : t = = = Z ? Q : G : t } _ o r d e r T o D i r e c t i o n ( t ) { r e t u r n [ Q , G ] . i n c l u d e s ( t ) ? m ( ) ? t = = = G ? Z : J : t = = = G ? J : Z : t } s t a t i c   c a r o u s e l I n t e r f a c e ( t , e ) { c o n s t   i = s t . g e t O r C r e a t e I n s t a n c e ( t , e ) ; l e t { _ c o n f i g : n } = i ; " o b j e c t " = = t y p e o f   e & & ( n = { . . . n , . . . e } ) ; c o n s t   s = " s t r i n g " = = t y p e o f   e ? e : n . s l i d e ; i f ( " n u m b e r " = = t y p e o f   e ) i . t o ( e ) ; e l s e   i f ( " s t r i n g " = = t y p e o f   s ) { i f ( v o i d   0 = = = i [ s ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { s } " ` ) ; i [ s ] ( ) } e l s e   n . i n t e r v a l & & n . r i d e & & ( i . p a u s e ( ) , i . c y c l e ( ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { s t . c a r o u s e l I n t e r f a c e ( t h i s , t ) } ) ) } s t a t i c   d a t a A p i C l i c k H a n d l e r ( t ) { c o n s t   e = n ( t h i s ) ; i f ( ! e | | ! e . c l a s s L i s t . c o n t a i n s ( " c a r o u s e l " ) ) r e t u r n ; c o n s t   i = { . . . U . g e t D a t a A t t r i b u t e s ( e ) , . . . U . g e t D a t a A t t r i b u t e s ( t h i s ) } , s = t h i s . g e t A t t r i b u t e ( " d a t a - b s - s l i d e - t o " ) ; s & & ( i . i n t e r v a l = ! 1 ) , s t . c a r o u s e l I n t e r f a c e ( e , i ) , s & & s t . g e t I n s t a n c e ( e ) . t o ( s ) , t . p r e v e n t D e f a u l t ( ) } } j . o n ( d o c u m e n t , " c l i c k . b s . c a r o u s e l . d a t a - a p i " , " [ d a t a - b s - s l i d e ] ,   [ d a t a - b s - s l i d e - t o ] " , s t . d a t a A p i C l i c k H a n d l e r ) , j . o n ( w i n d o w , " l o a d . b s . c a r o u s e l . d a t a - a p i " , ( ( ) = > { c o n s t   t = V . f i n d ( ' [ d a t a - b s - r i d e = " c a r o u s e l " ] ' ) ; f o r ( l e t   e = 0 , i = t . l e n g t h ; e < i ; e + + ) s t . c a r o u s e l I n t e r f a c e ( t [ e ] , s t . g e t I n s t a n c e ( t [ e ] ) ) } ) ) , g ( s t ) ; c o n s t   o t = " c o l l a p s e " , r t = { t o g g l e : ! 0 , p a r e n t : n u l l } , a t = { t o g g l e : " b o o l e a n " , p a r e n t : " ( n u l l | e l e m e n t ) " } , l t = " s h o w " , c t = " c o l l a p s e " , h t = " c o l l a p s i n g " , d t = " c o l l a p s e d " , u t = " : s c o p e   . c o l l a p s e   . c o l l a p s e " , f t = ' [ d a t a - b s - t o g g l e = " c o l l a p s e " ] ' ; c l a s s   p t   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ t r i g g e r A r r a y = [ ] ; c o n s t   n = V . f i n d ( f t ) ; f o r ( l e t   t = 0 , e = n . l e n g t h ; t < e ; t + + ) { c o n s t   e = n [ t ] , s = i ( e ) , o = V . f i n d ( s ) . f i l t e r ( ( t = > t = = = t h i s . _ e l e m e n t ) ) ; n u l l ! = = s & & o . l e n g t h & & ( t h i s . _ s e l e c t o r = s , t h i s . _ t r i g g e r A r r a y . p u s h ( e ) ) } t h i s . _ i n i t i a l i z e C h i l d r e n ( ) , t h i s . _ c o n f i g . p a r e n t | | t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( t h i s . _ t r i g g e r A r r a y , t h i s . _ i s S h o w n ( ) ) , t h i s . _ c o n f i g . t o g g l e & & t h i s . t o g g l e ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   r t } s t a t i c   g e t   N A M E ( ) { r e t u r n   o t } t o g g l e ( ) { t h i s . _ i s S h o w n ( ) ? t h i s . h i d e ( ) : t h i s . s h o w ( ) } s h o w ( ) { i f ( t h i s . _ i s T r a n s i t i o n i n g | | t h i s . _ i s S h o w n ( ) ) r e t u r n ; l e t   t , e = [ ] ; i f ( t h i s . _ c o n f i g . p a r e n t ) { c o n s t   t = V . f i n d ( u t , t h i s . _ c o n f i g . p a r e n t ) ; e = V . f i n d ( " . c o l l a p s e . s h o w ,   . c o l l a p s e . c o l l a p s i n g " , t h i s . _ c o n f i g . p a r e n t ) . f i l t e r ( ( e = > ! t . i n c l u d e s ( e ) ) ) } c o n s t   i = V . f i n d O n e ( t h i s . _ s e l e c t o r ) ; i f ( e . l e n g t h ) { c o n s t   n = e . f i n d ( ( t = > i ! = = t ) ) ; i f ( t = n ? p t . g e t I n s t a n c e ( n ) : n u l l , t & & t . _ i s T r a n s i t i o n i n g ) r e t u r n } i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . c o l l a p s e " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; e . f o r E a c h ( ( e = > { i ! = = e & & p t . g e t O r C r e a t e I n s t a n c e ( e , { t o g g l e : ! 1 } ) . h i d e ( ) , t | | H . s e t ( e , " b s . c o l l a p s e " , n u l l ) } ) ) ; c o n s t   n = t h i s . _ g e t D i m e n s i o n ( ) ; t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( c t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( h t ) , t h i s . _ e l e m e n t . s t y l e [ n ] = 0 , t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( t h i s . _ t r i g g e r A r r a y , ! 0 ) , t h i s . _ i s T r a n s i t i o n i n g = ! 0 ; c o n s t   s = ` s c r o l l $ { n [ 0 ] . t o U p p e r C a s e ( ) + n . s l i c e ( 1 ) } ` ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( h t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( c t , l t ) , t h i s . _ e l e m e n t . s t y l e [ n ] = " " , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . c o l l a p s e " ) } ) , t h i s . _ e l e m e n t , ! 0 ) , t h i s . _ e l e m e n t . s t y l e [ n ] = ` $ { t h i s . _ e l e m e n t [ s ] } p x ` } h i d e ( ) { i f ( t h i s . _ i s T r a n s i t i o n i n g | | ! t h i s . _ i s S h o w n ( ) ) r e t u r n ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . c o l l a p s e " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t   t = t h i s . _ g e t D i m e n s i o n ( ) ; t h i s . _ e l e m e n t . s t y l e [ t ] = ` $ { t h i s . _ e l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) [ t ] } p x ` , u ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( h t ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( c t , l t ) ; c o n s t   e = t h i s . _ t r i g g e r A r r a y . l e n g t h ; f o r ( l e t   t = 0 ; t < e ; t + + ) { c o n s t   e = t h i s . _ t r i g g e r A r r a y [ t ] , i = n ( e ) ; i & & ! t h i s . _ i s S h o w n ( i ) & & t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( [ e ] , ! 1 ) } t h i s . _ i s T r a n s i t i o n i n g = ! 0 , t h i s . _ e l e m e n t . s t y l e [ t ] = " " , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( h t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( c t ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . c o l l a p s e " ) } ) , t h i s . _ e l e m e n t , ! 0 ) } _ i s S h o w n ( t = t h i s . _ e l e m e n t ) { r e t u r n   t . c l a s s L i s t . c o n t a i n s ( l t ) } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . r t , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . t } ) . t o g g l e = B o o l e a n ( t . t o g g l e ) , t . p a r e n t = r ( t . p a r e n t ) , a ( o t , t , a t ) , t } _ g e t D i m e n s i o n ( ) { r e t u r n   t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " c o l l a p s e - h o r i z o n t a l " ) ? " w i d t h " : " h e i g h t " } _ i n i t i a l i z e C h i l d r e n ( ) { i f ( ! t h i s . _ c o n f i g . p a r e n t ) r e t u r n ; c o n s t   t = V . f i n d ( u t , t h i s . _ c o n f i g . p a r e n t ) ; V . f i n d ( f t , t h i s . _ c o n f i g . p a r e n t ) . f i l t e r ( ( e = > ! t . i n c l u d e s ( e ) ) ) . f o r E a c h ( ( t = > { c o n s t   e = n ( t ) ; e & & t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( [ t ] , t h i s . _ i s S h o w n ( e ) ) } ) ) } _ a d d A r i a A n d C o l l a p s e d C l a s s ( t , e ) { t . l e n g t h & & t . f o r E a c h ( ( t = > { e ? t . c l a s s L i s t . r e m o v e ( d t ) : t . c l a s s L i s t . a d d ( d t ) , t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , e ) } ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = { } ; " s t r i n g " = = t y p e o f   t & & / s h o w | h i d e / . t e s t ( t ) & & ( e . t o g g l e = ! 1 ) ; c o n s t   i = p t . g e t O r C r e a t e I n s t a n c e ( t h i s , e ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = i [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; i [ t ] ( ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . c o l l a p s e . d a t a - a p i " , f t , ( f u n c t i o n ( t ) { ( " A " = = = t . t a r g e t . t a g N a m e | | t . d e l e g a t e T a r g e t & & " A " = = = t . d e l e g a t e T a r g e t . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) ; c o n s t   e = i ( t h i s ) ; V . f i n d ( e ) . f o r E a c h ( ( t = > { p t . g e t O r C r e a t e I n s t a n c e ( t , { t o g g l e : ! 1 } ) . t o g g l e ( ) } ) ) } ) ) , g ( p t ) ; v a r   m t = " t o p " , g t = " b o t t o m " , _ t = " r i g h t " , b t = " l e f t " , v t = " a u t o " , y t = [ m t , g t , _ t , b t ] , w t = " s t a r t " , E t = " e n d " , A t = " c l i p p i n g P a r e n t s " , T t = " v i e w p o r t " , O t = " p o p p e r " , C t = " r e f e r e n c e " , k t = y t . r e d u c e ( ( f u n c t i o n ( t , e ) { r e t u r n   t . c o n c a t ( [ e + " - " + w t , e + " - " + E t ] ) } ) , [ ] ) , L t = [ ] . c o n c a t ( y t , [ v t ] ) . r e d u c e ( ( f u n c t i o n ( t , e ) { r e t u r n   t . c o n c a t ( [ e , e + " - " + w t , e + " - " + E t ] ) } ) , [ ] ) , x t = " b e f o r e R e a d " , D t = " r e a d " , S t = " a f t e r R e a d " , N t = " b e f o r e M a i n " , I t = " m a i n " , P t = " a f t e r M a i n " , j t = " b e f o r e W r i t e " , M t = " w r i t e " , H t = " a f t e r W r i t e " , B t = [ x t , D t , S t , N t , I t , P t , j t , M t , H t ] ; f u n c t i o n   R t ( t ) { r e t u r n   t ? ( t . n o d e N a m e | | " " ) . t o L o w e r C a s e ( ) : n u l l } f u n c t i o n   W t ( t ) { i f ( n u l l = = t ) r e t u r n   w i n d o w ; i f ( " [ o b j e c t   W i n d o w ] " ! = = t . t o S t r i n g ( ) ) { v a r   e = t . o w n e r D o c u m e n t ; r e t u r n   e & & e . d e f a u l t V i e w | | w i n d o w } r e t u r n   t } f u n c t i o n   $ t ( t ) { r e t u r n   t   i n s t a n c e o f   W t ( t ) . E l e m e n t | | t   i n s t a n c e o f   E l e m e n t } f u n c t i o n   z t ( t ) { r e t u r n   t   i n s t a n c e o f   W t ( t ) . H T M L E l e m e n t | | t   i n s t a n c e o f   H T M L E l e m e n t } f u n c t i o n   q t ( t ) { r e t u r n " u n d e f i n e d " ! = t y p e o f   S h a d o w R o o t & & ( t   i n s t a n c e o f   W t ( t ) . S h a d o w R o o t | | t   i n s t a n c e o f   S h a d o w R o o t ) } c o n s t   F t = { n a m e : " a p p l y S t y l e s " , e n a b l e d : ! 0 , p h a s e : " w r i t e " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e ; O b j e c t . k e y s ( e . e l e m e n t s ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   i = e . s t y l e s [ t ] | | { } , n = e . a t t r i b u t e s [ t ] | | { } , s = e . e l e m e n t s [ t ] ; z t ( s ) & & R t ( s ) & & ( O b j e c t . a s s i g n ( s . s t y l e , i ) , O b j e c t . k e y s ( n ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   e = n [ t ] ; ! 1 = = = e ? s . r e m o v e A t t r i b u t e ( t ) : s . s e t A t t r i b u t e ( t , ! 0 = = = e ? " " : e ) } ) ) ) } ) ) } , e f f e c t : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = { p o p p e r : { p o s i t i o n : e . o p t i o n s . s t r a t e g y , l e f t : " 0 " , t o p : " 0 " , m a r g i n : " 0 " } , a r r o w : { p o s i t i o n : " a b s o l u t e " } , r e f e r e n c e : { } } ; r e t u r n   O b j e c t . a s s i g n ( e . e l e m e n t s . p o p p e r . s t y l e , i . p o p p e r ) , e . s t y l e s = i , e . e l e m e n t s . a r r o w & & O b j e c t . a s s i g n ( e . e l e m e n t s . a r r o w . s t y l e , i . a r r o w ) , f u n c t i o n ( ) { O b j e c t . k e y s ( e . e l e m e n t s ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   n = e . e l e m e n t s [ t ] , s = e . a t t r i b u t e s [ t ] | | { } , o = O b j e c t . k e y s ( e . s t y l e s . h a s O w n P r o p e r t y ( t ) ? e . s t y l e s [ t ] : i [ t ] ) . r e d u c e ( ( f u n c t i o n ( t , e ) { r e t u r n   t [ e ] = " " , t } ) , { } ) ; z t ( n ) & & R t ( n ) & & ( O b j e c t . a s s i g n ( n . s t y l e , o ) , O b j e c t . k e y s ( s ) . f o r E a c h ( ( f u n c t i o n ( t ) { n . r e m o v e A t t r i b u t e ( t ) } ) ) ) } ) ) } } , r e q u i r e s : [ " c o m p u t e S t y l e s " ] } ; f u n c t i o n   U t ( t ) { r e t u r n   t . s p l i t ( " - " ) [ 0 ] } f u n c t i o n   V t ( t , e ) { v a r   i = t . g e t B o u n d i n g C l i e n t R e c t ( ) ; r e t u r n { w i d t h : i . w i d t h / 1 , h e i g h t : i . h e i g h t / 1 , t o p : i . t o p / 1 , r i g h t : i . r i g h t / 1 , b o t t o m : i . b o t t o m / 1 , l e f t : i . l e f t / 1 , x : i . l e f t / 1 , y : i . t o p / 1 } } f u n c t i o n   K t ( t ) { v a r   e = V t ( t ) , i = t . o f f s e t W i d t h , n = t . o f f s e t H e i g h t ; r e t u r n   M a t h . a b s ( e . w i d t h - i ) < = 1 & & ( i = e . w i d t h ) , M a t h . a b s ( e . h e i g h t - n ) < = 1 & & ( n = e . h e i g h t ) , { x : t . o f f s e t L e f t , y : t . o f f s e t T o p , w i d t h : i , h e i g h t : n } } f u n c t i o n   X t ( t , e ) { v a r   i = e . g e t R o o t N o d e & & e . g e t R o o t N o d e ( ) ; i f ( t . c o n t a i n s ( e ) ) r e t u r n ! 0 ; i f ( i & & q t ( i ) ) { v a r   n = e ; d o { i f ( n & & t . i s S a m e N o d e ( n ) ) r e t u r n ! 0 ; n = n . p a r e n t N o d e | | n . h o s t } w h i l e ( n ) } r e t u r n ! 1 } f u n c t i o n   Y t ( t ) { r e t u r n   W t ( t ) . g e t C o m p u t e d S t y l e ( t ) } f u n c t i o n   Q t ( t ) { r e t u r n [ " t a b l e " , " t d " , " t h " ] . i n d e x O f ( R t ( t ) ) > = 0 } f u n c t i o n   G t ( t ) { r e t u r n ( ( $ t ( t ) ? t . o w n e r D o c u m e n t : t . d o c u m e n t ) | | w i n d o w . d o c u m e n t ) . d o c u m e n t E l e m e n t } f u n c t i o n   Z t ( t ) { r e t u r n " h t m l " = = = R t ( t ) ? t : t . a s s i g n e d S l o t | | t . p a r e n t N o d e | | ( q t ( t ) ? t . h o s t : n u l l ) | | G t ( t ) } f u n c t i o n   J t ( t ) { r e t u r n   z t ( t ) & & " f i x e d " ! = = Y t ( t ) . p o s i t i o n ? t . o f f s e t P a r e n t : n u l l } f u n c t i o n   t e ( t ) { f o r ( v a r   e = W t ( t ) , i = J t ( t ) ; i & & Q t ( i ) & & " s t a t i c " = = = Y t ( i ) . p o s i t i o n ; ) i = J t ( i ) ; r e t u r n   i & & ( " h t m l " = = = R t ( i ) | | " b o d y " = = = R t ( i ) & & " s t a t i c " = = = Y t ( i ) . p o s i t i o n ) ? e : i | | f u n c t i o n ( t ) { v a r   e = - 1 ! = = n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) . i n d e x O f ( " f i r e f o x " ) ; i f ( - 1 ! = = n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " T r i d e n t " ) & & z t ( t ) & & " f i x e d " = = = Y t ( t ) . p o s i t i o n ) r e t u r n   n u l l ; f o r ( v a r   i = Z t ( t ) ; z t ( i ) & & [ " h t m l " , " b o d y " ] . i n d e x O f ( R t ( i ) ) < 0 ; ) { v a r   n = Y t ( i ) ; i f ( " n o n e " ! = = n . t r a n s f o r m | | " n o n e " ! = = n . p e r s p e c t i v e | | " p a i n t " = = = n . c o n t a i n | | - 1 ! = = [ " t r a n s f o r m " , " p e r s p e c t i v e " ] . i n d e x O f ( n . w i l l C h a n g e ) | | e & & " f i l t e r " = = = n . w i l l C h a n g e | | e & & n . f i l t e r & & " n o n e " ! = = n . f i l t e r ) r e t u r n   i ; i = i . p a r e n t N o d e } r e t u r n   n u l l } ( t ) | | e } f u n c t i o n   e e ( t ) { r e t u r n [ " t o p " , " b o t t o m " ] . i n d e x O f ( t ) > = 0 ? " x " : " y " } v a r   i e = M a t h . m a x , n e = M a t h . m i n , s e = M a t h . r o u n d ; f u n c t i o n   o e ( t , e , i ) { r e t u r n   i e ( t , n e ( e , i ) ) } f u n c t i o n   r e ( t ) { r e t u r n   O b j e c t . a s s i g n ( { } , { t o p : 0 , r i g h t : 0 , b o t t o m : 0 , l e f t : 0 } , t ) } f u n c t i o n   a e ( t , e ) { r e t u r n   e . r e d u c e ( ( f u n c t i o n ( e , i ) { r e t u r n   e [ i ] = t , e } ) , { } ) } c o n s t   l e = { n a m e : " a r r o w " , e n a b l e d : ! 0 , p h a s e : " m a i n " , f n : f u n c t i o n ( t ) { v a r   e , i = t . s t a t e , n = t . n a m e , s = t . o p t i o n s , o = i . e l e m e n t s . a r r o w , r = i . m o d i f i e r s D a t a . p o p p e r O f f s e t s , a = U t ( i . p l a c e m e n t ) , l = e e ( a ) , c = [ b t , _ t ] . i n d e x O f ( a ) > = 0 ? " h e i g h t " : " w i d t h " ; i f ( o & & r ) { v a r   h = f u n c t i o n ( t , e ) { r e t u r n   r e ( " n u m b e r " ! = t y p e o f ( t = " f u n c t i o n " = = t y p e o f   t ? t ( O b j e c t . a s s i g n ( { } , e . r e c t s , { p l a c e m e n t : e . p l a c e m e n t } ) ) : t ) ? t : a e ( t , y t ) ) } ( s . p a d d i n g , i ) , d = K t ( o ) , u = " y " = = = l ? m t : b t , f = " y " = = = l ? g t : _ t , p = i . r e c t s . r e f e r e n c e [ c ] + i . r e c t s . r e f e r e n c e [ l ] - r [ l ] - i . r e c t s . p o p p e r [ c ] , m = r [ l ] - i . r e c t s . r e f e r e n c e [ l ] , g = t e ( o ) , _ = g ? " y " = = = l ? g . c l i e n t H e i g h t | | 0 : g . c l i e n t W i d t h | | 0 : 0 , b = p / 2 - m / 2 , v = h [ u ] , y = _ - d [ c ] - h [ f ] , w = _ / 2 - d [ c ] / 2 + b , E = o e ( v , w , y ) , A = l ; i . m o d i f i e r s D a t a [ n ] = ( ( e = { } ) [ A ] = E , e . c e n t e r O f f s e t = E - w , e ) } } , e f f e c t : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s . e l e m e n t , n = v o i d   0 = = = i ? " [ d a t a - p o p p e r - a r r o w ] " : i ; n u l l ! = n & & ( " s t r i n g " ! = t y p e o f   n | | ( n = e . e l e m e n t s . p o p p e r . q u e r y S e l e c t o r ( n ) ) ) & & X t ( e . e l e m e n t s . p o p p e r , n ) & & ( e . e l e m e n t s . a r r o w = n ) } , r e q u i r e s : [ " p o p p e r O f f s e t s " ] , r e q u i r e s I f E x i s t s : [ " p r e v e n t O v e r f l o w " ] } ; f u n c t i o n   c e ( t ) { r e t u r n   t . s p l i t ( " - " ) [ 1 ] } v a r   h e = { t o p : " a u t o " , r i g h t : " a u t o " , b o t t o m : " a u t o " , l e f t : " a u t o " } ; f u n c t i o n   d e ( t ) { v a r   e , i = t . p o p p e r , n = t . p o p p e r R e c t , s = t . p l a c e m e n t , o = t . v a r i a t i o n , r = t . o f f s e t s , a = t . p o s i t i o n , l = t . g p u A c c e l e r a t i o n , c = t . a d a p t i v e , h = t . r o u n d O f f s e t s , d = ! 0 = = = h ? f u n c t i o n ( t ) { v a r   e = t . x , i = t . y , n = w i n d o w . d e v i c e P i x e l R a t i o | | 1 ; r e t u r n { x : s e ( s e ( e * n ) / n ) | | 0 , y : s e ( s e ( i * n ) / n ) | | 0 } } ( r ) : " f u n c t i o n " = = t y p e o f   h ? h ( r ) : r , u = d . x , f = v o i d   0 = = = u ? 0 : u , p = d . y , m = v o i d   0 = = = p ? 0 : p , g = r . h a s O w n P r o p e r t y ( " x " ) , _ = r . h a s O w n P r o p e r t y ( " y " ) , b = b t , v = m t , y = w i n d o w ; i f ( c ) { v a r   w = t e ( i ) , E = " c l i e n t H e i g h t " , A = " c l i e n t W i d t h " ; w = = = W t ( i ) & & " s t a t i c " ! = = Y t ( w = G t ( i ) ) . p o s i t i o n & & " a b s o l u t e " = = = a & & ( E = " s c r o l l H e i g h t " , A = " s c r o l l W i d t h " ) , w = w , s ! = = m t & & ( s ! = = b t & & s ! = = _ t | | o ! = = E t ) | | ( v = g t , m - = w [ E ] - n . h e i g h t , m * = l ? 1 : - 1 ) , s ! = = b t & & ( s ! = = m t & & s ! = = g t | | o ! = = E t ) | | ( b = _ t , f - = w [ A ] - n . w i d t h , f * = l ? 1 : - 1 ) } v a r   T , O = O b j e c t . a s s i g n ( { p o s i t i o n : a } , c & & h e ) ; r e t u r n   l ? O b j e c t . a s s i g n ( { } , O , ( ( T = { } ) [ v ] = _ ? " 0 " : " " , T [ b ] = g ? " 0 " : " " , T . t r a n s f o r m = ( y . d e v i c e P i x e l R a t i o | | 1 ) < = 1 ? " t r a n s l a t e ( " + f + " p x ,   " + m + " p x ) " : " t r a n s l a t e 3 d ( " + f + " p x ,   " + m + " p x ,   0 ) " , T ) ) : O b j e c t . a s s i g n ( { } , O , ( ( e = { } ) [ v ] = _ ? m + " p x " : " " , e [ b ] = g ? f + " p x " : " " , e . t r a n s f o r m = " " , e ) ) } c o n s t   u e = { n a m e : " c o m p u t e S t y l e s " , e n a b l e d : ! 0 , p h a s e : " b e f o r e W r i t e " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = i . g p u A c c e l e r a t i o n , s = v o i d   0 = = = n | | n , o = i . a d a p t i v e , r = v o i d   0 = = = o | | o , a = i . r o u n d O f f s e t s , l = v o i d   0 = = = a | | a , c = { p l a c e m e n t : U t ( e . p l a c e m e n t ) , v a r i a t i o n : c e ( e . p l a c e m e n t ) , p o p p e r : e . e l e m e n t s . p o p p e r , p o p p e r R e c t : e . r e c t s . p o p p e r , g p u A c c e l e r a t i o n : s } ; n u l l ! = e . m o d i f i e r s D a t a . p o p p e r O f f s e t s & & ( e . s t y l e s . p o p p e r = O b j e c t . a s s i g n ( { } , e . s t y l e s . p o p p e r , d e ( O b j e c t . a s s i g n ( { } , c , { o f f s e t s : e . m o d i f i e r s D a t a . p o p p e r O f f s e t s , p o s i t i o n : e . o p t i o n s . s t r a t e g y , a d a p t i v e : r , r o u n d O f f s e t s : l } ) ) ) ) , n u l l ! = e . m o d i f i e r s D a t a . a r r o w & & ( e . s t y l e s . a r r o w = O b j e c t . a s s i g n ( { } , e . s t y l e s . a r r o w , d e ( O b j e c t . a s s i g n ( { } , c , { o f f s e t s : e . m o d i f i e r s D a t a . a r r o w , p o s i t i o n : " a b s o l u t e " , a d a p t i v e : ! 1 , r o u n d O f f s e t s : l } ) ) ) ) , e . a t t r i b u t e s . p o p p e r = O b j e c t . a s s i g n ( { } , e . a t t r i b u t e s . p o p p e r , { " d a t a - p o p p e r - p l a c e m e n t " : e . p l a c e m e n t } ) } , d a t a : { } } ; v a r   f e = { p a s s i v e : ! 0 } ; c o n s t   p e = { n a m e : " e v e n t L i s t e n e r s " , e n a b l e d : ! 0 , p h a s e : " w r i t e " , f n : f u n c t i o n ( ) { } , e f f e c t : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . i n s t a n c e , n = t . o p t i o n s , s = n . s c r o l l , o = v o i d   0 = = = s | | s , r = n . r e s i z e , a = v o i d   0 = = = r | | r , l = W t ( e . e l e m e n t s . p o p p e r ) , c = [ ] . c o n c a t ( e . s c r o l l P a r e n t s . r e f e r e n c e , e . s c r o l l P a r e n t s . p o p p e r ) ; r e t u r n   o & & c . f o r E a c h ( ( f u n c t i o n ( t ) { t . a d d E v e n t L i s t e n e r ( " s c r o l l " , i . u p d a t e , f e ) } ) ) , a & & l . a d d E v e n t L i s t e n e r ( " r e s i z e " , i . u p d a t e , f e ) , f u n c t i o n ( ) { o & & c . f o r E a c h ( ( f u n c t i o n ( t ) { t . r e m o v e E v e n t L i s t e n e r ( " s c r o l l " , i . u p d a t e , f e ) } ) ) , a & & l . r e m o v e E v e n t L i s t e n e r ( " r e s i z e " , i . u p d a t e , f e ) } } , d a t a : { } } ; v a r   m e = { l e f t : " r i g h t " , r i g h t : " l e f t " , b o t t o m : " t o p " , t o p : " b o t t o m " } ; f u n c t i o n   g e ( t ) { r e t u r n   t . r e p l a c e ( / l e f t | r i g h t | b o t t o m | t o p / g , ( f u n c t i o n ( t ) { r e t u r n   m e [ t ] } ) ) } v a r   _ e = { s t a r t : " e n d " , e n d : " s t a r t " } ; f u n c t i o n   b e ( t ) { r e t u r n   t . r e p l a c e ( / s t a r t | e n d / g , ( f u n c t i o n ( t ) { r e t u r n   _ e [ t ] } ) ) } f u n c t i o n   v e ( t ) { v a r   e = W t ( t ) ; r e t u r n { s c r o l l L e f t : e . p a g e X O f f s e t , s c r o l l T o p : e . p a g e Y O f f s e t } } f u n c t i o n   y e ( t ) { r e t u r n   V t ( G t ( t ) ) . l e f t + v e ( t ) . s c r o l l L e f t } f u n c t i o n   w e ( t ) { v a r   e = Y t ( t ) , i = e . o v e r f l o w , n = e . o v e r f l o w X , s = e . o v e r f l o w Y ; r e t u r n / a u t o | s c r o l l | o v e r l a y | h i d d e n / . t e s t ( i + s + n ) } f u n c t i o n   E e ( t ) { r e t u r n [ " h t m l " , " b o d y " , " # d o c u m e n t " ] . i n d e x O f ( R t ( t ) ) > = 0 ? t . o w n e r D o c u m e n t . b o d y : z t ( t ) & & w e ( t ) ? t : E e ( Z t ( t ) ) } f u n c t i o n   A e ( t , e ) { v a r   i ; v o i d   0 = = = e & & ( e = [ ] ) ; v a r   n = E e ( t ) , s = n = = = ( n u l l = = ( i = t . o w n e r D o c u m e n t ) ? v o i d   0 : i . b o d y ) , o = W t ( n ) , r = s ? [ o ] . c o n c a t ( o . v i s u a l V i e w p o r t | | [ ] , w e ( n ) ? n : [ ] ) : n , a = e . c o n c a t ( r ) ; r e t u r n   s ? a : a . c o n c a t ( A e ( Z t ( r ) ) ) } f u n c t i o n   T e ( t ) { r e t u r n   O b j e c t . a s s i g n ( { } , t , { l e f t : t . x , t o p : t . y , r i g h t : t . x + t . w i d t h , b o t t o m : t . y + t . h e i g h t } ) } f u n c t i o n   O e ( t , e ) { r e t u r n   e = = = T t ? T e ( f u n c t i o n ( t ) { v a r   e = W t ( t ) , i = G t ( t ) , n = e . v i s u a l V i e w p o r t , s = i . c l i e n t W i d t h , o = i . c l i e n t H e i g h t , r = 0 , a = 0 ; r e t u r n   n & & ( s = n . w i d t h , o = n . h e i g h t , / ^ ( ( ? ! c h r o m e | a n d r o i d ) . ) * s a f a r i / i . t e s t ( n a v i g a t o r . u s e r A g e n t ) | | ( r = n . o f f s e t L e f t , a = n . o f f s e t T o p ) ) , { w i d t h : s , h e i g h t : o , x : r + y e ( t ) , y : a } } ( t ) ) : z t ( e ) ? f u n c t i o n ( t ) { v a r   e = V t ( t ) ; r e t u r n   e . t o p = e . t o p + t . c l i e n t T o p , e . l e f t = e . l e f t + t . c l i e n t L e f t , e . b o t t o m = e . t o p + t . c l i e n t H e i g h t , e . r i g h t = e . l e f t + t . c l i e n t W i d t h , e . w i d t h = t . c l i e n t W i d t h , e . h e i g h t = t . c l i e n t H e i g h t , e . x = e . l e f t , e . y = e . t o p , e } ( e ) : T e ( f u n c t i o n ( t ) { v a r   e , i = G t ( t ) , n = v e ( t ) , s = n u l l = = ( e = t . o w n e r D o c u m e n t ) ? v o i d   0 : e . b o d y , o = i e ( i . s c r o l l W i d t h , i . c l i e n t W i d t h , s ? s . s c r o l l W i d t h : 0 , s ? s . c l i e n t W i d t h : 0 ) , r = i e ( i . s c r o l l H e i g h t , i . c l i e n t H e i g h t , s ? s . s c r o l l H e i g h t : 0 , s ? s . c l i e n t H e i g h t : 0 ) , a = - n . s c r o l l L e f t + y e ( t ) , l = - n . s c r o l l T o p ; r e t u r n " r t l " = = = Y t ( s | | i ) . d i r e c t i o n & & ( a + = i e ( i . c l i e n t W i d t h , s ? s . c l i e n t W i d t h : 0 ) - o ) , { w i d t h : o , h e i g h t : r , x : a , y : l } } ( G t ( t ) ) ) } f u n c t i o n   C e ( t ) { v a r   e , i = t . r e f e r e n c e , n = t . e l e m e n t , s = t . p l a c e m e n t , o = s ? U t ( s ) : n u l l , r = s ? c e ( s ) : n u l l , a = i . x + i . w i d t h / 2 - n . w i d t h / 2 , l = i . y + i . h e i g h t / 2 - n . h e i g h t / 2 ; s w i t c h ( o ) { c a s e   m t : e = { x : a , y : i . y - n . h e i g h t } ; b r e a k ; c a s e   g t : e = { x : a , y : i . y + i . h e i g h t } ; b r e a k ; c a s e   _ t : e = { x : i . x + i . w i d t h , y : l } ; b r e a k ; c a s e   b t : e = { x : i . x - n . w i d t h , y : l } ; b r e a k ; d e f a u l t : e = { x : i . x , y : i . y } } v a r   c = o ? e e ( o ) : n u l l ; i f ( n u l l ! = c ) { v a r   h = " y " = = = c ? " h e i g h t " : " w i d t h " ; s w i t c h ( r ) { c a s e   w t : e [ c ] = e [ c ] - ( i [ h ] / 2 - n [ h ] / 2 ) ; b r e a k ; c a s e   E t : e [ c ] = e [ c ] + ( i [ h ] / 2 - n [ h ] / 2 ) } } r e t u r n   e } f u n c t i o n   k e ( t , e ) { v o i d   0 = = = e & & ( e = { } ) ; v a r   i = e , n = i . p l a c e m e n t , s = v o i d   0 = = = n ? t . p l a c e m e n t : n , o = i . b o u n d a r y , r = v o i d   0 = = = o ? A t : o , a = i . r o o t B o u n d a r y , l = v o i d   0 = = = a ? T t : a , c = i . e l e m e n t C o n t e x t , h = v o i d   0 = = = c ? O t : c , d = i . a l t B o u n d a r y , u = v o i d   0 ! = = d & & d , f = i . p a d d i n g , p = v o i d   0 = = = f ? 0 : f , m = r e ( " n u m b e r " ! = t y p e o f   p ? p : a e ( p , y t ) ) , g = h = = = O t ? C t : O t , _ = t . r e c t s . p o p p e r , b = t . e l e m e n t s [ u ? g : h ] , v = f u n c t i o n ( t , e , i ) { v a r   n = " c l i p p i n g P a r e n t s " = = = e ? f u n c t i o n ( t ) { v a r   e = A e ( Z t ( t ) ) , i = [ " a b s o l u t e " , " f i x e d " ] . i n d e x O f ( Y t ( t ) . p o s i t i o n ) > = 0 & & z t ( t ) ? t e ( t ) : t ; r e t u r n   $ t ( i ) ? e . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   $ t ( t ) & & X t ( t , i ) & & " b o d y " ! = = R t ( t ) } ) ) : [ ] } ( t ) : [ ] . c o n c a t ( e ) , s = [ ] . c o n c a t ( n , [ i ] ) , o = s [ 0 ] , r = s . r e d u c e ( ( f u n c t i o n ( e , i ) { v a r   n = O e ( t , i ) ; r e t u r n   e . t o p = i e ( n . t o p , e . t o p ) , e . r i g h t = n e ( n . r i g h t , e . r i g h t ) , e . b o t t o m = n e ( n . b o t t o m , e . b o t t o m ) , e . l e f t = i e ( n . l e f t , e . l e f t ) , e } ) , O e ( t , o ) ) ; r e t u r n   r . w i d t h = r . r i g h t - r . l e f t , r . h e i g h t = r . b o t t o m - r . t o p , r . x = r . l e f t , r . y = r . t o p , r } ( $ t ( b ) ? b : b . c o n t e x t E l e m e n t | | G t ( t . e l e m e n t s . p o p p e r ) , r , l ) , y = V t ( t . e l e m e n t s . r e f e r e n c e ) , w = C e ( { r e f e r e n c e : y , e l e m e n t : _ , s t r a t e g y : " a b s o l u t e " , p l a c e m e n t : s } ) , E = T e ( O b j e c t . a s s i g n ( { } , _ , w ) ) , A = h = = = O t ? E : y , T = { t o p : v . t o p - A . t o p + m . t o p , b o t t o m : A . b o t t o m - v . b o t t o m + m . b o t t o m , l e f t : v . l e f t - A . l e f t + m . l e f t , r i g h t : A . r i g h t - v . r i g h t + m . r i g h t } , O = t . m o d i f i e r s D a t a . o f f s e t ; i f ( h = = = O t & & O ) { v a r   C = O [ s ] ; O b j e c t . k e y s ( T ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   e = [ _ t , g t ] . i n d e x O f ( t ) > = 0 ? 1 : - 1 , i = [ m t , g t ] . i n d e x O f ( t ) > = 0 ? " y " : " x " ; T [ t ] + = C [ i ] * e } ) ) } r e t u r n   T } f u n c t i o n   L e ( t , e ) { v o i d   0 = = = e & & ( e = { } ) ; v a r   i = e , n = i . p l a c e m e n t , s = i . b o u n d a r y , o = i . r o o t B o u n d a r y , r = i . p a d d i n g , a = i . f l i p V a r i a t i o n s , l = i . a l l o w e d A u t o P l a c e m e n t s , c = v o i d   0 = = = l ? L t : l , h = c e ( n ) , d = h ? a ? k t : k t . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   c e ( t ) = = = h } ) ) : y t , u = d . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   c . i n d e x O f ( t ) > = 0 } ) ) ; 0 = = = u . l e n g t h & & ( u = d ) ; v a r   f = u . r e d u c e ( ( f u n c t i o n ( e , i ) { r e t u r n   e [ i ] = k e ( t , { p l a c e m e n t : i , b o u n d a r y : s , r o o t B o u n d a r y : o , p a d d i n g : r } ) [ U t ( i ) ] , e } ) , { } ) ; r e t u r n   O b j e c t . k e y s ( f ) . s o r t ( ( f u n c t i o n ( t , e ) { r e t u r n   f [ t ] - f [ e ] } ) ) } c o n s t   x e = { n a m e : " f l i p " , e n a b l e d : ! 0 , p h a s e : " m a i n " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = t . n a m e ; i f ( ! e . m o d i f i e r s D a t a [ n ] . _ s k i p ) { f o r ( v a r   s = i . m a i n A x i s , o = v o i d   0 = = = s | | s , r = i . a l t A x i s , a = v o i d   0 = = = r | | r , l = i . f a l l b a c k P l a c e m e n t s , c = i . p a d d i n g , h = i . b o u n d a r y , d = i . r o o t B o u n d a r y , u = i . a l t B o u n d a r y , f = i . f l i p V a r i a t i o n s , p = v o i d   0 = = = f | | f , m = i . a l l o w e d A u t o P l a c e m e n t s , g = e . o p t i o n s . p l a c e m e n t , _ = U t ( g ) , b = l | | ( _ ! = = g & & p ? f u n c t i o n ( t ) { i f ( U t ( t ) = = = v t ) r e t u r n [ ] ; v a r   e = g e ( t ) ; r e t u r n [ b e ( t ) , e , b e ( e ) ] } ( g ) : [ g e ( g ) ] ) , v = [ g ] . c o n c a t ( b ) . r e d u c e ( ( f u n c t i o n ( t , i ) { r e t u r n   t . c o n c a t ( U t ( i ) = = = v t ? L e ( e , { p l a c e m e n t : i , b o u n d a r y : h , r o o t B o u n d a r y : d , p a d d i n g : c , f l i p V a r i a t i o n s : p , a l l o w e d A u t o P l a c e m e n t s : m } ) : i ) } ) , [ ] ) , y = e . r e c t s . r e f e r e n c e , w = e . r e c t s . p o p p e r , E = n e w   M a p , A = ! 0 , T = v [ 0 ] , O = 0 ; O < v . l e n g t h ; O + + ) { v a r   C = v [ O ] , k = U t ( C ) , L = c e ( C ) = = = w t , x = [ m t , g t ] . i n d e x O f ( k ) > = 0 , D = x ? " w i d t h " : " h e i g h t " , S = k e ( e , { p l a c e m e n t : C , b o u n d a r y : h , r o o t B o u n d a r y : d , a l t B o u n d a r y : u , p a d d i n g : c } ) , N = x ? L ? _ t : b t : L ? g t : m t ; y [ D ] > w [ D ] & & ( N = g e ( N ) ) ; v a r   I = g e ( N ) , P = [ ] ; i f ( o & & P . p u s h ( S [ k ] < = 0 ) , a & & P . p u s h ( S [ N ] < = 0 , S [ I ] < = 0 ) , P . e v e r y ( ( f u n c t i o n ( t ) { r e t u r n   t } ) ) ) { T = C , A = ! 1 ; b r e a k } E . s e t ( C , P ) } i f ( A ) f o r ( v a r   j = f u n c t i o n ( t ) { v a r   e = v . f i n d ( ( f u n c t i o n ( e ) { v a r   i = E . g e t ( e ) ; i f ( i ) r e t u r n   i . s l i c e ( 0 , t ) . e v e r y ( ( f u n c t i o n ( t ) { r e t u r n   t } ) ) } ) ) ; i f ( e ) r e t u r n   T = e , " b r e a k " } , M = p ? 3 : 1 ; M > 0 & & " b r e a k " ! = = j ( M ) ; M - - ) ; e . p l a c e m e n t ! = = T & & ( e . m o d i f i e r s D a t a [ n ] . _ s k i p = ! 0 , e . p l a c e m e n t = T , e . r e s e t = ! 0 ) } } , r e q u i r e s I f E x i s t s : [ " o f f s e t " ] , d a t a : { _ s k i p : ! 1 } } ; f u n c t i o n   D e ( t , e , i ) { r e t u r n   v o i d   0 = = = i & & ( i = { x : 0 , y : 0 } ) , { t o p : t . t o p - e . h e i g h t - i . y , r i g h t : t . r i g h t - e . w i d t h + i . x , b o t t o m : t . b o t t o m - e . h e i g h t + i . y , l e f t : t . l e f t - e . w i d t h - i . x } } f u n c t i o n   S e ( t ) { r e t u r n [ m t , _ t , g t , b t ] . s o m e ( ( f u n c t i o n ( e ) { r e t u r n   t [ e ] > = 0 } ) ) } c o n s t   N e = { n a m e : " h i d e " , e n a b l e d : ! 0 , p h a s e : " m a i n " , r e q u i r e s I f E x i s t s : [ " p r e v e n t O v e r f l o w " ] , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . n a m e , n = e . r e c t s . r e f e r e n c e , s = e . r e c t s . p o p p e r , o = e . m o d i f i e r s D a t a . p r e v e n t O v e r f l o w , r = k e ( e , { e l e m e n t C o n t e x t : " r e f e r e n c e " } ) , a = k e ( e , { a l t B o u n d a r y : ! 0 } ) , l = D e ( r , n ) , c = D e ( a , s , o ) , h = S e ( l ) , d = S e ( c ) ; e . m o d i f i e r s D a t a [ i ] = { r e f e r e n c e C l i p p i n g O f f s e t s : l , p o p p e r E s c a p e O f f s e t s : c , i s R e f e r e n c e H i d d e n : h , h a s P o p p e r E s c a p e d : d } , e . a t t r i b u t e s . p o p p e r = O b j e c t . a s s i g n ( { } , e . a t t r i b u t e s . p o p p e r , { " d a t a - p o p p e r - r e f e r e n c e - h i d d e n " : h , " d a t a - p o p p e r - e s c a p e d " : d } ) } } , I e = { n a m e : " o f f s e t " , e n a b l e d : ! 0 , p h a s e : " m a i n " , r e q u i r e s : [ " p o p p e r O f f s e t s " ] , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = t . n a m e , s = i . o f f s e t , o = v o i d   0 = = = s ? [ 0 , 0 ] : s , r = L t . r e d u c e ( ( f u n c t i o n ( t , i ) { r e t u r n   t [ i ] = f u n c t i o n ( t , e , i ) { v a r   n = U t ( t ) , s = [ b t , m t ] . i n d e x O f ( n ) > = 0 ? - 1 : 1 , o = " f u n c t i o n " = = t y p e o f   i ? i ( O b j e c t . a s s i g n ( { } , e , { p l a c e m e n t : t } ) ) : i , r = o [ 0 ] , a = o [ 1 ] ; r e t u r n   r = r | | 0 , a = ( a | | 0 ) * s , [ b t , _ t ] . i n d e x O f ( n ) > = 0 ? { x : a , y : r } : { x : r , y : a } } ( i , e . r e c t s , o ) , t } ) , { } ) , a = r [ e . p l a c e m e n t ] , l = a . x , c = a . y ; n u l l ! = e . m o d i f i e r s D a t a . p o p p e r O f f s e t s & & ( e . m o d i f i e r s D a t a . p o p p e r O f f s e t s . x + = l , e . m o d i f i e r s D a t a . p o p p e r O f f s e t s . y + = c ) , e . m o d i f i e r s D a t a [ n ] = r } } , P e = { n a m e : " p o p p e r O f f s e t s " , e n a b l e d : ! 0 , p h a s e : " r e a d " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . n a m e ; e . m o d i f i e r s D a t a [ i ] = C e ( { r e f e r e n c e : e . r e c t s . r e f e r e n c e , e l e m e n t : e . r e c t s . p o p p e r , s t r a t e g y : " a b s o l u t e " , p l a c e m e n t : e . p l a c e m e n t } ) } , d a t a : { } } , j e = { n a m e : " p r e v e n t O v e r f l o w " , e n a b l e d : ! 0 , p h a s e : " m a i n " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = t . n a m e , s = i . m a i n A x i s , o = v o i d   0 = = = s | | s , r = i . a l t A x i s , a = v o i d   0 ! = = r & & r , l = i . b o u n d a r y , c = i . r o o t B o u n d a r y , h = i . a l t B o u n d a r y , d = i . p a d d i n g , u = i . t e t h e r , f = v o i d   0 = = = u | | u , p = i . t e t h e r O f f s e t , m = v o i d   0 = = = p ? 0 : p , g = k e ( e , { b o u n d a r y : l , r o o t B o u n d a r y : c , p a d d i n g : d , a l t B o u n d a r y : h } ) , _ = U t ( e . p l a c e m e n t ) , b = c e ( e . p l a c e m e n t ) , v = ! b , y = e e ( _ ) , w = " x " = = = y ? " y " : " x " , E = e . m o d i f i e r s D a t a . p o p p e r O f f s e t s , A = e . r e c t s . r e f e r e n c e , T = e . r e c t s . p o p p e r , O = " f u n c t i o n " = = t y p e o f   m ? m ( O b j e c t . a s s i g n ( { } , e . r e c t s , { p l a c e m e n t : e . p l a c e m e n t } ) ) : m , C = { x : 0 , y : 0 } ; i f ( E ) { i f ( o | | a ) { v a r   k = " y " = = = y ? m t : b t , L = " y " = = = y ? g t : _ t , x = " y " = = = y ? " h e i g h t " : " w i d t h " , D = E [ y ] , S = E [ y ] + g [ k ] , N = E [ y ] - g [ L ] , I = f ? - T [ x ] / 2 : 0 , P = b = = = w t ? A [ x ] : T [ x ] , j = b = = = w t ? - T [ x ] : - A [ x ] , M = e . e l e m e n t s . a r r o w , H = f & & M ? K t ( M ) : { w i d t h : 0 , h e i g h t : 0 } , B = e . m o d i f i e r s D a t a [ " a r r o w # p e r s i s t e n t " ] ? e . m o d i f i e r s D a t a [ " a r r o w # p e r s i s t e n t " ] . p a d d i n g : { t o p : 0 , r i g h t : 0 , b o t t o m : 0 , l e f t : 0 } , R = B [ k ] , W = B [ L ] , $ = o e ( 0 , A [ x ] , H [ x ] ) , z = v ? A [ x ] / 2 - I - $ - R - O : P - $ - R - O , q = v ? - A [ x ] / 2 + I + $ + W + O : j + $ + W + O , F = e . e l e m e n t s . a r r o w & & t e ( e . e l e m e n t s . a r r o w ) , U = F ? " y " = = = y ? F . c l i e n t T o p | | 0 : F . c l i e n t L e f t | | 0 : 0 , V = e . m o d i f i e r s D a t a . o f f s e t ? e . m o d i f i e r s D a t a . o f f s e t [ e . p l a c e m e n t ] [ y ] : 0 , K = E [ y ] + z - V - U , X = E [ y ] + q - V ; i f ( o ) { v a r   Y = o e ( f ? n e ( S , K ) : S , D , f ? i e ( N , X ) : N ) ; E [ y ] = Y , C [ y ] = Y - D } i f ( a ) { v a r   Q = " x " = = = y ? m t : b t , G = " x " = = = y ? g t : _ t , Z = E [ w ] , J = Z + g [ Q ] , t t = Z - g [ G ] , e t = o e ( f ? n e ( J , K ) : J , Z , f ? i e ( t t , X ) : t t ) ; E [ w ] = e t , C [ w ] = e t - Z } } e . m o d i f i e r s D a t a [ n ] = C } } , r e q u i r e s I f E x i s t s : [ " o f f s e t " ] } ; f u n c t i o n   M e ( t , e , i ) { v o i d   0 = = = i & & ( i = ! 1 ) ; v a r   n = z t ( e ) ; z t ( e ) & & f u n c t i o n ( t ) { v a r   e = t . g e t B o u n d i n g C l i e n t R e c t ( ) ; e . w i d t h , t . o f f s e t W i d t h , e . h e i g h t , t . o f f s e t H e i g h t } ( e ) ; v a r   s , o , r = G t ( e ) , a = V t ( t ) , l = { s c r o l l L e f t : 0 , s c r o l l T o p : 0 } , c = { x : 0 , y : 0 } ; r e t u r n ( n | | ! n & & ! i ) & & ( ( " b o d y " ! = = R t ( e ) | | w e ( r ) ) & & ( l = ( s = e ) ! = = W t ( s ) & & z t ( s ) ? { s c r o l l L e f t : ( o = s ) . s c r o l l L e f t , s c r o l l T o p : o . s c r o l l T o p } : v e ( s ) ) , z t ( e ) ? ( ( c = V t ( e ) ) . x + = e . c l i e n t L e f t , c . y + = e . c l i e n t T o p ) : r & & ( c . x = y e ( r ) ) ) , { x : a . l e f t + l . s c r o l l L e f t - c . x , y : a . t o p + l . s c r o l l T o p - c . y , w i d t h : a . w i d t h , h e i g h t : a . h e i g h t } } f u n c t i o n   H e ( t ) { v a r   e = n e w   M a p , i = n e w   S e t , n = [ ] ; f u n c t i o n   s ( t ) { i . a d d ( t . n a m e ) , [ ] . c o n c a t ( t . r e q u i r e s | | [ ] , t . r e q u i r e s I f E x i s t s | | [ ] ) . f o r E a c h ( ( f u n c t i o n ( t ) { i f ( ! i . h a s ( t ) ) { v a r   n = e . g e t ( t ) ; n & & s ( n ) } } ) ) , n . p u s h ( t ) } r e t u r n   t . f o r E a c h ( ( f u n c t i o n ( t ) { e . s e t ( t . n a m e , t ) } ) ) , t . f o r E a c h ( ( f u n c t i o n ( t ) { i . h a s ( t . n a m e ) | | s ( t ) } ) ) , n } v a r   B e = { p l a c e m e n t : " b o t t o m " , m o d i f i e r s : [ ] , s t r a t e g y : " a b s o l u t e " } ; f u n c t i o n   R e ( ) { f o r ( v a r   t = a r g u m e n t s . l e n g t h , e = n e w   A r r a y ( t ) , i = 0 ; i < t ; i + + ) e [ i ] = a r g u m e n t s [ i ] ; r e t u r n ! e . s o m e ( ( f u n c t i o n ( t ) { r e t u r n ! ( t & & " f u n c t i o n " = = t y p e o f   t . g e t B o u n d i n g C l i e n t R e c t ) } ) ) } f u n c t i o n   W e ( t ) { v o i d   0 = = = t & & ( t = { } ) ; v a r   e = t , i = e . d e f a u l t M o d i f i e r s , n = v o i d   0 = = = i ? [ ] : i , s = e . d e f a u l t O p t i o n s , o = v o i d   0 = = = s ? B e : s ; r e t u r n   f u n c t i o n ( t , e , i ) { v o i d   0 = = = i & & ( i = o ) ; v a r   s , r , a = { p l a c e m e n t : " b o t t o m " , o r d e r e d M o d i f i e r s : [ ] , o p t i o n s : O b j e c t . a s s i g n ( { } , B e , o ) , m o d i f i e r s D a t a : { } , e l e m e n t s : { r e f e r e n c e : t , p o p p e r : e } , a t t r i b u t e s : { } , s t y l e s : { } } , l = [ ] , c = ! 1 , h = { s t a t e : a , s e t O p t i o n s : f u n c t i o n ( i ) { v a r   s = " f u n c t i o n " = = t y p e o f   i ? i ( a . o p t i o n s ) : i ; d ( ) , a . o p t i o n s = O b j e c t . a s s i g n ( { } , o , a . o p t i o n s , s ) , a . s c r o l l P a r e n t s = { r e f e r e n c e : $ t ( t ) ? A e ( t ) : t . c o n t e x t E l e m e n t ? A e ( t . c o n t e x t E l e m e n t ) : [ ] , p o p p e r : A e ( e ) } ; v a r   r , c , u = f u n c t i o n ( t ) { v a r   e = H e ( t ) ; r e t u r n   B t . r e d u c e ( ( f u n c t i o n ( t , i ) { r e t u r n   t . c o n c a t ( e . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   t . p h a s e = = = i } ) ) ) } ) , [ ] ) } ( ( r = [ ] . c o n c a t ( n , a . o p t i o n s . m o d i f i e r s ) , c = r . r e d u c e ( ( f u n c t i o n ( t , e ) { v a r   i = t [ e . n a m e ] ; r e t u r n   t [ e . n a m e ] = i ? O b j e c t . a s s i g n ( { } , i , e , { o p t i o n s : O b j e c t . a s s i g n ( { } , i . o p t i o n s , e . o p t i o n s ) , d a t a : O b j e c t . a s s i g n ( { } , i . d a t a , e . d a t a ) } ) : e , t } ) , { } ) , O b j e c t . k e y s ( c ) . m a p ( ( f u n c t i o n ( t ) { r e t u r n   c [ t ] } ) ) ) ) ; r e t u r n   a . o r d e r e d M o d i f i e r s = u . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   t . e n a b l e d } ) ) , a . o r d e r e d M o d i f i e r s . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   e = t . n a m e , i = t . o p t i o n s , n = v o i d   0 = = = i ? { } : i , s = t . e f f e c t ; i f ( " f u n c t i o n " = = t y p e o f   s ) { v a r   o = s ( { s t a t e : a , n a m e : e , i n s t a n c e : h , o p t i o n s : n } ) ; l . p u s h ( o | | f u n c t i o n ( ) { } ) } } ) ) , h . u p d a t e ( ) } , f o r c e U p d a t e : f u n c t i o n ( ) { i f ( ! c ) { v a r   t = a . e l e m e n t s , e = t . r e f e r e n c e , i = t . p o p p e r ; i f ( R e ( e , i ) ) { a . r e c t s = { r e f e r e n c e : M e ( e , t e ( i ) , " f i x e d " = = = a . o p t i o n s . s t r a t e g y ) , p o p p e r : K t ( i ) } , a . r e s e t = ! 1 , a . p l a c e m e n t = a . o p t i o n s . p l a c e m e n t , a . o r d e r e d M o d i f i e r s . f o r E a c h ( ( f u n c t i o n ( t ) { r e t u r n   a . m o d i f i e r s D a t a [ t . n a m e ] = O b j e c t . a s s i g n ( { } , t . d a t a ) } ) ) ; f o r ( v a r   n = 0 ; n < a . o r d e r e d M o d i f i e r s . l e n g t h ; n + + ) i f ( ! 0 ! = = a . r e s e t ) { v a r   s = a . o r d e r e d M o d i f i e r s [ n ] , o = s . f n , r = s . o p t i o n s , l = v o i d   0 = = = r ? { } : r , d = s . n a m e ; " f u n c t i o n " = = t y p e o f   o & & ( a = o ( { s t a t e : a , o p t i o n s : l , n a m e : d , i n s t a n c e : h } ) | | a ) } e l s e   a . r e s e t = ! 1 , n = - 1 } } } , u p d a t e : ( s = f u n c t i o n ( ) { r e t u r n   n e w   P r o m i s e ( ( f u n c t i o n ( t ) { h . f o r c e U p d a t e ( ) , t ( a ) } ) ) } , f u n c t i o n ( ) { r e t u r n   r | | ( r = n e w   P r o m i s e ( ( f u n c t i o n ( t ) { P r o m i s e . r e s o l v e ( ) . t h e n ( ( f u n c t i o n ( ) { r = v o i d   0 , t ( s ( ) ) } ) ) } ) ) ) , r } ) , d e s t r o y : f u n c t i o n ( ) { d ( ) , c = ! 0 } } ; i f ( ! R e ( t , e ) ) r e t u r n   h ; f u n c t i o n   d ( ) { l . f o r E a c h ( ( f u n c t i o n ( t ) { r e t u r n   t ( ) } ) ) , l = [ ] } r e t u r n   h . s e t O p t i o n s ( i ) . t h e n ( ( f u n c t i o n ( t ) { ! c & & i . o n F i r s t U p d a t e & & i . o n F i r s t U p d a t e ( t ) } ) ) , h } } v a r   $ e = W e ( ) , z e = W e ( { d e f a u l t M o d i f i e r s : [ p e , P e , u e , F t ] } ) , q e = W e ( { d e f a u l t M o d i f i e r s : [ p e , P e , u e , F t , I e , x e , j e , l e , N e ] } ) ; c o n s t   F e = O b j e c t . f r e e z e ( { _ _ p r o t o _ _ : n u l l , p o p p e r G e n e r a t o r : W e , d e t e c t O v e r f l o w : k e , c r e a t e P o p p e r B a s e : $ e , c r e a t e P o p p e r : q e , c r e a t e P o p p e r L i t e : z e , t o p : m t , b o t t o m : g t , r i g h t : _ t , l e f t : b t , a u t o : v t , b a s e P l a c e m e n t s : y t , s t a r t : w t , e n d : E t , c l i p p i n g P a r e n t s : A t , v i e w p o r t : T t , p o p p e r : O t , r e f e r e n c e : C t , v a r i a t i o n P l a c e m e n t s : k t , p l a c e m e n t s : L t , b e f o r e R e a d : x t , r e a d : D t , a f t e r R e a d : S t , b e f o r e M a i n : N t , m a i n : I t , a f t e r M a i n : P t , b e f o r e W r i t e : j t , w r i t e : M t , a f t e r W r i t e : H t , m o d i f i e r P h a s e s : B t , a p p l y S t y l e s : F t , a r r o w : l e , c o m p u t e S t y l e s : u e , e v e n t L i s t e n e r s : p e , f l i p : x e , h i d e : N e , o f f s e t : I e , p o p p e r O f f s e t s : P e , p r e v e n t O v e r f l o w : j e } ) , U e = " d r o p d o w n " , V e = " E s c a p e " , K e = " S p a c e " , X e = " A r r o w U p " , Y e = " A r r o w D o w n " , Q e = n e w   R e g E x p ( " A r r o w U p | A r r o w D o w n | E s c a p e " ) , G e = " c l i c k . b s . d r o p d o w n . d a t a - a p i " , Z e = " k e y d o w n . b s . d r o p d o w n . d a t a - a p i " , J e = " s h o w " , t i = ' [ d a t a - b s - t o g g l e = " d r o p d o w n " ] ' , e i = " . d r o p d o w n - m e n u " , i i = m ( ) ? " t o p - e n d " : " t o p - s t a r t " , n i = m ( ) ? " t o p - s t a r t " : " t o p - e n d " , s i = m ( ) ? " b o t t o m - e n d " : " b o t t o m - s t a r t " , o i = m ( ) ? " b o t t o m - s t a r t " : " b o t t o m - e n d " , r i = m ( ) ? " l e f t - s t a r t " : " r i g h t - s t a r t " , a i = m ( ) ? " r i g h t - s t a r t " : " l e f t - s t a r t " , l i = { o f f s e t : [ 0 , 2 ] , b o u n d a r y : " c l i p p i n g P a r e n t s " , r e f e r e n c e : " t o g g l e " , d i s p l a y : " d y n a m i c " , p o p p e r C o n f i g : n u l l , a u t o C l o s e : ! 0 } , c i = { o f f s e t : " ( a r r a y | s t r i n g | f u n c t i o n ) " , b o u n d a r y : " ( s t r i n g | e l e m e n t ) " , r e f e r e n c e : " ( s t r i n g | e l e m e n t | o b j e c t ) " , d i s p l a y : " s t r i n g " , p o p p e r C o n f i g : " ( n u l l | o b j e c t | f u n c t i o n ) " , a u t o C l o s e : " ( b o o l e a n | s t r i n g ) " } ; c l a s s   h i   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ p o p p e r = n u l l , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ m e n u = t h i s . _ g e t M e n u E l e m e n t ( ) , t h i s . _ i n N a v b a r = t h i s . _ d e t e c t N a v b a r ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   l i } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   c i } s t a t i c   g e t   N A M E ( ) { r e t u r n   U e } t o g g l e ( ) { r e t u r n   t h i s . _ i s S h o w n ( ) ? t h i s . h i d e ( ) : t h i s . s h o w ( ) } s h o w ( ) { i f ( c ( t h i s . _ e l e m e n t ) | | t h i s . _ i s S h o w n ( t h i s . _ m e n u ) ) r e t u r n ; c o n s t   t = { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . d r o p d o w n " , t ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t   e = h i . g e t P a r e n t F r o m E l e m e n t ( t h i s . _ e l e m e n t ) ; t h i s . _ i n N a v b a r ? U . s e t D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " , " n o n e " ) : t h i s . _ c r e a t e P o p p e r ( e ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & ! e . c l o s e s t ( " . n a v b a r - n a v " ) & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > j . o n ( t , " m o u s e o v e r " , d ) ) ) , t h i s . _ e l e m e n t . f o c u s ( ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 0 ) , t h i s . _ m e n u . c l a s s L i s t . a d d ( J e ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( J e ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . d r o p d o w n " , t ) } h i d e ( ) { i f ( c ( t h i s . _ e l e m e n t ) | | ! t h i s . _ i s S h o w n ( t h i s . _ m e n u ) ) r e t u r n ; c o n s t   t = { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ; t h i s . _ c o m p l e t e H i d e ( t ) } d i s p o s e ( ) { t h i s . _ p o p p e r & & t h i s . _ p o p p e r . d e s t r o y ( ) , s u p e r . d i s p o s e ( ) } u p d a t e ( ) { t h i s . _ i n N a v b a r = t h i s . _ d e t e c t N a v b a r ( ) , t h i s . _ p o p p e r & & t h i s . _ p o p p e r . u p d a t e ( ) } _ c o m p l e t e H i d e ( t ) { j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . d r o p d o w n " , t ) . d e f a u l t P r e v e n t e d | | ( " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > j . o f f ( t , " m o u s e o v e r " , d ) ) ) , t h i s . _ p o p p e r & & t h i s . _ p o p p e r . d e s t r o y ( ) , t h i s . _ m e n u . c l a s s L i s t . r e m o v e ( J e ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( J e ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , " f a l s e " ) , U . r e m o v e D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . d r o p d o w n " , t ) ) } _ g e t C o n f i g ( t ) { i f ( t = { . . . t h i s . c o n s t r u c t o r . D e f a u l t , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . t } , a ( U e , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , " o b j e c t " = = t y p e o f   t . r e f e r e n c e & & ! o ( t . r e f e r e n c e ) & & " f u n c t i o n " ! = t y p e o f   t . r e f e r e n c e . g e t B o u n d i n g C l i e n t R e c t ) t h r o w   n e w   T y p e E r r o r ( ` $ { U e . t o U p p e r C a s e ( ) } :   O p t i o n   " r e f e r e n c e "   p r o v i d e d   t y p e   " o b j e c t "   w i t h o u t   a   r e q u i r e d   " g e t B o u n d i n g C l i e n t R e c t "   m e t h o d . ` ) ; r e t u r n   t } _ c r e a t e P o p p e r ( t ) { i f ( v o i d   0 = = = F e ) t h r o w   n e w   T y p e E r r o r ( " B o o t s t r a p ' s   d r o p d o w n s   r e q u i r e   P o p p e r   ( h t t p s : / / p o p p e r . j s . o r g ) " ) ; l e t   e = t h i s . _ e l e m e n t ; " p a r e n t " = = = t h i s . _ c o n f i g . r e f e r e n c e ? e = t : o ( t h i s . _ c o n f i g . r e f e r e n c e ) ? e = r ( t h i s . _ c o n f i g . r e f e r e n c e ) : " o b j e c t " = = t y p e o f   t h i s . _ c o n f i g . r e f e r e n c e & & ( e = t h i s . _ c o n f i g . r e f e r e n c e ) ; c o n s t   i = t h i s . _ g e t P o p p e r C o n f i g ( ) , n = i . m o d i f i e r s . f i n d ( ( t = > " a p p l y S t y l e s " = = = t . n a m e & & ! 1 = = = t . e n a b l e d ) ) ; t h i s . _ p o p p e r = q e ( e , t h i s . _ m e n u , i ) , n & & U . s e t D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " , " s t a t i c " ) } _ i s S h o w n ( t = t h i s . _ e l e m e n t ) { r e t u r n   t . c l a s s L i s t . c o n t a i n s ( J e ) } _ g e t M e n u E l e m e n t ( ) { r e t u r n   V . n e x t ( t h i s . _ e l e m e n t , e i ) [ 0 ] } _ g e t P l a c e m e n t ( ) { c o n s t   t = t h i s . _ e l e m e n t . p a r e n t N o d e ; i f ( t . c l a s s L i s t . c o n t a i n s ( " d r o p e n d " ) ) r e t u r n   r i ; i f ( t . c l a s s L i s t . c o n t a i n s ( " d r o p s t a r t " ) ) r e t u r n   a i ; c o n s t   e = " e n d " = = = g e t C o m p u t e d S t y l e ( t h i s . _ m e n u ) . g e t P r o p e r t y V a l u e ( " - - b s - p o s i t i o n " ) . t r i m ( ) ; r e t u r n   t . c l a s s L i s t . c o n t a i n s ( " d r o p u p " ) ? e ? n i : i i : e ? o i : s i } _ d e t e c t N a v b a r ( ) { r e t u r n   n u l l ! = = t h i s . _ e l e m e n t . c l o s e s t ( " . n a v b a r " ) } _ g e t O f f s e t ( ) { c o n s t { o f f s e t : t } = t h i s . _ c o n f i g ; r e t u r n " s t r i n g " = = t y p e o f   t ? t . s p l i t ( " , " ) . m a p ( ( t = > N u m b e r . p a r s e I n t ( t , 1 0 ) ) ) : " f u n c t i o n " = = t y p e o f   t ? e = > t ( e , t h i s . _ e l e m e n t ) : t } _ g e t P o p p e r C o n f i g ( ) { c o n s t   t = { p l a c e m e n t : t h i s . _ g e t P l a c e m e n t ( ) , m o d i f i e r s : [ { n a m e : " p r e v e n t O v e r f l o w " , o p t i o n s : { b o u n d a r y : t h i s . _ c o n f i g . b o u n d a r y } } , { n a m e : " o f f s e t " , o p t i o n s : { o f f s e t : t h i s . _ g e t O f f s e t ( ) } } ] } ; r e t u r n " s t a t i c " = = = t h i s . _ c o n f i g . d i s p l a y & & ( t . m o d i f i e r s = [ { n a m e : " a p p l y S t y l e s " , e n a b l e d : ! 1 } ] ) , { . . . t , . . . " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p o p p e r C o n f i g ? t h i s . _ c o n f i g . p o p p e r C o n f i g ( t ) : t h i s . _ c o n f i g . p o p p e r C o n f i g } } _ s e l e c t M e n u I t e m ( { k e y : t , t a r g e t : e } ) { c o n s t   i = V . f i n d ( " . d r o p d o w n - m e n u   . d r o p d o w n - i t e m : n o t ( . d i s a b l e d ) : n o t ( : d i s a b l e d ) " , t h i s . _ m e n u ) . f i l t e r ( l ) ; i . l e n g t h & & v ( i , e , t = = = Y e , ! i . i n c l u d e s ( e ) ) . f o c u s ( ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = h i . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } s t a t i c   c l e a r M e n u s ( t ) { i f ( t & & ( 2 = = = t . b u t t o n | | " k e y u p " = = = t . t y p e & & " T a b " ! = = t . k e y ) ) r e t u r n ; c o n s t   e = V . f i n d ( t i ) ; f o r ( l e t   i = 0 , n = e . l e n g t h ; i < n ; i + + ) { c o n s t   n = h i . g e t I n s t a n c e ( e [ i ] ) ; i f ( ! n | | ! 1 = = = n . _ c o n f i g . a u t o C l o s e ) c o n t i n u e ; i f ( ! n . _ i s S h o w n ( ) ) c o n t i n u e ; c o n s t   s = { r e l a t e d T a r g e t : n . _ e l e m e n t } ; i f ( t ) { c o n s t   e = t . c o m p o s e d P a t h ( ) , i = e . i n c l u d e s ( n . _ m e n u ) ; i f ( e . i n c l u d e s ( n . _ e l e m e n t ) | | " i n s i d e " = = = n . _ c o n f i g . a u t o C l o s e & & ! i | | " o u t s i d e " = = = n . _ c o n f i g . a u t o C l o s e & & i ) c o n t i n u e ; i f ( n . _ m e n u . c o n t a i n s ( t . t a r g e t ) & & ( " k e y u p " = = = t . t y p e & & " T a b " = = = t . k e y | | / i n p u t | s e l e c t | o p t i o n | t e x t a r e a | f o r m / i . t e s t ( t . t a r g e t . t a g N a m e ) ) ) c o n t i n u e ; " c l i c k " = = = t . t y p e & & ( s . c l i c k E v e n t = t ) } n . _ c o m p l e t e H i d e ( s ) } } s t a t i c   g e t P a r e n t F r o m E l e m e n t ( t ) { r e t u r n   n ( t ) | | t . p a r e n t N o d e } s t a t i c   d a t a A p i K e y d o w n H a n d l e r ( t ) { i f ( / i n p u t | t e x t a r e a / i . t e s t ( t . t a r g e t . t a g N a m e ) ? t . k e y = = = K e | | t . k e y ! = = V e & & ( t . k e y ! = = Y e & & t . k e y ! = = X e | | t . t a r g e t . c l o s e s t ( e i ) ) : ! Q e . t e s t ( t . k e y ) ) r e t u r n ; c o n s t   e = t h i s . c l a s s L i s t . c o n t a i n s ( J e ) ; i f ( ! e & & t . k e y = = = V e ) r e t u r n ; i f ( t . p r e v e n t D e f a u l t ( ) , t . s t o p P r o p a g a t i o n ( ) , c ( t h i s ) ) r e t u r n ; c o n s t   i = t h i s . m a t c h e s ( t i ) ? t h i s : V . p r e v ( t h i s , t i ) [ 0 ] , n = h i . g e t O r C r e a t e I n s t a n c e ( i ) ; i f ( t . k e y ! = = V e ) r e t u r n   t . k e y = = = X e | | t . k e y = = = Y e ? ( e | | n . s h o w ( ) , v o i d   n . _ s e l e c t M e n u I t e m ( t ) ) : v o i d ( e & & t . k e y ! = = K e | | h i . c l e a r M e n u s ( ) ) ; n . h i d e ( ) } } j . o n ( d o c u m e n t , Z e , t i , h i . d a t a A p i K e y d o w n H a n d l e r ) , j . o n ( d o c u m e n t , Z e , e i , h i . d a t a A p i K e y d o w n H a n d l e r ) , j . o n ( d o c u m e n t , G e , h i . c l e a r M e n u s ) , j . o n ( d o c u m e n t , " k e y u p . b s . d r o p d o w n . d a t a - a p i " , h i . c l e a r M e n u s ) , j . o n ( d o c u m e n t , G e , t i , ( f u n c t i o n ( t ) { t . p r e v e n t D e f a u l t ( ) , h i . g e t O r C r e a t e I n s t a n c e ( t h i s ) . t o g g l e ( ) } ) ) , g ( h i ) ; c o n s t   d i = " . f i x e d - t o p ,   . f i x e d - b o t t o m ,   . i s - f i x e d ,   . s t i c k y - t o p " , u i = " . s t i c k y - t o p " ; c l a s s   f i { c o n s t r u c t o r ( ) { t h i s . _ e l e m e n t = d o c u m e n t . b o d y } g e t W i d t h ( ) { c o n s t   t = d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ; r e t u r n   M a t h . a b s ( w i n d o w . i n n e r W i d t h - t ) } h i d e ( ) { c o n s t   t = t h i s . g e t W i d t h ( ) ; t h i s . _ d i s a b l e O v e r F l o w ( ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " p a d d i n g R i g h t " , ( e = > e + t ) ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( d i , " p a d d i n g R i g h t " , ( e = > e + t ) ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( u i , " m a r g i n R i g h t " , ( e = > e - t ) ) } _ d i s a b l e O v e r F l o w ( ) { t h i s . _ s a v e I n i t i a l A t t r i b u t e ( t h i s . _ e l e m e n t , " o v e r f l o w " ) , t h i s . _ e l e m e n t . s t y l e . o v e r f l o w = " h i d d e n " } _ s e t E l e m e n t A t t r i b u t e s ( t , e , i ) { c o n s t   n = t h i s . g e t W i d t h ( ) ; t h i s . _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , ( t = > { i f ( t ! = = t h i s . _ e l e m e n t & & w i n d o w . i n n e r W i d t h > t . c l i e n t W i d t h + n ) r e t u r n ; t h i s . _ s a v e I n i t i a l A t t r i b u t e ( t , e ) ; c o n s t   s = w i n d o w . g e t C o m p u t e d S t y l e ( t ) [ e ] ; t . s t y l e [ e ] = ` $ { i ( N u m b e r . p a r s e F l o a t ( s ) ) } p x ` } ) ) } r e s e t ( ) { t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " o v e r f l o w " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " p a d d i n g R i g h t " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( d i , " p a d d i n g R i g h t " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( u i , " m a r g i n R i g h t " ) } _ s a v e I n i t i a l A t t r i b u t e ( t , e ) { c o n s t   i = t . s t y l e [ e ] ; i & & U . s e t D a t a A t t r i b u t e ( t , e , i ) } _ r e s e t E l e m e n t A t t r i b u t e s ( t , e ) { t h i s . _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , ( t = > { c o n s t   i = U . g e t D a t a A t t r i b u t e ( t , e ) ; v o i d   0 = = = i ? t . s t y l e . r e m o v e P r o p e r t y ( e ) : ( U . r e m o v e D a t a A t t r i b u t e ( t , e ) , t . s t y l e [ e ] = i ) } ) ) } _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , e ) { o ( t ) ? e ( t ) : V . f i n d ( t , t h i s . _ e l e m e n t ) . f o r E a c h ( e ) } i s O v e r f l o w i n g ( ) { r e t u r n   t h i s . g e t W i d t h ( ) > 0 } } c o n s t   p i = { c l a s s N a m e : " m o d a l - b a c k d r o p " , i s V i s i b l e : ! 0 , i s A n i m a t e d : ! 1 , r o o t E l e m e n t : " b o d y " , c l i c k C a l l b a c k : n u l l } , m i = { c l a s s N a m e : " s t r i n g " , i s V i s i b l e : " b o o l e a n " , i s A n i m a t e d : " b o o l e a n " , r o o t E l e m e n t : " ( e l e m e n t | s t r i n g ) " , c l i c k C a l l b a c k : " ( f u n c t i o n | n u l l ) " } , g i = " s h o w " , _ i = " m o u s e d o w n . b s . b a c k d r o p " ; c l a s s   b i { c o n s t r u c t o r ( t ) { t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( t ) , t h i s . _ i s A p p e n d e d = ! 1 , t h i s . _ e l e m e n t = n u l l } s h o w ( t ) { t h i s . _ c o n f i g . i s V i s i b l e ? ( t h i s . _ a p p e n d ( ) , t h i s . _ c o n f i g . i s A n i m a t e d & & u ( t h i s . _ g e t E l e m e n t ( ) ) , t h i s . _ g e t E l e m e n t ( ) . c l a s s L i s t . a d d ( g i ) , t h i s . _ e m u l a t e A n i m a t i o n ( ( ( ) = > { _ ( t ) } ) ) ) : _ ( t ) } h i d e ( t ) { t h i s . _ c o n f i g . i s V i s i b l e ? ( t h i s . _ g e t E l e m e n t ( ) . c l a s s L i s t . r e m o v e ( g i ) , t h i s . _ e m u l a t e A n i m a t i o n ( ( ( ) = > { t h i s . d i s p o s e ( ) , _ ( t ) } ) ) ) : _ ( t ) } _ g e t E l e m e n t ( ) { i f ( ! t h i s . _ e l e m e n t ) { c o n s t   t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; t . c l a s s N a m e = t h i s . _ c o n f i g . c l a s s N a m e , t h i s . _ c o n f i g . i s A n i m a t e d & & t . c l a s s L i s t . a d d ( " f a d e " ) , t h i s . _ e l e m e n t = t } r e t u r n   t h i s . _ e l e m e n t } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . p i , . . . " o b j e c t " = = t y p e o f   t ? t : { } } ) . r o o t E l e m e n t = r ( t . r o o t E l e m e n t ) , a ( " b a c k d r o p " , t , m i ) , t } _ a p p e n d ( ) { t h i s . _ i s A p p e n d e d | | ( t h i s . _ c o n f i g . r o o t E l e m e n t . a p p e n d ( t h i s . _ g e t E l e m e n t ( ) ) , j . o n ( t h i s . _ g e t E l e m e n t ( ) , _ i , ( ( ) = > { _ ( t h i s . _ c o n f i g . c l i c k C a l l b a c k ) } ) ) , t h i s . _ i s A p p e n d e d = ! 0 ) } d i s p o s e ( ) { t h i s . _ i s A p p e n d e d & & ( j . o f f ( t h i s . _ e l e m e n t , _ i ) , t h i s . _ e l e m e n t . r e m o v e ( ) , t h i s . _ i s A p p e n d e d = ! 1 ) } _ e m u l a t e A n i m a t i o n ( t ) { b ( t , t h i s . _ g e t E l e m e n t ( ) , t h i s . _ c o n f i g . i s A n i m a t e d ) } } c o n s t   v i = { t r a p E l e m e n t : n u l l , a u t o f o c u s : ! 0 } , y i = { t r a p E l e m e n t : " e l e m e n t " , a u t o f o c u s : " b o o l e a n " } , w i = " . b s . f o c u s t r a p " , E i = " b a c k w a r d " ; c l a s s   A i { c o n s t r u c t o r ( t ) { t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( t ) , t h i s . _ i s A c t i v e = ! 1 , t h i s . _ l a s t T a b N a v D i r e c t i o n = n u l l } a c t i v a t e ( ) { c o n s t { t r a p E l e m e n t : t , a u t o f o c u s : e } = t h i s . _ c o n f i g ; t h i s . _ i s A c t i v e | | ( e & & t . f o c u s ( ) , j . o f f ( d o c u m e n t , w i ) , j . o n ( d o c u m e n t , " f o c u s i n . b s . f o c u s t r a p " , ( t = > t h i s . _ h a n d l e F o c u s i n ( t ) ) ) , j . o n ( d o c u m e n t , " k e y d o w n . t a b . b s . f o c u s t r a p " , ( t = > t h i s . _ h a n d l e K e y d o w n ( t ) ) ) , t h i s . _ i s A c t i v e = ! 0 ) } d e a c t i v a t e ( ) { t h i s . _ i s A c t i v e & & ( t h i s . _ i s A c t i v e = ! 1 , j . o f f ( d o c u m e n t , w i ) ) } _ h a n d l e F o c u s i n ( t ) { c o n s t { t a r g e t : e } = t , { t r a p E l e m e n t : i } = t h i s . _ c o n f i g ; i f ( e = = = d o c u m e n t | | e = = = i | | i . c o n t a i n s ( e ) ) r e t u r n ; c o n s t   n = V . f o c u s a b l e C h i l d r e n ( i ) ; 0 = = = n . l e n g t h ? i . f o c u s ( ) : t h i s . _ l a s t T a b N a v D i r e c t i o n = = = E i ? n [ n . l e n g t h - 1 ] . f o c u s ( ) : n [ 0 ] . f o c u s ( ) } _ h a n d l e K e y d o w n ( t ) { " T a b " = = = t . k e y & & ( t h i s . _ l a s t T a b N a v D i r e c t i o n = t . s h i f t K e y ? E i : " f o r w a r d " ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . v i , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( " f o c u s t r a p " , t , y i ) , t } } c o n s t   T i = " m o d a l " , O i = " E s c a p e " , C i = { b a c k d r o p : ! 0 , k e y b o a r d : ! 0 , f o c u s : ! 0 } , k i = { b a c k d r o p : " ( b o o l e a n | s t r i n g ) " , k e y b o a r d : " b o o l e a n " , f o c u s : " b o o l e a n " } , L i = " h i d d e n . b s . m o d a l " , x i = " s h o w . b s . m o d a l " , D i = " r e s i z e . b s . m o d a l " , S i = " c l i c k . d i s m i s s . b s . m o d a l " , N i = " k e y d o w n . d i s m i s s . b s . m o d a l " , I i = " m o u s e d o w n . d i s m i s s . b s . m o d a l " , P i = " m o d a l - o p e n " , j i = " s h o w " , M i = " m o d a l - s t a t i c " ; c l a s s   H i   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ d i a l o g = V . f i n d O n e ( " . m o d a l - d i a l o g " , t h i s . _ e l e m e n t ) , t h i s . _ b a c k d r o p = t h i s . _ i n i t i a l i z e B a c k D r o p ( ) , t h i s . _ f o c u s t r a p = t h i s . _ i n i t i a l i z e F o c u s T r a p ( ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 1 , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ s c r o l l B a r = n e w   f i } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   C i } s t a t i c   g e t   N A M E ( ) { r e t u r n   T i } t o g g l e ( t ) { r e t u r n   t h i s . _ i s S h o w n ? t h i s . h i d e ( ) : t h i s . s h o w ( t ) } s h o w ( t ) { t h i s . _ i s S h o w n | | t h i s . _ i s T r a n s i t i o n i n g | | j . t r i g g e r ( t h i s . _ e l e m e n t , x i , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ i s S h o w n = ! 0 , t h i s . _ i s A n i m a t e d ( ) & & ( t h i s . _ i s T r a n s i t i o n i n g = ! 0 ) , t h i s . _ s c r o l l B a r . h i d e ( ) , d o c u m e n t . b o d y . c l a s s L i s t . a d d ( P i ) , t h i s . _ a d j u s t D i a l o g ( ) , t h i s . _ s e t E s c a p e E v e n t ( ) , t h i s . _ s e t R e s i z e E v e n t ( ) , j . o n ( t h i s . _ d i a l o g , I i , ( ( ) = > { j . o n e ( t h i s . _ e l e m e n t , " m o u s e u p . d i s m i s s . b s . m o d a l " , ( t = > { t . t a r g e t = = = t h i s . _ e l e m e n t & & ( t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 0 ) } ) ) } ) ) , t h i s . _ s h o w B a c k d r o p ( ( ( ) = > t h i s . _ s h o w E l e m e n t ( t ) ) ) ) } h i d e ( ) { i f ( ! t h i s . _ i s S h o w n | | t h i s . _ i s T r a n s i t i o n i n g ) r e t u r n ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . m o d a l " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ i s S h o w n = ! 1 ; c o n s t   t = t h i s . _ i s A n i m a t e d ( ) ; t & & ( t h i s . _ i s T r a n s i t i o n i n g = ! 0 ) , t h i s . _ s e t E s c a p e E v e n t ( ) , t h i s . _ s e t R e s i z e E v e n t ( ) , t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( j i ) , j . o f f ( t h i s . _ e l e m e n t , S i ) , j . o f f ( t h i s . _ d i a l o g , I i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > t h i s . _ h i d e M o d a l ( ) ) , t h i s . _ e l e m e n t , t ) } d i s p o s e ( ) { [ w i n d o w , t h i s . _ d i a l o g ] . f o r E a c h ( ( t = > j . o f f ( t , " . b s . m o d a l " ) ) ) , t h i s . _ b a c k d r o p . d i s p o s e ( ) , t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , s u p e r . d i s p o s e ( ) } h a n d l e U p d a t e ( ) { t h i s . _ a d j u s t D i a l o g ( ) } _ i n i t i a l i z e B a c k D r o p ( ) { r e t u r n   n e w   b i ( { i s V i s i b l e : B o o l e a n ( t h i s . _ c o n f i g . b a c k d r o p ) , i s A n i m a t e d : t h i s . _ i s A n i m a t e d ( ) } ) } _ i n i t i a l i z e F o c u s T r a p ( ) { r e t u r n   n e w   A i ( { t r a p E l e m e n t : t h i s . _ e l e m e n t } ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . C i , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( T i , t , k i ) , t } _ s h o w E l e m e n t ( t ) { c o n s t   e = t h i s . _ i s A n i m a t e d ( ) , i = V . f i n d O n e ( " . m o d a l - b o d y " , t h i s . _ d i a l o g ) ; t h i s . _ e l e m e n t . p a r e n t N o d e & & t h i s . _ e l e m e n t . p a r e n t N o d e . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E | | d o c u m e n t . b o d y . a p p e n d ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - h i d d e n " ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - m o d a l " , ! 0 ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " r o l e " , " d i a l o g " ) , t h i s . _ e l e m e n t . s c r o l l T o p = 0 , i & & ( i . s c r o l l T o p = 0 ) , e & & u ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( j i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ c o n f i g . f o c u s & & t h i s . _ f o c u s t r a p . a c t i v a t e ( ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . m o d a l " , { r e l a t e d T a r g e t : t } ) } ) , t h i s . _ d i a l o g , e ) } _ s e t E s c a p e E v e n t ( ) { t h i s . _ i s S h o w n ? j . o n ( t h i s . _ e l e m e n t , N i , ( t = > { t h i s . _ c o n f i g . k e y b o a r d & & t . k e y = = = O i ? ( t . p r e v e n t D e f a u l t ( ) , t h i s . h i d e ( ) ) : t h i s . _ c o n f i g . k e y b o a r d | | t . k e y ! = = O i | | t h i s . _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) } ) ) : j . o f f ( t h i s . _ e l e m e n t , N i ) } _ s e t R e s i z e E v e n t ( ) { t h i s . _ i s S h o w n ? j . o n ( w i n d o w , D i , ( ( ) = > t h i s . _ a d j u s t D i a l o g ( ) ) ) : j . o f f ( w i n d o w , D i ) } _ h i d e M o d a l ( ) { t h i s . _ e l e m e n t . s t y l e . d i s p l a y = " n o n e " , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - h i d d e n " , ! 0 ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - m o d a l " ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " r o l e " ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ b a c k d r o p . h i d e ( ( ( ) = > { d o c u m e n t . b o d y . c l a s s L i s t . r e m o v e ( P i ) , t h i s . _ r e s e t A d j u s t m e n t s ( ) , t h i s . _ s c r o l l B a r . r e s e t ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , L i ) } ) ) } _ s h o w B a c k d r o p ( t ) { j . o n ( t h i s . _ e l e m e n t , S i , ( t = > { t h i s . _ i g n o r e B a c k d r o p C l i c k ? t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 1 : t . t a r g e t = = = t . c u r r e n t T a r g e t & & ( ! 0 = = = t h i s . _ c o n f i g . b a c k d r o p ? t h i s . h i d e ( ) : " s t a t i c " = = = t h i s . _ c o n f i g . b a c k d r o p & & t h i s . _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) ) } ) ) , t h i s . _ b a c k d r o p . s h o w ( t ) } _ i s A n i m a t e d ( ) { r e t u r n   t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " f a d e " ) } _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) { i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e P r e v e n t e d . b s . m o d a l " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t { c l a s s L i s t : t , s c r o l l H e i g h t : e , s t y l e : i } = t h i s . _ e l e m e n t , n = e > d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t ; ! n & & " h i d d e n " = = = i . o v e r f l o w Y | | t . c o n t a i n s ( M i ) | | ( n | | ( i . o v e r f l o w Y = " h i d d e n " ) , t . a d d ( M i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t . r e m o v e ( M i ) , n | | t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { i . o v e r f l o w Y = " " } ) , t h i s . _ d i a l o g ) } ) , t h i s . _ d i a l o g ) , t h i s . _ e l e m e n t . f o c u s ( ) ) } _ a d j u s t D i a l o g ( ) { c o n s t   t = t h i s . _ e l e m e n t . s c r o l l H e i g h t > d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t , e = t h i s . _ s c r o l l B a r . g e t W i d t h ( ) , i = e > 0 ; ( ! i & & t & & ! m ( ) | | i & & ! t & & m ( ) ) & & ( t h i s . _ e l e m e n t . s t y l e . p a d d i n g L e f t = ` $ { e } p x ` ) , ( i & & ! t & & ! m ( ) | | ! i & & t & & m ( ) ) & & ( t h i s . _ e l e m e n t . s t y l e . p a d d i n g R i g h t = ` $ { e } p x ` ) } _ r e s e t A d j u s t m e n t s ( ) { t h i s . _ e l e m e n t . s t y l e . p a d d i n g L e f t = " " , t h i s . _ e l e m e n t . s t y l e . p a d d i n g R i g h t = " " } s t a t i c   j Q u e r y I n t e r f a c e ( t , e ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   i = H i . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = i [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; i [ t ] ( e ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . m o d a l . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " m o d a l " ] ' , ( f u n c t i o n ( t ) { c o n s t   e = n ( t h i s ) ; [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , j . o n e ( e , x i , ( t = > { t . d e f a u l t P r e v e n t e d | | j . o n e ( e , L i , ( ( ) = > { l ( t h i s ) & & t h i s . f o c u s ( ) } ) ) } ) ) ; c o n s t   i = V . f i n d O n e ( " . m o d a l . s h o w " ) ; i & & H i . g e t I n s t a n c e ( i ) . h i d e ( ) , H i . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( t h i s ) } ) ) , R ( H i ) , g ( H i ) ; c o n s t   B i = " o f f c a n v a s " , R i = { b a c k d r o p : ! 0 , k e y b o a r d : ! 0 , s c r o l l : ! 1 } , W i = { b a c k d r o p : " b o o l e a n " , k e y b o a r d : " b o o l e a n " , s c r o l l : " b o o l e a n " } , $ i = " s h o w " , z i = " . o f f c a n v a s . s h o w " , q i = " h i d d e n . b s . o f f c a n v a s " ; c l a s s   F i   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ b a c k d r o p = t h i s . _ i n i t i a l i z e B a c k D r o p ( ) , t h i s . _ f o c u s t r a p = t h i s . _ i n i t i a l i z e F o c u s T r a p ( ) , t h i s . _ a d d E v e n t L i s t e n e r s ( ) } s t a t i c   g e t   N A M E ( ) { r e t u r n   B i } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   R i } t o g g l e ( t ) { r e t u r n   t h i s . _ i s S h o w n ? t h i s . h i d e ( ) : t h i s . s h o w ( t ) } s h o w ( t ) { t h i s . _ i s S h o w n | | j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . o f f c a n v a s " , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ i s S h o w n = ! 0 , t h i s . _ e l e m e n t . s t y l e . v i s i b i l i t y = " v i s i b l e " , t h i s . _ b a c k d r o p . s h o w ( ) , t h i s . _ c o n f i g . s c r o l l | | ( n e w   f i ) . h i d e ( ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - h i d d e n " ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - m o d a l " , ! 0 ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " r o l e " , " d i a l o g " ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( $ i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ c o n f i g . s c r o l l | | t h i s . _ f o c u s t r a p . a c t i v a t e ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . o f f c a n v a s " , { r e l a t e d T a r g e t : t } ) } ) , t h i s . _ e l e m e n t , ! 0 ) ) } h i d e ( ) { t h i s . _ i s S h o w n & & ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . o f f c a n v a s " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , t h i s . _ e l e m e n t . b l u r ( ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( $ i ) , t h i s . _ b a c k d r o p . h i d e ( ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - h i d d e n " , ! 0 ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - m o d a l " ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " r o l e " ) , t h i s . _ e l e m e n t . s t y l e . v i s i b i l i t y = " h i d d e n " , t h i s . _ c o n f i g . s c r o l l | | ( n e w   f i ) . r e s e t ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , q i ) } ) , t h i s . _ e l e m e n t , ! 0 ) ) ) } d i s p o s e ( ) { t h i s . _ b a c k d r o p . d i s p o s e ( ) , t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . R i , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( B i , t , W i ) , t } _ i n i t i a l i z e B a c k D r o p ( ) { r e t u r n   n e w   b i ( { c l a s s N a m e : " o f f c a n v a s - b a c k d r o p " , i s V i s i b l e : t h i s . _ c o n f i g . b a c k d r o p , i s A n i m a t e d : ! 0 , r o o t E l e m e n t : t h i s . _ e l e m e n t . p a r e n t N o d e , c l i c k C a l l b a c k : ( ) = > t h i s . h i d e ( ) } ) } _ i n i t i a l i z e F o c u s T r a p ( ) { r e t u r n   n e w   A i ( { t r a p E l e m e n t : t h i s . _ e l e m e n t } ) } _ a d d E v e n t L i s t e n e r s ( ) { j . o n ( t h i s . _ e l e m e n t , " k e y d o w n . d i s m i s s . b s . o f f c a n v a s " , ( t = > { t h i s . _ c o n f i g . k e y b o a r d & & " E s c a p e " = = = t . k e y & & t h i s . h i d e ( ) } ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = F i . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] | | t . s t a r t s W i t h ( " _ " ) | | " c o n s t r u c t o r " = = = t ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . o f f c a n v a s . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " o f f c a n v a s " ] ' , ( f u n c t i o n ( t ) { c o n s t   e = n ( t h i s ) ; i f ( [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , c ( t h i s ) ) r e t u r n ; j . o n e ( e , q i , ( ( ) = > { l ( t h i s ) & & t h i s . f o c u s ( ) } ) ) ; c o n s t   i = V . f i n d O n e ( z i ) ; i & & i ! = = e & & F i . g e t I n s t a n c e ( i ) . h i d e ( ) , F i . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( t h i s ) } ) ) , j . o n ( w i n d o w , " l o a d . b s . o f f c a n v a s . d a t a - a p i " , ( ( ) = > V . f i n d ( z i ) . f o r E a c h ( ( t = > F i . g e t O r C r e a t e I n s t a n c e ( t ) . s h o w ( ) ) ) ) ) , R ( F i ) , g ( F i ) ; c o n s t   U i = n e w   S e t ( [ " b a c k g r o u n d " , " c i t e " , " h r e f " , " i t e m t y p e " , " l o n g d e s c " , " p o s t e r " , " s r c " , " x l i n k : h r e f " ] ) , V i = / ^ ( ? : ( ? : h t t p s ? | m a i l t o | f t p | t e l | f i l e | s m s ) : | [ ^ # & / : ? ] * ( ? : [ # / ? ] | $ ) ) / i , K i = / ^ d a t a : ( ? : i m a g e \ / ( ? : b m p | g i f | j p e g | j p g | p n g | t i f f | w e b p ) | v i d e o \ / ( ? : m p e g | m p 4 | o g g | w e b m ) | a u d i o \ / ( ? : m p 3 | o g a | o g g | o p u s ) ) ; b a s e 6 4 , [ \ d + / a - z ] + = * $ / i , X i = ( t , e ) = > { c o n s t   i = t . n o d e N a m e . t o L o w e r C a s e ( ) ; i f ( e . i n c l u d e s ( i ) ) r e t u r n ! U i . h a s ( i ) | | B o o l e a n ( V i . t e s t ( t . n o d e V a l u e ) | | K i . t e s t ( t . n o d e V a l u e ) ) ; c o n s t   n = e . f i l t e r ( ( t = > t   i n s t a n c e o f   R e g E x p ) ) ; f o r ( l e t   t = 0 , e = n . l e n g t h ; t < e ; t + + ) i f ( n [ t ] . t e s t ( i ) ) r e t u r n ! 0 ; r e t u r n ! 1 } ; f u n c t i o n   Y i ( t , e , i ) { i f ( ! t . l e n g t h ) r e t u r n   t ; i f ( i & & " f u n c t i o n " = = t y p e o f   i ) r e t u r n   i ( t ) ; c o n s t   n = ( n e w   w i n d o w . D O M P a r s e r ) . p a r s e F r o m S t r i n g ( t , " t e x t / h t m l " ) , s = [ ] . c o n c a t ( . . . n . b o d y . q u e r y S e l e c t o r A l l ( " * " ) ) ; f o r ( l e t   t = 0 , i = s . l e n g t h ; t < i ; t + + ) { c o n s t   i = s [ t ] , n = i . n o d e N a m e . t o L o w e r C a s e ( ) ; i f ( ! O b j e c t . k e y s ( e ) . i n c l u d e s ( n ) ) { i . r e m o v e ( ) ; c o n t i n u e } c o n s t   o = [ ] . c o n c a t ( . . . i . a t t r i b u t e s ) , r = [ ] . c o n c a t ( e [ " * " ] | | [ ] , e [ n ] | | [ ] ) ; o . f o r E a c h ( ( t = > { X i ( t , r ) | | i . r e m o v e A t t r i b u t e ( t . n o d e N a m e ) } ) ) } r e t u r n   n . b o d y . i n n e r H T M L } c o n s t   Q i = " t o o l t i p " , G i = n e w   S e t ( [ " s a n i t i z e " , " a l l o w L i s t " , " s a n i t i z e F n " ] ) , Z i = { a n i m a t i o n : " b o o l e a n " , t e m p l a t e : " s t r i n g " , t i t l e : " ( s t r i n g | e l e m e n t | f u n c t i o n ) " , t r i g g e r : " s t r i n g " , d e l a y : " ( n u m b e r | o b j e c t ) " , h t m l : " b o o l e a n " , s e l e c t o r : " ( s t r i n g | b o o l e a n ) " , p l a c e m e n t : " ( s t r i n g | f u n c t i o n ) " , o f f s e t : " ( a r r a y | s t r i n g | f u n c t i o n ) " , c o n t a i n e r : " ( s t r i n g | e l e m e n t | b o o l e a n ) " , f a l l b a c k P l a c e m e n t s : " a r r a y " , b o u n d a r y : " ( s t r i n g | e l e m e n t ) " , c u s t o m C l a s s : " ( s t r i n g | f u n c t i o n ) " , s a n i t i z e : " b o o l e a n " , s a n i t i z e F n : " ( n u l l | f u n c t i o n ) " , a l l o w L i s t : " o b j e c t " , p o p p e r C o n f i g : " ( n u l l | o b j e c t | f u n c t i o n ) " } , J i = { A U T O : " a u t o " , T O P : " t o p " , R I G H T : m ( ) ? " l e f t " : " r i g h t " , B O T T O M : " b o t t o m " , L E F T : m ( ) ? " r i g h t " : " l e f t " } , t n = { a n i m a t i o n : ! 0 , t e m p l a t e : ' < d i v   c l a s s = " t o o l t i p "   r o l e = " t o o l t i p " > < d i v   c l a s s = " t o o l t i p - a r r o w " > < / d i v > < d i v   c l a s s = " t o o l t i p - i n n e r " > < / d i v > < / d i v > ' , t r i g g e r : " h o v e r   f o c u s " , t i t l e : " " , d e l a y : 0 , h t m l : ! 1 , s e l e c t o r : ! 1 , p l a c e m e n t : " t o p " , o f f s e t : [ 0 , 0 ] , c o n t a i n e r : ! 1 , f a l l b a c k P l a c e m e n t s : [ " t o p " , " r i g h t " , " b o t t o m " , " l e f t " ] , b o u n d a r y : " c l i p p i n g P a r e n t s " , c u s t o m C l a s s : " " , s a n i t i z e : ! 0 , s a n i t i z e F n : n u l l , a l l o w L i s t : { " * " : [ " c l a s s " , " d i r " , " i d " , " l a n g " , " r o l e " , / ^ a r i a - [ \ w - ] * $ / i ] , a : [ " t a r g e t " , " h r e f " , " t i t l e " , " r e l " ] , a r e a : [ ] , b : [ ] , b r : [ ] , c o l : [ ] , c o d e : [ ] , d i v : [ ] , e m : [ ] , h r : [ ] , h 1 : [ ] , h 2 : [ ] , h 3 : [ ] , h 4 : [ ] , h 5 : [ ] , h 6 : [ ] , i : [ ] , i m g : [ " s r c " , " s r c s e t " , " a l t " , " t i t l e " , " w i d t h " , " h e i g h t " ] , l i : [ ] , o l : [ ] , p : [ ] , p r e : [ ] , s : [ ] , s m a l l : [ ] , s p a n : [ ] , s u b : [ ] , s u p : [ ] , s t r o n g : [ ] , u : [ ] , u l : [ ] } , p o p p e r C o n f i g : n u l l } , e n = { H I D E : " h i d e . b s . t o o l t i p " , H I D D E N : " h i d d e n . b s . t o o l t i p " , S H O W : " s h o w . b s . t o o l t i p " , S H O W N : " s h o w n . b s . t o o l t i p " , I N S E R T E D : " i n s e r t e d . b s . t o o l t i p " , C L I C K : " c l i c k . b s . t o o l t i p " , F O C U S I N : " f o c u s i n . b s . t o o l t i p " , F O C U S O U T : " f o c u s o u t . b s . t o o l t i p " , M O U S E E N T E R : " m o u s e e n t e r . b s . t o o l t i p " , M O U S E L E A V E : " m o u s e l e a v e . b s . t o o l t i p " } , n n = " f a d e " , s n = " s h o w " , o n = " s h o w " , r n = " o u t " , a n = " . t o o l t i p - i n n e r " , l n = " . m o d a l " , c n = " h i d e . b s . m o d a l " , h n = " h o v e r " , d n = " f o c u s " ; c l a s s   u n   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { i f ( v o i d   0 = = = F e ) t h r o w   n e w   T y p e E r r o r ( " B o o t s t r a p ' s   t o o l t i p s   r e q u i r e   P o p p e r   ( h t t p s : / / p o p p e r . j s . o r g ) " ) ; s u p e r ( t ) , t h i s . _ i s E n a b l e d = ! 0 , t h i s . _ t i m e o u t = 0 , t h i s . _ h o v e r S t a t e = " " , t h i s . _ a c t i v e T r i g g e r = { } , t h i s . _ p o p p e r = n u l l , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . t i p = n u l l , t h i s . _ s e t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   t n } s t a t i c   g e t   N A M E ( ) { r e t u r n   Q i } s t a t i c   g e t   E v e n t ( ) { r e t u r n   e n } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   Z i } e n a b l e ( ) { t h i s . _ i s E n a b l e d = ! 0 } d i s a b l e ( ) { t h i s . _ i s E n a b l e d = ! 1 } t o g g l e E n a b l e d ( ) { t h i s . _ i s E n a b l e d = ! t h i s . _ i s E n a b l e d } t o g g l e ( t ) { i f ( t h i s . _ i s E n a b l e d ) i f ( t ) { c o n s t   e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t ) ; e . _ a c t i v e T r i g g e r . c l i c k = ! e . _ a c t i v e T r i g g e r . c l i c k , e . _ i s W i t h A c t i v e T r i g g e r ( ) ? e . _ e n t e r ( n u l l , e ) : e . _ l e a v e ( n u l l , e ) } e l s e { i f ( t h i s . g e t T i p E l e m e n t ( ) . c l a s s L i s t . c o n t a i n s ( s n ) ) r e t u r n   v o i d   t h i s . _ l e a v e ( n u l l , t h i s ) ; t h i s . _ e n t e r ( n u l l , t h i s ) } } d i s p o s e ( ) { c l e a r T i m e o u t ( t h i s . _ t i m e o u t ) , j . o f f ( t h i s . _ e l e m e n t . c l o s e s t ( l n ) , c n , t h i s . _ h i d e M o d a l H a n d l e r ) , t h i s . t i p & & t h i s . t i p . r e m o v e ( ) , t h i s . _ d i s p o s e P o p p e r ( ) , s u p e r . d i s p o s e ( ) } s h o w ( ) { i f ( " n o n e " = = = t h i s . _ e l e m e n t . s t y l e . d i s p l a y ) t h r o w   n e w   E r r o r ( " P l e a s e   u s e   s h o w   o n   v i s i b l e   e l e m e n t s " ) ; i f ( ! t h i s . i s W i t h C o n t e n t ( ) | | ! t h i s . _ i s E n a b l e d ) r e t u r n ; c o n s t   t = j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . S H O W ) , e = h ( t h i s . _ e l e m e n t ) , i = n u l l = = = e ? t h i s . _ e l e m e n t . o w n e r D o c u m e n t . d o c u m e n t E l e m e n t . c o n t a i n s ( t h i s . _ e l e m e n t ) : e . c o n t a i n s ( t h i s . _ e l e m e n t ) ; i f ( t . d e f a u l t P r e v e n t e d | | ! i ) r e t u r n ; " t o o l t i p " = = = t h i s . c o n s t r u c t o r . N A M E & & t h i s . t i p & & t h i s . g e t T i t l e ( ) ! = = t h i s . t i p . q u e r y S e l e c t o r ( a n ) . i n n e r H T M L & & ( t h i s . _ d i s p o s e P o p p e r ( ) , t h i s . t i p . r e m o v e ( ) , t h i s . t i p = n u l l ) ; c o n s t   n = t h i s . g e t T i p E l e m e n t ( ) , s = ( t = > { d o { t + = M a t h . f l o o r ( 1 e 6 * M a t h . r a n d o m ( ) ) } w h i l e ( d o c u m e n t . g e t E l e m e n t B y I d ( t ) ) ; r e t u r n   t } ) ( t h i s . c o n s t r u c t o r . N A M E ) ; n . s e t A t t r i b u t e ( " i d " , s ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - d e s c r i b e d b y " , s ) , t h i s . _ c o n f i g . a n i m a t i o n & & n . c l a s s L i s t . a d d ( n n ) ; c o n s t   o = " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p l a c e m e n t ? t h i s . _ c o n f i g . p l a c e m e n t . c a l l ( t h i s , n , t h i s . _ e l e m e n t ) : t h i s . _ c o n f i g . p l a c e m e n t , r = t h i s . _ g e t A t t a c h m e n t ( o ) ; t h i s . _ a d d A t t a c h m e n t C l a s s ( r ) ; c o n s t { c o n t a i n e r : a } = t h i s . _ c o n f i g ; H . s e t ( n , t h i s . c o n s t r u c t o r . D A T A _ K E Y , t h i s ) , t h i s . _ e l e m e n t . o w n e r D o c u m e n t . d o c u m e n t E l e m e n t . c o n t a i n s ( t h i s . t i p ) | | ( a . a p p e n d ( n ) , j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . I N S E R T E D ) ) , t h i s . _ p o p p e r ? t h i s . _ p o p p e r . u p d a t e ( ) : t h i s . _ p o p p e r = q e ( t h i s . _ e l e m e n t , n , t h i s . _ g e t P o p p e r C o n f i g ( r ) ) , n . c l a s s L i s t . a d d ( s n ) ; c o n s t   l = t h i s . _ r e s o l v e P o s s i b l e F u n c t i o n ( t h i s . _ c o n f i g . c u s t o m C l a s s ) ; l & & n . c l a s s L i s t . a d d ( . . . l . s p l i t ( "   " ) ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > { j . o n ( t , " m o u s e o v e r " , d ) } ) ) ; c o n s t   c = t h i s . t i p . c l a s s L i s t . c o n t a i n s ( n n ) ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { c o n s t   t = t h i s . _ h o v e r S t a t e ; t h i s . _ h o v e r S t a t e = n u l l , j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . S H O W N ) , t = = = r n & & t h i s . _ l e a v e ( n u l l , t h i s ) } ) , t h i s . t i p , c ) } h i d e ( ) { i f ( ! t h i s . _ p o p p e r ) r e t u r n ; c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . H I D E ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t . c l a s s L i s t . r e m o v e ( s n ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > j . o f f ( t , " m o u s e o v e r " , d ) ) ) , t h i s . _ a c t i v e T r i g g e r . c l i c k = ! 1 , t h i s . _ a c t i v e T r i g g e r . f o c u s = ! 1 , t h i s . _ a c t i v e T r i g g e r . h o v e r = ! 1 ; c o n s t   e = t h i s . t i p . c l a s s L i s t . c o n t a i n s ( n n ) ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ i s W i t h A c t i v e T r i g g e r ( ) | | ( t h i s . _ h o v e r S t a t e ! = = o n & & t . r e m o v e ( ) , t h i s . _ c l e a n T i p C l a s s ( ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - d e s c r i b e d b y " ) , j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . H I D D E N ) , t h i s . _ d i s p o s e P o p p e r ( ) ) } ) , t h i s . t i p , e ) , t h i s . _ h o v e r S t a t e = " " } u p d a t e ( ) { n u l l ! = = t h i s . _ p o p p e r & & t h i s . _ p o p p e r . u p d a t e ( ) } i s W i t h C o n t e n t ( ) { r e t u r n   B o o l e a n ( t h i s . g e t T i t l e ( ) ) } g e t T i p E l e m e n t ( ) { i f ( t h i s . t i p ) r e t u r n   t h i s . t i p ; c o n s t   t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; t . i n n e r H T M L = t h i s . _ c o n f i g . t e m p l a t e ; c o n s t   e = t . c h i l d r e n [ 0 ] ; r e t u r n   t h i s . s e t C o n t e n t ( e ) , e . c l a s s L i s t . r e m o v e ( n n , s n ) , t h i s . t i p = e , t h i s . t i p } s e t C o n t e n t ( t ) { t h i s . _ s a n i t i z e A n d S e t C o n t e n t ( t , t h i s . g e t T i t l e ( ) , a n ) } _ s a n i t i z e A n d S e t C o n t e n t ( t , e , i ) { c o n s t   n = V . f i n d O n e ( i , t ) ; e | | ! n ? t h i s . s e t E l e m e n t C o n t e n t ( n , e ) : n . r e m o v e ( ) } s e t E l e m e n t C o n t e n t ( t , e ) { i f ( n u l l ! = = t ) r e t u r n   o ( e ) ? ( e = r ( e ) , v o i d ( t h i s . _ c o n f i g . h t m l ? e . p a r e n t N o d e ! = = t & & ( t . i n n e r H T M L = " " , t . a p p e n d ( e ) ) : t . t e x t C o n t e n t = e . t e x t C o n t e n t ) ) : v o i d ( t h i s . _ c o n f i g . h t m l ? ( t h i s . _ c o n f i g . s a n i t i z e & & ( e = Y i ( e , t h i s . _ c o n f i g . a l l o w L i s t , t h i s . _ c o n f i g . s a n i t i z e F n ) ) , t . i n n e r H T M L = e ) : t . t e x t C o n t e n t = e ) } g e t T i t l e ( ) { c o n s t   t = t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " ) | | t h i s . _ c o n f i g . t i t l e ; r e t u r n   t h i s . _ r e s o l v e P o s s i b l e F u n c t i o n ( t ) } u p d a t e A t t a c h m e n t ( t ) { r e t u r n " r i g h t " = = = t ? " e n d " : " l e f t " = = = t ? " s t a r t " : t } _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) { r e t u r n   e | | t h i s . c o n s t r u c t o r . g e t O r C r e a t e I n s t a n c e ( t . d e l e g a t e T a r g e t , t h i s . _ g e t D e l e g a t e C o n f i g ( ) ) } _ g e t O f f s e t ( ) { c o n s t { o f f s e t : t } = t h i s . _ c o n f i g ; r e t u r n " s t r i n g " = = t y p e o f   t ? t . s p l i t ( " , " ) . m a p ( ( t = > N u m b e r . p a r s e I n t ( t , 1 0 ) ) ) : " f u n c t i o n " = = t y p e o f   t ? e = > t ( e , t h i s . _ e l e m e n t ) : t } _ r e s o l v e P o s s i b l e F u n c t i o n ( t ) { r e t u r n " f u n c t i o n " = = t y p e o f   t ? t . c a l l ( t h i s . _ e l e m e n t ) : t } _ g e t P o p p e r C o n f i g ( t ) { c o n s t   e = { p l a c e m e n t : t , m o d i f i e r s : [ { n a m e : " f l i p " , o p t i o n s : { f a l l b a c k P l a c e m e n t s : t h i s . _ c o n f i g . f a l l b a c k P l a c e m e n t s } } , { n a m e : " o f f s e t " , o p t i o n s : { o f f s e t : t h i s . _ g e t O f f s e t ( ) } } , { n a m e : " p r e v e n t O v e r f l o w " , o p t i o n s : { b o u n d a r y : t h i s . _ c o n f i g . b o u n d a r y } } , { n a m e : " a r r o w " , o p t i o n s : { e l e m e n t : ` . $ { t h i s . c o n s t r u c t o r . N A M E } - a r r o w ` } } , { n a m e : " o n C h a n g e " , e n a b l e d : ! 0 , p h a s e : " a f t e r W r i t e " , f n : t = > t h i s . _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) } ] , o n F i r s t U p d a t e : t = > { t . o p t i o n s . p l a c e m e n t ! = = t . p l a c e m e n t & & t h i s . _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) } } ; r e t u r n { . . . e , . . . " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p o p p e r C o n f i g ? t h i s . _ c o n f i g . p o p p e r C o n f i g ( e ) : t h i s . _ c o n f i g . p o p p e r C o n f i g } } _ a d d A t t a c h m e n t C l a s s ( t ) { t h i s . g e t T i p E l e m e n t ( ) . c l a s s L i s t . a d d ( ` $ { t h i s . _ g e t B a s i c C l a s s P r e f i x ( ) } - $ { t h i s . u p d a t e A t t a c h m e n t ( t ) } ` ) } _ g e t A t t a c h m e n t ( t ) { r e t u r n   J i [ t . t o U p p e r C a s e ( ) ] } _ s e t L i s t e n e r s ( ) { t h i s . _ c o n f i g . t r i g g e r . s p l i t ( "   " ) . f o r E a c h ( ( t = > { i f ( " c l i c k " = = = t ) j . o n ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . C L I C K , t h i s . _ c o n f i g . s e l e c t o r , ( t = > t h i s . t o g g l e ( t ) ) ) ; e l s e   i f ( " m a n u a l " ! = = t ) { c o n s t   e = t = = = h n ? t h i s . c o n s t r u c t o r . E v e n t . M O U S E E N T E R : t h i s . c o n s t r u c t o r . E v e n t . F O C U S I N , i = t = = = h n ? t h i s . c o n s t r u c t o r . E v e n t . M O U S E L E A V E : t h i s . c o n s t r u c t o r . E v e n t . F O C U S O U T ; j . o n ( t h i s . _ e l e m e n t , e , t h i s . _ c o n f i g . s e l e c t o r , ( t = > t h i s . _ e n t e r ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , i , t h i s . _ c o n f i g . s e l e c t o r , ( t = > t h i s . _ l e a v e ( t ) ) ) } } ) ) , t h i s . _ h i d e M o d a l H a n d l e r = ( ) = > { t h i s . _ e l e m e n t & & t h i s . h i d e ( ) } , j . o n ( t h i s . _ e l e m e n t . c l o s e s t ( l n ) , c n , t h i s . _ h i d e M o d a l H a n d l e r ) , t h i s . _ c o n f i g . s e l e c t o r ? t h i s . _ c o n f i g = { . . . t h i s . _ c o n f i g , t r i g g e r : " m a n u a l " , s e l e c t o r : " " } : t h i s . _ f i x T i t l e ( ) } _ f i x T i t l e ( ) { c o n s t   t = t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " t i t l e " ) , e = t y p e o f   t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " ) ; ( t | | " s t r i n g " ! = = e ) & & ( t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " , t | | " " ) , ! t | | t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " a r i a - l a b e l " ) | | t h i s . _ e l e m e n t . t e x t C o n t e n t | | t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - l a b e l " , t ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " t i t l e " , " " ) ) } _ e n t e r ( t , e ) { e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) , t & & ( e . _ a c t i v e T r i g g e r [ " f o c u s i n " = = = t . t y p e ? d n : h n ] = ! 0 ) , e . g e t T i p E l e m e n t ( ) . c l a s s L i s t . c o n t a i n s ( s n ) | | e . _ h o v e r S t a t e = = = o n ? e . _ h o v e r S t a t e = o n : ( c l e a r T i m e o u t ( e . _ t i m e o u t ) , e . _ h o v e r S t a t e = o n , e . _ c o n f i g . d e l a y & & e . _ c o n f i g . d e l a y . s h o w ? e . _ t i m e o u t = s e t T i m e o u t ( ( ( ) = > { e . _ h o v e r S t a t e = = = o n & & e . s h o w ( ) } ) , e . _ c o n f i g . d e l a y . s h o w ) : e . s h o w ( ) ) } _ l e a v e ( t , e ) { e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) , t & & ( e . _ a c t i v e T r i g g e r [ " f o c u s o u t " = = = t . t y p e ? d n : h n ] = e . _ e l e m e n t . c o n t a i n s ( t . r e l a t e d T a r g e t ) ) , e . _ i s W i t h A c t i v e T r i g g e r ( ) | | ( c l e a r T i m e o u t ( e . _ t i m e o u t ) , e . _ h o v e r S t a t e = r n , e . _ c o n f i g . d e l a y & & e . _ c o n f i g . d e l a y . h i d e ? e . _ t i m e o u t = s e t T i m e o u t ( ( ( ) = > { e . _ h o v e r S t a t e = = = r n & & e . h i d e ( ) } ) , e . _ c o n f i g . d e l a y . h i d e ) : e . h i d e ( ) ) } _ i s W i t h A c t i v e T r i g g e r ( ) { f o r ( c o n s t   t   i n   t h i s . _ a c t i v e T r i g g e r ) i f ( t h i s . _ a c t i v e T r i g g e r [ t ] ) r e t u r n ! 0 ; r e t u r n ! 1 } _ g e t C o n f i g ( t ) { c o n s t   e = U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) ; r e t u r n   O b j e c t . k e y s ( e ) . f o r E a c h ( ( t = > { G i . h a s ( t ) & & d e l e t e   e [ t ] } ) ) , ( t = { . . . t h i s . c o n s t r u c t o r . D e f a u l t , . . . e , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } ) . c o n t a i n e r = ! 1 = = = t . c o n t a i n e r ? d o c u m e n t . b o d y : r ( t . c o n t a i n e r ) , " n u m b e r " = = t y p e o f   t . d e l a y & & ( t . d e l a y = { s h o w : t . d e l a y , h i d e : t . d e l a y } ) , " n u m b e r " = = t y p e o f   t . t i t l e & & ( t . t i t l e = t . t i t l e . t o S t r i n g ( ) ) , " n u m b e r " = = t y p e o f   t . c o n t e n t & & ( t . c o n t e n t = t . c o n t e n t . t o S t r i n g ( ) ) , a ( Q i , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , t . s a n i t i z e & & ( t . t e m p l a t e = Y i ( t . t e m p l a t e , t . a l l o w L i s t , t . s a n i t i z e F n ) ) , t } _ g e t D e l e g a t e C o n f i g ( ) { c o n s t   t = { } ; f o r ( c o n s t   e   i n   t h i s . _ c o n f i g ) t h i s . c o n s t r u c t o r . D e f a u l t [ e ] ! = = t h i s . _ c o n f i g [ e ] & & ( t [ e ] = t h i s . _ c o n f i g [ e ] ) ; r e t u r n   t } _ c l e a n T i p C l a s s ( ) { c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) , e = n e w   R e g E x p ( ` ( ^ | \ \ s ) $ { t h i s . _ g e t B a s i c C l a s s P r e f i x ( ) } \ \ S + ` , " g " ) , i = t . g e t A t t r i b u t e ( " c l a s s " ) . m a t c h ( e ) ; n u l l ! = = i & & i . l e n g t h > 0 & & i . m a p ( ( t = > t . t r i m ( ) ) ) . f o r E a c h ( ( e = > t . c l a s s L i s t . r e m o v e ( e ) ) ) } _ g e t B a s i c C l a s s P r e f i x ( ) { r e t u r n " b s - t o o l t i p " } _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) { c o n s t { s t a t e : e } = t ; e & & ( t h i s . t i p = e . e l e m e n t s . p o p p e r , t h i s . _ c l e a n T i p C l a s s ( ) , t h i s . _ a d d A t t a c h m e n t C l a s s ( t h i s . _ g e t A t t a c h m e n t ( e . p l a c e m e n t ) ) ) } _ d i s p o s e P o p p e r ( ) { t h i s . _ p o p p e r & & ( t h i s . _ p o p p e r . d e s t r o y ( ) , t h i s . _ p o p p e r = n u l l ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = u n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } g ( u n ) ; c o n s t   f n = { . . . u n . D e f a u l t , p l a c e m e n t : " r i g h t " , o f f s e t : [ 0 , 8 ] , t r i g g e r : " c l i c k " , c o n t e n t : " " , t e m p l a t e : ' < d i v   c l a s s = " p o p o v e r "   r o l e = " t o o l t i p " > < d i v   c l a s s = " p o p o v e r - a r r o w " > < / d i v > < h 3   c l a s s = " p o p o v e r - h e a d e r " > < / h 3 > < d i v   c l a s s = " p o p o v e r - b o d y " > < / d i v > < / d i v > ' } , p n = { . . . u n . D e f a u l t T y p e , c o n t e n t : " ( s t r i n g | e l e m e n t | f u n c t i o n ) " } , m n = { H I D E : " h i d e . b s . p o p o v e r " , H I D D E N : " h i d d e n . b s . p o p o v e r " , S H O W : " s h o w . b s . p o p o v e r " , S H O W N : " s h o w n . b s . p o p o v e r " , I N S E R T E D : " i n s e r t e d . b s . p o p o v e r " , C L I C K : " c l i c k . b s . p o p o v e r " , F O C U S I N : " f o c u s i n . b s . p o p o v e r " , F O C U S O U T : " f o c u s o u t . b s . p o p o v e r " , M O U S E E N T E R : " m o u s e e n t e r . b s . p o p o v e r " , M O U S E L E A V E : " m o u s e l e a v e . b s . p o p o v e r " } ; c l a s s   g n   e x t e n d s   u n { s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   f n } s t a t i c   g e t   N A M E ( ) { r e t u r n " p o p o v e r " } s t a t i c   g e t   E v e n t ( ) { r e t u r n   m n } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   p n } i s W i t h C o n t e n t ( ) { r e t u r n   t h i s . g e t T i t l e ( ) | | t h i s . _ g e t C o n t e n t ( ) } s e t C o n t e n t ( t ) { t h i s . _ s a n i t i z e A n d S e t C o n t e n t ( t , t h i s . g e t T i t l e ( ) , " . p o p o v e r - h e a d e r " ) , t h i s . _ s a n i t i z e A n d S e t C o n t e n t ( t , t h i s . _ g e t C o n t e n t ( ) , " . p o p o v e r - b o d y " ) } _ g e t C o n t e n t ( ) { r e t u r n   t h i s . _ r e s o l v e P o s s i b l e F u n c t i o n ( t h i s . _ c o n f i g . c o n t e n t ) } _ g e t B a s i c C l a s s P r e f i x ( ) { r e t u r n " b s - p o p o v e r " } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = g n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } g ( g n ) ; c o n s t   _ n = " s c r o l l s p y " , b n = { o f f s e t : 1 0 , m e t h o d : " a u t o " , t a r g e t : " " } , v n = { o f f s e t : " n u m b e r " , m e t h o d : " s t r i n g " , t a r g e t : " ( s t r i n g | e l e m e n t ) " } , y n = " a c t i v e " , w n = " . n a v - l i n k ,   . l i s t - g r o u p - i t e m ,   . d r o p d o w n - i t e m " , E n = " p o s i t i o n " ; c l a s s   A n   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ s c r o l l E l e m e n t = " B O D Y " = = = t h i s . _ e l e m e n t . t a g N a m e ? w i n d o w : t h i s . _ e l e m e n t , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ o f f s e t s = [ ] , t h i s . _ t a r g e t s = [ ] , t h i s . _ a c t i v e T a r g e t = n u l l , t h i s . _ s c r o l l H e i g h t = 0 , j . o n ( t h i s . _ s c r o l l E l e m e n t , " s c r o l l . b s . s c r o l l s p y " , ( ( ) = > t h i s . _ p r o c e s s ( ) ) ) , t h i s . r e f r e s h ( ) , t h i s . _ p r o c e s s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   b n } s t a t i c   g e t   N A M E ( ) { r e t u r n   _ n } r e f r e s h ( ) { c o n s t   t = t h i s . _ s c r o l l E l e m e n t = = = t h i s . _ s c r o l l E l e m e n t . w i n d o w ? " o f f s e t " : E n , e = " a u t o " = = = t h i s . _ c o n f i g . m e t h o d ? t : t h i s . _ c o n f i g . m e t h o d , n = e = = = E n ? t h i s . _ g e t S c r o l l T o p ( ) : 0 ; t h i s . _ o f f s e t s = [ ] , t h i s . _ t a r g e t s = [ ] , t h i s . _ s c r o l l H e i g h t = t h i s . _ g e t S c r o l l H e i g h t ( ) , V . f i n d ( w n , t h i s . _ c o n f i g . t a r g e t ) . m a p ( ( t = > { c o n s t   s = i ( t ) , o = s ? V . f i n d O n e ( s ) : n u l l ; i f ( o ) { c o n s t   t = o . g e t B o u n d i n g C l i e n t R e c t ( ) ; i f ( t . w i d t h | | t . h e i g h t ) r e t u r n [ U [ e ] ( o ) . t o p + n , s ] } r e t u r n   n u l l } ) ) . f i l t e r ( ( t = > t ) ) . s o r t ( ( ( t , e ) = > t [ 0 ] - e [ 0 ] ) ) . f o r E a c h ( ( t = > { t h i s . _ o f f s e t s . p u s h ( t [ 0 ] ) , t h i s . _ t a r g e t s . p u s h ( t [ 1 ] ) } ) ) } d i s p o s e ( ) { j . o f f ( t h i s . _ s c r o l l E l e m e n t , " . b s . s c r o l l s p y " ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . b n , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } ) . t a r g e t = r ( t . t a r g e t ) | | d o c u m e n t . d o c u m e n t E l e m e n t , a ( _ n , t , v n ) , t } _ g e t S c r o l l T o p ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t = = = w i n d o w ? t h i s . _ s c r o l l E l e m e n t . p a g e Y O f f s e t : t h i s . _ s c r o l l E l e m e n t . s c r o l l T o p } _ g e t S c r o l l H e i g h t ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t . s c r o l l H e i g h t | | M a t h . m a x ( d o c u m e n t . b o d y . s c r o l l H e i g h t , d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l H e i g h t ) } _ g e t O f f s e t H e i g h t ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t = = = w i n d o w ? w i n d o w . i n n e r H e i g h t : t h i s . _ s c r o l l E l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) . h e i g h t } _ p r o c e s s ( ) { c o n s t   t = t h i s . _ g e t S c r o l l T o p ( ) + t h i s . _ c o n f i g . o f f s e t , e = t h i s . _ g e t S c r o l l H e i g h t ( ) , i = t h i s . _ c o n f i g . o f f s e t + e - t h i s . _ g e t O f f s e t H e i g h t ( ) ; i f ( t h i s . _ s c r o l l H e i g h t ! = = e & & t h i s . r e f r e s h ( ) , t > = i ) { c o n s t   t = t h i s . _ t a r g e t s [ t h i s . _ t a r g e t s . l e n g t h - 1 ] ; t h i s . _ a c t i v e T a r g e t ! = = t & & t h i s . _ a c t i v a t e ( t ) } e l s e { i f ( t h i s . _ a c t i v e T a r g e t & & t < t h i s . _ o f f s e t s [ 0 ] & & t h i s . _ o f f s e t s [ 0 ] > 0 ) r e t u r n   t h i s . _ a c t i v e T a r g e t = n u l l , v o i d   t h i s . _ c l e a r ( ) ; f o r ( l e t   e = t h i s . _ o f f s e t s . l e n g t h ; e - - ; ) t h i s . _ a c t i v e T a r g e t ! = = t h i s . _ t a r g e t s [ e ] & & t > = t h i s . _ o f f s e t s [ e ] & & ( v o i d   0 = = = t h i s . _ o f f s e t s [ e + 1 ] | | t < t h i s . _ o f f s e t s [ e + 1 ] ) & & t h i s . _ a c t i v a t e ( t h i s . _ t a r g e t s [ e ] ) } } _ a c t i v a t e ( t ) { t h i s . _ a c t i v e T a r g e t = t , t h i s . _ c l e a r ( ) ; c o n s t   e = w n . s p l i t ( " , " ) . m a p ( ( e = > ` $ { e } [ d a t a - b s - t a r g e t = " $ { t } " ] , $ { e } [ h r e f = " $ { t } " ] ` ) ) , i = V . f i n d O n e ( e . j o i n ( " , " ) , t h i s . _ c o n f i g . t a r g e t ) ; i . c l a s s L i s t . a d d ( y n ) , i . c l a s s L i s t . c o n t a i n s ( " d r o p d o w n - i t e m " ) ? V . f i n d O n e ( " . d r o p d o w n - t o g g l e " , i . c l o s e s t ( " . d r o p d o w n " ) ) . c l a s s L i s t . a d d ( y n ) : V . p a r e n t s ( i , " . n a v ,   . l i s t - g r o u p " ) . f o r E a c h ( ( t = > { V . p r e v ( t , " . n a v - l i n k ,   . l i s t - g r o u p - i t e m " ) . f o r E a c h ( ( t = > t . c l a s s L i s t . a d d ( y n ) ) ) , V . p r e v ( t , " . n a v - i t e m " ) . f o r E a c h ( ( t = > { V . c h i l d r e n ( t , " . n a v - l i n k " ) . f o r E a c h ( ( t = > t . c l a s s L i s t . a d d ( y n ) ) ) } ) ) } ) ) , j . t r i g g e r ( t h i s . _ s c r o l l E l e m e n t , " a c t i v a t e . b s . s c r o l l s p y " , { r e l a t e d T a r g e t : t } ) } _ c l e a r ( ) { V . f i n d ( w n , t h i s . _ c o n f i g . t a r g e t ) . f i l t e r ( ( t = > t . c l a s s L i s t . c o n t a i n s ( y n ) ) ) . f o r E a c h ( ( t = > t . c l a s s L i s t . r e m o v e ( y n ) ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = A n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } j . o n ( w i n d o w , " l o a d . b s . s c r o l l s p y . d a t a - a p i " , ( ( ) = > { V . f i n d ( ' [ d a t a - b s - s p y = " s c r o l l " ] ' ) . f o r E a c h ( ( t = > n e w   A n ( t ) ) ) } ) ) , g ( A n ) ; c o n s t   T n = " a c t i v e " , O n = " f a d e " , C n = " s h o w " , k n = " . a c t i v e " , L n = " : s c o p e   >   l i   >   . a c t i v e " ; c l a s s   x n   e x t e n d s   B { s t a t i c   g e t   N A M E ( ) { r e t u r n " t a b " } s h o w ( ) { i f ( t h i s . _ e l e m e n t . p a r e n t N o d e & & t h i s . _ e l e m e n t . p a r e n t N o d e . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E & & t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( T n ) ) r e t u r n ; l e t   t ; c o n s t   e = n ( t h i s . _ e l e m e n t ) , i = t h i s . _ e l e m e n t . c l o s e s t ( " . n a v ,   . l i s t - g r o u p " ) ; i f ( i ) { c o n s t   e = " U L " = = = i . n o d e N a m e | | " O L " = = = i . n o d e N a m e ? L n : k n ; t = V . f i n d ( e , i ) , t = t [ t . l e n g t h - 1 ] } c o n s t   s = t ? j . t r i g g e r ( t , " h i d e . b s . t a b " , { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ) : n u l l ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . t a b " , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | n u l l ! = = s & & s . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ a c t i v a t e ( t h i s . _ e l e m e n t , i ) ; c o n s t   o = ( ) = > { j . t r i g g e r ( t , " h i d d e n . b s . t a b " , { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . t a b " , { r e l a t e d T a r g e t : t } ) } ; e ? t h i s . _ a c t i v a t e ( e , e . p a r e n t N o d e , o ) : o ( ) } _ a c t i v a t e ( t , e , i ) { c o n s t   n = ( ! e | | " U L " ! = = e . n o d e N a m e & & " O L " ! = = e . n o d e N a m e ? V . c h i l d r e n ( e , k n ) : V . f i n d ( L n , e ) ) [ 0 ] , s = i & & n & & n . c l a s s L i s t . c o n t a i n s ( O n ) , o = ( ) = > t h i s . _ t r a n s i t i o n C o m p l e t e ( t , n , i ) ; n & & s ? ( n . c l a s s L i s t . r e m o v e ( C n ) , t h i s . _ q u e u e C a l l b a c k ( o , t , ! 0 ) ) : o ( ) } _ t r a n s i t i o n C o m p l e t e ( t , e , i ) { i f ( e ) { e . c l a s s L i s t . r e m o v e ( T n ) ; c o n s t   t = V . f i n d O n e ( " : s c o p e   >   . d r o p d o w n - m e n u   . a c t i v e " , e . p a r e n t N o d e ) ; t & & t . c l a s s L i s t . r e m o v e ( T n ) , " t a b " = = = e . g e t A t t r i b u t e ( " r o l e " ) & & e . s e t A t t r i b u t e ( " a r i a - s e l e c t e d " , ! 1 ) } t . c l a s s L i s t . a d d ( T n ) , " t a b " = = = t . g e t A t t r i b u t e ( " r o l e " ) & & t . s e t A t t r i b u t e ( " a r i a - s e l e c t e d " , ! 0 ) , u ( t ) , t . c l a s s L i s t . c o n t a i n s ( O n ) & & t . c l a s s L i s t . a d d ( C n ) ; l e t   n = t . p a r e n t N o d e ; i f ( n & & " L I " = = = n . n o d e N a m e & & ( n = n . p a r e n t N o d e ) , n & & n . c l a s s L i s t . c o n t a i n s ( " d r o p d o w n - m e n u " ) ) { c o n s t   e = t . c l o s e s t ( " . d r o p d o w n " ) ; e & & V . f i n d ( " . d r o p d o w n - t o g g l e " , e ) . f o r E a c h ( ( t = > t . c l a s s L i s t . a d d ( T n ) ) ) , t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 0 ) } i & & i ( ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = x n . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . t a b . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " t a b " ] ,   [ d a t a - b s - t o g g l e = " p i l l " ] ,   [ d a t a - b s - t o g g l e = " l i s t " ] ' , ( f u n c t i o n ( t ) { [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , c ( t h i s ) | | x n . g e t O r C r e a t e I n s t a n c e ( t h i s ) . s h o w ( ) } ) ) , g ( x n ) ; c o n s t   D n = " t o a s t " , S n = " h i d e " , N n = " s h o w " , I n = " s h o w i n g " , P n = { a n i m a t i o n : " b o o l e a n " , a u t o h i d e : " b o o l e a n " , d e l a y : " n u m b e r " } , j n = { a n i m a t i o n : ! 0 , a u t o h i d e : ! 0 , d e l a y : 5 e 3 } ; c l a s s   M n   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ t i m e o u t = n u l l , t h i s . _ h a s M o u s e I n t e r a c t i o n = ! 1 , t h i s . _ h a s K e y b o a r d I n t e r a c t i o n = ! 1 , t h i s . _ s e t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   P n } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   j n } s t a t i c   g e t   N A M E ( ) { r e t u r n   D n } s h o w ( ) { j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . t o a s t " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ c l e a r T i m e o u t ( ) , t h i s . _ c o n f i g . a n i m a t i o n & & t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " f a d e " ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( S n ) , u ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( N n ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( I n ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( I n ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . t o a s t " ) , t h i s . _ m a y b e S c h e d u l e H i d e ( ) } ) , t h i s . _ e l e m e n t , t h i s . _ c o n f i g . a n i m a t i o n ) ) } h i d e ( ) { t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( N n ) & & ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . t o a s t " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( I n ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( S n ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( I n ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( N n ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . t o a s t " ) } ) , t h i s . _ e l e m e n t , t h i s . _ c o n f i g . a n i m a t i o n ) ) ) } d i s p o s e ( ) { t h i s . _ c l e a r T i m e o u t ( ) , t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( N n ) & & t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( N n ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . j n , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } , a ( D n , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , t } _ m a y b e S c h e d u l e H i d e ( ) { t h i s . _ c o n f i g . a u t o h i d e & & ( t h i s . _ h a s M o u s e I n t e r a c t i o n | | t h i s . _ h a s K e y b o a r d I n t e r a c t i o n | | ( t h i s . _ t i m e o u t = s e t T i m e o u t ( ( ( ) = > { t h i s . h i d e ( ) } ) , t h i s . _ c o n f i g . d e l a y ) ) ) } _ o n I n t e r a c t i o n ( t , e ) { s w i t c h ( t . t y p e ) { c a s e " m o u s e o v e r " : c a s e " m o u s e o u t " : t h i s . _ h a s M o u s e I n t e r a c t i o n = e ; b r e a k ; c a s e " f o c u s i n " : c a s e " f o c u s o u t " : t h i s . _ h a s K e y b o a r d I n t e r a c t i o n = e } i f ( e ) r e t u r n   v o i d   t h i s . _ c l e a r T i m e o u t ( ) ; c o n s t   i = t . r e l a t e d T a r g e t ; t h i s . _ e l e m e n t = = = i | | t h i s . _ e l e m e n t . c o n t a i n s ( i ) | | t h i s . _ m a y b e S c h e d u l e H i d e ( ) } _ s e t L i s t e n e r s ( ) { j . o n ( t h i s . _ e l e m e n t , " m o u s e o v e r . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 0 ) ) ) , j . o n ( t h i s . _ e l e m e n t , " m o u s e o u t . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 1 ) ) ) , j . o n ( t h i s . _ e l e m e n t , " f o c u s i n . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 0 ) ) ) , j . o n ( t h i s . _ e l e m e n t , " f o c u s o u t . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 1 ) ) ) } _ c l e a r T i m e o u t ( ) { c l e a r T i m e o u t ( t h i s . _ t i m e o u t ) , t h i s . _ t i m e o u t = n u l l } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = M n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } r e t u r n   R ( M n ) , g ( M n ) , { A l e r t : W , B u t t o n : z , C a r o u s e l : s t , C o l l a p s e : p t , D r o p d o w n : h i , M o d a l : H i , O f f c a n v a s : F i , P o p o v e r : g n , S c r o l l S p y : A n , T a b : x n , T o a s t : M n , T o o l t i p : u n } } ) ) ; 
 
 g l o b a l \ j s \ b o o t s t r a p . b u n d l e . m i n . j s : ! f u n c t i o n ( t , e ) { " o b j e c t " = = t y p e o f   e x p o r t s & & " u n d e f i n e d " ! = t y p e o f   m o d u l e ? m o d u l e . e x p o r t s = e ( ) : " f u n c t i o n " = = t y p e o f   d e f i n e & & d e f i n e . a m d ? d e f i n e ( e ) : ( t = " u n d e f i n e d " ! = t y p e o f   g l o b a l T h i s ? g l o b a l T h i s : t | | s e l f ) . b o o t s t r a p = e ( ) } ( t h i s , ( f u n c t i o n ( ) { " u s e   s t r i c t " ; c o n s t   t = " t r a n s i t i o n e n d " , e = t = > { l e t   e = t . g e t A t t r i b u t e ( " d a t a - b s - t a r g e t " ) ; i f ( ! e | | " # " = = = e ) { l e t   i = t . g e t A t t r i b u t e ( " h r e f " ) ; i f ( ! i | | ! i . i n c l u d e s ( " # " ) & & ! i . s t a r t s W i t h ( " . " ) ) r e t u r n   n u l l ; i . i n c l u d e s ( " # " ) & & ! i . s t a r t s W i t h ( " # " ) & & ( i = ` # $ { i . s p l i t ( " # " ) [ 1 ] } ` ) , e = i & & " # " ! = = i ? i . t r i m ( ) : n u l l } r e t u r n   e } , i = t = > { c o n s t   i = e ( t ) ; r e t u r n   i & & d o c u m e n t . q u e r y S e l e c t o r ( i ) ? i : n u l l } , n = t = > { c o n s t   i = e ( t ) ; r e t u r n   i ? d o c u m e n t . q u e r y S e l e c t o r ( i ) : n u l l } , s = e = > { e . d i s p a t c h E v e n t ( n e w   E v e n t ( t ) ) } , o = t = > ! ( ! t | | " o b j e c t " ! = t y p e o f   t ) & & ( v o i d   0 ! = = t . j q u e r y & & ( t = t [ 0 ] ) , v o i d   0 ! = = t . n o d e T y p e ) , r = t = > o ( t ) ? t . j q u e r y ? t [ 0 ] : t : " s t r i n g " = = t y p e o f   t & & t . l e n g t h > 0 ? d o c u m e n t . q u e r y S e l e c t o r ( t ) : n u l l , a = ( t , e , i ) = > { O b j e c t . k e y s ( i ) . f o r E a c h ( ( n = > { c o n s t   s = i [ n ] , r = e [ n ] , a = r & & o ( r ) ? " e l e m e n t " : n u l l = = ( l = r ) ? ` $ { l } ` : { } . t o S t r i n g . c a l l ( l ) . m a t c h ( / \ s ( [ a - z ] + ) / i ) [ 1 ] . t o L o w e r C a s e ( ) ; v a r   l ; i f ( ! n e w   R e g E x p ( s ) . t e s t ( a ) ) t h r o w   n e w   T y p e E r r o r ( ` $ { t . t o U p p e r C a s e ( ) } :   O p t i o n   " $ { n } "   p r o v i d e d   t y p e   " $ { a } "   b u t   e x p e c t e d   t y p e   " $ { s } " . ` ) } ) ) } , l = t = > ! ( ! o ( t ) | | 0 = = = t . g e t C l i e n t R e c t s ( ) . l e n g t h ) & & " v i s i b l e " = = = g e t C o m p u t e d S t y l e ( t ) . g e t P r o p e r t y V a l u e ( " v i s i b i l i t y " ) , c = t = > ! t | | t . n o d e T y p e ! = = N o d e . E L E M E N T _ N O D E | | ! ! t . c l a s s L i s t . c o n t a i n s ( " d i s a b l e d " ) | | ( v o i d   0 ! = = t . d i s a b l e d ? t . d i s a b l e d : t . h a s A t t r i b u t e ( " d i s a b l e d " ) & & " f a l s e " ! = = t . g e t A t t r i b u t e ( " d i s a b l e d " ) ) , h = t = > { i f ( ! d o c u m e n t . d o c u m e n t E l e m e n t . a t t a c h S h a d o w ) r e t u r n   n u l l ; i f ( " f u n c t i o n " = = t y p e o f   t . g e t R o o t N o d e ) { c o n s t   e = t . g e t R o o t N o d e ( ) ; r e t u r n   e   i n s t a n c e o f   S h a d o w R o o t ? e : n u l l } r e t u r n   t   i n s t a n c e o f   S h a d o w R o o t ? t : t . p a r e n t N o d e ? h ( t . p a r e n t N o d e ) : n u l l } , d = ( ) = > { } , u = t = > { t . o f f s e t H e i g h t } , f = ( ) = > { c o n s t { j Q u e r y : t } = w i n d o w ; r e t u r n   t & & ! d o c u m e n t . b o d y . h a s A t t r i b u t e ( " d a t a - b s - n o - j q u e r y " ) ? t : n u l l } , p = [ ] , m = ( ) = > " r t l " = = = d o c u m e n t . d o c u m e n t E l e m e n t . d i r , g = t = > { v a r   e ; e = ( ) = > { c o n s t   e = f ( ) ; i f ( e ) { c o n s t   i = t . N A M E , n = e . f n [ i ] ; e . f n [ i ] = t . j Q u e r y I n t e r f a c e , e . f n [ i ] . C o n s t r u c t o r = t , e . f n [ i ] . n o C o n f l i c t = ( ) = > ( e . f n [ i ] = n , t . j Q u e r y I n t e r f a c e ) } } , " l o a d i n g " = = = d o c u m e n t . r e a d y S t a t e ? ( p . l e n g t h | | d o c u m e n t . a d d E v e n t L i s t e n e r ( " D O M C o n t e n t L o a d e d " , ( ( ) = > { p . f o r E a c h ( ( t = > t ( ) ) ) } ) ) , p . p u s h ( e ) ) : e ( ) } , _ = t = > { " f u n c t i o n " = = t y p e o f   t & & t ( ) } , b = ( e , i , n = ! 0 ) = > { i f ( ! n ) r e t u r n   v o i d   _ ( e ) ; c o n s t   o = ( t = > { i f ( ! t ) r e t u r n   0 ; l e t { t r a n s i t i o n D u r a t i o n : e , t r a n s i t i o n D e l a y : i } = w i n d o w . g e t C o m p u t e d S t y l e ( t ) ; c o n s t   n = N u m b e r . p a r s e F l o a t ( e ) , s = N u m b e r . p a r s e F l o a t ( i ) ; r e t u r n   n | | s ? ( e = e . s p l i t ( " , " ) [ 0 ] , i = i . s p l i t ( " , " ) [ 0 ] , 1 e 3 * ( N u m b e r . p a r s e F l o a t ( e ) + N u m b e r . p a r s e F l o a t ( i ) ) ) : 0 } ) ( i ) + 5 ; l e t   r = ! 1 ; c o n s t   a = ( { t a r g e t : n } ) = > { n = = = i & & ( r = ! 0 , i . r e m o v e E v e n t L i s t e n e r ( t , a ) , _ ( e ) ) } ; i . a d d E v e n t L i s t e n e r ( t , a ) , s e t T i m e o u t ( ( ( ) = > { r | | s ( i ) } ) , o ) } , v = ( t , e , i , n ) = > { l e t   s = t . i n d e x O f ( e ) ; i f ( - 1 = = = s ) r e t u r n   t [ ! i & & n ? t . l e n g t h - 1 : 0 ] ; c o n s t   o = t . l e n g t h ; r e t u r n   s + = i ? 1 : - 1 , n & & ( s = ( s + o ) % o ) , t [ M a t h . m a x ( 0 , M a t h . m i n ( s , o - 1 ) ) ] } , y = / [ ^ . ] * ( ? = \ . . * ) \ . | . * / , w = / \ . . * / , E = / : : \ d + $ / , A = { } ; l e t   T = 1 ; c o n s t   O = { m o u s e e n t e r : " m o u s e o v e r " , m o u s e l e a v e : " m o u s e o u t " } , C = / ^ ( m o u s e e n t e r | m o u s e l e a v e ) / i , k = n e w   S e t ( [ " c l i c k " , " d b l c l i c k " , " m o u s e u p " , " m o u s e d o w n " , " c o n t e x t m e n u " , " m o u s e w h e e l " , " D O M M o u s e S c r o l l " , " m o u s e o v e r " , " m o u s e o u t " , " m o u s e m o v e " , " s e l e c t s t a r t " , " s e l e c t e n d " , " k e y d o w n " , " k e y p r e s s " , " k e y u p " , " o r i e n t a t i o n c h a n g e " , " t o u c h s t a r t " , " t o u c h m o v e " , " t o u c h e n d " , " t o u c h c a n c e l " , " p o i n t e r d o w n " , " p o i n t e r m o v e " , " p o i n t e r u p " , " p o i n t e r l e a v e " , " p o i n t e r c a n c e l " , " g e s t u r e s t a r t " , " g e s t u r e c h a n g e " , " g e s t u r e e n d " , " f o c u s " , " b l u r " , " c h a n g e " , " r e s e t " , " s e l e c t " , " s u b m i t " , " f o c u s i n " , " f o c u s o u t " , " l o a d " , " u n l o a d " , " b e f o r e u n l o a d " , " r e s i z e " , " m o v e " , " D O M C o n t e n t L o a d e d " , " r e a d y s t a t e c h a n g e " , " e r r o r " , " a b o r t " , " s c r o l l " ] ) ; f u n c t i o n   L ( t , e ) { r e t u r n   e & & ` $ { e } : : $ { T + + } ` | | t . u i d E v e n t | | T + + } f u n c t i o n   x ( t ) { c o n s t   e = L ( t ) ; r e t u r n   t . u i d E v e n t = e , A [ e ] = A [ e ] | | { } , A [ e ] } f u n c t i o n   D ( t , e , i = n u l l ) { c o n s t   n = O b j e c t . k e y s ( t ) ; f o r ( l e t   s = 0 , o = n . l e n g t h ; s < o ; s + + ) { c o n s t   o = t [ n [ s ] ] ; i f ( o . o r i g i n a l H a n d l e r = = = e & & o . d e l e g a t i o n S e l e c t o r = = = i ) r e t u r n   o } r e t u r n   n u l l } f u n c t i o n   S ( t , e , i ) { c o n s t   n = " s t r i n g " = = t y p e o f   e , s = n ? i : e ; l e t   o = P ( t ) ; r e t u r n   k . h a s ( o ) | | ( o = t ) , [ n , s , o ] } f u n c t i o n   N ( t , e , i , n , s ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n ; i f ( i | | ( i = n , n = n u l l ) , C . t e s t ( e ) ) { c o n s t   t = t = > f u n c t i o n ( e ) { i f ( ! e . r e l a t e d T a r g e t | | e . r e l a t e d T a r g e t ! = = e . d e l e g a t e T a r g e t & & ! e . d e l e g a t e T a r g e t . c o n t a i n s ( e . r e l a t e d T a r g e t ) ) r e t u r n   t . c a l l ( t h i s , e ) } ; n ? n = t ( n ) : i = t ( i ) } c o n s t [ o , r , a ] = S ( e , i , n ) , l = x ( t ) , c = l [ a ] | | ( l [ a ] = { } ) , h = D ( c , r , o ? i : n u l l ) ; i f ( h ) r e t u r n   v o i d ( h . o n e O f f = h . o n e O f f & & s ) ; c o n s t   d = L ( r , e . r e p l a c e ( y , " " ) ) , u = o ? f u n c t i o n ( t , e , i ) { r e t u r n   f u n c t i o n   n ( s ) { c o n s t   o = t . q u e r y S e l e c t o r A l l ( e ) ; f o r ( l e t { t a r g e t : r } = s ; r & & r ! = = t h i s ; r = r . p a r e n t N o d e ) f o r ( l e t   a = o . l e n g t h ; a - - ; ) i f ( o [ a ] = = = r ) r e t u r n   s . d e l e g a t e T a r g e t = r , n . o n e O f f & & j . o f f ( t , s . t y p e , e , i ) , i . a p p l y ( r , [ s ] ) ; r e t u r n   n u l l } } ( t , i , n ) : f u n c t i o n ( t , e ) { r e t u r n   f u n c t i o n   i ( n ) { r e t u r n   n . d e l e g a t e T a r g e t = t , i . o n e O f f & & j . o f f ( t , n . t y p e , e ) , e . a p p l y ( t , [ n ] ) } } ( t , i ) ; u . d e l e g a t i o n S e l e c t o r = o ? i : n u l l , u . o r i g i n a l H a n d l e r = r , u . o n e O f f = s , u . u i d E v e n t = d , c [ d ] = u , t . a d d E v e n t L i s t e n e r ( a , u , o ) } f u n c t i o n   I ( t , e , i , n , s ) { c o n s t   o = D ( e [ i ] , n , s ) ; o & & ( t . r e m o v e E v e n t L i s t e n e r ( i , o , B o o l e a n ( s ) ) , d e l e t e   e [ i ] [ o . u i d E v e n t ] ) } f u n c t i o n   P ( t ) { r e t u r n   t = t . r e p l a c e ( w , " " ) , O [ t ] | | t } c o n s t   j = { o n ( t , e , i , n ) { N ( t , e , i , n , ! 1 ) } , o n e ( t , e , i , n ) { N ( t , e , i , n , ! 0 ) } , o f f ( t , e , i , n ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n ; c o n s t [ s , o , r ] = S ( e , i , n ) , a = r ! = = e , l = x ( t ) , c = e . s t a r t s W i t h ( " . " ) ; i f ( v o i d   0 ! = = o ) { i f ( ! l | | ! l [ r ] ) r e t u r n ; r e t u r n   v o i d   I ( t , l , r , o , s ? i : n u l l ) } c & & O b j e c t . k e y s ( l ) . f o r E a c h ( ( i = > { ! f u n c t i o n ( t , e , i , n ) { c o n s t   s = e [ i ] | | { } ; O b j e c t . k e y s ( s ) . f o r E a c h ( ( o = > { i f ( o . i n c l u d e s ( n ) ) { c o n s t   n = s [ o ] ; I ( t , e , i , n . o r i g i n a l H a n d l e r , n . d e l e g a t i o n S e l e c t o r ) } } ) ) } ( t , l , i , e . s l i c e ( 1 ) ) } ) ) ; c o n s t   h = l [ r ] | | { } ; O b j e c t . k e y s ( h ) . f o r E a c h ( ( i = > { c o n s t   n = i . r e p l a c e ( E , " " ) ; i f ( ! a | | e . i n c l u d e s ( n ) ) { c o n s t   e = h [ i ] ; I ( t , l , r , e . o r i g i n a l H a n d l e r , e . d e l e g a t i o n S e l e c t o r ) } } ) ) } , t r i g g e r ( t , e , i ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n   n u l l ; c o n s t   n = f ( ) , s = P ( e ) , o = e ! = = s , r = k . h a s ( s ) ; l e t   a , l = ! 0 , c = ! 0 , h = ! 1 , d = n u l l ; r e t u r n   o & & n & & ( a = n . E v e n t ( e , i ) , n ( t ) . t r i g g e r ( a ) , l = ! a . i s P r o p a g a t i o n S t o p p e d ( ) , c = ! a . i s I m m e d i a t e P r o p a g a t i o n S t o p p e d ( ) , h = a . i s D e f a u l t P r e v e n t e d ( ) ) , r ? ( d = d o c u m e n t . c r e a t e E v e n t ( " H T M L E v e n t s " ) , d . i n i t E v e n t ( s , l , ! 0 ) ) : d = n e w   C u s t o m E v e n t ( e , { b u b b l e s : l , c a n c e l a b l e : ! 0 } ) , v o i d   0 ! = = i & & O b j e c t . k e y s ( i ) . f o r E a c h ( ( t = > { O b j e c t . d e f i n e P r o p e r t y ( d , t , { g e t : ( ) = > i [ t ] } ) } ) ) , h & & d . p r e v e n t D e f a u l t ( ) , c & & t . d i s p a t c h E v e n t ( d ) , d . d e f a u l t P r e v e n t e d & & v o i d   0 ! = = a & & a . p r e v e n t D e f a u l t ( ) , d } } , M = n e w   M a p , H = { s e t ( t , e , i ) { M . h a s ( t ) | | M . s e t ( t , n e w   M a p ) ; c o n s t   n = M . g e t ( t ) ; n . h a s ( e ) | | 0 = = = n . s i z e ? n . s e t ( e , i ) : c o n s o l e . e r r o r ( ` B o o t s t r a p   d o e s n ' t   a l l o w   m o r e   t h a n   o n e   i n s t a n c e   p e r   e l e m e n t .   B o u n d   i n s t a n c e :   $ { A r r a y . f r o m ( n . k e y s ( ) ) [ 0 ] } . ` ) } , g e t : ( t , e ) = > M . h a s ( t ) & & M . g e t ( t ) . g e t ( e ) | | n u l l , r e m o v e ( t , e ) { i f ( ! M . h a s ( t ) ) r e t u r n ; c o n s t   i = M . g e t ( t ) ; i . d e l e t e ( e ) , 0 = = = i . s i z e & & M . d e l e t e ( t ) } } ; c l a s s   B { c o n s t r u c t o r ( t ) { ( t = r ( t ) ) & & ( t h i s . _ e l e m e n t = t , H . s e t ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . D A T A _ K E Y , t h i s ) ) } d i s p o s e ( ) { H . r e m o v e ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . D A T A _ K E Y ) , j . o f f ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E V E N T _ K E Y ) , O b j e c t . g e t O w n P r o p e r t y N a m e s ( t h i s ) . f o r E a c h ( ( t = > { t h i s [ t ] = n u l l } ) ) } _ q u e u e C a l l b a c k ( t , e , i = ! 0 ) { b ( t , e , i ) } s t a t i c   g e t I n s t a n c e ( t ) { r e t u r n   H . g e t ( r ( t ) , t h i s . D A T A _ K E Y ) } s t a t i c   g e t O r C r e a t e I n s t a n c e ( t , e = { } ) { r e t u r n   t h i s . g e t I n s t a n c e ( t ) | | n e w   t h i s ( t , " o b j e c t " = = t y p e o f   e ? e : n u l l ) } s t a t i c   g e t   V E R S I O N ( ) { r e t u r n " 5 . 1 . 3 " } s t a t i c   g e t   N A M E ( ) { t h r o w   n e w   E r r o r ( ' Y o u   h a v e   t o   i m p l e m e n t   t h e   s t a t i c   m e t h o d   " N A M E " ,   f o r   e a c h   c o m p o n e n t ! ' ) } s t a t i c   g e t   D A T A _ K E Y ( ) { r e t u r n ` b s . $ { t h i s . N A M E } ` } s t a t i c   g e t   E V E N T _ K E Y ( ) { r e t u r n ` . $ { t h i s . D A T A _ K E Y } ` } } c o n s t   R = ( t , e = " h i d e " ) = > { c o n s t   i = ` c l i c k . d i s m i s s $ { t . E V E N T _ K E Y } ` , s = t . N A M E ; j . o n ( d o c u m e n t , i , ` [ d a t a - b s - d i s m i s s = " $ { s } " ] ` , ( f u n c t i o n ( i ) { i f ( [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & i . p r e v e n t D e f a u l t ( ) , c ( t h i s ) ) r e t u r n ; c o n s t   o = n ( t h i s ) | | t h i s . c l o s e s t ( ` . $ { s } ` ) ; t . g e t O r C r e a t e I n s t a n c e ( o ) [ e ] ( ) } ) ) } ; c l a s s   W   e x t e n d s   B { s t a t i c   g e t   N A M E ( ) { r e t u r n " a l e r t " } c l o s e ( ) { i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " c l o s e . b s . a l e r t " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w " ) ; c o n s t   t = t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " f a d e " ) ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > t h i s . _ d e s t r o y E l e m e n t ( ) ) , t h i s . _ e l e m e n t , t ) } _ d e s t r o y E l e m e n t ( ) { t h i s . _ e l e m e n t . r e m o v e ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " c l o s e d . b s . a l e r t " ) , t h i s . d i s p o s e ( ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = W . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] | | t . s t a r t s W i t h ( " _ " ) | | " c o n s t r u c t o r " = = = t ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } R ( W , " c l o s e " ) , g ( W ) ; c o n s t   $ = ' [ d a t a - b s - t o g g l e = " b u t t o n " ] ' ; c l a s s   z   e x t e n d s   B { s t a t i c   g e t   N A M E ( ) { r e t u r n " b u t t o n " } t o g g l e ( ) { t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - p r e s s e d " , t h i s . _ e l e m e n t . c l a s s L i s t . t o g g l e ( " a c t i v e " ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = z . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; " t o g g l e " = = = t & & e [ t ] ( ) } ) ) } } f u n c t i o n   q ( t ) { r e t u r n " t r u e " = = = t | | " f a l s e " ! = = t & & ( t = = = N u m b e r ( t ) . t o S t r i n g ( ) ? N u m b e r ( t ) : " " = = = t | | " n u l l " = = = t ? n u l l : t ) } f u n c t i o n   F ( t ) { r e t u r n   t . r e p l a c e ( / [ A - Z ] / g , ( t = > ` - $ { t . t o L o w e r C a s e ( ) } ` ) ) } j . o n ( d o c u m e n t , " c l i c k . b s . b u t t o n . d a t a - a p i " , $ , ( t = > { t . p r e v e n t D e f a u l t ( ) ; c o n s t   e = t . t a r g e t . c l o s e s t ( $ ) ; z . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( ) } ) ) , g ( z ) ; c o n s t   U = { s e t D a t a A t t r i b u t e ( t , e , i ) { t . s e t A t t r i b u t e ( ` d a t a - b s - $ { F ( e ) } ` , i ) } , r e m o v e D a t a A t t r i b u t e ( t , e ) { t . r e m o v e A t t r i b u t e ( ` d a t a - b s - $ { F ( e ) } ` ) } , g e t D a t a A t t r i b u t e s ( t ) { i f ( ! t ) r e t u r n { } ; c o n s t   e = { } ; r e t u r n   O b j e c t . k e y s ( t . d a t a s e t ) . f i l t e r ( ( t = > t . s t a r t s W i t h ( " b s " ) ) ) . f o r E a c h ( ( i = > { l e t   n = i . r e p l a c e ( / ^ b s / , " " ) ; n = n . c h a r A t ( 0 ) . t o L o w e r C a s e ( ) + n . s l i c e ( 1 , n . l e n g t h ) , e [ n ] = q ( t . d a t a s e t [ i ] ) } ) ) , e } , g e t D a t a A t t r i b u t e : ( t , e ) = > q ( t . g e t A t t r i b u t e ( ` d a t a - b s - $ { F ( e ) } ` ) ) , o f f s e t ( t ) { c o n s t   e = t . g e t B o u n d i n g C l i e n t R e c t ( ) ; r e t u r n { t o p : e . t o p + w i n d o w . p a g e Y O f f s e t , l e f t : e . l e f t + w i n d o w . p a g e X O f f s e t } } , p o s i t i o n : t = > ( { t o p : t . o f f s e t T o p , l e f t : t . o f f s e t L e f t } ) } , V = { f i n d : ( t , e = d o c u m e n t . d o c u m e n t E l e m e n t ) = > [ ] . c o n c a t ( . . . E l e m e n t . p r o t o t y p e . q u e r y S e l e c t o r A l l . c a l l ( e , t ) ) , f i n d O n e : ( t , e = d o c u m e n t . d o c u m e n t E l e m e n t ) = > E l e m e n t . p r o t o t y p e . q u e r y S e l e c t o r . c a l l ( e , t ) , c h i l d r e n : ( t , e ) = > [ ] . c o n c a t ( . . . t . c h i l d r e n ) . f i l t e r ( ( t = > t . m a t c h e s ( e ) ) ) , p a r e n t s ( t , e ) { c o n s t   i = [ ] ; l e t   n = t . p a r e n t N o d e ; f o r ( ; n & & n . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E & & 3 ! = = n . n o d e T y p e ; ) n . m a t c h e s ( e ) & & i . p u s h ( n ) , n = n . p a r e n t N o d e ; r e t u r n   i } , p r e v ( t , e ) { l e t   i = t . p r e v i o u s E l e m e n t S i b l i n g ; f o r ( ; i ; ) { i f ( i . m a t c h e s ( e ) ) r e t u r n [ i ] ; i = i . p r e v i o u s E l e m e n t S i b l i n g } r e t u r n [ ] } , n e x t ( t , e ) { l e t   i = t . n e x t E l e m e n t S i b l i n g ; f o r ( ; i ; ) { i f ( i . m a t c h e s ( e ) ) r e t u r n [ i ] ; i = i . n e x t E l e m e n t S i b l i n g } r e t u r n [ ] } , f o c u s a b l e C h i l d r e n ( t ) { c o n s t   e = [ " a " , " b u t t o n " , " i n p u t " , " t e x t a r e a " , " s e l e c t " , " d e t a i l s " , " [ t a b i n d e x ] " , ' [ c o n t e n t e d i t a b l e = " t r u e " ] ' ] . m a p ( ( t = > ` $ { t } : n o t ( [ t a b i n d e x ^ = " - " ] ) ` ) ) . j o i n ( " ,   " ) ; r e t u r n   t h i s . f i n d ( e , t ) . f i l t e r ( ( t = > ! c ( t ) & & l ( t ) ) ) } } , K = " c a r o u s e l " , X = { i n t e r v a l : 5 e 3 , k e y b o a r d : ! 0 , s l i d e : ! 1 , p a u s e : " h o v e r " , w r a p : ! 0 , t o u c h : ! 0 } , Y = { i n t e r v a l : " ( n u m b e r | b o o l e a n ) " , k e y b o a r d : " b o o l e a n " , s l i d e : " ( b o o l e a n | s t r i n g ) " , p a u s e : " ( s t r i n g | b o o l e a n ) " , w r a p : " b o o l e a n " , t o u c h : " b o o l e a n " } , Q = " n e x t " , G = " p r e v " , Z = " l e f t " , J = " r i g h t " , t t = { A r r o w L e f t : J , A r r o w R i g h t : Z } , e t = " s l i d . b s . c a r o u s e l " , i t = " a c t i v e " , n t = " . a c t i v e . c a r o u s e l - i t e m " ; c l a s s   s t   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ i t e m s = n u l l , t h i s . _ i n t e r v a l = n u l l , t h i s . _ a c t i v e E l e m e n t = n u l l , t h i s . _ i s P a u s e d = ! 1 , t h i s . _ i s S l i d i n g = ! 1 , t h i s . t o u c h T i m e o u t = n u l l , t h i s . t o u c h S t a r t X = 0 , t h i s . t o u c h D e l t a X = 0 , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ i n d i c a t o r s E l e m e n t = V . f i n d O n e ( " . c a r o u s e l - i n d i c a t o r s " , t h i s . _ e l e m e n t ) , t h i s . _ t o u c h S u p p o r t e d = " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t | | n a v i g a t o r . m a x T o u c h P o i n t s > 0 , t h i s . _ p o i n t e r E v e n t = B o o l e a n ( w i n d o w . P o i n t e r E v e n t ) , t h i s . _ a d d E v e n t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   X } s t a t i c   g e t   N A M E ( ) { r e t u r n   K } n e x t ( ) { t h i s . _ s l i d e ( Q ) } n e x t W h e n V i s i b l e ( ) { ! d o c u m e n t . h i d d e n & & l ( t h i s . _ e l e m e n t ) & & t h i s . n e x t ( ) } p r e v ( ) { t h i s . _ s l i d e ( G ) } p a u s e ( t ) { t | | ( t h i s . _ i s P a u s e d = ! 0 ) , V . f i n d O n e ( " . c a r o u s e l - i t e m - n e x t ,   . c a r o u s e l - i t e m - p r e v " , t h i s . _ e l e m e n t ) & & ( s ( t h i s . _ e l e m e n t ) , t h i s . c y c l e ( ! 0 ) ) , c l e a r I n t e r v a l ( t h i s . _ i n t e r v a l ) , t h i s . _ i n t e r v a l = n u l l } c y c l e ( t ) { t | | ( t h i s . _ i s P a u s e d = ! 1 ) , t h i s . _ i n t e r v a l & & ( c l e a r I n t e r v a l ( t h i s . _ i n t e r v a l ) , t h i s . _ i n t e r v a l = n u l l ) , t h i s . _ c o n f i g & & t h i s . _ c o n f i g . i n t e r v a l & & ! t h i s . _ i s P a u s e d & & ( t h i s . _ u p d a t e I n t e r v a l ( ) , t h i s . _ i n t e r v a l = s e t I n t e r v a l ( ( d o c u m e n t . v i s i b i l i t y S t a t e ? t h i s . n e x t W h e n V i s i b l e : t h i s . n e x t ) . b i n d ( t h i s ) , t h i s . _ c o n f i g . i n t e r v a l ) ) } t o ( t ) { t h i s . _ a c t i v e E l e m e n t = V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) ; c o n s t   e = t h i s . _ g e t I t e m I n d e x ( t h i s . _ a c t i v e E l e m e n t ) ; i f ( t > t h i s . _ i t e m s . l e n g t h - 1 | | t < 0 ) r e t u r n ; i f ( t h i s . _ i s S l i d i n g ) r e t u r n   v o i d   j . o n e ( t h i s . _ e l e m e n t , e t , ( ( ) = > t h i s . t o ( t ) ) ) ; i f ( e = = = t ) r e t u r n   t h i s . p a u s e ( ) , v o i d   t h i s . c y c l e ( ) ; c o n s t   i = t > e ? Q : G ; t h i s . _ s l i d e ( i , t h i s . _ i t e m s [ t ] ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . X , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( K , t , Y ) , t } _ h a n d l e S w i p e ( ) { c o n s t   t = M a t h . a b s ( t h i s . t o u c h D e l t a X ) ; i f ( t < = 4 0 ) r e t u r n ; c o n s t   e = t / t h i s . t o u c h D e l t a X ; t h i s . t o u c h D e l t a X = 0 , e & & t h i s . _ s l i d e ( e > 0 ? J : Z ) } _ a d d E v e n t L i s t e n e r s ( ) { t h i s . _ c o n f i g . k e y b o a r d & & j . o n ( t h i s . _ e l e m e n t , " k e y d o w n . b s . c a r o u s e l " , ( t = > t h i s . _ k e y d o w n ( t ) ) ) , " h o v e r " = = = t h i s . _ c o n f i g . p a u s e & & ( j . o n ( t h i s . _ e l e m e n t , " m o u s e e n t e r . b s . c a r o u s e l " , ( t = > t h i s . p a u s e ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " m o u s e l e a v e . b s . c a r o u s e l " , ( t = > t h i s . c y c l e ( t ) ) ) ) , t h i s . _ c o n f i g . t o u c h & & t h i s . _ t o u c h S u p p o r t e d & & t h i s . _ a d d T o u c h E v e n t L i s t e n e r s ( ) } _ a d d T o u c h E v e n t L i s t e n e r s ( ) { c o n s t   t = t = > t h i s . _ p o i n t e r E v e n t & & ( " p e n " = = = t . p o i n t e r T y p e | | " t o u c h " = = = t . p o i n t e r T y p e ) , e = e = > { t ( e ) ? t h i s . t o u c h S t a r t X = e . c l i e n t X : t h i s . _ p o i n t e r E v e n t | | ( t h i s . t o u c h S t a r t X = e . t o u c h e s [ 0 ] . c l i e n t X ) } , i = t = > { t h i s . t o u c h D e l t a X = t . t o u c h e s & & t . t o u c h e s . l e n g t h > 1 ? 0 : t . t o u c h e s [ 0 ] . c l i e n t X - t h i s . t o u c h S t a r t X } , n = e = > { t ( e ) & & ( t h i s . t o u c h D e l t a X = e . c l i e n t X - t h i s . t o u c h S t a r t X ) , t h i s . _ h a n d l e S w i p e ( ) , " h o v e r " = = = t h i s . _ c o n f i g . p a u s e & & ( t h i s . p a u s e ( ) , t h i s . t o u c h T i m e o u t & & c l e a r T i m e o u t ( t h i s . t o u c h T i m e o u t ) , t h i s . t o u c h T i m e o u t = s e t T i m e o u t ( ( t = > t h i s . c y c l e ( t ) ) , 5 0 0 + t h i s . _ c o n f i g . i n t e r v a l ) ) } ; V . f i n d ( " . c a r o u s e l - i t e m   i m g " , t h i s . _ e l e m e n t ) . f o r E a c h ( ( t = > { j . o n ( t , " d r a g s t a r t . b s . c a r o u s e l " , ( t = > t . p r e v e n t D e f a u l t ( ) ) ) } ) ) , t h i s . _ p o i n t e r E v e n t ? ( j . o n ( t h i s . _ e l e m e n t , " p o i n t e r d o w n . b s . c a r o u s e l " , ( t = > e ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " p o i n t e r u p . b s . c a r o u s e l " , ( t = > n ( t ) ) ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " p o i n t e r - e v e n t " ) ) : ( j . o n ( t h i s . _ e l e m e n t , " t o u c h s t a r t . b s . c a r o u s e l " , ( t = > e ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " t o u c h m o v e . b s . c a r o u s e l " , ( t = > i ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , " t o u c h e n d . b s . c a r o u s e l " , ( t = > n ( t ) ) ) ) } _ k e y d o w n ( t ) { i f ( / i n p u t | t e x t a r e a / i . t e s t ( t . t a r g e t . t a g N a m e ) ) r e t u r n ; c o n s t   e = t t [ t . k e y ] ; e & & ( t . p r e v e n t D e f a u l t ( ) , t h i s . _ s l i d e ( e ) ) } _ g e t I t e m I n d e x ( t ) { r e t u r n   t h i s . _ i t e m s = t & & t . p a r e n t N o d e ? V . f i n d ( " . c a r o u s e l - i t e m " , t . p a r e n t N o d e ) : [ ] , t h i s . _ i t e m s . i n d e x O f ( t ) } _ g e t I t e m B y O r d e r ( t , e ) { c o n s t   i = t = = = Q ; r e t u r n   v ( t h i s . _ i t e m s , e , i , t h i s . _ c o n f i g . w r a p ) } _ t r i g g e r S l i d e E v e n t ( t , e ) { c o n s t   i = t h i s . _ g e t I t e m I n d e x ( t ) , n = t h i s . _ g e t I t e m I n d e x ( V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) ) ; r e t u r n   j . t r i g g e r ( t h i s . _ e l e m e n t , " s l i d e . b s . c a r o u s e l " , { r e l a t e d T a r g e t : t , d i r e c t i o n : e , f r o m : n , t o : i } ) } _ s e t A c t i v e I n d i c a t o r E l e m e n t ( t ) { i f ( t h i s . _ i n d i c a t o r s E l e m e n t ) { c o n s t   e = V . f i n d O n e ( " . a c t i v e " , t h i s . _ i n d i c a t o r s E l e m e n t ) ; e . c l a s s L i s t . r e m o v e ( i t ) , e . r e m o v e A t t r i b u t e ( " a r i a - c u r r e n t " ) ; c o n s t   i = V . f i n d ( " [ d a t a - b s - t a r g e t ] " , t h i s . _ i n d i c a t o r s E l e m e n t ) ; f o r ( l e t   e = 0 ; e < i . l e n g t h ; e + + ) i f ( N u m b e r . p a r s e I n t ( i [ e ] . g e t A t t r i b u t e ( " d a t a - b s - s l i d e - t o " ) , 1 0 ) = = = t h i s . _ g e t I t e m I n d e x ( t ) ) { i [ e ] . c l a s s L i s t . a d d ( i t ) , i [ e ] . s e t A t t r i b u t e ( " a r i a - c u r r e n t " , " t r u e " ) ; b r e a k } } } _ u p d a t e I n t e r v a l ( ) { c o n s t   t = t h i s . _ a c t i v e E l e m e n t | | V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) ; i f ( ! t ) r e t u r n ; c o n s t   e = N u m b e r . p a r s e I n t ( t . g e t A t t r i b u t e ( " d a t a - b s - i n t e r v a l " ) , 1 0 ) ; e ? ( t h i s . _ c o n f i g . d e f a u l t I n t e r v a l = t h i s . _ c o n f i g . d e f a u l t I n t e r v a l | | t h i s . _ c o n f i g . i n t e r v a l , t h i s . _ c o n f i g . i n t e r v a l = e ) : t h i s . _ c o n f i g . i n t e r v a l = t h i s . _ c o n f i g . d e f a u l t I n t e r v a l | | t h i s . _ c o n f i g . i n t e r v a l } _ s l i d e ( t , e ) { c o n s t   i = t h i s . _ d i r e c t i o n T o O r d e r ( t ) , n = V . f i n d O n e ( n t , t h i s . _ e l e m e n t ) , s = t h i s . _ g e t I t e m I n d e x ( n ) , o = e | | t h i s . _ g e t I t e m B y O r d e r ( i , n ) , r = t h i s . _ g e t I t e m I n d e x ( o ) , a = B o o l e a n ( t h i s . _ i n t e r v a l ) , l = i = = = Q , c = l ? " c a r o u s e l - i t e m - s t a r t " : " c a r o u s e l - i t e m - e n d " , h = l ? " c a r o u s e l - i t e m - n e x t " : " c a r o u s e l - i t e m - p r e v " , d = t h i s . _ o r d e r T o D i r e c t i o n ( i ) ; i f ( o & & o . c l a s s L i s t . c o n t a i n s ( i t ) ) r e t u r n   v o i d ( t h i s . _ i s S l i d i n g = ! 1 ) ; i f ( t h i s . _ i s S l i d i n g ) r e t u r n ; i f ( t h i s . _ t r i g g e r S l i d e E v e n t ( o , d ) . d e f a u l t P r e v e n t e d ) r e t u r n ; i f ( ! n | | ! o ) r e t u r n ; t h i s . _ i s S l i d i n g = ! 0 , a & & t h i s . p a u s e ( ) , t h i s . _ s e t A c t i v e I n d i c a t o r E l e m e n t ( o ) , t h i s . _ a c t i v e E l e m e n t = o ; c o n s t   f = ( ) = > { j . t r i g g e r ( t h i s . _ e l e m e n t , e t , { r e l a t e d T a r g e t : o , d i r e c t i o n : d , f r o m : s , t o : r } ) } ; i f ( t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s l i d e " ) ) { o . c l a s s L i s t . a d d ( h ) , u ( o ) , n . c l a s s L i s t . a d d ( c ) , o . c l a s s L i s t . a d d ( c ) ; c o n s t   t = ( ) = > { o . c l a s s L i s t . r e m o v e ( c , h ) , o . c l a s s L i s t . a d d ( i t ) , n . c l a s s L i s t . r e m o v e ( i t , h , c ) , t h i s . _ i s S l i d i n g = ! 1 , s e t T i m e o u t ( f , 0 ) } ; t h i s . _ q u e u e C a l l b a c k ( t , n , ! 0 ) } e l s e   n . c l a s s L i s t . r e m o v e ( i t ) , o . c l a s s L i s t . a d d ( i t ) , t h i s . _ i s S l i d i n g = ! 1 , f ( ) ; a & & t h i s . c y c l e ( ) } _ d i r e c t i o n T o O r d e r ( t ) { r e t u r n [ J , Z ] . i n c l u d e s ( t ) ? m ( ) ? t = = = Z ? G : Q : t = = = Z ? Q : G : t } _ o r d e r T o D i r e c t i o n ( t ) { r e t u r n [ Q , G ] . i n c l u d e s ( t ) ? m ( ) ? t = = = G ? Z : J : t = = = G ? J : Z : t } s t a t i c   c a r o u s e l I n t e r f a c e ( t , e ) { c o n s t   i = s t . g e t O r C r e a t e I n s t a n c e ( t , e ) ; l e t { _ c o n f i g : n } = i ; " o b j e c t " = = t y p e o f   e & & ( n = { . . . n , . . . e } ) ; c o n s t   s = " s t r i n g " = = t y p e o f   e ? e : n . s l i d e ; i f ( " n u m b e r " = = t y p e o f   e ) i . t o ( e ) ; e l s e   i f ( " s t r i n g " = = t y p e o f   s ) { i f ( v o i d   0 = = = i [ s ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { s } " ` ) ; i [ s ] ( ) } e l s e   n . i n t e r v a l & & n . r i d e & & ( i . p a u s e ( ) , i . c y c l e ( ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { s t . c a r o u s e l I n t e r f a c e ( t h i s , t ) } ) ) } s t a t i c   d a t a A p i C l i c k H a n d l e r ( t ) { c o n s t   e = n ( t h i s ) ; i f ( ! e | | ! e . c l a s s L i s t . c o n t a i n s ( " c a r o u s e l " ) ) r e t u r n ; c o n s t   i = { . . . U . g e t D a t a A t t r i b u t e s ( e ) , . . . U . g e t D a t a A t t r i b u t e s ( t h i s ) } , s = t h i s . g e t A t t r i b u t e ( " d a t a - b s - s l i d e - t o " ) ; s & & ( i . i n t e r v a l = ! 1 ) , s t . c a r o u s e l I n t e r f a c e ( e , i ) , s & & s t . g e t I n s t a n c e ( e ) . t o ( s ) , t . p r e v e n t D e f a u l t ( ) } } j . o n ( d o c u m e n t , " c l i c k . b s . c a r o u s e l . d a t a - a p i " , " [ d a t a - b s - s l i d e ] ,   [ d a t a - b s - s l i d e - t o ] " , s t . d a t a A p i C l i c k H a n d l e r ) , j . o n ( w i n d o w , " l o a d . b s . c a r o u s e l . d a t a - a p i " , ( ( ) = > { c o n s t   t = V . f i n d ( ' [ d a t a - b s - r i d e = " c a r o u s e l " ] ' ) ; f o r ( l e t   e = 0 , i = t . l e n g t h ; e < i ; e + + ) s t . c a r o u s e l I n t e r f a c e ( t [ e ] , s t . g e t I n s t a n c e ( t [ e ] ) ) } ) ) , g ( s t ) ; c o n s t   o t = " c o l l a p s e " , r t = { t o g g l e : ! 0 , p a r e n t : n u l l } , a t = { t o g g l e : " b o o l e a n " , p a r e n t : " ( n u l l | e l e m e n t ) " } , l t = " s h o w " , c t = " c o l l a p s e " , h t = " c o l l a p s i n g " , d t = " c o l l a p s e d " , u t = " : s c o p e   . c o l l a p s e   . c o l l a p s e " , f t = ' [ d a t a - b s - t o g g l e = " c o l l a p s e " ] ' ; c l a s s   p t   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ t r i g g e r A r r a y = [ ] ; c o n s t   n = V . f i n d ( f t ) ; f o r ( l e t   t = 0 , e = n . l e n g t h ; t < e ; t + + ) { c o n s t   e = n [ t ] , s = i ( e ) , o = V . f i n d ( s ) . f i l t e r ( ( t = > t = = = t h i s . _ e l e m e n t ) ) ; n u l l ! = = s & & o . l e n g t h & & ( t h i s . _ s e l e c t o r = s , t h i s . _ t r i g g e r A r r a y . p u s h ( e ) ) } t h i s . _ i n i t i a l i z e C h i l d r e n ( ) , t h i s . _ c o n f i g . p a r e n t | | t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( t h i s . _ t r i g g e r A r r a y , t h i s . _ i s S h o w n ( ) ) , t h i s . _ c o n f i g . t o g g l e & & t h i s . t o g g l e ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   r t } s t a t i c   g e t   N A M E ( ) { r e t u r n   o t } t o g g l e ( ) { t h i s . _ i s S h o w n ( ) ? t h i s . h i d e ( ) : t h i s . s h o w ( ) } s h o w ( ) { i f ( t h i s . _ i s T r a n s i t i o n i n g | | t h i s . _ i s S h o w n ( ) ) r e t u r n ; l e t   t , e = [ ] ; i f ( t h i s . _ c o n f i g . p a r e n t ) { c o n s t   t = V . f i n d ( u t , t h i s . _ c o n f i g . p a r e n t ) ; e = V . f i n d ( " . c o l l a p s e . s h o w ,   . c o l l a p s e . c o l l a p s i n g " , t h i s . _ c o n f i g . p a r e n t ) . f i l t e r ( ( e = > ! t . i n c l u d e s ( e ) ) ) } c o n s t   i = V . f i n d O n e ( t h i s . _ s e l e c t o r ) ; i f ( e . l e n g t h ) { c o n s t   n = e . f i n d ( ( t = > i ! = = t ) ) ; i f ( t = n ? p t . g e t I n s t a n c e ( n ) : n u l l , t & & t . _ i s T r a n s i t i o n i n g ) r e t u r n } i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . c o l l a p s e " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; e . f o r E a c h ( ( e = > { i ! = = e & & p t . g e t O r C r e a t e I n s t a n c e ( e , { t o g g l e : ! 1 } ) . h i d e ( ) , t | | H . s e t ( e , " b s . c o l l a p s e " , n u l l ) } ) ) ; c o n s t   n = t h i s . _ g e t D i m e n s i o n ( ) ; t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( c t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( h t ) , t h i s . _ e l e m e n t . s t y l e [ n ] = 0 , t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( t h i s . _ t r i g g e r A r r a y , ! 0 ) , t h i s . _ i s T r a n s i t i o n i n g = ! 0 ; c o n s t   s = ` s c r o l l $ { n [ 0 ] . t o U p p e r C a s e ( ) + n . s l i c e ( 1 ) } ` ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( h t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( c t , l t ) , t h i s . _ e l e m e n t . s t y l e [ n ] = " " , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . c o l l a p s e " ) } ) , t h i s . _ e l e m e n t , ! 0 ) , t h i s . _ e l e m e n t . s t y l e [ n ] = ` $ { t h i s . _ e l e m e n t [ s ] } p x ` } h i d e ( ) { i f ( t h i s . _ i s T r a n s i t i o n i n g | | ! t h i s . _ i s S h o w n ( ) ) r e t u r n ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . c o l l a p s e " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t   t = t h i s . _ g e t D i m e n s i o n ( ) ; t h i s . _ e l e m e n t . s t y l e [ t ] = ` $ { t h i s . _ e l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) [ t ] } p x ` , u ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( h t ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( c t , l t ) ; c o n s t   e = t h i s . _ t r i g g e r A r r a y . l e n g t h ; f o r ( l e t   t = 0 ; t < e ; t + + ) { c o n s t   e = t h i s . _ t r i g g e r A r r a y [ t ] , i = n ( e ) ; i & & ! t h i s . _ i s S h o w n ( i ) & & t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( [ e ] , ! 1 ) } t h i s . _ i s T r a n s i t i o n i n g = ! 0 , t h i s . _ e l e m e n t . s t y l e [ t ] = " " , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( h t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( c t ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . c o l l a p s e " ) } ) , t h i s . _ e l e m e n t , ! 0 ) } _ i s S h o w n ( t = t h i s . _ e l e m e n t ) { r e t u r n   t . c l a s s L i s t . c o n t a i n s ( l t ) } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . r t , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . t } ) . t o g g l e = B o o l e a n ( t . t o g g l e ) , t . p a r e n t = r ( t . p a r e n t ) , a ( o t , t , a t ) , t } _ g e t D i m e n s i o n ( ) { r e t u r n   t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " c o l l a p s e - h o r i z o n t a l " ) ? " w i d t h " : " h e i g h t " } _ i n i t i a l i z e C h i l d r e n ( ) { i f ( ! t h i s . _ c o n f i g . p a r e n t ) r e t u r n ; c o n s t   t = V . f i n d ( u t , t h i s . _ c o n f i g . p a r e n t ) ; V . f i n d ( f t , t h i s . _ c o n f i g . p a r e n t ) . f i l t e r ( ( e = > ! t . i n c l u d e s ( e ) ) ) . f o r E a c h ( ( t = > { c o n s t   e = n ( t ) ; e & & t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( [ t ] , t h i s . _ i s S h o w n ( e ) ) } ) ) } _ a d d A r i a A n d C o l l a p s e d C l a s s ( t , e ) { t . l e n g t h & & t . f o r E a c h ( ( t = > { e ? t . c l a s s L i s t . r e m o v e ( d t ) : t . c l a s s L i s t . a d d ( d t ) , t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , e ) } ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = { } ; " s t r i n g " = = t y p e o f   t & & / s h o w | h i d e / . t e s t ( t ) & & ( e . t o g g l e = ! 1 ) ; c o n s t   i = p t . g e t O r C r e a t e I n s t a n c e ( t h i s , e ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = i [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; i [ t ] ( ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . c o l l a p s e . d a t a - a p i " , f t , ( f u n c t i o n ( t ) { ( " A " = = = t . t a r g e t . t a g N a m e | | t . d e l e g a t e T a r g e t & & " A " = = = t . d e l e g a t e T a r g e t . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) ; c o n s t   e = i ( t h i s ) ; V . f i n d ( e ) . f o r E a c h ( ( t = > { p t . g e t O r C r e a t e I n s t a n c e ( t , { t o g g l e : ! 1 } ) . t o g g l e ( ) } ) ) } ) ) , g ( p t ) ; v a r   m t = " t o p " , g t = " b o t t o m " , _ t = " r i g h t " , b t = " l e f t " , v t = " a u t o " , y t = [ m t , g t , _ t , b t ] , w t = " s t a r t " , E t = " e n d " , A t = " c l i p p i n g P a r e n t s " , T t = " v i e w p o r t " , O t = " p o p p e r " , C t = " r e f e r e n c e " , k t = y t . r e d u c e ( ( f u n c t i o n ( t , e ) { r e t u r n   t . c o n c a t ( [ e + " - " + w t , e + " - " + E t ] ) } ) , [ ] ) , L t = [ ] . c o n c a t ( y t , [ v t ] ) . r e d u c e ( ( f u n c t i o n ( t , e ) { r e t u r n   t . c o n c a t ( [ e , e + " - " + w t , e + " - " + E t ] ) } ) , [ ] ) , x t = " b e f o r e R e a d " , D t = " r e a d " , S t = " a f t e r R e a d " , N t = " b e f o r e M a i n " , I t = " m a i n " , P t = " a f t e r M a i n " , j t = " b e f o r e W r i t e " , M t = " w r i t e " , H t = " a f t e r W r i t e " , B t = [ x t , D t , S t , N t , I t , P t , j t , M t , H t ] ; f u n c t i o n   R t ( t ) { r e t u r n   t ? ( t . n o d e N a m e | | " " ) . t o L o w e r C a s e ( ) : n u l l } f u n c t i o n   W t ( t ) { i f ( n u l l = = t ) r e t u r n   w i n d o w ; i f ( " [ o b j e c t   W i n d o w ] " ! = = t . t o S t r i n g ( ) ) { v a r   e = t . o w n e r D o c u m e n t ; r e t u r n   e & & e . d e f a u l t V i e w | | w i n d o w } r e t u r n   t } f u n c t i o n   $ t ( t ) { r e t u r n   t   i n s t a n c e o f   W t ( t ) . E l e m e n t | | t   i n s t a n c e o f   E l e m e n t } f u n c t i o n   z t ( t ) { r e t u r n   t   i n s t a n c e o f   W t ( t ) . H T M L E l e m e n t | | t   i n s t a n c e o f   H T M L E l e m e n t } f u n c t i o n   q t ( t ) { r e t u r n " u n d e f i n e d " ! = t y p e o f   S h a d o w R o o t & & ( t   i n s t a n c e o f   W t ( t ) . S h a d o w R o o t | | t   i n s t a n c e o f   S h a d o w R o o t ) } c o n s t   F t = { n a m e : " a p p l y S t y l e s " , e n a b l e d : ! 0 , p h a s e : " w r i t e " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e ; O b j e c t . k e y s ( e . e l e m e n t s ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   i = e . s t y l e s [ t ] | | { } , n = e . a t t r i b u t e s [ t ] | | { } , s = e . e l e m e n t s [ t ] ; z t ( s ) & & R t ( s ) & & ( O b j e c t . a s s i g n ( s . s t y l e , i ) , O b j e c t . k e y s ( n ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   e = n [ t ] ; ! 1 = = = e ? s . r e m o v e A t t r i b u t e ( t ) : s . s e t A t t r i b u t e ( t , ! 0 = = = e ? " " : e ) } ) ) ) } ) ) } , e f f e c t : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = { p o p p e r : { p o s i t i o n : e . o p t i o n s . s t r a t e g y , l e f t : " 0 " , t o p : " 0 " , m a r g i n : " 0 " } , a r r o w : { p o s i t i o n : " a b s o l u t e " } , r e f e r e n c e : { } } ; r e t u r n   O b j e c t . a s s i g n ( e . e l e m e n t s . p o p p e r . s t y l e , i . p o p p e r ) , e . s t y l e s = i , e . e l e m e n t s . a r r o w & & O b j e c t . a s s i g n ( e . e l e m e n t s . a r r o w . s t y l e , i . a r r o w ) , f u n c t i o n ( ) { O b j e c t . k e y s ( e . e l e m e n t s ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   n = e . e l e m e n t s [ t ] , s = e . a t t r i b u t e s [ t ] | | { } , o = O b j e c t . k e y s ( e . s t y l e s . h a s O w n P r o p e r t y ( t ) ? e . s t y l e s [ t ] : i [ t ] ) . r e d u c e ( ( f u n c t i o n ( t , e ) { r e t u r n   t [ e ] = " " , t } ) , { } ) ; z t ( n ) & & R t ( n ) & & ( O b j e c t . a s s i g n ( n . s t y l e , o ) , O b j e c t . k e y s ( s ) . f o r E a c h ( ( f u n c t i o n ( t ) { n . r e m o v e A t t r i b u t e ( t ) } ) ) ) } ) ) } } , r e q u i r e s : [ " c o m p u t e S t y l e s " ] } ; f u n c t i o n   U t ( t ) { r e t u r n   t . s p l i t ( " - " ) [ 0 ] } f u n c t i o n   V t ( t , e ) { v a r   i = t . g e t B o u n d i n g C l i e n t R e c t ( ) ; r e t u r n { w i d t h : i . w i d t h / 1 , h e i g h t : i . h e i g h t / 1 , t o p : i . t o p / 1 , r i g h t : i . r i g h t / 1 , b o t t o m : i . b o t t o m / 1 , l e f t : i . l e f t / 1 , x : i . l e f t / 1 , y : i . t o p / 1 } } f u n c t i o n   K t ( t ) { v a r   e = V t ( t ) , i = t . o f f s e t W i d t h , n = t . o f f s e t H e i g h t ; r e t u r n   M a t h . a b s ( e . w i d t h - i ) < = 1 & & ( i = e . w i d t h ) , M a t h . a b s ( e . h e i g h t - n ) < = 1 & & ( n = e . h e i g h t ) , { x : t . o f f s e t L e f t , y : t . o f f s e t T o p , w i d t h : i , h e i g h t : n } } f u n c t i o n   X t ( t , e ) { v a r   i = e . g e t R o o t N o d e & & e . g e t R o o t N o d e ( ) ; i f ( t . c o n t a i n s ( e ) ) r e t u r n ! 0 ; i f ( i & & q t ( i ) ) { v a r   n = e ; d o { i f ( n & & t . i s S a m e N o d e ( n ) ) r e t u r n ! 0 ; n = n . p a r e n t N o d e | | n . h o s t } w h i l e ( n ) } r e t u r n ! 1 } f u n c t i o n   Y t ( t ) { r e t u r n   W t ( t ) . g e t C o m p u t e d S t y l e ( t ) } f u n c t i o n   Q t ( t ) { r e t u r n [ " t a b l e " , " t d " , " t h " ] . i n d e x O f ( R t ( t ) ) > = 0 } f u n c t i o n   G t ( t ) { r e t u r n ( ( $ t ( t ) ? t . o w n e r D o c u m e n t : t . d o c u m e n t ) | | w i n d o w . d o c u m e n t ) . d o c u m e n t E l e m e n t } f u n c t i o n   Z t ( t ) { r e t u r n " h t m l " = = = R t ( t ) ? t : t . a s s i g n e d S l o t | | t . p a r e n t N o d e | | ( q t ( t ) ? t . h o s t : n u l l ) | | G t ( t ) } f u n c t i o n   J t ( t ) { r e t u r n   z t ( t ) & & " f i x e d " ! = = Y t ( t ) . p o s i t i o n ? t . o f f s e t P a r e n t : n u l l } f u n c t i o n   t e ( t ) { f o r ( v a r   e = W t ( t ) , i = J t ( t ) ; i & & Q t ( i ) & & " s t a t i c " = = = Y t ( i ) . p o s i t i o n ; ) i = J t ( i ) ; r e t u r n   i & & ( " h t m l " = = = R t ( i ) | | " b o d y " = = = R t ( i ) & & " s t a t i c " = = = Y t ( i ) . p o s i t i o n ) ? e : i | | f u n c t i o n ( t ) { v a r   e = - 1 ! = = n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) . i n d e x O f ( " f i r e f o x " ) ; i f ( - 1 ! = = n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " T r i d e n t " ) & & z t ( t ) & & " f i x e d " = = = Y t ( t ) . p o s i t i o n ) r e t u r n   n u l l ; f o r ( v a r   i = Z t ( t ) ; z t ( i ) & & [ " h t m l " , " b o d y " ] . i n d e x O f ( R t ( i ) ) < 0 ; ) { v a r   n = Y t ( i ) ; i f ( " n o n e " ! = = n . t r a n s f o r m | | " n o n e " ! = = n . p e r s p e c t i v e | | " p a i n t " = = = n . c o n t a i n | | - 1 ! = = [ " t r a n s f o r m " , " p e r s p e c t i v e " ] . i n d e x O f ( n . w i l l C h a n g e ) | | e & & " f i l t e r " = = = n . w i l l C h a n g e | | e & & n . f i l t e r & & " n o n e " ! = = n . f i l t e r ) r e t u r n   i ; i = i . p a r e n t N o d e } r e t u r n   n u l l } ( t ) | | e } f u n c t i o n   e e ( t ) { r e t u r n [ " t o p " , " b o t t o m " ] . i n d e x O f ( t ) > = 0 ? " x " : " y " } v a r   i e = M a t h . m a x , n e = M a t h . m i n , s e = M a t h . r o u n d ; f u n c t i o n   o e ( t , e , i ) { r e t u r n   i e ( t , n e ( e , i ) ) } f u n c t i o n   r e ( t ) { r e t u r n   O b j e c t . a s s i g n ( { } , { t o p : 0 , r i g h t : 0 , b o t t o m : 0 , l e f t : 0 } , t ) } f u n c t i o n   a e ( t , e ) { r e t u r n   e . r e d u c e ( ( f u n c t i o n ( e , i ) { r e t u r n   e [ i ] = t , e } ) , { } ) } c o n s t   l e = { n a m e : " a r r o w " , e n a b l e d : ! 0 , p h a s e : " m a i n " , f n : f u n c t i o n ( t ) { v a r   e , i = t . s t a t e , n = t . n a m e , s = t . o p t i o n s , o = i . e l e m e n t s . a r r o w , r = i . m o d i f i e r s D a t a . p o p p e r O f f s e t s , a = U t ( i . p l a c e m e n t ) , l = e e ( a ) , c = [ b t , _ t ] . i n d e x O f ( a ) > = 0 ? " h e i g h t " : " w i d t h " ; i f ( o & & r ) { v a r   h = f u n c t i o n ( t , e ) { r e t u r n   r e ( " n u m b e r " ! = t y p e o f ( t = " f u n c t i o n " = = t y p e o f   t ? t ( O b j e c t . a s s i g n ( { } , e . r e c t s , { p l a c e m e n t : e . p l a c e m e n t } ) ) : t ) ? t : a e ( t , y t ) ) } ( s . p a d d i n g , i ) , d = K t ( o ) , u = " y " = = = l ? m t : b t , f = " y " = = = l ? g t : _ t , p = i . r e c t s . r e f e r e n c e [ c ] + i . r e c t s . r e f e r e n c e [ l ] - r [ l ] - i . r e c t s . p o p p e r [ c ] , m = r [ l ] - i . r e c t s . r e f e r e n c e [ l ] , g = t e ( o ) , _ = g ? " y " = = = l ? g . c l i e n t H e i g h t | | 0 : g . c l i e n t W i d t h | | 0 : 0 , b = p / 2 - m / 2 , v = h [ u ] , y = _ - d [ c ] - h [ f ] , w = _ / 2 - d [ c ] / 2 + b , E = o e ( v , w , y ) , A = l ; i . m o d i f i e r s D a t a [ n ] = ( ( e = { } ) [ A ] = E , e . c e n t e r O f f s e t = E - w , e ) } } , e f f e c t : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s . e l e m e n t , n = v o i d   0 = = = i ? " [ d a t a - p o p p e r - a r r o w ] " : i ; n u l l ! = n & & ( " s t r i n g " ! = t y p e o f   n | | ( n = e . e l e m e n t s . p o p p e r . q u e r y S e l e c t o r ( n ) ) ) & & X t ( e . e l e m e n t s . p o p p e r , n ) & & ( e . e l e m e n t s . a r r o w = n ) } , r e q u i r e s : [ " p o p p e r O f f s e t s " ] , r e q u i r e s I f E x i s t s : [ " p r e v e n t O v e r f l o w " ] } ; f u n c t i o n   c e ( t ) { r e t u r n   t . s p l i t ( " - " ) [ 1 ] } v a r   h e = { t o p : " a u t o " , r i g h t : " a u t o " , b o t t o m : " a u t o " , l e f t : " a u t o " } ; f u n c t i o n   d e ( t ) { v a r   e , i = t . p o p p e r , n = t . p o p p e r R e c t , s = t . p l a c e m e n t , o = t . v a r i a t i o n , r = t . o f f s e t s , a = t . p o s i t i o n , l = t . g p u A c c e l e r a t i o n , c = t . a d a p t i v e , h = t . r o u n d O f f s e t s , d = ! 0 = = = h ? f u n c t i o n ( t ) { v a r   e = t . x , i = t . y , n = w i n d o w . d e v i c e P i x e l R a t i o | | 1 ; r e t u r n { x : s e ( s e ( e * n ) / n ) | | 0 , y : s e ( s e ( i * n ) / n ) | | 0 } } ( r ) : " f u n c t i o n " = = t y p e o f   h ? h ( r ) : r , u = d . x , f = v o i d   0 = = = u ? 0 : u , p = d . y , m = v o i d   0 = = = p ? 0 : p , g = r . h a s O w n P r o p e r t y ( " x " ) , _ = r . h a s O w n P r o p e r t y ( " y " ) , b = b t , v = m t , y = w i n d o w ; i f ( c ) { v a r   w = t e ( i ) , E = " c l i e n t H e i g h t " , A = " c l i e n t W i d t h " ; w = = = W t ( i ) & & " s t a t i c " ! = = Y t ( w = G t ( i ) ) . p o s i t i o n & & " a b s o l u t e " = = = a & & ( E = " s c r o l l H e i g h t " , A = " s c r o l l W i d t h " ) , w = w , s ! = = m t & & ( s ! = = b t & & s ! = = _ t | | o ! = = E t ) | | ( v = g t , m - = w [ E ] - n . h e i g h t , m * = l ? 1 : - 1 ) , s ! = = b t & & ( s ! = = m t & & s ! = = g t | | o ! = = E t ) | | ( b = _ t , f - = w [ A ] - n . w i d t h , f * = l ? 1 : - 1 ) } v a r   T , O = O b j e c t . a s s i g n ( { p o s i t i o n : a } , c & & h e ) ; r e t u r n   l ? O b j e c t . a s s i g n ( { } , O , ( ( T = { } ) [ v ] = _ ? " 0 " : " " , T [ b ] = g ? " 0 " : " " , T . t r a n s f o r m = ( y . d e v i c e P i x e l R a t i o | | 1 ) < = 1 ? " t r a n s l a t e ( " + f + " p x ,   " + m + " p x ) " : " t r a n s l a t e 3 d ( " + f + " p x ,   " + m + " p x ,   0 ) " , T ) ) : O b j e c t . a s s i g n ( { } , O , ( ( e = { } ) [ v ] = _ ? m + " p x " : " " , e [ b ] = g ? f + " p x " : " " , e . t r a n s f o r m = " " , e ) ) } c o n s t   u e = { n a m e : " c o m p u t e S t y l e s " , e n a b l e d : ! 0 , p h a s e : " b e f o r e W r i t e " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = i . g p u A c c e l e r a t i o n , s = v o i d   0 = = = n | | n , o = i . a d a p t i v e , r = v o i d   0 = = = o | | o , a = i . r o u n d O f f s e t s , l = v o i d   0 = = = a | | a , c = { p l a c e m e n t : U t ( e . p l a c e m e n t ) , v a r i a t i o n : c e ( e . p l a c e m e n t ) , p o p p e r : e . e l e m e n t s . p o p p e r , p o p p e r R e c t : e . r e c t s . p o p p e r , g p u A c c e l e r a t i o n : s } ; n u l l ! = e . m o d i f i e r s D a t a . p o p p e r O f f s e t s & & ( e . s t y l e s . p o p p e r = O b j e c t . a s s i g n ( { } , e . s t y l e s . p o p p e r , d e ( O b j e c t . a s s i g n ( { } , c , { o f f s e t s : e . m o d i f i e r s D a t a . p o p p e r O f f s e t s , p o s i t i o n : e . o p t i o n s . s t r a t e g y , a d a p t i v e : r , r o u n d O f f s e t s : l } ) ) ) ) , n u l l ! = e . m o d i f i e r s D a t a . a r r o w & & ( e . s t y l e s . a r r o w = O b j e c t . a s s i g n ( { } , e . s t y l e s . a r r o w , d e ( O b j e c t . a s s i g n ( { } , c , { o f f s e t s : e . m o d i f i e r s D a t a . a r r o w , p o s i t i o n : " a b s o l u t e " , a d a p t i v e : ! 1 , r o u n d O f f s e t s : l } ) ) ) ) , e . a t t r i b u t e s . p o p p e r = O b j e c t . a s s i g n ( { } , e . a t t r i b u t e s . p o p p e r , { " d a t a - p o p p e r - p l a c e m e n t " : e . p l a c e m e n t } ) } , d a t a : { } } ; v a r   f e = { p a s s i v e : ! 0 } ; c o n s t   p e = { n a m e : " e v e n t L i s t e n e r s " , e n a b l e d : ! 0 , p h a s e : " w r i t e " , f n : f u n c t i o n ( ) { } , e f f e c t : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . i n s t a n c e , n = t . o p t i o n s , s = n . s c r o l l , o = v o i d   0 = = = s | | s , r = n . r e s i z e , a = v o i d   0 = = = r | | r , l = W t ( e . e l e m e n t s . p o p p e r ) , c = [ ] . c o n c a t ( e . s c r o l l P a r e n t s . r e f e r e n c e , e . s c r o l l P a r e n t s . p o p p e r ) ; r e t u r n   o & & c . f o r E a c h ( ( f u n c t i o n ( t ) { t . a d d E v e n t L i s t e n e r ( " s c r o l l " , i . u p d a t e , f e ) } ) ) , a & & l . a d d E v e n t L i s t e n e r ( " r e s i z e " , i . u p d a t e , f e ) , f u n c t i o n ( ) { o & & c . f o r E a c h ( ( f u n c t i o n ( t ) { t . r e m o v e E v e n t L i s t e n e r ( " s c r o l l " , i . u p d a t e , f e ) } ) ) , a & & l . r e m o v e E v e n t L i s t e n e r ( " r e s i z e " , i . u p d a t e , f e ) } } , d a t a : { } } ; v a r   m e = { l e f t : " r i g h t " , r i g h t : " l e f t " , b o t t o m : " t o p " , t o p : " b o t t o m " } ; f u n c t i o n   g e ( t ) { r e t u r n   t . r e p l a c e ( / l e f t | r i g h t | b o t t o m | t o p / g , ( f u n c t i o n ( t ) { r e t u r n   m e [ t ] } ) ) } v a r   _ e = { s t a r t : " e n d " , e n d : " s t a r t " } ; f u n c t i o n   b e ( t ) { r e t u r n   t . r e p l a c e ( / s t a r t | e n d / g , ( f u n c t i o n ( t ) { r e t u r n   _ e [ t ] } ) ) } f u n c t i o n   v e ( t ) { v a r   e = W t ( t ) ; r e t u r n { s c r o l l L e f t : e . p a g e X O f f s e t , s c r o l l T o p : e . p a g e Y O f f s e t } } f u n c t i o n   y e ( t ) { r e t u r n   V t ( G t ( t ) ) . l e f t + v e ( t ) . s c r o l l L e f t } f u n c t i o n   w e ( t ) { v a r   e = Y t ( t ) , i = e . o v e r f l o w , n = e . o v e r f l o w X , s = e . o v e r f l o w Y ; r e t u r n / a u t o | s c r o l l | o v e r l a y | h i d d e n / . t e s t ( i + s + n ) } f u n c t i o n   E e ( t ) { r e t u r n [ " h t m l " , " b o d y " , " # d o c u m e n t " ] . i n d e x O f ( R t ( t ) ) > = 0 ? t . o w n e r D o c u m e n t . b o d y : z t ( t ) & & w e ( t ) ? t : E e ( Z t ( t ) ) } f u n c t i o n   A e ( t , e ) { v a r   i ; v o i d   0 = = = e & & ( e = [ ] ) ; v a r   n = E e ( t ) , s = n = = = ( n u l l = = ( i = t . o w n e r D o c u m e n t ) ? v o i d   0 : i . b o d y ) , o = W t ( n ) , r = s ? [ o ] . c o n c a t ( o . v i s u a l V i e w p o r t | | [ ] , w e ( n ) ? n : [ ] ) : n , a = e . c o n c a t ( r ) ; r e t u r n   s ? a : a . c o n c a t ( A e ( Z t ( r ) ) ) } f u n c t i o n   T e ( t ) { r e t u r n   O b j e c t . a s s i g n ( { } , t , { l e f t : t . x , t o p : t . y , r i g h t : t . x + t . w i d t h , b o t t o m : t . y + t . h e i g h t } ) } f u n c t i o n   O e ( t , e ) { r e t u r n   e = = = T t ? T e ( f u n c t i o n ( t ) { v a r   e = W t ( t ) , i = G t ( t ) , n = e . v i s u a l V i e w p o r t , s = i . c l i e n t W i d t h , o = i . c l i e n t H e i g h t , r = 0 , a = 0 ; r e t u r n   n & & ( s = n . w i d t h , o = n . h e i g h t , / ^ ( ( ? ! c h r o m e | a n d r o i d ) . ) * s a f a r i / i . t e s t ( n a v i g a t o r . u s e r A g e n t ) | | ( r = n . o f f s e t L e f t , a = n . o f f s e t T o p ) ) , { w i d t h : s , h e i g h t : o , x : r + y e ( t ) , y : a } } ( t ) ) : z t ( e ) ? f u n c t i o n ( t ) { v a r   e = V t ( t ) ; r e t u r n   e . t o p = e . t o p + t . c l i e n t T o p , e . l e f t = e . l e f t + t . c l i e n t L e f t , e . b o t t o m = e . t o p + t . c l i e n t H e i g h t , e . r i g h t = e . l e f t + t . c l i e n t W i d t h , e . w i d t h = t . c l i e n t W i d t h , e . h e i g h t = t . c l i e n t H e i g h t , e . x = e . l e f t , e . y = e . t o p , e } ( e ) : T e ( f u n c t i o n ( t ) { v a r   e , i = G t ( t ) , n = v e ( t ) , s = n u l l = = ( e = t . o w n e r D o c u m e n t ) ? v o i d   0 : e . b o d y , o = i e ( i . s c r o l l W i d t h , i . c l i e n t W i d t h , s ? s . s c r o l l W i d t h : 0 , s ? s . c l i e n t W i d t h : 0 ) , r = i e ( i . s c r o l l H e i g h t , i . c l i e n t H e i g h t , s ? s . s c r o l l H e i g h t : 0 , s ? s . c l i e n t H e i g h t : 0 ) , a = - n . s c r o l l L e f t + y e ( t ) , l = - n . s c r o l l T o p ; r e t u r n " r t l " = = = Y t ( s | | i ) . d i r e c t i o n & & ( a + = i e ( i . c l i e n t W i d t h , s ? s . c l i e n t W i d t h : 0 ) - o ) , { w i d t h : o , h e i g h t : r , x : a , y : l } } ( G t ( t ) ) ) } f u n c t i o n   C e ( t ) { v a r   e , i = t . r e f e r e n c e , n = t . e l e m e n t , s = t . p l a c e m e n t , o = s ? U t ( s ) : n u l l , r = s ? c e ( s ) : n u l l , a = i . x + i . w i d t h / 2 - n . w i d t h / 2 , l = i . y + i . h e i g h t / 2 - n . h e i g h t / 2 ; s w i t c h ( o ) { c a s e   m t : e = { x : a , y : i . y - n . h e i g h t } ; b r e a k ; c a s e   g t : e = { x : a , y : i . y + i . h e i g h t } ; b r e a k ; c a s e   _ t : e = { x : i . x + i . w i d t h , y : l } ; b r e a k ; c a s e   b t : e = { x : i . x - n . w i d t h , y : l } ; b r e a k ; d e f a u l t : e = { x : i . x , y : i . y } } v a r   c = o ? e e ( o ) : n u l l ; i f ( n u l l ! = c ) { v a r   h = " y " = = = c ? " h e i g h t " : " w i d t h " ; s w i t c h ( r ) { c a s e   w t : e [ c ] = e [ c ] - ( i [ h ] / 2 - n [ h ] / 2 ) ; b r e a k ; c a s e   E t : e [ c ] = e [ c ] + ( i [ h ] / 2 - n [ h ] / 2 ) } } r e t u r n   e } f u n c t i o n   k e ( t , e ) { v o i d   0 = = = e & & ( e = { } ) ; v a r   i = e , n = i . p l a c e m e n t , s = v o i d   0 = = = n ? t . p l a c e m e n t : n , o = i . b o u n d a r y , r = v o i d   0 = = = o ? A t : o , a = i . r o o t B o u n d a r y , l = v o i d   0 = = = a ? T t : a , c = i . e l e m e n t C o n t e x t , h = v o i d   0 = = = c ? O t : c , d = i . a l t B o u n d a r y , u = v o i d   0 ! = = d & & d , f = i . p a d d i n g , p = v o i d   0 = = = f ? 0 : f , m = r e ( " n u m b e r " ! = t y p e o f   p ? p : a e ( p , y t ) ) , g = h = = = O t ? C t : O t , _ = t . r e c t s . p o p p e r , b = t . e l e m e n t s [ u ? g : h ] , v = f u n c t i o n ( t , e , i ) { v a r   n = " c l i p p i n g P a r e n t s " = = = e ? f u n c t i o n ( t ) { v a r   e = A e ( Z t ( t ) ) , i = [ " a b s o l u t e " , " f i x e d " ] . i n d e x O f ( Y t ( t ) . p o s i t i o n ) > = 0 & & z t ( t ) ? t e ( t ) : t ; r e t u r n   $ t ( i ) ? e . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   $ t ( t ) & & X t ( t , i ) & & " b o d y " ! = = R t ( t ) } ) ) : [ ] } ( t ) : [ ] . c o n c a t ( e ) , s = [ ] . c o n c a t ( n , [ i ] ) , o = s [ 0 ] , r = s . r e d u c e ( ( f u n c t i o n ( e , i ) { v a r   n = O e ( t , i ) ; r e t u r n   e . t o p = i e ( n . t o p , e . t o p ) , e . r i g h t = n e ( n . r i g h t , e . r i g h t ) , e . b o t t o m = n e ( n . b o t t o m , e . b o t t o m ) , e . l e f t = i e ( n . l e f t , e . l e f t ) , e } ) , O e ( t , o ) ) ; r e t u r n   r . w i d t h = r . r i g h t - r . l e f t , r . h e i g h t = r . b o t t o m - r . t o p , r . x = r . l e f t , r . y = r . t o p , r } ( $ t ( b ) ? b : b . c o n t e x t E l e m e n t | | G t ( t . e l e m e n t s . p o p p e r ) , r , l ) , y = V t ( t . e l e m e n t s . r e f e r e n c e ) , w = C e ( { r e f e r e n c e : y , e l e m e n t : _ , s t r a t e g y : " a b s o l u t e " , p l a c e m e n t : s } ) , E = T e ( O b j e c t . a s s i g n ( { } , _ , w ) ) , A = h = = = O t ? E : y , T = { t o p : v . t o p - A . t o p + m . t o p , b o t t o m : A . b o t t o m - v . b o t t o m + m . b o t t o m , l e f t : v . l e f t - A . l e f t + m . l e f t , r i g h t : A . r i g h t - v . r i g h t + m . r i g h t } , O = t . m o d i f i e r s D a t a . o f f s e t ; i f ( h = = = O t & & O ) { v a r   C = O [ s ] ; O b j e c t . k e y s ( T ) . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   e = [ _ t , g t ] . i n d e x O f ( t ) > = 0 ? 1 : - 1 , i = [ m t , g t ] . i n d e x O f ( t ) > = 0 ? " y " : " x " ; T [ t ] + = C [ i ] * e } ) ) } r e t u r n   T } f u n c t i o n   L e ( t , e ) { v o i d   0 = = = e & & ( e = { } ) ; v a r   i = e , n = i . p l a c e m e n t , s = i . b o u n d a r y , o = i . r o o t B o u n d a r y , r = i . p a d d i n g , a = i . f l i p V a r i a t i o n s , l = i . a l l o w e d A u t o P l a c e m e n t s , c = v o i d   0 = = = l ? L t : l , h = c e ( n ) , d = h ? a ? k t : k t . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   c e ( t ) = = = h } ) ) : y t , u = d . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   c . i n d e x O f ( t ) > = 0 } ) ) ; 0 = = = u . l e n g t h & & ( u = d ) ; v a r   f = u . r e d u c e ( ( f u n c t i o n ( e , i ) { r e t u r n   e [ i ] = k e ( t , { p l a c e m e n t : i , b o u n d a r y : s , r o o t B o u n d a r y : o , p a d d i n g : r } ) [ U t ( i ) ] , e } ) , { } ) ; r e t u r n   O b j e c t . k e y s ( f ) . s o r t ( ( f u n c t i o n ( t , e ) { r e t u r n   f [ t ] - f [ e ] } ) ) } c o n s t   x e = { n a m e : " f l i p " , e n a b l e d : ! 0 , p h a s e : " m a i n " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = t . n a m e ; i f ( ! e . m o d i f i e r s D a t a [ n ] . _ s k i p ) { f o r ( v a r   s = i . m a i n A x i s , o = v o i d   0 = = = s | | s , r = i . a l t A x i s , a = v o i d   0 = = = r | | r , l = i . f a l l b a c k P l a c e m e n t s , c = i . p a d d i n g , h = i . b o u n d a r y , d = i . r o o t B o u n d a r y , u = i . a l t B o u n d a r y , f = i . f l i p V a r i a t i o n s , p = v o i d   0 = = = f | | f , m = i . a l l o w e d A u t o P l a c e m e n t s , g = e . o p t i o n s . p l a c e m e n t , _ = U t ( g ) , b = l | | ( _ ! = = g & & p ? f u n c t i o n ( t ) { i f ( U t ( t ) = = = v t ) r e t u r n [ ] ; v a r   e = g e ( t ) ; r e t u r n [ b e ( t ) , e , b e ( e ) ] } ( g ) : [ g e ( g ) ] ) , v = [ g ] . c o n c a t ( b ) . r e d u c e ( ( f u n c t i o n ( t , i ) { r e t u r n   t . c o n c a t ( U t ( i ) = = = v t ? L e ( e , { p l a c e m e n t : i , b o u n d a r y : h , r o o t B o u n d a r y : d , p a d d i n g : c , f l i p V a r i a t i o n s : p , a l l o w e d A u t o P l a c e m e n t s : m } ) : i ) } ) , [ ] ) , y = e . r e c t s . r e f e r e n c e , w = e . r e c t s . p o p p e r , E = n e w   M a p , A = ! 0 , T = v [ 0 ] , O = 0 ; O < v . l e n g t h ; O + + ) { v a r   C = v [ O ] , k = U t ( C ) , L = c e ( C ) = = = w t , x = [ m t , g t ] . i n d e x O f ( k ) > = 0 , D = x ? " w i d t h " : " h e i g h t " , S = k e ( e , { p l a c e m e n t : C , b o u n d a r y : h , r o o t B o u n d a r y : d , a l t B o u n d a r y : u , p a d d i n g : c } ) , N = x ? L ? _ t : b t : L ? g t : m t ; y [ D ] > w [ D ] & & ( N = g e ( N ) ) ; v a r   I = g e ( N ) , P = [ ] ; i f ( o & & P . p u s h ( S [ k ] < = 0 ) , a & & P . p u s h ( S [ N ] < = 0 , S [ I ] < = 0 ) , P . e v e r y ( ( f u n c t i o n ( t ) { r e t u r n   t } ) ) ) { T = C , A = ! 1 ; b r e a k } E . s e t ( C , P ) } i f ( A ) f o r ( v a r   j = f u n c t i o n ( t ) { v a r   e = v . f i n d ( ( f u n c t i o n ( e ) { v a r   i = E . g e t ( e ) ; i f ( i ) r e t u r n   i . s l i c e ( 0 , t ) . e v e r y ( ( f u n c t i o n ( t ) { r e t u r n   t } ) ) } ) ) ; i f ( e ) r e t u r n   T = e , " b r e a k " } , M = p ? 3 : 1 ; M > 0 & & " b r e a k " ! = = j ( M ) ; M - - ) ; e . p l a c e m e n t ! = = T & & ( e . m o d i f i e r s D a t a [ n ] . _ s k i p = ! 0 , e . p l a c e m e n t = T , e . r e s e t = ! 0 ) } } , r e q u i r e s I f E x i s t s : [ " o f f s e t " ] , d a t a : { _ s k i p : ! 1 } } ; f u n c t i o n   D e ( t , e , i ) { r e t u r n   v o i d   0 = = = i & & ( i = { x : 0 , y : 0 } ) , { t o p : t . t o p - e . h e i g h t - i . y , r i g h t : t . r i g h t - e . w i d t h + i . x , b o t t o m : t . b o t t o m - e . h e i g h t + i . y , l e f t : t . l e f t - e . w i d t h - i . x } } f u n c t i o n   S e ( t ) { r e t u r n [ m t , _ t , g t , b t ] . s o m e ( ( f u n c t i o n ( e ) { r e t u r n   t [ e ] > = 0 } ) ) } c o n s t   N e = { n a m e : " h i d e " , e n a b l e d : ! 0 , p h a s e : " m a i n " , r e q u i r e s I f E x i s t s : [ " p r e v e n t O v e r f l o w " ] , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . n a m e , n = e . r e c t s . r e f e r e n c e , s = e . r e c t s . p o p p e r , o = e . m o d i f i e r s D a t a . p r e v e n t O v e r f l o w , r = k e ( e , { e l e m e n t C o n t e x t : " r e f e r e n c e " } ) , a = k e ( e , { a l t B o u n d a r y : ! 0 } ) , l = D e ( r , n ) , c = D e ( a , s , o ) , h = S e ( l ) , d = S e ( c ) ; e . m o d i f i e r s D a t a [ i ] = { r e f e r e n c e C l i p p i n g O f f s e t s : l , p o p p e r E s c a p e O f f s e t s : c , i s R e f e r e n c e H i d d e n : h , h a s P o p p e r E s c a p e d : d } , e . a t t r i b u t e s . p o p p e r = O b j e c t . a s s i g n ( { } , e . a t t r i b u t e s . p o p p e r , { " d a t a - p o p p e r - r e f e r e n c e - h i d d e n " : h , " d a t a - p o p p e r - e s c a p e d " : d } ) } } , I e = { n a m e : " o f f s e t " , e n a b l e d : ! 0 , p h a s e : " m a i n " , r e q u i r e s : [ " p o p p e r O f f s e t s " ] , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = t . n a m e , s = i . o f f s e t , o = v o i d   0 = = = s ? [ 0 , 0 ] : s , r = L t . r e d u c e ( ( f u n c t i o n ( t , i ) { r e t u r n   t [ i ] = f u n c t i o n ( t , e , i ) { v a r   n = U t ( t ) , s = [ b t , m t ] . i n d e x O f ( n ) > = 0 ? - 1 : 1 , o = " f u n c t i o n " = = t y p e o f   i ? i ( O b j e c t . a s s i g n ( { } , e , { p l a c e m e n t : t } ) ) : i , r = o [ 0 ] , a = o [ 1 ] ; r e t u r n   r = r | | 0 , a = ( a | | 0 ) * s , [ b t , _ t ] . i n d e x O f ( n ) > = 0 ? { x : a , y : r } : { x : r , y : a } } ( i , e . r e c t s , o ) , t } ) , { } ) , a = r [ e . p l a c e m e n t ] , l = a . x , c = a . y ; n u l l ! = e . m o d i f i e r s D a t a . p o p p e r O f f s e t s & & ( e . m o d i f i e r s D a t a . p o p p e r O f f s e t s . x + = l , e . m o d i f i e r s D a t a . p o p p e r O f f s e t s . y + = c ) , e . m o d i f i e r s D a t a [ n ] = r } } , P e = { n a m e : " p o p p e r O f f s e t s " , e n a b l e d : ! 0 , p h a s e : " r e a d " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . n a m e ; e . m o d i f i e r s D a t a [ i ] = C e ( { r e f e r e n c e : e . r e c t s . r e f e r e n c e , e l e m e n t : e . r e c t s . p o p p e r , s t r a t e g y : " a b s o l u t e " , p l a c e m e n t : e . p l a c e m e n t } ) } , d a t a : { } } , j e = { n a m e : " p r e v e n t O v e r f l o w " , e n a b l e d : ! 0 , p h a s e : " m a i n " , f n : f u n c t i o n ( t ) { v a r   e = t . s t a t e , i = t . o p t i o n s , n = t . n a m e , s = i . m a i n A x i s , o = v o i d   0 = = = s | | s , r = i . a l t A x i s , a = v o i d   0 ! = = r & & r , l = i . b o u n d a r y , c = i . r o o t B o u n d a r y , h = i . a l t B o u n d a r y , d = i . p a d d i n g , u = i . t e t h e r , f = v o i d   0 = = = u | | u , p = i . t e t h e r O f f s e t , m = v o i d   0 = = = p ? 0 : p , g = k e ( e , { b o u n d a r y : l , r o o t B o u n d a r y : c , p a d d i n g : d , a l t B o u n d a r y : h } ) , _ = U t ( e . p l a c e m e n t ) , b = c e ( e . p l a c e m e n t ) , v = ! b , y = e e ( _ ) , w = " x " = = = y ? " y " : " x " , E = e . m o d i f i e r s D a t a . p o p p e r O f f s e t s , A = e . r e c t s . r e f e r e n c e , T = e . r e c t s . p o p p e r , O = " f u n c t i o n " = = t y p e o f   m ? m ( O b j e c t . a s s i g n ( { } , e . r e c t s , { p l a c e m e n t : e . p l a c e m e n t } ) ) : m , C = { x : 0 , y : 0 } ; i f ( E ) { i f ( o | | a ) { v a r   k = " y " = = = y ? m t : b t , L = " y " = = = y ? g t : _ t , x = " y " = = = y ? " h e i g h t " : " w i d t h " , D = E [ y ] , S = E [ y ] + g [ k ] , N = E [ y ] - g [ L ] , I = f ? - T [ x ] / 2 : 0 , P = b = = = w t ? A [ x ] : T [ x ] , j = b = = = w t ? - T [ x ] : - A [ x ] , M = e . e l e m e n t s . a r r o w , H = f & & M ? K t ( M ) : { w i d t h : 0 , h e i g h t : 0 } , B = e . m o d i f i e r s D a t a [ " a r r o w # p e r s i s t e n t " ] ? e . m o d i f i e r s D a t a [ " a r r o w # p e r s i s t e n t " ] . p a d d i n g : { t o p : 0 , r i g h t : 0 , b o t t o m : 0 , l e f t : 0 } , R = B [ k ] , W = B [ L ] , $ = o e ( 0 , A [ x ] , H [ x ] ) , z = v ? A [ x ] / 2 - I - $ - R - O : P - $ - R - O , q = v ? - A [ x ] / 2 + I + $ + W + O : j + $ + W + O , F = e . e l e m e n t s . a r r o w & & t e ( e . e l e m e n t s . a r r o w ) , U = F ? " y " = = = y ? F . c l i e n t T o p | | 0 : F . c l i e n t L e f t | | 0 : 0 , V = e . m o d i f i e r s D a t a . o f f s e t ? e . m o d i f i e r s D a t a . o f f s e t [ e . p l a c e m e n t ] [ y ] : 0 , K = E [ y ] + z - V - U , X = E [ y ] + q - V ; i f ( o ) { v a r   Y = o e ( f ? n e ( S , K ) : S , D , f ? i e ( N , X ) : N ) ; E [ y ] = Y , C [ y ] = Y - D } i f ( a ) { v a r   Q = " x " = = = y ? m t : b t , G = " x " = = = y ? g t : _ t , Z = E [ w ] , J = Z + g [ Q ] , t t = Z - g [ G ] , e t = o e ( f ? n e ( J , K ) : J , Z , f ? i e ( t t , X ) : t t ) ; E [ w ] = e t , C [ w ] = e t - Z } } e . m o d i f i e r s D a t a [ n ] = C } } , r e q u i r e s I f E x i s t s : [ " o f f s e t " ] } ; f u n c t i o n   M e ( t , e , i ) { v o i d   0 = = = i & & ( i = ! 1 ) ; v a r   n = z t ( e ) ; z t ( e ) & & f u n c t i o n ( t ) { v a r   e = t . g e t B o u n d i n g C l i e n t R e c t ( ) ; e . w i d t h , t . o f f s e t W i d t h , e . h e i g h t , t . o f f s e t H e i g h t } ( e ) ; v a r   s , o , r = G t ( e ) , a = V t ( t ) , l = { s c r o l l L e f t : 0 , s c r o l l T o p : 0 } , c = { x : 0 , y : 0 } ; r e t u r n ( n | | ! n & & ! i ) & & ( ( " b o d y " ! = = R t ( e ) | | w e ( r ) ) & & ( l = ( s = e ) ! = = W t ( s ) & & z t ( s ) ? { s c r o l l L e f t : ( o = s ) . s c r o l l L e f t , s c r o l l T o p : o . s c r o l l T o p } : v e ( s ) ) , z t ( e ) ? ( ( c = V t ( e ) ) . x + = e . c l i e n t L e f t , c . y + = e . c l i e n t T o p ) : r & & ( c . x = y e ( r ) ) ) , { x : a . l e f t + l . s c r o l l L e f t - c . x , y : a . t o p + l . s c r o l l T o p - c . y , w i d t h : a . w i d t h , h e i g h t : a . h e i g h t } } f u n c t i o n   H e ( t ) { v a r   e = n e w   M a p , i = n e w   S e t , n = [ ] ; f u n c t i o n   s ( t ) { i . a d d ( t . n a m e ) , [ ] . c o n c a t ( t . r e q u i r e s | | [ ] , t . r e q u i r e s I f E x i s t s | | [ ] ) . f o r E a c h ( ( f u n c t i o n ( t ) { i f ( ! i . h a s ( t ) ) { v a r   n = e . g e t ( t ) ; n & & s ( n ) } } ) ) , n . p u s h ( t ) } r e t u r n   t . f o r E a c h ( ( f u n c t i o n ( t ) { e . s e t ( t . n a m e , t ) } ) ) , t . f o r E a c h ( ( f u n c t i o n ( t ) { i . h a s ( t . n a m e ) | | s ( t ) } ) ) , n } v a r   B e = { p l a c e m e n t : " b o t t o m " , m o d i f i e r s : [ ] , s t r a t e g y : " a b s o l u t e " } ; f u n c t i o n   R e ( ) { f o r ( v a r   t = a r g u m e n t s . l e n g t h , e = n e w   A r r a y ( t ) , i = 0 ; i < t ; i + + ) e [ i ] = a r g u m e n t s [ i ] ; r e t u r n ! e . s o m e ( ( f u n c t i o n ( t ) { r e t u r n ! ( t & & " f u n c t i o n " = = t y p e o f   t . g e t B o u n d i n g C l i e n t R e c t ) } ) ) } f u n c t i o n   W e ( t ) { v o i d   0 = = = t & & ( t = { } ) ; v a r   e = t , i = e . d e f a u l t M o d i f i e r s , n = v o i d   0 = = = i ? [ ] : i , s = e . d e f a u l t O p t i o n s , o = v o i d   0 = = = s ? B e : s ; r e t u r n   f u n c t i o n ( t , e , i ) { v o i d   0 = = = i & & ( i = o ) ; v a r   s , r , a = { p l a c e m e n t : " b o t t o m " , o r d e r e d M o d i f i e r s : [ ] , o p t i o n s : O b j e c t . a s s i g n ( { } , B e , o ) , m o d i f i e r s D a t a : { } , e l e m e n t s : { r e f e r e n c e : t , p o p p e r : e } , a t t r i b u t e s : { } , s t y l e s : { } } , l = [ ] , c = ! 1 , h = { s t a t e : a , s e t O p t i o n s : f u n c t i o n ( i ) { v a r   s = " f u n c t i o n " = = t y p e o f   i ? i ( a . o p t i o n s ) : i ; d ( ) , a . o p t i o n s = O b j e c t . a s s i g n ( { } , o , a . o p t i o n s , s ) , a . s c r o l l P a r e n t s = { r e f e r e n c e : $ t ( t ) ? A e ( t ) : t . c o n t e x t E l e m e n t ? A e ( t . c o n t e x t E l e m e n t ) : [ ] , p o p p e r : A e ( e ) } ; v a r   r , c , u = f u n c t i o n ( t ) { v a r   e = H e ( t ) ; r e t u r n   B t . r e d u c e ( ( f u n c t i o n ( t , i ) { r e t u r n   t . c o n c a t ( e . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   t . p h a s e = = = i } ) ) ) } ) , [ ] ) } ( ( r = [ ] . c o n c a t ( n , a . o p t i o n s . m o d i f i e r s ) , c = r . r e d u c e ( ( f u n c t i o n ( t , e ) { v a r   i = t [ e . n a m e ] ; r e t u r n   t [ e . n a m e ] = i ? O b j e c t . a s s i g n ( { } , i , e , { o p t i o n s : O b j e c t . a s s i g n ( { } , i . o p t i o n s , e . o p t i o n s ) , d a t a : O b j e c t . a s s i g n ( { } , i . d a t a , e . d a t a ) } ) : e , t } ) , { } ) , O b j e c t . k e y s ( c ) . m a p ( ( f u n c t i o n ( t ) { r e t u r n   c [ t ] } ) ) ) ) ; r e t u r n   a . o r d e r e d M o d i f i e r s = u . f i l t e r ( ( f u n c t i o n ( t ) { r e t u r n   t . e n a b l e d } ) ) , a . o r d e r e d M o d i f i e r s . f o r E a c h ( ( f u n c t i o n ( t ) { v a r   e = t . n a m e , i = t . o p t i o n s , n = v o i d   0 = = = i ? { } : i , s = t . e f f e c t ; i f ( " f u n c t i o n " = = t y p e o f   s ) { v a r   o = s ( { s t a t e : a , n a m e : e , i n s t a n c e : h , o p t i o n s : n } ) ; l . p u s h ( o | | f u n c t i o n ( ) { } ) } } ) ) , h . u p d a t e ( ) } , f o r c e U p d a t e : f u n c t i o n ( ) { i f ( ! c ) { v a r   t = a . e l e m e n t s , e = t . r e f e r e n c e , i = t . p o p p e r ; i f ( R e ( e , i ) ) { a . r e c t s = { r e f e r e n c e : M e ( e , t e ( i ) , " f i x e d " = = = a . o p t i o n s . s t r a t e g y ) , p o p p e r : K t ( i ) } , a . r e s e t = ! 1 , a . p l a c e m e n t = a . o p t i o n s . p l a c e m e n t , a . o r d e r e d M o d i f i e r s . f o r E a c h ( ( f u n c t i o n ( t ) { r e t u r n   a . m o d i f i e r s D a t a [ t . n a m e ] = O b j e c t . a s s i g n ( { } , t . d a t a ) } ) ) ; f o r ( v a r   n = 0 ; n < a . o r d e r e d M o d i f i e r s . l e n g t h ; n + + ) i f ( ! 0 ! = = a . r e s e t ) { v a r   s = a . o r d e r e d M o d i f i e r s [ n ] , o = s . f n , r = s . o p t i o n s , l = v o i d   0 = = = r ? { } : r , d = s . n a m e ; " f u n c t i o n " = = t y p e o f   o & & ( a = o ( { s t a t e : a , o p t i o n s : l , n a m e : d , i n s t a n c e : h } ) | | a ) } e l s e   a . r e s e t = ! 1 , n = - 1 } } } , u p d a t e : ( s = f u n c t i o n ( ) { r e t u r n   n e w   P r o m i s e ( ( f u n c t i o n ( t ) { h . f o r c e U p d a t e ( ) , t ( a ) } ) ) } , f u n c t i o n ( ) { r e t u r n   r | | ( r = n e w   P r o m i s e ( ( f u n c t i o n ( t ) { P r o m i s e . r e s o l v e ( ) . t h e n ( ( f u n c t i o n ( ) { r = v o i d   0 , t ( s ( ) ) } ) ) } ) ) ) , r } ) , d e s t r o y : f u n c t i o n ( ) { d ( ) , c = ! 0 } } ; i f ( ! R e ( t , e ) ) r e t u r n   h ; f u n c t i o n   d ( ) { l . f o r E a c h ( ( f u n c t i o n ( t ) { r e t u r n   t ( ) } ) ) , l = [ ] } r e t u r n   h . s e t O p t i o n s ( i ) . t h e n ( ( f u n c t i o n ( t ) { ! c & & i . o n F i r s t U p d a t e & & i . o n F i r s t U p d a t e ( t ) } ) ) , h } } v a r   $ e = W e ( ) , z e = W e ( { d e f a u l t M o d i f i e r s : [ p e , P e , u e , F t ] } ) , q e = W e ( { d e f a u l t M o d i f i e r s : [ p e , P e , u e , F t , I e , x e , j e , l e , N e ] } ) ; c o n s t   F e = O b j e c t . f r e e z e ( { _ _ p r o t o _ _ : n u l l , p o p p e r G e n e r a t o r : W e , d e t e c t O v e r f l o w : k e , c r e a t e P o p p e r B a s e : $ e , c r e a t e P o p p e r : q e , c r e a t e P o p p e r L i t e : z e , t o p : m t , b o t t o m : g t , r i g h t : _ t , l e f t : b t , a u t o : v t , b a s e P l a c e m e n t s : y t , s t a r t : w t , e n d : E t , c l i p p i n g P a r e n t s : A t , v i e w p o r t : T t , p o p p e r : O t , r e f e r e n c e : C t , v a r i a t i o n P l a c e m e n t s : k t , p l a c e m e n t s : L t , b e f o r e R e a d : x t , r e a d : D t , a f t e r R e a d : S t , b e f o r e M a i n : N t , m a i n : I t , a f t e r M a i n : P t , b e f o r e W r i t e : j t , w r i t e : M t , a f t e r W r i t e : H t , m o d i f i e r P h a s e s : B t , a p p l y S t y l e s : F t , a r r o w : l e , c o m p u t e S t y l e s : u e , e v e n t L i s t e n e r s : p e , f l i p : x e , h i d e : N e , o f f s e t : I e , p o p p e r O f f s e t s : P e , p r e v e n t O v e r f l o w : j e } ) , U e = " d r o p d o w n " , V e = " E s c a p e " , K e = " S p a c e " , X e = " A r r o w U p " , Y e = " A r r o w D o w n " , Q e = n e w   R e g E x p ( " A r r o w U p | A r r o w D o w n | E s c a p e " ) , G e = " c l i c k . b s . d r o p d o w n . d a t a - a p i " , Z e = " k e y d o w n . b s . d r o p d o w n . d a t a - a p i " , J e = " s h o w " , t i = ' [ d a t a - b s - t o g g l e = " d r o p d o w n " ] ' , e i = " . d r o p d o w n - m e n u " , i i = m ( ) ? " t o p - e n d " : " t o p - s t a r t " , n i = m ( ) ? " t o p - s t a r t " : " t o p - e n d " , s i = m ( ) ? " b o t t o m - e n d " : " b o t t o m - s t a r t " , o i = m ( ) ? " b o t t o m - s t a r t " : " b o t t o m - e n d " , r i = m ( ) ? " l e f t - s t a r t " : " r i g h t - s t a r t " , a i = m ( ) ? " r i g h t - s t a r t " : " l e f t - s t a r t " , l i = { o f f s e t : [ 0 , 2 ] , b o u n d a r y : " c l i p p i n g P a r e n t s " , r e f e r e n c e : " t o g g l e " , d i s p l a y : " d y n a m i c " , p o p p e r C o n f i g : n u l l , a u t o C l o s e : ! 0 } , c i = { o f f s e t : " ( a r r a y | s t r i n g | f u n c t i o n ) " , b o u n d a r y : " ( s t r i n g | e l e m e n t ) " , r e f e r e n c e : " ( s t r i n g | e l e m e n t | o b j e c t ) " , d i s p l a y : " s t r i n g " , p o p p e r C o n f i g : " ( n u l l | o b j e c t | f u n c t i o n ) " , a u t o C l o s e : " ( b o o l e a n | s t r i n g ) " } ; c l a s s   h i   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ p o p p e r = n u l l , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ m e n u = t h i s . _ g e t M e n u E l e m e n t ( ) , t h i s . _ i n N a v b a r = t h i s . _ d e t e c t N a v b a r ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   l i } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   c i } s t a t i c   g e t   N A M E ( ) { r e t u r n   U e } t o g g l e ( ) { r e t u r n   t h i s . _ i s S h o w n ( ) ? t h i s . h i d e ( ) : t h i s . s h o w ( ) } s h o w ( ) { i f ( c ( t h i s . _ e l e m e n t ) | | t h i s . _ i s S h o w n ( t h i s . _ m e n u ) ) r e t u r n ; c o n s t   t = { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . d r o p d o w n " , t ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t   e = h i . g e t P a r e n t F r o m E l e m e n t ( t h i s . _ e l e m e n t ) ; t h i s . _ i n N a v b a r ? U . s e t D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " , " n o n e " ) : t h i s . _ c r e a t e P o p p e r ( e ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & ! e . c l o s e s t ( " . n a v b a r - n a v " ) & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > j . o n ( t , " m o u s e o v e r " , d ) ) ) , t h i s . _ e l e m e n t . f o c u s ( ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 0 ) , t h i s . _ m e n u . c l a s s L i s t . a d d ( J e ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( J e ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . d r o p d o w n " , t ) } h i d e ( ) { i f ( c ( t h i s . _ e l e m e n t ) | | ! t h i s . _ i s S h o w n ( t h i s . _ m e n u ) ) r e t u r n ; c o n s t   t = { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ; t h i s . _ c o m p l e t e H i d e ( t ) } d i s p o s e ( ) { t h i s . _ p o p p e r & & t h i s . _ p o p p e r . d e s t r o y ( ) , s u p e r . d i s p o s e ( ) } u p d a t e ( ) { t h i s . _ i n N a v b a r = t h i s . _ d e t e c t N a v b a r ( ) , t h i s . _ p o p p e r & & t h i s . _ p o p p e r . u p d a t e ( ) } _ c o m p l e t e H i d e ( t ) { j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . d r o p d o w n " , t ) . d e f a u l t P r e v e n t e d | | ( " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > j . o f f ( t , " m o u s e o v e r " , d ) ) ) , t h i s . _ p o p p e r & & t h i s . _ p o p p e r . d e s t r o y ( ) , t h i s . _ m e n u . c l a s s L i s t . r e m o v e ( J e ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( J e ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , " f a l s e " ) , U . r e m o v e D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . d r o p d o w n " , t ) ) } _ g e t C o n f i g ( t ) { i f ( t = { . . . t h i s . c o n s t r u c t o r . D e f a u l t , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . t } , a ( U e , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , " o b j e c t " = = t y p e o f   t . r e f e r e n c e & & ! o ( t . r e f e r e n c e ) & & " f u n c t i o n " ! = t y p e o f   t . r e f e r e n c e . g e t B o u n d i n g C l i e n t R e c t ) t h r o w   n e w   T y p e E r r o r ( ` $ { U e . t o U p p e r C a s e ( ) } :   O p t i o n   " r e f e r e n c e "   p r o v i d e d   t y p e   " o b j e c t "   w i t h o u t   a   r e q u i r e d   " g e t B o u n d i n g C l i e n t R e c t "   m e t h o d . ` ) ; r e t u r n   t } _ c r e a t e P o p p e r ( t ) { i f ( v o i d   0 = = = F e ) t h r o w   n e w   T y p e E r r o r ( " B o o t s t r a p ' s   d r o p d o w n s   r e q u i r e   P o p p e r   ( h t t p s : / / p o p p e r . j s . o r g ) " ) ; l e t   e = t h i s . _ e l e m e n t ; " p a r e n t " = = = t h i s . _ c o n f i g . r e f e r e n c e ? e = t : o ( t h i s . _ c o n f i g . r e f e r e n c e ) ? e = r ( t h i s . _ c o n f i g . r e f e r e n c e ) : " o b j e c t " = = t y p e o f   t h i s . _ c o n f i g . r e f e r e n c e & & ( e = t h i s . _ c o n f i g . r e f e r e n c e ) ; c o n s t   i = t h i s . _ g e t P o p p e r C o n f i g ( ) , n = i . m o d i f i e r s . f i n d ( ( t = > " a p p l y S t y l e s " = = = t . n a m e & & ! 1 = = = t . e n a b l e d ) ) ; t h i s . _ p o p p e r = q e ( e , t h i s . _ m e n u , i ) , n & & U . s e t D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " , " s t a t i c " ) } _ i s S h o w n ( t = t h i s . _ e l e m e n t ) { r e t u r n   t . c l a s s L i s t . c o n t a i n s ( J e ) } _ g e t M e n u E l e m e n t ( ) { r e t u r n   V . n e x t ( t h i s . _ e l e m e n t , e i ) [ 0 ] } _ g e t P l a c e m e n t ( ) { c o n s t   t = t h i s . _ e l e m e n t . p a r e n t N o d e ; i f ( t . c l a s s L i s t . c o n t a i n s ( " d r o p e n d " ) ) r e t u r n   r i ; i f ( t . c l a s s L i s t . c o n t a i n s ( " d r o p s t a r t " ) ) r e t u r n   a i ; c o n s t   e = " e n d " = = = g e t C o m p u t e d S t y l e ( t h i s . _ m e n u ) . g e t P r o p e r t y V a l u e ( " - - b s - p o s i t i o n " ) . t r i m ( ) ; r e t u r n   t . c l a s s L i s t . c o n t a i n s ( " d r o p u p " ) ? e ? n i : i i : e ? o i : s i } _ d e t e c t N a v b a r ( ) { r e t u r n   n u l l ! = = t h i s . _ e l e m e n t . c l o s e s t ( " . n a v b a r " ) } _ g e t O f f s e t ( ) { c o n s t { o f f s e t : t } = t h i s . _ c o n f i g ; r e t u r n " s t r i n g " = = t y p e o f   t ? t . s p l i t ( " , " ) . m a p ( ( t = > N u m b e r . p a r s e I n t ( t , 1 0 ) ) ) : " f u n c t i o n " = = t y p e o f   t ? e = > t ( e , t h i s . _ e l e m e n t ) : t } _ g e t P o p p e r C o n f i g ( ) { c o n s t   t = { p l a c e m e n t : t h i s . _ g e t P l a c e m e n t ( ) , m o d i f i e r s : [ { n a m e : " p r e v e n t O v e r f l o w " , o p t i o n s : { b o u n d a r y : t h i s . _ c o n f i g . b o u n d a r y } } , { n a m e : " o f f s e t " , o p t i o n s : { o f f s e t : t h i s . _ g e t O f f s e t ( ) } } ] } ; r e t u r n " s t a t i c " = = = t h i s . _ c o n f i g . d i s p l a y & & ( t . m o d i f i e r s = [ { n a m e : " a p p l y S t y l e s " , e n a b l e d : ! 1 } ] ) , { . . . t , . . . " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p o p p e r C o n f i g ? t h i s . _ c o n f i g . p o p p e r C o n f i g ( t ) : t h i s . _ c o n f i g . p o p p e r C o n f i g } } _ s e l e c t M e n u I t e m ( { k e y : t , t a r g e t : e } ) { c o n s t   i = V . f i n d ( " . d r o p d o w n - m e n u   . d r o p d o w n - i t e m : n o t ( . d i s a b l e d ) : n o t ( : d i s a b l e d ) " , t h i s . _ m e n u ) . f i l t e r ( l ) ; i . l e n g t h & & v ( i , e , t = = = Y e , ! i . i n c l u d e s ( e ) ) . f o c u s ( ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = h i . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } s t a t i c   c l e a r M e n u s ( t ) { i f ( t & & ( 2 = = = t . b u t t o n | | " k e y u p " = = = t . t y p e & & " T a b " ! = = t . k e y ) ) r e t u r n ; c o n s t   e = V . f i n d ( t i ) ; f o r ( l e t   i = 0 , n = e . l e n g t h ; i < n ; i + + ) { c o n s t   n = h i . g e t I n s t a n c e ( e [ i ] ) ; i f ( ! n | | ! 1 = = = n . _ c o n f i g . a u t o C l o s e ) c o n t i n u e ; i f ( ! n . _ i s S h o w n ( ) ) c o n t i n u e ; c o n s t   s = { r e l a t e d T a r g e t : n . _ e l e m e n t } ; i f ( t ) { c o n s t   e = t . c o m p o s e d P a t h ( ) , i = e . i n c l u d e s ( n . _ m e n u ) ; i f ( e . i n c l u d e s ( n . _ e l e m e n t ) | | " i n s i d e " = = = n . _ c o n f i g . a u t o C l o s e & & ! i | | " o u t s i d e " = = = n . _ c o n f i g . a u t o C l o s e & & i ) c o n t i n u e ; i f ( n . _ m e n u . c o n t a i n s ( t . t a r g e t ) & & ( " k e y u p " = = = t . t y p e & & " T a b " = = = t . k e y | | / i n p u t | s e l e c t | o p t i o n | t e x t a r e a | f o r m / i . t e s t ( t . t a r g e t . t a g N a m e ) ) ) c o n t i n u e ; " c l i c k " = = = t . t y p e & & ( s . c l i c k E v e n t = t ) } n . _ c o m p l e t e H i d e ( s ) } } s t a t i c   g e t P a r e n t F r o m E l e m e n t ( t ) { r e t u r n   n ( t ) | | t . p a r e n t N o d e } s t a t i c   d a t a A p i K e y d o w n H a n d l e r ( t ) { i f ( / i n p u t | t e x t a r e a / i . t e s t ( t . t a r g e t . t a g N a m e ) ? t . k e y = = = K e | | t . k e y ! = = V e & & ( t . k e y ! = = Y e & & t . k e y ! = = X e | | t . t a r g e t . c l o s e s t ( e i ) ) : ! Q e . t e s t ( t . k e y ) ) r e t u r n ; c o n s t   e = t h i s . c l a s s L i s t . c o n t a i n s ( J e ) ; i f ( ! e & & t . k e y = = = V e ) r e t u r n ; i f ( t . p r e v e n t D e f a u l t ( ) , t . s t o p P r o p a g a t i o n ( ) , c ( t h i s ) ) r e t u r n ; c o n s t   i = t h i s . m a t c h e s ( t i ) ? t h i s : V . p r e v ( t h i s , t i ) [ 0 ] , n = h i . g e t O r C r e a t e I n s t a n c e ( i ) ; i f ( t . k e y ! = = V e ) r e t u r n   t . k e y = = = X e | | t . k e y = = = Y e ? ( e | | n . s h o w ( ) , v o i d   n . _ s e l e c t M e n u I t e m ( t ) ) : v o i d ( e & & t . k e y ! = = K e | | h i . c l e a r M e n u s ( ) ) ; n . h i d e ( ) } } j . o n ( d o c u m e n t , Z e , t i , h i . d a t a A p i K e y d o w n H a n d l e r ) , j . o n ( d o c u m e n t , Z e , e i , h i . d a t a A p i K e y d o w n H a n d l e r ) , j . o n ( d o c u m e n t , G e , h i . c l e a r M e n u s ) , j . o n ( d o c u m e n t , " k e y u p . b s . d r o p d o w n . d a t a - a p i " , h i . c l e a r M e n u s ) , j . o n ( d o c u m e n t , G e , t i , ( f u n c t i o n ( t ) { t . p r e v e n t D e f a u l t ( ) , h i . g e t O r C r e a t e I n s t a n c e ( t h i s ) . t o g g l e ( ) } ) ) , g ( h i ) ; c o n s t   d i = " . f i x e d - t o p ,   . f i x e d - b o t t o m ,   . i s - f i x e d ,   . s t i c k y - t o p " , u i = " . s t i c k y - t o p " ; c l a s s   f i { c o n s t r u c t o r ( ) { t h i s . _ e l e m e n t = d o c u m e n t . b o d y } g e t W i d t h ( ) { c o n s t   t = d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ; r e t u r n   M a t h . a b s ( w i n d o w . i n n e r W i d t h - t ) } h i d e ( ) { c o n s t   t = t h i s . g e t W i d t h ( ) ; t h i s . _ d i s a b l e O v e r F l o w ( ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " p a d d i n g R i g h t " , ( e = > e + t ) ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( d i , " p a d d i n g R i g h t " , ( e = > e + t ) ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( u i , " m a r g i n R i g h t " , ( e = > e - t ) ) } _ d i s a b l e O v e r F l o w ( ) { t h i s . _ s a v e I n i t i a l A t t r i b u t e ( t h i s . _ e l e m e n t , " o v e r f l o w " ) , t h i s . _ e l e m e n t . s t y l e . o v e r f l o w = " h i d d e n " } _ s e t E l e m e n t A t t r i b u t e s ( t , e , i ) { c o n s t   n = t h i s . g e t W i d t h ( ) ; t h i s . _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , ( t = > { i f ( t ! = = t h i s . _ e l e m e n t & & w i n d o w . i n n e r W i d t h > t . c l i e n t W i d t h + n ) r e t u r n ; t h i s . _ s a v e I n i t i a l A t t r i b u t e ( t , e ) ; c o n s t   s = w i n d o w . g e t C o m p u t e d S t y l e ( t ) [ e ] ; t . s t y l e [ e ] = ` $ { i ( N u m b e r . p a r s e F l o a t ( s ) ) } p x ` } ) ) } r e s e t ( ) { t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " o v e r f l o w " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " p a d d i n g R i g h t " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( d i , " p a d d i n g R i g h t " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( u i , " m a r g i n R i g h t " ) } _ s a v e I n i t i a l A t t r i b u t e ( t , e ) { c o n s t   i = t . s t y l e [ e ] ; i & & U . s e t D a t a A t t r i b u t e ( t , e , i ) } _ r e s e t E l e m e n t A t t r i b u t e s ( t , e ) { t h i s . _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , ( t = > { c o n s t   i = U . g e t D a t a A t t r i b u t e ( t , e ) ; v o i d   0 = = = i ? t . s t y l e . r e m o v e P r o p e r t y ( e ) : ( U . r e m o v e D a t a A t t r i b u t e ( t , e ) , t . s t y l e [ e ] = i ) } ) ) } _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , e ) { o ( t ) ? e ( t ) : V . f i n d ( t , t h i s . _ e l e m e n t ) . f o r E a c h ( e ) } i s O v e r f l o w i n g ( ) { r e t u r n   t h i s . g e t W i d t h ( ) > 0 } } c o n s t   p i = { c l a s s N a m e : " m o d a l - b a c k d r o p " , i s V i s i b l e : ! 0 , i s A n i m a t e d : ! 1 , r o o t E l e m e n t : " b o d y " , c l i c k C a l l b a c k : n u l l } , m i = { c l a s s N a m e : " s t r i n g " , i s V i s i b l e : " b o o l e a n " , i s A n i m a t e d : " b o o l e a n " , r o o t E l e m e n t : " ( e l e m e n t | s t r i n g ) " , c l i c k C a l l b a c k : " ( f u n c t i o n | n u l l ) " } , g i = " s h o w " , _ i = " m o u s e d o w n . b s . b a c k d r o p " ; c l a s s   b i { c o n s t r u c t o r ( t ) { t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( t ) , t h i s . _ i s A p p e n d e d = ! 1 , t h i s . _ e l e m e n t = n u l l } s h o w ( t ) { t h i s . _ c o n f i g . i s V i s i b l e ? ( t h i s . _ a p p e n d ( ) , t h i s . _ c o n f i g . i s A n i m a t e d & & u ( t h i s . _ g e t E l e m e n t ( ) ) , t h i s . _ g e t E l e m e n t ( ) . c l a s s L i s t . a d d ( g i ) , t h i s . _ e m u l a t e A n i m a t i o n ( ( ( ) = > { _ ( t ) } ) ) ) : _ ( t ) } h i d e ( t ) { t h i s . _ c o n f i g . i s V i s i b l e ? ( t h i s . _ g e t E l e m e n t ( ) . c l a s s L i s t . r e m o v e ( g i ) , t h i s . _ e m u l a t e A n i m a t i o n ( ( ( ) = > { t h i s . d i s p o s e ( ) , _ ( t ) } ) ) ) : _ ( t ) } _ g e t E l e m e n t ( ) { i f ( ! t h i s . _ e l e m e n t ) { c o n s t   t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; t . c l a s s N a m e = t h i s . _ c o n f i g . c l a s s N a m e , t h i s . _ c o n f i g . i s A n i m a t e d & & t . c l a s s L i s t . a d d ( " f a d e " ) , t h i s . _ e l e m e n t = t } r e t u r n   t h i s . _ e l e m e n t } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . p i , . . . " o b j e c t " = = t y p e o f   t ? t : { } } ) . r o o t E l e m e n t = r ( t . r o o t E l e m e n t ) , a ( " b a c k d r o p " , t , m i ) , t } _ a p p e n d ( ) { t h i s . _ i s A p p e n d e d | | ( t h i s . _ c o n f i g . r o o t E l e m e n t . a p p e n d ( t h i s . _ g e t E l e m e n t ( ) ) , j . o n ( t h i s . _ g e t E l e m e n t ( ) , _ i , ( ( ) = > { _ ( t h i s . _ c o n f i g . c l i c k C a l l b a c k ) } ) ) , t h i s . _ i s A p p e n d e d = ! 0 ) } d i s p o s e ( ) { t h i s . _ i s A p p e n d e d & & ( j . o f f ( t h i s . _ e l e m e n t , _ i ) , t h i s . _ e l e m e n t . r e m o v e ( ) , t h i s . _ i s A p p e n d e d = ! 1 ) } _ e m u l a t e A n i m a t i o n ( t ) { b ( t , t h i s . _ g e t E l e m e n t ( ) , t h i s . _ c o n f i g . i s A n i m a t e d ) } } c o n s t   v i = { t r a p E l e m e n t : n u l l , a u t o f o c u s : ! 0 } , y i = { t r a p E l e m e n t : " e l e m e n t " , a u t o f o c u s : " b o o l e a n " } , w i = " . b s . f o c u s t r a p " , E i = " b a c k w a r d " ; c l a s s   A i { c o n s t r u c t o r ( t ) { t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( t ) , t h i s . _ i s A c t i v e = ! 1 , t h i s . _ l a s t T a b N a v D i r e c t i o n = n u l l } a c t i v a t e ( ) { c o n s t { t r a p E l e m e n t : t , a u t o f o c u s : e } = t h i s . _ c o n f i g ; t h i s . _ i s A c t i v e | | ( e & & t . f o c u s ( ) , j . o f f ( d o c u m e n t , w i ) , j . o n ( d o c u m e n t , " f o c u s i n . b s . f o c u s t r a p " , ( t = > t h i s . _ h a n d l e F o c u s i n ( t ) ) ) , j . o n ( d o c u m e n t , " k e y d o w n . t a b . b s . f o c u s t r a p " , ( t = > t h i s . _ h a n d l e K e y d o w n ( t ) ) ) , t h i s . _ i s A c t i v e = ! 0 ) } d e a c t i v a t e ( ) { t h i s . _ i s A c t i v e & & ( t h i s . _ i s A c t i v e = ! 1 , j . o f f ( d o c u m e n t , w i ) ) } _ h a n d l e F o c u s i n ( t ) { c o n s t { t a r g e t : e } = t , { t r a p E l e m e n t : i } = t h i s . _ c o n f i g ; i f ( e = = = d o c u m e n t | | e = = = i | | i . c o n t a i n s ( e ) ) r e t u r n ; c o n s t   n = V . f o c u s a b l e C h i l d r e n ( i ) ; 0 = = = n . l e n g t h ? i . f o c u s ( ) : t h i s . _ l a s t T a b N a v D i r e c t i o n = = = E i ? n [ n . l e n g t h - 1 ] . f o c u s ( ) : n [ 0 ] . f o c u s ( ) } _ h a n d l e K e y d o w n ( t ) { " T a b " = = = t . k e y & & ( t h i s . _ l a s t T a b N a v D i r e c t i o n = t . s h i f t K e y ? E i : " f o r w a r d " ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . v i , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( " f o c u s t r a p " , t , y i ) , t } } c o n s t   T i = " m o d a l " , O i = " E s c a p e " , C i = { b a c k d r o p : ! 0 , k e y b o a r d : ! 0 , f o c u s : ! 0 } , k i = { b a c k d r o p : " ( b o o l e a n | s t r i n g ) " , k e y b o a r d : " b o o l e a n " , f o c u s : " b o o l e a n " } , L i = " h i d d e n . b s . m o d a l " , x i = " s h o w . b s . m o d a l " , D i = " r e s i z e . b s . m o d a l " , S i = " c l i c k . d i s m i s s . b s . m o d a l " , N i = " k e y d o w n . d i s m i s s . b s . m o d a l " , I i = " m o u s e d o w n . d i s m i s s . b s . m o d a l " , P i = " m o d a l - o p e n " , j i = " s h o w " , M i = " m o d a l - s t a t i c " ; c l a s s   H i   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ d i a l o g = V . f i n d O n e ( " . m o d a l - d i a l o g " , t h i s . _ e l e m e n t ) , t h i s . _ b a c k d r o p = t h i s . _ i n i t i a l i z e B a c k D r o p ( ) , t h i s . _ f o c u s t r a p = t h i s . _ i n i t i a l i z e F o c u s T r a p ( ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 1 , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ s c r o l l B a r = n e w   f i } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   C i } s t a t i c   g e t   N A M E ( ) { r e t u r n   T i } t o g g l e ( t ) { r e t u r n   t h i s . _ i s S h o w n ? t h i s . h i d e ( ) : t h i s . s h o w ( t ) } s h o w ( t ) { t h i s . _ i s S h o w n | | t h i s . _ i s T r a n s i t i o n i n g | | j . t r i g g e r ( t h i s . _ e l e m e n t , x i , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ i s S h o w n = ! 0 , t h i s . _ i s A n i m a t e d ( ) & & ( t h i s . _ i s T r a n s i t i o n i n g = ! 0 ) , t h i s . _ s c r o l l B a r . h i d e ( ) , d o c u m e n t . b o d y . c l a s s L i s t . a d d ( P i ) , t h i s . _ a d j u s t D i a l o g ( ) , t h i s . _ s e t E s c a p e E v e n t ( ) , t h i s . _ s e t R e s i z e E v e n t ( ) , j . o n ( t h i s . _ d i a l o g , I i , ( ( ) = > { j . o n e ( t h i s . _ e l e m e n t , " m o u s e u p . d i s m i s s . b s . m o d a l " , ( t = > { t . t a r g e t = = = t h i s . _ e l e m e n t & & ( t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 0 ) } ) ) } ) ) , t h i s . _ s h o w B a c k d r o p ( ( ( ) = > t h i s . _ s h o w E l e m e n t ( t ) ) ) ) } h i d e ( ) { i f ( ! t h i s . _ i s S h o w n | | t h i s . _ i s T r a n s i t i o n i n g ) r e t u r n ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . m o d a l " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ i s S h o w n = ! 1 ; c o n s t   t = t h i s . _ i s A n i m a t e d ( ) ; t & & ( t h i s . _ i s T r a n s i t i o n i n g = ! 0 ) , t h i s . _ s e t E s c a p e E v e n t ( ) , t h i s . _ s e t R e s i z e E v e n t ( ) , t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( j i ) , j . o f f ( t h i s . _ e l e m e n t , S i ) , j . o f f ( t h i s . _ d i a l o g , I i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > t h i s . _ h i d e M o d a l ( ) ) , t h i s . _ e l e m e n t , t ) } d i s p o s e ( ) { [ w i n d o w , t h i s . _ d i a l o g ] . f o r E a c h ( ( t = > j . o f f ( t , " . b s . m o d a l " ) ) ) , t h i s . _ b a c k d r o p . d i s p o s e ( ) , t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , s u p e r . d i s p o s e ( ) } h a n d l e U p d a t e ( ) { t h i s . _ a d j u s t D i a l o g ( ) } _ i n i t i a l i z e B a c k D r o p ( ) { r e t u r n   n e w   b i ( { i s V i s i b l e : B o o l e a n ( t h i s . _ c o n f i g . b a c k d r o p ) , i s A n i m a t e d : t h i s . _ i s A n i m a t e d ( ) } ) } _ i n i t i a l i z e F o c u s T r a p ( ) { r e t u r n   n e w   A i ( { t r a p E l e m e n t : t h i s . _ e l e m e n t } ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . C i , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( T i , t , k i ) , t } _ s h o w E l e m e n t ( t ) { c o n s t   e = t h i s . _ i s A n i m a t e d ( ) , i = V . f i n d O n e ( " . m o d a l - b o d y " , t h i s . _ d i a l o g ) ; t h i s . _ e l e m e n t . p a r e n t N o d e & & t h i s . _ e l e m e n t . p a r e n t N o d e . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E | | d o c u m e n t . b o d y . a p p e n d ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - h i d d e n " ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - m o d a l " , ! 0 ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " r o l e " , " d i a l o g " ) , t h i s . _ e l e m e n t . s c r o l l T o p = 0 , i & & ( i . s c r o l l T o p = 0 ) , e & & u ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( j i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ c o n f i g . f o c u s & & t h i s . _ f o c u s t r a p . a c t i v a t e ( ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . m o d a l " , { r e l a t e d T a r g e t : t } ) } ) , t h i s . _ d i a l o g , e ) } _ s e t E s c a p e E v e n t ( ) { t h i s . _ i s S h o w n ? j . o n ( t h i s . _ e l e m e n t , N i , ( t = > { t h i s . _ c o n f i g . k e y b o a r d & & t . k e y = = = O i ? ( t . p r e v e n t D e f a u l t ( ) , t h i s . h i d e ( ) ) : t h i s . _ c o n f i g . k e y b o a r d | | t . k e y ! = = O i | | t h i s . _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) } ) ) : j . o f f ( t h i s . _ e l e m e n t , N i ) } _ s e t R e s i z e E v e n t ( ) { t h i s . _ i s S h o w n ? j . o n ( w i n d o w , D i , ( ( ) = > t h i s . _ a d j u s t D i a l o g ( ) ) ) : j . o f f ( w i n d o w , D i ) } _ h i d e M o d a l ( ) { t h i s . _ e l e m e n t . s t y l e . d i s p l a y = " n o n e " , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - h i d d e n " , ! 0 ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - m o d a l " ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " r o l e " ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ b a c k d r o p . h i d e ( ( ( ) = > { d o c u m e n t . b o d y . c l a s s L i s t . r e m o v e ( P i ) , t h i s . _ r e s e t A d j u s t m e n t s ( ) , t h i s . _ s c r o l l B a r . r e s e t ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , L i ) } ) ) } _ s h o w B a c k d r o p ( t ) { j . o n ( t h i s . _ e l e m e n t , S i , ( t = > { t h i s . _ i g n o r e B a c k d r o p C l i c k ? t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 1 : t . t a r g e t = = = t . c u r r e n t T a r g e t & & ( ! 0 = = = t h i s . _ c o n f i g . b a c k d r o p ? t h i s . h i d e ( ) : " s t a t i c " = = = t h i s . _ c o n f i g . b a c k d r o p & & t h i s . _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) ) } ) ) , t h i s . _ b a c k d r o p . s h o w ( t ) } _ i s A n i m a t e d ( ) { r e t u r n   t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " f a d e " ) } _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) { i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e P r e v e n t e d . b s . m o d a l " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t { c l a s s L i s t : t , s c r o l l H e i g h t : e , s t y l e : i } = t h i s . _ e l e m e n t , n = e > d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t ; ! n & & " h i d d e n " = = = i . o v e r f l o w Y | | t . c o n t a i n s ( M i ) | | ( n | | ( i . o v e r f l o w Y = " h i d d e n " ) , t . a d d ( M i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t . r e m o v e ( M i ) , n | | t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { i . o v e r f l o w Y = " " } ) , t h i s . _ d i a l o g ) } ) , t h i s . _ d i a l o g ) , t h i s . _ e l e m e n t . f o c u s ( ) ) } _ a d j u s t D i a l o g ( ) { c o n s t   t = t h i s . _ e l e m e n t . s c r o l l H e i g h t > d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t , e = t h i s . _ s c r o l l B a r . g e t W i d t h ( ) , i = e > 0 ; ( ! i & & t & & ! m ( ) | | i & & ! t & & m ( ) ) & & ( t h i s . _ e l e m e n t . s t y l e . p a d d i n g L e f t = ` $ { e } p x ` ) , ( i & & ! t & & ! m ( ) | | ! i & & t & & m ( ) ) & & ( t h i s . _ e l e m e n t . s t y l e . p a d d i n g R i g h t = ` $ { e } p x ` ) } _ r e s e t A d j u s t m e n t s ( ) { t h i s . _ e l e m e n t . s t y l e . p a d d i n g L e f t = " " , t h i s . _ e l e m e n t . s t y l e . p a d d i n g R i g h t = " " } s t a t i c   j Q u e r y I n t e r f a c e ( t , e ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   i = H i . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = i [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; i [ t ] ( e ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . m o d a l . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " m o d a l " ] ' , ( f u n c t i o n ( t ) { c o n s t   e = n ( t h i s ) ; [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , j . o n e ( e , x i , ( t = > { t . d e f a u l t P r e v e n t e d | | j . o n e ( e , L i , ( ( ) = > { l ( t h i s ) & & t h i s . f o c u s ( ) } ) ) } ) ) ; c o n s t   i = V . f i n d O n e ( " . m o d a l . s h o w " ) ; i & & H i . g e t I n s t a n c e ( i ) . h i d e ( ) , H i . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( t h i s ) } ) ) , R ( H i ) , g ( H i ) ; c o n s t   B i = " o f f c a n v a s " , R i = { b a c k d r o p : ! 0 , k e y b o a r d : ! 0 , s c r o l l : ! 1 } , W i = { b a c k d r o p : " b o o l e a n " , k e y b o a r d : " b o o l e a n " , s c r o l l : " b o o l e a n " } , $ i = " s h o w " , z i = " . o f f c a n v a s . s h o w " , q i = " h i d d e n . b s . o f f c a n v a s " ; c l a s s   F i   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ b a c k d r o p = t h i s . _ i n i t i a l i z e B a c k D r o p ( ) , t h i s . _ f o c u s t r a p = t h i s . _ i n i t i a l i z e F o c u s T r a p ( ) , t h i s . _ a d d E v e n t L i s t e n e r s ( ) } s t a t i c   g e t   N A M E ( ) { r e t u r n   B i } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   R i } t o g g l e ( t ) { r e t u r n   t h i s . _ i s S h o w n ? t h i s . h i d e ( ) : t h i s . s h o w ( t ) } s h o w ( t ) { t h i s . _ i s S h o w n | | j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . o f f c a n v a s " , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ i s S h o w n = ! 0 , t h i s . _ e l e m e n t . s t y l e . v i s i b i l i t y = " v i s i b l e " , t h i s . _ b a c k d r o p . s h o w ( ) , t h i s . _ c o n f i g . s c r o l l | | ( n e w   f i ) . h i d e ( ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - h i d d e n " ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - m o d a l " , ! 0 ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " r o l e " , " d i a l o g " ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( $ i ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ c o n f i g . s c r o l l | | t h i s . _ f o c u s t r a p . a c t i v a t e ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . o f f c a n v a s " , { r e l a t e d T a r g e t : t } ) } ) , t h i s . _ e l e m e n t , ! 0 ) ) } h i d e ( ) { t h i s . _ i s S h o w n & & ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . o f f c a n v a s " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , t h i s . _ e l e m e n t . b l u r ( ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( $ i ) , t h i s . _ b a c k d r o p . h i d e ( ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - h i d d e n " , ! 0 ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - m o d a l " ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " r o l e " ) , t h i s . _ e l e m e n t . s t y l e . v i s i b i l i t y = " h i d d e n " , t h i s . _ c o n f i g . s c r o l l | | ( n e w   f i ) . r e s e t ( ) , j . t r i g g e r ( t h i s . _ e l e m e n t , q i ) } ) , t h i s . _ e l e m e n t , ! 0 ) ) ) } d i s p o s e ( ) { t h i s . _ b a c k d r o p . d i s p o s e ( ) , t h i s . _ f o c u s t r a p . d e a c t i v a t e ( ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . R i , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , a ( B i , t , W i ) , t } _ i n i t i a l i z e B a c k D r o p ( ) { r e t u r n   n e w   b i ( { c l a s s N a m e : " o f f c a n v a s - b a c k d r o p " , i s V i s i b l e : t h i s . _ c o n f i g . b a c k d r o p , i s A n i m a t e d : ! 0 , r o o t E l e m e n t : t h i s . _ e l e m e n t . p a r e n t N o d e , c l i c k C a l l b a c k : ( ) = > t h i s . h i d e ( ) } ) } _ i n i t i a l i z e F o c u s T r a p ( ) { r e t u r n   n e w   A i ( { t r a p E l e m e n t : t h i s . _ e l e m e n t } ) } _ a d d E v e n t L i s t e n e r s ( ) { j . o n ( t h i s . _ e l e m e n t , " k e y d o w n . d i s m i s s . b s . o f f c a n v a s " , ( t = > { t h i s . _ c o n f i g . k e y b o a r d & & " E s c a p e " = = = t . k e y & & t h i s . h i d e ( ) } ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = F i . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] | | t . s t a r t s W i t h ( " _ " ) | | " c o n s t r u c t o r " = = = t ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . o f f c a n v a s . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " o f f c a n v a s " ] ' , ( f u n c t i o n ( t ) { c o n s t   e = n ( t h i s ) ; i f ( [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , c ( t h i s ) ) r e t u r n ; j . o n e ( e , q i , ( ( ) = > { l ( t h i s ) & & t h i s . f o c u s ( ) } ) ) ; c o n s t   i = V . f i n d O n e ( z i ) ; i & & i ! = = e & & F i . g e t I n s t a n c e ( i ) . h i d e ( ) , F i . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( t h i s ) } ) ) , j . o n ( w i n d o w , " l o a d . b s . o f f c a n v a s . d a t a - a p i " , ( ( ) = > V . f i n d ( z i ) . f o r E a c h ( ( t = > F i . g e t O r C r e a t e I n s t a n c e ( t ) . s h o w ( ) ) ) ) ) , R ( F i ) , g ( F i ) ; c o n s t   U i = n e w   S e t ( [ " b a c k g r o u n d " , " c i t e " , " h r e f " , " i t e m t y p e " , " l o n g d e s c " , " p o s t e r " , " s r c " , " x l i n k : h r e f " ] ) , V i = / ^ ( ? : ( ? : h t t p s ? | m a i l t o | f t p | t e l | f i l e | s m s ) : | [ ^ # & / : ? ] * ( ? : [ # / ? ] | $ ) ) / i , K i = / ^ d a t a : ( ? : i m a g e \ / ( ? : b m p | g i f | j p e g | j p g | p n g | t i f f | w e b p ) | v i d e o \ / ( ? : m p e g | m p 4 | o g g | w e b m ) | a u d i o \ / ( ? : m p 3 | o g a | o g g | o p u s ) ) ; b a s e 6 4 , [ \ d + / a - z ] + = * $ / i , X i = ( t , e ) = > { c o n s t   i = t . n o d e N a m e . t o L o w e r C a s e ( ) ; i f ( e . i n c l u d e s ( i ) ) r e t u r n ! U i . h a s ( i ) | | B o o l e a n ( V i . t e s t ( t . n o d e V a l u e ) | | K i . t e s t ( t . n o d e V a l u e ) ) ; c o n s t   n = e . f i l t e r ( ( t = > t   i n s t a n c e o f   R e g E x p ) ) ; f o r ( l e t   t = 0 , e = n . l e n g t h ; t < e ; t + + ) i f ( n [ t ] . t e s t ( i ) ) r e t u r n ! 0 ; r e t u r n ! 1 } ; f u n c t i o n   Y i ( t , e , i ) { i f ( ! t . l e n g t h ) r e t u r n   t ; i f ( i & & " f u n c t i o n " = = t y p e o f   i ) r e t u r n   i ( t ) ; c o n s t   n = ( n e w   w i n d o w . D O M P a r s e r ) . p a r s e F r o m S t r i n g ( t , " t e x t / h t m l " ) , s = [ ] . c o n c a t ( . . . n . b o d y . q u e r y S e l e c t o r A l l ( " * " ) ) ; f o r ( l e t   t = 0 , i = s . l e n g t h ; t < i ; t + + ) { c o n s t   i = s [ t ] , n = i . n o d e N a m e . t o L o w e r C a s e ( ) ; i f ( ! O b j e c t . k e y s ( e ) . i n c l u d e s ( n ) ) { i . r e m o v e ( ) ; c o n t i n u e } c o n s t   o = [ ] . c o n c a t ( . . . i . a t t r i b u t e s ) , r = [ ] . c o n c a t ( e [ " * " ] | | [ ] , e [ n ] | | [ ] ) ; o . f o r E a c h ( ( t = > { X i ( t , r ) | | i . r e m o v e A t t r i b u t e ( t . n o d e N a m e ) } ) ) } r e t u r n   n . b o d y . i n n e r H T M L } c o n s t   Q i = " t o o l t i p " , G i = n e w   S e t ( [ " s a n i t i z e " , " a l l o w L i s t " , " s a n i t i z e F n " ] ) , Z i = { a n i m a t i o n : " b o o l e a n " , t e m p l a t e : " s t r i n g " , t i t l e : " ( s t r i n g | e l e m e n t | f u n c t i o n ) " , t r i g g e r : " s t r i n g " , d e l a y : " ( n u m b e r | o b j e c t ) " , h t m l : " b o o l e a n " , s e l e c t o r : " ( s t r i n g | b o o l e a n ) " , p l a c e m e n t : " ( s t r i n g | f u n c t i o n ) " , o f f s e t : " ( a r r a y | s t r i n g | f u n c t i o n ) " , c o n t a i n e r : " ( s t r i n g | e l e m e n t | b o o l e a n ) " , f a l l b a c k P l a c e m e n t s : " a r r a y " , b o u n d a r y : " ( s t r i n g | e l e m e n t ) " , c u s t o m C l a s s : " ( s t r i n g | f u n c t i o n ) " , s a n i t i z e : " b o o l e a n " , s a n i t i z e F n : " ( n u l l | f u n c t i o n ) " , a l l o w L i s t : " o b j e c t " , p o p p e r C o n f i g : " ( n u l l | o b j e c t | f u n c t i o n ) " } , J i = { A U T O : " a u t o " , T O P : " t o p " , R I G H T : m ( ) ? " l e f t " : " r i g h t " , B O T T O M : " b o t t o m " , L E F T : m ( ) ? " r i g h t " : " l e f t " } , t n = { a n i m a t i o n : ! 0 , t e m p l a t e : ' < d i v   c l a s s = " t o o l t i p "   r o l e = " t o o l t i p " > < d i v   c l a s s = " t o o l t i p - a r r o w " > < / d i v > < d i v   c l a s s = " t o o l t i p - i n n e r " > < / d i v > < / d i v > ' , t r i g g e r : " h o v e r   f o c u s " , t i t l e : " " , d e l a y : 0 , h t m l : ! 1 , s e l e c t o r : ! 1 , p l a c e m e n t : " t o p " , o f f s e t : [ 0 , 0 ] , c o n t a i n e r : ! 1 , f a l l b a c k P l a c e m e n t s : [ " t o p " , " r i g h t " , " b o t t o m " , " l e f t " ] , b o u n d a r y : " c l i p p i n g P a r e n t s " , c u s t o m C l a s s : " " , s a n i t i z e : ! 0 , s a n i t i z e F n : n u l l , a l l o w L i s t : { " * " : [ " c l a s s " , " d i r " , " i d " , " l a n g " , " r o l e " , / ^ a r i a - [ \ w - ] * $ / i ] , a : [ " t a r g e t " , " h r e f " , " t i t l e " , " r e l " ] , a r e a : [ ] , b : [ ] , b r : [ ] , c o l : [ ] , c o d e : [ ] , d i v : [ ] , e m : [ ] , h r : [ ] , h 1 : [ ] , h 2 : [ ] , h 3 : [ ] , h 4 : [ ] , h 5 : [ ] , h 6 : [ ] , i : [ ] , i m g : [ " s r c " , " s r c s e t " , " a l t " , " t i t l e " , " w i d t h " , " h e i g h t " ] , l i : [ ] , o l : [ ] , p : [ ] , p r e : [ ] , s : [ ] , s m a l l : [ ] , s p a n : [ ] , s u b : [ ] , s u p : [ ] , s t r o n g : [ ] , u : [ ] , u l : [ ] } , p o p p e r C o n f i g : n u l l } , e n = { H I D E : " h i d e . b s . t o o l t i p " , H I D D E N : " h i d d e n . b s . t o o l t i p " , S H O W : " s h o w . b s . t o o l t i p " , S H O W N : " s h o w n . b s . t o o l t i p " , I N S E R T E D : " i n s e r t e d . b s . t o o l t i p " , C L I C K : " c l i c k . b s . t o o l t i p " , F O C U S I N : " f o c u s i n . b s . t o o l t i p " , F O C U S O U T : " f o c u s o u t . b s . t o o l t i p " , M O U S E E N T E R : " m o u s e e n t e r . b s . t o o l t i p " , M O U S E L E A V E : " m o u s e l e a v e . b s . t o o l t i p " } , n n = " f a d e " , s n = " s h o w " , o n = " s h o w " , r n = " o u t " , a n = " . t o o l t i p - i n n e r " , l n = " . m o d a l " , c n = " h i d e . b s . m o d a l " , h n = " h o v e r " , d n = " f o c u s " ; c l a s s   u n   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { i f ( v o i d   0 = = = F e ) t h r o w   n e w   T y p e E r r o r ( " B o o t s t r a p ' s   t o o l t i p s   r e q u i r e   P o p p e r   ( h t t p s : / / p o p p e r . j s . o r g ) " ) ; s u p e r ( t ) , t h i s . _ i s E n a b l e d = ! 0 , t h i s . _ t i m e o u t = 0 , t h i s . _ h o v e r S t a t e = " " , t h i s . _ a c t i v e T r i g g e r = { } , t h i s . _ p o p p e r = n u l l , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . t i p = n u l l , t h i s . _ s e t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   t n } s t a t i c   g e t   N A M E ( ) { r e t u r n   Q i } s t a t i c   g e t   E v e n t ( ) { r e t u r n   e n } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   Z i } e n a b l e ( ) { t h i s . _ i s E n a b l e d = ! 0 } d i s a b l e ( ) { t h i s . _ i s E n a b l e d = ! 1 } t o g g l e E n a b l e d ( ) { t h i s . _ i s E n a b l e d = ! t h i s . _ i s E n a b l e d } t o g g l e ( t ) { i f ( t h i s . _ i s E n a b l e d ) i f ( t ) { c o n s t   e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t ) ; e . _ a c t i v e T r i g g e r . c l i c k = ! e . _ a c t i v e T r i g g e r . c l i c k , e . _ i s W i t h A c t i v e T r i g g e r ( ) ? e . _ e n t e r ( n u l l , e ) : e . _ l e a v e ( n u l l , e ) } e l s e { i f ( t h i s . g e t T i p E l e m e n t ( ) . c l a s s L i s t . c o n t a i n s ( s n ) ) r e t u r n   v o i d   t h i s . _ l e a v e ( n u l l , t h i s ) ; t h i s . _ e n t e r ( n u l l , t h i s ) } } d i s p o s e ( ) { c l e a r T i m e o u t ( t h i s . _ t i m e o u t ) , j . o f f ( t h i s . _ e l e m e n t . c l o s e s t ( l n ) , c n , t h i s . _ h i d e M o d a l H a n d l e r ) , t h i s . t i p & & t h i s . t i p . r e m o v e ( ) , t h i s . _ d i s p o s e P o p p e r ( ) , s u p e r . d i s p o s e ( ) } s h o w ( ) { i f ( " n o n e " = = = t h i s . _ e l e m e n t . s t y l e . d i s p l a y ) t h r o w   n e w   E r r o r ( " P l e a s e   u s e   s h o w   o n   v i s i b l e   e l e m e n t s " ) ; i f ( ! t h i s . i s W i t h C o n t e n t ( ) | | ! t h i s . _ i s E n a b l e d ) r e t u r n ; c o n s t   t = j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . S H O W ) , e = h ( t h i s . _ e l e m e n t ) , i = n u l l = = = e ? t h i s . _ e l e m e n t . o w n e r D o c u m e n t . d o c u m e n t E l e m e n t . c o n t a i n s ( t h i s . _ e l e m e n t ) : e . c o n t a i n s ( t h i s . _ e l e m e n t ) ; i f ( t . d e f a u l t P r e v e n t e d | | ! i ) r e t u r n ; " t o o l t i p " = = = t h i s . c o n s t r u c t o r . N A M E & & t h i s . t i p & & t h i s . g e t T i t l e ( ) ! = = t h i s . t i p . q u e r y S e l e c t o r ( a n ) . i n n e r H T M L & & ( t h i s . _ d i s p o s e P o p p e r ( ) , t h i s . t i p . r e m o v e ( ) , t h i s . t i p = n u l l ) ; c o n s t   n = t h i s . g e t T i p E l e m e n t ( ) , s = ( t = > { d o { t + = M a t h . f l o o r ( 1 e 6 * M a t h . r a n d o m ( ) ) } w h i l e ( d o c u m e n t . g e t E l e m e n t B y I d ( t ) ) ; r e t u r n   t } ) ( t h i s . c o n s t r u c t o r . N A M E ) ; n . s e t A t t r i b u t e ( " i d " , s ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - d e s c r i b e d b y " , s ) , t h i s . _ c o n f i g . a n i m a t i o n & & n . c l a s s L i s t . a d d ( n n ) ; c o n s t   o = " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p l a c e m e n t ? t h i s . _ c o n f i g . p l a c e m e n t . c a l l ( t h i s , n , t h i s . _ e l e m e n t ) : t h i s . _ c o n f i g . p l a c e m e n t , r = t h i s . _ g e t A t t a c h m e n t ( o ) ; t h i s . _ a d d A t t a c h m e n t C l a s s ( r ) ; c o n s t { c o n t a i n e r : a } = t h i s . _ c o n f i g ; H . s e t ( n , t h i s . c o n s t r u c t o r . D A T A _ K E Y , t h i s ) , t h i s . _ e l e m e n t . o w n e r D o c u m e n t . d o c u m e n t E l e m e n t . c o n t a i n s ( t h i s . t i p ) | | ( a . a p p e n d ( n ) , j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . I N S E R T E D ) ) , t h i s . _ p o p p e r ? t h i s . _ p o p p e r . u p d a t e ( ) : t h i s . _ p o p p e r = q e ( t h i s . _ e l e m e n t , n , t h i s . _ g e t P o p p e r C o n f i g ( r ) ) , n . c l a s s L i s t . a d d ( s n ) ; c o n s t   l = t h i s . _ r e s o l v e P o s s i b l e F u n c t i o n ( t h i s . _ c o n f i g . c u s t o m C l a s s ) ; l & & n . c l a s s L i s t . a d d ( . . . l . s p l i t ( "   " ) ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > { j . o n ( t , " m o u s e o v e r " , d ) } ) ) ; c o n s t   c = t h i s . t i p . c l a s s L i s t . c o n t a i n s ( n n ) ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { c o n s t   t = t h i s . _ h o v e r S t a t e ; t h i s . _ h o v e r S t a t e = n u l l , j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . S H O W N ) , t = = = r n & & t h i s . _ l e a v e ( n u l l , t h i s ) } ) , t h i s . t i p , c ) } h i d e ( ) { i f ( ! t h i s . _ p o p p e r ) r e t u r n ; c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . H I D E ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t . c l a s s L i s t . r e m o v e ( s n ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( ( t = > j . o f f ( t , " m o u s e o v e r " , d ) ) ) , t h i s . _ a c t i v e T r i g g e r . c l i c k = ! 1 , t h i s . _ a c t i v e T r i g g e r . f o c u s = ! 1 , t h i s . _ a c t i v e T r i g g e r . h o v e r = ! 1 ; c o n s t   e = t h i s . t i p . c l a s s L i s t . c o n t a i n s ( n n ) ; t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ i s W i t h A c t i v e T r i g g e r ( ) | | ( t h i s . _ h o v e r S t a t e ! = = o n & & t . r e m o v e ( ) , t h i s . _ c l e a n T i p C l a s s ( ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - d e s c r i b e d b y " ) , j . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . H I D D E N ) , t h i s . _ d i s p o s e P o p p e r ( ) ) } ) , t h i s . t i p , e ) , t h i s . _ h o v e r S t a t e = " " } u p d a t e ( ) { n u l l ! = = t h i s . _ p o p p e r & & t h i s . _ p o p p e r . u p d a t e ( ) } i s W i t h C o n t e n t ( ) { r e t u r n   B o o l e a n ( t h i s . g e t T i t l e ( ) ) } g e t T i p E l e m e n t ( ) { i f ( t h i s . t i p ) r e t u r n   t h i s . t i p ; c o n s t   t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; t . i n n e r H T M L = t h i s . _ c o n f i g . t e m p l a t e ; c o n s t   e = t . c h i l d r e n [ 0 ] ; r e t u r n   t h i s . s e t C o n t e n t ( e ) , e . c l a s s L i s t . r e m o v e ( n n , s n ) , t h i s . t i p = e , t h i s . t i p } s e t C o n t e n t ( t ) { t h i s . _ s a n i t i z e A n d S e t C o n t e n t ( t , t h i s . g e t T i t l e ( ) , a n ) } _ s a n i t i z e A n d S e t C o n t e n t ( t , e , i ) { c o n s t   n = V . f i n d O n e ( i , t ) ; e | | ! n ? t h i s . s e t E l e m e n t C o n t e n t ( n , e ) : n . r e m o v e ( ) } s e t E l e m e n t C o n t e n t ( t , e ) { i f ( n u l l ! = = t ) r e t u r n   o ( e ) ? ( e = r ( e ) , v o i d ( t h i s . _ c o n f i g . h t m l ? e . p a r e n t N o d e ! = = t & & ( t . i n n e r H T M L = " " , t . a p p e n d ( e ) ) : t . t e x t C o n t e n t = e . t e x t C o n t e n t ) ) : v o i d ( t h i s . _ c o n f i g . h t m l ? ( t h i s . _ c o n f i g . s a n i t i z e & & ( e = Y i ( e , t h i s . _ c o n f i g . a l l o w L i s t , t h i s . _ c o n f i g . s a n i t i z e F n ) ) , t . i n n e r H T M L = e ) : t . t e x t C o n t e n t = e ) } g e t T i t l e ( ) { c o n s t   t = t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " ) | | t h i s . _ c o n f i g . t i t l e ; r e t u r n   t h i s . _ r e s o l v e P o s s i b l e F u n c t i o n ( t ) } u p d a t e A t t a c h m e n t ( t ) { r e t u r n " r i g h t " = = = t ? " e n d " : " l e f t " = = = t ? " s t a r t " : t } _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) { r e t u r n   e | | t h i s . c o n s t r u c t o r . g e t O r C r e a t e I n s t a n c e ( t . d e l e g a t e T a r g e t , t h i s . _ g e t D e l e g a t e C o n f i g ( ) ) } _ g e t O f f s e t ( ) { c o n s t { o f f s e t : t } = t h i s . _ c o n f i g ; r e t u r n " s t r i n g " = = t y p e o f   t ? t . s p l i t ( " , " ) . m a p ( ( t = > N u m b e r . p a r s e I n t ( t , 1 0 ) ) ) : " f u n c t i o n " = = t y p e o f   t ? e = > t ( e , t h i s . _ e l e m e n t ) : t } _ r e s o l v e P o s s i b l e F u n c t i o n ( t ) { r e t u r n " f u n c t i o n " = = t y p e o f   t ? t . c a l l ( t h i s . _ e l e m e n t ) : t } _ g e t P o p p e r C o n f i g ( t ) { c o n s t   e = { p l a c e m e n t : t , m o d i f i e r s : [ { n a m e : " f l i p " , o p t i o n s : { f a l l b a c k P l a c e m e n t s : t h i s . _ c o n f i g . f a l l b a c k P l a c e m e n t s } } , { n a m e : " o f f s e t " , o p t i o n s : { o f f s e t : t h i s . _ g e t O f f s e t ( ) } } , { n a m e : " p r e v e n t O v e r f l o w " , o p t i o n s : { b o u n d a r y : t h i s . _ c o n f i g . b o u n d a r y } } , { n a m e : " a r r o w " , o p t i o n s : { e l e m e n t : ` . $ { t h i s . c o n s t r u c t o r . N A M E } - a r r o w ` } } , { n a m e : " o n C h a n g e " , e n a b l e d : ! 0 , p h a s e : " a f t e r W r i t e " , f n : t = > t h i s . _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) } ] , o n F i r s t U p d a t e : t = > { t . o p t i o n s . p l a c e m e n t ! = = t . p l a c e m e n t & & t h i s . _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) } } ; r e t u r n { . . . e , . . . " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p o p p e r C o n f i g ? t h i s . _ c o n f i g . p o p p e r C o n f i g ( e ) : t h i s . _ c o n f i g . p o p p e r C o n f i g } } _ a d d A t t a c h m e n t C l a s s ( t ) { t h i s . g e t T i p E l e m e n t ( ) . c l a s s L i s t . a d d ( ` $ { t h i s . _ g e t B a s i c C l a s s P r e f i x ( ) } - $ { t h i s . u p d a t e A t t a c h m e n t ( t ) } ` ) } _ g e t A t t a c h m e n t ( t ) { r e t u r n   J i [ t . t o U p p e r C a s e ( ) ] } _ s e t L i s t e n e r s ( ) { t h i s . _ c o n f i g . t r i g g e r . s p l i t ( "   " ) . f o r E a c h ( ( t = > { i f ( " c l i c k " = = = t ) j . o n ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . C L I C K , t h i s . _ c o n f i g . s e l e c t o r , ( t = > t h i s . t o g g l e ( t ) ) ) ; e l s e   i f ( " m a n u a l " ! = = t ) { c o n s t   e = t = = = h n ? t h i s . c o n s t r u c t o r . E v e n t . M O U S E E N T E R : t h i s . c o n s t r u c t o r . E v e n t . F O C U S I N , i = t = = = h n ? t h i s . c o n s t r u c t o r . E v e n t . M O U S E L E A V E : t h i s . c o n s t r u c t o r . E v e n t . F O C U S O U T ; j . o n ( t h i s . _ e l e m e n t , e , t h i s . _ c o n f i g . s e l e c t o r , ( t = > t h i s . _ e n t e r ( t ) ) ) , j . o n ( t h i s . _ e l e m e n t , i , t h i s . _ c o n f i g . s e l e c t o r , ( t = > t h i s . _ l e a v e ( t ) ) ) } } ) ) , t h i s . _ h i d e M o d a l H a n d l e r = ( ) = > { t h i s . _ e l e m e n t & & t h i s . h i d e ( ) } , j . o n ( t h i s . _ e l e m e n t . c l o s e s t ( l n ) , c n , t h i s . _ h i d e M o d a l H a n d l e r ) , t h i s . _ c o n f i g . s e l e c t o r ? t h i s . _ c o n f i g = { . . . t h i s . _ c o n f i g , t r i g g e r : " m a n u a l " , s e l e c t o r : " " } : t h i s . _ f i x T i t l e ( ) } _ f i x T i t l e ( ) { c o n s t   t = t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " t i t l e " ) , e = t y p e o f   t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " ) ; ( t | | " s t r i n g " ! = = e ) & & ( t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " , t | | " " ) , ! t | | t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " a r i a - l a b e l " ) | | t h i s . _ e l e m e n t . t e x t C o n t e n t | | t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - l a b e l " , t ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " t i t l e " , " " ) ) } _ e n t e r ( t , e ) { e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) , t & & ( e . _ a c t i v e T r i g g e r [ " f o c u s i n " = = = t . t y p e ? d n : h n ] = ! 0 ) , e . g e t T i p E l e m e n t ( ) . c l a s s L i s t . c o n t a i n s ( s n ) | | e . _ h o v e r S t a t e = = = o n ? e . _ h o v e r S t a t e = o n : ( c l e a r T i m e o u t ( e . _ t i m e o u t ) , e . _ h o v e r S t a t e = o n , e . _ c o n f i g . d e l a y & & e . _ c o n f i g . d e l a y . s h o w ? e . _ t i m e o u t = s e t T i m e o u t ( ( ( ) = > { e . _ h o v e r S t a t e = = = o n & & e . s h o w ( ) } ) , e . _ c o n f i g . d e l a y . s h o w ) : e . s h o w ( ) ) } _ l e a v e ( t , e ) { e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) , t & & ( e . _ a c t i v e T r i g g e r [ " f o c u s o u t " = = = t . t y p e ? d n : h n ] = e . _ e l e m e n t . c o n t a i n s ( t . r e l a t e d T a r g e t ) ) , e . _ i s W i t h A c t i v e T r i g g e r ( ) | | ( c l e a r T i m e o u t ( e . _ t i m e o u t ) , e . _ h o v e r S t a t e = r n , e . _ c o n f i g . d e l a y & & e . _ c o n f i g . d e l a y . h i d e ? e . _ t i m e o u t = s e t T i m e o u t ( ( ( ) = > { e . _ h o v e r S t a t e = = = r n & & e . h i d e ( ) } ) , e . _ c o n f i g . d e l a y . h i d e ) : e . h i d e ( ) ) } _ i s W i t h A c t i v e T r i g g e r ( ) { f o r ( c o n s t   t   i n   t h i s . _ a c t i v e T r i g g e r ) i f ( t h i s . _ a c t i v e T r i g g e r [ t ] ) r e t u r n ! 0 ; r e t u r n ! 1 } _ g e t C o n f i g ( t ) { c o n s t   e = U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) ; r e t u r n   O b j e c t . k e y s ( e ) . f o r E a c h ( ( t = > { G i . h a s ( t ) & & d e l e t e   e [ t ] } ) ) , ( t = { . . . t h i s . c o n s t r u c t o r . D e f a u l t , . . . e , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } ) . c o n t a i n e r = ! 1 = = = t . c o n t a i n e r ? d o c u m e n t . b o d y : r ( t . c o n t a i n e r ) , " n u m b e r " = = t y p e o f   t . d e l a y & & ( t . d e l a y = { s h o w : t . d e l a y , h i d e : t . d e l a y } ) , " n u m b e r " = = t y p e o f   t . t i t l e & & ( t . t i t l e = t . t i t l e . t o S t r i n g ( ) ) , " n u m b e r " = = t y p e o f   t . c o n t e n t & & ( t . c o n t e n t = t . c o n t e n t . t o S t r i n g ( ) ) , a ( Q i , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , t . s a n i t i z e & & ( t . t e m p l a t e = Y i ( t . t e m p l a t e , t . a l l o w L i s t , t . s a n i t i z e F n ) ) , t } _ g e t D e l e g a t e C o n f i g ( ) { c o n s t   t = { } ; f o r ( c o n s t   e   i n   t h i s . _ c o n f i g ) t h i s . c o n s t r u c t o r . D e f a u l t [ e ] ! = = t h i s . _ c o n f i g [ e ] & & ( t [ e ] = t h i s . _ c o n f i g [ e ] ) ; r e t u r n   t } _ c l e a n T i p C l a s s ( ) { c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) , e = n e w   R e g E x p ( ` ( ^ | \ \ s ) $ { t h i s . _ g e t B a s i c C l a s s P r e f i x ( ) } \ \ S + ` , " g " ) , i = t . g e t A t t r i b u t e ( " c l a s s " ) . m a t c h ( e ) ; n u l l ! = = i & & i . l e n g t h > 0 & & i . m a p ( ( t = > t . t r i m ( ) ) ) . f o r E a c h ( ( e = > t . c l a s s L i s t . r e m o v e ( e ) ) ) } _ g e t B a s i c C l a s s P r e f i x ( ) { r e t u r n " b s - t o o l t i p " } _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) { c o n s t { s t a t e : e } = t ; e & & ( t h i s . t i p = e . e l e m e n t s . p o p p e r , t h i s . _ c l e a n T i p C l a s s ( ) , t h i s . _ a d d A t t a c h m e n t C l a s s ( t h i s . _ g e t A t t a c h m e n t ( e . p l a c e m e n t ) ) ) } _ d i s p o s e P o p p e r ( ) { t h i s . _ p o p p e r & & ( t h i s . _ p o p p e r . d e s t r o y ( ) , t h i s . _ p o p p e r = n u l l ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = u n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } g ( u n ) ; c o n s t   f n = { . . . u n . D e f a u l t , p l a c e m e n t : " r i g h t " , o f f s e t : [ 0 , 8 ] , t r i g g e r : " c l i c k " , c o n t e n t : " " , t e m p l a t e : ' < d i v   c l a s s = " p o p o v e r "   r o l e = " t o o l t i p " > < d i v   c l a s s = " p o p o v e r - a r r o w " > < / d i v > < h 3   c l a s s = " p o p o v e r - h e a d e r " > < / h 3 > < d i v   c l a s s = " p o p o v e r - b o d y " > < / d i v > < / d i v > ' } , p n = { . . . u n . D e f a u l t T y p e , c o n t e n t : " ( s t r i n g | e l e m e n t | f u n c t i o n ) " } , m n = { H I D E : " h i d e . b s . p o p o v e r " , H I D D E N : " h i d d e n . b s . p o p o v e r " , S H O W : " s h o w . b s . p o p o v e r " , S H O W N : " s h o w n . b s . p o p o v e r " , I N S E R T E D : " i n s e r t e d . b s . p o p o v e r " , C L I C K : " c l i c k . b s . p o p o v e r " , F O C U S I N : " f o c u s i n . b s . p o p o v e r " , F O C U S O U T : " f o c u s o u t . b s . p o p o v e r " , M O U S E E N T E R : " m o u s e e n t e r . b s . p o p o v e r " , M O U S E L E A V E : " m o u s e l e a v e . b s . p o p o v e r " } ; c l a s s   g n   e x t e n d s   u n { s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   f n } s t a t i c   g e t   N A M E ( ) { r e t u r n " p o p o v e r " } s t a t i c   g e t   E v e n t ( ) { r e t u r n   m n } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   p n } i s W i t h C o n t e n t ( ) { r e t u r n   t h i s . g e t T i t l e ( ) | | t h i s . _ g e t C o n t e n t ( ) } s e t C o n t e n t ( t ) { t h i s . _ s a n i t i z e A n d S e t C o n t e n t ( t , t h i s . g e t T i t l e ( ) , " . p o p o v e r - h e a d e r " ) , t h i s . _ s a n i t i z e A n d S e t C o n t e n t ( t , t h i s . _ g e t C o n t e n t ( ) , " . p o p o v e r - b o d y " ) } _ g e t C o n t e n t ( ) { r e t u r n   t h i s . _ r e s o l v e P o s s i b l e F u n c t i o n ( t h i s . _ c o n f i g . c o n t e n t ) } _ g e t B a s i c C l a s s P r e f i x ( ) { r e t u r n " b s - p o p o v e r " } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = g n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } g ( g n ) ; c o n s t   _ n = " s c r o l l s p y " , b n = { o f f s e t : 1 0 , m e t h o d : " a u t o " , t a r g e t : " " } , v n = { o f f s e t : " n u m b e r " , m e t h o d : " s t r i n g " , t a r g e t : " ( s t r i n g | e l e m e n t ) " } , y n = " a c t i v e " , w n = " . n a v - l i n k ,   . l i s t - g r o u p - i t e m ,   . d r o p d o w n - i t e m " , E n = " p o s i t i o n " ; c l a s s   A n   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ s c r o l l E l e m e n t = " B O D Y " = = = t h i s . _ e l e m e n t . t a g N a m e ? w i n d o w : t h i s . _ e l e m e n t , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ o f f s e t s = [ ] , t h i s . _ t a r g e t s = [ ] , t h i s . _ a c t i v e T a r g e t = n u l l , t h i s . _ s c r o l l H e i g h t = 0 , j . o n ( t h i s . _ s c r o l l E l e m e n t , " s c r o l l . b s . s c r o l l s p y " , ( ( ) = > t h i s . _ p r o c e s s ( ) ) ) , t h i s . r e f r e s h ( ) , t h i s . _ p r o c e s s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   b n } s t a t i c   g e t   N A M E ( ) { r e t u r n   _ n } r e f r e s h ( ) { c o n s t   t = t h i s . _ s c r o l l E l e m e n t = = = t h i s . _ s c r o l l E l e m e n t . w i n d o w ? " o f f s e t " : E n , e = " a u t o " = = = t h i s . _ c o n f i g . m e t h o d ? t : t h i s . _ c o n f i g . m e t h o d , n = e = = = E n ? t h i s . _ g e t S c r o l l T o p ( ) : 0 ; t h i s . _ o f f s e t s = [ ] , t h i s . _ t a r g e t s = [ ] , t h i s . _ s c r o l l H e i g h t = t h i s . _ g e t S c r o l l H e i g h t ( ) , V . f i n d ( w n , t h i s . _ c o n f i g . t a r g e t ) . m a p ( ( t = > { c o n s t   s = i ( t ) , o = s ? V . f i n d O n e ( s ) : n u l l ; i f ( o ) { c o n s t   t = o . g e t B o u n d i n g C l i e n t R e c t ( ) ; i f ( t . w i d t h | | t . h e i g h t ) r e t u r n [ U [ e ] ( o ) . t o p + n , s ] } r e t u r n   n u l l } ) ) . f i l t e r ( ( t = > t ) ) . s o r t ( ( ( t , e ) = > t [ 0 ] - e [ 0 ] ) ) . f o r E a c h ( ( t = > { t h i s . _ o f f s e t s . p u s h ( t [ 0 ] ) , t h i s . _ t a r g e t s . p u s h ( t [ 1 ] ) } ) ) } d i s p o s e ( ) { j . o f f ( t h i s . _ s c r o l l E l e m e n t , " . b s . s c r o l l s p y " ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . b n , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } ) . t a r g e t = r ( t . t a r g e t ) | | d o c u m e n t . d o c u m e n t E l e m e n t , a ( _ n , t , v n ) , t } _ g e t S c r o l l T o p ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t = = = w i n d o w ? t h i s . _ s c r o l l E l e m e n t . p a g e Y O f f s e t : t h i s . _ s c r o l l E l e m e n t . s c r o l l T o p } _ g e t S c r o l l H e i g h t ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t . s c r o l l H e i g h t | | M a t h . m a x ( d o c u m e n t . b o d y . s c r o l l H e i g h t , d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l H e i g h t ) } _ g e t O f f s e t H e i g h t ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t = = = w i n d o w ? w i n d o w . i n n e r H e i g h t : t h i s . _ s c r o l l E l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) . h e i g h t } _ p r o c e s s ( ) { c o n s t   t = t h i s . _ g e t S c r o l l T o p ( ) + t h i s . _ c o n f i g . o f f s e t , e = t h i s . _ g e t S c r o l l H e i g h t ( ) , i = t h i s . _ c o n f i g . o f f s e t + e - t h i s . _ g e t O f f s e t H e i g h t ( ) ; i f ( t h i s . _ s c r o l l H e i g h t ! = = e & & t h i s . r e f r e s h ( ) , t > = i ) { c o n s t   t = t h i s . _ t a r g e t s [ t h i s . _ t a r g e t s . l e n g t h - 1 ] ; t h i s . _ a c t i v e T a r g e t ! = = t & & t h i s . _ a c t i v a t e ( t ) } e l s e { i f ( t h i s . _ a c t i v e T a r g e t & & t < t h i s . _ o f f s e t s [ 0 ] & & t h i s . _ o f f s e t s [ 0 ] > 0 ) r e t u r n   t h i s . _ a c t i v e T a r g e t = n u l l , v o i d   t h i s . _ c l e a r ( ) ; f o r ( l e t   e = t h i s . _ o f f s e t s . l e n g t h ; e - - ; ) t h i s . _ a c t i v e T a r g e t ! = = t h i s . _ t a r g e t s [ e ] & & t > = t h i s . _ o f f s e t s [ e ] & & ( v o i d   0 = = = t h i s . _ o f f s e t s [ e + 1 ] | | t < t h i s . _ o f f s e t s [ e + 1 ] ) & & t h i s . _ a c t i v a t e ( t h i s . _ t a r g e t s [ e ] ) } } _ a c t i v a t e ( t ) { t h i s . _ a c t i v e T a r g e t = t , t h i s . _ c l e a r ( ) ; c o n s t   e = w n . s p l i t ( " , " ) . m a p ( ( e = > ` $ { e } [ d a t a - b s - t a r g e t = " $ { t } " ] , $ { e } [ h r e f = " $ { t } " ] ` ) ) , i = V . f i n d O n e ( e . j o i n ( " , " ) , t h i s . _ c o n f i g . t a r g e t ) ; i . c l a s s L i s t . a d d ( y n ) , i . c l a s s L i s t . c o n t a i n s ( " d r o p d o w n - i t e m " ) ? V . f i n d O n e ( " . d r o p d o w n - t o g g l e " , i . c l o s e s t ( " . d r o p d o w n " ) ) . c l a s s L i s t . a d d ( y n ) : V . p a r e n t s ( i , " . n a v ,   . l i s t - g r o u p " ) . f o r E a c h ( ( t = > { V . p r e v ( t , " . n a v - l i n k ,   . l i s t - g r o u p - i t e m " ) . f o r E a c h ( ( t = > t . c l a s s L i s t . a d d ( y n ) ) ) , V . p r e v ( t , " . n a v - i t e m " ) . f o r E a c h ( ( t = > { V . c h i l d r e n ( t , " . n a v - l i n k " ) . f o r E a c h ( ( t = > t . c l a s s L i s t . a d d ( y n ) ) ) } ) ) } ) ) , j . t r i g g e r ( t h i s . _ s c r o l l E l e m e n t , " a c t i v a t e . b s . s c r o l l s p y " , { r e l a t e d T a r g e t : t } ) } _ c l e a r ( ) { V . f i n d ( w n , t h i s . _ c o n f i g . t a r g e t ) . f i l t e r ( ( t = > t . c l a s s L i s t . c o n t a i n s ( y n ) ) ) . f o r E a c h ( ( t = > t . c l a s s L i s t . r e m o v e ( y n ) ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = A n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } j . o n ( w i n d o w , " l o a d . b s . s c r o l l s p y . d a t a - a p i " , ( ( ) = > { V . f i n d ( ' [ d a t a - b s - s p y = " s c r o l l " ] ' ) . f o r E a c h ( ( t = > n e w   A n ( t ) ) ) } ) ) , g ( A n ) ; c o n s t   T n = " a c t i v e " , O n = " f a d e " , C n = " s h o w " , k n = " . a c t i v e " , L n = " : s c o p e   >   l i   >   . a c t i v e " ; c l a s s   x n   e x t e n d s   B { s t a t i c   g e t   N A M E ( ) { r e t u r n " t a b " } s h o w ( ) { i f ( t h i s . _ e l e m e n t . p a r e n t N o d e & & t h i s . _ e l e m e n t . p a r e n t N o d e . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E & & t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( T n ) ) r e t u r n ; l e t   t ; c o n s t   e = n ( t h i s . _ e l e m e n t ) , i = t h i s . _ e l e m e n t . c l o s e s t ( " . n a v ,   . l i s t - g r o u p " ) ; i f ( i ) { c o n s t   e = " U L " = = = i . n o d e N a m e | | " O L " = = = i . n o d e N a m e ? L n : k n ; t = V . f i n d ( e , i ) , t = t [ t . l e n g t h - 1 ] } c o n s t   s = t ? j . t r i g g e r ( t , " h i d e . b s . t a b " , { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ) : n u l l ; i f ( j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . t a b " , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | n u l l ! = = s & & s . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ a c t i v a t e ( t h i s . _ e l e m e n t , i ) ; c o n s t   o = ( ) = > { j . t r i g g e r ( t , " h i d d e n . b s . t a b " , { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . t a b " , { r e l a t e d T a r g e t : t } ) } ; e ? t h i s . _ a c t i v a t e ( e , e . p a r e n t N o d e , o ) : o ( ) } _ a c t i v a t e ( t , e , i ) { c o n s t   n = ( ! e | | " U L " ! = = e . n o d e N a m e & & " O L " ! = = e . n o d e N a m e ? V . c h i l d r e n ( e , k n ) : V . f i n d ( L n , e ) ) [ 0 ] , s = i & & n & & n . c l a s s L i s t . c o n t a i n s ( O n ) , o = ( ) = > t h i s . _ t r a n s i t i o n C o m p l e t e ( t , n , i ) ; n & & s ? ( n . c l a s s L i s t . r e m o v e ( C n ) , t h i s . _ q u e u e C a l l b a c k ( o , t , ! 0 ) ) : o ( ) } _ t r a n s i t i o n C o m p l e t e ( t , e , i ) { i f ( e ) { e . c l a s s L i s t . r e m o v e ( T n ) ; c o n s t   t = V . f i n d O n e ( " : s c o p e   >   . d r o p d o w n - m e n u   . a c t i v e " , e . p a r e n t N o d e ) ; t & & t . c l a s s L i s t . r e m o v e ( T n ) , " t a b " = = = e . g e t A t t r i b u t e ( " r o l e " ) & & e . s e t A t t r i b u t e ( " a r i a - s e l e c t e d " , ! 1 ) } t . c l a s s L i s t . a d d ( T n ) , " t a b " = = = t . g e t A t t r i b u t e ( " r o l e " ) & & t . s e t A t t r i b u t e ( " a r i a - s e l e c t e d " , ! 0 ) , u ( t ) , t . c l a s s L i s t . c o n t a i n s ( O n ) & & t . c l a s s L i s t . a d d ( C n ) ; l e t   n = t . p a r e n t N o d e ; i f ( n & & " L I " = = = n . n o d e N a m e & & ( n = n . p a r e n t N o d e ) , n & & n . c l a s s L i s t . c o n t a i n s ( " d r o p d o w n - m e n u " ) ) { c o n s t   e = t . c l o s e s t ( " . d r o p d o w n " ) ; e & & V . f i n d ( " . d r o p d o w n - t o g g l e " , e ) . f o r E a c h ( ( t = > t . c l a s s L i s t . a d d ( T n ) ) ) , t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 0 ) } i & & i ( ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = x n . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } j . o n ( d o c u m e n t , " c l i c k . b s . t a b . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " t a b " ] ,   [ d a t a - b s - t o g g l e = " p i l l " ] ,   [ d a t a - b s - t o g g l e = " l i s t " ] ' , ( f u n c t i o n ( t ) { [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , c ( t h i s ) | | x n . g e t O r C r e a t e I n s t a n c e ( t h i s ) . s h o w ( ) } ) ) , g ( x n ) ; c o n s t   D n = " t o a s t " , S n = " h i d e " , N n = " s h o w " , I n = " s h o w i n g " , P n = { a n i m a t i o n : " b o o l e a n " , a u t o h i d e : " b o o l e a n " , d e l a y : " n u m b e r " } , j n = { a n i m a t i o n : ! 0 , a u t o h i d e : ! 0 , d e l a y : 5 e 3 } ; c l a s s   M n   e x t e n d s   B { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ t i m e o u t = n u l l , t h i s . _ h a s M o u s e I n t e r a c t i o n = ! 1 , t h i s . _ h a s K e y b o a r d I n t e r a c t i o n = ! 1 , t h i s . _ s e t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   P n } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   j n } s t a t i c   g e t   N A M E ( ) { r e t u r n   D n } s h o w ( ) { j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . t o a s t " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ c l e a r T i m e o u t ( ) , t h i s . _ c o n f i g . a n i m a t i o n & & t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " f a d e " ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( S n ) , u ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( N n ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( I n ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( I n ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . t o a s t " ) , t h i s . _ m a y b e S c h e d u l e H i d e ( ) } ) , t h i s . _ e l e m e n t , t h i s . _ c o n f i g . a n i m a t i o n ) ) } h i d e ( ) { t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( N n ) & & ( j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . t o a s t " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( I n ) , t h i s . _ q u e u e C a l l b a c k ( ( ( ) = > { t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( S n ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( I n ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( N n ) , j . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . t o a s t " ) } ) , t h i s . _ e l e m e n t , t h i s . _ c o n f i g . a n i m a t i o n ) ) ) } d i s p o s e ( ) { t h i s . _ c l e a r T i m e o u t ( ) , t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( N n ) & & t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( N n ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . j n , . . . U . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } , a ( D n , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , t } _ m a y b e S c h e d u l e H i d e ( ) { t h i s . _ c o n f i g . a u t o h i d e & & ( t h i s . _ h a s M o u s e I n t e r a c t i o n | | t h i s . _ h a s K e y b o a r d I n t e r a c t i o n | | ( t h i s . _ t i m e o u t = s e t T i m e o u t ( ( ( ) = > { t h i s . h i d e ( ) } ) , t h i s . _ c o n f i g . d e l a y ) ) ) } _ o n I n t e r a c t i o n ( t , e ) { s w i t c h ( t . t y p e ) { c a s e " m o u s e o v e r " : c a s e " m o u s e o u t " : t h i s . _ h a s M o u s e I n t e r a c t i o n = e ; b r e a k ; c a s e " f o c u s i n " : c a s e " f o c u s o u t " : t h i s . _ h a s K e y b o a r d I n t e r a c t i o n = e } i f ( e ) r e t u r n   v o i d   t h i s . _ c l e a r T i m e o u t ( ) ; c o n s t   i = t . r e l a t e d T a r g e t ; t h i s . _ e l e m e n t = = = i | | t h i s . _ e l e m e n t . c o n t a i n s ( i ) | | t h i s . _ m a y b e S c h e d u l e H i d e ( ) } _ s e t L i s t e n e r s ( ) { j . o n ( t h i s . _ e l e m e n t , " m o u s e o v e r . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 0 ) ) ) , j . o n ( t h i s . _ e l e m e n t , " m o u s e o u t . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 1 ) ) ) , j . o n ( t h i s . _ e l e m e n t , " f o c u s i n . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 0 ) ) ) , j . o n ( t h i s . _ e l e m e n t , " f o c u s o u t . b s . t o a s t " , ( t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 1 ) ) ) } _ c l e a r T i m e o u t ( ) { c l e a r T i m e o u t ( t h i s . _ t i m e o u t ) , t h i s . _ t i m e o u t = n u l l } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = M n . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } r e t u r n   R ( M n ) , g ( M n ) , { A l e r t : W , B u t t o n : z , C a r o u s e l : s t , C o l l a p s e : p t , D r o p d o w n : h i , M o d a l : H i , O f f c a n v a s : F i , P o p o v e r : g n , S c r o l l S p y : A n , T a b : x n , T o a s t : M n , T o o l t i p : u n } } ) ) ; t e m p l a t e s \ i n v e s t e r \ j s \ l i b \ b o o t s t r a p . m i n . j s : ! f u n c t i o n ( t , e ) { " o b j e c t " = = t y p e o f   e x p o r t s & & " u n d e f i n e d " ! = t y p e o f   m o d u l e ? m o d u l e . e x p o r t s = e ( r e q u i r e ( " @ p o p p e r j s / c o r e " ) ) : " f u n c t i o n " = = t y p e o f   d e f i n e & & d e f i n e . a m d ? d e f i n e ( [ " @ p o p p e r j s / c o r e " ] , e ) : ( t = " u n d e f i n e d " ! = t y p e o f   g l o b a l T h i s ? g l o b a l T h i s : t | | s e l f ) . b o o t s t r a p = e ( t . P o p p e r ) } ( t h i s , ( f u n c t i o n ( t ) { " u s e   s t r i c t " ; f u n c t i o n   e ( t ) { i f ( t & & t . _ _ e s M o d u l e ) r e t u r n   t ; v a r   e = O b j e c t . c r e a t e ( n u l l ) ; r e t u r n   t & & O b j e c t . k e y s ( t ) . f o r E a c h ( ( f u n c t i o n ( s ) { i f ( " d e f a u l t " ! = = s ) { v a r   i = O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r ( t , s ) ; O b j e c t . d e f i n e P r o p e r t y ( e , s , i . g e t ? i : { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { r e t u r n   t [ s ] } } ) } } ) ) , e . d e f a u l t = t , O b j e c t . f r e e z e ( e ) } v a r   s = e ( t ) ; c o n s t   i = { f i n d : ( t , e = d o c u m e n t . d o c u m e n t E l e m e n t ) = > [ ] . c o n c a t ( . . . E l e m e n t . p r o t o t y p e . q u e r y S e l e c t o r A l l . c a l l ( e , t ) ) , f i n d O n e : ( t , e = d o c u m e n t . d o c u m e n t E l e m e n t ) = > E l e m e n t . p r o t o t y p e . q u e r y S e l e c t o r . c a l l ( e , t ) , c h i l d r e n : ( t , e ) = > [ ] . c o n c a t ( . . . t . c h i l d r e n ) . f i l t e r ( t = > t . m a t c h e s ( e ) ) , p a r e n t s ( t , e ) { c o n s t   s = [ ] ; l e t   i = t . p a r e n t N o d e ; f o r ( ; i & & i . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E & & 3 ! = = i . n o d e T y p e ; ) i . m a t c h e s ( e ) & & s . p u s h ( i ) , i = i . p a r e n t N o d e ; r e t u r n   s } , p r e v ( t , e ) { l e t   s = t . p r e v i o u s E l e m e n t S i b l i n g ; f o r ( ; s ; ) { i f ( s . m a t c h e s ( e ) ) r e t u r n [ s ] ; s = s . p r e v i o u s E l e m e n t S i b l i n g } r e t u r n [ ] } , n e x t ( t , e ) { l e t   s = t . n e x t E l e m e n t S i b l i n g ; f o r ( ; s ; ) { i f ( s . m a t c h e s ( e ) ) r e t u r n [ s ] ; s = s . n e x t E l e m e n t S i b l i n g } r e t u r n [ ] } } , n = t = > { d o { t + = M a t h . f l o o r ( 1 e 6 * M a t h . r a n d o m ( ) ) } w h i l e ( d o c u m e n t . g e t E l e m e n t B y I d ( t ) ) ; r e t u r n   t } , o = t = > { l e t   e = t . g e t A t t r i b u t e ( " d a t a - b s - t a r g e t " ) ; i f ( ! e | | " # " = = = e ) { l e t   s = t . g e t A t t r i b u t e ( " h r e f " ) ; i f ( ! s | | ! s . i n c l u d e s ( " # " ) & & ! s . s t a r t s W i t h ( " . " ) ) r e t u r n   n u l l ; s . i n c l u d e s ( " # " ) & & ! s . s t a r t s W i t h ( " # " ) & & ( s = " # " + s . s p l i t ( " # " ) [ 1 ] ) , e = s & & " # " ! = = s ? s . t r i m ( ) : n u l l } r e t u r n   e } , r = t = > { c o n s t   e = o ( t ) ; r e t u r n   e & & d o c u m e n t . q u e r y S e l e c t o r ( e ) ? e : n u l l } , a = t = > { c o n s t   e = o ( t ) ; r e t u r n   e ? d o c u m e n t . q u e r y S e l e c t o r ( e ) : n u l l } , l = t = > { t . d i s p a t c h E v e n t ( n e w   E v e n t ( " t r a n s i t i o n e n d " ) ) } , c = t = > ! ( ! t | | " o b j e c t " ! = t y p e o f   t ) & & ( v o i d   0 ! = = t . j q u e r y & & ( t = t [ 0 ] ) , v o i d   0 ! = = t . n o d e T y p e ) , h = t = > c ( t ) ? t . j q u e r y ? t [ 0 ] : t : " s t r i n g " = = t y p e o f   t & & t . l e n g t h > 0 ? i . f i n d O n e ( t ) : n u l l , d = ( t , e , s ) = > { O b j e c t . k e y s ( s ) . f o r E a c h ( i = > { c o n s t   n = s [ i ] , o = e [ i ] , r = o & & c ( o ) ? " e l e m e n t " : n u l l = = ( a = o ) ? " " + a : { } . t o S t r i n g . c a l l ( a ) . m a t c h ( / \ s ( [ a - z ] + ) / i ) [ 1 ] . t o L o w e r C a s e ( ) ; v a r   a ; i f ( ! n e w   R e g E x p ( n ) . t e s t ( r ) ) t h r o w   n e w   T y p e E r r o r ( ` $ { t . t o U p p e r C a s e ( ) } :   O p t i o n   " $ { i } "   p r o v i d e d   t y p e   " $ { r } "   b u t   e x p e c t e d   t y p e   " $ { n } " . ` ) } ) } , u = t = > ! ( ! c ( t ) | | 0 = = = t . g e t C l i e n t R e c t s ( ) . l e n g t h ) & & " v i s i b l e " = = = g e t C o m p u t e d S t y l e ( t ) . g e t P r o p e r t y V a l u e ( " v i s i b i l i t y " ) , g = t = > ! t | | t . n o d e T y p e ! = = N o d e . E L E M E N T _ N O D E | | ! ! t . c l a s s L i s t . c o n t a i n s ( " d i s a b l e d " ) | | ( v o i d   0 ! = = t . d i s a b l e d ? t . d i s a b l e d : t . h a s A t t r i b u t e ( " d i s a b l e d " ) & & " f a l s e " ! = = t . g e t A t t r i b u t e ( " d i s a b l e d " ) ) , p = t = > { i f ( ! d o c u m e n t . d o c u m e n t E l e m e n t . a t t a c h S h a d o w ) r e t u r n   n u l l ; i f ( " f u n c t i o n " = = t y p e o f   t . g e t R o o t N o d e ) { c o n s t   e = t . g e t R o o t N o d e ( ) ; r e t u r n   e   i n s t a n c e o f   S h a d o w R o o t ? e : n u l l } r e t u r n   t   i n s t a n c e o f   S h a d o w R o o t ? t : t . p a r e n t N o d e ? p ( t . p a r e n t N o d e ) : n u l l } , f = ( ) = > { } , m = t = > t . o f f s e t H e i g h t , _ = ( ) = > { c o n s t { j Q u e r y : t } = w i n d o w ; r e t u r n   t & & ! d o c u m e n t . b o d y . h a s A t t r i b u t e ( " d a t a - b s - n o - j q u e r y " ) ? t : n u l l } , b = [ ] , v = ( ) = > " r t l " = = = d o c u m e n t . d o c u m e n t E l e m e n t . d i r , y = t = > { v a r   e ; e = ( ) = > { c o n s t   e = _ ( ) ; i f ( e ) { c o n s t   s = t . N A M E , i = e . f n [ s ] ; e . f n [ s ] = t . j Q u e r y I n t e r f a c e , e . f n [ s ] . C o n s t r u c t o r = t , e . f n [ s ] . n o C o n f l i c t = ( ) = > ( e . f n [ s ] = i , t . j Q u e r y I n t e r f a c e ) } } , " l o a d i n g " = = = d o c u m e n t . r e a d y S t a t e ? ( b . l e n g t h | | d o c u m e n t . a d d E v e n t L i s t e n e r ( " D O M C o n t e n t L o a d e d " , ( ) = > { b . f o r E a c h ( t = > t ( ) ) } ) , b . p u s h ( e ) ) : e ( ) } , w = t = > { " f u n c t i o n " = = t y p e o f   t & & t ( ) } , E = ( t , e , s = ! 0 ) = > { i f ( ! s ) r e t u r n   v o i d   w ( t ) ; c o n s t   i = ( t = > { i f ( ! t ) r e t u r n   0 ; l e t { t r a n s i t i o n D u r a t i o n : e , t r a n s i t i o n D e l a y : s } = w i n d o w . g e t C o m p u t e d S t y l e ( t ) ; c o n s t   i = N u m b e r . p a r s e F l o a t ( e ) , n = N u m b e r . p a r s e F l o a t ( s ) ; r e t u r n   i | | n ? ( e = e . s p l i t ( " , " ) [ 0 ] , s = s . s p l i t ( " , " ) [ 0 ] , 1 e 3 * ( N u m b e r . p a r s e F l o a t ( e ) + N u m b e r . p a r s e F l o a t ( s ) ) ) : 0 } ) ( e ) + 5 ; l e t   n = ! 1 ; c o n s t   o = ( { t a r g e t : s } ) = > { s = = = e & & ( n = ! 0 , e . r e m o v e E v e n t L i s t e n e r ( " t r a n s i t i o n e n d " , o ) , w ( t ) ) } ; e . a d d E v e n t L i s t e n e r ( " t r a n s i t i o n e n d " , o ) , s e t T i m e o u t ( ( ) = > { n | | l ( e ) } , i ) } , A = ( t , e , s , i ) = > { l e t   n = t . i n d e x O f ( e ) ; i f ( - 1 = = = n ) r e t u r n   t [ ! s & & i ? t . l e n g t h - 1 : 0 ] ; c o n s t   o = t . l e n g t h ; r e t u r n   n + = s ? 1 : - 1 , i & & ( n = ( n + o ) % o ) , t [ M a t h . m a x ( 0 , M a t h . m i n ( n , o - 1 ) ) ] } , T = / [ ^ . ] * ( ? = \ . . * ) \ . | . * / , C = / \ . . * / , k = / : : \ d + $ / , L = { } ; l e t   O = 1 ; c o n s t   D = { m o u s e e n t e r : " m o u s e o v e r " , m o u s e l e a v e : " m o u s e o u t " } , I = / ^ ( m o u s e e n t e r | m o u s e l e a v e ) / i , N = n e w   S e t ( [ " c l i c k " , " d b l c l i c k " , " m o u s e u p " , " m o u s e d o w n " , " c o n t e x t m e n u " , " m o u s e w h e e l " , " D O M M o u s e S c r o l l " , " m o u s e o v e r " , " m o u s e o u t " , " m o u s e m o v e " , " s e l e c t s t a r t " , " s e l e c t e n d " , " k e y d o w n " , " k e y p r e s s " , " k e y u p " , " o r i e n t a t i o n c h a n g e " , " t o u c h s t a r t " , " t o u c h m o v e " , " t o u c h e n d " , " t o u c h c a n c e l " , " p o i n t e r d o w n " , " p o i n t e r m o v e " , " p o i n t e r u p " , " p o i n t e r l e a v e " , " p o i n t e r c a n c e l " , " g e s t u r e s t a r t " , " g e s t u r e c h a n g e " , " g e s t u r e e n d " , " f o c u s " , " b l u r " , " c h a n g e " , " r e s e t " , " s e l e c t " , " s u b m i t " , " f o c u s i n " , " f o c u s o u t " , " l o a d " , " u n l o a d " , " b e f o r e u n l o a d " , " r e s i z e " , " m o v e " , " D O M C o n t e n t L o a d e d " , " r e a d y s t a t e c h a n g e " , " e r r o r " , " a b o r t " , " s c r o l l " ] ) ; f u n c t i o n   S ( t , e ) { r e t u r n   e & & ` $ { e } : : $ { O + + } ` | | t . u i d E v e n t | | O + + } f u n c t i o n   x ( t ) { c o n s t   e = S ( t ) ; r e t u r n   t . u i d E v e n t = e , L [ e ] = L [ e ] | | { } , L [ e ] } f u n c t i o n   M ( t , e , s = n u l l ) { c o n s t   i = O b j e c t . k e y s ( t ) ; f o r ( l e t   n = 0 , o = i . l e n g t h ; n < o ; n + + ) { c o n s t   o = t [ i [ n ] ] ; i f ( o . o r i g i n a l H a n d l e r = = = e & & o . d e l e g a t i o n S e l e c t o r = = = s ) r e t u r n   o } r e t u r n   n u l l } f u n c t i o n   P ( t , e , s ) { c o n s t   i = " s t r i n g " = = t y p e o f   e , n = i ? s : e ; l e t   o = R ( t ) ; r e t u r n   N . h a s ( o ) | | ( o = t ) , [ i , n , o ] } f u n c t i o n   j ( t , e , s , i , n ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n ; i f ( s | | ( s = i , i = n u l l ) , I . t e s t ( e ) ) { c o n s t   t = t = > f u n c t i o n ( e ) { i f ( ! e . r e l a t e d T a r g e t | | e . r e l a t e d T a r g e t ! = = e . d e l e g a t e T a r g e t & & ! e . d e l e g a t e T a r g e t . c o n t a i n s ( e . r e l a t e d T a r g e t ) ) r e t u r n   t . c a l l ( t h i s , e ) } ; i ? i = t ( i ) : s = t ( s ) } c o n s t [ o , r , a ] = P ( e , s , i ) , l = x ( t ) , c = l [ a ] | | ( l [ a ] = { } ) , h = M ( c , r , o ? s : n u l l ) ; i f ( h ) r e t u r n   v o i d ( h . o n e O f f = h . o n e O f f & & n ) ; c o n s t   d = S ( r , e . r e p l a c e ( T , " " ) ) , u = o ? f u n c t i o n ( t , e , s ) { r e t u r n   f u n c t i o n   i ( n ) { c o n s t   o = t . q u e r y S e l e c t o r A l l ( e ) ; f o r ( l e t { t a r g e t : r } = n ; r & & r ! = = t h i s ; r = r . p a r e n t N o d e ) f o r ( l e t   a = o . l e n g t h ; a - - ; ) i f ( o [ a ] = = = r ) r e t u r n   n . d e l e g a t e T a r g e t = r , i . o n e O f f & & B . o f f ( t , n . t y p e , e , s ) , s . a p p l y ( r , [ n ] ) ; r e t u r n   n u l l } } ( t , s , i ) : f u n c t i o n ( t , e ) { r e t u r n   f u n c t i o n   s ( i ) { r e t u r n   i . d e l e g a t e T a r g e t = t , s . o n e O f f & & B . o f f ( t , i . t y p e , e ) , e . a p p l y ( t , [ i ] ) } } ( t , s ) ; u . d e l e g a t i o n S e l e c t o r = o ? s : n u l l , u . o r i g i n a l H a n d l e r = r , u . o n e O f f = n , u . u i d E v e n t = d , c [ d ] = u , t . a d d E v e n t L i s t e n e r ( a , u , o ) } f u n c t i o n   H ( t , e , s , i , n ) { c o n s t   o = M ( e [ s ] , i , n ) ; o & & ( t . r e m o v e E v e n t L i s t e n e r ( s , o , B o o l e a n ( n ) ) , d e l e t e   e [ s ] [ o . u i d E v e n t ] ) } f u n c t i o n   R ( t ) { r e t u r n   t = t . r e p l a c e ( C , " " ) , D [ t ] | | t } c o n s t   B = { o n ( t , e , s , i ) { j ( t , e , s , i , ! 1 ) } , o n e ( t , e , s , i ) { j ( t , e , s , i , ! 0 ) } , o f f ( t , e , s , i ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n ; c o n s t [ n , o , r ] = P ( e , s , i ) , a = r ! = = e , l = x ( t ) , c = e . s t a r t s W i t h ( " . " ) ; i f ( v o i d   0 ! = = o ) { i f ( ! l | | ! l [ r ] ) r e t u r n ; r e t u r n   v o i d   H ( t , l , r , o , n ? s : n u l l ) } c & & O b j e c t . k e y s ( l ) . f o r E a c h ( s = > { ! f u n c t i o n ( t , e , s , i ) { c o n s t   n = e [ s ] | | { } ; O b j e c t . k e y s ( n ) . f o r E a c h ( o = > { i f ( o . i n c l u d e s ( i ) ) { c o n s t   i = n [ o ] ; H ( t , e , s , i . o r i g i n a l H a n d l e r , i . d e l e g a t i o n S e l e c t o r ) } } ) } ( t , l , s , e . s l i c e ( 1 ) ) } ) ; c o n s t   h = l [ r ] | | { } ; O b j e c t . k e y s ( h ) . f o r E a c h ( s = > { c o n s t   i = s . r e p l a c e ( k , " " ) ; i f ( ! a | | e . i n c l u d e s ( i ) ) { c o n s t   e = h [ s ] ; H ( t , l , r , e . o r i g i n a l H a n d l e r , e . d e l e g a t i o n S e l e c t o r ) } } ) } , t r i g g e r ( t , e , s ) { i f ( " s t r i n g " ! = t y p e o f   e | | ! t ) r e t u r n   n u l l ; c o n s t   i = _ ( ) , n = R ( e ) , o = e ! = = n , r = N . h a s ( n ) ; l e t   a , l = ! 0 , c = ! 0 , h = ! 1 , d = n u l l ; r e t u r n   o & & i & & ( a = i . E v e n t ( e , s ) , i ( t ) . t r i g g e r ( a ) , l = ! a . i s P r o p a g a t i o n S t o p p e d ( ) , c = ! a . i s I m m e d i a t e P r o p a g a t i o n S t o p p e d ( ) , h = a . i s D e f a u l t P r e v e n t e d ( ) ) , r ? ( d = d o c u m e n t . c r e a t e E v e n t ( " H T M L E v e n t s " ) , d . i n i t E v e n t ( n , l , ! 0 ) ) : d = n e w   C u s t o m E v e n t ( e , { b u b b l e s : l , c a n c e l a b l e : ! 0 } ) , v o i d   0 ! = = s & & O b j e c t . k e y s ( s ) . f o r E a c h ( t = > { O b j e c t . d e f i n e P r o p e r t y ( d , t , { g e t : ( ) = > s [ t ] } ) } ) , h & & d . p r e v e n t D e f a u l t ( ) , c & & t . d i s p a t c h E v e n t ( d ) , d . d e f a u l t P r e v e n t e d & & v o i d   0 ! = = a & & a . p r e v e n t D e f a u l t ( ) , d } } , $ = n e w   M a p ; v a r   W = { s e t ( t , e , s ) { $ . h a s ( t ) | | $ . s e t ( t , n e w   M a p ) ; c o n s t   i = $ . g e t ( t ) ; i . h a s ( e ) | | 0 = = = i . s i z e ? i . s e t ( e , s ) : c o n s o l e . e r r o r ( ` B o o t s t r a p   d o e s n ' t   a l l o w   m o r e   t h a n   o n e   i n s t a n c e   p e r   e l e m e n t .   B o u n d   i n s t a n c e :   $ { A r r a y . f r o m ( i . k e y s ( ) ) [ 0 ] } . ` ) } , g e t : ( t , e ) = > $ . h a s ( t ) & & $ . g e t ( t ) . g e t ( e ) | | n u l l , r e m o v e ( t , e ) { i f ( ! $ . h a s ( t ) ) r e t u r n ; c o n s t   s = $ . g e t ( t ) ; s . d e l e t e ( e ) , 0 = = = s . s i z e & & $ . d e l e t e ( t ) } } ; c l a s s   q { c o n s t r u c t o r ( t ) { ( t = h ( t ) ) & & ( t h i s . _ e l e m e n t = t , W . s e t ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . D A T A _ K E Y , t h i s ) ) } d i s p o s e ( ) { W . r e m o v e ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . D A T A _ K E Y ) , B . o f f ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E V E N T _ K E Y ) , O b j e c t . g e t O w n P r o p e r t y N a m e s ( t h i s ) . f o r E a c h ( t = > { t h i s [ t ] = n u l l } ) } _ q u e u e C a l l b a c k ( t , e , s = ! 0 ) { E ( t , e , s ) } s t a t i c   g e t I n s t a n c e ( t ) { r e t u r n   W . g e t ( t , t h i s . D A T A _ K E Y ) } s t a t i c   g e t O r C r e a t e I n s t a n c e ( t , e = { } ) { r e t u r n   t h i s . g e t I n s t a n c e ( t ) | | n e w   t h i s ( t , " o b j e c t " = = t y p e o f   e ? e : n u l l ) } s t a t i c   g e t   V E R S I O N ( ) { r e t u r n " 5 . 0 . 2 " } s t a t i c   g e t   N A M E ( ) { t h r o w   n e w   E r r o r ( ' Y o u   h a v e   t o   i m p l e m e n t   t h e   s t a t i c   m e t h o d   " N A M E " ,   f o r   e a c h   c o m p o n e n t ! ' ) } s t a t i c   g e t   D A T A _ K E Y ( ) { r e t u r n " b s . " + t h i s . N A M E } s t a t i c   g e t   E V E N T _ K E Y ( ) { r e t u r n " . " + t h i s . D A T A _ K E Y } } c l a s s   z   e x t e n d s   q { s t a t i c   g e t   N A M E ( ) { r e t u r n " a l e r t " } c l o s e ( t ) { c o n s t   e = t ? t h i s . _ g e t R o o t E l e m e n t ( t ) : t h i s . _ e l e m e n t , s = t h i s . _ t r i g g e r C l o s e E v e n t ( e ) ; n u l l = = = s | | s . d e f a u l t P r e v e n t e d | | t h i s . _ r e m o v e E l e m e n t ( e ) } _ g e t R o o t E l e m e n t ( t ) { r e t u r n   a ( t ) | | t . c l o s e s t ( " . a l e r t " ) } _ t r i g g e r C l o s e E v e n t ( t ) { r e t u r n   B . t r i g g e r ( t , " c l o s e . b s . a l e r t " ) } _ r e m o v e E l e m e n t ( t ) { t . c l a s s L i s t . r e m o v e ( " s h o w " ) ; c o n s t   e = t . c l a s s L i s t . c o n t a i n s ( " f a d e " ) ; t h i s . _ q u e u e C a l l b a c k ( ( ) = > t h i s . _ d e s t r o y E l e m e n t ( t ) , t , e ) } _ d e s t r o y E l e m e n t ( t ) { t . r e m o v e ( ) , B . t r i g g e r ( t , " c l o s e d . b s . a l e r t " ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = z . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; " c l o s e " = = = t & & e [ t ] ( t h i s ) } ) ) } s t a t i c   h a n d l e D i s m i s s ( t ) { r e t u r n   f u n c t i o n ( e ) { e & & e . p r e v e n t D e f a u l t ( ) , t . c l o s e ( t h i s ) } } } B . o n ( d o c u m e n t , " c l i c k . b s . a l e r t . d a t a - a p i " , ' [ d a t a - b s - d i s m i s s = " a l e r t " ] ' , z . h a n d l e D i s m i s s ( n e w   z ) ) , y ( z ) ; c l a s s   F   e x t e n d s   q { s t a t i c   g e t   N A M E ( ) { r e t u r n " b u t t o n " } t o g g l e ( ) { t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - p r e s s e d " , t h i s . _ e l e m e n t . c l a s s L i s t . t o g g l e ( " a c t i v e " ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = F . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; " t o g g l e " = = = t & & e [ t ] ( ) } ) ) } } f u n c t i o n   U ( t ) { r e t u r n " t r u e " = = = t | | " f a l s e " ! = = t & & ( t = = = N u m b e r ( t ) . t o S t r i n g ( ) ? N u m b e r ( t ) : " " = = = t | | " n u l l " = = = t ? n u l l : t ) } f u n c t i o n   K ( t ) { r e t u r n   t . r e p l a c e ( / [ A - Z ] / g , t = > " - " + t . t o L o w e r C a s e ( ) ) } B . o n ( d o c u m e n t , " c l i c k . b s . b u t t o n . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " b u t t o n " ] ' , t = > { t . p r e v e n t D e f a u l t ( ) ; c o n s t   e = t . t a r g e t . c l o s e s t ( ' [ d a t a - b s - t o g g l e = " b u t t o n " ] ' ) ; F . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( ) } ) , y ( F ) ; c o n s t   V = { s e t D a t a A t t r i b u t e ( t , e , s ) { t . s e t A t t r i b u t e ( " d a t a - b s - " + K ( e ) , s ) } , r e m o v e D a t a A t t r i b u t e ( t , e ) { t . r e m o v e A t t r i b u t e ( " d a t a - b s - " + K ( e ) ) } , g e t D a t a A t t r i b u t e s ( t ) { i f ( ! t ) r e t u r n { } ; c o n s t   e = { } ; r e t u r n   O b j e c t . k e y s ( t . d a t a s e t ) . f i l t e r ( t = > t . s t a r t s W i t h ( " b s " ) ) . f o r E a c h ( s = > { l e t   i = s . r e p l a c e ( / ^ b s / , " " ) ; i = i . c h a r A t ( 0 ) . t o L o w e r C a s e ( ) + i . s l i c e ( 1 , i . l e n g t h ) , e [ i ] = U ( t . d a t a s e t [ s ] ) } ) , e } , g e t D a t a A t t r i b u t e : ( t , e ) = > U ( t . g e t A t t r i b u t e ( " d a t a - b s - " + K ( e ) ) ) , o f f s e t ( t ) { c o n s t   e = t . g e t B o u n d i n g C l i e n t R e c t ( ) ; r e t u r n { t o p : e . t o p + d o c u m e n t . b o d y . s c r o l l T o p , l e f t : e . l e f t + d o c u m e n t . b o d y . s c r o l l L e f t } } , p o s i t i o n : t = > ( { t o p : t . o f f s e t T o p , l e f t : t . o f f s e t L e f t } ) } , Q = { i n t e r v a l : 5 e 3 , k e y b o a r d : ! 0 , s l i d e : ! 1 , p a u s e : " h o v e r " , w r a p : ! 0 , t o u c h : ! 0 } , X = { i n t e r v a l : " ( n u m b e r | b o o l e a n ) " , k e y b o a r d : " b o o l e a n " , s l i d e : " ( b o o l e a n | s t r i n g ) " , p a u s e : " ( s t r i n g | b o o l e a n ) " , w r a p : " b o o l e a n " , t o u c h : " b o o l e a n " } , Y = " n e x t " , G = " p r e v " , Z = " l e f t " , J = " r i g h t " , t t = { A r r o w L e f t : J , A r r o w R i g h t : Z } ; c l a s s   e t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ i t e m s = n u l l , t h i s . _ i n t e r v a l = n u l l , t h i s . _ a c t i v e E l e m e n t = n u l l , t h i s . _ i s P a u s e d = ! 1 , t h i s . _ i s S l i d i n g = ! 1 , t h i s . t o u c h T i m e o u t = n u l l , t h i s . t o u c h S t a r t X = 0 , t h i s . t o u c h D e l t a X = 0 , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ i n d i c a t o r s E l e m e n t = i . f i n d O n e ( " . c a r o u s e l - i n d i c a t o r s " , t h i s . _ e l e m e n t ) , t h i s . _ t o u c h S u p p o r t e d = " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t | | n a v i g a t o r . m a x T o u c h P o i n t s > 0 , t h i s . _ p o i n t e r E v e n t = B o o l e a n ( w i n d o w . P o i n t e r E v e n t ) , t h i s . _ a d d E v e n t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   Q } s t a t i c   g e t   N A M E ( ) { r e t u r n " c a r o u s e l " } n e x t ( ) { t h i s . _ s l i d e ( Y ) } n e x t W h e n V i s i b l e ( ) { ! d o c u m e n t . h i d d e n & & u ( t h i s . _ e l e m e n t ) & & t h i s . n e x t ( ) } p r e v ( ) { t h i s . _ s l i d e ( G ) } p a u s e ( t ) { t | | ( t h i s . _ i s P a u s e d = ! 0 ) , i . f i n d O n e ( " . c a r o u s e l - i t e m - n e x t ,   . c a r o u s e l - i t e m - p r e v " , t h i s . _ e l e m e n t ) & & ( l ( t h i s . _ e l e m e n t ) , t h i s . c y c l e ( ! 0 ) ) , c l e a r I n t e r v a l ( t h i s . _ i n t e r v a l ) , t h i s . _ i n t e r v a l = n u l l } c y c l e ( t ) { t | | ( t h i s . _ i s P a u s e d = ! 1 ) , t h i s . _ i n t e r v a l & & ( c l e a r I n t e r v a l ( t h i s . _ i n t e r v a l ) , t h i s . _ i n t e r v a l = n u l l ) , t h i s . _ c o n f i g & & t h i s . _ c o n f i g . i n t e r v a l & & ! t h i s . _ i s P a u s e d & & ( t h i s . _ u p d a t e I n t e r v a l ( ) , t h i s . _ i n t e r v a l = s e t I n t e r v a l ( ( d o c u m e n t . v i s i b i l i t y S t a t e ? t h i s . n e x t W h e n V i s i b l e : t h i s . n e x t ) . b i n d ( t h i s ) , t h i s . _ c o n f i g . i n t e r v a l ) ) } t o ( t ) { t h i s . _ a c t i v e E l e m e n t = i . f i n d O n e ( " . a c t i v e . c a r o u s e l - i t e m " , t h i s . _ e l e m e n t ) ; c o n s t   e = t h i s . _ g e t I t e m I n d e x ( t h i s . _ a c t i v e E l e m e n t ) ; i f ( t > t h i s . _ i t e m s . l e n g t h - 1 | | t < 0 ) r e t u r n ; i f ( t h i s . _ i s S l i d i n g ) r e t u r n   v o i d   B . o n e ( t h i s . _ e l e m e n t , " s l i d . b s . c a r o u s e l " , ( ) = > t h i s . t o ( t ) ) ; i f ( e = = = t ) r e t u r n   t h i s . p a u s e ( ) , v o i d   t h i s . c y c l e ( ) ; c o n s t   s = t > e ? Y : G ; t h i s . _ s l i d e ( s , t h i s . _ i t e m s [ t ] ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . Q , . . . V . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , d ( " c a r o u s e l " , t , X ) , t } _ h a n d l e S w i p e ( ) { c o n s t   t = M a t h . a b s ( t h i s . t o u c h D e l t a X ) ; i f ( t < = 4 0 ) r e t u r n ; c o n s t   e = t / t h i s . t o u c h D e l t a X ; t h i s . t o u c h D e l t a X = 0 , e & & t h i s . _ s l i d e ( e > 0 ? J : Z ) } _ a d d E v e n t L i s t e n e r s ( ) { t h i s . _ c o n f i g . k e y b o a r d & & B . o n ( t h i s . _ e l e m e n t , " k e y d o w n . b s . c a r o u s e l " , t = > t h i s . _ k e y d o w n ( t ) ) , " h o v e r " = = = t h i s . _ c o n f i g . p a u s e & & ( B . o n ( t h i s . _ e l e m e n t , " m o u s e e n t e r . b s . c a r o u s e l " , t = > t h i s . p a u s e ( t ) ) , B . o n ( t h i s . _ e l e m e n t , " m o u s e l e a v e . b s . c a r o u s e l " , t = > t h i s . c y c l e ( t ) ) ) , t h i s . _ c o n f i g . t o u c h & & t h i s . _ t o u c h S u p p o r t e d & & t h i s . _ a d d T o u c h E v e n t L i s t e n e r s ( ) } _ a d d T o u c h E v e n t L i s t e n e r s ( ) { c o n s t   t = t = > { ! t h i s . _ p o i n t e r E v e n t | | " p e n " ! = = t . p o i n t e r T y p e & & " t o u c h " ! = = t . p o i n t e r T y p e ? t h i s . _ p o i n t e r E v e n t | | ( t h i s . t o u c h S t a r t X = t . t o u c h e s [ 0 ] . c l i e n t X ) : t h i s . t o u c h S t a r t X = t . c l i e n t X } , e = t = > { t h i s . t o u c h D e l t a X = t . t o u c h e s & & t . t o u c h e s . l e n g t h > 1 ? 0 : t . t o u c h e s [ 0 ] . c l i e n t X - t h i s . t o u c h S t a r t X } , s = t = > { ! t h i s . _ p o i n t e r E v e n t | | " p e n " ! = = t . p o i n t e r T y p e & & " t o u c h " ! = = t . p o i n t e r T y p e | | ( t h i s . t o u c h D e l t a X = t . c l i e n t X - t h i s . t o u c h S t a r t X ) , t h i s . _ h a n d l e S w i p e ( ) , " h o v e r " = = = t h i s . _ c o n f i g . p a u s e & & ( t h i s . p a u s e ( ) , t h i s . t o u c h T i m e o u t & & c l e a r T i m e o u t ( t h i s . t o u c h T i m e o u t ) , t h i s . t o u c h T i m e o u t = s e t T i m e o u t ( t = > t h i s . c y c l e ( t ) , 5 0 0 + t h i s . _ c o n f i g . i n t e r v a l ) ) } ; i . f i n d ( " . c a r o u s e l - i t e m   i m g " , t h i s . _ e l e m e n t ) . f o r E a c h ( t = > { B . o n ( t , " d r a g s t a r t . b s . c a r o u s e l " , t = > t . p r e v e n t D e f a u l t ( ) ) } ) , t h i s . _ p o i n t e r E v e n t ? ( B . o n ( t h i s . _ e l e m e n t , " p o i n t e r d o w n . b s . c a r o u s e l " , e = > t ( e ) ) , B . o n ( t h i s . _ e l e m e n t , " p o i n t e r u p . b s . c a r o u s e l " , t = > s ( t ) ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " p o i n t e r - e v e n t " ) ) : ( B . o n ( t h i s . _ e l e m e n t , " t o u c h s t a r t . b s . c a r o u s e l " , e = > t ( e ) ) , B . o n ( t h i s . _ e l e m e n t , " t o u c h m o v e . b s . c a r o u s e l " , t = > e ( t ) ) , B . o n ( t h i s . _ e l e m e n t , " t o u c h e n d . b s . c a r o u s e l " , t = > s ( t ) ) ) } _ k e y d o w n ( t ) { i f ( / i n p u t | t e x t a r e a / i . t e s t ( t . t a r g e t . t a g N a m e ) ) r e t u r n ; c o n s t   e = t t [ t . k e y ] ; e & & ( t . p r e v e n t D e f a u l t ( ) , t h i s . _ s l i d e ( e ) ) } _ g e t I t e m I n d e x ( t ) { r e t u r n   t h i s . _ i t e m s = t & & t . p a r e n t N o d e ? i . f i n d ( " . c a r o u s e l - i t e m " , t . p a r e n t N o d e ) : [ ] , t h i s . _ i t e m s . i n d e x O f ( t ) } _ g e t I t e m B y O r d e r ( t , e ) { c o n s t   s = t = = = Y ; r e t u r n   A ( t h i s . _ i t e m s , e , s , t h i s . _ c o n f i g . w r a p ) } _ t r i g g e r S l i d e E v e n t ( t , e ) { c o n s t   s = t h i s . _ g e t I t e m I n d e x ( t ) , n = t h i s . _ g e t I t e m I n d e x ( i . f i n d O n e ( " . a c t i v e . c a r o u s e l - i t e m " , t h i s . _ e l e m e n t ) ) ; r e t u r n   B . t r i g g e r ( t h i s . _ e l e m e n t , " s l i d e . b s . c a r o u s e l " , { r e l a t e d T a r g e t : t , d i r e c t i o n : e , f r o m : n , t o : s } ) } _ s e t A c t i v e I n d i c a t o r E l e m e n t ( t ) { i f ( t h i s . _ i n d i c a t o r s E l e m e n t ) { c o n s t   e = i . f i n d O n e ( " . a c t i v e " , t h i s . _ i n d i c a t o r s E l e m e n t ) ; e . c l a s s L i s t . r e m o v e ( " a c t i v e " ) , e . r e m o v e A t t r i b u t e ( " a r i a - c u r r e n t " ) ; c o n s t   s = i . f i n d ( " [ d a t a - b s - t a r g e t ] " , t h i s . _ i n d i c a t o r s E l e m e n t ) ; f o r ( l e t   e = 0 ; e < s . l e n g t h ; e + + ) i f ( N u m b e r . p a r s e I n t ( s [ e ] . g e t A t t r i b u t e ( " d a t a - b s - s l i d e - t o " ) , 1 0 ) = = = t h i s . _ g e t I t e m I n d e x ( t ) ) { s [ e ] . c l a s s L i s t . a d d ( " a c t i v e " ) , s [ e ] . s e t A t t r i b u t e ( " a r i a - c u r r e n t " , " t r u e " ) ; b r e a k } } } _ u p d a t e I n t e r v a l ( ) { c o n s t   t = t h i s . _ a c t i v e E l e m e n t | | i . f i n d O n e ( " . a c t i v e . c a r o u s e l - i t e m " , t h i s . _ e l e m e n t ) ; i f ( ! t ) r e t u r n ; c o n s t   e = N u m b e r . p a r s e I n t ( t . g e t A t t r i b u t e ( " d a t a - b s - i n t e r v a l " ) , 1 0 ) ; e ? ( t h i s . _ c o n f i g . d e f a u l t I n t e r v a l = t h i s . _ c o n f i g . d e f a u l t I n t e r v a l | | t h i s . _ c o n f i g . i n t e r v a l , t h i s . _ c o n f i g . i n t e r v a l = e ) : t h i s . _ c o n f i g . i n t e r v a l = t h i s . _ c o n f i g . d e f a u l t I n t e r v a l | | t h i s . _ c o n f i g . i n t e r v a l } _ s l i d e ( t , e ) { c o n s t   s = t h i s . _ d i r e c t i o n T o O r d e r ( t ) , n = i . f i n d O n e ( " . a c t i v e . c a r o u s e l - i t e m " , t h i s . _ e l e m e n t ) , o = t h i s . _ g e t I t e m I n d e x ( n ) , r = e | | t h i s . _ g e t I t e m B y O r d e r ( s , n ) , a = t h i s . _ g e t I t e m I n d e x ( r ) , l = B o o l e a n ( t h i s . _ i n t e r v a l ) , c = s = = = Y , h = c ? " c a r o u s e l - i t e m - s t a r t " : " c a r o u s e l - i t e m - e n d " , d = c ? " c a r o u s e l - i t e m - n e x t " : " c a r o u s e l - i t e m - p r e v " , u = t h i s . _ o r d e r T o D i r e c t i o n ( s ) ; i f ( r & & r . c l a s s L i s t . c o n t a i n s ( " a c t i v e " ) ) r e t u r n   v o i d ( t h i s . _ i s S l i d i n g = ! 1 ) ; i f ( t h i s . _ i s S l i d i n g ) r e t u r n ; i f ( t h i s . _ t r i g g e r S l i d e E v e n t ( r , u ) . d e f a u l t P r e v e n t e d ) r e t u r n ; i f ( ! n | | ! r ) r e t u r n ; t h i s . _ i s S l i d i n g = ! 0 , l & & t h i s . p a u s e ( ) , t h i s . _ s e t A c t i v e I n d i c a t o r E l e m e n t ( r ) , t h i s . _ a c t i v e E l e m e n t = r ; c o n s t   g = ( ) = > { B . t r i g g e r ( t h i s . _ e l e m e n t , " s l i d . b s . c a r o u s e l " , { r e l a t e d T a r g e t : r , d i r e c t i o n : u , f r o m : o , t o : a } ) } ; i f ( t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s l i d e " ) ) { r . c l a s s L i s t . a d d ( d ) , m ( r ) , n . c l a s s L i s t . a d d ( h ) , r . c l a s s L i s t . a d d ( h ) ; c o n s t   t = ( ) = > { r . c l a s s L i s t . r e m o v e ( h , d ) , r . c l a s s L i s t . a d d ( " a c t i v e " ) , n . c l a s s L i s t . r e m o v e ( " a c t i v e " , d , h ) , t h i s . _ i s S l i d i n g = ! 1 , s e t T i m e o u t ( g , 0 ) } ; t h i s . _ q u e u e C a l l b a c k ( t , n , ! 0 ) } e l s e   n . c l a s s L i s t . r e m o v e ( " a c t i v e " ) , r . c l a s s L i s t . a d d ( " a c t i v e " ) , t h i s . _ i s S l i d i n g = ! 1 , g ( ) ; l & & t h i s . c y c l e ( ) } _ d i r e c t i o n T o O r d e r ( t ) { r e t u r n [ J , Z ] . i n c l u d e s ( t ) ? v ( ) ? t = = = Z ? G : Y : t = = = Z ? Y : G : t } _ o r d e r T o D i r e c t i o n ( t ) { r e t u r n [ Y , G ] . i n c l u d e s ( t ) ? v ( ) ? t = = = G ? Z : J : t = = = G ? J : Z : t } s t a t i c   c a r o u s e l I n t e r f a c e ( t , e ) { c o n s t   s = e t . g e t O r C r e a t e I n s t a n c e ( t , e ) ; l e t { _ c o n f i g : i } = s ; " o b j e c t " = = t y p e o f   e & & ( i = { . . . i , . . . e } ) ; c o n s t   n = " s t r i n g " = = t y p e o f   e ? e : i . s l i d e ; i f ( " n u m b e r " = = t y p e o f   e ) s . t o ( e ) ; e l s e   i f ( " s t r i n g " = = t y p e o f   n ) { i f ( v o i d   0 = = = s [ n ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { n } " ` ) ; s [ n ] ( ) } e l s e   i . i n t e r v a l & & i . r i d e & & ( s . p a u s e ( ) , s . c y c l e ( ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { e t . c a r o u s e l I n t e r f a c e ( t h i s , t ) } ) ) } s t a t i c   d a t a A p i C l i c k H a n d l e r ( t ) { c o n s t   e = a ( t h i s ) ; i f ( ! e | | ! e . c l a s s L i s t . c o n t a i n s ( " c a r o u s e l " ) ) r e t u r n ; c o n s t   s = { . . . V . g e t D a t a A t t r i b u t e s ( e ) , . . . V . g e t D a t a A t t r i b u t e s ( t h i s ) } , i = t h i s . g e t A t t r i b u t e ( " d a t a - b s - s l i d e - t o " ) ; i & & ( s . i n t e r v a l = ! 1 ) , e t . c a r o u s e l I n t e r f a c e ( e , s ) , i & & e t . g e t I n s t a n c e ( e ) . t o ( i ) , t . p r e v e n t D e f a u l t ( ) } } B . o n ( d o c u m e n t , " c l i c k . b s . c a r o u s e l . d a t a - a p i " , " [ d a t a - b s - s l i d e ] ,   [ d a t a - b s - s l i d e - t o ] " , e t . d a t a A p i C l i c k H a n d l e r ) , B . o n ( w i n d o w , " l o a d . b s . c a r o u s e l . d a t a - a p i " , ( ) = > { c o n s t   t = i . f i n d ( ' [ d a t a - b s - r i d e = " c a r o u s e l " ] ' ) ; f o r ( l e t   e = 0 , s = t . l e n g t h ; e < s ; e + + ) e t . c a r o u s e l I n t e r f a c e ( t [ e ] , e t . g e t I n s t a n c e ( t [ e ] ) ) } ) , y ( e t ) ; c o n s t   s t = { t o g g l e : ! 0 , p a r e n t : " " } , i t = { t o g g l e : " b o o l e a n " , p a r e n t : " ( s t r i n g | e l e m e n t ) " } ; c l a s s   n t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ t r i g g e r A r r a y = i . f i n d ( ` [ d a t a - b s - t o g g l e = " c o l l a p s e " ] [ h r e f = " # $ { t h i s . _ e l e m e n t . i d } " ] , [ d a t a - b s - t o g g l e = " c o l l a p s e " ] [ d a t a - b s - t a r g e t = " # $ { t h i s . _ e l e m e n t . i d } " ] ` ) ; c o n s t   s = i . f i n d ( ' [ d a t a - b s - t o g g l e = " c o l l a p s e " ] ' ) ; f o r ( l e t   t = 0 , e = s . l e n g t h ; t < e ; t + + ) { c o n s t   e = s [ t ] , n = r ( e ) , o = i . f i n d ( n ) . f i l t e r ( t = > t = = = t h i s . _ e l e m e n t ) ; n u l l ! = = n & & o . l e n g t h & & ( t h i s . _ s e l e c t o r = n , t h i s . _ t r i g g e r A r r a y . p u s h ( e ) ) } t h i s . _ p a r e n t = t h i s . _ c o n f i g . p a r e n t ? t h i s . _ g e t P a r e n t ( ) : n u l l , t h i s . _ c o n f i g . p a r e n t | | t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( t h i s . _ e l e m e n t , t h i s . _ t r i g g e r A r r a y ) , t h i s . _ c o n f i g . t o g g l e & & t h i s . t o g g l e ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   s t } s t a t i c   g e t   N A M E ( ) { r e t u r n " c o l l a p s e " } t o g g l e ( ) { t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ? t h i s . h i d e ( ) : t h i s . s h o w ( ) } s h o w ( ) { i f ( t h i s . _ i s T r a n s i t i o n i n g | | t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ) r e t u r n ; l e t   t , e ; t h i s . _ p a r e n t & & ( t = i . f i n d ( " . s h o w ,   . c o l l a p s i n g " , t h i s . _ p a r e n t ) . f i l t e r ( t = > " s t r i n g " = = t y p e o f   t h i s . _ c o n f i g . p a r e n t ? t . g e t A t t r i b u t e ( " d a t a - b s - p a r e n t " ) = = = t h i s . _ c o n f i g . p a r e n t : t . c l a s s L i s t . c o n t a i n s ( " c o l l a p s e " ) ) , 0 = = = t . l e n g t h & & ( t = n u l l ) ) ; c o n s t   s = i . f i n d O n e ( t h i s . _ s e l e c t o r ) ; i f ( t ) { c o n s t   i = t . f i n d ( t = > s ! = = t ) ; i f ( e = i ? n t . g e t I n s t a n c e ( i ) : n u l l , e & & e . _ i s T r a n s i t i o n i n g ) r e t u r n } i f ( B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . c o l l a p s e " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t & & t . f o r E a c h ( t = > { s ! = = t & & n t . c o l l a p s e I n t e r f a c e ( t , " h i d e " ) , e | | W . s e t ( t , " b s . c o l l a p s e " , n u l l ) } ) ; c o n s t   n = t h i s . _ g e t D i m e n s i o n ( ) ; t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " c o l l a p s e " ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " c o l l a p s i n g " ) , t h i s . _ e l e m e n t . s t y l e [ n ] = 0 , t h i s . _ t r i g g e r A r r a y . l e n g t h & & t h i s . _ t r i g g e r A r r a y . f o r E a c h ( t = > { t . c l a s s L i s t . r e m o v e ( " c o l l a p s e d " ) , t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 0 ) } ) , t h i s . s e t T r a n s i t i o n i n g ( ! 0 ) ; c o n s t   o = " s c r o l l " + ( n [ 0 ] . t o U p p e r C a s e ( ) + n . s l i c e ( 1 ) ) ; t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " c o l l a p s i n g " ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " c o l l a p s e " , " s h o w " ) , t h i s . _ e l e m e n t . s t y l e [ n ] = " " , t h i s . s e t T r a n s i t i o n i n g ( ! 1 ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . c o l l a p s e " ) } , t h i s . _ e l e m e n t , ! 0 ) , t h i s . _ e l e m e n t . s t y l e [ n ] = t h i s . _ e l e m e n t [ o ] + " p x " } h i d e ( ) { i f ( t h i s . _ i s T r a n s i t i o n i n g | | ! t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ) r e t u r n ; i f ( B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . c o l l a p s e " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t   t = t h i s . _ g e t D i m e n s i o n ( ) ; t h i s . _ e l e m e n t . s t y l e [ t ] = t h i s . _ e l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) [ t ] + " p x " , m ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " c o l l a p s i n g " ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " c o l l a p s e " , " s h o w " ) ; c o n s t   e = t h i s . _ t r i g g e r A r r a y . l e n g t h ; i f ( e > 0 ) f o r ( l e t   t = 0 ; t < e ; t + + ) { c o n s t   e = t h i s . _ t r i g g e r A r r a y [ t ] , s = a ( e ) ; s & & ! s . c l a s s L i s t . c o n t a i n s ( " s h o w " ) & & ( e . c l a s s L i s t . a d d ( " c o l l a p s e d " ) , e . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 1 ) ) } t h i s . s e t T r a n s i t i o n i n g ( ! 0 ) , t h i s . _ e l e m e n t . s t y l e [ t ] = " " , t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t h i s . s e t T r a n s i t i o n i n g ( ! 1 ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " c o l l a p s i n g " ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " c o l l a p s e " ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . c o l l a p s e " ) } , t h i s . _ e l e m e n t , ! 0 ) } s e t T r a n s i t i o n i n g ( t ) { t h i s . _ i s T r a n s i t i o n i n g = t } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . s t , . . . t } ) . t o g g l e = B o o l e a n ( t . t o g g l e ) , d ( " c o l l a p s e " , t , i t ) , t } _ g e t D i m e n s i o n ( ) { r e t u r n   t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " w i d t h " ) ? " w i d t h " : " h e i g h t " } _ g e t P a r e n t ( ) { l e t { p a r e n t : t } = t h i s . _ c o n f i g ; t = h ( t ) ; c o n s t   e = ` [ d a t a - b s - t o g g l e = " c o l l a p s e " ] [ d a t a - b s - p a r e n t = " $ { t } " ] ` ; r e t u r n   i . f i n d ( e , t ) . f o r E a c h ( t = > { c o n s t   e = a ( t ) ; t h i s . _ a d d A r i a A n d C o l l a p s e d C l a s s ( e , [ t ] ) } ) , t } _ a d d A r i a A n d C o l l a p s e d C l a s s ( t , e ) { i f ( ! t | | ! e . l e n g t h ) r e t u r n ; c o n s t   s = t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ; e . f o r E a c h ( t = > { s ? t . c l a s s L i s t . r e m o v e ( " c o l l a p s e d " ) : t . c l a s s L i s t . a d d ( " c o l l a p s e d " ) , t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , s ) } ) } s t a t i c   c o l l a p s e I n t e r f a c e ( t , e ) { l e t   s = n t . g e t I n s t a n c e ( t ) ; c o n s t   i = { . . . s t , . . . V . g e t D a t a A t t r i b u t e s ( t ) , . . . " o b j e c t " = = t y p e o f   e & & e ? e : { } } ; i f ( ! s & & i . t o g g l e & & " s t r i n g " = = t y p e o f   e & & / s h o w | h i d e / . t e s t ( e ) & & ( i . t o g g l e = ! 1 ) , s | | ( s = n e w   n t ( t , i ) ) , " s t r i n g " = = t y p e o f   e ) { i f ( v o i d   0 = = = s [ e ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { e } " ` ) ; s [ e ] ( ) } } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { n t . c o l l a p s e I n t e r f a c e ( t h i s , t ) } ) ) } } B . o n ( d o c u m e n t , " c l i c k . b s . c o l l a p s e . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " c o l l a p s e " ] ' , ( f u n c t i o n ( t ) { ( " A " = = = t . t a r g e t . t a g N a m e | | t . d e l e g a t e T a r g e t & & " A " = = = t . d e l e g a t e T a r g e t . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) ; c o n s t   e = V . g e t D a t a A t t r i b u t e s ( t h i s ) , s = r ( t h i s ) ; i . f i n d ( s ) . f o r E a c h ( t = > { c o n s t   s = n t . g e t I n s t a n c e ( t ) ; l e t   i ; s ? ( n u l l = = = s . _ p a r e n t & & " s t r i n g " = = t y p e o f   e . p a r e n t & & ( s . _ c o n f i g . p a r e n t = e . p a r e n t , s . _ p a r e n t = s . _ g e t P a r e n t ( ) ) , i = " t o g g l e " ) : i = e , n t . c o l l a p s e I n t e r f a c e ( t , i ) } ) } ) ) , y ( n t ) ; c o n s t   o t = n e w   R e g E x p ( " A r r o w U p | A r r o w D o w n | E s c a p e " ) , r t = v ( ) ? " t o p - e n d " : " t o p - s t a r t " , a t = v ( ) ? " t o p - s t a r t " : " t o p - e n d " , l t = v ( ) ? " b o t t o m - e n d " : " b o t t o m - s t a r t " , c t = v ( ) ? " b o t t o m - s t a r t " : " b o t t o m - e n d " , h t = v ( ) ? " l e f t - s t a r t " : " r i g h t - s t a r t " , d t = v ( ) ? " r i g h t - s t a r t " : " l e f t - s t a r t " , u t = { o f f s e t : [ 0 , 2 ] , b o u n d a r y : " c l i p p i n g P a r e n t s " , r e f e r e n c e : " t o g g l e " , d i s p l a y : " d y n a m i c " , p o p p e r C o n f i g : n u l l , a u t o C l o s e : ! 0 } , g t = { o f f s e t : " ( a r r a y | s t r i n g | f u n c t i o n ) " , b o u n d a r y : " ( s t r i n g | e l e m e n t ) " , r e f e r e n c e : " ( s t r i n g | e l e m e n t | o b j e c t ) " , d i s p l a y : " s t r i n g " , p o p p e r C o n f i g : " ( n u l l | o b j e c t | f u n c t i o n ) " , a u t o C l o s e : " ( b o o l e a n | s t r i n g ) " } ; c l a s s   p t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ p o p p e r = n u l l , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ m e n u = t h i s . _ g e t M e n u E l e m e n t ( ) , t h i s . _ i n N a v b a r = t h i s . _ d e t e c t N a v b a r ( ) , t h i s . _ a d d E v e n t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   u t } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   g t } s t a t i c   g e t   N A M E ( ) { r e t u r n " d r o p d o w n " } t o g g l e ( ) { g ( t h i s . _ e l e m e n t ) | | ( t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ? t h i s . h i d e ( ) : t h i s . s h o w ( ) ) } s h o w ( ) { i f ( g ( t h i s . _ e l e m e n t ) | | t h i s . _ m e n u . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ) r e t u r n ; c o n s t   t = p t . g e t P a r e n t F r o m E l e m e n t ( t h i s . _ e l e m e n t ) , e = { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ; i f ( ! B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . d r o p d o w n " , e ) . d e f a u l t P r e v e n t e d ) { i f ( t h i s . _ i n N a v b a r ) V . s e t D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " , " n o n e " ) ; e l s e { i f ( v o i d   0 = = = s ) t h r o w   n e w   T y p e E r r o r ( " B o o t s t r a p ' s   d r o p d o w n s   r e q u i r e   P o p p e r   ( h t t p s : / / p o p p e r . j s . o r g ) " ) ; l e t   e = t h i s . _ e l e m e n t ; " p a r e n t " = = = t h i s . _ c o n f i g . r e f e r e n c e ? e = t : c ( t h i s . _ c o n f i g . r e f e r e n c e ) ? e = h ( t h i s . _ c o n f i g . r e f e r e n c e ) : " o b j e c t " = = t y p e o f   t h i s . _ c o n f i g . r e f e r e n c e & & ( e = t h i s . _ c o n f i g . r e f e r e n c e ) ; c o n s t   i = t h i s . _ g e t P o p p e r C o n f i g ( ) , n = i . m o d i f i e r s . f i n d ( t = > " a p p l y S t y l e s " = = = t . n a m e & & ! 1 = = = t . e n a b l e d ) ; t h i s . _ p o p p e r = s . c r e a t e P o p p e r ( e , t h i s . _ m e n u , i ) , n & & V . s e t D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " , " s t a t i c " ) } " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & ! t . c l o s e s t ( " . n a v b a r - n a v " ) & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( t = > B . o n ( t , " m o u s e o v e r " , f ) ) , t h i s . _ e l e m e n t . f o c u s ( ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 0 ) , t h i s . _ m e n u . c l a s s L i s t . t o g g l e ( " s h o w " ) , t h i s . _ e l e m e n t . c l a s s L i s t . t o g g l e ( " s h o w " ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . d r o p d o w n " , e ) } } h i d e ( ) { i f ( g ( t h i s . _ e l e m e n t ) | | ! t h i s . _ m e n u . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ) r e t u r n ; c o n s t   t = { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ; t h i s . _ c o m p l e t e H i d e ( t ) } d i s p o s e ( ) { t h i s . _ p o p p e r & & t h i s . _ p o p p e r . d e s t r o y ( ) , s u p e r . d i s p o s e ( ) } u p d a t e ( ) { t h i s . _ i n N a v b a r = t h i s . _ d e t e c t N a v b a r ( ) , t h i s . _ p o p p e r & & t h i s . _ p o p p e r . u p d a t e ( ) } _ a d d E v e n t L i s t e n e r s ( ) { B . o n ( t h i s . _ e l e m e n t , " c l i c k . b s . d r o p d o w n " , t = > { t . p r e v e n t D e f a u l t ( ) , t h i s . t o g g l e ( ) } ) } _ c o m p l e t e H i d e ( t ) { B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . d r o p d o w n " , t ) . d e f a u l t P r e v e n t e d | | ( " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( t = > B . o f f ( t , " m o u s e o v e r " , f ) ) , t h i s . _ p o p p e r & & t h i s . _ p o p p e r . d e s t r o y ( ) , t h i s . _ m e n u . c l a s s L i s t . r e m o v e ( " s h o w " ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w " ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , " f a l s e " ) , V . r e m o v e D a t a A t t r i b u t e ( t h i s . _ m e n u , " p o p p e r " ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . d r o p d o w n " , t ) ) } _ g e t C o n f i g ( t ) { i f ( t = { . . . t h i s . c o n s t r u c t o r . D e f a u l t , . . . V . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . t } , d ( " d r o p d o w n " , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , " o b j e c t " = = t y p e o f   t . r e f e r e n c e & & ! c ( t . r e f e r e n c e ) & & " f u n c t i o n " ! = t y p e o f   t . r e f e r e n c e . g e t B o u n d i n g C l i e n t R e c t ) t h r o w   n e w   T y p e E r r o r ( " d r o p d o w n " . t o U p p e r C a s e ( ) + ' :   O p t i o n   " r e f e r e n c e "   p r o v i d e d   t y p e   " o b j e c t "   w i t h o u t   a   r e q u i r e d   " g e t B o u n d i n g C l i e n t R e c t "   m e t h o d . ' ) ; r e t u r n   t } _ g e t M e n u E l e m e n t ( ) { r e t u r n   i . n e x t ( t h i s . _ e l e m e n t , " . d r o p d o w n - m e n u " ) [ 0 ] } _ g e t P l a c e m e n t ( ) { c o n s t   t = t h i s . _ e l e m e n t . p a r e n t N o d e ; i f ( t . c l a s s L i s t . c o n t a i n s ( " d r o p e n d " ) ) r e t u r n   h t ; i f ( t . c l a s s L i s t . c o n t a i n s ( " d r o p s t a r t " ) ) r e t u r n   d t ; c o n s t   e = " e n d " = = = g e t C o m p u t e d S t y l e ( t h i s . _ m e n u ) . g e t P r o p e r t y V a l u e ( " - - b s - p o s i t i o n " ) . t r i m ( ) ; r e t u r n   t . c l a s s L i s t . c o n t a i n s ( " d r o p u p " ) ? e ? a t : r t : e ? c t : l t } _ d e t e c t N a v b a r ( ) { r e t u r n   n u l l ! = = t h i s . _ e l e m e n t . c l o s e s t ( " . n a v b a r " ) } _ g e t O f f s e t ( ) { c o n s t { o f f s e t : t } = t h i s . _ c o n f i g ; r e t u r n " s t r i n g " = = t y p e o f   t ? t . s p l i t ( " , " ) . m a p ( t = > N u m b e r . p a r s e I n t ( t , 1 0 ) ) : " f u n c t i o n " = = t y p e o f   t ? e = > t ( e , t h i s . _ e l e m e n t ) : t } _ g e t P o p p e r C o n f i g ( ) { c o n s t   t = { p l a c e m e n t : t h i s . _ g e t P l a c e m e n t ( ) , m o d i f i e r s : [ { n a m e : " p r e v e n t O v e r f l o w " , o p t i o n s : { b o u n d a r y : t h i s . _ c o n f i g . b o u n d a r y } } , { n a m e : " o f f s e t " , o p t i o n s : { o f f s e t : t h i s . _ g e t O f f s e t ( ) } } ] } ; r e t u r n " s t a t i c " = = = t h i s . _ c o n f i g . d i s p l a y & & ( t . m o d i f i e r s = [ { n a m e : " a p p l y S t y l e s " , e n a b l e d : ! 1 } ] ) , { . . . t , . . . " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p o p p e r C o n f i g ? t h i s . _ c o n f i g . p o p p e r C o n f i g ( t ) : t h i s . _ c o n f i g . p o p p e r C o n f i g } } _ s e l e c t M e n u I t e m ( { k e y : t , t a r g e t : e } ) { c o n s t   s = i . f i n d ( " . d r o p d o w n - m e n u   . d r o p d o w n - i t e m : n o t ( . d i s a b l e d ) : n o t ( : d i s a b l e d ) " , t h i s . _ m e n u ) . f i l t e r ( u ) ; s . l e n g t h & & A ( s , e , " A r r o w D o w n " = = = t , ! s . i n c l u d e s ( e ) ) . f o c u s ( ) } s t a t i c   d r o p d o w n I n t e r f a c e ( t , e ) { c o n s t   s = p t . g e t O r C r e a t e I n s t a n c e ( t , e ) ; i f ( " s t r i n g " = = t y p e o f   e ) { i f ( v o i d   0 = = = s [ e ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { e } " ` ) ; s [ e ] ( ) } } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { p t . d r o p d o w n I n t e r f a c e ( t h i s , t ) } ) ) } s t a t i c   c l e a r M e n u s ( t ) { i f ( t & & ( 2 = = = t . b u t t o n | | " k e y u p " = = = t . t y p e & & " T a b " ! = = t . k e y ) ) r e t u r n ; c o n s t   e = i . f i n d ( ' [ d a t a - b s - t o g g l e = " d r o p d o w n " ] ' ) ; f o r ( l e t   s = 0 , i = e . l e n g t h ; s < i ; s + + ) { c o n s t   i = p t . g e t I n s t a n c e ( e [ s ] ) ; i f ( ! i | | ! 1 = = = i . _ c o n f i g . a u t o C l o s e ) c o n t i n u e ; i f ( ! i . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ) c o n t i n u e ; c o n s t   n = { r e l a t e d T a r g e t : i . _ e l e m e n t } ; i f ( t ) { c o n s t   e = t . c o m p o s e d P a t h ( ) , s = e . i n c l u d e s ( i . _ m e n u ) ; i f ( e . i n c l u d e s ( i . _ e l e m e n t ) | | " i n s i d e " = = = i . _ c o n f i g . a u t o C l o s e & & ! s | | " o u t s i d e " = = = i . _ c o n f i g . a u t o C l o s e & & s ) c o n t i n u e ; i f ( i . _ m e n u . c o n t a i n s ( t . t a r g e t ) & & ( " k e y u p " = = = t . t y p e & & " T a b " = = = t . k e y | | / i n p u t | s e l e c t | o p t i o n | t e x t a r e a | f o r m / i . t e s t ( t . t a r g e t . t a g N a m e ) ) ) c o n t i n u e ; " c l i c k " = = = t . t y p e & & ( n . c l i c k E v e n t = t ) } i . _ c o m p l e t e H i d e ( n ) } } s t a t i c   g e t P a r e n t F r o m E l e m e n t ( t ) { r e t u r n   a ( t ) | | t . p a r e n t N o d e } s t a t i c   d a t a A p i K e y d o w n H a n d l e r ( t ) { i f ( / i n p u t | t e x t a r e a / i . t e s t ( t . t a r g e t . t a g N a m e ) ? " S p a c e " = = = t . k e y | | " E s c a p e " ! = = t . k e y & & ( " A r r o w D o w n " ! = = t . k e y & & " A r r o w U p " ! = = t . k e y | | t . t a r g e t . c l o s e s t ( " . d r o p d o w n - m e n u " ) ) : ! o t . t e s t ( t . k e y ) ) r e t u r n ; c o n s t   e = t h i s . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ; i f ( ! e & & " E s c a p e " = = = t . k e y ) r e t u r n ; i f ( t . p r e v e n t D e f a u l t ( ) , t . s t o p P r o p a g a t i o n ( ) , g ( t h i s ) ) r e t u r n ; c o n s t   s = ( ) = > t h i s . m a t c h e s ( ' [ d a t a - b s - t o g g l e = " d r o p d o w n " ] ' ) ? t h i s : i . p r e v ( t h i s , ' [ d a t a - b s - t o g g l e = " d r o p d o w n " ] ' ) [ 0 ] ; r e t u r n " E s c a p e " = = = t . k e y ? ( s ( ) . f o c u s ( ) , v o i d   p t . c l e a r M e n u s ( ) ) : " A r r o w U p " = = = t . k e y | | " A r r o w D o w n " = = = t . k e y ? ( e | | s ( ) . c l i c k ( ) , v o i d   p t . g e t I n s t a n c e ( s ( ) ) . _ s e l e c t M e n u I t e m ( t ) ) : v o i d ( e & & " S p a c e " ! = = t . k e y | | p t . c l e a r M e n u s ( ) ) } } B . o n ( d o c u m e n t , " k e y d o w n . b s . d r o p d o w n . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " d r o p d o w n " ] ' , p t . d a t a A p i K e y d o w n H a n d l e r ) , B . o n ( d o c u m e n t , " k e y d o w n . b s . d r o p d o w n . d a t a - a p i " , " . d r o p d o w n - m e n u " , p t . d a t a A p i K e y d o w n H a n d l e r ) , B . o n ( d o c u m e n t , " c l i c k . b s . d r o p d o w n . d a t a - a p i " , p t . c l e a r M e n u s ) , B . o n ( d o c u m e n t , " k e y u p . b s . d r o p d o w n . d a t a - a p i " , p t . c l e a r M e n u s ) , B . o n ( d o c u m e n t , " c l i c k . b s . d r o p d o w n . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " d r o p d o w n " ] ' , ( f u n c t i o n ( t ) { t . p r e v e n t D e f a u l t ( ) , p t . d r o p d o w n I n t e r f a c e ( t h i s ) } ) ) , y ( p t ) ; c l a s s   f t { c o n s t r u c t o r ( ) { t h i s . _ e l e m e n t = d o c u m e n t . b o d y } g e t W i d t h ( ) { c o n s t   t = d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ; r e t u r n   M a t h . a b s ( w i n d o w . i n n e r W i d t h - t ) } h i d e ( ) { c o n s t   t = t h i s . g e t W i d t h ( ) ; t h i s . _ d i s a b l e O v e r F l o w ( ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " p a d d i n g R i g h t " , e = > e + t ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( " . f i x e d - t o p ,   . f i x e d - b o t t o m ,   . i s - f i x e d ,   . s t i c k y - t o p " , " p a d d i n g R i g h t " , e = > e + t ) , t h i s . _ s e t E l e m e n t A t t r i b u t e s ( " . s t i c k y - t o p " , " m a r g i n R i g h t " , e = > e - t ) } _ d i s a b l e O v e r F l o w ( ) { t h i s . _ s a v e I n i t i a l A t t r i b u t e ( t h i s . _ e l e m e n t , " o v e r f l o w " ) , t h i s . _ e l e m e n t . s t y l e . o v e r f l o w = " h i d d e n " } _ s e t E l e m e n t A t t r i b u t e s ( t , e , s ) { c o n s t   i = t h i s . g e t W i d t h ( ) ; t h i s . _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , t = > { i f ( t ! = = t h i s . _ e l e m e n t & & w i n d o w . i n n e r W i d t h > t . c l i e n t W i d t h + i ) r e t u r n ; t h i s . _ s a v e I n i t i a l A t t r i b u t e ( t , e ) ; c o n s t   n = w i n d o w . g e t C o m p u t e d S t y l e ( t ) [ e ] ; t . s t y l e [ e ] = s ( N u m b e r . p a r s e F l o a t ( n ) ) + " p x " } ) } r e s e t ( ) { t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " o v e r f l o w " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( t h i s . _ e l e m e n t , " p a d d i n g R i g h t " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( " . f i x e d - t o p ,   . f i x e d - b o t t o m ,   . i s - f i x e d ,   . s t i c k y - t o p " , " p a d d i n g R i g h t " ) , t h i s . _ r e s e t E l e m e n t A t t r i b u t e s ( " . s t i c k y - t o p " , " m a r g i n R i g h t " ) } _ s a v e I n i t i a l A t t r i b u t e ( t , e ) { c o n s t   s = t . s t y l e [ e ] ; s & & V . s e t D a t a A t t r i b u t e ( t , e , s ) } _ r e s e t E l e m e n t A t t r i b u t e s ( t , e ) { t h i s . _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , t = > { c o n s t   s = V . g e t D a t a A t t r i b u t e ( t , e ) ; v o i d   0 = = = s ? t . s t y l e . r e m o v e P r o p e r t y ( e ) : ( V . r e m o v e D a t a A t t r i b u t e ( t , e ) , t . s t y l e [ e ] = s ) } ) } _ a p p l y M a n i p u l a t i o n C a l l b a c k ( t , e ) { c ( t ) ? e ( t ) : i . f i n d ( t , t h i s . _ e l e m e n t ) . f o r E a c h ( e ) } i s O v e r f l o w i n g ( ) { r e t u r n   t h i s . g e t W i d t h ( ) > 0 } } c o n s t   m t = { i s V i s i b l e : ! 0 , i s A n i m a t e d : ! 1 , r o o t E l e m e n t : " b o d y " , c l i c k C a l l b a c k : n u l l } , _ t = { i s V i s i b l e : " b o o l e a n " , i s A n i m a t e d : " b o o l e a n " , r o o t E l e m e n t : " ( e l e m e n t | s t r i n g ) " , c l i c k C a l l b a c k : " ( f u n c t i o n | n u l l ) " } ; c l a s s   b t { c o n s t r u c t o r ( t ) { t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( t ) , t h i s . _ i s A p p e n d e d = ! 1 , t h i s . _ e l e m e n t = n u l l } s h o w ( t ) { t h i s . _ c o n f i g . i s V i s i b l e ? ( t h i s . _ a p p e n d ( ) , t h i s . _ c o n f i g . i s A n i m a t e d & & m ( t h i s . _ g e t E l e m e n t ( ) ) , t h i s . _ g e t E l e m e n t ( ) . c l a s s L i s t . a d d ( " s h o w " ) , t h i s . _ e m u l a t e A n i m a t i o n ( ( ) = > { w ( t ) } ) ) : w ( t ) } h i d e ( t ) { t h i s . _ c o n f i g . i s V i s i b l e ? ( t h i s . _ g e t E l e m e n t ( ) . c l a s s L i s t . r e m o v e ( " s h o w " ) , t h i s . _ e m u l a t e A n i m a t i o n ( ( ) = > { t h i s . d i s p o s e ( ) , w ( t ) } ) ) : w ( t ) } _ g e t E l e m e n t ( ) { i f ( ! t h i s . _ e l e m e n t ) { c o n s t   t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; t . c l a s s N a m e = " m o d a l - b a c k d r o p " , t h i s . _ c o n f i g . i s A n i m a t e d & & t . c l a s s L i s t . a d d ( " f a d e " ) , t h i s . _ e l e m e n t = t } r e t u r n   t h i s . _ e l e m e n t } _ g e t C o n f i g ( t ) { r e t u r n ( t = { . . . m t , . . . " o b j e c t " = = t y p e o f   t ? t : { } } ) . r o o t E l e m e n t = h ( t . r o o t E l e m e n t ) , d ( " b a c k d r o p " , t , _ t ) , t } _ a p p e n d ( ) { t h i s . _ i s A p p e n d e d | | ( t h i s . _ c o n f i g . r o o t E l e m e n t . a p p e n d C h i l d ( t h i s . _ g e t E l e m e n t ( ) ) , B . o n ( t h i s . _ g e t E l e m e n t ( ) , " m o u s e d o w n . b s . b a c k d r o p " , ( ) = > { w ( t h i s . _ c o n f i g . c l i c k C a l l b a c k ) } ) , t h i s . _ i s A p p e n d e d = ! 0 ) } d i s p o s e ( ) { t h i s . _ i s A p p e n d e d & & ( B . o f f ( t h i s . _ e l e m e n t , " m o u s e d o w n . b s . b a c k d r o p " ) , t h i s . _ e l e m e n t . r e m o v e ( ) , t h i s . _ i s A p p e n d e d = ! 1 ) } _ e m u l a t e A n i m a t i o n ( t ) { E ( t , t h i s . _ g e t E l e m e n t ( ) , t h i s . _ c o n f i g . i s A n i m a t e d ) } } c o n s t   v t = { b a c k d r o p : ! 0 , k e y b o a r d : ! 0 , f o c u s : ! 0 } , y t = { b a c k d r o p : " ( b o o l e a n | s t r i n g ) " , k e y b o a r d : " b o o l e a n " , f o c u s : " b o o l e a n " } ; c l a s s   w t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ d i a l o g = i . f i n d O n e ( " . m o d a l - d i a l o g " , t h i s . _ e l e m e n t ) , t h i s . _ b a c k d r o p = t h i s . _ i n i t i a l i z e B a c k D r o p ( ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 1 , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ s c r o l l B a r = n e w   f t } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   v t } s t a t i c   g e t   N A M E ( ) { r e t u r n " m o d a l " } t o g g l e ( t ) { r e t u r n   t h i s . _ i s S h o w n ? t h i s . h i d e ( ) : t h i s . s h o w ( t ) } s h o w ( t ) { t h i s . _ i s S h o w n | | t h i s . _ i s T r a n s i t i o n i n g | | B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . m o d a l " , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ i s S h o w n = ! 0 , t h i s . _ i s A n i m a t e d ( ) & & ( t h i s . _ i s T r a n s i t i o n i n g = ! 0 ) , t h i s . _ s c r o l l B a r . h i d e ( ) , d o c u m e n t . b o d y . c l a s s L i s t . a d d ( " m o d a l - o p e n " ) , t h i s . _ a d j u s t D i a l o g ( ) , t h i s . _ s e t E s c a p e E v e n t ( ) , t h i s . _ s e t R e s i z e E v e n t ( ) , B . o n ( t h i s . _ e l e m e n t , " c l i c k . d i s m i s s . b s . m o d a l " , ' [ d a t a - b s - d i s m i s s = " m o d a l " ] ' , t = > t h i s . h i d e ( t ) ) , B . o n ( t h i s . _ d i a l o g , " m o u s e d o w n . d i s m i s s . b s . m o d a l " , ( ) = > { B . o n e ( t h i s . _ e l e m e n t , " m o u s e u p . d i s m i s s . b s . m o d a l " , t = > { t . t a r g e t = = = t h i s . _ e l e m e n t & & ( t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 0 ) } ) } ) , t h i s . _ s h o w B a c k d r o p ( ( ) = > t h i s . _ s h o w E l e m e n t ( t ) ) ) } h i d e ( t ) { i f ( t & & [ " A " , " A R E A " ] . i n c l u d e s ( t . t a r g e t . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , ! t h i s . _ i s S h o w n | | t h i s . _ i s T r a n s i t i o n i n g ) r e t u r n ; i f ( B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . m o d a l " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ i s S h o w n = ! 1 ; c o n s t   e = t h i s . _ i s A n i m a t e d ( ) ; e & & ( t h i s . _ i s T r a n s i t i o n i n g = ! 0 ) , t h i s . _ s e t E s c a p e E v e n t ( ) , t h i s . _ s e t R e s i z e E v e n t ( ) , B . o f f ( d o c u m e n t , " f o c u s i n . b s . m o d a l " ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w " ) , B . o f f ( t h i s . _ e l e m e n t , " c l i c k . d i s m i s s . b s . m o d a l " ) , B . o f f ( t h i s . _ d i a l o g , " m o u s e d o w n . d i s m i s s . b s . m o d a l " ) , t h i s . _ q u e u e C a l l b a c k ( ( ) = > t h i s . _ h i d e M o d a l ( ) , t h i s . _ e l e m e n t , e ) } d i s p o s e ( ) { [ w i n d o w , t h i s . _ d i a l o g ] . f o r E a c h ( t = > B . o f f ( t , " . b s . m o d a l " ) ) , t h i s . _ b a c k d r o p . d i s p o s e ( ) , s u p e r . d i s p o s e ( ) , B . o f f ( d o c u m e n t , " f o c u s i n . b s . m o d a l " ) } h a n d l e U p d a t e ( ) { t h i s . _ a d j u s t D i a l o g ( ) } _ i n i t i a l i z e B a c k D r o p ( ) { r e t u r n   n e w   b t ( { i s V i s i b l e : B o o l e a n ( t h i s . _ c o n f i g . b a c k d r o p ) , i s A n i m a t e d : t h i s . _ i s A n i m a t e d ( ) } ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . v t , . . . V . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , d ( " m o d a l " , t , y t ) , t } _ s h o w E l e m e n t ( t ) { c o n s t   e = t h i s . _ i s A n i m a t e d ( ) , s = i . f i n d O n e ( " . m o d a l - b o d y " , t h i s . _ d i a l o g ) ; t h i s . _ e l e m e n t . p a r e n t N o d e & & t h i s . _ e l e m e n t . p a r e n t N o d e . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E | | d o c u m e n t . b o d y . a p p e n d C h i l d ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - h i d d e n " ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - m o d a l " , ! 0 ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " r o l e " , " d i a l o g " ) , t h i s . _ e l e m e n t . s c r o l l T o p = 0 , s & & ( s . s c r o l l T o p = 0 ) , e & & m ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " s h o w " ) , t h i s . _ c o n f i g . f o c u s & & t h i s . _ e n f o r c e F o c u s ( ) , t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t h i s . _ c o n f i g . f o c u s & & t h i s . _ e l e m e n t . f o c u s ( ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . m o d a l " , { r e l a t e d T a r g e t : t } ) } , t h i s . _ d i a l o g , e ) } _ e n f o r c e F o c u s ( ) { B . o f f ( d o c u m e n t , " f o c u s i n . b s . m o d a l " ) , B . o n ( d o c u m e n t , " f o c u s i n . b s . m o d a l " , t = > { d o c u m e n t = = = t . t a r g e t | | t h i s . _ e l e m e n t = = = t . t a r g e t | | t h i s . _ e l e m e n t . c o n t a i n s ( t . t a r g e t ) | | t h i s . _ e l e m e n t . f o c u s ( ) } ) } _ s e t E s c a p e E v e n t ( ) { t h i s . _ i s S h o w n ? B . o n ( t h i s . _ e l e m e n t , " k e y d o w n . d i s m i s s . b s . m o d a l " , t = > { t h i s . _ c o n f i g . k e y b o a r d & & " E s c a p e " = = = t . k e y ? ( t . p r e v e n t D e f a u l t ( ) , t h i s . h i d e ( ) ) : t h i s . _ c o n f i g . k e y b o a r d | | " E s c a p e " ! = = t . k e y | | t h i s . _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) } ) : B . o f f ( t h i s . _ e l e m e n t , " k e y d o w n . d i s m i s s . b s . m o d a l " ) } _ s e t R e s i z e E v e n t ( ) { t h i s . _ i s S h o w n ? B . o n ( w i n d o w , " r e s i z e . b s . m o d a l " , ( ) = > t h i s . _ a d j u s t D i a l o g ( ) ) : B . o f f ( w i n d o w , " r e s i z e . b s . m o d a l " ) } _ h i d e M o d a l ( ) { t h i s . _ e l e m e n t . s t y l e . d i s p l a y = " n o n e " , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - h i d d e n " , ! 0 ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - m o d a l " ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " r o l e " ) , t h i s . _ i s T r a n s i t i o n i n g = ! 1 , t h i s . _ b a c k d r o p . h i d e ( ( ) = > { d o c u m e n t . b o d y . c l a s s L i s t . r e m o v e ( " m o d a l - o p e n " ) , t h i s . _ r e s e t A d j u s t m e n t s ( ) , t h i s . _ s c r o l l B a r . r e s e t ( ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . m o d a l " ) } ) } _ s h o w B a c k d r o p ( t ) { B . o n ( t h i s . _ e l e m e n t , " c l i c k . d i s m i s s . b s . m o d a l " , t = > { t h i s . _ i g n o r e B a c k d r o p C l i c k ? t h i s . _ i g n o r e B a c k d r o p C l i c k = ! 1 : t . t a r g e t = = = t . c u r r e n t T a r g e t & & ( ! 0 = = = t h i s . _ c o n f i g . b a c k d r o p ? t h i s . h i d e ( ) : " s t a t i c " = = = t h i s . _ c o n f i g . b a c k d r o p & & t h i s . _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) ) } ) , t h i s . _ b a c k d r o p . s h o w ( t ) } _ i s A n i m a t e d ( ) { r e t u r n   t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " f a d e " ) } _ t r i g g e r B a c k d r o p T r a n s i t i o n ( ) { i f ( B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e P r e v e n t e d . b s . m o d a l " ) . d e f a u l t P r e v e n t e d ) r e t u r n ; c o n s t { c l a s s L i s t : t , s c r o l l H e i g h t : e , s t y l e : s } = t h i s . _ e l e m e n t , i = e > d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t ; ! i & & " h i d d e n " = = = s . o v e r f l o w Y | | t . c o n t a i n s ( " m o d a l - s t a t i c " ) | | ( i | | ( s . o v e r f l o w Y = " h i d d e n " ) , t . a d d ( " m o d a l - s t a t i c " ) , t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t . r e m o v e ( " m o d a l - s t a t i c " ) , i | | t h i s . _ q u e u e C a l l b a c k ( ( ) = > { s . o v e r f l o w Y = " " } , t h i s . _ d i a l o g ) } , t h i s . _ d i a l o g ) , t h i s . _ e l e m e n t . f o c u s ( ) ) } _ a d j u s t D i a l o g ( ) { c o n s t   t = t h i s . _ e l e m e n t . s c r o l l H e i g h t > d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t , e = t h i s . _ s c r o l l B a r . g e t W i d t h ( ) , s = e > 0 ; ( ! s & & t & & ! v ( ) | | s & & ! t & & v ( ) ) & & ( t h i s . _ e l e m e n t . s t y l e . p a d d i n g L e f t = e + " p x " ) , ( s & & ! t & & ! v ( ) | | ! s & & t & & v ( ) ) & & ( t h i s . _ e l e m e n t . s t y l e . p a d d i n g R i g h t = e + " p x " ) } _ r e s e t A d j u s t m e n t s ( ) { t h i s . _ e l e m e n t . s t y l e . p a d d i n g L e f t = " " , t h i s . _ e l e m e n t . s t y l e . p a d d i n g R i g h t = " " } s t a t i c   j Q u e r y I n t e r f a c e ( t , e ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   s = w t . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = s [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; s [ t ] ( e ) } } ) ) } } B . o n ( d o c u m e n t , " c l i c k . b s . m o d a l . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " m o d a l " ] ' , ( f u n c t i o n ( t ) { c o n s t   e = a ( t h i s ) ; [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , B . o n e ( e , " s h o w . b s . m o d a l " , t = > { t . d e f a u l t P r e v e n t e d | | B . o n e ( e , " h i d d e n . b s . m o d a l " , ( ) = > { u ( t h i s ) & & t h i s . f o c u s ( ) } ) } ) , w t . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( t h i s ) } ) ) , y ( w t ) ; c o n s t   E t = { b a c k d r o p : ! 0 , k e y b o a r d : ! 0 , s c r o l l : ! 1 } , A t = { b a c k d r o p : " b o o l e a n " , k e y b o a r d : " b o o l e a n " , s c r o l l : " b o o l e a n " } ; c l a s s   T t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ b a c k d r o p = t h i s . _ i n i t i a l i z e B a c k D r o p ( ) , t h i s . _ a d d E v e n t L i s t e n e r s ( ) } s t a t i c   g e t   N A M E ( ) { r e t u r n " o f f c a n v a s " } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   E t } t o g g l e ( t ) { r e t u r n   t h i s . _ i s S h o w n ? t h i s . h i d e ( ) : t h i s . s h o w ( t ) } s h o w ( t ) { t h i s . _ i s S h o w n | | B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . o f f c a n v a s " , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ i s S h o w n = ! 0 , t h i s . _ e l e m e n t . s t y l e . v i s i b i l i t y = " v i s i b l e " , t h i s . _ b a c k d r o p . s h o w ( ) , t h i s . _ c o n f i g . s c r o l l | | ( ( n e w   f t ) . h i d e ( ) , t h i s . _ e n f o r c e F o c u s O n E l e m e n t ( t h i s . _ e l e m e n t ) ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - h i d d e n " ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - m o d a l " , ! 0 ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " r o l e " , " d i a l o g " ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " s h o w " ) , t h i s . _ q u e u e C a l l b a c k ( ( ) = > { B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . o f f c a n v a s " , { r e l a t e d T a r g e t : t } ) } , t h i s . _ e l e m e n t , ! 0 ) ) } h i d e ( ) { t h i s . _ i s S h o w n & & ( B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . o f f c a n v a s " ) . d e f a u l t P r e v e n t e d | | ( B . o f f ( d o c u m e n t , " f o c u s i n . b s . o f f c a n v a s " ) , t h i s . _ e l e m e n t . b l u r ( ) , t h i s . _ i s S h o w n = ! 1 , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w " ) , t h i s . _ b a c k d r o p . h i d e ( ) , t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - h i d d e n " , ! 0 ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - m o d a l " ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " r o l e " ) , t h i s . _ e l e m e n t . s t y l e . v i s i b i l i t y = " h i d d e n " , t h i s . _ c o n f i g . s c r o l l | | ( n e w   f t ) . r e s e t ( ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . o f f c a n v a s " ) } , t h i s . _ e l e m e n t , ! 0 ) ) ) } d i s p o s e ( ) { t h i s . _ b a c k d r o p . d i s p o s e ( ) , s u p e r . d i s p o s e ( ) , B . o f f ( d o c u m e n t , " f o c u s i n . b s . o f f c a n v a s " ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . E t , . . . V . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t ? t : { } } , d ( " o f f c a n v a s " , t , A t ) , t } _ i n i t i a l i z e B a c k D r o p ( ) { r e t u r n   n e w   b t ( { i s V i s i b l e : t h i s . _ c o n f i g . b a c k d r o p , i s A n i m a t e d : ! 0 , r o o t E l e m e n t : t h i s . _ e l e m e n t . p a r e n t N o d e , c l i c k C a l l b a c k : ( ) = > t h i s . h i d e ( ) } ) } _ e n f o r c e F o c u s O n E l e m e n t ( t ) { B . o f f ( d o c u m e n t , " f o c u s i n . b s . o f f c a n v a s " ) , B . o n ( d o c u m e n t , " f o c u s i n . b s . o f f c a n v a s " , e = > { d o c u m e n t = = = e . t a r g e t | | t = = = e . t a r g e t | | t . c o n t a i n s ( e . t a r g e t ) | | t . f o c u s ( ) } ) , t . f o c u s ( ) } _ a d d E v e n t L i s t e n e r s ( ) { B . o n ( t h i s . _ e l e m e n t , " c l i c k . d i s m i s s . b s . o f f c a n v a s " , ' [ d a t a - b s - d i s m i s s = " o f f c a n v a s " ] ' , ( ) = > t h i s . h i d e ( ) ) , B . o n ( t h i s . _ e l e m e n t , " k e y d o w n . d i s m i s s . b s . o f f c a n v a s " , t = > { t h i s . _ c o n f i g . k e y b o a r d & & " E s c a p e " = = = t . k e y & & t h i s . h i d e ( ) } ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = T t . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] | | t . s t a r t s W i t h ( " _ " ) | | " c o n s t r u c t o r " = = = t ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } B . o n ( d o c u m e n t , " c l i c k . b s . o f f c a n v a s . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " o f f c a n v a s " ] ' , ( f u n c t i o n ( t ) { c o n s t   e = a ( t h i s ) ; i f ( [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , g ( t h i s ) ) r e t u r n ; B . o n e ( e , " h i d d e n . b s . o f f c a n v a s " , ( ) = > { u ( t h i s ) & & t h i s . f o c u s ( ) } ) ; c o n s t   s = i . f i n d O n e ( " . o f f c a n v a s . s h o w " ) ; s & & s ! = = e & & T t . g e t I n s t a n c e ( s ) . h i d e ( ) , T t . g e t O r C r e a t e I n s t a n c e ( e ) . t o g g l e ( t h i s ) } ) ) , B . o n ( w i n d o w , " l o a d . b s . o f f c a n v a s . d a t a - a p i " , ( ) = > i . f i n d ( " . o f f c a n v a s . s h o w " ) . f o r E a c h ( t = > T t . g e t O r C r e a t e I n s t a n c e ( t ) . s h o w ( ) ) ) , y ( T t ) ; c o n s t   C t = n e w   S e t ( [ " b a c k g r o u n d " , " c i t e " , " h r e f " , " i t e m t y p e " , " l o n g d e s c " , " p o s t e r " , " s r c " , " x l i n k : h r e f " ] ) , k t = / ^ ( ? : ( ? : h t t p s ? | m a i l t o | f t p | t e l | f i l e ) : | [ ^ # & / : ? ] * ( ? : [ # / ? ] | $ ) ) / i , L t = / ^ d a t a : ( ? : i m a g e \ / ( ? : b m p | g i f | j p e g | j p g | p n g | t i f f | w e b p ) | v i d e o \ / ( ? : m p e g | m p 4 | o g g | w e b m ) | a u d i o \ / ( ? : m p 3 | o g a | o g g | o p u s ) ) ; b a s e 6 4 , [ \ d + / a - z ] + = * $ / i , O t = ( t , e ) = > { c o n s t   s = t . n o d e N a m e . t o L o w e r C a s e ( ) ; i f ( e . i n c l u d e s ( s ) ) r e t u r n ! C t . h a s ( s ) | | B o o l e a n ( k t . t e s t ( t . n o d e V a l u e ) | | L t . t e s t ( t . n o d e V a l u e ) ) ; c o n s t   i = e . f i l t e r ( t = > t   i n s t a n c e o f   R e g E x p ) ; f o r ( l e t   t = 0 , e = i . l e n g t h ; t < e ; t + + ) i f ( i [ t ] . t e s t ( s ) ) r e t u r n ! 0 ; r e t u r n ! 1 } ; f u n c t i o n   D t ( t , e , s ) { i f ( ! t . l e n g t h ) r e t u r n   t ; i f ( s & & " f u n c t i o n " = = t y p e o f   s ) r e t u r n   s ( t ) ; c o n s t   i = ( n e w   w i n d o w . D O M P a r s e r ) . p a r s e F r o m S t r i n g ( t , " t e x t / h t m l " ) , n = O b j e c t . k e y s ( e ) , o = [ ] . c o n c a t ( . . . i . b o d y . q u e r y S e l e c t o r A l l ( " * " ) ) ; f o r ( l e t   t = 0 , s = o . l e n g t h ; t < s ; t + + ) { c o n s t   s = o [ t ] , i = s . n o d e N a m e . t o L o w e r C a s e ( ) ; i f ( ! n . i n c l u d e s ( i ) ) { s . r e m o v e ( ) ; c o n t i n u e } c o n s t   r = [ ] . c o n c a t ( . . . s . a t t r i b u t e s ) , a = [ ] . c o n c a t ( e [ " * " ] | | [ ] , e [ i ] | | [ ] ) ; r . f o r E a c h ( t = > { O t ( t , a ) | | s . r e m o v e A t t r i b u t e ( t . n o d e N a m e ) } ) } r e t u r n   i . b o d y . i n n e r H T M L } c o n s t   I t = n e w   R e g E x p ( " ( ^ | \ \ s ) b s - t o o l t i p \ \ S + " , " g " ) , N t = n e w   S e t ( [ " s a n i t i z e " , " a l l o w L i s t " , " s a n i t i z e F n " ] ) , S t = { a n i m a t i o n : " b o o l e a n " , t e m p l a t e : " s t r i n g " , t i t l e : " ( s t r i n g | e l e m e n t | f u n c t i o n ) " , t r i g g e r : " s t r i n g " , d e l a y : " ( n u m b e r | o b j e c t ) " , h t m l : " b o o l e a n " , s e l e c t o r : " ( s t r i n g | b o o l e a n ) " , p l a c e m e n t : " ( s t r i n g | f u n c t i o n ) " , o f f s e t : " ( a r r a y | s t r i n g | f u n c t i o n ) " , c o n t a i n e r : " ( s t r i n g | e l e m e n t | b o o l e a n ) " , f a l l b a c k P l a c e m e n t s : " a r r a y " , b o u n d a r y : " ( s t r i n g | e l e m e n t ) " , c u s t o m C l a s s : " ( s t r i n g | f u n c t i o n ) " , s a n i t i z e : " b o o l e a n " , s a n i t i z e F n : " ( n u l l | f u n c t i o n ) " , a l l o w L i s t : " o b j e c t " , p o p p e r C o n f i g : " ( n u l l | o b j e c t | f u n c t i o n ) " } , x t = { A U T O : " a u t o " , T O P : " t o p " , R I G H T : v ( ) ? " l e f t " : " r i g h t " , B O T T O M : " b o t t o m " , L E F T : v ( ) ? " r i g h t " : " l e f t " } , M t = { a n i m a t i o n : ! 0 , t e m p l a t e : ' < d i v   c l a s s = " t o o l t i p "   r o l e = " t o o l t i p " > < d i v   c l a s s = " t o o l t i p - a r r o w " > < / d i v > < d i v   c l a s s = " t o o l t i p - i n n e r " > < / d i v > < / d i v > ' , t r i g g e r : " h o v e r   f o c u s " , t i t l e : " " , d e l a y : 0 , h t m l : ! 1 , s e l e c t o r : ! 1 , p l a c e m e n t : " t o p " , o f f s e t : [ 0 , 0 ] , c o n t a i n e r : ! 1 , f a l l b a c k P l a c e m e n t s : [ " t o p " , " r i g h t " , " b o t t o m " , " l e f t " ] , b o u n d a r y : " c l i p p i n g P a r e n t s " , c u s t o m C l a s s : " " , s a n i t i z e : ! 0 , s a n i t i z e F n : n u l l , a l l o w L i s t : { " * " : [ " c l a s s " , " d i r " , " i d " , " l a n g " , " r o l e " , / ^ a r i a - [ \ w - ] * $ / i ] , a : [ " t a r g e t " , " h r e f " , " t i t l e " , " r e l " ] , a r e a : [ ] , b : [ ] , b r : [ ] , c o l : [ ] , c o d e : [ ] , d i v : [ ] , e m : [ ] , h r : [ ] , h 1 : [ ] , h 2 : [ ] , h 3 : [ ] , h 4 : [ ] , h 5 : [ ] , h 6 : [ ] , i : [ ] , i m g : [ " s r c " , " s r c s e t " , " a l t " , " t i t l e " , " w i d t h " , " h e i g h t " ] , l i : [ ] , o l : [ ] , p : [ ] , p r e : [ ] , s : [ ] , s m a l l : [ ] , s p a n : [ ] , s u b : [ ] , s u p : [ ] , s t r o n g : [ ] , u : [ ] , u l : [ ] } , p o p p e r C o n f i g : n u l l } , P t = { H I D E : " h i d e . b s . t o o l t i p " , H I D D E N : " h i d d e n . b s . t o o l t i p " , S H O W : " s h o w . b s . t o o l t i p " , S H O W N : " s h o w n . b s . t o o l t i p " , I N S E R T E D : " i n s e r t e d . b s . t o o l t i p " , C L I C K : " c l i c k . b s . t o o l t i p " , F O C U S I N : " f o c u s i n . b s . t o o l t i p " , F O C U S O U T : " f o c u s o u t . b s . t o o l t i p " , M O U S E E N T E R : " m o u s e e n t e r . b s . t o o l t i p " , M O U S E L E A V E : " m o u s e l e a v e . b s . t o o l t i p " } ; c l a s s   j t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { i f ( v o i d   0 = = = s ) t h r o w   n e w   T y p e E r r o r ( " B o o t s t r a p ' s   t o o l t i p s   r e q u i r e   P o p p e r   ( h t t p s : / / p o p p e r . j s . o r g ) " ) ; s u p e r ( t ) , t h i s . _ i s E n a b l e d = ! 0 , t h i s . _ t i m e o u t = 0 , t h i s . _ h o v e r S t a t e = " " , t h i s . _ a c t i v e T r i g g e r = { } , t h i s . _ p o p p e r = n u l l , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . t i p = n u l l , t h i s . _ s e t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   M t } s t a t i c   g e t   N A M E ( ) { r e t u r n " t o o l t i p " } s t a t i c   g e t   E v e n t ( ) { r e t u r n   P t } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   S t } e n a b l e ( ) { t h i s . _ i s E n a b l e d = ! 0 } d i s a b l e ( ) { t h i s . _ i s E n a b l e d = ! 1 } t o g g l e E n a b l e d ( ) { t h i s . _ i s E n a b l e d = ! t h i s . _ i s E n a b l e d } t o g g l e ( t ) { i f ( t h i s . _ i s E n a b l e d ) i f ( t ) { c o n s t   e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t ) ; e . _ a c t i v e T r i g g e r . c l i c k = ! e . _ a c t i v e T r i g g e r . c l i c k , e . _ i s W i t h A c t i v e T r i g g e r ( ) ? e . _ e n t e r ( n u l l , e ) : e . _ l e a v e ( n u l l , e ) } e l s e { i f ( t h i s . g e t T i p E l e m e n t ( ) . c l a s s L i s t . c o n t a i n s ( " s h o w " ) ) r e t u r n   v o i d   t h i s . _ l e a v e ( n u l l , t h i s ) ; t h i s . _ e n t e r ( n u l l , t h i s ) } } d i s p o s e ( ) { c l e a r T i m e o u t ( t h i s . _ t i m e o u t ) , B . o f f ( t h i s . _ e l e m e n t . c l o s e s t ( " . m o d a l " ) , " h i d e . b s . m o d a l " , t h i s . _ h i d e M o d a l H a n d l e r ) , t h i s . t i p & & t h i s . t i p . r e m o v e ( ) , t h i s . _ p o p p e r & & t h i s . _ p o p p e r . d e s t r o y ( ) , s u p e r . d i s p o s e ( ) } s h o w ( ) { i f ( " n o n e " = = = t h i s . _ e l e m e n t . s t y l e . d i s p l a y ) t h r o w   n e w   E r r o r ( " P l e a s e   u s e   s h o w   o n   v i s i b l e   e l e m e n t s " ) ; i f ( ! t h i s . i s W i t h C o n t e n t ( ) | | ! t h i s . _ i s E n a b l e d ) r e t u r n ; c o n s t   t = B . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . S H O W ) , e = p ( t h i s . _ e l e m e n t ) , i = n u l l = = = e ? t h i s . _ e l e m e n t . o w n e r D o c u m e n t . d o c u m e n t E l e m e n t . c o n t a i n s ( t h i s . _ e l e m e n t ) : e . c o n t a i n s ( t h i s . _ e l e m e n t ) ; i f ( t . d e f a u l t P r e v e n t e d | | ! i ) r e t u r n ; c o n s t   o = t h i s . g e t T i p E l e m e n t ( ) , r = n ( t h i s . c o n s t r u c t o r . N A M E ) ; o . s e t A t t r i b u t e ( " i d " , r ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - d e s c r i b e d b y " , r ) , t h i s . s e t C o n t e n t ( ) , t h i s . _ c o n f i g . a n i m a t i o n & & o . c l a s s L i s t . a d d ( " f a d e " ) ; c o n s t   a = " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p l a c e m e n t ? t h i s . _ c o n f i g . p l a c e m e n t . c a l l ( t h i s , o , t h i s . _ e l e m e n t ) : t h i s . _ c o n f i g . p l a c e m e n t , l = t h i s . _ g e t A t t a c h m e n t ( a ) ; t h i s . _ a d d A t t a c h m e n t C l a s s ( l ) ; c o n s t { c o n t a i n e r : c } = t h i s . _ c o n f i g ; W . s e t ( o , t h i s . c o n s t r u c t o r . D A T A _ K E Y , t h i s ) , t h i s . _ e l e m e n t . o w n e r D o c u m e n t . d o c u m e n t E l e m e n t . c o n t a i n s ( t h i s . t i p ) | | ( c . a p p e n d C h i l d ( o ) , B . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . I N S E R T E D ) ) , t h i s . _ p o p p e r ? t h i s . _ p o p p e r . u p d a t e ( ) : t h i s . _ p o p p e r = s . c r e a t e P o p p e r ( t h i s . _ e l e m e n t , o , t h i s . _ g e t P o p p e r C o n f i g ( l ) ) , o . c l a s s L i s t . a d d ( " s h o w " ) ; c o n s t   h = " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . c u s t o m C l a s s ? t h i s . _ c o n f i g . c u s t o m C l a s s ( ) : t h i s . _ c o n f i g . c u s t o m C l a s s ; h & & o . c l a s s L i s t . a d d ( . . . h . s p l i t ( "   " ) ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( t = > { B . o n ( t , " m o u s e o v e r " , f ) } ) ; c o n s t   d = t h i s . t i p . c l a s s L i s t . c o n t a i n s ( " f a d e " ) ; t h i s . _ q u e u e C a l l b a c k ( ( ) = > { c o n s t   t = t h i s . _ h o v e r S t a t e ; t h i s . _ h o v e r S t a t e = n u l l , B . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . S H O W N ) , " o u t " = = = t & & t h i s . _ l e a v e ( n u l l , t h i s ) } , t h i s . t i p , d ) } h i d e ( ) { i f ( ! t h i s . _ p o p p e r ) r e t u r n ; c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) ; i f ( B . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . H I D E ) . d e f a u l t P r e v e n t e d ) r e t u r n ; t . c l a s s L i s t . r e m o v e ( " s h o w " ) , " o n t o u c h s t a r t " i n   d o c u m e n t . d o c u m e n t E l e m e n t & & [ ] . c o n c a t ( . . . d o c u m e n t . b o d y . c h i l d r e n ) . f o r E a c h ( t = > B . o f f ( t , " m o u s e o v e r " , f ) ) , t h i s . _ a c t i v e T r i g g e r . c l i c k = ! 1 , t h i s . _ a c t i v e T r i g g e r . f o c u s = ! 1 , t h i s . _ a c t i v e T r i g g e r . h o v e r = ! 1 ; c o n s t   e = t h i s . t i p . c l a s s L i s t . c o n t a i n s ( " f a d e " ) ; t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t h i s . _ i s W i t h A c t i v e T r i g g e r ( ) | | ( " s h o w " ! = = t h i s . _ h o v e r S t a t e & & t . r e m o v e ( ) , t h i s . _ c l e a n T i p C l a s s ( ) , t h i s . _ e l e m e n t . r e m o v e A t t r i b u t e ( " a r i a - d e s c r i b e d b y " ) , B . t r i g g e r ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . H I D D E N ) , t h i s . _ p o p p e r & & ( t h i s . _ p o p p e r . d e s t r o y ( ) , t h i s . _ p o p p e r = n u l l ) ) } , t h i s . t i p , e ) , t h i s . _ h o v e r S t a t e = " " } u p d a t e ( ) { n u l l ! = = t h i s . _ p o p p e r & & t h i s . _ p o p p e r . u p d a t e ( ) } i s W i t h C o n t e n t ( ) { r e t u r n   B o o l e a n ( t h i s . g e t T i t l e ( ) ) } g e t T i p E l e m e n t ( ) { i f ( t h i s . t i p ) r e t u r n   t h i s . t i p ; c o n s t   t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; r e t u r n   t . i n n e r H T M L = t h i s . _ c o n f i g . t e m p l a t e , t h i s . t i p = t . c h i l d r e n [ 0 ] , t h i s . t i p } s e t C o n t e n t ( ) { c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) ; t h i s . s e t E l e m e n t C o n t e n t ( i . f i n d O n e ( " . t o o l t i p - i n n e r " , t ) , t h i s . g e t T i t l e ( ) ) , t . c l a s s L i s t . r e m o v e ( " f a d e " , " s h o w " ) } s e t E l e m e n t C o n t e n t ( t , e ) { i f ( n u l l ! = = t ) r e t u r n   c ( e ) ? ( e = h ( e ) , v o i d ( t h i s . _ c o n f i g . h t m l ? e . p a r e n t N o d e ! = = t & & ( t . i n n e r H T M L = " " , t . a p p e n d C h i l d ( e ) ) : t . t e x t C o n t e n t = e . t e x t C o n t e n t ) ) : v o i d ( t h i s . _ c o n f i g . h t m l ? ( t h i s . _ c o n f i g . s a n i t i z e & & ( e = D t ( e , t h i s . _ c o n f i g . a l l o w L i s t , t h i s . _ c o n f i g . s a n i t i z e F n ) ) , t . i n n e r H T M L = e ) : t . t e x t C o n t e n t = e ) } g e t T i t l e ( ) { l e t   t = t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " ) ; r e t u r n   t | | ( t = " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . t i t l e ? t h i s . _ c o n f i g . t i t l e . c a l l ( t h i s . _ e l e m e n t ) : t h i s . _ c o n f i g . t i t l e ) , t } u p d a t e A t t a c h m e n t ( t ) { r e t u r n " r i g h t " = = = t ? " e n d " : " l e f t " = = = t ? " s t a r t " : t } _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) { c o n s t   s = t h i s . c o n s t r u c t o r . D A T A _ K E Y ; r e t u r n ( e = e | | W . g e t ( t . d e l e g a t e T a r g e t , s ) ) | | ( e = n e w   t h i s . c o n s t r u c t o r ( t . d e l e g a t e T a r g e t , t h i s . _ g e t D e l e g a t e C o n f i g ( ) ) , W . s e t ( t . d e l e g a t e T a r g e t , s , e ) ) , e } _ g e t O f f s e t ( ) { c o n s t { o f f s e t : t } = t h i s . _ c o n f i g ; r e t u r n " s t r i n g " = = t y p e o f   t ? t . s p l i t ( " , " ) . m a p ( t = > N u m b e r . p a r s e I n t ( t , 1 0 ) ) : " f u n c t i o n " = = t y p e o f   t ? e = > t ( e , t h i s . _ e l e m e n t ) : t } _ g e t P o p p e r C o n f i g ( t ) { c o n s t   e = { p l a c e m e n t : t , m o d i f i e r s : [ { n a m e : " f l i p " , o p t i o n s : { f a l l b a c k P l a c e m e n t s : t h i s . _ c o n f i g . f a l l b a c k P l a c e m e n t s } } , { n a m e : " o f f s e t " , o p t i o n s : { o f f s e t : t h i s . _ g e t O f f s e t ( ) } } , { n a m e : " p r e v e n t O v e r f l o w " , o p t i o n s : { b o u n d a r y : t h i s . _ c o n f i g . b o u n d a r y } } , { n a m e : " a r r o w " , o p t i o n s : { e l e m e n t : ` . $ { t h i s . c o n s t r u c t o r . N A M E } - a r r o w ` } } , { n a m e : " o n C h a n g e " , e n a b l e d : ! 0 , p h a s e : " a f t e r W r i t e " , f n : t = > t h i s . _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) } ] , o n F i r s t U p d a t e : t = > { t . o p t i o n s . p l a c e m e n t ! = = t . p l a c e m e n t & & t h i s . _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) } } ; r e t u r n { . . . e , . . . " f u n c t i o n " = = t y p e o f   t h i s . _ c o n f i g . p o p p e r C o n f i g ? t h i s . _ c o n f i g . p o p p e r C o n f i g ( e ) : t h i s . _ c o n f i g . p o p p e r C o n f i g } } _ a d d A t t a c h m e n t C l a s s ( t ) { t h i s . g e t T i p E l e m e n t ( ) . c l a s s L i s t . a d d ( " b s - t o o l t i p - " + t h i s . u p d a t e A t t a c h m e n t ( t ) ) } _ g e t A t t a c h m e n t ( t ) { r e t u r n   x t [ t . t o U p p e r C a s e ( ) ] } _ s e t L i s t e n e r s ( ) { t h i s . _ c o n f i g . t r i g g e r . s p l i t ( "   " ) . f o r E a c h ( t = > { i f ( " c l i c k " = = = t ) B . o n ( t h i s . _ e l e m e n t , t h i s . c o n s t r u c t o r . E v e n t . C L I C K , t h i s . _ c o n f i g . s e l e c t o r , t = > t h i s . t o g g l e ( t ) ) ; e l s e   i f ( " m a n u a l " ! = = t ) { c o n s t   e = " h o v e r " = = = t ? t h i s . c o n s t r u c t o r . E v e n t . M O U S E E N T E R : t h i s . c o n s t r u c t o r . E v e n t . F O C U S I N , s = " h o v e r " = = = t ? t h i s . c o n s t r u c t o r . E v e n t . M O U S E L E A V E : t h i s . c o n s t r u c t o r . E v e n t . F O C U S O U T ; B . o n ( t h i s . _ e l e m e n t , e , t h i s . _ c o n f i g . s e l e c t o r , t = > t h i s . _ e n t e r ( t ) ) , B . o n ( t h i s . _ e l e m e n t , s , t h i s . _ c o n f i g . s e l e c t o r , t = > t h i s . _ l e a v e ( t ) ) } } ) , t h i s . _ h i d e M o d a l H a n d l e r = ( ) = > { t h i s . _ e l e m e n t & & t h i s . h i d e ( ) } , B . o n ( t h i s . _ e l e m e n t . c l o s e s t ( " . m o d a l " ) , " h i d e . b s . m o d a l " , t h i s . _ h i d e M o d a l H a n d l e r ) , t h i s . _ c o n f i g . s e l e c t o r ? t h i s . _ c o n f i g = { . . . t h i s . _ c o n f i g , t r i g g e r : " m a n u a l " , s e l e c t o r : " " } : t h i s . _ f i x T i t l e ( ) } _ f i x T i t l e ( ) { c o n s t   t = t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " t i t l e " ) , e = t y p e o f   t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " ) ; ( t | | " s t r i n g " ! = = e ) & & ( t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " d a t a - b s - o r i g i n a l - t i t l e " , t | | " " ) , ! t | | t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " a r i a - l a b e l " ) | | t h i s . _ e l e m e n t . t e x t C o n t e n t | | t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " a r i a - l a b e l " , t ) , t h i s . _ e l e m e n t . s e t A t t r i b u t e ( " t i t l e " , " " ) ) } _ e n t e r ( t , e ) { e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) , t & & ( e . _ a c t i v e T r i g g e r [ " f o c u s i n " = = = t . t y p e ? " f o c u s " : " h o v e r " ] = ! 0 ) , e . g e t T i p E l e m e n t ( ) . c l a s s L i s t . c o n t a i n s ( " s h o w " ) | | " s h o w " = = = e . _ h o v e r S t a t e ? e . _ h o v e r S t a t e = " s h o w " : ( c l e a r T i m e o u t ( e . _ t i m e o u t ) , e . _ h o v e r S t a t e = " s h o w " , e . _ c o n f i g . d e l a y & & e . _ c o n f i g . d e l a y . s h o w ? e . _ t i m e o u t = s e t T i m e o u t ( ( ) = > { " s h o w " = = = e . _ h o v e r S t a t e & & e . s h o w ( ) } , e . _ c o n f i g . d e l a y . s h o w ) : e . s h o w ( ) ) } _ l e a v e ( t , e ) { e = t h i s . _ i n i t i a l i z e O n D e l e g a t e d T a r g e t ( t , e ) , t & & ( e . _ a c t i v e T r i g g e r [ " f o c u s o u t " = = = t . t y p e ? " f o c u s " : " h o v e r " ] = e . _ e l e m e n t . c o n t a i n s ( t . r e l a t e d T a r g e t ) ) , e . _ i s W i t h A c t i v e T r i g g e r ( ) | | ( c l e a r T i m e o u t ( e . _ t i m e o u t ) , e . _ h o v e r S t a t e = " o u t " , e . _ c o n f i g . d e l a y & & e . _ c o n f i g . d e l a y . h i d e ? e . _ t i m e o u t = s e t T i m e o u t ( ( ) = > { " o u t " = = = e . _ h o v e r S t a t e & & e . h i d e ( ) } , e . _ c o n f i g . d e l a y . h i d e ) : e . h i d e ( ) ) } _ i s W i t h A c t i v e T r i g g e r ( ) { f o r ( c o n s t   t   i n   t h i s . _ a c t i v e T r i g g e r ) i f ( t h i s . _ a c t i v e T r i g g e r [ t ] ) r e t u r n ! 0 ; r e t u r n ! 1 } _ g e t C o n f i g ( t ) { c o n s t   e = V . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) ; r e t u r n   O b j e c t . k e y s ( e ) . f o r E a c h ( t = > { N t . h a s ( t ) & & d e l e t e   e [ t ] } ) , ( t = { . . . t h i s . c o n s t r u c t o r . D e f a u l t , . . . e , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } ) . c o n t a i n e r = ! 1 = = = t . c o n t a i n e r ? d o c u m e n t . b o d y : h ( t . c o n t a i n e r ) , " n u m b e r " = = t y p e o f   t . d e l a y & & ( t . d e l a y = { s h o w : t . d e l a y , h i d e : t . d e l a y } ) , " n u m b e r " = = t y p e o f   t . t i t l e & & ( t . t i t l e = t . t i t l e . t o S t r i n g ( ) ) , " n u m b e r " = = t y p e o f   t . c o n t e n t & & ( t . c o n t e n t = t . c o n t e n t . t o S t r i n g ( ) ) , d ( " t o o l t i p " , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , t . s a n i t i z e & & ( t . t e m p l a t e = D t ( t . t e m p l a t e , t . a l l o w L i s t , t . s a n i t i z e F n ) ) , t } _ g e t D e l e g a t e C o n f i g ( ) { c o n s t   t = { } ; i f ( t h i s . _ c o n f i g ) f o r ( c o n s t   e   i n   t h i s . _ c o n f i g ) t h i s . c o n s t r u c t o r . D e f a u l t [ e ] ! = = t h i s . _ c o n f i g [ e ] & & ( t [ e ] = t h i s . _ c o n f i g [ e ] ) ; r e t u r n   t } _ c l e a n T i p C l a s s ( ) { c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) , e = t . g e t A t t r i b u t e ( " c l a s s " ) . m a t c h ( I t ) ; n u l l ! = = e & & e . l e n g t h > 0 & & e . m a p ( t = > t . t r i m ( ) ) . f o r E a c h ( e = > t . c l a s s L i s t . r e m o v e ( e ) ) } _ h a n d l e P o p p e r P l a c e m e n t C h a n g e ( t ) { c o n s t { s t a t e : e } = t ; e & & ( t h i s . t i p = e . e l e m e n t s . p o p p e r , t h i s . _ c l e a n T i p C l a s s ( ) , t h i s . _ a d d A t t a c h m e n t C l a s s ( t h i s . _ g e t A t t a c h m e n t ( e . p l a c e m e n t ) ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = j t . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } y ( j t ) ; c o n s t   H t = n e w   R e g E x p ( " ( ^ | \ \ s ) b s - p o p o v e r \ \ S + " , " g " ) , R t = { . . . j t . D e f a u l t , p l a c e m e n t : " r i g h t " , o f f s e t : [ 0 , 8 ] , t r i g g e r : " c l i c k " , c o n t e n t : " " , t e m p l a t e : ' < d i v   c l a s s = " p o p o v e r "   r o l e = " t o o l t i p " > < d i v   c l a s s = " p o p o v e r - a r r o w " > < / d i v > < h 3   c l a s s = " p o p o v e r - h e a d e r " > < / h 3 > < d i v   c l a s s = " p o p o v e r - b o d y " > < / d i v > < / d i v > ' } , B t = { . . . j t . D e f a u l t T y p e , c o n t e n t : " ( s t r i n g | e l e m e n t | f u n c t i o n ) " } , $ t = { H I D E : " h i d e . b s . p o p o v e r " , H I D D E N : " h i d d e n . b s . p o p o v e r " , S H O W : " s h o w . b s . p o p o v e r " , S H O W N : " s h o w n . b s . p o p o v e r " , I N S E R T E D : " i n s e r t e d . b s . p o p o v e r " , C L I C K : " c l i c k . b s . p o p o v e r " , F O C U S I N : " f o c u s i n . b s . p o p o v e r " , F O C U S O U T : " f o c u s o u t . b s . p o p o v e r " , M O U S E E N T E R : " m o u s e e n t e r . b s . p o p o v e r " , M O U S E L E A V E : " m o u s e l e a v e . b s . p o p o v e r " } ; c l a s s   W t   e x t e n d s   j t { s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   R t } s t a t i c   g e t   N A M E ( ) { r e t u r n " p o p o v e r " } s t a t i c   g e t   E v e n t ( ) { r e t u r n   $ t } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   B t } i s W i t h C o n t e n t ( ) { r e t u r n   t h i s . g e t T i t l e ( ) | | t h i s . _ g e t C o n t e n t ( ) } g e t T i p E l e m e n t ( ) { r e t u r n   t h i s . t i p | | ( t h i s . t i p = s u p e r . g e t T i p E l e m e n t ( ) , t h i s . g e t T i t l e ( ) | | i . f i n d O n e ( " . p o p o v e r - h e a d e r " , t h i s . t i p ) . r e m o v e ( ) , t h i s . _ g e t C o n t e n t ( ) | | i . f i n d O n e ( " . p o p o v e r - b o d y " , t h i s . t i p ) . r e m o v e ( ) ) , t h i s . t i p } s e t C o n t e n t ( ) { c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) ; t h i s . s e t E l e m e n t C o n t e n t ( i . f i n d O n e ( " . p o p o v e r - h e a d e r " , t ) , t h i s . g e t T i t l e ( ) ) ; l e t   e = t h i s . _ g e t C o n t e n t ( ) ; " f u n c t i o n " = = t y p e o f   e & & ( e = e . c a l l ( t h i s . _ e l e m e n t ) ) , t h i s . s e t E l e m e n t C o n t e n t ( i . f i n d O n e ( " . p o p o v e r - b o d y " , t ) , e ) , t . c l a s s L i s t . r e m o v e ( " f a d e " , " s h o w " ) } _ a d d A t t a c h m e n t C l a s s ( t ) { t h i s . g e t T i p E l e m e n t ( ) . c l a s s L i s t . a d d ( " b s - p o p o v e r - " + t h i s . u p d a t e A t t a c h m e n t ( t ) ) } _ g e t C o n t e n t ( ) { r e t u r n   t h i s . _ e l e m e n t . g e t A t t r i b u t e ( " d a t a - b s - c o n t e n t " ) | | t h i s . _ c o n f i g . c o n t e n t } _ c l e a n T i p C l a s s ( ) { c o n s t   t = t h i s . g e t T i p E l e m e n t ( ) , e = t . g e t A t t r i b u t e ( " c l a s s " ) . m a t c h ( H t ) ; n u l l ! = = e & & e . l e n g t h > 0 & & e . m a p ( t = > t . t r i m ( ) ) . f o r E a c h ( e = > t . c l a s s L i s t . r e m o v e ( e ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = W t . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } y ( W t ) ; c o n s t   q t = { o f f s e t : 1 0 , m e t h o d : " a u t o " , t a r g e t : " " } , z t = { o f f s e t : " n u m b e r " , m e t h o d : " s t r i n g " , t a r g e t : " ( s t r i n g | e l e m e n t ) " } ; c l a s s   F t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ s c r o l l E l e m e n t = " B O D Y " = = = t h i s . _ e l e m e n t . t a g N a m e ? w i n d o w : t h i s . _ e l e m e n t , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ s e l e c t o r = ` $ { t h i s . _ c o n f i g . t a r g e t }   . n a v - l i n k ,   $ { t h i s . _ c o n f i g . t a r g e t }   . l i s t - g r o u p - i t e m ,   $ { t h i s . _ c o n f i g . t a r g e t }   . d r o p d o w n - i t e m ` , t h i s . _ o f f s e t s = [ ] , t h i s . _ t a r g e t s = [ ] , t h i s . _ a c t i v e T a r g e t = n u l l , t h i s . _ s c r o l l H e i g h t = 0 , B . o n ( t h i s . _ s c r o l l E l e m e n t , " s c r o l l . b s . s c r o l l s p y " , ( ) = > t h i s . _ p r o c e s s ( ) ) , t h i s . r e f r e s h ( ) , t h i s . _ p r o c e s s ( ) } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   q t } s t a t i c   g e t   N A M E ( ) { r e t u r n " s c r o l l s p y " } r e f r e s h ( ) { c o n s t   t = t h i s . _ s c r o l l E l e m e n t = = = t h i s . _ s c r o l l E l e m e n t . w i n d o w ? " o f f s e t " : " p o s i t i o n " , e = " a u t o " = = = t h i s . _ c o n f i g . m e t h o d ? t : t h i s . _ c o n f i g . m e t h o d , s = " p o s i t i o n " = = = e ? t h i s . _ g e t S c r o l l T o p ( ) : 0 ; t h i s . _ o f f s e t s = [ ] , t h i s . _ t a r g e t s = [ ] , t h i s . _ s c r o l l H e i g h t = t h i s . _ g e t S c r o l l H e i g h t ( ) , i . f i n d ( t h i s . _ s e l e c t o r ) . m a p ( t = > { c o n s t   n = r ( t ) , o = n ? i . f i n d O n e ( n ) : n u l l ; i f ( o ) { c o n s t   t = o . g e t B o u n d i n g C l i e n t R e c t ( ) ; i f ( t . w i d t h | | t . h e i g h t ) r e t u r n [ V [ e ] ( o ) . t o p + s , n ] } r e t u r n   n u l l } ) . f i l t e r ( t = > t ) . s o r t ( ( t , e ) = > t [ 0 ] - e [ 0 ] ) . f o r E a c h ( t = > { t h i s . _ o f f s e t s . p u s h ( t [ 0 ] ) , t h i s . _ t a r g e t s . p u s h ( t [ 1 ] ) } ) } d i s p o s e ( ) { B . o f f ( t h i s . _ s c r o l l E l e m e n t , " . b s . s c r o l l s p y " ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { i f ( " s t r i n g " ! = t y p e o f ( t = { . . . q t , . . . V . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } ) . t a r g e t & & c ( t . t a r g e t ) ) { l e t { i d : e } = t . t a r g e t ; e | | ( e = n ( " s c r o l l s p y " ) , t . t a r g e t . i d = e ) , t . t a r g e t = " # " + e } r e t u r n   d ( " s c r o l l s p y " , t , z t ) , t } _ g e t S c r o l l T o p ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t = = = w i n d o w ? t h i s . _ s c r o l l E l e m e n t . p a g e Y O f f s e t : t h i s . _ s c r o l l E l e m e n t . s c r o l l T o p } _ g e t S c r o l l H e i g h t ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t . s c r o l l H e i g h t | | M a t h . m a x ( d o c u m e n t . b o d y . s c r o l l H e i g h t , d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l H e i g h t ) } _ g e t O f f s e t H e i g h t ( ) { r e t u r n   t h i s . _ s c r o l l E l e m e n t = = = w i n d o w ? w i n d o w . i n n e r H e i g h t : t h i s . _ s c r o l l E l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) . h e i g h t } _ p r o c e s s ( ) { c o n s t   t = t h i s . _ g e t S c r o l l T o p ( ) + t h i s . _ c o n f i g . o f f s e t , e = t h i s . _ g e t S c r o l l H e i g h t ( ) , s = t h i s . _ c o n f i g . o f f s e t + e - t h i s . _ g e t O f f s e t H e i g h t ( ) ; i f ( t h i s . _ s c r o l l H e i g h t ! = = e & & t h i s . r e f r e s h ( ) , t > = s ) { c o n s t   t = t h i s . _ t a r g e t s [ t h i s . _ t a r g e t s . l e n g t h - 1 ] ; t h i s . _ a c t i v e T a r g e t ! = = t & & t h i s . _ a c t i v a t e ( t ) } e l s e { i f ( t h i s . _ a c t i v e T a r g e t & & t < t h i s . _ o f f s e t s [ 0 ] & & t h i s . _ o f f s e t s [ 0 ] > 0 ) r e t u r n   t h i s . _ a c t i v e T a r g e t = n u l l , v o i d   t h i s . _ c l e a r ( ) ; f o r ( l e t   e = t h i s . _ o f f s e t s . l e n g t h ; e - - ; ) t h i s . _ a c t i v e T a r g e t ! = = t h i s . _ t a r g e t s [ e ] & & t > = t h i s . _ o f f s e t s [ e ] & & ( v o i d   0 = = = t h i s . _ o f f s e t s [ e + 1 ] | | t < t h i s . _ o f f s e t s [ e + 1 ] ) & & t h i s . _ a c t i v a t e ( t h i s . _ t a r g e t s [ e ] ) } } _ a c t i v a t e ( t ) { t h i s . _ a c t i v e T a r g e t = t , t h i s . _ c l e a r ( ) ; c o n s t   e = t h i s . _ s e l e c t o r . s p l i t ( " , " ) . m a p ( e = > ` $ { e } [ d a t a - b s - t a r g e t = " $ { t } " ] , $ { e } [ h r e f = " $ { t } " ] ` ) , s = i . f i n d O n e ( e . j o i n ( " , " ) ) ; s . c l a s s L i s t . c o n t a i n s ( " d r o p d o w n - i t e m " ) ? ( i . f i n d O n e ( " . d r o p d o w n - t o g g l e " , s . c l o s e s t ( " . d r o p d o w n " ) ) . c l a s s L i s t . a d d ( " a c t i v e " ) , s . c l a s s L i s t . a d d ( " a c t i v e " ) ) : ( s . c l a s s L i s t . a d d ( " a c t i v e " ) , i . p a r e n t s ( s , " . n a v ,   . l i s t - g r o u p " ) . f o r E a c h ( t = > { i . p r e v ( t , " . n a v - l i n k ,   . l i s t - g r o u p - i t e m " ) . f o r E a c h ( t = > t . c l a s s L i s t . a d d ( " a c t i v e " ) ) , i . p r e v ( t , " . n a v - i t e m " ) . f o r E a c h ( t = > { i . c h i l d r e n ( t , " . n a v - l i n k " ) . f o r E a c h ( t = > t . c l a s s L i s t . a d d ( " a c t i v e " ) ) } ) } ) ) , B . t r i g g e r ( t h i s . _ s c r o l l E l e m e n t , " a c t i v a t e . b s . s c r o l l s p y " , { r e l a t e d T a r g e t : t } ) } _ c l e a r ( ) { i . f i n d ( t h i s . _ s e l e c t o r ) . f i l t e r ( t = > t . c l a s s L i s t . c o n t a i n s ( " a c t i v e " ) ) . f o r E a c h ( t = > t . c l a s s L i s t . r e m o v e ( " a c t i v e " ) ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = F t . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } B . o n ( w i n d o w , " l o a d . b s . s c r o l l s p y . d a t a - a p i " , ( ) = > { i . f i n d ( ' [ d a t a - b s - s p y = " s c r o l l " ] ' ) . f o r E a c h ( t = > n e w   F t ( t ) ) } ) , y ( F t ) ; c l a s s   U t   e x t e n d s   q { s t a t i c   g e t   N A M E ( ) { r e t u r n " t a b " } s h o w ( ) { i f ( t h i s . _ e l e m e n t . p a r e n t N o d e & & t h i s . _ e l e m e n t . p a r e n t N o d e . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E & & t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " a c t i v e " ) ) r e t u r n ; l e t   t ; c o n s t   e = a ( t h i s . _ e l e m e n t ) , s = t h i s . _ e l e m e n t . c l o s e s t ( " . n a v ,   . l i s t - g r o u p " ) ; i f ( s ) { c o n s t   e = " U L " = = = s . n o d e N a m e | | " O L " = = = s . n o d e N a m e ? " : s c o p e   >   l i   >   . a c t i v e " : " . a c t i v e " ; t = i . f i n d ( e , s ) , t = t [ t . l e n g t h - 1 ] } c o n s t   n = t ? B . t r i g g e r ( t , " h i d e . b s . t a b " , { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ) : n u l l ; i f ( B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . t a b " , { r e l a t e d T a r g e t : t } ) . d e f a u l t P r e v e n t e d | | n u l l ! = = n & & n . d e f a u l t P r e v e n t e d ) r e t u r n ; t h i s . _ a c t i v a t e ( t h i s . _ e l e m e n t , s ) ; c o n s t   o = ( ) = > { B . t r i g g e r ( t , " h i d d e n . b s . t a b " , { r e l a t e d T a r g e t : t h i s . _ e l e m e n t } ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . t a b " , { r e l a t e d T a r g e t : t } ) } ; e ? t h i s . _ a c t i v a t e ( e , e . p a r e n t N o d e , o ) : o ( ) } _ a c t i v a t e ( t , e , s ) { c o n s t   n = ( ! e | | " U L " ! = = e . n o d e N a m e & & " O L " ! = = e . n o d e N a m e ? i . c h i l d r e n ( e , " . a c t i v e " ) : i . f i n d ( " : s c o p e   >   l i   >   . a c t i v e " , e ) ) [ 0 ] , o = s & & n & & n . c l a s s L i s t . c o n t a i n s ( " f a d e " ) , r = ( ) = > t h i s . _ t r a n s i t i o n C o m p l e t e ( t , n , s ) ; n & & o ? ( n . c l a s s L i s t . r e m o v e ( " s h o w " ) , t h i s . _ q u e u e C a l l b a c k ( r , t , ! 0 ) ) : r ( ) } _ t r a n s i t i o n C o m p l e t e ( t , e , s ) { i f ( e ) { e . c l a s s L i s t . r e m o v e ( " a c t i v e " ) ; c o n s t   t = i . f i n d O n e ( " : s c o p e   >   . d r o p d o w n - m e n u   . a c t i v e " , e . p a r e n t N o d e ) ; t & & t . c l a s s L i s t . r e m o v e ( " a c t i v e " ) , " t a b " = = = e . g e t A t t r i b u t e ( " r o l e " ) & & e . s e t A t t r i b u t e ( " a r i a - s e l e c t e d " , ! 1 ) } t . c l a s s L i s t . a d d ( " a c t i v e " ) , " t a b " = = = t . g e t A t t r i b u t e ( " r o l e " ) & & t . s e t A t t r i b u t e ( " a r i a - s e l e c t e d " , ! 0 ) , m ( t ) , t . c l a s s L i s t . c o n t a i n s ( " f a d e " ) & & t . c l a s s L i s t . a d d ( " s h o w " ) ; l e t   n = t . p a r e n t N o d e ; i f ( n & & " L I " = = = n . n o d e N a m e & & ( n = n . p a r e n t N o d e ) , n & & n . c l a s s L i s t . c o n t a i n s ( " d r o p d o w n - m e n u " ) ) { c o n s t   e = t . c l o s e s t ( " . d r o p d o w n " ) ; e & & i . f i n d ( " . d r o p d o w n - t o g g l e " , e ) . f o r E a c h ( t = > t . c l a s s L i s t . a d d ( " a c t i v e " ) ) , t . s e t A t t r i b u t e ( " a r i a - e x p a n d e d " , ! 0 ) } s & & s ( ) } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = U t . g e t O r C r e a t e I n s t a n c e ( t h i s ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( ) } } ) ) } } B . o n ( d o c u m e n t , " c l i c k . b s . t a b . d a t a - a p i " , ' [ d a t a - b s - t o g g l e = " t a b " ] ,   [ d a t a - b s - t o g g l e = " p i l l " ] ,   [ d a t a - b s - t o g g l e = " l i s t " ] ' , ( f u n c t i o n ( t ) { [ " A " , " A R E A " ] . i n c l u d e s ( t h i s . t a g N a m e ) & & t . p r e v e n t D e f a u l t ( ) , g ( t h i s ) | | U t . g e t O r C r e a t e I n s t a n c e ( t h i s ) . s h o w ( ) } ) ) , y ( U t ) ; c o n s t   K t = { a n i m a t i o n : " b o o l e a n " , a u t o h i d e : " b o o l e a n " , d e l a y : " n u m b e r " } , V t = { a n i m a t i o n : ! 0 , a u t o h i d e : ! 0 , d e l a y : 5 e 3 } ; c l a s s   Q t   e x t e n d s   q { c o n s t r u c t o r ( t , e ) { s u p e r ( t ) , t h i s . _ c o n f i g = t h i s . _ g e t C o n f i g ( e ) , t h i s . _ t i m e o u t = n u l l , t h i s . _ h a s M o u s e I n t e r a c t i o n = ! 1 , t h i s . _ h a s K e y b o a r d I n t e r a c t i o n = ! 1 , t h i s . _ s e t L i s t e n e r s ( ) } s t a t i c   g e t   D e f a u l t T y p e ( ) { r e t u r n   K t } s t a t i c   g e t   D e f a u l t ( ) { r e t u r n   V t } s t a t i c   g e t   N A M E ( ) { r e t u r n " t o a s t " } s h o w ( ) { B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w . b s . t o a s t " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ c l e a r T i m e o u t ( ) , t h i s . _ c o n f i g . a n i m a t i o n & & t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " f a d e " ) , t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " h i d e " ) , m ( t h i s . _ e l e m e n t ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " s h o w i n g " ) , t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w i n g " ) , t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " s h o w " ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " s h o w n . b s . t o a s t " ) , t h i s . _ m a y b e S c h e d u l e H i d e ( ) } , t h i s . _ e l e m e n t , t h i s . _ c o n f i g . a n i m a t i o n ) ) } h i d e ( ) { t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) & & ( B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d e . b s . t o a s t " ) . d e f a u l t P r e v e n t e d | | ( t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w " ) , t h i s . _ q u e u e C a l l b a c k ( ( ) = > { t h i s . _ e l e m e n t . c l a s s L i s t . a d d ( " h i d e " ) , B . t r i g g e r ( t h i s . _ e l e m e n t , " h i d d e n . b s . t o a s t " ) } , t h i s . _ e l e m e n t , t h i s . _ c o n f i g . a n i m a t i o n ) ) ) } d i s p o s e ( ) { t h i s . _ c l e a r T i m e o u t ( ) , t h i s . _ e l e m e n t . c l a s s L i s t . c o n t a i n s ( " s h o w " ) & & t h i s . _ e l e m e n t . c l a s s L i s t . r e m o v e ( " s h o w " ) , s u p e r . d i s p o s e ( ) } _ g e t C o n f i g ( t ) { r e t u r n   t = { . . . V t , . . . V . g e t D a t a A t t r i b u t e s ( t h i s . _ e l e m e n t ) , . . . " o b j e c t " = = t y p e o f   t & & t ? t : { } } , d ( " t o a s t " , t , t h i s . c o n s t r u c t o r . D e f a u l t T y p e ) , t } _ m a y b e S c h e d u l e H i d e ( ) { t h i s . _ c o n f i g . a u t o h i d e & & ( t h i s . _ h a s M o u s e I n t e r a c t i o n | | t h i s . _ h a s K e y b o a r d I n t e r a c t i o n | | ( t h i s . _ t i m e o u t = s e t T i m e o u t ( ( ) = > { t h i s . h i d e ( ) } , t h i s . _ c o n f i g . d e l a y ) ) ) } _ o n I n t e r a c t i o n ( t , e ) { s w i t c h ( t . t y p e ) { c a s e " m o u s e o v e r " : c a s e " m o u s e o u t " : t h i s . _ h a s M o u s e I n t e r a c t i o n = e ; b r e a k ; c a s e " f o c u s i n " : c a s e " f o c u s o u t " : t h i s . _ h a s K e y b o a r d I n t e r a c t i o n = e } i f ( e ) r e t u r n   v o i d   t h i s . _ c l e a r T i m e o u t ( ) ; c o n s t   s = t . r e l a t e d T a r g e t ; t h i s . _ e l e m e n t = = = s | | t h i s . _ e l e m e n t . c o n t a i n s ( s ) | | t h i s . _ m a y b e S c h e d u l e H i d e ( ) } _ s e t L i s t e n e r s ( ) { B . o n ( t h i s . _ e l e m e n t , " c l i c k . d i s m i s s . b s . t o a s t " , ' [ d a t a - b s - d i s m i s s = " t o a s t " ] ' , ( ) = > t h i s . h i d e ( ) ) , B . o n ( t h i s . _ e l e m e n t , " m o u s e o v e r . b s . t o a s t " , t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 0 ) ) , B . o n ( t h i s . _ e l e m e n t , " m o u s e o u t . b s . t o a s t " , t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 1 ) ) , B . o n ( t h i s . _ e l e m e n t , " f o c u s i n . b s . t o a s t " , t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 0 ) ) , B . o n ( t h i s . _ e l e m e n t , " f o c u s o u t . b s . t o a s t " , t = > t h i s . _ o n I n t e r a c t i o n ( t , ! 1 ) ) } _ c l e a r T i m e o u t ( ) { c l e a r T i m e o u t ( t h i s . _ t i m e o u t ) , t h i s . _ t i m e o u t = n u l l } s t a t i c   j Q u e r y I n t e r f a c e ( t ) { r e t u r n   t h i s . e a c h ( ( f u n c t i o n ( ) { c o n s t   e = Q t . g e t O r C r e a t e I n s t a n c e ( t h i s , t ) ; i f ( " s t r i n g " = = t y p e o f   t ) { i f ( v o i d   0 = = = e [ t ] ) t h r o w   n e w   T y p e E r r o r ( ` N o   m e t h o d   n a m e d   " $ { t } " ` ) ; e [ t ] ( t h i s ) } } ) ) } } r e t u r n   y ( Q t ) , { A l e r t : z , B u t t o n : F , C a r o u s e l : e t , C o l l a p s e : n t , D r o p d o w n : p t , M o d a l : w t , O f f c a n v a s : T t , P o p o v e r : W t , S c r o l l S p y : F t , T a b : U t , T o a s t : Q t , T o o l t i p : j t } } ) ) ; 
 
 