( function ( K ) { function yd ( ) { function R ( e , f ) { e . attr ( "transform" , function ( e ) { return "translate(" + ( f ( e ) + qa ) + ", 0)" } ) } function x ( e , f ) { e . attr ( "transform" , function ( e ) { return "translate(0," + f ( e ) + ")" } ) } function y ( e ) { var f = e [ 0 ] ; e = e [ e . length - 1 ] ; return f < e ? [ f , e ] : [ e , f ] } function z ( e ) { for ( var f = [ ] , q = Math . ceil ( e [ 0 ] ) ; q < e [ 1 ] ; q ++ ) f . push ( q ) ; 0 < f . length && 0 < f [ 0 ] && f . unshift ( f [ 0 ] - ( f [ 1 ] - f [ 0 ] ) ) ; return f } function K ( e ) { e = e < L . length ? L [ e ] : e ; return S ? S ( e ) : e } function p ( p ) { p . each ( function ( ) { var p = e . select ( this ) , ea = z ( q . domain ( ) ) , Y = p . selectAll ( ".tick.major" ) . data ( ea ,
String ) , fa = Y . enter ( ) . insert ( "g" , "path" ) . attr ( "class" , "tick major" ) . style ( "opacity" , 1E-6 ) , L = e . transition ( Y . exit ( ) ) . style ( "opacity" , 1E-6 ) . remove ( ) , ga = e . transition ( Y ) . style ( "opacity" , 1 ) , P , T = q . rangeExtent ? q . rangeExtent ( ) : y ( q . range ( ) ) , p = p . selectAll ( ".domain" ) . data ( [ 0 ] ) ; p . enter ( ) . append ( "path" ) . attr ( "class" , "domain" ) ; var p = e . transition ( p ) , s = q . copy ( ) , ha = this . _ _chart _ _ || s ; this . _ _chart _ _ = s ; fa . append ( "line" ) ; fa . append ( "text" ) ; var S = fa . select ( "line" ) , U = ga . select ( "line" ) , ra = Y . select ( "text" ) , bb = fa . select ( "text" ) ,
sa = ga . select ( "text" ) ; qa = ( s ( 1 ) - s ( 0 ) ) / 2 ; Y = ya ? 0 : qa ; switch ( C ) { case "bottom" : P = R ; S . attr ( "y2" , M ) ; bb . attr ( "y" , Math . max ( M , 0 ) + f ) ; U . attr ( "x1" , Y ) . attr ( "x2" , Y ) . attr ( "y2" , M ) ; sa . attr ( "x" , 0 ) . attr ( "y" , Math . max ( M , 0 ) + f ) ; ra . attr ( "dy" , ".71em" ) . style ( "text-anchor" , "middle" ) ; ra . text ( function ( e ) { return ea . length < V || 0 === e % Math . ceil ( ea . length / V ) ? K ( e ) : "" } ) ; p . attr ( "d" , "M" + T [ 0 ] + "," + Z + "V0H" + T [ 1 ] + "V" + Z ) ; break ; case "left" : P = x , S . attr ( "x2" , - M ) , bb . attr ( "x" , - ( Math . max ( M , 0 ) + f ) ) , U . attr ( "x2" , - M ) . attr ( "y2" , 0 ) , sa . attr ( "x" , - ( Math . max ( M ,
0 ) + f ) ) . attr ( "y" , qa ) , ra . attr ( "dy" , ".32em" ) . style ( "text-anchor" , "end" ) , ra . text ( function ( e ) { return ea . length < V || 0 === e % Math . ceil ( ea . length / V ) ? K ( e ) : "" } ) , p . attr ( "d" , "M" + - Z + "," + T [ 0 ] + "H0V" + T [ 1 ] + "H" + - Z ) } if ( q . ticks ) fa . call ( P , ha ) , ga . call ( P , s ) , L . call ( P , s ) ; else { var zb = s . rangeBand ( ) / 2 , L = function ( e ) { return s ( e ) + zb } ; fa . call ( P , L ) ; ga . call ( P , L ) } } ) } var q = e . scale . linear ( ) , C = "bottom" , M = 6 , Z = 6 , f = 3 , ya = ! 1 , V = 10 , qa = 0 , S = null , L = [ ] ; p . scale = function ( e ) { if ( ! arguments . length ) return q ; q = e ; return p } ; p . orient = function ( e ) { if ( ! arguments . length ) return C ;
C = e in { top : 1 , right : 1 , bottom : 1 , left : 1 } ? e + "" : "bottom" ; return p } ; p . categories = function ( e ) { if ( ! arguments . length ) return L ; L = e ; return p } ; p . tickCentered = function ( e ) { if ( ! arguments . length ) return ya ; ya = e ; return p } ; p . tickTextNum = function ( e ) { if ( ! arguments . length ) return V ; V = e ; return p } ; p . tickFormat = function ( e ) { if ( ! arguments . length ) return S ; S = e ; return p } ; p . tickOffset = function ( ) { return qa } ; p . ticks = function ( ) { } ; return p } function z ( e ) { return e || 0 === e } function x ( e ) { return "undefined" === typeof e } function y ( e ) { return "undefined" !==
typeof e } var Ab = K . c3 = { } , e = K . d3 ; Ab . generate = function ( R ) { var qc , rc , yb , sc , p , q , C , M , Z ; function f ( a , b ) { for ( var c = R , d = 0 ; d < a . length ; d ++ ) { if ( ! ( a [ d ] in c ) ) return b ; c = c [ a [ d ] ] } return c } function ya ( ) { Bb = Ja ? Ja : L ( ) ; za = S ( ) ; q = 0 ; C = ( h ? Cb + wc : 0 ) + ( cb ? cb : db ? 1 : 40 ) ; M = 20 + ( h ? 0 : Cb ) + ta ; Z = eb ? eb : Db ? fb || h ? 1 : 40 : 1 ; r = Bb - C - Z ; t = za - q - M ; yb = h ? q : za - Cb - ta ; sc = h ? xc : C ; p = 20 + ta ; Eb = h ? C - xc - wc : r ; gb = h ? t : za - yb - p ; qc = za - ta ; rc = C ; V ( ) } function V ( ) { Fb = t / 2 ; Ka = 0.95 * Fb ; Gb = ia ( k . data . targets , "donut" ) ? 0.6 * Ka : 0 } function qa ( ) { var a = n . property ( "offsetLeft" ) ; return a ?
a : 0 } function S ( ) { var a = Hb ? Hb : + e . select ( Aa ) . style ( "height" ) . replace ( "px" , "" ) ; return 0 < a ? a : 320 } function L ( ) { return + e . select ( Aa ) . style ( "width" ) . replace ( "px" , "" ) } function ea ( ) { return r + 2 + C + Z } function Ab ( ) { return 40 } function zd ( ) { return C + 20 } function Y ( ) { return t - q + 2 } function fa ( ) { var a = h ? t : r , b = Ba ( $ ) / Ba ( m . domain ( ) ) , c = La ( ) ; return 1 < c ? a * b / ( c - 1 ) : a } function tc ( ) { var a , b ; Ib = h ? 1 : 0 ; Jb = h ? t : r ; Kb = h ? 0 : t ; Lb = h ? r : 1 ; Mb = h ? 0 : gb ; Nb = h ? Eb : 1 ; m = P ( Ib , Jb , m ? m . domain ( ) : void 0 , function ( ) { return N . tickOffset ( ) } ) ; A = T ( Kb , Lb , A ? A . domain ( ) :
void 0 ) ; aa = T ( Kb , Lb , aa ? aa . domain ( ) : void 0 ) ; W = P ( Ib , Jb , $ , function ( a ) { return a % 1 ? 0 : hb . tickOffset ( ) } ) ; ib = T ( Mb , Nb ) ; jb = T ( Mb , Nb ) ; a = ra ( ) ; b = bb ( ) ; N = uc ( m , Ad , a , b ) ; hb = uc ( W , Bd , a , b ) ; Ma = e . svg . axis ( ) . scale ( A ) . orient ( Cd ) . tickFormat ( Ob ) . ticks ( Dd ) . outerTickSize ( 0 ) ; Pb = e . svg . axis ( ) . scale ( aa ) . orient ( Ed ) . tickFormat ( Fd ) . ticks ( Gd ) . outerTickSize ( 0 ) ; ga ( ) } function ga ( ) { kb = zb ( ) ; yc = vc ( ) ; zc = vc ( 0.98 ) } function P ( a , b , c , d ) { var g = ( D ? e . time . scale ( ) : e . scale . linear ( ) ) . range ( [ a , b ] ) ; g . orgDomain = function ( ) { return g . domain ( ) } ; y ( c ) && g . domain ( c ) ;
x ( d ) && ( d = function ( ) { return 0 } ) ; if ( ja ) { var H = g , u , g = function ( a ) { return H ( a ) + d ( a ) } ; for ( u in H ) g [ u ] = H [ u ] ; g . orgDomain = function ( ) { return H . domain ( ) } ; g . domain = function ( a ) { if ( ! arguments . length ) return a = H . domain ( ) , [ a [ 0 ] , a [ 1 ] + 1 ] ; H . domain ( a ) ; return g } } return g } function T ( a , b ) { return e . scale . linear ( ) . range ( [ a , b ] ) } function s ( a ) { return "y2" === U ( a ) ? aa : A } function ha ( a ) { return "y2" === U ( a ) ? jb : ib } function uc ( a , b , c , d ) { a = ( ja ? yd ( ) : e . svg . axis ( ) ) . scale ( a ) . orient ( b ) ; a . tickFormat ( c ) . ticks ( d ) ; ja ? a . categories ( Na ) . tickCentered ( Hd ) :
a . tickOffset = function ( ) { return 0 } ; return a } function U ( a ) { return a in Ac ? Ac [ a ] : "y" } function ra ( ) { var a = D ? Id : ja ? Jd : null ; lb && ( "function" === typeof lb ? a = lb : D && ( a = function ( a ) { return e . time . format ( lb ) ( a ) } ) ) ; return a } function bb ( ) { var a = La ( ) ; return 10 > a ? a : 10 } function sa ( a ) { var b = ! 1 ; Qb ( k . data . targets ) . forEach ( function ( c ) { b || c . data . id !== a . data . id || ( b = ! 0 , a = c ) } ) ; return b ? a : null } function zb ( ) { var a = e . svg . arc ( ) . outerRadius ( Ka ) . innerRadius ( Gb ) , b = function ( b , d ) { var g ; return d ? a ( b ) : ( g = sa ( b ) ) ? a ( g ) : "M 0 0" } ; b . centroid =
a . centroid ; return b } function vc ( a ) { var b = e . svg . arc ( ) . outerRadius ( Fb * ( a ? a : 1 ) ) . innerRadius ( Gb ) ; return function ( a ) { return ( a = sa ( a ) ) ? b ( a ) : "M 0 0" } } function Kd ( a ) { a = sa ( a ) ; var b , c ; b = "" ; a && ( b = kb . centroid ( a ) , a = b [ 0 ] , b = b [ 1 ] , c = Math . sqrt ( a * a + b * b ) , b = "translate(" + 0.8 * ( a / c ) * Ka + "," + 0.8 * ( b / c ) * Ka + ")" ) ; return b } function Ld ( a ) { return Md ( a , ( a . endAngle - a . startAngle ) / ( 2 * Math . PI ) ) } function Bc ( a , b ) { var c = n . selectAll ( ".chart-arc" + ka ( a ) ) , d = n . selectAll ( ".-arc" ) . filter ( function ( b ) { return b . data . id !== a } ) ; c . selectAll ( "path" ) . transition ( ) . duration ( 50 ) . attr ( "d" ,
yc ) . transition ( ) . duration ( 100 ) . attr ( "d" , zc ) . each ( function ( a ) { Rb ( a . data ) } ) ; b || d . style ( "opacity" , 0.3 ) } function Sb ( a ) { n . selectAll ( ".chart-arc" + ka ( a ) ) . selectAll ( "path" ) . transition ( ) . duration ( 50 ) . attr ( "d" , kb ) ; n . selectAll ( ".-arc" ) . style ( "opacity" , 1 ) } function Nd ( a ) { var b = Cc ( a ) , c , d , g , H ; if ( 0 < v . length ) for ( H = Dc ( a ) , a = 0 ; a < v . length ; a ++ ) for ( d = v [ a ] [ 0 ] , H && b [ d ] && b [ d ] . forEach ( function ( a , c ) { b [ d ] [ c ] = 0 > a ? a : 0 } ) , c = 1 ; c < v [ a ] . length ; c ++ ) g = v [ a ] [ c ] , b [ g ] && b [ g ] . forEach ( function ( a , c ) { U ( g ) !== U ( d ) || ! b [ d ] || H && 0 < + a || ( b [ d ] [ c ] += + a ) } ) ;
return e . min ( Object . keys ( b ) . map ( function ( a ) { return e . min ( b [ a ] ) } ) ) } function Od ( a ) { var b = Cc ( a ) , c , d , g , H ; if ( 0 < v . length ) for ( H = Pd ( a ) , a = 0 ; a < v . length ; a ++ ) for ( d = v [ a ] [ 0 ] , H && b [ d ] && b [ d ] . forEach ( function ( a , c ) { b [ d ] [ c ] = 0 < a ? a : 0 } ) , c = 1 ; c < v [ a ] . length ; c ++ ) g = v [ a ] [ c ] , b [ g ] && b [ g ] . forEach ( function ( a , c ) { U ( g ) !== U ( d ) || ! b [ d ] || H && 0 > + a || ( b [ d ] [ c ] += + a ) } ) ; return e . max ( Object . keys ( b ) . map ( function ( a ) { return e . max ( b [ a ] ) } ) ) } function mb ( a ) { var b = nb ( function ( b ) { return U ( b . id ) === a } ) , c = "y2" === a ? Qd : Rd , d = "y2" === a ? Sd : Td , c = c ? c : Nd ( b ) , d = d ? d : Od ( b ) ,
g = 0.1 * Math . abs ( d - c ) , e = g , f = g , h = "y2" === a ? Ud : Vd ; h && ( c = Math . max ( Math . abs ( c ) , Math . abs ( d ) ) , d = c - h , c = h - c ) ; "y" === a && Oa && ( e = z ( Oa . top ) ? Oa . top : g , f = z ( Oa . bottom ) ? Oa . bottom : g ) ; "y2" === a && Pa && ( e = z ( Pa . top ) ? Pa . top : g , f = z ( Pa . bottom ) ? Pa . bottom : g ) ; ia ( b , "bar" ) && ! Dc ( b ) && ( f = c ) ; return [ c - f , d + e ] } function Wd ( a ) { return e . min ( a , function ( a ) { return e . min ( a . values , function ( a ) { return a . x } ) } ) } function Xd ( a ) { return e . max ( a , function ( a ) { return e . max ( a . values , function ( a ) { return a . x } ) } ) } function ob ( a ) { var b = [ Wd ( a ) , Xd ( a ) ] ; a = b [ 0 ] ; var b = b [ 1 ] ,
c = ja ? 0 : 0.01 * Math . abs ( a - b ) ; a = D ? new Date ( a . getTime ( ) - c ) : a - c ; b = D ? new Date ( b . getTime ( ) + c ) : b + c ; return [ a , b ] } function Ba ( a ) { return a [ 1 ] - a [ 0 ] } function Yd ( a ) { for ( var b = 0 ; b < a . length ; b ++ ) if ( ! ( a [ b ] in pb ) ) return ! 1 ; return ! 0 } function Zd ( a ) { for ( var b = [ ] , c = 0 ; c < a . length ; c ++ ) a [ c ] in pb && b . push ( Ec ( pb [ a [ c ] ] ) ) ; return b } function Tb ( a ) { return "start" in a ? m ( D ? ua ( a . start ) : a . start ) : 0 } function Fc ( a ) { var b = Tb ( a ) ; a = ( "end" in a ? m ( D ? ua ( a . end ) : a . end ) : r ) - b ; return 0 > a ? 0 : a } function Gc ( a ) { return va && a === va || ba && $d ( ba , a ) } function ae ( a ) { return ! Gc ( a ) }
function be ( a ) { Object . keys ( a ) . forEach ( function ( b ) { ba [ b ] = a [ b ] } ) } function qb ( a ) { var b ; a && ( b = Qa [ a . id ] , a . name = b ? b : a . id ) ; return a } function Hc ( a ) { var b = a [ 0 ] , c = { } , d = [ ] , g , e ; for ( g = 1 ; g < a . length ; g ++ ) { c = { } ; for ( e = 0 ; e < a [ g ] . length ; e ++ ) c [ b [ e ] ] = a [ g ] [ e ] ; d . push ( c ) } return d } function Ic ( a ) { var b = [ ] , c , d , g ; for ( c = 0 ; c < a . length ; c ++ ) for ( g = a [ c ] [ 0 ] , d = 1 ; d < a [ c ] . length ; d ++ ) x ( b [ d - 1 ] ) && ( b [ d - 1 ] = { } ) , b [ d - 1 ] [ g ] = a [ c ] [ d ] ; return b } function Ra ( a ) { var b = e . keys ( a [ 0 ] ) . filter ( ae ) , c = e . keys ( a [ 0 ] ) . filter ( Gc ) ; if ( D && 0 === c . length ) return K . alert ( 'data.x or data.xs must be specified when axis.x.type == "timeseries"' ) ,
[ ] ; Ub && b . forEach ( function ( b ) { var g = va ? va : ba ? ba [ b ] : null ; 0 <= c . indexOf ( g ) ? k . data . x [ b ] = a . map ( function ( a ) { return a [ g ] } ) : k . data . x [ b ] = k . data . x [ Object . keys ( k . data . x ) [ 0 ] ] } ) ; b = b . map ( function ( b ) { var c = ce ( b ) ; return { id : c , id _org : b , values : a . map ( function ( a , e ) { var f ; f = va ? va : ba ? ba [ b ] : null ; f = D ? ua ( a [ f ] ) : Ub ? a [ f ] ? + a [ f ] : b in k . data . x && k . data . x [ b ] && k . data . x [ b ] [ e ] ? k . data . x [ b ] [ e ] : e : e ; a . x = f ; return { x : f , value : null === a [ b ] || isNaN ( a [ b ] ) ? null : + a [ b ] , id : c } } ) } } ) ; b . forEach ( function ( a ) { var b ; a . values = a . values . sort ( function ( a , b ) { return ( a . x ||
0 === a . x ? a . x : Infinity ) - ( b . x || 0 === b . x ? b . x : Infinity ) } ) ; b = 0 ; a . values . forEach ( function ( a ) { a . index = b ++ } ) } ) ; Jc && ca ( Sa ( b ) . filter ( function ( a ) { return ! ( a in B ) } ) , Jc ) ; b . forEach ( function ( a ) { pb [ a . id _org ] = Ec ( a ) } ) ; return b } function Ec ( a ) { return { id : a . id , id _org : a . id _org , values : a . values . map ( function ( a ) { return { x : a . x , value : a . value , id : a . id } } ) } } function Kc ( a ) { return 0 < a && k . data . targets [ 0 ] . values [ a - 1 ] ? k . data . targets [ 0 ] . values [ a - 1 ] . x : void 0 } function La ( ) { return e . max ( k . data . targets , function ( a ) { return a . values . length } ) } function de ( ) { var a =
k . data . targets . length , b = 0 , c ; 1 < a ? k . data . targets . forEach ( function ( a ) { a . values . length > b && ( c = a , b = a . values . length ) } ) : c = a ? k . data . targets [ 0 ] : null ; return c } function Sa ( a ) { a = x ( a ) ? k . data . targets : a ; return a . map ( function ( a ) { return a . id } ) } function Lc ( a ) { var b = Sa ( ) , c ; for ( c = 0 ; c < b . length ; c ++ ) if ( b [ c ] === a ) return ! 0 ; return ! 1 } function nb ( a ) { return y ( a ) ? k . data . targets . filter ( a ) : k . data . targets } function Cc ( a ) { var b = { } ; a . forEach ( function ( a ) { b [ a . id ] = [ ] ; a . values . forEach ( function ( d ) { b [ a . id ] . push ( d . value ) } ) } ) ; return b } function Mc ( a ,
b ) { var c = Object . keys ( a ) , d , g , e ; for ( d = 0 ; d < c . length ; d ++ ) for ( e = a [ c [ d ] ] . values , g = 0 ; g < e . length ; g ++ ) if ( b ( e [ g ] . value ) ) return ! 0 ; return ! 1 } function Dc ( a ) { return Mc ( a , function ( a ) { return 0 > a } ) } function Pd ( a ) { return Mc ( a , function ( a ) { return 0 < a } ) } function Jd ( a ) { return a < Na . length ? Na [ a ] : a } function Ta ( a ) { return "-shapes -shapes-" + a . id } function Nc ( a ) { return Ta ( a ) + " -line -line-" + a . id } function ee ( a ) { return Ta ( a ) + " -circles -circles-" + a . id } function Oc ( a ) { return Ta ( a ) + " -bars -bars-" + a . id } function fe ( a ) { return Ta ( a . data ) +
" -arc -arc-" + a . data . id } function ge ( a ) { return Ta ( a ) + " -area -area-" + a . id } function he ( a , b ) { return "-shape -shape-" + b + " -circle -circle-" + b } function Pc ( a , b ) { return "-shape -shape-" + b + " -bar -bar-" + b } function ie ( a , b ) { return "region region-" + b + " " + ( "classes" in a ? [ ] . concat ( a . classes ) . join ( " " ) : "" ) } function Qc ( a , b ) { return "event-rect event-rect-" + b } function je ( a ) { return z ( a . value ) ? Rc ( a ) ? 0.5 : 1 : 0 } function Ca ( a ) { return a ? m ( a . x ) : null } function Ua ( a ) { return m ( D ? ua ( a . value ) : a . value ) } function Va ( a ) { return A ( a . value ) }
function Sc ( a ) { return W ( a . x ) } function Tc ( a , b ) { var c , d = a [ b ] . x , g = [ ] ; for ( c = b - 1 ; 0 <= c && d === a [ c ] . x ; c -- ) g . push ( a [ c ] ) ; for ( c = b ; c < a . length && d === a [ c ] . x ; c ++ ) g . push ( a [ c ] ) ; return g } function Uc ( a , b , c , d ) { c = c ? c : 0 ; d = d ? d : a . length - 1 ; var g = Math . floor ( ( d - c ) / 2 ) + c ; 0 < m ( a [ g ] . x ) - b [ 0 ] ? d = g : c = g ; return 1 === d - c ? ( g = [ ] , a [ c ] . x && ( g = g . concat ( Tc ( a , c ) ) ) , a [ d ] . x && ( g = g . concat ( Tc ( a , d ) ) ) , Vc ( g , b ) ) : Uc ( a , b , c , d ) } function Wc ( a , b ) { var c ; c = a . map ( function ( a ) { return Uc ( a . values , b ) } ) ; return Vc ( c , b ) } function Vc ( a , b ) { var c , d ; a . forEach ( function ( a ) { var e =
Vb ( a , b ) ; if ( e < c || ! c ) c = e , d = a } ) ; return d } function Xc ( a , b ) { var c , d , g , e , f ; e = a . filter ( function ( a ) { return a && z ( a . value ) } ) ; Yc && 0 !== e . length && ( X . html ( Zc ( a ) ) . style ( "visibility" , "hidden" ) . style ( "display" , "block" ) , c = X . property ( "offsetWidth" ) , d = X . property ( "offsetHeight" ) , h ? e = b [ 0 ] : ( g = qa ( ) , e = g + ( cb ? cb : db ? 1 : 40 ) + m ( e [ 0 ] . x ) + 20 , f = e + c , g = g + ( Ja ? Ja : L ( ) ) - ( eb ? eb : Db ? fb || h ? 1 : 40 : 1 ) , f > g && ( e -= c + 30 ) ) , c = b [ 1 ] + 15 + d < S ( ) ? b [ 1 ] + 15 : b [ 1 ] - d , X . style ( "top" , c + "px" ) . style ( "left" , e + "px" ) . style ( "visibility" , "visible" ) ) } function $c ( a ) { a = a . filter ( function ( a ) { return a &&
z ( a . value ) } ) ; Yc && ( ia ( k . data . targets , "scatter" ) || E ( k . data . targets ) || l . selectAll ( "line.xgrid-focus" ) . style ( "visibility" , "visible" ) . data ( [ a [ 0 ] ] ) . attr ( h ? "y1" : "x1" , Ca ) . attr ( h ? "y2" : "x2" , Ca ) ) } function ad ( ) { l . select ( "line.xgrid-focus" ) . style ( "visibility" , "hidden" ) } function Da ( a ) { return a . x || 0 === a . x ? m ( a . x ) : null } function Ea ( a ) { return s ( a . id ) ( a . value ) } function ke ( ) { var a = { } , b = 0 , c , d ; nb ( rb ) . forEach ( function ( g ) { for ( c = 0 ; c < v . length ; c ++ ) if ( ! ( 0 > v [ c ] . indexOf ( g . id ) ) ) for ( d = 0 ; d < v [ c ] . length ; d ++ ) if ( v [ c ] [ d ] in a ) { a [ g . id ] =
a [ v [ c ] [ d ] ] ; break } x ( a [ g . id ] ) && ( a [ g . id ] = b ++ ) } ) ; a . _ _max _ _ = b - 1 ; return a } function le ( a , b , c , d ) { var g = d ? W : m ; return b ? function ( d ) { var e = d . id in c ? c [ d . id ] : 0 ; return d . x || 0 === d . x ? g ( d . x ) - a * ( b / 2 - e ) : 0 } : function ( ) { return 0 } } function me ( a ) { return function ( b ) { return ( a ? ha ( b . id ) : s ( b . id ) ) ( b . value ) } } function ne ( a , b ) { var c = Object . keys ( a ) ; return function ( d , g ) { var e = b ? ha ( d . id ) : s ( d . id ) , f = e ( 0 ) , h = f ; nb ( rb ) . forEach ( function ( b ) { b . id !== d . id && a [ b . id ] === a [ d . id ] && c . indexOf ( b . id ) < c . indexOf ( d . id ) && 0 < b . values [ g ] . value * d . value && ( h += e ( b . values [ g ] . value ) -
f ) } ) ; return h } } function ca ( a , b ) { var c = x ( a ) ? Sa ( ) : a ; "string" === typeof c && ( c = [ c ] ) ; for ( var d = 0 ; d < c . length ; d ++ ) Wb [ c [ d ] ] = b === B [ c [ d ] ] , B [ c [ d ] ] = b } function ia ( a , b ) { var c = ! 1 ; a . forEach ( function ( a ) { B [ a . id ] === b && ( c = ! 0 ) ; a . id in B || "line" !== b || ( c = ! 0 ) } ) ; return c } function Wa ( a ) { return Wb [ a . id ] ? 1 : 0 } function E ( a ) { return ia ( a , "pie" ) || ia ( a , "donut" ) } function Xb ( a ) { a = "string" === typeof a ? a : a . id ; return ! ( a in B ) || "line" === B [ a ] || "spline" === B [ a ] || "area" === B [ a ] || "area-spline" === B [ a ] } function bd ( a ) { a = "string" === typeof a ? a : a . id ;
return "spline" === B [ a ] || "area-spline" === B [ a ] } function rb ( a ) { return "bar" === B [ "string" === typeof a ? a : a . id ] } function Rc ( a ) { return "scatter" === B [ "string" === typeof a ? a : a . id ] } function cd ( a ) { return "pie" === B [ "string" === typeof a ? a : a . id ] } function Rb ( a ) { return "donut" === B [ "string" === typeof a ? a : a . id ] } function dd ( a ) { return rb ( a ) ? a . values : [ ] } function oe ( a ) { return Xb ( a ) || Rc ( a ) ? a . values : [ ] } function ua ( a ) { var b ; if ( ! a ) throw Error ( a + " can not be parsed as d3.time with format " + Yb + ". Maybe 'x' of this data is not defined. See data.x or data.xs option." ) ;
b = e . time . format ( Yb ) . parse ( a ) ; if ( ! b ) throw Error ( "Failed to parse '" + a + "' with format " + Yb ) ; return b } function ed ( a , b ) { var c = e . mouse ( a ) , d = e . select ( a ) , g = 1 * d . attr ( "cx" ) , d = 1 * d . attr ( "cy" ) ; return Math . sqrt ( Math . pow ( g - c [ 0 ] , 2 ) + Math . pow ( d - c [ 1 ] , 2 ) ) < b } function fd ( a ) { var b = e . mouse ( a ) , c = e . select ( a ) ; a = 1 * c . attr ( "x" ) ; var d = 1 * c . attr ( "y" ) , c = 1 * c . attr ( "width" ) ; return a - 10 < b [ 0 ] && b [ 0 ] < a + c + 10 && d - 10 < b [ 1 ] } function pe ( a , b ) { var c ; for ( c = 0 ; c < b . length ; c ++ ) if ( b [ c ] . start < a && a <= b [ c ] . end ) return ! 0 ; return ! 1 } function $d ( a , b ) { var c = ! 1 ;
Object . keys ( a ) . forEach ( function ( d ) { a [ d ] === b && ( c = ! 0 ) } ) ; return c } function Vb ( a , b ) { return Math . pow ( m ( a . x ) - b [ 0 ] , 2 ) + Math . pow ( A ( a . value ) - b [ 1 ] , 2 ) } function gd ( a , b , c ) { qe ( a , b ) ; l . select ( ".selected-circles-" + b . id ) . selectAll ( ".selected-circle-" + c ) . data ( [ b ] ) . enter ( ) . append ( "circle" ) . attr ( "class" , function ( ) { return "selected-circle selected-circle-" + c } ) . attr ( "cx" , h ? Ea : Da ) . attr ( "cy" , h ? Da : Ea ) . attr ( "stroke" , function ( ) { return O ( b . id ) } ) . attr ( "r" , 1.4 * Xa ) . transition ( ) . duration ( 100 ) . attr ( "r" , Xa ) } function Zb ( a , b , c ) { re ( a , b ) ;
l . select ( ".selected-circles-" + b . id ) . selectAll ( ".selected-circle-" + c ) . transition ( ) . duration ( 100 ) . attr ( "r" , 0 ) . remove ( ) } function hd ( a , b , c , d ) { a ? gd ( b , c , d ) : Zb ( b , c , d ) } function se ( ) { } function id ( ) { } function jd ( a , b , c , d ) { } function $b ( a ) { return a . filter ( function ( a ) { return z ( a . value ) } ) } function ac ( a , b ) { return ( b ? l . selectAll ( ".-circles-" + b ) : l ) . selectAll ( ".-circle" + ( z ( a ) ? "-" + a : "" ) ) } function bc ( a ) { ac ( a ) . filter ( function ( ) { return e . select ( this ) . classed ( da ) } ) . classed ( da , ! 1 ) . attr ( "r" , cc ) } function te ( a , b , c , d ) { var g , e ,
f = "M" , k , l , m , kd , n , wa = [ ] ; if ( y ( d ) ) for ( g = 0 ; g < d . length ; g ++ ) wa [ g ] = { } , x ( d [ g ] . start ) ? wa [ g ] . start = a [ 0 ] . x : wa [ g ] . start = D ? ua ( d [ g ] . start ) : d [ g ] . start , x ( d [ g ] . end ) ? wa [ g ] . end = a [ a . length - 1 ] . x : wa [ g ] . end = D ? ua ( d [ g ] . end ) : d [ g ] . end ; kd = h ? function ( a ) { return c ( a . value ) } : function ( a ) { return b ( a . x ) } ; n = h ? function ( a ) { return b ( a . x ) } : function ( a ) { return c ( a . value ) } ; d = D ? function ( a , d , g , e ) { var f = a . x . getTime ( ) ; a = d . x - a . x ; d = new Date ( f + a * ( g + e ) ) ; return "M" + b ( new Date ( f + a * g ) ) + " " + c ( l ( g ) ) + " " + b ( d ) + " " + c ( l ( g + e ) ) } : function ( a , d , g , e ) { return "M" + b ( k ( g ) ) +
" " + c ( l ( g ) ) + " " + b ( k ( g + e ) ) + " " + c ( l ( g + e ) ) } ; for ( g = 0 ; g < a . length ; g ++ ) if ( x ( wa ) || ! pe ( a [ g ] . x , wa ) ) f += " " + kd ( a [ g ] ) + " " + n ( a [ g ] ) ; else { k = P ( a [ g - 1 ] . x , a [ g ] . x ) ; l = T ( a [ g - 1 ] . value , a [ g ] . value ) ; e = b ( a [ g ] . x ) - b ( a [ g - 1 ] . x ) ; m = c ( a [ g ] . value ) - c ( a [ g - 1 ] . value ) ; e = Math . sqrt ( Math . pow ( e , 2 ) + Math . pow ( m , 2 ) ) ; m = 2 / e ; var p = 2 * m ; for ( e = m ; 1 >= e ; e += p ) f += d ( a [ g - 1 ] , a [ g ] , e , m ) } return f } function dc ( a ) { var b ; sb = e . select ( Aa ) ; if ( sb . empty ( ) ) K . alert ( 'No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".' ) ;
else { sb . html ( "" ) ; k . data . x = { } ; k . data . targets = Ra ( a ) ; ya ( ) ; tc ( ) ; m . domain ( e . extent ( ob ( k . data . targets ) ) ) ; A . domain ( mb ( "y" ) ) ; aa . domain ( mb ( "y2" ) ) ; W . domain ( m . domain ( ) ) ; ib . domain ( A . domain ( ) ) ; jb . domain ( aa . domain ( ) ) ; $ = m . domain ( ) ; I . scale ( W ) ; ( la || ma ) && F . scale ( m ) ; n = e . select ( Aa ) . append ( "svg" ) . attr ( "width" , r + C + Z ) . attr ( "height" , t + q + M ) . on ( "mouseenter" , ue ) . on ( "mouseleave" , ve ) ; tb = n . append ( "defs" ) ; tb . append ( "clipPath" ) . attr ( "id" , ec ) . append ( "rect" ) . attr ( "y" , q ) . attr ( "width" , r ) . attr ( "height" , t - q ) ; tb . append ( "clipPath" ) . attr ( "id" ,
"xaxis-clip" ) . append ( "rect" ) . attr ( "x" , - 1 - C ) . attr ( "y" , - 20 ) . attr ( "width" , ea ) . attr ( "height" , Ab ) ; tb . append ( "clipPath" ) . attr ( "id" , "yaxis-clip" ) . append ( "rect" ) . attr ( "x" , - C + 1 ) . attr ( "y" , q - 1 ) . attr ( "width" , zd ) . attr ( "height" , Y ) ; l = n . append ( "g" ) . attr ( "transform" , J . main ) ; G = Fa ? n . append ( "g" ) . attr ( "transform" , J . context ) : null ; Ga = Ha ? n . append ( "g" ) . attr ( "transform" , J . legend ) : null ; X = e . select ( Aa ) . style ( "position" , "relative" ) . append ( "div" ) . style ( "position" , "absolute" ) . style ( "z-index" , "10" ) . style ( "display" , "none" ) ; l . append ( "g" ) . attr ( "class" ,
"x axis" ) . attr ( "clip-path" , h ? "" : "url(" + document . URL + "#xaxis-clip)" ) . attr ( "transform" , J . x ) . call ( h ? Ma : N ) . append ( "text" ) . attr ( "class" , "-axis-x-label" ) . attr ( "x" , r ) . attr ( "dy" , "-.5em" ) . style ( "text-anchor" , "end" ) . text ( we ) ; l . append ( "g" ) . attr ( "class" , "y axis" ) . attr ( "clip-path" , h ? "url(" + document . URL + "#yaxis-clip)" : "" ) . call ( h ? N : Ma ) . append ( "text" ) . attr ( "transform" , "rotate(-90)" ) . attr ( "dy" , "1.2em" ) . attr ( "dx" , "-.5em" ) . style ( "text-anchor" , "end" ) . text ( xe ) ; Db && l . append ( "g" ) . attr ( "class" , "y2 axis" ) . attr ( "transform" ,
J . y2 ) . call ( Pb ) ; a = l . append ( "g" ) . attr ( "clip-path" , Ya ) . attr ( "class" , "grid" ) ; ld && a . append ( "g" ) . attr ( "class" , "xgrids" ) ; fc && ( b = a . append ( "g" ) . attr ( "class" , "xgrid-lines" ) . selectAll ( ".xgrid-line" ) . data ( fc ) . enter ( ) . append ( "g" ) . attr ( "class" , "xgrid-line" ) , b . append ( "line" ) . attr ( "class" , function ( a ) { return "" + a [ "class" ] } ) , b . append ( "text" ) . attr ( "class" , function ( a ) { return "" + a [ "class" ] } ) . attr ( "text-anchor" , "end" ) . attr ( "transform" , h ? "" : "rotate(-90)" ) . attr ( "dx" , h ? 0 : - q ) . attr ( "dy" , - 5 ) . text ( function ( a ) { return a . text } ) ) ;
ye && a . append ( "g" ) . attr ( "class" , "xgrid-focus" ) . append ( "line" ) . attr ( "class" , "xgrid-focus" ) . attr ( "x1" , h ? 0 : - 10 ) . attr ( "x2" , h ? r : - 10 ) . attr ( "y1" , h ? - 10 : q ) . attr ( "y2" , h ? - 10 : t ) ; md && a . append ( "g" ) . attr ( "class" , "ygrids" ) ; gc && ( a = a . append ( "g" ) . attr ( "class" , "ygrid-lines" ) . selectAll ( "ygrid-line" ) . data ( gc ) . enter ( ) . append ( "g" ) . attr ( "class" , "ygrid-line" ) , a . append ( "line" ) . attr ( "class" , function ( a ) { return "" + a [ "class" ] } ) , a . append ( "text" ) . attr ( "class" , function ( a ) { return "" + a [ "class" ] } ) . attr ( "text-anchor" , "end" ) . attr ( "transform" ,
h ? "rotate(-90)" : "" ) . attr ( "dx" , h ? 0 : - q ) . attr ( "dy" , - 5 ) . text ( function ( a ) { return a . text } ) ) ; l . append ( "g" ) . attr ( "clip-path" , Ya ) . attr ( "class" , "regions" ) ; l . append ( "g" ) . attr ( "clip-path" , Ya ) . attr ( "class" , "chart" ) ; l . select ( ".chart" ) . append ( "g" ) . attr ( "class" , "event-rects" ) . style ( "fill-opacity" , 0 ) . style ( "cursor" , la || ma ? h ? "ns-resize" : "ew-resize" : null ) ; l . select ( ".chart" ) . append ( "g" ) . attr ( "class" , "chart-bars" ) ; l . select ( ".chart" ) . append ( "g" ) . attr ( "class" , "chart-lines" ) ; l . select ( ".chart" ) . append ( "g" ) . attr ( "class" , "chart-arcs" ) . attr ( "transform" ,
J . arc ) . append ( "text" ) . attr ( "class" , "chart-arcs-title" ) . style ( "text-anchor" , "middle" ) . text ( ze ) ; if ( la || ma ) l . insert ( "rect" , Ae ? null : "g.grid" ) . attr ( "class" , "zoom-rect" ) . attr ( "width" , r ) . attr ( "height" , t ) . style ( "opacity" , 0 ) . style ( "cursor" , h ? "ns-resize" : "ew-resize" ) . call ( F ) . on ( "dblclick.zoom" , null ) ; null !== ub && I . extent ( "function" !== typeof ub ? ub : ub ( ob ( ) ) ) ; Fa && ( G . append ( "g" ) . attr ( "clip-path" , Ya ) . attr ( "class" , "chart" ) , G . select ( ".chart" ) . append ( "g" ) . attr ( "class" , "chart-bars" ) , G . select ( ".chart" ) . append ( "g" ) . attr ( "class" ,
"chart-lines" ) , G . append ( "g" ) . attr ( "clip-path" , Ya ) . attr ( "class" , "x brush" ) . call ( I ) . selectAll ( "rect" ) . attr ( h ? "width" : "height" , h ? Eb : gb ) , G . append ( "g" ) . attr ( "class" , "x axis" ) . attr ( "transform" , J . subx ) . attr ( "clip-path" , h ? "url(" + document . URL + "#yaxis-clip)" : "" ) . call ( hb ) ) ; Ha && vb ( k . data . targets ) ; nd ( k . data . targets ) ; w ( { withTransform : ! 0 , withUpdateXDomain : ! 0 } ) ; if ( Be ) { if ( D && "string" === typeof Ia ) { Ia = ua ( Ia ) ; for ( a = 0 ; a < k . data . targets [ 0 ] . values . length && 0 !== k . data . targets [ 0 ] . values [ a ] . x - Ia ; a ++ ) ; Ia = a } X . html ( Zc ( k . data . targets . map ( function ( a ) { return qb ( a . values [ Ia ] ) } ) ) ) ;
X . style ( "top" , od . top ) . style ( "left" , od . left ) . style ( "display" , "block" ) } null == K . onresize && ( K . onresize = Ce ( ) ) ; K . onresize . add && K . onresize . add ( pd ) } } function De ( a ) { a . append ( "rect" ) . attr ( "class" , Qc ) . style ( "cursor" , na && xa ? "pointer" : null ) . on ( "mouseover" , function ( a , c ) { if ( ! Za && ! E ( k . data . targets ) ) { var d = k . data . targets . map ( function ( a ) { return qb ( a . values [ c ] ) } ) , g , e ; if ( 0 < Object . keys ( Qa ) . length ) { e = [ ] ; for ( var f in Qa ) for ( g = 0 ; g < d . length ; g ++ ) if ( d [ g ] . id === f ) { e . push ( d [ g ] ) ; d . shift ( g ) ; break } d = e . concat ( d ) } hc && ac ( c , void 0 ) . classed ( da ,
! 0 ) . attr ( "r" , ic ) ; l . selectAll ( ".-bar" + ( z ( c ) ? "-" + c : "" ) ) . classed ( da , ! 1 ) ; $c ( d ) } } ) . on ( "mouseout" , function ( a , c ) { E ( k . data . targets ) || ( ad ( ) , X . style ( "display" , "none" ) , bc ( c ) , l . selectAll ( ".-bar" + ( z ( void 0 ) ? "-undefined" : "" ) ) . classed ( da , ! 1 ) ) } ) . on ( "mousemove" , function ( a , c ) { var d ; Za || E ( k . data . targets ) || ( d = k . data . targets . map ( function ( a ) { return qb ( a . values [ c ] ) } ) , Xc ( d , e . mouse ( this ) ) , na && ( xa || l . selectAll ( ".-shape-" + c ) . filter ( function ( a ) { return oa ( a ) } ) . each ( function ( ) { var a = e . select ( this ) . classed ( da , ! 0 ) ; "circle" === this . nodeName &&
a . attr ( "r" , ic ) ; n . select ( ".event-rect-" + c ) . style ( "cursor" , null ) } ) . filter ( function ( ) { var a = e . select ( this ) ; if ( "circle" === this . nodeName ) return ed ( this , Xa ) ; if ( "rect" === this . nodeName ) return fd ( this , a . attr ( "x" ) , a . attr ( "y" ) ) } ) . each ( function ( ) { var a = e . select ( this ) ; a . classed ( da ) || ( a . classed ( da , ! 0 ) , "circle" === this . nodeName && a . attr ( "r" , Xa ) ) ; n . select ( ".event-rect-" + c ) . style ( "cursor" , "pointer" ) } ) ) ) } ) . on ( "click" , function ( a , c ) { E ( k . data . targets ) || ( jc ? jc = ! 1 : l . selectAll ( ".-shape-" + c ) . each ( function ( a ) { qd ( this , a , c ) } ) ) } ) . call ( e . behavior . drag ( ) . origin ( Object ) . on ( "drag" ,
function ( ) { rd ( e . mouse ( this ) ) } ) . on ( "dragstart" , function ( ) { sd ( e . mouse ( this ) ) } ) . on ( "dragend" , function ( ) { td ( ) } ) ) . call ( F ) . on ( "dblclick.zoom" , null ) } function Ee ( a ) { a . append ( "rect" ) . attr ( "x" , 0 ) . attr ( "y" , 0 ) . attr ( "width" , r ) . attr ( "height" , t ) . attr ( "class" , "event-rect" ) . on ( "mouseout" , function ( ) { E ( k . data . targets ) || ( ad ( ) , X . style ( "display" , "none" ) , bc ( ) ) } ) . on ( "mousemove" , function ( ) { var a , c , d ; Za || E ( k . data . targets ) || ( a = e . mouse ( this ) , c = Wc ( k . data . targets , a ) , d = [ qb ( c ) ] , Xc ( d , a ) , hc && ( bc ( ) , ac ( c . index , c . id ) . classed ( da , ! 0 ) . attr ( "r" ,
ic ) ) , $c ( d ) , 100 > Vb ( c , a ) ? n . select ( ".event-rect" ) . style ( "cursor" , "pointer" ) : n . select ( ".event-rect" ) . style ( "cursor" , null ) ) } ) . on ( "click" , function ( ) { var a , c ; E ( k . data . targets ) || ( a = e . mouse ( this ) , c = Wc ( k . data . targets , a ) , 100 > Vb ( c , a ) && l . select ( ".-circles-" + c . id ) . select ( ".-circle-" + c . index ) . each ( function ( ) { qd ( this , c , c . index ) } ) ) } ) . call ( e . behavior . drag ( ) . origin ( Object ) . on ( "drag" , function ( ) { rd ( e . mouse ( this ) ) } ) . on ( "dragstart" , function ( ) { sd ( e . mouse ( this ) ) } ) . on ( "dragend" , function ( ) { td ( ) } ) ) . call ( F ) . on ( "dblclick.zoom" ,
null ) } function qd ( a , b , c ) { var d = e . select ( a ) , g = d . classed ( pa ) , f = ! 1 , h ; "circle" === a . nodeName ? ( f = ed ( a , 1.5 * Xa ) , h = hd ) : "rect" === a . nodeName && ( f = fd ( a ) , h = jd ) ; if ( xa || f ) na && oa ( b ) && ( d . classed ( pa , ! g ) , h ( ! g , d , b , c ) ) , Fe ( b , d ) } function rd ( a ) { var b , c , d , g , f , h , m ; E ( k . data . targets ) || ! na || ( la || ma ) && ! F . altDomain || ( b = kc [ 0 ] , c = kc [ 1 ] , d = a [ 0 ] , a = a [ 1 ] , g = Math . min ( b , d ) , f = Math . max ( b , d ) , h = xa ? q : Math . min ( c , a ) , m = xa ? t : Math . max ( c , a ) , l . select ( ".dragarea" ) . attr ( "x" , g ) . attr ( "y" , h ) . attr ( "width" , f - g ) . attr ( "height" , m - h ) , l . selectAll ( ".-shapes" ) . selectAll ( ".-shape" ) . filter ( function ( a ) { return oa ( a ) } ) . each ( function ( a ,
b ) { var c = e . select ( this ) , d = c . classed ( pa ) , k = c . classed ( lc ) , l , n , p , q ; l = ! 1 ; "circle" === this . nodeName ? ( l = 1 * c . attr ( "cx" ) , n = 1 * c . attr ( "cy" ) , q = hd , l = g < l && l < f && h < n && n < m ) : "rect" === this . nodeName && ( l = 1 * c . attr ( "x" ) , n = 1 * c . attr ( "y" ) , p = 1 * c . attr ( "width" ) , q = jd , l = g < l + p && l < f && n < m ) ; l ^ k && ( c . classed ( lc , ! k ) , c . classed ( pa , ! d ) , q ( ! d , c , a , b ) ) } ) ) } function sd ( a ) { ! E ( k . data . targets ) && na && ( kc = a , l . select ( ".chart" ) . append ( "rect" ) . attr ( "class" , "dragarea" ) . style ( "opacity" , 0.1 ) , Za = ! 0 ) } function td ( ) { ! E ( k . data . targets ) && na && ( l . select ( ".dragarea" ) . transition ( ) . duration ( 100 ) . style ( "opacity" ,
0 ) . remove ( ) , l . selectAll ( ".-shape" ) . classed ( lc , ! 1 ) , Za = ! 1 ) } function w ( a ) { var b , c , d , g ; d = ke ( ) ; var f , u , n , p = E ( k . data . targets ) ; a = y ( a ) ? a : { } ; c = y ( a . withY ) ? a . withY : ! 0 ; g = y ( a . withSubchart ) ? a . withSubchart : ! 0 ; u = y ( a . withTransition ) ? a . withTransition : ! 0 ; n = y ( a . withTransform ) ? a . withTransform : ! 1 ; b = y ( a . withUpdateXDomain ) ? a . withUpdateXDomain : ! 1 ; a = y ( a . withUpdateOrgXDomain ) ? a . withUpdateOrgXDomain : ! 1 ; u = u ? Ge : 0 ; a && ( m . domain ( e . extent ( ob ( k . data . targets ) ) ) , $ = m . domain ( ) , F . scale ( m ) . updateScaleExtent ( ) , W . domain ( m . domain ( ) ) , I . scale ( W ) ) ;
b && ( m . domain ( I . empty ( ) ? $ : I . extent ( ) ) , ( la || ma ) && F . scale ( m ) . updateScaleExtent ( ) ) ; A . domain ( mb ( "y" ) ) ; aa . domain ( mb ( "y2" ) ) ; l . select ( ".x.axis" ) . style ( "opacity" , p ? 0 : 1 ) . transition ( ) . duration ( h ? u : 0 ) . call ( h ? Ma : N ) ; l . select ( ".y.axis" ) . style ( "opacity" , p ? 0 : 1 ) . transition ( ) . duration ( h ? 0 : u ) . call ( h ? N : Ma ) ; l . select ( ".y2.axis" ) . style ( "opacity" , p ? 0 : 1 ) . transition ( ) . call ( Pb ) ; l . select ( ".x.axis .-axis-x-label" ) . attr ( "x" , r ) ; ib . domain ( A . domain ( ) ) ; jb . domain ( aa . domain ( ) ) ; X . style ( "display" , "none" ) ; l . select ( "line.xgrid-focus" ) . style ( "visibility" ,
"hidden" ) . attr ( "y2" , t ) ; if ( ld ) { if ( "year" === He ) { b = [ ] ; var s = ob ( ) ; a = s [ 0 ] . getFullYear ( ) ; for ( s = s [ 1 ] . getFullYear ( ) ; a <= s ; a ++ ) b . push ( new Date ( a + "-01-01 00:00:00" ) ) } else b = m . ticks ( 10 ) ; b = l . select ( ".xgrids" ) . selectAll ( ".xgrid" ) . data ( b ) ; b . enter ( ) . append ( "line" ) . attr ( "class" , "xgrid" ) ; b . attr ( "x1" , h ? 0 : function ( a ) { return m ( a ) - N . tickOffset ( ) } ) . attr ( "x2" , h ? r : function ( a ) { return m ( a ) - N . tickOffset ( ) } ) . attr ( "y1" , h ? function ( a ) { return m ( a ) - N . tickOffset ( ) } : q ) . attr ( "y2" , h ? function ( a ) { return m ( a ) - N . tickOffset ( ) } : t ) . style ( "opacity" ,
function ( ) { return + e . select ( this ) . attr ( h ? "y1" : "x1" ) === ( h ? t : 0 ) ? 0 : 1 } ) ; b . exit ( ) . remove ( ) } fc && ( b = l . selectAll ( ".xgrid-lines" ) , b . selectAll ( "line" ) . transition ( ) . duration ( u ) . attr ( "x1" , h ? 0 : Ua ) . attr ( "x2" , h ? r : Ua ) . attr ( "y1" , h ? Ua : q ) . attr ( "y2" , h ? Ua : t ) , b . selectAll ( "text" ) . attr ( "x" , h ? r : 0 ) . attr ( "y" , Ua ) ) ; c && md && ( b = l . select ( ".ygrids" ) . selectAll ( ".ygrid" ) . data ( A . ticks ( 10 ) ) , b . enter ( ) . append ( "line" ) . attr ( "class" , "ygrid" ) , b . attr ( "x1" , h ? A : 0 ) . attr ( "x2" , h ? A : r ) . attr ( "y1" , h ? 0 : A ) . attr ( "y2" , h ? t : A ) , b . exit ( ) . remove ( ) ) ; c && gc && ( c =
l . select ( ".ygrid-lines" ) , c . selectAll ( "line" ) . transition ( ) . duration ( u ) . attr ( "x1" , h ? Va : 0 ) . attr ( "x2" , h ? Va : r ) . attr ( "y1" , h ? 0 : Va ) . attr ( "y2" , h ? t : Va ) , c . selectAll ( "text" ) . attr ( "x" , h ? 0 : r ) . attr ( "y" , Va ) ) ; c = l . selectAll ( ".-bars" ) . selectAll ( ".-bar" ) . data ( dd ) ; c . enter ( ) . append ( "path" ) . attr ( "d" , wb ( d , ! 1 ) ) . style ( "stroke" , "none" ) . style ( "opacity" , 0 ) . style ( "fill" , function ( a ) { return O ( a . id ) } ) . attr ( "class" , Pc ) ; c . style ( "opacity" , Wa ) . transition ( ) . duration ( u ) . attr ( "d" , wb ( d , ! 1 ) ) . style ( "opacity" , 1 ) ; c . exit ( ) . transition ( ) . duration ( u ) . style ( "opacity" ,
0 ) . remove ( ) ; l . selectAll ( ".-line" ) . style ( "opacity" , Wa ) . transition ( ) . duration ( u ) . attr ( "d" , Ie ) . style ( "opacity" , 1 ) ; l . selectAll ( ".-area" ) . style ( "opacity" , 0 ) . transition ( ) . duration ( u ) . attr ( "d" , Je ) . style ( "opacity" , ud ) ; c = l . selectAll ( ".-circles" ) . selectAll ( ".-circle" ) . data ( oe ) ; c . enter ( ) . append ( "circle" ) . attr ( "class" , he ) . style ( "opacity" , 0 ) . attr ( "r" , cc ) ; c . style ( "opacity" , Wa ) . transition ( ) . duration ( u ) . style ( "opacity" , je ) . attr ( "cx" , h ? Ea : Da ) . attr ( "cy" , h ? Da : Ea ) ; c . exit ( ) . remove ( ) ; l . selectAll ( ".chart-arc" ) . select ( ".-arc" ) . attr ( "transform" ,
n ? "scale(0)" : "" ) . style ( "opacity" , function ( a ) { return a === this . _current ? 0 : 1 } ) . transition ( ) . duration ( u ) . attrTween ( "d" , function ( a ) { a = sa ( a ) ; if ( ! a ) return function ( ) { return "M 0 0" } ; var b = e . interpolate ( this . _current , a ) ; this . _current = b ( 0 ) ; return function ( a ) { a = b ( a ) ; return cd ( a . data ) || Rb ( a . data ) ? kb ( a , ! 0 ) : "M 0 0" } } ) . attr ( "transform" , n ? "scale(1)" : "" ) . style ( "opacity" , 1 ) ; l . selectAll ( ".chart-arc" ) . select ( "text" ) . attr ( "transform" , Kd ) . style ( "opacity" , 0 ) . transition ( ) . duration ( u ) . text ( Ld ) . style ( "opacity" , function ( a ) { return cd ( a . data ) ||
Rb ( a . data ) ? 1 : 0 } ) ; l . select ( ".chart-arcs-title" ) . style ( "opacity" , ia ( k . data . targets , "donut" ) ? 1 : 0 ) ; Fa && ( null !== e . event && "zoom" === e . event . type && I . extent ( m . orgDomain ( ) ) . update ( ) , g && ( G . select ( ".x.axis" ) . style ( "opacity" , p ? 0 : 1 ) . transition ( ) . duration ( h ? u : 0 ) . call ( hb ) , I . empty ( ) || I . extent ( m . orgDomain ( ) ) . update ( ) , g = G . selectAll ( ".-bars" ) . selectAll ( ".-bar" ) . data ( dd ) , g . enter ( ) . append ( "path" ) . attr ( "d" , wb ( d ) ) . style ( "stroke" , "none" ) . style ( "fill" , function ( a ) { return O ( a . id ) } ) . attr ( "class" , Pc ) , g . style ( "opacity" , Wa ) . transition ( ) . duration ( u ) . attr ( "d" ,
wb ( d ) ) . style ( "opacity" , 1 ) , g . exit ( ) . transition ( ) . duration ( u ) . style ( "opacity" , 0 ) . remove ( ) , G . selectAll ( ".-line" ) . style ( "opacity" , Wa ) . transition ( ) . duration ( u ) . attr ( "d" , Ke ) . style ( "opacity" , 1 ) ) ) ; l . selectAll ( ".selected-circles" ) . filter ( function ( a ) { return rb ( a ) } ) . selectAll ( "circle" ) . remove ( ) ; l . selectAll ( ".selected-circle" ) . transition ( ) . duration ( u ) . attr ( "cx" , h ? Ea : Da ) . attr ( "cy" , h ? Da : Ea ) ; ba ? ( g = l . select ( ".event-rects" ) . selectAll ( ".event-rect" ) . data ( [ 0 ] ) , Ee ( g . enter ( ) ) , g . attr ( "x" , 0 ) . attr ( "y" , 0 ) . attr ( "width" , r ) . attr ( "height" ,
t ) ) : ( Ub ? ( f = function ( a , b ) { var c = Kc ( b ) , d = b < La ( ) - 1 ? k . data . targets [ 0 ] . values [ b + 1 ] . x : void 0 ; return ( m ( d ? d : a . x + 50 ) - m ( c ? c : a . x - 50 ) ) / 2 } , d = function ( a , b ) { var c = Kc ( b ) ; return ( m ( a . x ) + m ( c ? c : a . x - 50 ) ) / 2 } ) : ( f = fa ( ) , d = function ( a ) { return m ( a . x ) - f / 2 } ) , g = de ( ) , l . select ( ".event-rects" ) . datum ( g ? g . values : [ ] ) , g = l . select ( ".event-rects" ) . selectAll ( ".event-rect" ) . data ( function ( a ) { return a } ) , De ( g . enter ( ) ) , g . attr ( "class" , Qc ) . attr ( "x" , h ? 0 : d ) . attr ( "y" , h ? d : 0 ) . attr ( "width" , h ? r : f ) . attr ( "height" , h ? f : t ) , g . exit ( ) . remove ( ) ) ; d = l . select ( ".regions" ) . selectAll ( "rect.region" ) . data ( Q ) ;
d . enter ( ) . append ( "rect" ) . style ( "fill-opacity" , 0 ) ; d . attr ( "class" , ie ) . attr ( "x" , h ? 0 : Tb ) . attr ( "y" , h ? Tb : q ) . attr ( "width" , h ? r : Fc ) . attr ( "height" , h ? Fc : t ) . transition ( ) . duration ( u ) . style ( "fill-opacity" , function ( a ) { return z ( a . opacity ) ? a . opacity : 0.1 } ) ; d . exit ( ) . transition ( ) . duration ( u ) . style ( "fill-opacity" , 0 ) . remove ( ) ; Sa ( ) . forEach ( function ( a ) { Wb [ a ] = ! 0 } ) } function Le ( ) { "mousemove" === e . event . sourceEvent . type && F . altDomain ? ( m . domain ( F . altDomain ) , F . scale ( m ) . updateScaleExtent ( ) ) : ( ja && m . orgDomain ( ) [ 0 ] === $ [ 0 ] && m . domain ( [ $ [ 0 ] -
1E-10 , m . orgDomain ( ) [ 1 ] ] ) , w ( { withTransition : ! 1 , withY : ! 1 , withSubchart : ! 1 } ) , "mousemove" === e . event . sourceEvent . type && ( jc = ! 0 ) ) } function Ce ( ) { function a ( ) { b . forEach ( function ( a ) { a ( ) } ) } var b = [ ] ; a . add = function ( a ) { b . push ( a ) } ; return a } function pd ( ) { ya ( ) ; tc ( ) ; I . scale ( W ) ; ( la || ma ) && F . scale ( m ) ; n . attr ( "width" , Bb ) . attr ( "height" , za ) ; n . select ( "#" + ec ) . select ( "rect" ) . attr ( "width" , r ) . attr ( "height" , t ) ; n . select ( "#xaxis-clip" ) . select ( "rect" ) . attr ( "width" , ea ) ; n . select ( ".zoom-rect" ) . attr ( "width" , r ) . attr ( "height" , t ) ; l . select ( ".x.axis" ) . attr ( "transform" ,
J . x ) ; l . select ( ".y2.axis" ) . attr ( "transform" , J . y2 ) ; l . select ( ".chart-arcs" ) . attr ( "transform" , J . arc ) ; Fa && ( G . attr ( "transform" , J . context ) , G . select ( ".x.axis" ) . attr ( "transform" , J . subx ) ) ; Ha && ( Ga . attr ( "transform" , J . legend ) , vb ( k . data . targets , { withTransition : ! 1 } ) ) ; w ( { withTransition : ! 1 , withUpdateXDomain : ! 0 } ) } function nd ( a ) { var b ; l . select ( ".chart-bars" ) . selectAll ( ".chart-bar" ) . data ( a ) . enter ( ) . append ( "g" ) . attr ( "class" , function ( a ) { return "chart-bar target target-" + a . id } ) . style ( "pointer-events" , "none" ) . append ( "g" ) . attr ( "class" ,
Oc ) . style ( "fill" , function ( a ) { return O ( a . id ) } ) . style ( "stroke" , "none" ) . style ( "cursor" , function ( a ) { return oa ( a ) ? "pointer" : null } ) ; b = l . select ( ".chart-lines" ) . selectAll ( ".chart-line" ) . data ( a ) . enter ( ) . append ( "g" ) . attr ( "class" , function ( a ) { return "chart-line target target-" + a . id } ) . style ( "pointer-events" , "none" ) ; b . append ( "path" ) . attr ( "class" , Nc ) . style ( "opacity" , 0 ) . style ( "stroke" , function ( a ) { return O ( a . id ) } ) ; b . append ( "path" ) . attr ( "class" , ge ) . style ( "opacity" , function ( ) { ud = + e . select ( this ) . style ( "opacity" ) ; return 0 } ) . style ( "fill" ,
function ( a ) { return O ( a . id ) } ) ; b . append ( "g" ) . attr ( "class" , function ( a ) { return "selected-circles selected-circles-" + a . id } ) ; b . append ( "g" ) . attr ( "class" , ee ) . style ( "fill" , function ( a ) { return O ( a . id ) } ) . style ( "cursor" , function ( a ) { return oa ( a ) ? "pointer" : null } ) ; a . forEach ( function ( a ) { var b = xb ( a . id ) ; l . selectAll ( ".selected-circles" + b ) . selectAll ( ".selected-circle" ) . each ( function ( b ) { b . value = a . values [ b . x ] . value } ) } ) ; b = l . select ( ".chart-arcs" ) . selectAll ( ".chart-arc" ) . data ( Qb ( a ) ) . enter ( ) . append ( "g" ) . attr ( "class" , function ( a ) { return "chart-arc target target-" +
a . data . id } ) ; b . append ( "path" ) . attr ( "class" , fe ) . style ( "opacity" , 0 ) . style ( "fill" , function ( a ) { return O ( a . data . id ) } ) . style ( "cursor" , function ( a ) { return oa ( a ) ? "pointer" : null } ) . each ( function ( a ) { this . _current = a } ) . on ( "mouseover" , function ( a ) { Bc ( a . data . id ) ; mc ( a . data . id ) } ) . on ( "mouseout" , function ( a ) { Sb ( a . data . id ) ; nc ( ) } ) ; b . append ( "text" ) . attr ( "dy" , ".35em" ) . style ( "opacity" , 0 ) . style ( "text-anchor" , "middle" ) . style ( "pointer-events" , "none" ) ; Fa && ( b = G . select ( ".chart-bars" ) . selectAll ( ".chart-bar" ) . data ( a ) , b = b . enter ( ) . append ( "g" ) . attr ( "class" ,
function ( a ) { return "chart-bar target target-" + a . id } ) , b . append ( "g" ) . attr ( "class" , Oc ) . style ( "fill" , function ( a ) { return O ( a . id ) } ) , b = G . select ( ".chart-lines" ) . selectAll ( ".chart-line" ) . data ( a ) , b = b . enter ( ) . append ( "g" ) . attr ( "class" , function ( a ) { return "chart-line target target-" + a . id } ) , b . append ( "path" ) . attr ( "class" , Nc ) . style ( "opacity" , 0 ) . style ( "stroke" , function ( a ) { return O ( a . id ) } ) ) ; Ha && vb ( a ) ; n . selectAll ( ".target" ) . transition ( ) . style ( "opacity" , 1 ) } function $a ( a , b ) { k . data . targets . forEach ( function ( b ) { for ( var d = 0 ; d <
a . length ; d ++ ) if ( b . id === a [ d ] . id ) { b . values = a [ d ] . values ; a . splice ( d , 1 ) ; break } } ) ; k . data . targets = k . data . targets . concat ( a ) ; nd ( k . data . targets ) ; w ( { withUpdateOrgXDomain : ! 0 , withUpdateXDomain : ! 0 } ) ; b ( ) } function mc ( a ) { var b = n . selectAll ( ".legend-item" ) , c = function ( b ) { return ! a || b === a } ; b . filter ( function ( a ) { return ! c ( a ) } ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 0.3 ) ; b . filter ( c ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 1 ) } function Me ( a ) { var b = n . selectAll ( ".legend-item" ) , c = function ( b ) { return ! a || b === a } ; b . filter ( function ( a ) { return ! c ( a ) } ) . transition ( ) . duration ( 100 ) . style ( "opacity" ,
1 ) ; b . filter ( c ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 0.3 ) } function nc ( ) { n . selectAll ( ".legend-item" ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 1 ) } function vb ( a , b ) { var c = Sa ( a ) , d , e = r / 2 - ab * Object . keys ( a ) . length / 2 , f ; b = x ( b ) ? { } : b ; f = y ( b . withTransition ) ? b . withTransition : ! 0 ; d = Ga . selectAll ( ".legend-item" ) . data ( c ) . enter ( ) . append ( "g" ) . attr ( "class" , function ( a ) { return "legend-item legend-item-" + a } ) . style ( "cursor" , "pointer" ) . on ( "click" , function ( a ) { Ne ( a ) } ) . on ( "mouseover" , function ( a ) { mc ( a ) ; k . focus ( a ) } ) . on ( "mouseout" ,
function ( ) { nc ( ) ; k . revert ( ) } ) ; d . append ( "rect" ) . attr ( "class" , "legend-item-event" ) . style ( "fill-opacity" , 0 ) . attr ( "x" , - 200 ) . attr ( "y" , function ( ) { return ta / 2 - 16 } ) . attr ( "width" , ab ) . attr ( "height" , 24 ) ; d . append ( "rect" ) . attr ( "class" , "legend-item-tile" ) . style ( "pointer-events" , "none" ) . style ( "fill" , function ( a ) { return O ( a ) } ) . attr ( "x" , - 200 ) . attr ( "y" , function ( ) { return ta / 2 - 9 } ) . attr ( "width" , 10 ) . attr ( "height" , 10 ) ; d . append ( "text" ) . text ( function ( a ) { return y ( Qa [ a ] ) ? Qa [ a ] : a } ) . style ( "pointer-events" , "none" ) . attr ( "x" , - 200 ) . attr ( "y" ,
function ( ) { return ta / 2 } ) ; Ga . selectAll ( "rect.legend-item-event" ) . data ( c ) . transition ( ) . duration ( f ? 250 : 0 ) . attr ( "x" , function ( a , b ) { return e + ab * b } ) ; Ga . selectAll ( "rect.legend-item-tile" ) . data ( c ) . transition ( ) . duration ( f ? 250 : 0 ) . attr ( "x" , function ( a , b ) { return e + ab * b } ) ; Ga . selectAll ( "text" ) . data ( c ) . transition ( ) . duration ( f ? 250 : 0 ) . attr ( "x" , function ( a , b ) { return e + ab * b + 14 } ) } function xb ( a ) { return a ? "-" + a . replace ( /\./g , "\\." ) : "" } function ka ( a ) { return ".target" + xb ( a ) } function oc ( a ) { return Lc ( a . id ) } function pc ( a ) { return "data" in
a && Lc ( a . data . id ) } var k = { data : { } } , pb = { } , da = "_expanded_" , pa = "_selected_" , lc = "_included_" , Aa = f ( [ "bindto" ] , "#chart" ) , Ja = f ( [ "size" , "width" ] , null ) , Hb = f ( [ "size" , "height" ] , null ) , cb = f ( [ "padding" , "left" ] , null ) , eb = f ( [ "padding" , "right" ] , null ) , ma = f ( [ "scroll" , "enabled" ] , ! 1 ) , la = f ( [ "zoom" , "enabled" ] , ! 1 ) , vd = f ( [ "zoom" , "extent" ] , null ) , Ae = f ( [ "zoom" , "privileged" ] , ! 1 ) , ue = f ( [ "onenter" ] , function ( ) { } ) , ve = f ( [ "onleave" ] , function ( ) { } ) , Ge = f ( [ "transition" , "duration" ] , 350 ) ; if ( ! ( "data" in R ) ) throw Error ( "data is required in config" ) ;
var va = f ( [ "data" , "x" ] , null ) , ba = f ( [ "data" , "xs" ] , null ) , Yb = f ( [ "data" , "x_format" ] , "%Y-%m-%d" ) , ce = f ( [ "data" , "id_converter" ] , function ( a ) { return a } ) , Qa = f ( [ "data" , "names" ] , { } ) , v = f ( [ "data" , "groups" ] , [ ] ) , Ac = f ( [ "data" , "axes" ] , { } ) , Jc = f ( [ "data" , "type" ] , null ) , B = f ( [ "data" , "types" ] , { } ) , wd = f ( [ "data" , "regions" ] , { } ) , Oe = f ( [ "data" , "colors" ] , { } ) , na = f ( [ "data" , "selection" , "enabled" ] , ! 1 ) , xa = f ( [ "data" , "selection" , "grouped" ] , ! 1 ) , oa = f ( [ "data" , "selection" , "isselectable" ] , function ( ) { return ! 0 } ) , Fa = f ( [ "subchart" , "show" ] , ! 1 ) , Cb =
Fa ? f ( [ "subchart" , "size" , "height" ] , 60 ) : 0 , Pe = f ( [ "color" , "pattern" ] , null ) , Ha = f ( [ "legend" , "show" ] , ! 0 ) , ab = f ( [ "legend" , "item" , "width" ] , 80 ) , Ne = f ( [ "legend" , "item" , "onclick" ] , function ( ) { } ) , xd = f ( [ "axis" , "x" , "type" ] , "indexed" ) , Na = f ( [ "axis" , "x" , "categories" ] , [ ] ) , Hd = f ( [ "axis" , "x" , "tick" , "centered" ] , ! 1 ) , lb = f ( [ "axis" , "x" , "tick" , "format" ] , null ) , ub = f ( [ "axis" , "x" , "default" ] , null ) , we = f ( [ "axis" , "x" , "label" ] , null ) , Td = f ( [ "axis" , "y" , "max" ] , null ) , Rd = f ( [ "axis" , "y" , "min" ] , null ) , Vd = f ( [ "axis" , "y" , "center" ] , null ) , xe = f ( [ "axis" ,
"y" , "label" ] , null ) , db = f ( [ "axis" , "y" , "inner" ] , ! 1 ) , Ob = f ( [ "axis" , "y" , "tick" , "format" ] , null ) , Oa = f ( [ "axis" , "y" , "padding" ] , null ) , Dd = f ( [ "axis" , "y" , "ticks" ] , 10 ) , Db = f ( [ "axis" , "y2" , "show" ] , ! 1 ) , Sd = f ( [ "axis" , "y2" , "max" ] , null ) , Qd = f ( [ "axis" , "y2" , "min" ] , null ) , Ud = f ( [ "axis" , "y2" , "center" ] , null ) , fb = f ( [ "axis" , "y2" , "inner" ] , ! 1 ) , Fd = f ( [ "axis" , "y2" , "tick" , "format" ] , null ) , Pa = f ( [ "axis" , "y2" , "padding" ] , null ) , Gd = f ( [ "axis" , "y2" , "ticks" ] , 10 ) , h = f ( [ "axis" , "rotated" ] , ! 1 ) , ld = f ( [ "grid" , "x" , "show" ] , ! 1 ) , He = f ( [ "grid" , "x" , "type" ] , "tick" ) ,
fc = f ( [ "grid" , "x" , "lines" ] , null ) , md = f ( [ "grid" , "y" , "show" ] , ! 1 ) , gc = f ( [ "grid" , "y" , "lines" ] , null ) , cc = f ( [ "point" , "show" ] , ! 0 ) ? f ( [ "point" , "r" ] , 2.5 ) : 0 , ye = f ( [ "point" , "focus" , "line" , "enabled" ] , ! 0 ) , hc = f ( [ "point" , "focus" , "expand" , "enabled" ] , ! 0 ) , ic = f ( [ "point" , "focus" , "expand" , "r" ] , hc ? 4 : cc ) , Xa = f ( [ "point" , "focus" , "select" , "r" ] , 8 ) , Fe = f ( [ "point" , "onclick" ] , function ( ) { } ) , qe = f ( [ "point" , "onselected" ] , function ( ) { } ) , re = f ( [ "point" , "onunselected" ] , function ( ) { } ) , Md = f ( [ "arc" , "label" , "format" ] , function ( a , b ) { return ( 100 * b ) . toFixed ( 1 ) +
"%" } ) , ze = f ( [ "arc" , "title" ] , "" ) , Q = f ( [ "regions" ] , [ ] ) , Yc = f ( [ "tooltip" , "enabled" ] , ! 0 ) , Zc = f ( [ "tooltip" , "contents" ] , function ( a ) { var b = Ob ? Ob : function ( a ) { return + a } , c = ra ( ) , d , e , f , h ; for ( e = 0 ; e < a . length ; e ++ ) a [ e ] && z ( a [ e ] . value ) && ( d || ( d = c ? c ( a [ e ] . x ) : a [ e ] . x , d = "<table class='-tooltip'><tr><th colspan='2'>" + d + "</th></tr>" ) , h = a [ e ] . name , f = b ( a [ e ] . value ) , d += "<tr class='-tooltip-name-" + a [ e ] . id + "'><td class='name'><span style='background-color:" + O ( a [ e ] . id ) + "'></span>" + h + "</td><td class='value'>" + f + "</td></tr>" ) ; return d +
"</table>" } ) , Be = f ( [ "tooltip" , "init" , "show" ] , ! 1 ) , Ia = f ( [ "tooltip" , "init" , "x" ] , 0 ) , od = f ( [ "tooltip" , "init" , "position" ] , { top : "0px" , left : "50px" } ) , ec = Aa . replace ( "#" , "" ) + "-clip" , Ya = "url(" + document . URL + "#" + ec + ")" , D = "timeseries" === xd , ja = "categorized" === xd , Ub = ! D && ( va || ba ) , kc = null , Za = ! 1 , jc = ! 1 , ta = Ha ? 40 : 0 , O = function ( a , b ) { var c = [ ] , d = null !== b ? b : "#1f77b4 #ff7f0e #2ca02c #d62728 #9467bd #8c564b #e377c2 #7f7f7f #bcbd22 #17becf" . split ( " " ) ; return function ( b ) { if ( b in a ) return a [ b ] ; - 1 === c . indexOf ( b ) && c . push ( b ) ; return d [ c . indexOf ( b ) %
d . length ] } } ( Oe , Pe ) , Id = function ( ) { var a = [ [ e . time . format ( "%Y/%-m/%-d" ) , function ( ) { return ! 0 } ] , [ e . time . format ( "%-m/%-d" ) , function ( a ) { return a . getMonth ( ) } ] , [ e . time . format ( "%-m/%-d" ) , function ( a ) { return 1 !== a . getDate ( ) } ] , [ e . time . format ( "%-m/%-d" ) , function ( a ) { return a . getDay ( ) && 1 !== a . getDate ( ) } ] , [ e . time . format ( "%I %p" ) , function ( a ) { return a . getHours ( ) } ] , [ e . time . format ( "%I:%M" ) , function ( a ) { return a . getMinutes ( ) } ] , [ e . time . format ( ":%S" ) , function ( a ) { return a . getSeconds ( ) } ] , [ e . time . format ( ".%L" ) , function ( a ) { return a . getMilliseconds ( ) } ] ] ;
return function ( b ) { for ( var c = a . length - 1 , d = a [ c ] ; ! d [ 1 ] ( b ) ; ) d = a [ -- c ] ; return d [ 0 ] ( b ) } } ( ) , r , Eb , t , gb , Bb , za , Ka , Fb , Gb , kb , yc , zc , Qb , Ib , Jb , Kb , Lb , Mb , Nb , m , A , aa , W , ib , jb , N , Ma , Pb , hb , Ad = h ? "left" : "bottom" , Cd = h ? db ? "top" : "bottom" : db ? "right" : "left" , Ed = h ? fb ? "bottom" : "top" : fb ? "left" : "right" , Bd = h ? "left" : "bottom" , J = { main : function ( ) { return "translate(" + C + "," + q + ")" } , context : function ( ) { return "translate(" + sc + "," + yb + ")" } , legend : function ( ) { return "translate(" + rc + "," + qc + ")" } , y2 : function ( ) { return "translate(" + ( h ? 0 : r ) + "," + ( h ? 10 : 0 ) + ")" } ,
x : function ( ) { return "translate(0," + t + ")" } , subx : function ( ) { return "translate(0," + ( h ? 0 : gb ) + ")" } , arc : function ( ) { return "translate(" + r / 2 + "," + t / 2 + ")" } } , xc = 40 , wc = 20 ; Qb = e . layout . pie ( ) . value ( function ( a ) { return a . values . reduce ( function ( a , c ) { return a + c . value } , 0 ) } ) ; var Ie = function ( ) { var a = e . svg . line ( ) . x ( h ? function ( a ) { return s ( a . id ) ( a . value ) } : Ca ) . y ( h ? Ca : function ( a ) { return s ( a . id ) ( a . value ) } ) ; return function ( b ) { var c = $b ( b . values ) , d ; if ( Xb ( b ) ) return bd ( b ) ? a . interpolate ( "cardinal" ) : a . interpolate ( "linear" ) , wd [ b . id ] ? te ( c ,
m , s ( b . id ) , wd [ b . id ] ) : a ( c ) ; d = m ( c [ 0 ] . x ) ; b = s ( b . id ) ( c [ 0 ] . value ) ; return h ? "M " + b + " " + d : "M " + d + " " + b } } ( ) , Je = function ( ) { var a ; a = h ? e . svg . area ( ) . x0 ( function ( a ) { return s ( a . id ) ( 0 ) } ) . x1 ( function ( a ) { return s ( a . id ) ( a . value ) } ) . y ( Ca ) : e . svg . area ( ) . x ( Ca ) . y0 ( function ( a ) { return s ( a . id ) ( 0 ) } ) . y1 ( function ( a ) { return s ( a . id ) ( a . value ) } ) ; return function ( b ) { var c = $b ( b . values ) , d ; if ( ia ( [ b ] , "area" ) || ia ( [ b ] , "area-spline" ) ) return bd ( b ) ? a . interpolate ( "cardinal" ) : a . interpolate ( "linear" ) , a ( c ) ; d = m ( c [ 0 ] . x ) ; b = s ( b . id ) ( c [ 0 ] . value ) ; return h ?
"M " + b + " " + d : "M " + d + " " + b } } ( ) , wb = function ( a , b ) { var c = a . _ _max _ _ + 1 , d = 1 < arguments . length ? b : ! 0 , e = ja ? c ? 1.2 * N . tickOffset ( ) / c : 0 : 0.6 * ( ( h ? t : r ) * ( d ? 1 : Ba ( $ ) / Ba ( m . domain ( ) ) ) / ( La ( ) - 1 ) ) , f = le ( e , c , a , ! ! d ) , k = me ( ! ! d ) , l = ne ( a , ! ! d ) , n = d ? ha : s ; return function ( a , b ) { var c = n ( a . id ) ( 0 ) , d = l ( a , b ) || c , c = [ [ f ( a ) , d ] , [ f ( a ) , k ( a ) - ( c - d ) ] , [ f ( a ) + e , k ( a ) - ( c - d ) ] , [ f ( a ) + e , d ] ] , d = h ? 1 : 0 , m = h ? 0 : 1 ; return "M " + c [ 0 ] [ d ] + "," + c [ 0 ] [ m ] + " L" + c [ 1 ] [ d ] + "," + c [ 1 ] [ m ] + " L" + c [ 2 ] [ d ] + "," + c [ 2 ] [ m ] + " L" + c [ 3 ] [ d ] + "," + c [ 3 ] [ m ] + " z" } } , Ke = function ( ) { var a = e . svg . line ( ) . x ( h ? function ( a ) { return ha ( a . id ) ( a . value ) } :
Sc ) . y ( h ? Sc : function ( a ) { return ha ( a . id ) ( a . value ) } ) ; return function ( b ) { var c = $b ( b . values ) ; return Xb ( b ) ? a ( c ) : "M " + W ( c [ 0 ] . x ) + " " + ha ( b . id ) ( c [ 0 ] . value ) } } ( ) , I = e . svg . brush ( ) . on ( "brush" , function ( ) { w ( { withTransition : ! 1 , withY : ! 1 , withSubchart : ! 1 , withUpdateXDomain : ! 0 } ) } ) , F = e . behavior . zoom ( ) . on ( "zoomstart" , function ( ) { F . altDomain = e . event . sourceEvent . altKey ? m . orgDomain ( ) : null } ) . on ( "zoom" , la || ma ? Le : null ) ; I . update = function ( ) { G && G . select ( ".x.brush" ) . call ( this ) ; return this } ; I . scale = function ( a ) { return h ? this . y ( a ) : this . x ( a ) } ;
F . scale = function ( a ) { return h ? this . y ( a ) : this . x ( a ) } ; F . orgScaleExtent = function ( ) { var a = vd ? vd : [ 1 , 10 ] ; return [ a [ 0 ] , Math . max ( La ( ) / a [ 1 ] , a [ 1 ] ) ] } ; F . updateScaleExtent = function ( ) { var a , b ; la ? ( a = Ba ( m . orgDomain ( ) ) / Ba ( $ ) , b = this . orgScaleExtent ( ) , a = [ b [ 0 ] * a , b [ 1 ] * a ] ) : ma && ( a = [ 1 , 1 ] ) ; return this . scaleExtent ( a ) } ; var n , tb , l , G , Ga , X , sb , $ , ud , Wb = { } ; k . focus = function ( a ) { var b = n . selectAll ( ka ( a ) ) , c = b . filter ( oc ) , b = b . filter ( pc ) ; k . revert ( ) ; k . defocus ( ) ; c . classed ( "focused" , ! 0 ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 1 ) ; b . transition ( ) . duration ( 100 ) . style ( "opacity" ,
1 ) ; E ( k . data . targets ) && Bc ( a , ! 0 ) ; mc ( a ) } ; k . defocus = function ( a ) { var b = n . selectAll ( ka ( a ) ) , c = b . filter ( oc ) , b = b . filter ( pc ) ; k . revert ( ) ; c . classed ( "focused" , ! 1 ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 0.3 ) ; b . transition ( ) . duration ( 100 ) . style ( "opacity" , 0.3 ) ; E ( k . data . targets ) && Sb ( a ) ; Me ( a ) } ; k . revert = function ( a ) { var b = n . selectAll ( ka ( a ) ) , c = b . filter ( oc ) , b = b . filter ( pc ) ; c . classed ( "focused" , ! 1 ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 1 ) ; b . transition ( ) . duration ( 100 ) . style ( "opacity" , 1 ) ; E ( k . data . targets ) && Sb ( a ) ; nc ( ) } ;
k . show = function ( a ) { n . selectAll ( ka ( a ) ) . transition ( ) . style ( "opacity" , 1 ) } ; k . hide = function ( a ) { n . selectAll ( ka ( a ) ) . transition ( ) . style ( "opacity" , 0 ) } ; k . unzoom = function ( ) { I . clear ( ) . update ( ) ; w ( { withUpdateXDomain : ! 0 } ) } ; k . load = function ( a ) { "function" !== typeof a . done && ( a . done = function ( ) { } ) ; a . xs && be ( a . xs ) ; "categories" in a && ja && ( Na = a . categories , N . categories ( Na ) ) ; if ( "cacheIds" in a && Yd ( a . cacheIds ) ) $a ( Zd ( a . cacheIds ) , a . done ) ; else if ( "data" in a ) $a ( Ra ( a . data ) , a . done ) ; else if ( "url" in a ) e . csv ( a . url , function ( b , c ) { $a ( Ra ( c ) ,
a . done ) } ) ; else if ( "rows" in a ) $a ( Ra ( Hc ( a . rows ) ) , a . done ) ; else if ( "columns" in a ) $a ( Ra ( Ic ( a . columns ) ) , a . done ) ; else throw Error ( "url or rows or columns is required." ) ; } ; k . unload = function ( a ) { k . data . targets = k . data . targets . filter ( function ( b ) { return b . id !== a } ) ; n . selectAll ( ka ( a ) ) . transition ( ) . style ( "opacity" , 0 ) . remove ( ) ; Ha && ( n . selectAll ( ".legend-item" + xb ( a ) ) . transition ( ) . style ( "opacity" , 0 ) . remove ( ) , vb ( k . data . targets ) ) ; 0 < k . data . targets . length && w ( { withUpdateOrgXDomain : ! 0 , withUpdateXDomain : ! 0 } ) } ; k . selected = function ( a ) { a =
xb ( a ) ; return e . merge ( l . selectAll ( ".-shapes" + a ) . selectAll ( ".-shape" ) . filter ( function ( ) { return e . select ( this ) . classed ( pa ) } ) . map ( function ( a ) { return a . map ( function ( a ) { return a . _ _data _ _ } ) } ) ) } ; k . select = function ( a , b , c ) { na && l . selectAll ( ".-shapes" ) . selectAll ( ".-shape" ) . each ( function ( d , g ) { var f = "circle" === this . nodeName ? gd : se , h = "circle" === this . nodeName ? Zb : id ; 0 <= b . indexOf ( g ) ? oa ( d ) && ( xa || x ( a ) || 0 <= a . indexOf ( d . id ) ) && f ( e . select ( this ) . classed ( pa , ! 0 ) , d , g ) : y ( c ) && c && h ( e . select ( this ) . classed ( pa , ! 1 ) , d , g ) } ) } ; k . unselect =
function ( a , b ) { na && l . selectAll ( ".-shapes" ) . selectAll ( ".-shape" ) . each ( function ( c , d ) { var g = "circle" === this . nodeName ? Zb : id ; ( x ( b ) || 0 <= b . indexOf ( d ) ) && oa ( c ) && ( xa || x ( a ) || 0 <= a . indexOf ( c . id ) ) && g ( e . select ( this ) . classed ( pa , ! 1 ) , c , d ) } ) } ; k . toLine = function ( a ) { ca ( a , "line" ) ; w ( ) } ; k . toSpline = function ( a ) { ca ( a , "spline" ) ; w ( ) } ; k . toBar = function ( a ) { ca ( a , "bar" ) ; w ( ) } ; k . toScatter = function ( a ) { ca ( a , "scatter" ) ; w ( ) } ; k . toArea = function ( a ) { ca ( a , "area" ) ; w ( ) } ; k . toAreaSpline = function ( a ) { ca ( a , "area-spline" ) ; w ( ) } ; k . toPie = function ( a ) { ca ( a ,
"pie" ) ; V ( ) ; ga ( ) ; w ( { withTransform : ! 0 } ) } ; k . toDonut = function ( a ) { ca ( a , "donut" ) ; V ( ) ; ga ( ) ; w ( { withTransform : ! 0 } ) } ; k . groups = function ( a ) { if ( x ( a ) ) return v ; v = a ; w ( ) ; return v } ; k . regions = function ( a ) { if ( x ( a ) ) return Q ; Q = a ; w ( ) ; return Q } ; k . regions . add = function ( a ) { if ( x ( a ) ) return Q ; Q = Q . concat ( a ) ; w ( ) ; return Q } ; k . regions . remove = function ( a , b ) { var c = [ ] . concat ( a ) ; b = y ( b ) ? b : { } ; c . forEach ( function ( a ) { var c = z ( b . duration ) ? b . duration : 0 ; n . selectAll ( "." + a ) . transition ( ) . duration ( c ) . style ( "fill-opacity" , 0 ) . remove ( ) ; Q = Q . filter ( function ( b ) { return 0 >
b . classes . indexOf ( a ) } ) } ) ; return Q } ; k . data . get = function ( a ) { a = k . data . getAsTarget ( a ) ; return y ( a ) ? a . values . map ( function ( a ) { return a . value } ) : void 0 } ; k . data . getAsTarget = function ( a ) { var b = nb ( function ( b ) { return b . id === a } ) ; return 0 < b . length ? b [ 0 ] : void 0 } ; k . resize = function ( a ) { Ja = a ? a . width : null ; Hb = a ? a . height : null ; pd ( ) } ; k . destroy = function ( ) { k . data . targets = void 0 ; k . data . x = { } ; sb . html ( "" ) ; K . onresize = null } ; if ( "url" in R . data ) e . csv ( R . data . url , function ( a , b ) { dc ( b ) } ) ; else if ( "rows" in R . data ) dc ( Hc ( R . data . rows ) ) ; else if ( "columns" in
R . data ) dc ( Ic ( R . data . columns ) ) ; else throw Error ( "url or rows or columns is required." ) ; return k } } ) ( window ) ;