/*! fineui */
function accAdd ( a , b ) { var c , d , e , f ; try { c = a . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { c = 0 } try { d = b . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { d = 0 } if ( f = Math . abs ( c - d ) , e = Math . pow ( 10 , Math . max ( c , d ) ) , f > 0 ) { var h = Math . pow ( 10 , f ) ; c > d ? ( a = Number ( a . toString ( ) . replace ( "." , "" ) ) , b = Number ( b . toString ( ) . replace ( "." , "" ) ) * h ) : ( a = Number ( a . toString ( ) . replace ( "." , "" ) ) * h , b = Number ( b . toString ( ) . replace ( "." , "" ) ) ) } else a = Number ( a . toString ( ) . replace ( "." , "" ) ) , b = Number ( b . toString ( ) . replace ( "." , "" ) ) ; return ( a + b ) / e } function accSub ( a , b ) { var c , d , e , f ; try { c = a . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { c = 0 } try { d = b . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { d = 0 } return e = Math . pow ( 10 , Math . max ( c , d ) ) , f = c >= d ? c : d , ( ( a * e - b * e ) / e ) . toFixed ( f ) } function accMul ( a , b ) { var c = 0 , d = a . toString ( ) , e = b . toString ( ) ; try { c += d . split ( "." ) [ 1 ] . length } catch ( f ) { } try { c += e . split ( "." ) [ 1 ] . length } catch ( f ) { } return Number ( d . replace ( "." , "" ) ) * Number ( e . replace ( "." , "" ) ) / Math . pow ( 10 , c ) } function accDiv ( arg1 , arg2 ) { var t1 = 0 , t2 = 0 , r1 , r2 ; try { t1 = arg1 . toString ( ) . split ( "." ) [ 1 ] . length } catch ( e ) { } try { t2 = arg2 . toString ( ) . split ( "." ) [ 1 ] . length } catch ( e ) { } with ( Math ) return r1 = Number ( arg1 . toString ( ) . replace ( "." , "" ) ) , r2 = Number ( arg2 . toString ( ) . replace ( "." , "" ) ) , t2 > t1 ? r1 / r2 * pow ( 10 , t2 - t1 ) : r1 / r2 / pow ( 10 , t1 - t2 ) } function _classCallCheck ( a , b ) { if ( ! ( a instanceof b ) ) throw new TypeError ( "Cannot call a class as a function" ) } Array . prototype . indexOf || ( Array . prototype . indexOf = function ( a , b ) { var c ; if ( null == this ) throw new TypeError ( '"this" is null or not defined' ) ; var d = Object ( this ) , e = d . length >>> 0 ; if ( 0 === e ) return - 1 ; var f = 0 | b ; if ( f >= e ) return - 1 ; for ( c = Math . max ( f >= 0 ? f : e - Math . abs ( f ) , 0 ) ; c < e ; ) { if ( c in d && d [ c ] === a ) return c ; c ++ } return - 1 } ) , Array . prototype . lastIndexOf || ( Array . prototype . lastIndexOf = function ( a ) { "use strict" ; if ( void 0 === this || null === this ) throw new TypeError ; var b , c , d = Object ( this ) , e = d . length >>> 0 ; if ( 0 === e ) return - 1 ; for ( b = e - 1 , arguments . length > 1 && ( b = Number ( arguments [ 1 ] ) , b != b ? b = 0 : 0 != b && b != 1 / 0 && b != - ( 1 / 0 ) && ( b = ( b > 0 || - 1 ) * Math . floor ( Math . abs ( b ) ) ) ) , c = b >= 0 ? Math . min ( b , e - 1 ) : e - Math . abs ( b ) ; c >= 0 ; c -- ) if ( c in d && d [ c ] === a ) return c ; return - 1 } ) , window . console = window . console || function ( ) { var a = { } ; return a . log = a . warn = a . debug = a . info = a . error = a . time = a . dir = a . profile = a . clear = a . exception = a . trace = a . assert = function ( ) { } , a } ( ) , Function . prototype . bind || ( Function . prototype . bind = function ( a ) { if ( "function" != typeof this ) throw new TypeError ( "Function.prototype.bind - what is trying to be bound is not callable" ) ; var b = Array . prototype . slice . call ( arguments , 1 ) , c = this , d = function ( ) { } , e = function ( ) { return c . apply ( this instanceof d ? this : a , b . concat ( Array . prototype . slice . call ( arguments ) ) ) } ; return this . prototype && ( d . prototype = this . prototype ) , e . prototype = new d , e } ) , window . localStorage || ( window . localStorage = { items : { } , setItem : function ( a , b ) { BI . Cache . addCookie ( a , b ) } , getItem : function ( a ) { return BI . Cache . getCookie ( a ) } , removeItem : function ( a ) { BI . Cache . deleteCookie ( a ) } , key : function ( ) { } , clear : function ( ) { this . items = { } } } ) , "undefined" != typeof Set && Set . toString ( ) . match ( /native code/ ) || ( Set = function ( ) { this . set = { } } , Set . prototype . has = function ( a ) { return void 0 !== this . set [ a ] } , Set . prototype . add = function ( a ) { this . set [ a ] = 1 } , Set . prototype . clear = function ( ) { this . set = { } } ) , ! function ( a ) { var b = a . navigator . userAgent . toLowerCase ( ) , c = /msie|applewebkit.+safari/ ; if ( c . test ( b ) ) { var d = Array . prototype . sort ; Array . prototype . sort = function ( a ) { if ( a && "function" == typeof a ) { if ( this . length < 2 ) return this ; for ( var b , c = 0 , e = c + 1 , f = this . length , g = ! 1 , h = 0 ; c < f ; c ++ ) for ( e = c + 1 ; e < f ; e ++ ) h = a . call ( this , this [ c ] , this [ e ] ) , g = ( "number" == typeof h ? h : h ? 1 : 0 ) > 0 , g === ! 0 && ( b = this [ c ] , this [ c ] = this [ e ] , this [ e ] = b ) ; return this } return d . call ( this ) } } } ( window ) , function ( a , b ) { function c ( a ) { var b = a . length , c = ia . type ( a ) ; return ! ia . isWindow ( a ) && ( ! ( 1 !== a . nodeType || ! b ) || ( "array" === c || "function" !== c && ( 0 === b || "number" == typeof b && b > 0 && b - 1 in a ) ) ) } function d ( a ) { var b = xa [ a ] = { } ; return ia . each ( a . match ( ka ) || [ ] , function ( a , c ) { b [ c ] = ! 0 } ) , b } function e ( a , c , d , e ) { if ( ia . acceptData ( a ) ) { var f , g , h = ia . expando , i = "string" == typeof c , j = a . nodeType , k = j ? ia . cache : a , l = j ? a [ h ] : a [ h ] && h ; if ( l && k [ l ] && ( e || k [ l ] . data ) || ! i || d !== b ) return l || ( j ? a [ h ] = l = _ . pop ( ) || ia . guid ++ : l = h ) , k [ l ] || ( k [ l ] = { } , j || ( k [ l ] . toJSON = ia . noop ) ) , "object" != typeof c && "function" != typ
var c = typeof a , d = "boolean" == typeof b ; return ia . isFunction ( a ) ? this . each ( function ( c ) { ia ( this ) . toggleClass ( a . call ( this , c , this . className , b ) , b ) } ) : this . each ( function ( ) { if ( "string" === c ) for ( var e , f = 0 , g = ia ( this ) , h = b , i = a . match ( ka ) || [ ] ; e = i [ f ++ ] ; ) h = d ? h : ! g . hasClass ( e ) , g [ h ? "addClass" : "removeClass" ] ( e ) ; else c !== V && "boolean" !== c || ( this . className && ia . _data ( this , "__className__" , this . className ) , this . className = this . className || a === ! 1 ? "" : ia . _data ( this , "__className__" ) || "" ) } ) } , hasClass : function ( a ) { for ( var b = " " + a + " " , c = 0 , d = this . length ; c < d ; c ++ ) if ( 1 === this [ c ] . nodeType && ( " " + this [ c ] . className + " " ) . replace ( Ca , " " ) . indexOf ( b ) >= 0 ) return ! 0 ; return ! 1 } , val : function ( a ) { var c , d , e , f = this [ 0 ] ; { if ( arguments . length ) return e = ia . isFunction ( a ) , this . each ( function ( c ) { var f , g = ia ( this ) ; 1 === this . nodeType && ( f = e ? a . call ( this , c , g . val ( ) ) : a , null == f ? f = "" : "number" == typeof f ? f += "" : ia . isArray ( f ) && ( f = ia . map ( f , function ( a ) { return null == a ? "" : a + "" } ) ) , d = ia . valHooks [ this . type ] || ia . valHooks [ this . nodeName . toLowerCase ( ) ] , d && "set" in d && d . set ( this , f , "value" ) !== b || ( this . value = f ) ) } ) ; if ( f ) return d = ia . valHooks [ f . type ] || ia . valHooks [ f . nodeName . toLowerCase ( ) ] , d && "get" in d && ( c = d . get ( f , "value" ) ) !== b ? c : ( c = f . value , "string" == typeof c ? c . replace ( Da , "" ) : null == c ? "" : c ) } } } ) , ia . extend ( { valHooks : { option : { get : function ( a ) { var b = a . attributes . value ; return ! b || b . specified ? a . value : a . text } } , select : { get : function ( a ) { for ( var b , c , d = a . options , e = a . selectedIndex , f = "select-one" === a . type || e < 0 , g = f ? null : [ ] , h = f ? e + 1 : d . length , i = e < 0 ? h : f ? e : 0 ; i < h ; i ++ ) if ( c = d [ i ] , ( c . selected || i === e ) && ( ia . support . optDisabled ? ! c . disabled : null === c . getAttribute ( "disabled" ) ) && ( ! c . parentNode . disabled || ! ia . nodeName ( c . parentNode , "optgroup" ) ) ) { if ( b = ia ( c ) . val ( ) , f ) return b ; g . push ( b ) } return g } , set : function ( a , b ) { var c = ia . makeArray ( b ) ; return ia ( a ) . find ( "option" ) . each ( function ( ) { this . selected = ia . inArray ( ia ( this ) . val ( ) , c ) >= 0 } ) , c . length || ( a . selectedIndex = - 1 ) , c } } } , attr : function ( a , c , d ) { var e , f , g , h = a . nodeType ; if ( a && 3 !== h && 8 !== h && 2 !== h ) return typeof a . getAttribute === V ? ia . prop ( a , c , d ) : ( f = 1 !== h || ! ia . isXMLDoc ( a ) , f && ( c = c . toLowerCase ( ) , e = ia . attrHooks [ c ] || ( Ga . test ( c ) ? Ba : Aa ) ) , d === b ? e && f && "get" in e && null !== ( g = e . get ( a , c ) ) ? g : ( typeof a . getAttribute !== V && ( g = a . getAttribute ( c ) ) , null == g ? b : g ) : null !== d ? e && f && "set" in e && ( g = e . set ( a , d , c ) ) !== b ? g : ( a . setAttribute ( c , d + "" ) , d ) : void ia . removeAttr ( a , c ) ) } , removeAttr : function ( a , b ) { var c , d , e = 0 , f = b && b . match ( ka ) ; if ( f && 1 === a . nodeType ) for ( ; c = f [ e ++ ] ; ) d = ia . propFix [ c ] || c , Ga . test ( c ) ? ! Ia && Ha . test ( c ) ? a [ ia . camelCase ( "default-" + c ) ] = a [ d ] = ! 1 : a [ d ] = ! 1 : ia . attr ( a , c , "" ) , a . removeAttribute ( Ia ? c : d ) } , attrHooks : { type : { set : function ( a , b ) { if ( ! ia . support . radioValue && "radio" === b && ia . nodeName ( a , "input" ) ) { var c = a . value ; return a . setAttribute ( "type" , b ) , c && ( a . value = c ) , b } } } } , propFix : { tabindex : "tabIndex" , readonly : "readOnly" , "for" : "htmlFor" , "class" : "className" , maxlength : "maxLength" , cellspacing : "cellSpacing" , cellpadding : "cellPadding" , rowspan : "rowSpan" , colspan : "colSpan" , usemap : "useMap" , frameborder : "frameBorder" , contenteditable : "contentEditable" } , prop : function ( a , c , d ) { var e , f , g , h = a . nodeType ; if ( a && 3 !== h && 8 !== h && 2 !== h ) return g = 1 !== h || ! ia . isXMLDoc ( a ) , g && ( c = ia . propFix [ c ] || c , f = ia . propHooks [ c ] ) , d !== b ? f && "set" in f && ( e = f . set ( a , d , c ) ) !== b ? e : a [ c ] = d : f && "get" in f && null !== ( e = f . get ( a , c ) ) ? e : a [ c ] } , propHooks : { tabIndex : { get : function ( a ) { var c = a . getAttributeNode ( "tabindex" ) ; return c && c . specified ? parseInt ( c . value , 10 ) : Ea . test ( a . nodeName ) || Fa . test ( a . nodeName ) && a . href ? 0 : b } } } } ) , Ba = { get : function ( a , c ) { var d = ia . prop ( a , c ) , e = "boolean" == typeof d && a . getAttribute ( c ) , f = "boolean" == typeof d ? Ja && Ia ? null != e : Ha . test ( c ) ? a [ ia . camelCase ( "default-" + c ) ] : ! ! e : a . getAttributeNode ( c ) ; return f && f . value !== ! 1 ? c . toLowerCase ( ) : b } , set : function ( a , b , c ) { return b === ! 1 ? ia . removeAttr ( a , c ) : Ja && Ia || ! Ha . test ( c ) ? a . setAttribute ( ! Ia && ia . propFix [ c ] || c , c ) : a [ ia . camelCase ( "default-" + c ) ] = a [ c ] = ! 0 , c } } , Ja && Ia || ( ia . attrHooks . value = { get : function ( a , c ) { var d = a . getAttributeNode ( c ) ; return ia . nodeName ( a , "input" ) ? a . defaultValue : d && d . specified ? d . value : b } , set : function ( a , b , c ) { return ia . nodeName ( a , "input" ) ? void ( a . defaultValue = b ) : Aa && Aa . set ( a , b , c ) } } ) , Ia || ( Aa = ia . valHooks . button = { get : function ( a , c ) { var d = a . getAttributeNode ( c ) ; return d && ( "id" === c || "name" === c || "coords" === c ? "" !== d . value :
} , enabled : function ( a ) { return a . disabled === ! 1 } , disabled : function ( a ) { return a . disabled === ! 0 } , checked : function ( a ) { var b = a . nodeName . toLowerCase ( ) ; return "input" === b && ! ! a . checked || "option" === b && ! ! a . selected } , selected : function ( a ) { return a . parentNode && a . parentNode . selectedIndex , a . selected === ! 0 } , empty : function ( a ) { for ( a = a . firstChild ; a ; a = a . nextSibling ) if ( a . nodeName > "@" || 3 === a . nodeType || 4 === a . nodeType ) return ! 1 ; return ! 0 } , parent : function ( a ) { return ! y . pseudos . empty ( a ) } , header : function ( a ) { return ra . test ( a . nodeName ) } , input : function ( a ) { return qa . test ( a . nodeName ) } , button : function ( a ) { var b = a . nodeName . toLowerCase ( ) ; return "input" === b && "button" === a . type || "button" === b } , text : function ( a ) { var b ; return "input" === a . nodeName . toLowerCase ( ) && "text" === a . type && ( null == ( b = a . getAttribute ( "type" ) ) || b . toLowerCase ( ) === a . type ) } , first : k ( function ( ) { return [ 0 ] } ) , last : k ( function ( a , b ) { return [ b - 1 ] } ) , eq : k ( function ( a , b , c ) { return [ c < 0 ? c + b : c ] } ) , even : k ( function ( a , b ) { for ( var c = 0 ; c < b ; c += 2 ) a . push ( c ) ; return a } ) , odd : k ( function ( a , b ) { for ( var c = 1 ; c < b ; c += 2 ) a . push ( c ) ; return a } ) , lt : k ( function ( a , b , c ) { for ( var d = c < 0 ? c + b : c ; -- d >= 0 ; ) a . push ( d ) ; return a } ) , gt : k ( function ( a , b , c ) { for ( var d = c < 0 ? c + b : c ; ++ d < b ; ) a . push ( d ) ; return a } ) } } ; for ( w in { radio : ! 0 , checkbox : ! 0 , file : ! 0 , password : ! 0 , image : ! 0 } ) y . pseudos [ w ] = i ( w ) ; for ( w in { submit : ! 0 , reset : ! 0 } ) y . pseudos [ w ] = j ( w ) ; B = g . compile = function ( a , b ) { var c , d = [ ] , e = [ ] , f = U [ a + " " ] ; if ( ! f ) { for ( b || ( b = l ( a ) ) , c = b . length ; c -- ; ) f = r ( b [ c ] ) , f [ N ] ? d . push ( f ) : e . push ( f ) ; f = U ( a , s ( e , d ) ) } return f } , y . pseudos . nth = y . pseudos . eq , y . filters = v . prototype = y . pseudos , y . setFilters = new v , E ( ) , g . attr = ia . attr , ia . find = g , ia . expr = g . selectors , ia . expr [ ":" ] = ia . expr . pseudos , ia . unique = g . uniqueSort , ia . text = g . getText , ia . isXMLDoc = g . isXML , ia . contains = g . contains } ( a ) ; var Pa = /Until$/ , Qa = /^(?:parents|prev(?:Until|All))/ , Ra = /^.[^:#\[\.,]*$/ , Sa = ia . expr . match . needsContext , Ta = { children : ! 0 , contents : ! 0 , next : ! 0 , prev : ! 0 } ; ia . fn . extend ( { find : function ( a ) { var b , c , d , e = this . length ; if ( "string" != typeof a ) return d = this , this . pushStack ( ia ( a ) . filter ( function ( ) { for ( b = 0 ; b < e ; b ++ ) if ( ia . contains ( d [ b ] , this ) ) return ! 0 } ) ) ; for ( c = [ ] , b = 0 ; b < e ; b ++ ) ia . find ( a , this [ b ] , c ) ; return c = this . pushStack ( e > 1 ? ia . unique ( c ) : c ) , c . selector = ( this . selector ? this . selector + " " : "" ) + a , c } , has : function ( a ) { var b , c = ia ( a , this ) , d = c . length ; return this . filter ( function ( ) { for ( b = 0 ; b < d ; b ++ ) if ( ia . contains ( this , c [ b ] ) ) return ! 0 } ) } , not : function ( a ) { return this . pushStack ( l ( this , a , ! 1 ) ) } , filter : function ( a ) { return this . pushStack ( l ( this , a , ! 0 ) ) } , is : function ( a ) { return ! ! a && ( "string" == typeof a ? Sa . test ( a ) ? ia ( a , this . context ) . index ( this [ 0 ] ) >= 0 : ia . filter ( a , this ) . length > 0 : this . filter ( a ) . length > 0 ) } , closest : function ( a , b ) { for ( var c , d = 0 , e = this . length , f = [ ] , g = Sa . test ( a ) || "string" != typeof a ? ia ( a , b || this . context ) : 0 ; d < e ; d ++ ) for ( c = this [ d ] ; c && c . ownerDocument && c !== b && 11 !== c . nodeType ; ) { if ( g ? g . index ( c ) > - 1 : ia . find . matchesSelector ( c , a ) ) { f . push ( c ) ; break } c = c . parentNode } return this . pushStack ( f . length > 1 ? ia . unique ( f ) : f ) } , index : function ( a ) { return a ? "string" == typeof a ? ia . inArray ( this [ 0 ] , ia ( a ) ) : ia . inArray ( a . jquery ? a [ 0 ] : a , this ) : this [ 0 ] && this [ 0 ] . parentNode ? this . first ( ) . prevAll ( ) . length : - 1 } , add : function ( a , b ) { var c = "string" == typeof a ? ia ( a , b ) : ia . makeArray ( a && a . nodeType ? [ a ] : a ) , d = ia . merge ( this . get ( ) , c ) ; return this . pushStack ( ia . unique ( d ) ) } , addBack : function ( a ) { return this . add ( null == a ? this . prevObject : this . prevObject . filter ( a ) ) } } ) , ia . fn . andSelf = ia . fn . addBack , ia . each ( { parent : function ( a ) { var b = a . parentNode ; return b && 11 !== b . nodeType ? b : null } , parents : function ( a ) { return ia . dir ( a , "parentNode" ) } , parentsUntil : function ( a , b , c ) { return ia . dir ( a , "parentNode" , c ) } , next : function ( a ) { return k ( a , "nextSibling" ) } , prev : function ( a ) { return k ( a , "previousSibling" ) } , nextAll : function ( a ) { return ia . dir ( a , "nextSibling" ) } , prevAll : function ( a ) { return ia . dir ( a , "previousSibling" ) } , nextUntil : function ( a , b , c ) { return ia . dir ( a , "nextSibling" , c ) } , prevUntil : function ( a , b , c ) { return ia . dir ( a , "previousSibling" , c ) } , siblings : function ( a ) { return ia . sibling ( ( a . parentNode || { } ) . firstChild , a ) } , children : function ( a ) { return ia . sibling ( a . firstChild ) } , contents : function ( a ) { return ia . nodeName ( a , "iframe" ) ? a . contentDocument || a . contentWindow . document : ia . merge ( [ ] , a . childNodes ) } } , function ( a , b ) { ia . fn [ a ] = function ( c , d ) { va
} , a , e , arguments . length , null ) } } ) , ia . each ( { Height : "height" , Width : "width" } , function ( a , c ) { ia . each ( { padding : "inner" + a , content : c , "" : "outer" + a } , function ( d , e ) { ia . fn [ e ] = function ( e , f ) { var g = arguments . length && ( d || "boolean" != typeof e ) , h = d || ( e === ! 0 || f === ! 0 ? "margin" : "border" ) ; return ia . access ( this , function ( c , d , e ) { var f ; return ia . isWindow ( c ) ? c . document . documentElement [ "client" + a ] : 9 === c . nodeType ? ( f = c . documentElement , Math . max ( c . body [ "scroll" + a ] , f [ "scroll" + a ] , c . body [ "offset" + a ] , f [ "offset" + a ] , f [ "client" + a ] ) ) : e === b ? ia . css ( c , d , h ) : ia . style ( c , d , e , h ) } , c , g ? e : b , g , null ) } } ) } ) , a . jQuery = a . $ = ia , "function" == typeof define && define . amd && define . amd . jQuery && define ( "jquery" , [ ] , function ( ) { return ia } ) } ( window ) , function ( ) { function a ( a ) { function b ( b , c , d , e , f , g ) { for ( ; f >= 0 && f < g ; f += a ) { var h = e ? e [ f ] : f ; d = c ( d , b [ h ] , h , b ) } return d } return function ( c , d , e , f ) { d = s ( d , f , 4 ) ; var g = ! x ( c ) && r . keys ( c ) , h = ( g || c ) . length , i = a > 0 ? 0 : h - 1 ; return arguments . length < 3 && ( e = c [ g ? g [ i ] : i ] , i += a ) , b ( c , d , e , g , i , h ) } } function b ( a ) { return function ( b , c , d ) { c = t ( c , d ) ; for ( var e = null != b && b . length , f = a > 0 ? 0 : e - 1 ; f >= 0 && f < e ; f += a ) if ( c ( b [ f ] , f , b ) ) return f ; return - 1 } } function c ( a , b ) { var c = C . length , d = a . constructor , e = r . isFunction ( d ) && d . prototype || g , f = "constructor" ; for ( r . has ( a , f ) && ! r . contains ( b , f ) && b . push ( f ) ; c -- ; ) f = C [ c ] , f in a && a [ f ] !== e [ f ] && ! r . contains ( b , f ) && b . push ( f ) } var d = this , e = d . _ , f = Array . prototype , g = Object . prototype , h = Function . prototype , i = f . push , j = f . slice , k = g . toString , l = g . hasOwnProperty , m = Array . isArray , n = Object . keys , o = h . bind , p = Object . create , q = function ( ) { } , r = function ( a ) { return a instanceof r ? a : this instanceof r ? void ( this . _wrapped = a ) : new r ( a ) } ; "undefined" != typeof exports ? ( "undefined" != typeof module && module . exports && ( exports = module . exports = r ) , exports . _ = r ) : d . _ = r , r . VERSION = "1.8.2" ; var s = function ( a , b , c ) { if ( void 0 === b ) return a ; switch ( null == c ? 3 : c ) { case 1 : return function ( c ) { return a . call ( b , c ) } ; case 2 : return function ( c , d ) { return a . call ( b , c , d ) } ; case 3 : return function ( c , d , e ) { return a . call ( b , c , d , e ) } ; case 4 : return function ( c , d , e , f ) { return a . call ( b , c , d , e , f ) } } return function ( ) { return a . apply ( b , arguments ) } } , t = function ( a , b , c ) { return null == a ? r . identity : r . isFunction ( a ) ? s ( a , b , c ) : r . isObject ( a ) ? r . matcher ( a ) : r . property ( a ) } ; r . iteratee = function ( a , b ) { return t ( a , b , 1 / 0 ) } ; var u = function ( a , b ) { return function ( c ) { var d = arguments . length ; if ( d < 2 || null == c ) return c ; for ( var e = 1 ; e < d ; e ++ ) for ( var f = arguments [ e ] , g = a ( f ) , h = g . length , i = 0 ; i < h ; i ++ ) { var j = g [ i ] ; b && void 0 !== c [ j ] || ( c [ j ] = f [ j ] ) } return c } } , v = function ( a ) { if ( ! r . isObject ( a ) ) return { } ; if ( p ) return p ( a ) ; q . prototype = a ; var b = new q ; return q . prototype = null , b } , w = Math . pow ( 2 , 53 ) - 1 , x = function ( a ) { var b = null != a && a . length ; return "number" == typeof b && b >= 0 && b <= w } ; r . each = r . forEach = function ( a , b , c ) { b = s ( b , c ) ; var d , e ; if ( x ( a ) ) for ( d = 0 , e = a . length ; d < e ; d ++ ) b ( a [ d ] , d , a ) ; else { var f = r . keys ( a ) ; for ( d = 0 , e = f . length ; d < e ; d ++ ) b ( a [ f [ d ] ] , f [ d ] , a ) } return a } , r . map = r . collect = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = Array ( e ) , g = 0 ; g < e ; g ++ ) { var h = d ? d [ g ] : g ; f [ g ] = b ( a [ h ] , h , a ) } return f } , r . reduce = r . foldl = r . inject = a ( 1 ) , r . reduceRight = r . foldr = a ( - 1 ) , r . find = r . detect = function ( a , b , c ) { var d ; if ( d = x ( a ) ? r . findIndex ( a , b , c ) : r . findKey ( a , b , c ) , void 0 !== d && d !== - 1 ) return a [ d ] } , r . filter = r . select = function ( a , b , c ) { var d = [ ] ; return b = t ( b , c ) , r . each ( a , function ( a , c , e ) { b ( a , c , e ) && d . push ( a ) } ) , d } , r . reject = function ( a , b , c ) { return r . filter ( a , r . negate ( t ( b ) ) , c ) } , r . every = r . all = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = 0 ; f < e ; f ++ ) { var g = d ? d [ f ] : f ; if ( ! b ( a [ g ] , g , a ) ) return ! 1 } return ! 0 } , r . some = r . any = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = 0 ; f < e ; f ++ ) { var g = d ? d [ f ] : f ; if ( b ( a [ g ] , g , a ) ) return ! 0 } return ! 1 } , r . contains = r . includes = r . include = function ( a , b , c ) { return x ( a ) || ( a = r . values ( a ) ) , r . indexOf ( a , b , "number" == typeof c && c ) >= 0 } , r . invoke = function ( a , b ) { var c = j . call ( arguments , 2 ) , d = r . isFunction ( b ) ; return r . map ( a , function ( a ) { var e = d ? b : a [ b ] ; return null == e ? e : e . apply ( a , c ) } ) } , r . pluck = function ( a , b ) { return r . map ( a , r . property ( b ) ) } , r . where = function ( a , b ) { return r . filter ( a , r . matcher ( b ) ) } , r . findWhere = function ( a , b ) { return r . find ( a , r . matcher ( b ) ) } , r . max = function ( a , b , c ) { var d , e , f = - ( 1 / 0 ) , g = - ( 1 / 0 ) ; if ( null == b && null != a ) { a = x ( a ) ? a : r . values ( a ) ; for ( var h = 0 , i = a . length ; h < i ; h +
return { } } , _init : function ( ) { this . _initListeners ( ) , this . init && this . init ( ) } , _initListeners : function ( ) { var a = this ; null != this . options . listeners && ( _ . each ( this . options . listeners , function ( b ) { ( b . target ? b . target : a ) [ b . once ? "once" : "on" ] ( b . eventName , _ . bind ( b . action , a ) ) } ) , delete this . options . listeners ) } , _initRef : function ( ) { this . options . ref && this . options . ref . call ( this , this ) } , _purgeRef : function ( ) { this . options . ref && this . options . ref . call ( null ) } , _getEvents : function ( ) { return _ . isArray ( this . events ) || ( this . events = [ ] ) , this . events } , on : function ( a , b ) { a = a . toLowerCase ( ) ; var c = this . _getEvents ( ) [ a ] ; _ . isArray ( c ) || ( c = [ ] , this . _getEvents ( ) [ a ] = c ) , c . push ( b ) } , once : function ( a , b ) { var c = function ( ) { b . apply ( this , arguments ) , this . un ( a , c ) } ; this . on ( a , c ) } , un : function ( a , b ) { if ( a = a . toLowerCase ( ) , null == b ) delete this . _getEvents ( ) [ a ] ; else { var c = this . _getEvents ( ) [ a ] ; if ( _ . isArray ( c ) ) { var d = [ ] ; _ . each ( c , function ( a ) { a != b && d . push ( a ) } ) , this . _getEvents ( ) [ a ] = d } } } , purgeListeners : function ( ) { this . events = [ ] } , fireEvent : function ( ) { var a = arguments [ 0 ] . toLowerCase ( ) , b = this . _getEvents ( ) [ a ] ; if ( BI . isArray ( b ) ) if ( BI . isArguments ( arguments [ 1 ] ) ) { for ( var c = 0 ; c < b . length ; c ++ ) if ( b [ c ] . apply ( this , arguments [ 1 ] ) === ! 1 ) return ! 1 } else for ( var d = Array . prototype . slice . call ( arguments , 1 ) , c = 0 ; c < b . length ; c ++ ) if ( b [ c ] . apply ( this , d ) === ! 1 ) return ! 1 ; return ! 0 } , destroy : function ( ) { this . destroyed && this . destroyed ( ) , this . _purgeRef ( ) , this . purgeListeners ( ) } } ) , BI . Widget = BI . inherit ( BI . OB , { _defaultConfig : function ( ) { return BI . extend ( BI . Widget . superclass . _defaultConfig . apply ( this ) , { root : ! 1 , tagName : "div" , attributes : null , data : null , tag : null , disabled : ! 1 , invisible : ! 1 , invalid : ! 1 , baseCls : "" , extraCls : "" , cls : "" } ) } , beforeInit : null , beforeCreate : null , created : null , render : null , beforeMount : null , mounted : null , shouldUpdate : null , update : function ( ) { } , beforeDestroy : null , destroyed : null , _init : function ( ) { BI . Widget . superclass . _init . apply ( this , arguments ) , this . _initRoot ( ) , this . _initElementWidth ( ) , this . _initElementHeight ( ) , this . _initVisual ( ) , this . _initState ( ) , this . beforeInit ? ( this . _ _asking = ! 0 , this . beforeInit ( BI . bind ( this . _render , this ) ) , this . _ _asking === ! 0 && ( this . _ _async = ! 0 ) ) : this . _render ( ) } , _render : function ( ) { this . _ _asking = ! 1 , this . beforeCreate && this . beforeCreate ( ) , this . _initElement ( ) , this . _initEffects ( ) , this . created && this . created ( ) } , _initRoot : function ( ) { var a = this . options ; this . widgetName = a . widgetName || BI . uniqueId ( "widget" ) , this . _isRoot = a . root , BI . isWidget ( a . element ) ? ( a . element instanceof BI . Widget ? ( this . _parent = a . element , this . _parent . addWidget ( this . widgetName , this ) ) : this . _isRoot = ! 0 , this . element = this . options . element . element ) : a . element ? ( this . element = $ ( a . element ) , this . _isRoot = ! 0 ) : this . element = $ ( document . createElement ( a . tagName ) ) , this . element . _isWidget = ! 0 , ( a . baseCls || a . extraCls || a . cls ) && this . element . addClass ( ( a . baseCls || "" ) + " " + ( a . extraCls || "" ) + " " + ( a . cls || "" ) ) , a . attributes && this . element . attr ( a . attributes ) , a . data && this . element . data ( a . data ) , this . _children = { } } , _initElementWidth : function ( ) { var a = this . options ; BI . isWidthOrHeight ( a . width ) && this . element . css ( "width" , a . width ) } , _initElementHeight : function ( ) { var a = this . options ; BI . isWidthOrHeight ( a . height ) && this . element . css ( "height" , a . height ) } , _initVisual : function ( ) { var a = this . options ; a . invisible && this . element . css ( "display" , "none" ) } , _initEffects : function ( ) { var a = this . options ; ( a . disabled || a . invalid ) && ( this . options . disabled && this . setEnable ( ! 1 ) , this . options . invalid && this . setValid ( ! 1 ) ) } , _initState : function ( ) { this . _isMounted = ! 1 } , _initElement : function ( ) { var a = this , b = this . render && this . render ( ) ; BI . isPlainObject ( b ) && ( b = [ b ] ) , BI . isArray ( b ) && BI . each ( b , function ( b , c ) { BI . createWidget ( c , { element : a } ) } ) , this . _mount ( ) } , _setParent : function ( a ) { this . _parent = a } , _mount : function ( ) { var a = this , b = this . _isMounted ; ! b && this . isVisible ( ) && ( this . _isRoot === ! 0 ? b = ! 0 : this . _parent && this . _parent . _isMounted === ! 0 && ( b = ! 0 ) , b && ( this . beforeMount && this . beforeMount ( ) , this . _isMounted = ! 0 , this . _mountChildren && this . _mountChildren ( ) , BI . each ( this . _children , function ( b , c ) { ! a . isEnabled ( ) && c . _setEnable ( ! 1 ) , ! a . isValid ( ) && c . _setValid ( ! 1 ) , c . _mount && c . _mount ( ) } ) , this . mounted && this . mounted ( ) ) ) } , _mountChildren : null , isMounted : function ( ) { return this . _isMounted } , setWidth : function ( a ) { this . options
19969 : "DZ" , 19975 : "WM" , 19988 : "QJ" , 20048 : "YL" , 20056 : "SC" , 20060 : "NM" , 20094 : "QG" , 20127 : "QJ" , 20167 : "QC" , 20193 : "YG" , 20250 : "KH" , 20256 : "ZC" , 20282 : "SC" , 20285 : "QJG" , 20291 : "TD" , 20314 : "YD" , 20315 : "BF" , 20340 : "NE" , 20375 : "TD" , 20389 : "YJ" , 20391 : "CZ" , 20415 : "PB" , 20446 : "YS" , 20447 : "SQ" , 20504 : "TC" , 20608 : "KG" , 20854 : "QJ" , 20857 : "ZC" , 20911 : "PF" , 20985 : "AW" , 21032 : "PB" , 21048 : "XQ" , 21049 : "SC" , 21089 : "YS" , 21119 : "JC" , 21242 : "SB" , 21273 : "SC" , 21305 : "YP" , 21306 : "QO" , 21330 : "ZC" , 21333 : "SDC" , 21345 : "QK" , 21378 : "CA" , 21397 : "SC" , 21414 : "XS" , 21442 : "SC" , 21477 : "JG" , 21480 : "TD" , 21484 : "ZS" , 21494 : "YX" , 21505 : "YX" , 21512 : "HG" , 21523 : "XH" , 21537 : "PB" , 21542 : "PF" , 21549 : "KH" , 21571 : "E" , 21574 : "DA" , 21588 : "TD" , 21589 : "O" , 21618 : "ZC" , 21621 : "KHA" , 21632 : "ZJ" , 21654 : "KG" , 21679 : "LKG" , 21683 : "KH" , 21710 : "A" , 21719 : "YH" , 21734 : "WOE" , 21769 : "A" , 21780 : "WN" , 21804 : "XH" , 21834 : "A" , 21899 : "ZD" , 21903 : "RN" , 21908 : "WO" , 21939 : "ZC" , 21956 : "SA" , 21964 : "YA" , 21970 : "TD" , 22003 : "A" , 22031 : "JG" , 22040 : "XS" , 22060 : "ZC" , 22066 : "ZC" , 22079 : "MH" , 22129 : "XJ" , 22179 : "XA" , 22237 : "NJ" , 22244 : "TD" , 22280 : "JQ" , 22300 : "YH" , 22313 : "XW" , 22331 : "YQ" , 22343 : "YJ" , 22351 : "PH" , 22395 : "DC" , 22412 : "TD" , 22484 : "PB" , 22500 : "PB" , 22534 : "ZD" , 22549 : "DH" , 22561 : "PB" , 22612 : "TD" , 22771 : "KQ" , 22831 : "HB" , 22841 : "JG" , 22855 : "QJ" , 22865 : "XQ" , 23013 : "ML" , 23081 : "WM" , 23487 : "SX" , 23558 : "QJ" , 23561 : "YW" , 23586 : "YW" , 23614 : "YW" , 23615 : "SN" , 23631 : "PB" , 23646 : "ZS" , 23663 : "ZT" , 23673 : "YG" , 23762 : "TD" , 23769 : "ZS" , 23780 : "QJ" , 23884 : "QK" , 24055 : "XH" , 24113 : "DC" , 24162 : "ZC" , 24191 : "GA" , 24273 : "QJ" , 24324 : "NL" , 24377 : "TD" , 24378 : "QJ" , 24439 : "PF" , 24554 : "ZS" , 24683 : "TD" , 24694 : "WE" , 24733 : "LK" , 24925 : "TN" , 25094 : "ZG" , 25100 : "XQ" , 25103 : "XH" , 25153 : "PB" , 25170 : "PB" , 25179 : "KG" , 25203 : "PB" , 25240 : "ZS" , 25282 : "FB" , 25303 : "NA" , 25324 : "KG" , 25341 : "ZY" , 25373 : "WZ" , 25375 : "XJ" , 25384 : "A" , 25457 : "A" , 25528 : "SD" , 25530 : "SC" , 25552 : "TD" , 25774 : "ZC" , 25874 : "ZC" , 26044 : "YW" , 26080 : "WM" , 26292 : "PB" , 26333 : "PB" , 26355 : "ZY" , 26366 : "CZ" , 26397 : "ZC" , 26399 : "QJ" , 26415 : "ZS" , 26451 : "SB" , 26526 : "ZC" , 26552 : "JG" , 26561 : "TD" , 26588 : "JG" , 26597 : "CZ" , 26629 : "ZS" , 26638 : "YL" , 26646 : "XQ" , 26653 : "KG" , 26657 : "XJ" , 26727 : "HG" , 26894 : "ZC" , 26937 : "ZS" , 26946 : "ZC" , 26999 : "KJ" , 27099 : "KJ" , 27449 : "YQ" , 27481 : "XS" , 27542 : "ZS" , 27663 : "ZS" , 27748 : "TS" , 27784 : "SC" , 27788 : "ZD" , 27795 : "TD" , 27812 : "O" , 27850 : "PB" , 27852 : "MB" , 27895 : "SL" , 27898 : "PL" , 27973 : "QJ" , 27981 : "KH" , 27986 : "HX" , 27994 : "XJ" , 28044 : "YC" , 28065 : "WG" , 28177 : "SM" , 28267 : "QJ" , 28291 : "KH" , 28337 : "ZQ" , 28463 : "TL" , 28548 : "DC" , 28601 : "TD" , 28689 : "PB" , 28805 : "JG" , 28820 : "QG" , 28846 : "PB" , 28952 : "TD" , 28975 : "ZC" , 29100 : "A" , 29325 : "QJ" , 29575 : "SL" , 29602 : "FB" , 30010 : "TD" , 30044 : "CX" , 30058 : "PF" , 30091 : "YSP" , 30111 : "YN" , 30229 : "XJ" , 30427 : "SC" , 30465 : "SX" , 30631 : "YQ" , 30655 : "QJ" , 30684 : "QJG" , 30707 : "SD" , 30729 : "XH" , 30796 : "LG" , 30917 : "PB" , 31074 : "NM" , 31085 : "JZ" , 31109 : "SC" , 31181 : "ZC" , 31192 : "MLB" , 31293 : "JQ" , 31400 : "YX" , 31584 : "YJ" , 31896 : "ZN" , 31909 : "ZY" , 31995 : "XJ" , 32321 : "PF" , 32327 : "ZY" , 32418 : "HG" , 32420 : "XQ" , 32421 : "HG" , 32438 : "LG" , 32473 : "GJ" , 32488 : "TD" , 32521 : "QJ" , 32527 : "PB" , 32562 : "ZSQ" , 32564 : "JZ" , 32735 : "ZD" , 32793 : "PB" , 33071 : "PF" , 33098 : "XL" , 33100 : "YA" , 33152 : "PB" , 33261 : "CX" , 33324 : "BP" , 33333 : "TD" , 33406 : "YA" , 33426 : "WM" , 33432 : "PB" , 33445 : "JG" , 33486 : "ZN" , 33493 : "TS" , 33507 : "QJ" , 33540 : "QJ" , 33544 : "ZC" , 33564 : "XQ" , 33617 : "YT" , 33632 : "QJ" , 33636 : "XH" , 33637 : "YX" , 33694 : "WG" , 33705 : "PF" , 33728 : "YW" , 33882 : "SR" , 34067 : "WM" , 34074 : "YW" , 34121 : "QJ" , 34255 : "ZC" , 34259 : "XL" , 34425 : "JH" , 34430 : "XH" , 34485 : "KH" , 34503 : "YS" , 34532 : "HG" , 34552 : "XS" , 34558 : "YE" , 34593 : "ZL" , 34660 : "YQ" , 34892 : "XH" , 34928 : "SC" , 34999 : "QJ" , 35048 : "PB" , 35059 : "SC" , 35098 : "ZC" , 35203 : "TQ" , 35265 : "JX" , 35299 : "JX" , 35782 : "SZ" , 35828 : "YS" , 35830 : "E" , 35843 : "TD" , 35895 : "YG" , 35977 : "MH" , 36158 : "JG" , 36228 : "QJ" , 36426 : "XQ" , 36466 : "DC" , 36710 : "JC" , 36711 : "ZYG" , 36767 : "PB" , 36866 : "SK" , 36951 : "YW" , 37034 : "YX" , 37063 : "XH" , 37218 : "ZC" , 37325 : "ZC" , 38063 : "PB" , 38079 : "TD" , 38085 : "QY" , 38107 : "DC" , 38116 : "TD" , 38123 : "YD" , 38224 : "HG" , 38241 : "XTC" , 38271 : "ZC" , 38415 : "YE" , 38426 : "KH" , 38461 : "YD" , 38463 : "AE" , 38466 : "PB" , 38477 : "XJ" , 38518 : "YT" , 38551 : "WK" , 38585 : "ZC" , 38704 : "XS" , 38739 : "LJ" , 38761 : "GJ" , 38808 : "SQ" , 39048 : "JG" , 39049 : "XJ" , 39052 : "HG" , 39076 : "CZ" , 39271 : "XT" , 39534 : "TD" , 39552 : "TD" , 39584 : "PB" , 39647 : "SB" , 39730 : "LG" , 39748 : "TPB" , 40109 : "ZQ" , 40479 : "ND" , 40516 : "HG" , 40536 : "HG" , 40583 : "QJ" , 40765 : "YQ" , 40784 : "QJ" , 40840 : "YK" , 40863 : "QJG" } , c = function (
this . children . splice ( a , 1 ) } , removeAllChilds : function ( ) { this . children = [ ] } , addChild : function ( a , b ) { var c = null ; c = BI . isUndefined ( b ) ? this . children . length - 1 : b - 1 , a . setParent ( this ) , c >= 0 && ( this . getChild ( c ) && this . getChild ( c ) . setRight ( a ) , a . setLeft ( this . getChild ( c ) ) ) , BI . isUndefined ( b ) ? this . children . push ( a ) : this . children . splice ( b , 0 , a ) } , equals : function ( a ) { return this === a || this . id === a . id } , clear : function ( ) { this . parent = null , this . left = null , this . right = null , this . children = [ ] } } , BI . extend ( BI . Tree , { transformToArrayFormat : function ( a , b ) { if ( ! a ) return [ ] ; var c = [ ] ; if ( BI . isArray ( a ) ) for ( var d = 0 , e = a . length ; d < e ; d ++ ) { var f = BI . clone ( a [ d ] ) ; f . pId = null == f . pId ? b : f . pId , delete f . children , c . push ( f ) , a [ d ] . children && ( c = c . concat ( BI . Tree . transformToArrayFormat ( a [ d ] . children , f . id ) ) ) } else { var g = BI . clone ( a ) ; g . pId = null == g . pId ? b : g . pId , delete g . children , c . push ( g ) , a . children && ( c = c . concat ( BI . Tree . transformToArrayFormat ( a . children , g . id ) ) ) } return c } , arrayFormat : function ( a , b ) { if ( ! a ) return [ ] ; var c = [ ] ; if ( BI . isArray ( a ) ) for ( var d = 0 , e = a . length ; d < e ; d ++ ) { var f = a [ d ] ; f . pId = null == f . pId ? b : f . pId , c . push ( f ) , a [ d ] . children && ( c = c . concat ( BI . Tree . arrayFormat ( a [ d ] . children , f . id ) ) ) } else { var g = a ; g . pId = null == g . pId ? b : g . pId , c . push ( g ) , a . children && ( c = c . concat ( BI . Tree . arrayFormat ( a . children , g . id ) ) ) } return c } , transformToTreeFormat : function ( a ) { var b , c ; if ( ! a ) return [ ] ; if ( BI . isArray ( a ) ) { var d = [ ] , e = [ ] ; for ( b = 0 , c = a . length ; b < c ; b ++ ) { if ( BI . isNull ( a [ b ] . id ) ) return a ; e [ a [ b ] . id ] = BI . clone ( a [ b ] ) } for ( b = 0 , c = a . length ; b < c ; b ++ ) e [ a [ b ] . pId ] && a [ b ] . id !== a [ b ] . pId ? ( e [ a [ b ] . pId ] . children || ( e [ a [ b ] . pId ] . children = [ ] ) , e [ a [ b ] . pId ] . children . push ( e [ a [ b ] . id ] ) ) : d . push ( e [ a [ b ] . id ] ) , delete e [ a [ b ] . id ] . pId ; return d } return [ a ] } , treeFormat : function ( a ) { var b , c ; if ( ! a ) return [ ] ; if ( BI . isArray ( a ) ) { var d = [ ] , e = [ ] ; for ( b = 0 , c = a . length ; b < c ; b ++ ) { if ( BI . isNull ( a [ b ] . id ) ) return a ; e [ a [ b ] . id ] = a [ b ] } for ( b = 0 , c = a . length ; b < c ; b ++ ) e [ a [ b ] . pId ] && a [ b ] . id !== a [ b ] . pId ? ( e [ a [ b ] . pId ] . children || ( e [ a [ b ] . pId ] . children = [ ] ) , e [ a [ b ] . pId ] . children . push ( e [ a [ b ] . id ] ) ) : d . push ( e [ a [ b ] . id ] ) ; return d } return [ a ] } , traversal : function ( a , b ) { if ( ! BI . isNull ( a ) ) { var c = this ; BI . any ( a , function ( a , d ) { return b ( a , d ) === ! 1 || void c . traversal ( d . children , b ) } ) } } } ) } ( ) , BI . Vector = function ( a , b ) { this . x = a , this . y = b } , BI . Vector . prototype = { constructor : BI . Vector , cross : function ( a ) { return this . x * a . y - this . y * a . x } , length : function ( a ) { return Math . sqrt ( this . x * a . x + this . y * a . y ) } } , BI . Region = function ( a , b , c , d ) { this . x = a , this . y = b , this . w = c , this . h = d } , BI . Region . prototype = { constructor : BI . Region , isIntersects : function ( a ) { if ( this . isPointInside ( a . x , a . y ) || this . isPointInside ( a . x + a . w , a . y ) || this . isPointInside ( a . x , a . y + a . h ) || this . isPointInside ( a . x + a . w , a . y + a . h ) ) return ! 0 ; if ( a . isPointInside ( this . x , this . y ) || a . isPointInside ( this . x + this . w , this . y ) || a . isPointInside ( this . x , this . y + this . h ) || a . isPointInside ( this . x + this . w , this . y + this . h ) ) return ! 0 ; if ( null != a . x && null != a . y ) { var b = new BI . Vector ( this . w , this . h ) , c = new BI . Vector ( a . x - this . x , a . y - this . y ) , d = new BI . Vector ( c . x + a . w , c . y + a . h ) ; if ( b . cross ( c ) * b . cross ( d ) < 0 ) return ! 0 } return ! 1 } , isPointInside : function ( a , b ) { return null != this . x && null != this . y && ( a >= this . x && a <= this . x + this . w && b >= this . y && b <= this . y + this . h ) } , getPosition : function ( ) { var a = [ ] ; return a . push ( this . x + this . w / 2 ) , a . push ( this . y + this . h / 2 ) , a } } , BI . BehaviorFactory = { createBehavior : function ( a , b ) { var c ; switch ( a ) { case "highlight" : c = BI . HighlightBehavior ; break ; case "redmark" : c = BI . RedMarkBehavior } return new c ( b ) } } , BI . Behavior = BI . inherit ( BI . OB , { _defaultConfig : function ( ) { return BI . extend ( BI . Behavior . superclass . _defaultConfig . apply ( this , arguments ) , { rule : function ( ) { return ! 0 } } ) } , _init : function ( ) { BI . Behavior . superclass . _init . apply ( this , arguments ) } , doBehavior : function ( ) { } } ) , BI . Layout = BI . inherit ( BI . Widget , { props : function ( ) { return { scrollable : null , scrollx : ! 1 , scrolly : ! 1 , items : [ ] } } , render : function ( ) { this . _init4Margin ( ) , this . _init4Scroll ( ) } , _init4Margin : function ( ) { this . options . top && this . element . css ( "top" , this . options . top ) , this . options . left && this . element . css ( "left" , this . options . left ) , this . options . bottom && this . element . css ( "bottom" , this . options . bottom ) , this . options . right && this . element . css ( "right" , this . options . right ) } , _init4Scroll : function ( ) { switch ( this . options . scrollable ) { case ! 0 : this . element . css ( "overflow" , "auto" ) ; brea
return this . layouts [ a ] } , get : function ( a ) { return this . layerManager [ a ] } , has : function ( a ) { return null != this . layerManager [ a ] } , remove : function ( a ) { return this . has ( a ) ? ( this . layerManager [ a ] . destroy ( ) , this . layouts [ a ] . destroy ( ) , delete this . layerManager [ a ] , delete this . layouts [ a ] , this ) : this } } ) , BI . MaskersController = BI . inherit ( BI . LayerController , { _defaultConfig : function ( ) { return BI . extend ( BI . MaskersController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . MaskersController . superclass . _init . apply ( this , arguments ) , this . zindex = BI . zIndex _masker } } ) , BI . ResizeController = BI . inherit ( BI . Controller , { _defaultConfig : function ( ) { return BI . extend ( BI . ResizeController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . ResizeController . superclass . _init . apply ( this , arguments ) ; var a = this ; this . resizerManger = { } ; var b = BI . debounce ( function ( b ) { a . _resize ( b ) } , 30 ) ; $ ( window ) . resize ( b ) } , _resize : function ( a ) { BI . each ( this . resizerManger , function ( b , c ) { return c instanceof $ ? void ( c . is ( ":visible" ) && c . trigger ( "__resize__" ) ) : c instanceof BI . Layout ? void c . resize ( ) : BI . isFunction ( c ) ? void c ( a ) : void 0 } ) } , add : function ( a , b ) { var c = this ; return this . has ( a ) ? this : ( this . resizerManger [ a ] = b , function ( ) { c . remove ( a ) } ) } , get : function ( a ) { return this . resizerManger [ a ] } , has : function ( a ) { return null != this . resizerManger [ a ] } , remove : function ( a ) { return this . has ( a ) ? ( delete this . resizerManger [ a ] , this ) : this } } ) , BI . TooltipsController = BI . inherit ( BI . Controller , { _defaultConfig : function ( ) { return BI . extend ( BI . TooltipsController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _const : { height : 20 } , _init : function ( ) { BI . TooltipsController . superclass . _init . apply ( this , arguments ) , this . tooltipsManager = { } , this . showingTips = { } } , _createTooltip : function ( a , b ) { return BI . createWidget ( { type : "bi.tooltip" , text : a , level : b , stopEvent : ! 0 , height : this . _const . height } ) } , hide : function ( a , b ) { return this . has ( a ) ? ( delete this . showingTips [ a ] , this . get ( a ) . element . hide ( 0 , b ) , this . get ( a ) . invisible ( ) , this ) : this } , create : function ( a , b , c , d ) { if ( ! this . has ( a ) ) { var e = this . _createTooltip ( b , c ) ; this . add ( a , e ) , BI . createWidget ( { type : "bi.absolute" , element : d || "body" , items : [ { el : e } ] } ) , e . invisible ( ) } return this . get ( a ) } , show : function ( a , b , c , d , e , f ) { f || ( f = { } ) ; var g = this ; if ( BI . each ( this . showingTips , function ( a , b ) { g . hide ( a ) } ) , this . showingTips = { } , this . has ( b ) || this . create ( b , c , d , f . container || e ) , ! f . belowMouse ) { var h = e . element . offset ( ) , i = e . element . bounds ( ) ; if ( 0 === i . height || 0 === i . width ) return ; var j = h . top + i . height + 5 } var k = this . get ( b ) ; k . setText ( c ) , k . element . css ( { left : "0px" , top : "0px" } ) , k . visible ( ) , k . element . height ( k . element [ 0 ] . scrollHeight ) , this . showingTips [ b ] = ! 0 ; var l = ( a . pageX || a . clientX ) + 15 , m = ( a . pageY || a . clientY ) + 15 ; return l + k . element . outerWidth ( ) > $ ( "body" ) . outerWidth ( ) && ( l -= k . element . outerWidth ( ) + 15 ) , m + k . element . outerHeight ( ) > $ ( "body" ) . outerHeight ( ) ? ( m -= k . element . outerHeight ( ) + 15 , ! f . belowMouse && ( m = Math . min ( m , h . top - k . element . outerHeight ( ) - 5 ) ) ) : ! f . belowMouse && ( m = Math . max ( m , j ) ) , k . element . css ( { left : l < 0 ? 0 : l + "px" , top : m < 0 ? 0 : m + "px" } ) , k . element . hover ( function ( ) { g . remove ( b ) , e . element . trigger ( "mouseleave.title" + e . getName ( ) ) } ) , this } , add : function ( a , b ) { return this . has ( a ) ? this : ( this . set ( a , b ) , this ) } , get : function ( a ) { return this . tooltipsManager [ a ] } , set : function ( a , b ) { this . tooltipsManager [ a ] = b } , has : function ( a ) { return null != this . tooltipsManager [ a ] } , remove : function ( a ) { return this . has ( a ) ? ( this . tooltipsManager [ a ] . destroy ( ) , delete this . tooltipsManager [ a ] , this ) : this } } ) , _ . extend ( BI , { Events : { KEYDOWN : "_KEYDOWN" , BACKSPACE : "_BACKSPACE" , SPACE : "_SPACE" , ENTER : "_ENTER" , CONFIRM : "_CONFIRM" , ERROR : "_ERROR" , PAUSE : "_PAUSE" , DESTROY : "_DESTROY" , UNMOUNT : "_UNMOUNT" , CLEAR : "_CLEAR" , ADD : "_ADD" , EDITING : "_EDITING" , EMPTY : "_EMPTY" , VIEW : "_VIEW" , RESIZE : "_RESIZE" , BEFOREEDIT : "_BEFOREEDIT" , AFTEREDIT : "_AFTEREDIT" , STARTEDIT : "_STARTEDIT" , STOPEDIT : "_STOPEDIT" , CHANGE : "_CHANGE" , EXPAND : "_EXPAND" , COLLAPSE : "_COLLAPSE" , CALLBACK : "_CALLBACK" , CLICK : "_CLICK" , STATECHANGE : "_STATECHANGE" , BEFORESTATECHANGE : "_BEFORESTATECHANGE" , INIT : "_INIT" , AFTERINIT : "_AFTERINIT" , SCROLL : "_SCROLL" , STARTLOAD : "_STARTLOAD" , AFTERLOAD : "_AFTERLOAD" , BS : "beforesubmit" , AS : "aftersubmit" , SC : "submitcomplete" , SF : "submitfailure" , SS : " submitsuccess
for ( d = 0 , e = - 1 , f = 0 , k = 0 ; k < g . length ; ++ k ) if ( g [ k ] . search ( /[a-zA-Z]+/ ) != - 1 ) { var p = - 1 ; for ( l = 0 ; l < 12 ; ++ l ) if ( Date . _MN [ l ] . substr ( 0 , g [ k ] . length ) . toLowerCase ( ) == g [ k ] . toLowerCase ( ) ) { p = l ; break } p != - 1 && ( e != - 1 && ( f = e + 1 ) , e = p ) } else parseInt ( g [ k ] , 10 ) <= 12 && e == - 1 ? e = g [ k ] - 1 : parseInt ( g [ k ] , 10 ) > 31 && 0 == d ? ( d = parseInt ( g [ k ] , 10 ) , d < 100 && ( d += d > 29 ? 1900 : 2e3 ) ) : 0 == f && ( f = g [ k ] ) ; return 0 == d && ( d = c . getFullYear ( ) ) , e != - 1 && 0 != f ? Date . getDate ( d , e , f , m , n , o ) : c } , Date . getDate = function ( ) { var a , b = arguments . length , c = arguments ; switch ( b ) { case 0 : a = new Date ; break ; case 1 : a = new Date ( c [ 0 ] ) ; break ; case 2 : a = new Date ( c [ 0 ] , c [ 1 ] ) ; break ; case 3 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] ) ; break ; case 4 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] ) ; break ; case 5 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] , c [ 4 ] ) ; break ; case 6 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] , c [ 4 ] , c [ 5 ] ) ; break ; case 7 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] , c [ 4 ] , c [ 5 ] , c [ 6 ] ) ; break ; default : a = new Date } if ( BI . isNotNull ( Date . timeZone ) && ( 0 === arguments . length || 1 === arguments . length && BI . isNumber ( arguments [ 0 ] ) ) ) { var d = a . getTime ( ) , e = 6e4 * a . getTimezoneOffset ( ) , f = d + e ; return new Date ( f + Date . timeZone ) } return a } , Date . getTime = function ( ) { var a , b = arguments . length , c = arguments ; switch ( b ) { case 0 : a = new Date ; break ; case 1 : a = new Date ( c [ 0 ] ) ; break ; case 2 : a = new Date ( c [ 0 ] , c [ 1 ] ) ; break ; case 3 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] ) ; break ; case 4 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] ) ; break ; case 5 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] , c [ 4 ] ) ; break ; case 6 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] , c [ 4 ] , c [ 5 ] ) ; break ; case 7 : a = new Date ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] , c [ 4 ] , c [ 5 ] , c [ 6 ] ) ; break ; default : a = new Date } return BI . isNotNull ( Date . timeZone ) ? a . getTime ( ) - Date . timeZone - 6e4 * a . getTimezoneOffset ( ) : a . getTime ( ) } , $ . extend ( $ . Event . prototype , { stopEvent : function ( ) { this . stopPropagation ( ) , this . preventDefault ( ) } } ) , Function . prototype . before = function ( a ) { var b = this ; return function ( ) { return a . apply ( this , arguments ) !== ! 1 && b . apply ( this , arguments ) } } , Function . prototype . after = function ( a ) { var b = this ; return function ( ) { var c = b . apply ( this , arguments ) ; return c !== ! 1 && ( a . apply ( this , arguments ) , c ) } } , jQuery && ! function ( a ) { a . fn . insets || ( a . fn . insets = function ( ) { var a = this . padding ( ) , b = this . border ( ) ; return { top : a . top , bottom : a . bottom + b . bottom + b . top , left : a . left , right : a . right + b . right + b . left } } ) , a . fn . bounds || ( a . fn . bounds = function ( a ) { var b = { hasIgnoredBounds : ! 0 } ; return a ? ( isNaN ( a . x ) || ( b . left = a . x ) , isNaN ( a . y ) || ( b . top = a . y ) , null != a . width && ( b . width = a . width - ( this . outerWidth ( ! 0 ) - this . width ( ) ) , b . width = b . width >= 0 ? b . width : a . width ) , null != a . height && ( b . height = a . height - ( this . outerHeight ( ! 0 ) - this . height ( ) ) , b . height = b . height >= 0 ? b . height : a . height ) , this . css ( b ) , this ) : ( b = this . position ( ) , { x : b . left , y : b . top , width : this . outerWidth ( ) , height : this . outerHeight ( ) } ) } ) } ( jQuery ) , Number . prototype . toFixed && "0.000" === 8e-5 . toFixed ( 3 ) && "0" !== . 9. toFixed ( 0 ) && "1.25" === 1.255 . toFixed ( 2 ) && "1000000000000000128" === ( 0xde0b6b3a7640080 ) . toFixed ( 0 ) || ! function ( ) { function a ( a , b ) { for ( var c = - 1 ; ++ c < g ; ) b += a * h [ c ] , h [ c ] = b % f , b = Math . floor ( b / f ) } function b ( a ) { for ( var b = g , c = 0 ; -- b >= 0 ; ) c += h [ b ] , h [ b ] = Math . floor ( c / a ) , c = c % a * f } function c ( ) { for ( var a = g , b = "" ; -- a >= 0 ; ) if ( "" !== b || 0 === a || 0 !== h [ a ] ) { var c = String ( h [ a ] ) ; "" === b ? b = c : b += "0000000" . slice ( 0 , 7 - c . length ) + c } return b } function d ( a , b , c ) { return 0 === b ? c : b % 2 === 1 ? d ( a , b - 1 , c * a ) : d ( a * a , b / 2 , c ) } function e ( a ) { for ( var b = 0 ; a >= 4096 ; ) b += 12 , a /= 4096 ; for ( ; a >= 2 ; ) b += 1 , a /= 2 ; return b } var f , g , h ; f = 1e7 , g = 6 , h = [ 0 , 0 , 0 , 0 , 0 , 0 ] , Number . prototype . toFixed = function ( f ) { var g , h , i , j , k , l , m , n ; if ( g = Number ( f ) , g = g !== g ? 0 : Math . floor ( g ) , g < 0 || g > 20 ) throw new RangeError ( "Number.toFixed called with invalid number of decimals" ) ; if ( h = Number ( this ) , h !== h ) return "NaN" ; if ( h <= - 1e21 || h > 1e21 ) return String ( h ) ; if ( i = "" , h < 0 && ( i = "-" , h = - h ) , j = "0" , h > 1e-21 ) if ( k = e ( h * d ( 2 , 69 , 1 ) ) - 69 , l = k < 0 ? h * d ( 2 , - k , 1 ) : h / d ( 2 , k , 1 ) , l *= 4503599627370496 , k = 52 - k , k > 0 ) { for ( a ( 0 , l ) , m = g ; m >= 7 ; ) a ( 1e7 , 0 ) , m -= 7 ; for ( a ( d ( 10 , m , 1 ) , 0 ) , m = k - 1 ; m >= 23 ; ) b ( 1 << 23 ) , m -= 23 ; b ( 1 << m ) , a ( 1 , 1 ) , b ( 2 ) , j = c ( ) } else a ( 0 , l ) , a ( 1 << - k , 0 ) , j = c ( ) + "0.00000000000000000000" . slice ( 2 , 2 + g ) ; return g > 0 ? ( n = j . length , j = n <= g ? i + "0.0000000000000000000" . slice ( 0 , g - n + 2 ) + j : i + j . slice ( 0 , n - g ) + "." + j . slice ( n - g ) ) : j = i + j , j } } ( ) , Number . prototype . add = function ( a ) { return accAdd ( a , this ) } , Number . prototype . sub = function ( a ) { return accSub ( this , a ) } , Number . prototype . mul = function ( a ) { return accMul ( a , this ) } , Number . prototype . div = function
var a = this , b = document . createDocumentFragment ( ) , c = ! 1 ; BI . each ( this . _children , function ( d , e ) { e . element !== a . element && ( b . appendChild ( e . element [ 0 ] ) , c = ! 0 ) } ) , c === ! 0 && ( this . $wrapper . append ( b ) , this . element . append ( this . $wrapper ) ) } , _getWrapper : function ( ) { return this . $wrapper } , resize : function ( ) { } , populate : function ( a ) { BI . FlexHorizontalLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.flex_wrapper_horizontal" , BI . FlexHorizontalLayout ) , BI . FlexVerticalCenter = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexVerticalCenter . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-wrapper-vertical-center clearfix" , horizontalAlign : BI . HorizontalAlign . Middle , columnSize : [ ] , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . FlexVerticalCenter . superclass . render . apply ( this , arguments ) ; var a = this . options ; this . $wrapper = $ ( "<div>" ) . addClass ( "flex-wrapper-vertical-center-wrapper " + a . horizontalAlign ) , this . populate ( this . options . items ) } , _addElement : function ( a , b ) { var c = this . options , d = BI . FlexVerticalCenter . superclass . _addElement . apply ( this , arguments ) ; return d . element . css ( { position : "relative" } ) , c . vgap + c . tgap + ( b . tgap || 0 ) + ( b . vgap || 0 ) !== 0 && d . element . css ( { "margin-top" : c . vgap + c . tgap + ( b . tgap || 0 ) + ( b . vgap || 0 ) + "px" } ) , c . hgap + c . lgap + ( b . lgap || 0 ) + ( b . hgap || 0 ) !== 0 && d . element . css ( { "margin-left" : ( 0 === a ? c . hgap : 0 ) + c . lgap + ( b . lgap || 0 ) + ( b . hgap || 0 ) + "px" } ) , c . hgap + c . rgap + ( b . rgap || 0 ) + ( b . hgap || 0 ) !== 0 && d . element . css ( { "margin-right" : c . hgap + c . rgap + ( b . rgap || 0 ) + ( b . hgap || 0 ) + "px" } ) , c . vgap + c . bgap + ( b . bgap || 0 ) + ( b . vgap || 0 ) !== 0 && d . element . css ( { "margin-bottom" : c . vgap + c . bgap + ( b . bgap || 0 ) + ( b . vgap || 0 ) + "px" } ) , d } , _mountChildren : function ( ) { var a = this , b = document . createDocumentFragment ( ) , c = ! 1 ; BI . each ( this . _children , function ( d , e ) { e . element !== a . element && ( b . appendChild ( e . element [ 0 ] ) , c = ! 0 ) } ) , c === ! 0 && ( this . $wrapper . append ( b ) , this . element . append ( this . $wrapper ) ) } , _getWrapper : function ( ) { return this . $wrapper } , resize : function ( ) { } , populate : function ( a ) { BI . FlexVerticalCenter . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.flex_wrapper_vertical_center" , BI . FlexVerticalCenter ) , BI . AbsoluteLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . AbsoluteLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-absolute-layout" , hgap : null , vgap : null , lgap : null , rgap : null , tgap : null , bgap : null } ) } , render : function ( ) { BI . AbsoluteLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , _addElement : function ( a , b ) { var c = this . options , d = BI . AbsoluteLayout . superclass . _addElement . apply ( this , arguments ) , e = 0 , f = 0 , g = 0 , h = 0 ; return BI . isNotNull ( b . left ) && ( d . element . css ( { left : b . left } ) , e += b . left ) , BI . isNotNull ( b . right ) && ( d . element . css ( { right : b . right } ) , f += b . right ) , BI . isNotNull ( b . top ) && ( d . element . css ( { top : b . top } ) , g += b . top ) , BI . isNotNull ( b . bottom ) && ( d . element . css ( { bottom : b . bottom } ) , h += b . bottom ) , BI . isNotNull ( c . hgap ) && ( e += c . hgap , d . element . css ( { left : e } ) , f += c . hgap , d . element . css ( { right : f } ) ) , BI . isNotNull ( c . vgap ) && ( g += c . vgap , d . element . css ( { top : g } ) , h += c . vgap , d . element . css ( { bottom : h } ) ) , BI . isNotNull ( c . lgap ) && ( e += c . lgap , d . element . css ( { left : e } ) ) , BI . isNotNull ( c . rgap ) && ( f += c . rgap , d . element . css ( { right : f } ) ) , BI . isNotNull ( c . tgap ) && ( g += c . tgap , d . element . css ( { top : g } ) ) , BI . isNotNull ( c . bgap ) && ( h += c . bgap , d . element . css ( { bottom : h } ) ) , BI . isNotNull ( b . width ) && d . element . css ( { width : b . width } ) , BI . isNotNull ( b . height ) && d . element . css ( { height : b . height } ) , d . element . css ( { position : "absolute" } ) , d } , resize : function ( ) { this . stroke ( this . options . items ) } , stroke : function ( a ) { this . options . items = a || [ ] ; var b = this ; BI . each ( a , function ( a , c ) { if ( c ) { if ( ! BI . isWidget ( c ) && ! c . el ) throw new Error ( "el must be exist" ) ; b . _addElement ( a , c ) } } ) } , populate : function ( a ) { BI . AbsoluteLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.absolute" , BI . AbsoluteLayout ) , BI . AdaptiveLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . AdaptiveLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-adaptive-layout" , hgap : null , vgap : null , lgap : null , rgap : null , tgap : null , bgap : null } ) } , render : function ( ) { BI . AdaptiveLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , _a
} ) , d } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( a ) { BI . VerticalLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.vertical" , BI . VerticalLayout ) , BI . WindowLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . WindowLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-window-layout" , columns : 3 , rows : 2 , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , columnSize : [ 100 , "fill" , 200 ] , rowSize : [ 100 , "fill" ] , items : [ [ { el : { type : "bi.button" , text : "button1" } } , { el : { type : "bi.button" , text : "button2" } } , { el : { type : "bi.button" , text : "button3" } } ] ] } ) } , render : function ( ) { BI . WindowLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { this . stroke ( this . options . items ) } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { function b ( a , b , c ) { 0 === b && a . addClass ( "first-row" ) , 0 === c && a . addClass ( "first-col" ) , a . addClass ( BI . isOdd ( b + 1 ) ? "odd-row" : "even-row" ) , a . addClass ( BI . isOdd ( c + 1 ) ? "odd-col" : "even-col" ) , a . addClass ( "center-element" ) } function c ( a , b , c ) { var d = "" ; 0 === b && ( d += " first-row" ) , 0 === c && ( d += " first-col" ) , d += BI . isOdd ( b + 1 ) ? " odd-row" : " even-row" , d += BI . isOdd ( c + 1 ) ? " odd-col" : " even-col" , a . cls = ( a . cls || "" ) + d + " center-element" } function d ( a , d , e ) { a instanceof BI . Widget ? b ( a . element , d , e ) : a . el instanceof BI . Widget ? b ( a . el . element , d , e ) : a . el ? c ( a . el , d , e ) : c ( a , d , e ) } var e = this . options ; BI . isNumber ( e . rowSize ) && ( e . rowSize = BI . makeArray ( e . items . length , 1 / e . items . length ) ) , BI . isNumber ( e . columnSize ) && ( e . columnSize = BI . makeArray ( e . items [ 0 ] . length , 1 / e . items [ 0 ] . length ) ) ; for ( var f = 0 ; f < e . rows ; f ++ ) for ( var g = 0 ; g < e . columns ; g ++ ) { if ( ! e . items [ f ] [ g ] ) throw new Error ( "item be required" ) ; if ( ! this . hasWidget ( this . getName ( ) + f + "_" + g ) ) { var h = BI . createWidget ( e . items [ f ] [ g ] ) ; h . element . css ( { position : "absolute" } ) , this . addWidget ( this . getName ( ) + f + "_" + g , h ) } } var i = { } , j = { } , k = { } , l = { } ; i [ 0 ] = 0 , k [ 0 ] = 0 , j [ e . columns - 1 ] = 0 , l [ e . rows - 1 ] = 0 ; for ( var f = 0 ; f < e . rows ; f ++ ) { for ( var g = 0 ; g < e . columns ; g ++ ) { var m = this . getWidgetByName ( this . getName ( ) + f + "_" + g ) ; BI . isNull ( k [ f ] ) && ( k [ f ] = k [ f - 1 ] + ( e . rowSize [ f - 1 ] < 1 ? e . rowSize [ f - 1 ] : e . rowSize [ f - 1 ] + e . vgap + e . bgap ) ) ; var n = k [ f ] <= 1 ? 100 * k [ f ] + "%" : k [ f ] + e . vgap + e . tgap + "px" , o = "" ; BI . isNumber ( e . rowSize [ f ] ) && ( o = e . rowSize [ f ] <= 1 ? 100 * e . rowSize [ f ] + "%" : e . rowSize [ f ] + "px" ) , m . element . css ( { top : n , height : o } ) , d ( m , f , g ) } if ( ! BI . isNumber ( e . rowSize [ f ] ) ) break } for ( var f = e . rows - 1 ; f >= 0 ; f -- ) { for ( var g = 0 ; g < e . columns ; g ++ ) { var m = this . getWidgetByName ( this . getName ( ) + f + "_" + g ) ; BI . isNull ( l [ f ] ) && ( l [ f ] = l [ f + 1 ] + ( e . rowSize [ f + 1 ] < 1 ? e . rowSize [ f + 1 ] : e . rowSize [ f + 1 ] + e . vgap + e . tgap ) ) ; var p = l [ f ] <= 1 ? 100 * l [ f ] + "%" : l [ f ] + e . vgap + e . bgap + "px" , o = "" ; BI . isNumber ( e . rowSize [ f ] ) && ( o = e . rowSize [ f ] <= 1 ? 100 * e . rowSize [ f ] + "%" : e . rowSize [ f ] + "px" ) , m . element . css ( { bottom : p , height : o } ) , d ( m , f , g ) } if ( ! BI . isNumber ( e . rowSize [ f ] ) ) break } for ( var g = 0 ; g < e . columns ; g ++ ) { for ( var f = 0 ; f < e . rows ; f ++ ) { var m = this . getWidgetByName ( this . getName ( ) + f + "_" + g ) ; BI . isNull ( i [ g ] ) && ( i [ g ] = i [ g - 1 ] + ( e . columnSize [ g - 1 ] < 1 ? e . columnSize [ g - 1 ] : e . columnSize [ g - 1 ] + e . hgap + e . rgap ) ) ; var q = i [ g ] <= 1 ? 100 * i [ g ] + "%" : i [ g ] + e . hgap + e . lgap + "px" , h = "" ; BI . isNumber ( e . columnSize [ g ] ) && ( h = e . columnSize [ g ] <= 1 ? 100 * e . columnSize [ g ] + "%" : e . columnSize [ g ] + "px" ) , m . element . css ( { left : q , width : h } ) , d ( m , f , g ) } if ( ! BI . isNumber ( e . columnSize [ g ] ) ) break } for ( var g = e . columns - 1 ; g >= 0 ; g -- ) { for ( var f = 0 ; f < e . rows ; f ++ ) { var m = this . getWidgetByName ( this . getName ( ) + f + "_" + g ) ; BI . isNull ( j [ g ] ) && ( j [ g ] = j [ g + 1 ] + ( e . columnSize [ g + 1 ] < 1 ? e . columnSize [ g + 1 ] : e . columnSize [ g + 1 ] + e . hgap + e . lgap ) ) ; var r = j [ g ] <= 1 ? 100 * j [ g ] + "%" : j [ g ] + e . hgap + e . rgap + "px" , h = "" ; BI . isNumber ( e . columnSize [ g ] ) && ( h = e . columnSize [ g ] <= 1 ? 100 * e . columnSize [ g ] + "%" : e . columnSize [ g ] + "px" ) , m . element . css ( { right : r , width : h } ) , d ( m , f , g ) } if ( ! BI . isNumber ( e . columnSize [ g ] ) ) break } } , populate : function ( a ) { BI . WindowLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.window" , BI . WindowLayout ) , BI . CenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . CenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . CenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addIt
BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . _loading , left : 0 , right : 0 , top : 0 } ] } ) ) } , loaded : function ( ) { var a = this , b = this . options ; BI . Layers . remove ( a . getName ( ) ) , this . _loading && this . _loading . destroy ( ) , this . _loading && ( this . _loading = null ) , b . onLoaded ( ) , a . fireEvent ( BI . Pane . EVENT _LOADED ) } , check : function ( ) { this . setTipVisible ( BI . isEmpty ( this . options . items ) ) } , setTipVisible : function ( a ) { a === ! 0 ? ( this . _assertTip ( ) , this . _tipText . setVisible ( ! 0 ) ) : this . _tipText && this . _tipText . setVisible ( ! 1 ) } , populate : function ( a ) { this . options . items = a || [ ] , this . check ( ) } , empty : function ( ) { } } ) , BI . Pane . EVENT _LOADED = "EVENT_LOADED" , BI . Single = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . Single . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-single" , readonly : ! 1 , title : null , warningTitle : null , tipType : null , value : null } ) } , _showToolTip : function ( a , b ) { b || ( b = { } ) ; var c = this . getTipType ( ) || ( this . isEnabled ( ) ? "success" : "warning" ) , d = "success" === c ? this . getTitle ( ) : this . getWarningTitle ( ) || this . getTitle ( ) ; BI . isKey ( d ) && BI . Tooltips . show ( a , this . getName ( ) , d , c , this , b ) } , _hideTooltip : function ( ) { var a = this , b = BI . Tooltips . get ( this . getName ( ) ) ; BI . isNotNull ( b ) && b . element . fadeOut ( 200 , function ( ) { BI . Tooltips . remove ( a . getName ( ) ) } ) } , _init : function ( ) { BI . Single . superclass . _init . apply ( this , arguments ) ; var a = this . options ; ( BI . isKey ( a . title ) || BI . isKey ( a . warningTitle ) || BI . isFunction ( a . title ) || BI . isFunction ( a . warningTitle ) ) && this . enableHover ( ) } , enableHover : function ( a ) { a || ( a = { } ) ; var b = this ; this . _hoverBinded || ( this . element . on ( "mouseenter.title" + this . getName ( ) , function ( c ) { b . _e = c , "warning" === b . getTipType ( ) || BI . isKey ( b . getWarningTitle ( ) ) && ! b . isEnabled ( ) ? b . timeout = BI . delay ( function ( ) { b . _showToolTip ( b . _e || c , a ) } , 200 ) : ( "success" === b . getTipType ( ) || b . isEnabled ( ) ) && ( b . timeout = BI . delay ( function ( ) { b . _showToolTip ( b . _e || c , a ) } , 500 ) ) } ) , this . element . on ( "mousemove.title" + this . getName ( ) , function ( a ) { b . _e = a , b . element . _ _isMouseInBounds _ _ ( a ) || ( BI . isNotNull ( b . timeout ) && clearTimeout ( b . timeout ) , b . _hideTooltip ( ) ) } ) , this . element . on ( "mouseleave.title" + this . getName ( ) , function ( ) { b . _e = null , BI . isNotNull ( b . timeout ) && clearTimeout ( b . timeout ) , b . _hideTooltip ( ) } ) , this . _hoverBinded = ! 0 ) } , disabledHover : function ( ) { BI . isNotNull ( this . timeout ) && clearTimeout ( this . timeout ) , this . _hideTooltip ( ) , $ ( this . element ) . unbind ( "mouseenter.title" + this . getName ( ) ) . unbind ( "mousemove.title" + this . getName ( ) ) . unbind ( "mouseleave.title" + this . getName ( ) ) , this . _hoverBinded = ! 1 } , populate : function ( a ) { this . items = a || [ ] } , setTitle : function ( a , b ) { this . options . title = a , BI . isKey ( a ) ? this . enableHover ( b ) : this . disabledHover ( ) } , setWarningTitle : function ( a , b ) { this . options . warningTitle = a , BI . isKey ( a ) ? this . enableHover ( b ) : this . disabledHover ( ) } , getTipType : function ( ) { return this . options . tipType } , isReadOnly : function ( ) { return ! ! this . options . readonly } , getTitle : function ( ) { var a = this . options . title ; return BI . isFunction ( a ) ? a ( ) : a } , getWarningTitle : function ( ) { var a = this . options . warningTitle ; return BI . isFunction ( a ) ? a ( ) : a } , setValue : function ( a ) { this . options . readonly || ( this . options . value = a ) } , getValue : function ( ) { return this . options . value } } ) , BI . Text = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . Text . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-text" , textAlign : "left" , whiteSpace : "normal" , lineHeight : null , handler : null , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , text : "" , py : "" } ) } , _init : function ( ) { BI . Text . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; b . hgap + b . lgap > 0 && this . element . css ( { "padding-left" : b . hgap + b . lgap + "px" } ) , b . hgap + b . rgap > 0 && this . element . css ( { "padding-right" : b . hgap + b . rgap + "px" } ) , b . vgap + b . tgap > 0 && this . element . css ( { "padding-top" : b . vgap + b . tgap + "px" } ) , b . vgap + b . bgap > 0 && this . element . css ( { "padding-bottom" : b . vgap + b . bgap + "px" } ) , BI . isNumber ( b . height ) && this . element . css ( { lineHeight : b . height + "px" } ) , BI . isNumber ( b . lineHeight ) && this . element . css ( { lineHeight : b . lineHeight + "px" } ) , this . element . css ( { textAlign : b . textAlign , whiteSpace : b . whiteSpace } ) , b . handler ? ( this . text = BI . createWidget ( { type : "bi.layout" , tagName : "span" } ) , this . text . element . click ( function ( ) { b . handler ( a . getValue ( ) ) } ) , BI . createWid
this . _initTree ( c , b . paras . keyword ) } } ) , BI . shortcut ( "bi.part_tree" , BI . PartTree ) , BI . Resizers = new BI . ResizeController , BI . Layers = new BI . LayerController , BI . Maskers = new BI . MaskersController , BI . Bubbles = new BI . BubblesController , BI . Tooltips = new BI . TooltipsController , BI . Popovers = new BI . FloatBoxController , BI . Broadcasts = new BI . BroadcastController , BI . StyleLoaders = new BI . StyleLoaderManager , BI . Canvas = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Canvas . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-canvas" } ) } , _init : function ( ) { BI . Canvas . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = document . createElement ( "canvas" ) ; document . createElement ( "canvas" ) . getContext || ( b = window . G _vmlCanvasManager . initElement ( b ) ) , this . element . append ( b ) , b . width = a . width , b . height = a . height , $ ( b ) . width ( "100%" ) , $ ( b ) . height ( "100%" ) , this . canvas = b , this . _queue = [ ] } , mounted : function ( ) { this . stroke ( ) } , _getContext : function ( ) { return this . ctx || ( this . ctx = this . canvas . getContext ( "2d" ) ) , this . ctx } , _attr : function ( a , b ) { var c = this ; if ( ! BI . isNull ( a ) ) return BI . isObject ( a ) ? void BI . each ( a , function ( a , b ) { c . _queue . push ( { k : a , v : b } ) } ) : void this . _queue . push ( { k : a , v : b } ) } , _line : function ( a , b ) { var c = this , d = [ ] . slice . call ( arguments , 2 ) ; BI . isOdd ( d . length ) && ( this . _attr ( BI . last ( d ) ) , d = BI . initial ( d ) ) , this . _attr ( "moveTo" , [ a , b ] ) ; var e = BI . filter ( d , function ( a ) { return a % 2 === 0 } ) , f = BI . filter ( d , function ( a ) { return a % 2 !== 0 } ) ; d = BI . zip ( e , f ) , BI . each ( d , function ( a , b ) { c . _attr ( "lineTo" , b ) } ) } , line : function ( a , b , c , d ) { this . _line . apply ( this , arguments ) , this . _attr ( "stroke" , [ ] ) } , rect : function ( a , b , c , d , e ) { this . _attr ( "fillStyle" , e ) , this . _attr ( "fillRect" , [ a , b , c , d ] ) } , circle : function ( a , b , c , d ) { this . _attr ( { fillStyle : d , beginPath : [ ] , arc : [ a , b , c , 0 , 2 * Math . PI , ! 0 ] , closePath : [ ] , fill : [ ] } ) } , hollow : function ( ) { this . _attr ( "beginPath" , [ ] ) , this . _line . apply ( this , arguments ) , this . _attr ( "closePath" , [ ] ) , this . _attr ( "stroke" , [ ] ) } , solid : function ( ) { this . hollow . apply ( this , arguments ) , this . _attr ( "fill" , [ ] ) } , gradient : function ( a , b , c , d , e , f ) { var g = this . _getContext ( ) . createLinearGradient ( a , b , c , d ) ; return g . addColorStop ( 0 , e ) , g . addColorStop ( 1 , f ) , g } , reset : function ( ) { this . _getContext ( ) . clearRect ( 0 , 0 , this . canvas . width , this . canvas . height ) } , stroke : function ( ) { var a = this . _getContext ( ) ; return ! ! a && ( BI . each ( this . _queue , function ( b , c ) { BI . isFunction ( a [ c . k ] ) ? a [ c . k ] . apply ( a , c . v ) : a [ c . k ] = c . v } ) , void ( this . _queue = [ ] ) ) } } ) , BI . shortcut ( "bi.canvas" , BI . Canvas ) , BI . CollectionView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . CollectionView . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-collection" , overflowX : ! 0 , overflowY : ! 0 , cellSizeAndPositionGetter : BI . emptyFn , horizontalOverscanSize : 0 , verticalOverscanSize : 0 , scrollLeft : 0 , scrollTop : 0 , items : [ ] } ) } , _init : function ( ) { BI . CollectionView . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . renderedCells = [ ] , this . renderedKeys = [ ] , this . renderRange = { } , this . _scrollLock = ! 1 , this . _debounceRelease = BI . debounce ( function ( ) { a . _scrollLock = ! 1 } , 1e3 / 60 ) , this . container = BI . createWidget ( { type : "bi.absolute" } ) , this . element . scroll ( function ( ) { a . _scrollLock !== ! 0 && ( b . scrollLeft = a . element . scrollLeft ( ) , b . scrollTop = a . element . scrollTop ( ) , a . _calculateChildrenToRender ( ) , a . fireEvent ( BI . CollectionView . EVENT _SCROLL , { scrollLeft : b . scrollLeft , scrollTop : b . scrollTop } ) ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , scrollable : b . overflowX === ! 0 && b . overflowY === ! 0 , scrolly : b . overflowX === ! 1 && b . overflowY === ! 0 , scrollx : b . overflowX === ! 0 && b . overflowY === ! 1 , items : [ this . container ] } ) , b . items . length > 0 && ( this . _calculateSizeAndPositionData ( ) , this . _populate ( ) ) , 0 === b . scrollLeft && 0 === b . scrollTop || BI . nextTick ( function ( ) { a . element . scrollTop ( b . scrollTop ) , a . element . scrollLeft ( b . scrollLeft ) } ) } , _calculateSizeAndPositionData : function ( ) { for ( var a = this . options , b = [ ] , c = new BI . SectionManager , d = 0 , e = 0 , f = 0 , g = a . items . length ; f < g ; f ++ ) { var h = a . cellSizeAndPositionGetter ( f ) ; if ( null == h . height || isNaN ( h . height ) || null == h . width || isNaN ( h . width ) || null == h . x || isNaN ( h . x ) || null == h . y || isNaN ( h . y ) ) throw Error ( ) ; d = Math . max ( d , h . y + h . height ) , e = Math . max ( e , h . x + h . width ) , h . index = f , b [ f ] = h , c . registerCell ( h , f ) } this . _cellMetadata = b , this . _sectionManager = c , this . _height = d , t
this . count = 0 , this . count += a . length , BI . isObject ( this . next ) && ( this . hasNext ( ) ? this . next . setLoaded ( ) : this . next . invisible ( ) ) , BI . isObject ( this . prev ) && ( this . hasPrev ( ) ? this . prev . setLoaded ( ) : this . prev . invisible ( ) ) , void this . button _group . populate . apply ( this . button _group , arguments ) ) } , setNotSelectedValue : function ( ) { this . button _group . setNotSelectedValue . apply ( this . button _group , arguments ) } , getNotSelectedValue : function ( ) { return this . button _group . getNotSelectedValue ( ) } , setValue : function ( ) { this . button _group . setValue . apply ( this . button _group , arguments ) } , getValue : function ( ) { return this . button _group . getValue . apply ( this . button _group , arguments ) } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . button _group . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . button _group . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . button _group . getNotSelectedButtons ( ) } , getIndexByValue : function ( a ) { return this . button _group . getIndexByValue ( a ) } , getNodeById : function ( a ) { return this . button _group . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . button _group . getNodeByValue ( a ) } , empty : function ( ) { this . button _group . empty ( ) , BI . each ( [ this . prev , this . next ] , function ( a , b ) { b && b . setVisible ( ! 1 ) } ) } , destroy : function ( ) { BI . Loader . superclass . destroy . apply ( this , arguments ) } } ) , BI . Loader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.loader" , BI . Loader ) , BI . Navigation = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Navigation . superclass . _defaultConfig . apply ( this , arguments ) , { direction : "bottom" , logic : { dynamic : ! 1 } , single : ! 1 , showIndex : ! 1 , tab : ! 1 , cardCreator : function ( a ) { return BI . createWidget ( ) } , afterCardCreated : BI . emptyFn , afterCardShow : BI . emptyFn } ) } , render : function ( ) { var a = this , b = this . options ; this . tab = BI . createWidget ( this . options . tab , { type : "bi.button_group" } ) , this . cardMap = { } , this . showIndex = 0 , this . layout = BI . createWidget ( { type : "bi.card" } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( b . direction ) , BI . extend ( { } , b . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( b . direction , this . tab , this . layout ) } ) ) ) ) , new BI . ShowListener ( { eventObj : this . tab , cardLayout : this . layout , cardNameCreator : function ( b ) { return a . showIndex + b } , cardCreator : function ( c ) { var d = b . cardCreator ( c ) ; return a . cardMap [ c ] = d , d } , afterCardCreated : BI . bind ( this . afterCardCreated , this ) , afterCardShow : BI . bind ( this . afterCardShow , this ) } ) } , mounted : function ( ) { var a = this . options ; a . showIndex !== ! 1 && this . setSelect ( a . showIndex ) } , _deleteOtherCards : function ( a ) { var b = this , c = this . options ; c . single === ! 0 && BI . each ( this . cardMap , function ( c , d ) { c !== a + "" && ( b . layout . deleteCardByName ( c ) , delete b . cardMap [ c ] ) } ) } , afterCardCreated : function ( a ) { var b = this ; this . cardMap [ a ] . on ( BI . Controller . EVENT _CHANGE , function ( a , c , d ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . Navigation . EVENT _CHANGE , d ) } ) , this . options . afterCardCreated . apply ( this , arguments ) } , afterCardShow : function ( a ) { this . showIndex = a , this . _deleteOtherCards ( a ) , this . options . afterCardShow . apply ( this , arguments ) } , populate : function ( ) { var a = this . layout . getShowingCard ( ) ; if ( a ) return a . populate . apply ( a , arguments ) } , _assertCard : function ( a ) { if ( ! this . layout . isCardExisted ( a ) ) { var b = this . options . cardCreator ( a ) ; this . cardMap [ a ] = b , this . layout . addCardByName ( a , b ) , this . afterCardCreated ( a ) } } , setSelect : function ( a ) { this . _assertCard ( a ) , this . layout . showCardByName ( a ) , this . _deleteOtherCards ( a ) , this . showIndex !== a && ( this . showIndex = a , BI . nextTick ( BI . bind ( this . afterCardShow , this , a ) ) ) } , getSelect : function ( ) { return this . showIndex } , getSelectedCard : function ( ) { if ( BI . isKey ( this . showIndex ) ) return this . cardMap [ this . showIndex ] } , setValue : function ( a ) { var b = this . layout . getShowingCard ( ) ; b && b . setValue ( a ) } , getValue : function ( ) { var a = this . layout . getShowingCard ( ) ; if ( a ) return a . getValue ( ) } , empty : function ( ) { this . layout . deleteAllCard ( ) , this . cardMap = { } } , destroy : function ( ) { BI . Navigation . superclass . destroy . apply ( this , arguments ) } } ) , BI . Navigation . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.navigation" , BI . Navigation ) , BI . Searcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return
a . text . parentNode && a . text . parentNode . replaceChild ( a . node , a . text ) , a . node . appendChild ( a . text ) , nf && of < 8 && ( a . node . style . zIndex = 2 ) ) , a . node } function L ( a ) { var b = a . bgClass ? a . bgClass + " " + ( a . line . bgClass || "" ) : a . line . bgClass ; if ( b && ( b += " CodeMirror-linebackground" ) , a . background ) b ? a . background . className = b : ( a . background . parentNode . removeChild ( a . background ) , a . background = null ) ; else if ( b ) { var c = K ( a ) ; a . background = c . insertBefore ( Me ( "div" , null , b ) , c . firstChild ) } } function M ( a , b ) { var c = a . display . externalMeasured ; return c && c . line == b . line ? ( a . display . externalMeasured = null , b . measure = c . measure , c . built ) : Id ( a , b ) } function N ( a , b ) { var c = b . text . className , d = M ( a , b ) ; b . text == b . node && ( b . node = d . pre ) , b . text . parentNode . replaceChild ( d . pre , b . text ) , b . text = d . pre , d . bgClass != b . bgClass || d . textClass != b . textClass ? ( b . bgClass = d . bgClass , b . textClass = d . textClass , O ( b ) ) : c && ( b . text . className = c ) } function O ( a ) { L ( a ) , a . line . wrapClass ? K ( a ) . className = a . line . wrapClass : a . node != a . text && ( a . node . className = "" ) ; var b = a . textClass ? a . textClass + " " + ( a . line . textClass || "" ) : a . line . textClass ; a . text . className = b || "" } function P ( a , b , c , d ) { b . gutter && ( b . node . removeChild ( b . gutter ) , b . gutter = null ) ; var e = b . line . gutterMarkers ; if ( a . options . lineNumbers || e ) { var f = K ( b ) , g = b . gutter = Me ( "div" , null , "CodeMirror-gutter-wrapper" , "left: " + ( a . options . fixedGutter ? d . fixedPos : - d . gutterTotalWidth ) + "px; width: " + d . gutterTotalWidth + "px" ) ; if ( a . display . input . setUneditable ( g ) , f . insertBefore ( g , b . text ) , b . line . gutterClass && ( g . className += " " + b . line . gutterClass ) , ! a . options . lineNumbers || e && e [ "CodeMirror-linenumbers" ] || ( b . lineNumber = g . appendChild ( Me ( "div" , x ( a . options , c ) , "CodeMirror-linenumber CodeMirror-gutter-elt" , "left: " + d . gutterLeft [ "CodeMirror-linenumbers" ] + "px; width: " + a . display . lineNumInnerWidth + "px" ) ) ) , e ) for ( var h = 0 ; h < a . options . gutters . length ; ++ h ) { var i = a . options . gutters [ h ] , j = e . hasOwnProperty ( i ) && e [ i ] ; j && g . appendChild ( Me ( "div" , [ j ] , "CodeMirror-gutter-elt" , "left: " + d . gutterLeft [ i ] + "px; width: " + d . gutterWidth [ i ] + "px" ) ) } } } function Q ( a , b , c ) { b . alignable && ( b . alignable = null ) ; for ( var d , e = b . node . firstChild ; e ; e = d ) { var d = e . nextSibling ; "CodeMirror-linewidget" == e . className && b . node . removeChild ( e ) } S ( a , b , c ) } function R ( a , b , c , d ) { var e = M ( a , b ) ; return b . text = b . node = e . pre , e . bgClass && ( b . bgClass = e . bgClass ) , e . textClass && ( b . textClass = e . textClass ) , O ( b ) , P ( a , b , c , d ) , S ( a , b , d ) , b . node } function S ( a , b , c ) { if ( T ( a , b . line , b , c , ! 0 ) , b . rest ) for ( var d = 0 ; d < b . rest . length ; d ++ ) T ( a , b . rest [ d ] , b , c , ! 1 ) } function T ( a , b , c , d , e ) { if ( b . widgets ) for ( var f = K ( c ) , g = 0 , h = b . widgets ; g < h . length ; ++ g ) { var i = h [ g ] , j = Me ( "div" , [ i . node ] , "CodeMirror-linewidget" ) ; i . handleMouseEvents || j . setAttribute ( "cm-ignore-events" , "true" ) , U ( i , j , c , d ) , a . display . input . setUneditable ( j ) , e && i . above ? f . insertBefore ( j , c . gutter || c . text ) : f . appendChild ( j ) , te ( i , "redraw" ) } } function U ( a , b , c , d ) { if ( a . noHScroll ) { ( c . alignable || ( c . alignable = [ ] ) ) . push ( b ) ; var e = d . wrapperWidth ; b . style . left = d . fixedPos + "px" , a . coverGutter || ( e -= d . gutterTotalWidth , b . style . paddingLeft = d . gutterTotalWidth + "px" ) , b . style . width = e + "px" } a . coverGutter && ( b . style . zIndex = 5 , b . style . position = "relative" , a . noHScroll || ( b . style . marginLeft = - d . gutterTotalWidth + "px" ) ) } function V ( a ) { return Ff ( a . line , a . ch ) } function W ( a , b ) { return Gf ( a , b ) < 0 ? b : a } function X ( a , b ) { return Gf ( a , b ) < 0 ? a : b } function Y ( a ) { a . state . focused || ( a . display . input . focus ( ) , nc ( a ) ) } function Z ( a ) { return a . options . readOnly || a . doc . cantEdit } function $ ( a , b , c , d , e ) { var f = a . doc ; a . display . shift = ! 1 , d || ( d = f . sel ) ; var g = a . state . pasteIncoming || "paste" == e , h = Ug ( b ) , i = null ; g && d . ranges . length > 1 && ( Hf && Hf . join ( "\n" ) == b ? i = d . ranges . length % Hf . length == 0 && Ee ( Hf , Ug ) : h . length == d . ranges . length && ( i = Ee ( h , function ( a ) { return [ a ] } ) ) ) ; for ( var j = d . ranges . length - 1 ; j >= 0 ; j -- ) { var k = d . ranges [ j ] , l = k . from ( ) , m = k . to ( ) ; k . empty ( ) && ( c && c > 0 ? l = Ff ( l . line , l . ch - c ) : a . state . overwrite && ! g && ( m = Ff ( m . line , Math . min ( Vd ( f , m . line ) . text . length , m . ch + Ce ( h ) . length ) ) ) ) ; var n = a . curOp . updateInput , o = { from : l , to : m , text : i ? i [ j % i . length ] : h , origin : e || ( g ? "paste" : a . state . cutIncoming ? "cut" : "+input" ) } ; wc ( a . doc , o ) , te ( a , "inputRead" , a , o ) } b && ! g && aa ( a , b ) , Ic ( a ) , a . curOp . updateInput = n , a . curOp . typing = ! 0 , a . state . pasteIncoming = a . state . cutIncoming = ! 1 } function _ ( a , b ) { var c = a . clipboardData && a . clipboardData . getData ( " text / pl
var f , g , h = e . lineSpace . getBoundingClientRect ( ) ; try { f = b . clientX - h . left , g = b . clientY - h . top } catch ( b ) { return null } var i , j = pb ( a , f , g ) ; if ( d && 1 == j . xRel && ( i = Vd ( a . doc , j . line ) . text ) . length == j . ch ) { var k = Gg ( i , i . length , a . options . tabSize ) - i . length ; j = Ff ( j . line , Math . max ( 0 , Math . round ( ( f - Sa ( a . display ) . left ) / sb ( a . display ) ) - k ) ) } return j } function Ub ( a ) { var b = this , c = b . display ; if ( ! ( c . activeTouch && c . input . supportsTouch ( ) || ve ( b , a ) ) ) { if ( c . shift = a . shiftKey , Sb ( c , a ) ) return void ( pf || ( c . scroller . draggable = ! 1 , setTimeout ( function ( ) { c . scroller . draggable = ! 0 } , 100 ) ) ) ; if ( ! Zb ( b , a ) ) { var d = Tb ( b , a ) ; switch ( window . focus ( ) , se ( a ) ) { case 1 : d ? Vb ( b , a , d ) : re ( a ) == c . scroller && ug ( a ) ; break ; case 2 : pf && ( b . state . lastMiddleDown = + new Date ) , d && va ( b . doc , d ) , setTimeout ( function ( ) { c . input . focus ( ) } , 20 ) , ug ( a ) ; break ; case 3 : Cf ? pc ( b , a ) : mc ( b ) } } } } function Vb ( a , b , c ) { nf ? setTimeout ( Ie ( Y , a ) , 0 ) : a . curOp . focus = Pe ( ) ; var d , e = + new Date ; Kf && Kf . time > e - 400 && 0 == Gf ( Kf . pos , c ) ? d = "triple" : Jf && Jf . time > e - 400 && 0 == Gf ( Jf . pos , c ) ? ( d = "double" , Kf = { time : e , pos : c } ) : ( d = "single" , Jf = { time : e , pos : c } ) ; var f , g = a . doc . sel , h = yf ? b . metaKey : b . ctrlKey ; a . options . dragDrop && Tg && ! Z ( a ) && "single" == d && ( f = g . contains ( c ) ) > - 1 && ( Gf ( ( f = g . ranges [ f ] ) . from ( ) , c ) < 0 || c . xRel > 0 ) && ( Gf ( f . to ( ) , c ) > 0 || c . xRel < 0 ) ? Wb ( a , b , c , h ) : Xb ( a , b , c , d , h ) } function Wb ( a , b , c , d ) { var e = a . display , f = + new Date , g = Db ( a , function ( h ) { pf && ( e . scroller . draggable = ! 1 ) , a . state . draggingText = ! 1 , yg ( document , "mouseup" , g ) , yg ( e . scroller , "drop" , g ) , Math . abs ( b . clientX - h . clientX ) + Math . abs ( b . clientY - h . clientY ) < 10 && ( ug ( h ) , ! d && + new Date - 200 < f && va ( a . doc , c ) , pf || nf && 9 == of ? setTimeout ( function ( ) { document . body . focus ( ) , e . input . focus ( ) } , 20 ) : e . input . focus ( ) ) } ) ; pf && ( e . scroller . draggable = ! 0 ) , a . state . draggingText = g , e . scroller . dragDrop && e . scroller . dragDrop ( ) , xg ( document , "mouseup" , g ) , xg ( e . scroller , "drop" , g ) } function Xb ( a , b , c , d , e ) { function f ( b ) { if ( 0 != Gf ( q , b ) ) if ( q = b , "rect" == d ) { for ( var e = [ ] , f = a . options . tabSize , g = Gg ( Vd ( j , c . line ) . text , c . ch , f ) , h = Gg ( Vd ( j , b . line ) . text , b . ch , f ) , i = Math . min ( g , h ) , n = Math . max ( g , h ) , o = Math . min ( c . line , b . line ) , p = Math . min ( a . lastLine ( ) , Math . max ( c . line , b . line ) ) ; o <= p ; o ++ ) { var r = Vd ( j , o ) . text , s = Ae ( r , i , f ) ; i == n ? e . push ( new ma ( Ff ( o , s ) , Ff ( o , s ) ) ) : r . length > s && e . push ( new ma ( Ff ( o , s ) , Ff ( o , Ae ( r , n , f ) ) ) ) } e . length || e . push ( new ma ( c , c ) ) , Ba ( j , na ( m . ranges . slice ( 0 , l ) . concat ( e ) , l ) , { origin : "*mouse" , scroll : ! 1 } ) , a . scrollIntoView ( b ) } else { var t = k , u = t . anchor , v = b ; if ( "single" != d ) { if ( "double" == d ) var w = a . findWordAt ( b ) ; else var w = new ma ( Ff ( b . line , 0 ) , qa ( j , Ff ( b . line + 1 , 0 ) ) ) ; Gf ( w . anchor , u ) > 0 ? ( v = w . head , u = X ( t . from ( ) , w . anchor ) ) : ( v = w . anchor , u = W ( t . to ( ) , w . head ) ) } var e = m . ranges . slice ( 0 ) ; e [ l ] = new ma ( qa ( j , u ) , v ) , Ba ( j , na ( e , l ) , Eg ) } } function g ( b ) { var c = ++ s , e = Tb ( a , b , ! 0 , "rect" == d ) ; if ( e ) if ( 0 != Gf ( e , q ) ) { a . curOp . focus = Pe ( ) , f ( e ) ; var h = u ( i , j ) ; ( e . line >= h . to || e . line < h . from ) && setTimeout ( Db ( a , function ( ) { s == c && g ( b ) } ) , 150 ) } else { var k = b . clientY < r . top ? - 20 : b . clientY > r . bottom ? 20 : 0 ; k && setTimeout ( Db ( a , function ( ) { s == c && ( i . scroller . scrollTop += k , g ( b ) ) } ) , 50 ) } } function h ( a ) { s = 1 / 0 , ug ( a ) , i . input . focus ( ) , yg ( document , "mousemove" , t ) , yg ( document , "mouseup" , v ) , j . history . lastSelOrigin = null } var i = a . display , j = a . doc ; ug ( b ) ; var k , l , m = j . sel , n = m . ranges ; if ( e && ! b . shiftKey ? ( l = j . sel . contains ( c ) , k = l > - 1 ? n [ l ] : new ma ( c , c ) ) : ( k = j . sel . primary ( ) , l = j . sel . primIndex ) , b . altKey ) d = "rect" , e || ( k = new ma ( c , c ) ) , c = Tb ( a , b , ! 0 , ! 0 ) , l = - 1 ; else if ( "double" == d ) { var o = a . findWordAt ( c ) ; k = a . display . shift || j . extend ? ua ( j , k , o . anchor , o . head ) : o } else if ( "triple" == d ) { var p = new ma ( Ff ( c . line , 0 ) , qa ( j , Ff ( c . line + 1 , 0 ) ) ) ; k = a . display . shift || j . extend ? ua ( j , k , p . anchor , p . head ) : p } else k = ua ( j , k , c ) ; e ? l == - 1 ? ( l = n . length , Ba ( j , na ( n . concat ( [ k ] ) , l ) , { scroll : ! 1 , origin : "*mouse" } ) ) : n . length > 1 && n [ l ] . empty ( ) && "single" == d && ! b . shiftKey ? ( Ba ( j , na ( n . slice ( 0 , l ) . concat ( n . slice ( l + 1 ) ) , 0 ) ) , m = j . sel ) : xa ( j , l , k , Eg ) : ( l = 0 , Ba ( j , new la ( [ k ] , 0 ) , Eg ) , m = j . sel ) ; var q = c , r = i . wrapper . getBoundingClientRect ( ) , s = 0 , t = Db ( a , function ( a ) { se ( a ) ? g ( a ) : h ( a ) } ) , v = Db ( a , h ) ; xg ( document , "mousemove" , t ) , xg ( document , "mouseup" , v ) } function Yb ( a , b , c , d , e ) { try { var f = b . clientX , g = b . clientY } catch ( b ) { return ! 1 } if ( f >= Math . floor ( a . display . gutters . getBoundingClientRect ( ) . right ) ) return ! 1 ; d && ug ( b ) ; var h = a . display , i = h . lineDiv . getBoundingClientRect ( ) ; if ( g > i . bottom || ! xe ( a , c ) ) return qe ( b ) ; g -= i . top - h . viewOffset ; for ( var j = 0 ; j < a . options . gutt
d && ( r += d ) , e && ( r += e ) ; var s = Me ( "span" , [ k ] , r , g ) ; return f && ( s . title = f ) , a . content . appendChild ( s ) } a . content . appendChild ( k ) } } function Ld ( a ) { for ( var b = " " , c = 0 ; c < a . length - 2 ; ++ c ) b += c % 2 ? " " : " " ; return b += " " } function Md ( a , b ) { return function ( c , d , e , f , g , h , i ) { e = e ? e + " cm-force-border" : "cm-force-border" ; for ( var j = c . pos , k = j + d . length ; ; ) { for ( var l = 0 ; l < b . length ; l ++ ) { var m = b [ l ] ; if ( m . to > j && m . from <= j ) break } if ( m . to >= k ) return a ( c , d , e , f , g , h , i ) ; a ( c , d . slice ( 0 , m . to - j ) , e , f , null , h , i ) , f = null , d = d . slice ( m . to - j ) , j = m . to } } } function Nd ( a , b , c , d ) { var e = ! d && c . widgetNode ; e && a . map . push ( a . pos , a . pos + b , e ) , ! d && a . cm . display . input . needsContentAttribute && ( e || ( e = a . content . appendChild ( document . createElement ( "span" ) ) ) , e . setAttribute ( "cm-marker" , c . id ) ) , e && ( a . cm . display . input . setUneditable ( e ) , a . content . appendChild ( e ) ) , a . pos += b } function Od ( a , b , c ) { var d = a . markedSpans , e = a . text , f = 0 ; if ( d ) for ( var g , h , i , j , k , l , m , n = e . length , o = 0 , p = 1 , q = "" , r = 0 ; ; ) { if ( r == o ) { i = j = k = l = h = "" , m = null , r = 1 / 0 ; for ( var s = [ ] , t = 0 ; t < d . length ; ++ t ) { var u = d [ t ] , v = u . marker ; "bookmark" == v . type && u . from == o && v . widgetNode ? s . push ( v ) : u . from <= o && ( null == u . to || u . to > o || v . collapsed && u . to == o && u . from == o ) ? ( null != u . to && u . to != o && r > u . to && ( r = u . to , j = "" ) , v . className && ( i += " " + v . className ) , v . css && ( h = v . css ) , v . startStyle && u . from == o && ( k += " " + v . startStyle ) , v . endStyle && u . to == r && ( j += " " + v . endStyle ) , v . title && ! l && ( l = v . title ) , v . collapsed && ( ! m || jd ( m . marker , v ) < 0 ) && ( m = u ) ) : u . from > o && r > u . from && ( r = u . from ) } if ( m && ( m . from || 0 ) == o ) { if ( Nd ( b , ( null == m . to ? n + 1 : m . to ) - o , m . marker , null == m . from ) , null == m . to ) return ; m . to == o && ( m = ! 1 ) } if ( ! m && s . length ) for ( var t = 0 ; t < s . length ; ++ t ) Nd ( b , 0 , s [ t ] ) } if ( o >= n ) break ; for ( var w = Math . min ( n , r ) ; ; ) { if ( q ) { var x = o + q . length ; if ( ! m ) { var y = x > w ? q . slice ( 0 , w - o ) : q ; b . addToken ( b , y , g ? g + i : i , k , o + y . length == r ? j : "" , l , h ) } if ( x >= w ) { q = q . slice ( w - o ) , o = w ; break } o = x , k = "" } q = e . slice ( f , f = c [ p ++ ] ) , g = Hd ( c [ p ++ ] , b . cm . options ) } } else for ( var p = 1 ; p < c . length ; p += 2 ) b . addToken ( b , e . slice ( f , f = c [ p ] ) , Hd ( c [ p + 1 ] , b . cm . options ) ) } function Pd ( a , b ) { return 0 == b . from . ch && 0 == b . to . ch && "" == Ce ( b . text ) && ( ! a . cm || a . cm . options . wholeLineUpdateBefore ) } function Qd ( a , b , c , d ) { function e ( a ) { return c ? c [ a ] : null } function f ( a , c , e ) { xd ( a , c , e , d ) , te ( a , "change" , a , b ) } function g ( a , b ) { for ( var c = a , f = [ ] ; c < b ; ++ c ) f . push ( new ng ( j [ c ] , e ( c ) , d ) ) ; return f } var h = b . from , i = b . to , j = b . text , k = Vd ( a , h . line ) , l = Vd ( a , i . line ) , m = Ce ( j ) , n = e ( j . length - 1 ) , o = i . line - h . line ; if ( b . full ) a . insert ( 0 , g ( 0 , j . length ) ) , a . remove ( j . length , a . size - j . length ) ; else if ( Pd ( a , b ) ) { var p = g ( 0 , j . length - 1 ) ; f ( l , l . text , n ) , o && a . remove ( h . line , o ) , p . length && a . insert ( h . line , p ) } else if ( k == l ) if ( 1 == j . length ) f ( k , k . text . slice ( 0 , h . ch ) + m + k . text . slice ( i . ch ) , n ) ; else { var p = g ( 1 , j . length - 1 ) ; p . push ( new ng ( m + k . text . slice ( i . ch ) , n , d ) ) , f ( k , k . text . slice ( 0 , h . ch ) + j [ 0 ] , e ( 0 ) ) , a . insert ( h . line + 1 , p ) } else if ( 1 == j . length ) f ( k , k . text . slice ( 0 , h . ch ) + j [ 0 ] + l . text . slice ( i . ch ) , e ( 0 ) ) , a . remove ( h . line + 1 , o ) ; else { f ( k , k . text . slice ( 0 , h . ch ) + j [ 0 ] , e ( 0 ) ) , f ( l , m + l . text . slice ( i . ch ) , n ) ; var p = g ( 1 , j . length - 1 ) ; o > 1 && a . remove ( h . line + 1 , o - 1 ) , a . insert ( h . line + 1 , p ) } te ( a , "change" , a , b ) } function Rd ( a ) { this . lines = a , this . parent = null ; for ( var b = 0 , c = 0 ; b < a . length ; ++ b ) a [ b ] . parent = this , c += a [ b ] . height ; this . height = c } function Sd ( a ) { this . children = a ; for ( var b = 0 , c = 0 , d = 0 ; d < a . length ; ++ d ) { var e = a [ d ] ; b += e . chunkSize ( ) , c += e . height , e . parent = this } this . size = b , this . height = c , this . parent = null } function Td ( a , b , c ) { function d ( a , e , f ) { if ( a . linked ) for ( var g = 0 ; g < a . linked . length ; ++ g ) { var h = a . linked [ g ] ; if ( h . doc != e ) { var i = f && h . sharedHist ; c && ! i || ( b ( h . doc , i ) , d ( h . doc , a , i ) ) } } } d ( a , null , ! 0 ) } function Ud ( a , b ) { if ( b . cm ) throw new Error ( "This document is already in use." ) ; a . doc = b , b . cm = a , g ( a ) , c ( a ) , a . options . lineWrapping || m ( a ) , a . options . mode = b . modeOption , Ib ( a ) } function Vd ( a , b ) { if ( b -= a . first , b < 0 || b >= a . size ) throw new Error ( "There is no line " + ( b + a . first ) + " in the document." ) ; for ( var c = a ; ! c . lines ; ) for ( var d = 0 ; ; ++ d ) { var e = c . children [ d ] , f = e . chunkSize ( ) ; if ( b < f ) { c = e ; break } b -= f } return c . lines [ b ] } function Wd ( a , b , c ) { var d = [ ] , e = b . line ; return a . iter ( b . line , c . line + 1 , function ( a ) { var f = a . text ; e == c . line && ( f = f . slice ( 0 , c . ch ) ) , e == b . line && ( f = f . slice ( b . ch ) ) , d . push ( f ) , ++ e } ) , d } function Xd ( a , b , c , d ) { var e = [ ] ; return a . iter ( b , c , function ( a ) { var b = a . text ; d && ( b = d ( a ) ) , e . push ( b ) } ) , e } function Yd ( a , b ) { var c = b - a . height ; if ( c ) for ( var d = a ; d ; d =
pb ( this , a . left , a . top ) } , lineAtHeight : function ( a , b ) { return a = kb ( this , { top : a , left : 0 } , b || "page" ) . top , $d ( this . doc , a + this . display . viewOffset ) } , heightAtLine : function ( a , b ) { var c , d = ! 1 ; if ( "number" == typeof a ) { var e = this . doc . first + this . doc . size - 1 ; a < this . doc . first ? a = this . doc . first : a > e && ( a = e , d = ! 0 ) , c = Vd ( this . doc , a ) } else c = a ; return jb ( this , c , { top : 0 , left : 0 } , b || "page" ) . top + ( d ? this . doc . height - _d ( c ) : 0 ) } , defaultTextHeight : function ( ) { return rb ( this . display ) } , defaultCharWidth : function ( ) { return sb ( this . display ) } , setGutterMarker : Eb ( function ( a , b , c ) { return Lc ( this . doc , a , "gutter" , function ( a ) { var d = a . gutterMarkers || ( a . gutterMarkers = { } ) ; return d [ b ] = c , ! c && Ke ( d ) && ( a . gutterMarkers = null ) , ! 0 } ) } ) , clearGutter : Eb ( function ( a ) { var b = this , c = b . doc , d = c . first ; c . iter ( function ( c ) { c . gutterMarkers && c . gutterMarkers [ a ] && ( c . gutterMarkers [ a ] = null , Jb ( b , d , "gutter" ) , Ke ( c . gutterMarkers ) && ( c . gutterMarkers = null ) ) , ++ d } ) } ) , lineInfo : function ( a ) { if ( "number" == typeof a ) { if ( ! sa ( this . doc , a ) ) return null ; var b = a ; if ( a = Vd ( this . doc , a ) , ! a ) return null } else { var b = Zd ( a ) ; if ( null == b ) return null } return { line : b , handle : a , text : a . text , gutterMarkers : a . gutterMarkers , textClass : a . textClass , bgClass : a . bgClass , wrapClass : a . wrapClass , widgets : a . widgets } } , getViewport : function ( ) { return { from : this . display . viewFrom , to : this . display . viewTo } } , addWidget : function ( a , b , c , d , e ) { var f = this . display ; a = mb ( this , qa ( this . doc , a ) ) ; var g = a . bottom , h = a . left ; if ( b . style . position = "absolute" , b . setAttribute ( "cm-ignore-events" , "true" ) , this . display . input . setUneditable ( b ) , f . sizer . appendChild ( b ) , "over" == d ) g = a . top ; else if ( "above" == d || "near" == d ) { var i = Math . max ( f . wrapper . clientHeight , this . doc . height ) , j = Math . max ( f . sizer . clientWidth , f . lineSpace . clientWidth ) ; ( "above" == d || a . bottom + b . offsetHeight > i ) && a . top > b . offsetHeight ? g = a . top - b . offsetHeight : a . bottom + b . offsetHeight <= i && ( g = a . bottom ) , h + b . offsetWidth > j && ( h = j - b . offsetWidth ) } b . style . top = g + "px" , b . style . left = b . style . right = "" , "right" == e ? ( h = f . sizer . clientWidth - b . offsetWidth , b . style . right = "0px" ) : ( "left" == e ? h = 0 : "middle" == e && ( h = ( f . sizer . clientWidth - b . offsetWidth ) / 2 ) , b . style . left = h + "px" ) , c && Fc ( this , h , g , h + b . offsetWidth , g + b . offsetHeight ) } , triggerOnKeyDown : Eb ( ic ) , triggerOnKeyPress : Eb ( lc ) , triggerOnKeyUp : kc , execCommand : function ( a ) { if ( dg . hasOwnProperty ( a ) ) return dg [ a ] ( this ) } , triggerElectric : Eb ( function ( a ) { aa ( this , a ) } ) , findPosH : function ( a , b , c , d ) { var e = 1 ; b < 0 && ( e = - 1 , b = - b ) ; for ( var f = 0 , g = qa ( this . doc , a ) ; f < b && ( g = Nc ( this . doc , g , e , c , d ) , ! g . hitSide ) ; ++ f ) ; return g } , moveH : Eb ( function ( a , b ) { var c = this ; c . extendSelectionsBy ( function ( d ) { return c . display . shift || c . doc . extend || d . empty ( ) ? Nc ( c . doc , d . head , a , b , c . options . rtlMoveVisually ) : a < 0 ? d . from ( ) : d . to ( ) } , Fg ) } ) , deleteH : Eb ( function ( a , b ) { var c = this . doc . sel , d = this . doc ; c . somethingSelected ( ) ? d . replaceSelection ( "" , null , "+delete" ) : Mc ( this , function ( c ) { var e = Nc ( d , c . head , a , b , ! 1 ) ; return a < 0 ? { from : e , to : c . head } : { from : c . head , to : e } } ) } ) , findPosV : function ( a , b , c , d ) { var e = 1 , f = d ; b < 0 && ( e = - 1 , b = - b ) ; for ( var g = 0 , h = qa ( this . doc , a ) ; g < b ; ++ g ) { var i = mb ( this , h , "div" ) ; if ( null == f ? f = i . left : i . left = f , h = Oc ( this , i , e , c ) , h . hitSide ) break } return h } , moveV : Eb ( function ( a , b ) { var c = this , d = this . doc , e = [ ] , f = ! c . display . shift && ! d . extend && d . sel . somethingSelected ( ) ; if ( d . extendSelectionsBy ( function ( g ) { if ( f ) return a < 0 ? g . from ( ) : g . to ( ) ; var h = mb ( c , g . head , "div" ) ; null != g . goalColumn && ( h . left = g . goalColumn ) , e . push ( h . left ) ; var i = Oc ( c , h , a , b ) ; return "page" == b && g == d . sel . primary ( ) && Hc ( c , null , lb ( c , i , "div" ) . top - h . top ) , i } , Fg ) , e . length ) for ( var g = 0 ; g < d . sel . ranges . length ; g ++ ) d . sel . ranges [ g ] . goalColumn = e [ g ] } ) , findWordAt : function ( a ) { var b = this . doc , c = Vd ( b , a . line ) . text , d = a . ch , e = a . ch ; if ( c ) { var f = this . getHelper ( a , "wordChars" ) ; ( a . xRel < 0 || e == c . length ) && d ? -- d : ++ e ; for ( var g = c . charAt ( d ) , h = Je ( g , f ) ? function ( a ) { return Je ( a , f ) } : /\s/ . test ( g ) ? function ( a ) { return /\s/ . test ( a ) } : function ( a ) { return ! /\s/ . test ( a ) && ! Je ( a ) } ; d > 0 && h ( c . charAt ( d - 1 ) ) ; ) -- d ; for ( ; e < c . length && h ( c . charAt ( e ) ) ; ) ++ e } return new ma ( Ff ( a . line , d ) , Ff ( a . line , e ) ) } , toggleOverwrite : function ( a ) { null != a && a == this . state . overwrite || ( ( this . state . overwrite = ! this . state . overwrite ) ? Rg ( this . display . cursorDiv , "CodeMirror-overwrite" ) : Qg ( this . display . cursorDiv , "CodeMirror-overwrite" ) , zg ( this , "overwriteToggle" , this , this . state . overwrite ) ) } , hasFocus :
} ) , a } , posFromIndex : function ( a ) { var b , c = this . first ; return this . iter ( function ( d ) { var e = d . text . length + 1 ; return e > a ? ( b = a , ! 0 ) : ( a -= e , void ++ c ) } ) , qa ( this , Ff ( c , b ) ) } , indexFromPos : function ( a ) { a = qa ( this , a ) ; var b = a . ch ; return a . line < this . first || a . ch < 0 ? 0 : ( this . iter ( this . first , a . line , function ( a ) { b += a . text . length + 1 } ) , b ) } , copy : function ( a ) { var b = new rg ( Xd ( this , this . first , this . first + this . size ) , this . modeOption , this . first ) ; return b . scrollTop = this . scrollTop , b . scrollLeft = this . scrollLeft , b . sel = this . sel , b . extend = ! 1 , a && ( b . history . undoDepth = this . history . undoDepth , b . setHistory ( this . getHistory ( ) ) ) , b } , linkedDoc : function ( a ) { a || ( a = { } ) ; var b = this . first , c = this . first + this . size ; null != a . from && a . from > b && ( b = a . from ) , null != a . to && a . to < c && ( c = a . to ) ; var d = new rg ( Xd ( this , b , c ) , a . mode || this . modeOption , b ) ; return a . sharedHist && ( d . history = this . history ) , ( this . linked || ( this . linked = [ ] ) ) . push ( { doc : d , sharedHist : a . sharedHist } ) , d . linked = [ { doc : this , isParent : ! 0 , sharedHist : a . sharedHist } ] , Vc ( d , Uc ( this ) ) , d } , unlinkDoc : function ( b ) { if ( b instanceof a && ( b = b . doc ) , this . linked ) for ( var c = 0 ; c < this . linked . length ; ++ c ) { var d = this . linked [ c ] ; if ( d . doc == b ) { this . linked . splice ( c , 1 ) , b . unlinkDoc ( this ) , Wc ( Uc ( this ) ) ; break } } if ( b . history == this . history ) { var e = [ b . id ] ; Td ( b , function ( a ) { e . push ( a . id ) } , ! 0 ) , b . history = new be ( null ) , b . history . done = me ( this . history . done , e ) , b . history . undone = me ( this . history . undone , e ) } } , iterLinkedDocs : function ( a ) { Td ( this , a ) } , getMode : function ( ) { return this . mode } , getEditor : function ( ) { return this . cm } } ) , rg . prototype . eachLine = rg . prototype . iter ; var sg = "iter insert remove copy getEditor constructor" . split ( " " ) ; for ( var tg in rg . prototype ) rg . prototype . hasOwnProperty ( tg ) && De ( sg , tg ) < 0 && ( a . prototype [ tg ] = function ( a ) { return function ( ) { return a . apply ( this . doc , arguments ) } } ( rg . prototype [ tg ] ) ) ; ye ( rg ) ; var ug = a . e _preventDefault = function ( a ) { a . preventDefault ? a . preventDefault ( ) : a . returnValue = ! 1 } , vg = a . e _stopPropagation = function ( a ) { a . stopPropagation ? a . stopPropagation ( ) : a . cancelBubble = ! 0 } , wg = a . e _stop = function ( a ) { ug ( a ) , vg ( a ) } , xg = a . on = function ( a , b , c ) { if ( a . addEventListener ) a . addEventListener ( b , c , ! 1 ) ; else if ( a . attachEvent ) a . attachEvent ( "on" + b , c ) ; else { var d = a . _handlers || ( a . _handlers = { } ) , e = d [ b ] || ( d [ b ] = [ ] ) ; e . push ( c ) } } , yg = a . off = function ( a , b , c ) { if ( a . removeEventListener ) a . removeEventListener ( b , c , ! 1 ) ; else if ( a . detachEvent ) a . detachEvent ( "on" + b , c ) ; else { var d = a . _handlers && a . _handlers [ b ] ; if ( ! d ) return ; for ( var e = 0 ; e < d . length ; ++ e ) if ( d [ e ] == c ) { d . splice ( e , 1 ) ; break } } } , zg = a . signal = function ( a , b ) { var c = a . _handlers && a . _handlers [ b ] ; if ( c ) for ( var d = Array . prototype . slice . call ( arguments , 2 ) , e = 0 ; e < c . length ; ++ e ) c [ e ] . apply ( null , d ) } , Ag = null , Bg = 30 , Cg = a . Pass = { toString : function ( ) { return "CodeMirror.Pass" } } , Dg = { scroll : ! 1 } , Eg = { origin : "*mouse" } , Fg = { origin : "+move" } ; ze . prototype . set = function ( a , b ) { clearTimeout ( this . id ) , this . id = setTimeout ( b , a ) } ; var Gg = a . countColumn = function ( a , b , c , d , e ) { null == b && ( b = a . search ( /[^\s\u00a0]/ ) , b == - 1 && ( b = a . length ) ) ; for ( var f = d || 0 , g = e || 0 ; ; ) { var h = a . indexOf ( "\t" , f ) ; if ( h < 0 || h >= b ) return g + ( b - f ) ; g += h - f , g += c - g % c , f = h + 1 } } , Hg = [ "" ] , Ig = function ( a ) { a . select ( ) } ; wf ? Ig = function ( a ) { a . selectionStart = 0 , a . selectionEnd = a . value . length } : nf && ( Ig = function ( a ) { try { a . select ( ) } catch ( b ) { } } ) ; var Jg , Kg = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/ , Lg = a . isWordChar = function ( a ) { return /\w/ . test ( a ) || a > " " && ( a . toUpperCase ( ) != a . toLowerCase ( ) || Kg . test ( a ) ) } , Mg = / [ \ u 0 3 0 0 - \ u 0 3 6 f \ u 0 4 8 3 - \ u 0 4 8 9 \ u 0 5 9 1 - \ u 0 5 b d \ u 0 5 b f \ u 0 5 c 1 \ u 0 5 c 2 \ u 0 5 c 4 \ u 0 5 c 5 \ u 0 5 c 7 \ u 0 6 1 0 - \ u 0 6 1 a \ u 0 6 4 b - \ u 0 6 5 e \ u 0 6 7 0 \ u 0 6 d 6 - \ u 0 6 d c \ u 0 6 d e - \ u 0 6 e 4 \ u 0 6 e 7 \ u 0 6 e 8 \ u 0 6 e a - \ u 0 6 e d \ u 0 7 1 1 \ u 0 7 3 0 - \ u 0 7 4 a \ u 0 7 a 6 - \ u 0 7 b 0 \ u 0 7 e b - \ u 0 7 f 3 \ u 0 8 1 6 - \ u 0 8 1 9 \ u 0 8 1 b - \ u 0 8 2 3 \ u 0 8 2 5 - \ u 0 8 2 7 \ u 0 8 2 9 - \ u 0 8 2 d \ u 0 9 0 0 - \ u 0 9 0 2 \ u 0 9 3 c \ u 0 9 4 1 - \ u 0 9 4 8 \ u 0 9 4 d \ u 0 9 5 1 - \ u 0 9 5 5 \ u 0 9 6 2 \ u 0 9 6 3 \ u 0 9 8 1 \ u 0 9 b c \ u 0 9 b e \ u 0 9 c 1 - \ u 0 9 c 4 \ u 0 9 c d \ u 0 9 d 7 \ u 0 9 e 2 \ u 0 9 e 3 \ u 0 a 0 1 \ u 0 a 0 2 \ u 0 a 3 c \ u 0 a 4 1 \ u 0 a 4 2 \ u 0 a 4 7 \ u 0 a 4 8 \ u 0 a 4 b - \ u 0 a 4 d \ u 0 a 5 1 \ u 0 a 7 0 \ u 0 a 7 1 \ u 0 a 7 5 \ u 0 a 8 1 \ u 0 a 8 2 \ u 0 a b c \ u 0 a c 1 - \ u 0 a c 5 \ u 0 a c 7 \ u 0 a c 8 \ u 0 a c d \ u 0 a e 2 \ u 0 a e 3 \ u 0 b 0 1 \ u 0 b 3 c \ u 0 b 3 e \ u 0 b 3 f \ u 0 b 4 1 - \ u 0 b 4 4 \ u 0 b 4 d \ u 0 b 5 6 \ u 0 b 5 7 \ u 0 b 6 2 \ u 0 b 6 3 \ u 0 b 8 2 \ u 0 b b e \ u 0 b c 0 \ u 0 b c d \ u 0 b d 7 \ u 0 c 3 e - \ u 0 c 4 0 \ u 0 c 4 6 - \ u 0 c 4 8 \ u 0 c 4 a - \ u 0 c 4 d \ u 0 c 5 5 \ u 0 c 5 6 \ u 0 c 6 2 \ u 0 c 6 3 \ u 0 c b c \ u 0 c b f \ u 0 c c 2 \ u 0 c c 6 \ u 0 c c c \ u 0 c c d \ u 0 c d 5 \ u 0 c d 6 \ u 0 c e 2 \ u 0 c e 3 \ u 0 d 3 e \ u 0 d 4 1 - \ u 0 d 4 4 \ u 0 d 4 d \ u 0 d 5 7 \
this . _debounceRelease ( ) , this . _calculateChildrenToRender ( ) , this . element . scrollTop ( this . options . scrollTop ) ) } , setColumnCount : function ( a ) { this . options . columnCount = a } , setRowCount : function ( a ) { this . options . rowCount = a } , setOverflowX : function ( a ) { var b = this ; this . options . overflowX !== ! ! a && ( this . options . overflowX = ! ! a , BI . nextTick ( function ( ) { b . element . css ( { overflowX : a ? "auto" : "hidden" } ) } ) ) } , setOverflowY : function ( a ) { var b = this ; this . options . overflowY !== ! ! a && ( this . options . overflowY = ! ! a , BI . nextTick ( function ( ) { b . element . css ( { overflowY : a ? "auto" : "hidden" } ) } ) ) } , getScrollLeft : function ( ) { return this . options . scrollLeft } , getScrollTop : function ( ) { return this . options . scrollTop } , getMaxScrollLeft : function ( ) { return this . _getMaxScrollLeft ( ) } , getMaxScrollTop : function ( ) { return this . _getMaxScrollTop ( ) } , setEstimatedColumnSize : function ( a ) { this . options . estimatedColumnSize = a } , setEstimatedRowSize : function ( a ) { this . options . estimatedRowSize = a } , _reRange : function ( ) { this . renderRange = { } } , _clearChildren : function ( ) { this . container . _children = { } , this . container . attr ( "items" , [ ] ) } , restore : function ( ) { BI . each ( this . renderedCells , function ( a , b ) { b . el . _destroy ( ) } ) , this . _clearChildren ( ) , this . renderedCells = [ ] , this . renderedKeys = [ ] , this . renderRange = { } , this . _scrollLock = ! 1 } , populate : function ( a ) { a && a !== this . options . items && this . restore ( ) , this . _populate ( a ) } } ) , BI . GridView . EVENT _SCROLL = "EVENT_SCROLL" , BI . shortcut ( "bi.grid_view" , BI . GridView ) , BI . FloatBox = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . FloatBox . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-float-box bi-card" , width : 600 , height : 500 } ) } , _init : function ( ) { BI . FloatBox . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . showAction = new BI . ShowAction ( { tar : this } ) , this . _center = BI . createWidget ( ) , this . _north = BI . createWidget ( ) , this . element . draggable && this . element . draggable ( { handle : ".bi-message-title" , drag : function ( a , c ) { var d = $ ( "body" ) . width ( ) , e = $ ( "body" ) . height ( ) ; c . position . left + b . width > d && ( c . position . left = d - b . width ) , c . position . top + b . height > e && ( c . position . top = e - b . height ) , c . position . left < 0 && ( c . position . left = 0 ) , c . position . top < 0 && ( c . position . top = 0 ) , BI . Resizers . _resize ( ) } } ) , this . _south = BI . createWidget ( ) , BI . createWidget ( { type : "bi.border" , element : this , items : { north : { el : { type : "bi.border" , cls : "bi-message-title bi-background" , items : { center : { el : { type : "bi.absolute" , items : [ { el : this . _north , left : 10 , top : 0 , right : 0 , bottom : 0 } ] } } , east : { el : { type : "bi.icon_button" , cls : "bi-message-close close-font" , height : 36 , handler : function ( ) { a . currentSectionProvider . close ( ) } } , width : 60 } } } , height : 36 } , center : { el : { type : "bi.absolute" , items : [ { el : this . _center , left : 20 , top : 20 , right : 20 , bottom : 0 } ] } } , south : { el : { type : "bi.absolute" , items : [ { el : this . _south , left : 20 , top : 0 , right : 20 , bottom : 0 } ] } , height : 60 } } } ) } , populate : function ( a ) { var b = this ; this . currentSectionProvider && this . currentSectionProvider !== a && this . currentSectionProvider . destroy ( ) , this . currentSectionProvider = a , a . rebuildNorth ( this . _north ) , a . rebuildCenter ( this . _center ) , a . rebuildSouth ( this . _south ) , a . on ( BI . PopoverSection . EVENT _CLOSE , function ( ) { b . close ( ) } ) } , show : function ( ) { this . showAction . actionPerformed ( ) } , hide : function ( ) { this . showAction . actionBack ( ) } , open : function ( ) { this . show ( ) , this . fireEvent ( BI . FloatBox . EVENT _FLOAT _BOX _OPEN ) } , close : function ( ) { this . hide ( ) , this . fireEvent ( BI . FloatBox . EVENT _FLOAT _BOX _CLOSED ) } , setZindex : function ( a ) { this . element . css ( { "z-index" : a } ) } , destroyed : function ( ) { this . currentSectionProvider && this . currentSectionProvider . destroy ( ) } } ) , BI . shortcut ( "bi.float_box" , BI . FloatBox ) , BI . FloatBox . EVENT _FLOAT _BOX _CLOSED = "EVENT_FLOAT_BOX_CLOSED" , BI . FloatBox . EVENT _FLOAT _BOX _OPEN = "EVENT_FLOAT_BOX_CLOSED" , BI . PopupView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . PopupView . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-popup-view" , maxWidth : "auto" , minWidth : 100 , minHeight : 25 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , vgap : 0 , hgap : 0 , direction : BI . Direction . Top , stopEvent : ! 1 , stopPropagation : ! 1 , logic : { dynamic : ! 0 } , tool : ! 1 , tabs : [ ] , buttons : [ ] , el : { type : "bi.button_group" , items : [ ] , chooseType : 0 , behaviors : { } , layouts : [ { type : "bi.vertical" } ] } } ) } , _init : function ( ) { BI . PopupView . superclass . _init . apply ( t
} } ) , BI . BlankIconTextItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.blank_icon_text_item" , BI . BlankIconTextItem ) , BI . IconTextIconItem = BI . inherit ( BI . BasicButton , { _const : { commonWidth : 25 } , _defaultConfig : function ( ) { var a = BI . IconTextIconItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-icon-text-icon-item" , logic : { dynamic : ! 1 } , iconCls1 : "close-ha-font" , iconCls2 : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextIconItem . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , hgap : a . textHgap , vgap : a . textVgap , lgap : a . textLgap , rgap : a . textRgap , text : a . text , value : a . value , keyword : a . keyword , height : a . height } ) ; var c = BI . createWidget ( { type : "bi.center_adapt" , cls : a . iconCls1 , width : b . commonWidth , height : a . height , items : [ { el : { type : "bi.icon" , width : a . iconWidth , height : a . iconHeight } } ] } ) , d = BI . createWidget ( { type : "bi.layout" , width : b . commonWidth } ) ; BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.center_adapt" , cls : a . iconCls2 , width : b . commonWidth , items : [ { el : { type : "bi.icon" , width : a . iconWidth , height : a . iconHeight } } ] } , top : 0 , bottom : 0 , right : 0 } ] } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( a . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , c , this . text , d ) } ) ) ) ) } , doClick : function ( ) { BI . IconTextIconItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextIconItem . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } } ) , BI . IconTextIconItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_icon_item" , BI . IconTextIconItem ) , BI . IconTextItem = BI . inherit ( BI . BasicButton , { _const : { commonWidth : 25 } , _defaultConfig : function ( ) { var a = BI . IconTextItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-icon-text-item" , direction : BI . Direction . Left , logic : { dynamic : ! 1 } , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextItem . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , hgap : a . textHgap , vgap : a . textVgap , lgap : a . textLgap , rgap : a . textRgap , text : a . text , value : a . value , keyword : a . keyword , height : a . height } ) , this . icon = BI . createWidget ( { type : "bi.center_adapt" , width : b . commonWidth , height : a . height , items : [ { el : { type : "bi.icon" , width : a . iconWidth , height : a . iconHeight } } ] } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( a . direction ) , BI . extend ( a . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( a . direction , this . icon , this . text ) } ) ) ) ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } , doClick : function ( ) { BI . IconTextItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextItem . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } } ) , BI . IconTextItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_item" , BI . IconTextItem ) , BI . TextIconItem = BI . inherit ( BI . Basic
return function ( c ) { isFunction ( a [ b ] ) && a [ b ] ( c , e ) } } ( split [ g ] ) , ! 1 ) ; if ( f . addEventListener ( "load" , function ( b ) { a . onreadystatechange === ! 1 ? isFunction ( a . onload ) && a . onload ( b , e ) : setTimeout ( function ( ) { 4 === e . readyState ? isFunction ( a . onload ) && a . onload ( b , e ) : setTimeout ( arguments . callee , 15 ) } , 15 ) } , ! 1 ) , e . open ( "post" , a . url + "&filename=" + window . encodeURIComponent ( a . file . fileName ) , ! 0 ) , e . upload ) e . onreadystatechange = function ( ) { switch ( e . readyState ) { case 4 : var b = BI . jsonDecode ( e . responseText ) ; a . file . type . indexOf ( "image" ) != - 1 && ( b . attach _type = "image" ) , b . filename = a . file . fileName , 1 == a . maxlength ? a . attach _array [ 0 ] = b : a . attach _array . push ( b ) } } , f . onloadstart ( ) ; else { var h = { loaded : 0 , total : a . file . fileSize || a . file . size , simulation : ! 0 } ; h . interval = setInterval ( function ( ) { h . loaded += 256 , h . total <= h . loaded && ( h . loaded = h . total ) , f . onprogress ( h ) } , 100 ) , e . onabort = function ( ) { f . onabort ( { } ) } , e . onerror = function ( ) { f . onerror ( { } ) } , e . onreadystatechange = function ( ) { switch ( e . readyState ) { case 2 : case 3 : h . total <= h . loaded && ( h . loaded = h . total ) , f . onprogress ( h ) ; break ; case 4 : if ( clearInterval ( h . interval ) , h . interval = 0 , h . loaded = h . total , f . onprogress ( h ) , 199 < e . status && e . status < 400 ) { f . onload ( { } ) ; var b = BI . jsonDecode ( e . responseText ) ; b . filename = a . file . fileName , a . file . type . indexOf ( "image" ) != - 1 && ( b . attach _type = "image" ) , a . attach _array . push ( b ) } else f . onerror ( { } ) } } , f . onloadstart ( h ) } var i = "AjaxUploadBoundary" + ( new Date ) . getTime ( ) ; if ( e . setRequestHeader ( "Content-Type" , "multipart/form-data; boundary=" + i ) , a . file . getAsBinary ) e [ e . sendAsBinary ? "sendAsBinary" : "send" ] ( multipart ( i , a . name , a . file ) ) ; else { e . setRequestHeader ( "Content-Type" , "multipart/form-data" ) ; var j = new FormData ; j . append ( "FileData" , a . file ) , e . send ( j ) } return a } : function ( handler , maxSize , width , height ) { var url = handler . url . concat ( - 1 === handler . url . indexOf ( "?" ) ? "?" : "&" , "AjaxUploadFrame=true" ) , rpe = { loaded : 1 , total : 100 , simulation : ! 0 , interval : setInterval ( function ( ) { rpe . loaded < rpe . total && ++ rpe . loaded , isFunction ( handler . onprogress ) && handler . onprogress ( rpe , { } ) } , 100 ) } , onload = function ( ) { iframe . onreadystatechange = iframe . onload = iframe . onerror = null , form . parentNode . removeChild ( form ) , form = null , clearInterval ( rpe . interval ) ; try { var a = ( iframe . contentWindow . document || iframe . contentWindow . contentDocument ) . body . innerHTML , b = BI . jsonDecode ( a ) ; handler . file . type . indexOf ( "image" ) != - 1 && ( b . attach _type = "image" ) , b . filename = BI . cjkDecode ( handler . file . fileName ) , 1 == handler . maxlength ? handler . attach _array [ 0 ] = b : handler . attach _array . push ( b ) } catch ( c ) { isFunction ( handler . onerror ) && handler . onerror ( rpe , event || window . event ) } isFunction ( handler . onload ) && handler . onload ( rpe , { responseText : a } ) } , target = [ "AjaxUpload" , ( new Date ) . getTime ( ) , String ( Math . random ( ) ) . substring ( 2 ) ] . join ( "_" ) ; try { var form = document . createElement ( '<form enctype="multipart/form-data"></form>' ) , iframe = handler . iframe || ( handler . iframe = document . createElement ( '<iframe id="' + target + '" name="' + target + '" src="' + url + '"></iframe>' ) ) } catch ( e ) { var form = document . createElement ( "form" ) , iframe = handler . iframe || ( handler . iframe = document . createElement ( "iframe" ) ) ; form . setAttribute ( "enctype" , "multipart/form-data" ) , iframe . setAttribute ( "name" , iframe . id = target ) , iframe . setAttribute ( "src" , url ) } with ( iframe . style . position = "absolute" , iframe . style . left = iframe . style . top = "-10000px" , iframe . onload = onload , iframe . onerror = function ( a ) { isFunction ( handler . onerror ) && handler . onerror ( rpe , a || window . event ) } , iframe . onreadystatechange = function ( ) { /loaded|complete/i . test ( iframe . readyState ) ? onload ( ) : isFunction ( handler . onloadprogress ) && ( rpe . loaded < rpe . total && ++ rpe . loaded , handler . onloadprogress ( rpe , { readyState : { loading : 2 , interactive : 3 , loaded : 4 , complete : 4 } [ iframe . readyState ] || 1 } ) ) } , form . setAttribute ( "action" , handler . url ) , form . setAttribute ( "target" , iframe . id ) , form . setAttribute ( "method" , "post" ) , form . appendChild ( handler . file ) , form . style . display = "none" , isFunction ( handler . onloadstart ) && handler . onloadstart ( rpe , { } ) , document . body || document . documentElement ) appendChild ( iframe ) , appendChild ( form ) , form . submit ( ) ; return handler } , xhr = null , sendFile } ( Object . prototype . toString ) , sendFiles = function ( a , b , c , d ) { var e = a . files . length , f = a . onload , g = a . onloadstart ; for ( a . current = 0 , a . total = 0 , a . sent = 0 ; a . current < e ; ) a . total += a . files [ a .
} function e ( a ) { return function ( b , c ) { for ( var e , f = ! 1 ; null != ( e = b . next ( ) ) ; ) { if ( e == a && ! f ) { c . tokenize = d ; break } f = ! f && "\\" == e } return "string" } } function f ( a ) { return function ( b , c ) { var e = b . match ( /^.*?(\/\*|\*\/)/ ) ; return e ? "/*" == e [ 1 ] ? c . tokenize = f ( a + 1 ) : a > 1 ? c . tokenize = f ( a - 1 ) : c . tokenize = d : b . skipToEnd ( ) , "comment" } } function g ( a , b , c ) { b . context = { prev : b . context , indent : a . indentation ( ) , col : a . column ( ) , type : c } } function h ( a ) { a . indent = a . context . indent , a . context = a . context . prev } var i = c . client || { } , j = c . atoms || { "false" : ! 0 , "true" : ! 0 , "null" : ! 0 } , k = c . builtin || { } , l = c . keywords || { } , m = c . operatorChars || /^[*+\-%<>!=&|~^]/ , n = c . support || { } , o = c . hooks || { } , p = c . dateSQL || { date : ! 0 , time : ! 0 , timestamp : ! 0 } , q = c . functions || { } ; return { startState : function ( ) { return { tokenize : d , context : null } } , token : function ( a , b ) { if ( a . sol ( ) && b . context && null == b . context . align && ( b . context . align = ! 1 ) , b . tokenize == d && a . eatSpace ( ) ) return null ; var c = b . tokenize ( a , b ) ; if ( "comment" == c ) return c ; b . context && null == b . context . align && ( b . context . align = ! 0 ) ; var e = a . current ( ) ; return "(" == e ? g ( a , b , ")" ) : "[" == e ? g ( a , b , "]" ) : b . context && b . context . type == e && h ( b ) , c } , indent : function ( c , d ) { var e = c . context ; if ( ! e ) return a . Pass ; var f = d . charAt ( 0 ) == e . type ; return e . align ? e . col + ( f ? 0 : 1 ) : e . indent + ( f ? 0 : b . indentUnit ) } , blockCommentStart : "/*" , blockCommentEnd : "*/" , lineComment : n . commentSlashSlash ? "//" : n . commentHash ? "#" : "--" } } ) , function ( ) { function b ( a ) { for ( var b = { } , c = a . split ( " " ) , d = 0 ; d < c . length ; ++ d ) b [ c [ d ] ] = ! 0 ; return b } var c = "alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit " ; a . defineMIME ( "text/x-sql" , { name : "sql" , keywords : b ( c + "begin" ) , builtin : b ( "bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric" ) , atoms : b ( "false true null unknown" ) , operatorChars : /^[*+\-%<>!=]/ , dateSQL : b ( "date time timestamp" ) , support : b ( "ODBCdotTable doubleQuote binaryNumber hexNumber" ) , functions : BI . makeObject ( BI . FormulaCollections , ! 0 ) } ) } ( ) } ) , BI . SQLEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return $ . extend ( BI . CodeEditor . superclass . _defaultConfig . apply ( ) , { baseCls : "bi-sql-editor" , value : "" , lineHeight : 2 , showHint : ! 0 , supportFunction : ! 1 , supportParam : ! 1 } ) } , _init : function ( ) { BI . CodeEditor . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this ; this . editor = CodeMirror ( this . element [ 0 ] , { mode : "text/x-sql" , textWrapping : ! 0 , lineWrapping : ! 0 , lineNumbers : ! 1 } ) , 1 === a . lineHeight ? this . element . addClass ( "codemirror-low-line-height" ) : this . element . addClass ( "codemirror-high-line-height" ) , this . editor . on ( "change" , function ( c , d ) { b . _checkWaterMark ( ) , a . showHint && CodeMirror . showHint ( c , CodeMirror . sqlHint , { completeSingle : ! 1 , supportFunction : a . supportFunction } ) , BI . nextTick ( function ( ) { b . fireEvent ( BI . FormulaEditor . EVENT _CHANGE ) } ) } ) , this . editor . on ( "focus" , function ( ) { b . _checkWaterMark ( ) , b . fireEvent ( BI . FormulaEditor . EVENT _FOCUS ) } ) , this . editor . on ( "blur" , function ( ) { b . fireEvent ( BI . FormulaEditor . EVENT _BLUR ) } ) , this . watermark = BI . createWidget ( { type : "bi.label" , text : BI . i18nText ( "Please_Enter_SQL" ) , cls : "bi-water-mark" , whiteSpace : "nowrap" , textAlign : "left" } ) , this . watermark . element . bind ( "mousedown" , function ( a ) { b . insertString ( "" ) , b . editor . focus ( ) , a . stopEvent ( ) } ) , this . watermark . element . bind ( "click" , function ( a ) { b . editor . focus ( ) , a . stopEvent ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . watermark , top : 0 , left : 5 } ] } ) , BI . isKey ( a . value ) && BI . nextTick ( function ( ) { b . setValue ( a . value ) } ) } , insertString : function ( a ) { this . editor . replaceSelection ( a ) , this . editor . focus ( ) } , insertParam : function ( a ) { var b = a , c = this . editor . getCursor ( ) ; this . editor . replaceSelection ( a ) ; var d = this . editor . getCursor ( ) , e = { className : "param" , atomic : ! 0 } ; e . value = b , this . editor . markText ( c , d , e ) , this . editor . replaceSelection ( " " ) , this . editor . focus ( ) } , _checkWaterMark : function ( ) { var a = this . options ; ! this . disabledWaterMark && BI . isEmptyString ( this . editor . getValue ( ) ) && BI . isKey ( a . watermark ) ? t
} , Ga = function ( a , b , c , d , e , f , g , h , i ) { var j = 1 - i ; return { x : Q ( j , 3 ) * a + 3 * Q ( j , 2 ) * i * c + 3 * j * i * i * e + Q ( i , 3 ) * g , y : Q ( j , 3 ) * b + 3 * Q ( j , 2 ) * i * d + 3 * j * i * i * f + Q ( i , 3 ) * h } } , Ha = e ( function ( a , b , c , d , e , f , g , h ) { var i , j = e - 2 * c + a - ( g - 2 * e + c ) , k = 2 * ( c - a ) - 2 * ( e - c ) , l = a - c , m = ( - k + M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , n = ( - k - M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , o = [ b , h ] , p = [ a , g ] ; return P ( m ) > "1e12" && ( m = . 5 ) , P ( n ) > "1e12" && ( n = . 5 ) , m > 0 && m < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , m ) , p . push ( i . x ) , o . push ( i . y ) ) , n > 0 && n < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , n ) , p . push ( i . x ) , o . push ( i . y ) ) , j = f - 2 * d + b - ( h - 2 * f + d ) , k = 2 * ( d - b ) - 2 * ( f - d ) , l = b - d , m = ( - k + M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , n = ( - k - M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , P ( m ) > "1e12" && ( m = . 5 ) , P ( n ) > "1e12" && ( n = . 5 ) , m > 0 && m < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , m ) , p . push ( i . x ) , o . push ( i . y ) ) , n > 0 && n < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , n ) , p . push ( i . x ) , o . push ( i . y ) ) , { min : { x : O [ C ] ( 0 , p ) , y : O [ C ] ( 0 , o ) } , max : { x : N [ C ] ( 0 , p ) , y : N [ C ] ( 0 , o ) } } } ) , Ia = b . _path2curve = e ( function ( a , b ) { var c = ! b && ya ( a ) ; if ( ! b && c . curve ) return Aa ( c . curve ) ; for ( var d = Ca ( a ) , e = b && Ca ( b ) , f = { x : 0 , y : 0 , bx : 0 , by : 0 , X : 0 , Y : 0 , qx : null , qy : null } , g = { x : 0 , y : 0 , bx : 0 , by : 0 , X : 0 , Y : 0 , qx : null , qy : null } , h = ( function ( a , b , c ) { var d , e , f = { T : 1 , Q : 1 } ; if ( ! a ) return [ "C" , b . x , b . y , b . x , b . y , b . x , b . y ] ; switch ( ! ( a [ 0 ] in f ) && ( b . qx = b . qy = null ) , a [ 0 ] ) { case "M" : b . X = a [ 1 ] , b . Y = a [ 2 ] ; break ; case "A" : a = [ "C" ] [ D ] ( Fa [ C ] ( 0 , [ b . x , b . y ] [ D ] ( a . slice ( 1 ) ) ) ) ; break ; case "S" : "C" == c || "S" == c ? ( d = 2 * b . x - b . bx , e = 2 * b . y - b . by ) : ( d = b . x , e = b . y ) , a = [ "C" , d , e ] [ D ] ( a . slice ( 1 ) ) ; break ; case "T" : "Q" == c || "T" == c ? ( b . qx = 2 * b . x - b . qx , b . qy = 2 * b . y - b . qy ) : ( b . qx = b . x , b . qy = b . y ) , a = [ "C" ] [ D ] ( Ea ( b . x , b . y , b . qx , b . qy , a [ 1 ] , a [ 2 ] ) ) ; break ; case "Q" : b . qx = a [ 1 ] , b . qy = a [ 2 ] , a = [ "C" ] [ D ] ( Ea ( b . x , b . y , a [ 1 ] , a [ 2 ] , a [ 3 ] , a [ 4 ] ) ) ; break ; case "L" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , a [ 1 ] , a [ 2 ] ) ) ; break ; case "H" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , a [ 1 ] , b . y ) ) ; break ; case "V" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , b . x , a [ 1 ] ) ) ; break ; case "Z" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , b . X , b . Y ) ) } return a } ) , i = function ( a , b ) { if ( a [ b ] . length > 7 ) { a [ b ] . shift ( ) ; for ( var c = a [ b ] ; c . length ; ) k [ b ] = "A" , e && ( l [ b ] = "A" ) , a . splice ( b ++ , 0 , [ "C" ] [ D ] ( c . splice ( 0 , 6 ) ) ) ; a . splice ( b , 1 ) , p = N ( d . length , e && e . length || 0 ) } } , j = function ( a , b , c , f , g ) { a && b && "M" == a [ g ] [ 0 ] && "M" != b [ g ] [ 0 ] && ( b . splice ( g , 0 , [ "M" , f . x , f . y ] ) , c . bx = 0 , c . by = 0 , c . x = a [ g ] [ 1 ] , c . y = a [ g ] [ 2 ] , p = N ( d . length , e && e . length || 0 ) ) } , k = [ ] , l = [ ] , m = "" , n = "" , o = 0 , p = N ( d . length , e && e . length || 0 ) ; o < p ; o ++ ) { d [ o ] && ( m = d [ o ] [ 0 ] ) , "C" != m && ( k [ o ] = m , o && ( n = k [ o - 1 ] ) ) , d [ o ] = h ( d [ o ] , f , n ) , "A" != k [ o ] && "C" == m && ( k [ o ] = "C" ) , i ( d , o ) , e && ( e [ o ] && ( m = e [ o ] [ 0 ] ) , "C" != m && ( l [ o ] = m , o && ( n = l [ o - 1 ] ) ) , e [ o ] = h ( e [ o ] , g , n ) , "A" != l [ o ] && "C" == m && ( l [ o ] = "C" ) , i ( e , o ) ) , j ( d , e , f , g , o ) , j ( e , d , g , f , o ) ; var q = d [ o ] , r = e && e [ o ] , s = q . length , t = e && r . length ; f . x = q [ s - 2 ] , f . y = q [ s - 1 ] , f . bx = $ ( q [ s - 4 ] ) || f . x , f . by = $ ( q [ s - 3 ] ) || f . y , g . bx = e && ( $ ( r [ t - 4 ] ) || g . x ) , g . by = e && ( $ ( r [ t - 3 ] ) || g . y ) , g . x = e && r [ t - 2 ] , g . y = e && r [ t - 1 ] } return e || ( c . curve = Aa ( d ) ) , e ? [ d , e ] : d } , null , Aa ) , Ja = ( b . _parseDots = e ( function ( a ) { for ( var c = [ ] , d = 0 , e = a . length ; d < e ; d ++ ) { var f = { } , g = a [ d ] . match ( /^([^:]*):?([\d\.]*)/ ) ; if ( f . color = b . getRGB ( g [ 1 ] ) , f . color . error ) return null ; f . opacity = f . color . opacity , f . color = f . color . hex , g [ 2 ] && ( f . offset = g [ 2 ] + "%" ) , c . push ( f ) } for ( d = 1 , e = c . length - 1 ; d < e ; d ++ ) if ( ! c [ d ] . offset ) { for ( var h = $ ( c [ d - 1 ] . offset || 0 ) , i = 0 , j = d + 1 ; j < e ; j ++ ) if ( c [ j ] . offset ) { i = c [ j ] . offset ; break } i || ( i = 100 , j = e ) , i = $ ( i ) ; for ( var k = ( i - h ) / ( j - d + 1 ) ; d < j ; d ++ ) h += k , c [ d ] . offset = h + "%" } return c } ) , b . _tear = function ( a , b ) { a == b . top && ( b . top = a . prev ) , a == b . bottom && ( b . bottom = a . next ) , a . next && ( a . next . prev = a . prev ) , a . prev && ( a . prev . next = a . next ) } ) , Ka = ( b . _tofront = function ( a , b ) { b . top !== a && ( Ja ( a , b ) , a . next = null , a . prev = b . top , b . top . next = a , b . top = a ) } , b . _toback = function ( a , b ) { b . bottom !== a && ( Ja ( a , b ) , a . next = b . bottom , a . prev = null , b . bottom . prev = a , b . bottom = a ) } , b . _insertafter = function ( a , b , c ) { Ja ( a , c ) , b == c . top && ( c . top = a ) , b . next && ( b . next . prev = a ) , a . next = b . next , a . prev = b , b . next = a } , b . _insertbefore = function ( a , b , c ) { Ja ( a , c ) , b == c . bottom && ( c . bottom = a ) , b . prev && ( b . prev . next = a ) , a . prev = b . prev , b . prev = a , a . next = b } , b . toMatrix = function ( a , b ) { var c = za ( a ) , d = { _ : { transform : F } , getBBox : function ( ) { return c } } ; return La ( d , b ) , d . matrix } ) , La = ( b . transformPath = function ( a , b ) { return pa ( a , Ka ( a , b ) ) } , b . _extractTransform = function ( a , c ) { if ( null == c ) return a . _ . transform ; c = H ( c ) . replace ( /\.{3}|\u2026/g , a . _ . transform || F ) ; var d = b . parseTransformString ( c ) , e = 0 , f = 0 , g = 0 , h = 1 , i = 1 , j = a . _ , k = new n ; if ( j . transform = d || [ ] , d ) for ( var l = 0 , m = d . length ; l < m ; l ++ ) { var o , p , q , r , s , t = d [ l ] , u = t . length , v = H ( t [ 0 ] ) . toLowerCase ( ) , w = t [ 0 ] != v , x = w ? k . invert ( ) : 0 ;
"stroke-width" : ( 1 / ( ( x / z + y / z ) / 2 ) ) . toFixed ( 4 ) } ) , D . appendChild ( C ) , n . defs . appendChild ( D ) , p [ B ] = 1 ) , q ( C , k ) ; var E = i * ( "diamond" != w && "oval" != w ) ; f ? ( g = d . _ . arrows . startdx * u || 0 , h = a . getTotalLength ( t . path ) - E * u ) : ( g = E * u , h = a . getTotalLength ( t . path ) - ( d . _ . arrows . enddx * u || 0 ) ) , k = { } , k [ "marker-" + r ] = "url(#" + B + ")" , ( h || g ) && ( k . d = a . getSubpath ( t . path , g , h ) ) , q ( s , k ) , d . _ . arrows [ r + "Path" ] = A , d . _ . arrows [ r + "Marker" ] = B , d . _ . arrows [ r + "dx" ] = E , d . _ . arrows [ r + "Type" ] = w , d . _ . arrows [ r + "String" ] = e } else f ? ( g = d . _ . arrows . startdx * u || 0 , h = a . getTotalLength ( t . path ) - g ) : ( g = 0 , h = a . getTotalLength ( t . path ) - ( d . _ . arrows . enddx * u || 0 ) ) , d . _ . arrows [ r + "Path" ] && q ( s , { d : a . getSubpath ( t . path , g , h ) } ) , delete d . _ . arrows [ r + "Path" ] , delete d . _ . arrows [ r + "Marker" ] , delete d . _ . arrows [ r + "dx" ] , delete d . _ . arrows [ r + "Type" ] , delete d . _ . arrows [ r + "String" ] ; for ( k in p ) if ( p [ b ] ( k ) && ! p [ k ] ) { var F = a . _g . doc . getElementById ( k ) ; F && F . parentNode . removeChild ( F ) } } } , u = { "-" : [ 3 , 1 ] , "." : [ 1 , 1 ] , "-." : [ 3 , 1 , 1 , 1 ] , "-.." : [ 3 , 1 , 1 , 1 , 1 , 1 ] , ". " : [ 1 , 3 ] , "- " : [ 4 , 3 ] , "--" : [ 8 , 3 ] , "- ." : [ 4 , 3 , 1 , 3 ] , "--." : [ 8 , 3 , 1 , 3 ] , "--.." : [ 8 , 3 , 1 , 3 , 1 , 3 ] } , v = function ( a , b , d ) { if ( b = u [ c ( b ) . toLowerCase ( ) ] ) { for ( var e = a . attrs [ "stroke-width" ] || "1" , f = { round : e , square : e , butt : 0 } [ a . attrs [ "stroke-linecap" ] || d [ "stroke-linecap" ] ] || 0 , g = [ ] , h = b . length ; h -- ; ) g [ h ] = b [ h ] * e + ( h % 2 ? 1 : - 1 ) * f ; q ( a . node , { "stroke-dasharray" : g . join ( "," ) } ) } else q ( a . node , { "stroke-dasharray" : "none" } ) } , w = function ( d , f ) { var i = d . node , k = d . attrs , m = i . style . visibility ; i . style . visibility = "hidden" ; for ( var o in f ) if ( f [ b ] ( o ) ) { if ( ! a . _availableAttrs [ b ] ( o ) ) continue ; var p = f [ o ] ; switch ( k [ o ] = p , o ) { case "blur" : d . blur ( p ) ; break ; case "title" : var u = i . getElementsByTagName ( "title" ) ; if ( u . length && ( u = u [ 0 ] ) ) u . firstChild . nodeValue = p ; else { u = q ( "title" ) ; var w = a . _g . doc . createTextNode ( p ) ; u . appendChild ( w ) , i . appendChild ( u ) } break ; case "href" : case "target" : var x = i . parentNode ; if ( "a" != x . tagName . toLowerCase ( ) ) { var z = q ( "a" ) ; x . insertBefore ( z , i ) , z . appendChild ( i ) , x = z } "target" == o ? x . setAttributeNS ( n , "show" , "blank" == p ? "new" : p ) : x . setAttributeNS ( n , o , p ) ; break ; case "cursor" : i . style . cursor = p ; break ; case "transform" : d . transform ( p ) ; break ; case "arrow-start" : t ( d , p ) ; break ; case "arrow-end" : t ( d , p , 1 ) ; break ; case "clip-rect" : var A = c ( p ) . split ( j ) ; if ( 4 == A . length ) { d . clip && d . clip . parentNode . parentNode . removeChild ( d . clip . parentNode ) ; var B = q ( "clipPath" ) , C = q ( "rect" ) ; B . id = a . createUUID ( ) , q ( C , { x : A [ 0 ] , y : A [ 1 ] , width : A [ 2 ] , height : A [ 3 ] } ) , B . appendChild ( C ) , d . paper . defs . appendChild ( B ) , q ( i , { "clip-path" : "url(#" + B . id + ")" } ) , d . clip = C } if ( ! p ) { var D = i . getAttribute ( "clip-path" ) ; if ( D ) { var E = a . _g . doc . getElementById ( D . replace ( /(^url\(#|\)$)/g , l ) ) ; E && E . parentNode . removeChild ( E ) , q ( i , { "clip-path" : l } ) , delete d . clip } } break ; case "path" : "path" == d . type && ( q ( i , { d : p ? k . path = a . _pathToAbsolute ( p ) : "M0,0" } ) , d . _ . dirty = 1 , d . _ . arrows && ( "startString" in d . _ . arrows && t ( d , d . _ . arrows . startString ) , "endString" in d . _ . arrows && t ( d , d . _ . arrows . endString , 1 ) ) ) ; break ; case "width" : if ( i . setAttribute ( o , p ) , d . _ . dirty = 1 , ! k . fx ) break ; o = "x" , p = k . x ; case "x" : k . fx && ( p = - k . x - ( k . width || 0 ) ) ; case "rx" : if ( "rx" == o && "rect" == d . type ) break ; case "cx" : i . setAttribute ( o , p ) , d . pattern && s ( d ) , d . _ . dirty = 1 ; break ; case "height" : if ( i . setAttribute ( o , p ) , d . _ . dirty = 1 , ! k . fy ) break ; o = "y" , p = k . y ; case "y" : k . fy && ( p = - k . y - ( k . height || 0 ) ) ; case "ry" : if ( "ry" == o && "rect" == d . type ) break ; case "cy" : i . setAttribute ( o , p ) , d . pattern && s ( d ) , d . _ . dirty = 1 ; break ; case "r" : "rect" == d . type ? q ( i , { rx : p , ry : p } ) : i . setAttribute ( o , p ) , d . _ . dirty = 1 ; break ; case "src" : "image" == d . type && i . setAttributeNS ( n , "href" , p ) ; break ; case "stroke-width" : 1 == d . _ . sx && 1 == d . _ . sy || ( p /= g ( h ( d . _ . sx ) , h ( d . _ . sy ) ) || 1 ) , i . setAttribute ( o , p ) , k [ "stroke-dasharray" ] && v ( d , k [ "stroke-dasharray" ] , f ) , d . _ . arrows && ( "startString" in d . _ . arrows && t ( d , d . _ . arrows . startString ) , "endString" in d . _ . arrows && t ( d , d . _ . arrows . endString , 1 ) ) ; break ; case "stroke-dasharray" : v ( d , p , f ) ; break ; case "fill" : var F = c ( p ) . match ( a . _ISURL ) ; if ( F ) { B = q ( "pattern" ) ; var G = q ( "image" ) ; B . id = a . createUUID ( ) , q ( B , { x : 0 , y : 0 , patternUnits : "userSpaceOnUse" , height : 1 , width : 1 } ) , q ( G , { x : 0 , y : 0 , "xlink:href" : F [ 1 ] } ) , B . appendChild ( G ) , function ( b ) { a . _preload ( F [ 1 ] , function ( ) { var a = this . offsetWidth , c = this . offsetHeight ; q ( b , { width : a , height : c } ) , q ( G , { width : a , height : c } ) } ) } ( B ) , d . paper . defs . appendChild ( B ) , q ( i , { fill : "url(#" + B . id + ")" } ) , d . pattern = B , d . pattern && s ( d ) ; break } var H = a . getRGB ( p ) ; if (
this . span = a . _g . doc . createElement ( "span" ) , this . span . style . cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;" , this . canvas . appendChild ( this . span ) , this . bottom = this . top = null } , a . prototype . remove = function ( ) { a . eve ( "raphael.remove" , this ) , this . canvas . parentNode . removeChild ( this . canvas ) ; for ( var b in this ) this [ b ] = "function" == typeof this [ b ] ? a . _removedFactory ( b ) : null ; return ! 0 } ; var G = a . st ; for ( var H in E ) E [ b ] ( H ) && ! G [ b ] ( H ) && ( G [ H ] = function ( a ) { return function ( ) { var b = arguments ; return this . forEach ( function ( c ) { c [ a ] . apply ( c , b ) } ) } } ( H ) ) } } ) , function ( a , b ) { if ( "function" == typeof define && define . amd ) define ( "raphael" , [ "raphael.core" , "raphael.svg" , "raphael.vml" ] , function ( a ) { return b ( a ) } ) ; else if ( "object" == typeof exports ) { var c = require ( "raphael.core" ) ; require ( "raphael.svg" ) , require ( "raphael.vml" ) , module . exports = b ( c ) } } ( this , function ( a ) { return a . ninja ( ) } ) , BI . Svg = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Svg . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-svg" } ) } , _init : function ( ) { BI . Svg . superclass . _init . apply ( this , arguments ) , this . paper = Raphael ( this . element [ 0 ] ) , this . element . css ( "overflow" , "hidden" ) , $ ( this . paper . canvas ) . width ( "100%" ) . height ( "100%" ) . css ( { left : "0" , top : "0" } ) . appendTo ( this . element ) , this . top = this . paper . top , this . bottom = this . paper . bottom , this . customAttributes = this . paper . customAttributes , this . ca = this . paper . ca , this . raphael = this . paper . raphael } , add : function ( ) { return this . paper . add . apply ( this . paper , arguments ) } , path : function ( ) { return this . paper . path . apply ( this . paper , arguments ) } , image : function ( ) { return this . paper . image . apply ( this . paper , arguments ) } , rect : function ( ) { return this . paper . rect . apply ( this . paper , arguments ) } , circle : function ( ) { return this . paper . circle . apply ( this . paper , arguments ) } , ellipse : function ( ) { return this . paper . ellipse . apply ( this . paper , arguments ) } , text : function ( ) { return this . paper . text . apply ( this . paper , arguments ) } , print : function ( ) { return this . paper . print . apply ( this . paper , arguments ) } , setStart : function ( ) { return this . paper . setStart . apply ( this . paper , arguments ) } , setFinish : function ( ) { return this . paper . setFinish . apply ( this . paper , arguments ) } , setSize : function ( ) { return this . paper . setSize . apply ( this . paper , arguments ) } , setViewBox : function ( ) { return this . paper . setViewBox . apply ( this . paper , arguments ) } , getById : function ( ) { return this . paper . getById . apply ( this . paper , arguments ) } , getElementByPoint : function ( ) { return this . paper . getElementByPoint . apply ( this . paper , arguments ) } , getElementsByPoint : function ( ) { return this . paper . getElementsByPoint . apply ( this . paper , arguments ) } , getFont : function ( ) { return this . paper . getFont . apply ( this . paper , arguments ) } , set : function ( ) { return this . paper . set . apply ( this . paper , arguments ) } , remove : function ( ) { return this . paper . remove . apply ( this . paper , arguments ) } , clear : function ( ) { return this . paper . clear . apply ( this . paper , arguments ) } } ) , BI . shortcut ( "bi.svg" , BI . Svg ) , BI . NativeTableScrollbar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . NativeTableScrollbar . superclass . _defaultConfig . apply ( this , arguments ) , { attributes : { tabIndex : 0 } , contentSize : 0 , defaultPosition : 0 , position : 0 , size : 0 } ) } , render : function ( ) { var a = this ; this . options ; this . element . width ( 36 ) ; var b = BI . throttle ( function ( ) { a . fireEvent ( BI . NativeTableScrollbar . EVENT _SCROLL , a . element . scrollTop ( ) ) } , 150 , { leading : ! 1 } ) ; return this . element . scroll ( function ( ) { b ( ) } ) , { type : "bi.default" , scrolly : ! 0 , items : [ { type : "bi.layout" , width : 1 , ref : function ( b ) { a . inner = b } } ] } } , mounted : function ( ) { this . _populate ( ) } , _populate : function ( ) { var a = this . options ; if ( a . size < 1 || a . contentSize <= a . size ) return void this . setVisible ( ! 1 ) ; this . setVisible ( ! 0 ) ; try { this . element . scrollTop ( a . position ) } catch ( b ) { } this . inner . element . height ( a . contentSize ) } , setContentSize : function ( a ) { this . options . contentSize = a } , setPosition : function ( a ) { this . options . position = a } , setSize : function ( a ) { this . setHeight ( a ) , this . options . size = a } , populate : function ( ) { this . _populate ( ) } } ) , BI . NativeTableScrollbar . EVENT _SCROLL = "EVENT_SCROLL" , BI . shortcut ( "bi.native_table_scrollbar" , BI . NativeTableScrollbar ) , BI . NativeTableHorizontalScrollbar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI .
return this . bottomRightGrid . getScrollTop ( ) } , getLeftHorizontalScroll : function ( ) { return this . bottomLeftGrid . getScrollLeft ( ) } , getRightHorizontalScroll : function ( ) { return this . bottomRightGrid . getScrollLeft ( ) } , setWidth : function ( a ) { BI . GridTable . superclass . setWidth . apply ( this , arguments ) , this . _width = this . options . width - BI . GridTableScrollbar . SIZE } , setHeight : function ( a ) { BI . GridTable . superclass . setHeight . apply ( this , arguments ) , this . _height = this . options . height - BI . GridTableScrollbar . SIZE } , setColumnSize : function ( a ) { this . options . columnSize = a , this . _isNeedDigest = ! 0 } , setRegionColumnSize : function ( a ) { this . options . regionColumnSize = a , this . _isNeedDigest = ! 0 } , getColumnSize : function ( ) { return this . options . columnSize } , getRegionColumnSize : function ( ) { return this . options . regionColumnSize } , populate : function ( a , b ) { a && this . options . items !== a && ( this . options . items = a , this . items = this . _getItems ( ) , this . _restore ( ) ) , b && this . options . header !== b && ( this . options . header = b , this . header = this . _getHeader ( ) , this . _restore ( ) ) , this . _populate ( ) } , _restore : function ( ) { this . topLeftGrid . restore ( ) , this . topRightGrid . restore ( ) , this . bottomLeftGrid . restore ( ) , this . bottomRightGrid . restore ( ) } , restore : function ( ) { this . _restore ( ) } } ) , BI . shortcut ( "bi.grid_table" , BI . GridTable ) , BI . QuickGridTable = BI . inherit ( BI . GridTable , { _defaultConfig : function ( ) { return BI . extend ( BI . QuickGridTable . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-quick-grid-table" } ) } , render : function ( ) { BI . QuickGridTable . superclass . render . apply ( this , arguments ) ; this . options ; this . topLeftGrid . setOverflowX ( ! 1 ) , this . topLeftGrid . setOverflowY ( ! 1 ) , this . topRightGrid . setOverflowX ( ! 1 ) , this . topRightGrid . setOverflowY ( ! 1 ) , this . bottomLeftGrid . setOverflowX ( ! 1 ) , this . bottomLeftGrid . setOverflowY ( ! 1 ) , this . bottomRightGrid . setOverflowX ( ! 1 ) , this . bottomRightGrid . setOverflowY ( ! 1 ) } , mounted : function ( ) { BI . QuickGridTable . superclass . mounted . apply ( this , arguments ) ; var a = this ; this . _topLeftWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelLeft , this ) , BI . bind ( this . _shouldHandleLeftX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _topRightWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelRight , this ) , BI . bind ( this . _shouldHandleRightX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _bottomLeftWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelLeft , this ) , BI . bind ( this . _shouldHandleLeftX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _bottomRightWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelRight , this ) , BI . bind ( this . _shouldHandleRightX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . topLeftGrid . element . mousewheel ( function ( b ) { a . _topLeftWheelHandler . onWheel ( b . originalEvent ) } ) , this . topRightGrid . element . mousewheel ( function ( b ) { a . _topRightWheelHandler . onWheel ( b . originalEvent ) } ) , this . bottomLeftGrid . element . mousewheel ( function ( b ) { a . _bottomLeftWheelHandler . onWheel ( b . originalEvent ) } ) , this . bottomRightGrid . element . mousewheel ( function ( b ) { a . _bottomRightWheelHandler . onWheel ( b . originalEvent ) } ) } , _shouldHandleLeftX : function ( a ) { return a > 0 ? this . bottomLeftGrid . getScrollLeft ( ) < this . bottomLeftGrid . getMaxScrollLeft ( ) : this . bottomLeftGrid . getScrollLeft ( ) > 0 } , _shouldHandleRightX : function ( a ) { return a > 0 ? this . bottomRightGrid . getScrollLeft ( ) < this . bottomRightGrid . getMaxScrollLeft ( ) : this . bottomRightGrid . getScrollLeft ( ) > 0 } , _shouldHandleY : function ( a ) { return a > 0 ? this . bottomRightGrid . getScrollTop ( ) < this . bottomRightGrid . getMaxScrollTop ( ) : this . bottomRightGrid . getScrollTop ( ) > 0 } , _onWheelLeft : function ( a , b ) { var c = this , d = this . bottomLeftGrid . getScrollTop ( ) , e = this . bottomLeftGrid . getScrollLeft ( ) ; d += b , e += a , this . bottomLeftGrid . setScrollTop ( d ) , this . bottomRightGrid . setScrollTop ( d ) , this . topLeftGrid . setScrollLeft ( e ) , this . bottomLeftGrid . setScrollLeft ( e ) , c . _populateScrollbar ( ) , this . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } , _onWheelRight : function ( a , b ) { var c = this , d = this . bottomRightGrid . getScrollTop ( ) , e = this . bottomRightGrid . getScrollLeft ( ) ; d += b , e += a , this . bottomLeftGrid . setScrollTop ( d ) , this . bottomRightGrid . setScrollTop ( d ) , this . topRightGrid . setScrollLeft ( e ) , this . bottomRightGrid . setScrollLeft ( e ) , c . _populateScrollbar ( ) , this . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } , _populateTable : function ( ) { var a = this .
} ) , BI . each ( b . footerItems , function ( d , e ) { if ( e [ a ] ) if ( b . footerTds [ d ] [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( c . columnSize , function ( c , e ) { b . footerTds [ d ] [ a ] . _ _mergeCols . contains ( c ) && ( g += e ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += b . footerTds [ d ] [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( g ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , g - 1 ) . css ( "width" , g - 1 ) : e [ a ] . element . attr ( "width" , g ) . css ( "width" , g ) : e [ a ] . element . attr ( "width" , "" ) . css ( "width" , "" ) } else BI . isNumeric ( f ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . element . attr ( "width" , f ) . css ( "width" , f ) : e [ a ] . element . attr ( "width" , "" ) . css ( "width" , "" ) } ) } } ) ; var n = this . _calculateWidth ( BI . sum ( c . columnSize ) ) ; n > 1.05 && ( n += c . columnSize . length ) , n > 1.05 && this . tableContainer . element . width ( n ) } } , getColumnSize : function ( ) { return this . options . columnSize } , getCalculateColumnSize : function ( ) { var a = this , b = this . options , c = [ ] ; if ( b . isNeedFreeze === ! 0 ) { if ( BI . size ( this . bottomLeftBodyTds ) > 0 || BI . size ( this . bottomRightBodyTds ) > 0 ) return BI . any ( this . bottomLeftBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . bottomLeftBodyTds [ 0 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . bottomLeftBodyTds [ 0 ] ) - 1 && e ++ , c . push ( e ) } ) , BI . any ( this . bottomRightBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . bottomRightBodyTds [ 0 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . bottomRightBodyTds [ 0 ] ) - 1 && e ++ , c . push ( e ) } ) , c ; BI . any ( this . topLeftBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . topLeftBodyTds [ BI . size ( this . topLeftBodyTds ) - 1 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . topLeftBodyTds [ BI . size ( a . topLeftBodyTds ) - 1 ] ) - 1 && e ++ , c . push ( e ) } ) , BI . any ( this . topRightBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . topRightBodyTds [ BI . size ( this . topRightBodyTds ) - 1 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . topRightBodyTds [ BI . size ( a . topRightBodyTds ) - 1 ] ) - 1 && e ++ , c . push ( e ) } ) } else BI . each ( this . headerTds [ BI . size ( this . headerTds ) - 1 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . headerTds [ BI . size ( a . headerTds ) - 1 ] ) - 1 && e ++ , c . push ( e ) } ) ; return c } , setHeaderColumnSize : function ( a ) { var b = this , c = this . options , d = this . _isRightFreeze ( ) ; if ( c . isNeedFreeze ) { var e = [ ] , f = [ ] ; BI . each ( a , function ( a , b ) { c . freezeCols . contains ( a ) ? d ? f . push ( b ) : e . push ( b ) : d ? e . push ( b ) : f . push ( b ) } ) ; var g = 0 , h = 1 , i = function ( a ) { var c , d , i , j ; switch ( a ) { case g : c = b . topLeftColGroupTds , d = b . topLeftBodyTds , i = b . topLeftBodyItems , j = e ; break ; case h : c = b . topRightColGroupTds , d = b . topRightBodyTds , i = b . topRightBodyItems , j = f } BI . each ( c , function ( a , c ) { var e = 0 | c . attr ( "width" ) ; if ( e !== j [ a ] ) { var f = b . _calculateWidth ( j [ a ] ) ; c . attr ( "width" , f ) . css ( "width" , f ) , BI . each ( d , function ( c , d ) { if ( d [ a ] ) if ( d [ a ] . _ _mergeCols . length > 1 ) { var e = 0 ; BI . each ( j , function ( b , c ) { d [ a ] . _ _mergeCols . contains ( b ) && ( e += c ) } ) , e = b . _calculateWidth ( e ) , e > 1 && ( e += d [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( e ) ? a == BI . size ( d ) - 1 ? d [ a ] . attr ( "width" , e - 1 ) . css ( "width" , e - 1 ) : d [ a ] . attr ( "width" , e ) . css ( "width" , e ) : d [ a ] . attr ( "width" , "" ) . css ( "width" , "" ) } else a == BI . size ( d ) - 1 ? d [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : d [ a ] . attr ( "width" , f ) . css ( "width" , f ) } ) , BI . each ( i , function ( c , e ) { if ( e [ a ] ) if ( d [ c ] [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( j , function ( b , e ) { d [ c ] [ a ] . _ _mergeCols . contains ( b ) && ( g += e ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += d [ c ] [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( g ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , g - 1 ) . css ( "width" , g - 1 ) : e [ a ] . element . attr ( "width" , g ) . css ( "width" , g ) : e [ a ] . element . attr ( "width" , "" ) . css ( "width" , "" ) } else BI . isNumeric ( f ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) :
return h } return [ b ] } } , event = { bindEvent : function ( a ) { for ( var b = 0 , c = _init . bind . length ; b < c ; b ++ ) _init . bind [ b ] . apply ( this , arguments ) } , unbindEvent : function ( a ) { for ( var b = 0 , c = _init . unbind . length ; b < c ; b ++ ) _init . unbind [ b ] . apply ( this , arguments ) } , bindTree : function ( a ) { var b = { treeId : a . treeId } , c = a . treeObj ; a . view . txtSelectedEnable || c . bind ( "selectstart" , function ( a ) { var b = a . originalEvent . srcElement . nodeName . toLowerCase ( ) ; return "input" === b || "textarea" === b } ) . css ( { "-moz-user-select" : "-moz-none" } ) , c . bind ( "click" , b , event . proxy ) , c . bind ( "dblclick" , b , event . proxy ) , c . bind ( "mouseover" , b , event . proxy ) , c . bind ( "mouseout" , b , event . proxy ) , c . bind ( "mousedown" , b , event . proxy ) , c . bind ( "mouseup" , b , event . proxy ) , c . bind ( "contextmenu" , b , event . proxy ) } , unbindTree : function ( a ) { var b = a . treeObj ; b . unbind ( "click" , event . proxy ) . unbind ( "dblclick" , event . proxy ) . unbind ( "mouseover" , event . proxy ) . unbind ( "mouseout" , event . proxy ) . unbind ( "mousedown" , event . proxy ) . unbind ( "mouseup" , event . proxy ) . unbind ( "contextmenu" , event . proxy ) } , doProxy : function ( a ) { for ( var b = [ ] , c = 0 , d = _init . proxys . length ; c < d ; c ++ ) { var e = _init . proxys [ c ] . apply ( this , arguments ) ; if ( b . push ( e ) , e . stop ) break } return b } , proxy : function ( a ) { var b = data . getSetting ( a . data . treeId ) ; if ( ! tools . uCanDo ( b , a ) ) return ! 0 ; for ( var c = event . doProxy ( a ) , d = ! 0 , e = ! 1 , f = 0 , g = c . length ; f < g ; f ++ ) { var h = c [ f ] ; h . nodeEventCallback && ( e = ! 0 , d = h . nodeEventCallback . apply ( h , [ a , h . node ] ) && d ) , h . treeEventCallback && ( e = ! 0 , d = h . treeEventCallback . apply ( h , [ a , h . node ] ) && d ) } return d } } , handler = { onSwitchNode : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; if ( b . open ) { if ( 0 == tools . apply ( c . callback . beforeCollapse , [ c . treeId , b ] , ! 0 ) ) return ! 0 ; data . getRoot ( c ) . expandTriggerFlag = ! 0 , view . switchNode ( c , b ) } else { if ( 0 == tools . apply ( c . callback . beforeExpand , [ c . treeId , b ] , ! 0 ) ) return ! 0 ; data . getRoot ( c ) . expandTriggerFlag = ! 0 , view . switchNode ( c , b ) } return ! 0 } , onClickNode : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) , d = c . view . autoCancelSelected && ( a . ctrlKey || a . metaKey ) && data . isSelectedNode ( c , b ) ? 0 : c . view . autoCancelSelected && ( a . ctrlKey || a . metaKey ) && c . view . selectedMulti ? 2 : 1 ; return 0 == tools . apply ( c . callback . beforeClick , [ c . treeId , b , d ] , ! 0 ) || ( 0 === d ? view . cancelPreSelectedNode ( c , b ) : view . selectNode ( c , b , 2 === d ) , c . treeObj . trigger ( consts . event . CLICK , [ a , c . treeId , b , d ] ) , ! 0 ) } , onZTreeMousedown : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeMouseDown , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onMouseDown , [ a , c . treeId , b ] ) , ! 0 } , onZTreeMouseup : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeMouseUp , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onMouseUp , [ a , c . treeId , b ] ) , ! 0 } , onZTreeDblclick : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeDblClick , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onDblClick , [ a , c . treeId , b ] ) , ! 0 } , onZTreeContextmenu : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeRightClick , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onRightClick , [ a , c . treeId , b ] ) , "function" != typeof c . callback . onRightClick } } , tools = { apply : function ( a , b , c ) { return "function" == typeof a ? a . apply ( zt , b ? b : [ ] ) : c } , canAsync : function ( a , b ) { var c = a . data . key . children ; return a . async . enable && b && b . isParent && ! ( b . zAsync || b [ c ] && b [ c ] . length > 0 ) } , clone : function ( a ) { if ( null === a ) return null ; var b = tools . isArray ( a ) ? [ ] : { } ; for ( var c in a ) b [ c ] = a [ c ] instanceof Date ? new Date ( a [ c ] . getTime ( ) ) : "object" == typeof a [ c ] ? arguments . callee ( a [ c ] ) : a [ c ] ; return b } , eqs : function ( a , b ) { return a . toLowerCase ( ) === b . toLowerCase ( ) } , isArray : function ( a ) { return "[object Array]" === Object . prototype . toString . apply ( a ) } , $ : function ( a , b , c ) { return b && "string" != typeof b && ( c = b , b = "" ) , "string" == typeof a ? $ ( a , c ? c . treeObj . get ( 0 ) . ownerDocument : null ) : $ ( "#" + a . tId + b , c ? c . treeObj : null ) } , getMDom : function ( a , b , c ) { if ( ! b ) return null ; for ( ; b && b . id !== a . treeId ; ) { for ( var d = 0 , e = c . length ; b . tagName && d < e ; d ++ ) if ( tools . eqs ( b . tagName , c [ d ] . tagName ) && null !== b . getAttribute ( c [ d ] . attrName ) ) return b ; b = b . parentNode } return null } , getNodeMainDom : function ( a ) { return $ ( a ) . parent ( "li" ) . get ( 0 ) || $ ( a ) . parentsUntil ( "li" ) . parent ( ) . get ( 0 ) } , isChildOrSelf : function ( a , b ) { return $ ( a ) . closest ( "#" + b ) . length > 0 } , uCanDo : function ( a , b ) { return ! 0 } } , view
u . setChkClass ( a , g , b ) , a . check . autoCheckTrigger && b != d && b . nocheck !== ! 0 && b . chkDisabled !== ! 0 && a . treeObj . trigger ( t . event . CHECK , [ null , a . treeId , b ] ) ) } } } , q = { tools : o , view : p , event : m , data : l } ; a . extend ( ! 0 , a . fn . zTree . consts , b ) , a . extend ( ! 0 , a . fn . zTree . _z , q ) ; var r = a . fn . zTree , s = r . _z . tools , t = r . consts , u = r . _z . view , v = r . _z . data , w = ( r . _z . event , s . $ ) ; v . exSetting ( c ) , v . addInitBind ( f ) , v . addInitUnBind ( g ) , v . addInitCache ( e ) , v . addInitNode ( i ) , v . addInitProxy ( h , ! 0 ) , v . addInitRoot ( d ) , v . addBeforeA ( j ) , v . addZTreeTools ( k ) ; var x = u . createNodes ; u . createNodes = function ( a , b , c , d ) { x && x . apply ( u , arguments ) , c && u . repairParentChkClassWithSelf ( a , d ) } ; var y = u . removeNode ; u . removeNode = function ( a , b ) { var c = b . getParentNode ( ) ; y && y . apply ( u , arguments ) , b && c && ( u . repairChkClass ( a , c ) , u . repairParentChkClass ( a , c ) ) } ; var z = u . appendNodes ; u . appendNodes = function ( a , b , c , d , e , f ) { var g = "" ; return z && ( g = z . apply ( u , arguments ) ) , d && v . makeChkFlag ( a , d ) , g } } ( jQuery ) , BI . IconChangeButton = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . IconChangeButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-icon-change-button" , iconCls : "" , iconWidth : null , iconHeight : null , stopEvent : ! 1 , stopPropagation : ! 1 , selected : ! 1 , once : ! 1 , forceSelected : ! 1 , forceNotSelected : ! 1 , disableSelected : ! 1 , shadow : ! 1 , isShadowShowingOnSelected : ! 1 , trigger : null , handler : BI . emptyFn } ) } , _init : function ( ) { BI . IconChangeButton . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . button = BI . createWidget ( { type : "bi.icon_button" , element : this , cls : b . iconCls , height : b . height , iconWidth : b . iconWidth , iconHeight : b . iconHeight , stopEvent : b . stopEvent , stopPropagation : b . stopPropagation , selected : b . selected , once : b . once , forceSelected : b . forceSelected , forceNotSelected : b . forceNotSelected , disableSelected : b . disableSelected , shadow : b . shadow , isShadowShowingOnSelected : b . isShadowShowingOnSelected , trigger : b . trigger , handler : b . handler } ) , this . button . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . IconChangeButton . EVENT _CHANGE , arguments ) } ) } , isSelected : function ( ) { return this . button . isSelected ( ) } , setSelected : function ( a ) { this . button . setSelected ( a ) } , setIcon : function ( a ) { var b = this . options ; b . iconCls !== a && ( this . element . removeClass ( b . iconCls ) . addClass ( a ) , b . iconCls = a ) } } ) , BI . IconChangeButton . EVENT _CHANGE = "IconChangeButton.EVENT_CHANGE" , BI . shortcut ( "bi.icon_change_button" , BI . IconChangeButton ) , BI . HalfIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var a = BI . HalfIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { extraCls : "bi-half-icon-button check-half-select-icon" , height : 16 , width : 16 , iconWidth : 16 , iconHeight : 16 , selected : ! 1 } ) } , _init : function ( ) { BI . HalfIconButton . superclass . _init . apply ( this , arguments ) } , doClick : function ( ) { BI . HalfIconButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . HalfIconButton . EVENT _CHANGE ) } } ) , BI . HalfIconButton . EVENT _CHANGE = "HalfIconButton.EVENT_CHANGE" , BI . shortcut ( "bi.half_icon_button" , BI . HalfIconButton ) , BI . TriggerIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var a = BI . TriggerIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-trigger-icon-button" , extraCls : "pull-down-font" } ) } , _init : function ( ) { BI . TriggerIconButton . superclass . _init . apply ( this , arguments ) } , doClick : function ( ) { BI . TriggerIconButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TriggerIconButton . EVENT _CHANGE , this ) } } ) , BI . TriggerIconButton . EVENT _CHANGE = "TriggerIconButton.EVENT_CHANGE" , BI . shortcut ( "bi.trigger_icon_button" , BI . TriggerIconButton ) , BI . MultiSelectItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-multi-select-item" , height : 25 , logic : { dynamic : ! 1 } } ) } , _init : function ( ) { BI . MultiSelectItem . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.checkbox" } ) , this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , whiteSpace : " nowra
items : BI . LogicFactory . createLogicItemsByDirection ( "top" , d , this . days ) } ) ) ) ) } , isFrontDate : function ( ) { var a = this . options , b = ( this . _const , a . year ) , c = a . month , d = Date . getDate ( ) , e = d . getDay ( ) ; b = 0 | b , d . setFullYear ( b , c , 1 ) ; var f = d . getOffsetDate ( - 1 * ( e + 1 ) ) ; return ! ! Date . checkVoid ( f . getFullYear ( ) , f . getMonth ( ) , f . getDate ( ) , a . min , a . max ) [ 0 ] } , isFinalDate : function ( ) { var a = this . options , b = ( this . _const , a . year ) , c = a . month , d = Date . getDate ( ) , e = d . getDay ( ) ; b = 0 | b , d . setFullYear ( b , c , 1 ) ; var f = d . getOffsetDate ( 42 - e ) ; return ! ! Date . checkVoid ( f . getFullYear ( ) , f . getMonth ( ) , f . getDate ( ) , a . min , a . max ) [ 0 ] } , setValue : function ( a ) { this . days . setValue ( [ a . year + "-" + a . month + "-" + a . day ] ) } , getValue : function ( ) { var a = this . days . getValue ( ) [ 0 ] . match ( /\d+/g ) ; return { year : 0 | a [ 0 ] , month : 0 | a [ 1 ] , day : 0 | a [ 2 ] } } } ) , BI . extend ( BI . Calendar , { getPageByDateJSON : function ( a ) { var b = Date . getDate ( ) . getFullYear ( ) , c = Date . getDate ( ) . getMonth ( ) , d = 12 * ( a . year - b ) ; return d += a . month - c } , getDateJSONByPage : function ( a ) { var b = Date . getDate ( ) . getMonth ( ) , c = a ; c += b ; var d = BI . parseInt ( c / 12 ) ; c < 0 && c % 12 !== 0 && d -- ; var e = c >= 0 ? c % 12 : ( 12 + c % 12 ) % 12 ; return { year : Date . getDate ( ) . getFullYear ( ) + d , month : e } } } ) , BI . shortcut ( "bi.calendar" , BI . Calendar ) , BI . YearCalendar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . YearCalendar . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-year-calendar" , behaviors : { } , logic : { dynamic : ! 1 } , min : "1900-01-01" , max : "2099-12-31" , year : null } ) } , _yearCreator : function ( a ) { var b = this . options ; a = 0 | a ; var c = BI . YearCalendar . getStartYear ( a ) , d = [ ] ; return BI . each ( BI . range ( BI . YearCalendar . INTERVAL ) , function ( a ) { var e = { } ; Date . checkVoid ( c + a , 1 , 1 , b . min , b . max ) [ 0 ] && ( e . disabled = ! 0 ) , e . text = c + a , d . push ( e ) } ) , d } , _init : function ( ) { BI . YearCalendar . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . currentYear = Date . getDate ( ) . getFullYear ( ) ; var c = this . _yearCreator ( b . year || this . currentYear ) , d = c . length , e = BI . makeArray ( d , "" ) , f = [ 0 , 6 , 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 ] ; BI . each ( c , function ( a , b ) { e [ a ] = c [ f [ a ] ] } ) ; var g = [ ] ; g . push ( e . slice ( 0 , 2 ) ) , g . push ( e . slice ( 2 , 4 ) ) , g . push ( e . slice ( 4 , 6 ) ) , g . push ( e . slice ( 6 , 8 ) ) , g . push ( e . slice ( 8 , 10 ) ) , g . push ( e . slice ( 10 , 12 ) ) , g = BI . map ( g , function ( a , b ) { return BI . map ( b , function ( a , b ) { return BI . extend ( b , { type : "bi.text_item" , cls : "bi-list-item-active" , textAlign : "center" , whiteSpace : "normal" , once : ! 1 , forceSelected : ! 0 , height : 23 , width : 38 , value : b . text , disabled : b . disabled } ) } ) } ) , this . years = BI . createWidget ( { type : "bi.button_group" , behaviors : b . behaviors , items : BI . createItems ( g , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { } , b . logic , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 25 } ) ) , { type : "bi.center_adapt" , vgap : 1 } ] } ) , this . years . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( { } , b . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "top" , this . years ) } ) ) ) ) } , isFrontYear : function ( ) { var a = this . options , b = a . year ; return b = 0 | b , ! ! Date . checkVoid ( BI . YearCalendar . getStartYear ( b ) - 1 , 1 , 1 , a . min , a . max ) [ 0 ] } , isFinalYear : function ( ) { var a = this . options , b = ( this . _const , a . year ) ; return b = 0 | b , ! ! Date . checkVoid ( BI . YearCalendar . getEndYear ( b ) + 1 , 1 , 1 , a . min , a . max ) [ 0 ] } , setValue : function ( a ) { this . years . setValue ( [ a ] ) } , getValue : function ( ) { return this . years . getValue ( ) [ 0 ] } } ) , BI . extend ( BI . YearCalendar , { INTERVAL : 12 , getStartYear : function ( a ) { var b = Date . getDate ( ) . getFullYear ( ) ; return a - ( ( a - b + 3 ) % BI . YearCalendar . INTERVAL + 12 ) % BI . YearCalendar . INTERVAL } , getEndYear : function ( a ) { return BI . YearCalendar . getStartYear ( a ) + BI . YearCalendar . INTERVAL } , getPageByYear : function ( a ) { var b = Date . getDate ( ) . getFullYear ( ) ; return a = BI . YearCalendar . getStartYear ( a ) , ( a - b + 3 ) / BI . YearCalendar . INTERVAL } } ) , BI . shortcut ( "bi.year_calendar" , BI . YearCalendar ) , BI . ComplexCanvas = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ComplexCanvas . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-complex-canvas" } ) } , _init : function ( ) { BI . ComplexCanvas . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . canvas = BI . createWidget ( { type : "bi.canvas" , element : this , width : a . width , height : a . height } ) } , branch : function ( a , b , c , d , e , f ) { var g = this , h = [ ] . slice .
} ] } , height : 65 } , { el : this . more , height : 20 } ] } ) } , setStoreColors : function ( a ) { if ( BI . isArray ( a ) ) { var b = BI . map ( a , function ( a , b ) { return { value : b } } ) ; BI . count ( a . length , 8 , function ( a ) { b . push ( { value : "" , disabled : ! 0 } ) } ) , this . storeColors . populate ( [ b ] ) } } , setValue : function ( a ) { this . colorEditor . setValue ( a ) , this . colorPicker . setValue ( a ) , this . storeColors . setValue ( a ) } , getValue : function ( ) { return this . colorEditor . getValue ( ) } } ) , BI . ColorChooserPopup . EVENT _VALUE _CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE" , BI . ColorChooserPopup . EVENT _CHANGE = "ColorChooserPopup.EVENT_CHANGE" , BI . shortcut ( "bi.color_chooser_popup" , BI . ColorChooserPopup ) , BI . ColorChooserTrigger = BI . inherit ( BI . Trigger , { _defaultConfig : function ( ) { var a = BI . ColorChooserTrigger . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-color-chooser-trigger" , height : 30 } ) } , _init : function ( ) { BI . ColorChooserTrigger . superclass . _init . apply ( this , arguments ) , this . colorContainer = BI . createWidget ( { type : "bi.layout" , cls : "bi-card color-chooser-trigger-content" } ) ; var a = BI . createWidget ( { type : "bi.icon_button" , disableSelected : ! 0 , cls : "icon-combo-down-icon trigger-triangle-font" , width : 12 , height : 8 } ) ; BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . colorContainer , left : 3 , right : 3 , top : 3 , bottom : 3 } , { el : a , right : 3 , bottom : 3 } ] } ) , this . options . value && this . setValue ( this . options . value ) } , setValue : function ( a ) { BI . ColorChooserTrigger . superclass . setValue . apply ( this , arguments ) , "" === a ? this . colorContainer . element . css ( "background-color" , "" ) . removeClass ( "trans-color-background" ) . addClass ( "auto-color-background" ) : "transparent" === a ? this . colorContainer . element . css ( "background-color" , "" ) . removeClass ( "auto-color-background" ) . addClass ( "trans-color-background" ) : this . colorContainer . element . css ( { "background-color" : a } ) . removeClass ( "auto-color-background" ) . removeClass ( "trans-color-background" ) } } ) , BI . ColorChooserTrigger . EVENT _CHANGE = "ColorChooserTrigger.EVENT_CHANGE" , BI . shortcut ( "bi.color_chooser_trigger" , BI . ColorChooserTrigger ) , BI . ColorPickerButton = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var a = BI . ColorPickerButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-color-picker-button bi-background bi-border-top bi-border-left" } ) } , _init : function ( ) { BI . ColorPickerButton . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; if ( b . value ) { this . element . css ( "background-color" , b . value ) ; var c = this . getName ( ) ; this . element . hover ( function ( ) { a . _createMask ( ) , a . isEnabled ( ) && BI . Maskers . show ( c ) } , function ( ) { a . isSelected ( ) || BI . Maskers . hide ( c ) } ) } } , _createMask : function ( ) { var a = this . options , b = this . getName ( ) ; if ( this . isEnabled ( ) && ! BI . Maskers . has ( b ) ) { var c = BI . Maskers . make ( b , this , { offset : { left : - 1 , top : - 1 , right : - 1 , bottom : - 1 } } ) ; c . element . addClass ( "color-picker-button-mask" ) . css ( "background-color" , a . value ) } } , setSelected : function ( a ) { BI . ColorPickerButton . superclass . setSelected . apply ( this , arguments ) , a && this . _createMask ( ) , BI . Maskers [ a ? "show" : "hide" ] ( this . getName ( ) ) } } ) , BI . ColorPickerButton . EVENT _CHANGE = "ColorPickerButton.EVENT_CHANGE" , BI . shortcut ( "bi.color_picker_button" , BI . ColorPickerButton ) , BI . ColorPicker = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ColorPicker . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-color-picker" , items : null } ) } , _items : [ [ { value : "#ffffff" } , { value : "#f2f2f2" } , { value : "#e5e5e5" } , { value : "#d9d9d9" } , { value : "#cccccc" } , { value : "#bfbfbf" } , { value : "#b2b2b2" } , { value : "#a6a6a6" } , { value : "#999999" } , { value : "#8c8c8c" } , { value : "#808080" } , { value : "#737373" } , { value : "#666666" } , { value : "#4d4d4d" } , { value : "#333333" } , { value : "#000000" } ] , [ { value : "#d8b5a6" } , { value : "#ff9e9a" } , { value : "#ffc17d" } , { value : "#f5e56b" } , { value : "#d8e698" } , { value : "#e0ebaf" } , { value : "#c3d825" } , { value : "#bce2e8" } , { value : "#85d3cd" } , { value : "#bce2e8" } , { value : "#a0d8ef" } , { value : "#89c3eb" } , { value : "#bbc8e6" } , { value : "#bbbcde" } , { value : "#d6b4cc" } , { value : "#fbc0d3" } ] , [ { value : "#bb9581" } , { value : "#f37d79" } , { value : "#fba74f" } , { value : "#ffdb4f" } , { value : "#c7dc68" } , { value : "#b0ca71" } , { value : "#99ab4e" } , { value : "#84b9cb" } , { value : "#00a3af" } , { value : "#2ca9e1" } , { value : "#0095d9" } , { value : "#4c6cb3" } , { value : " # 8
d = BI . createItems ( d , { type : "bi.single_select_item" , height : 30 } ) , this . popup . populate ( d , c ) } , getValue : function ( ) { return this . popup . getValue ( ) } , setValue : function ( a ) { this . popup . setValue ( a ) } } ) , BI . SearchTextValueComboPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.search_text_value_combo_popup" , BI . SearchTextValueComboPopup ) , BI . SearchTextValueTrigger = BI . inherit ( BI . Trigger , { props : { baseCls : "bi-search-text-value-trigger bi-border" , height : 30 } , render : function ( ) { var a = this , b = this . options ; return { type : "bi.htape" , items : [ { el : { type : "bi.searcher" , ref : function ( ) { a . searcher = this } , isAutoSearch : ! 1 , el : { type : "bi.state_editor" , ref : function ( ) { a . editor = this } , text : this . _digest ( b . value , b . items ) , value : b . value , height : b . height } , popup : { type : "bi.search_text_value_combo_popup" , cls : "bi-card" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE } , onSearch : function ( a , c ) { var d = a . keyword , e = BI . Func . getSearchResult ( b . items , d ) , f = e . match , g = e . find ; c ( g , f ) } , listeners : [ { eventName : BI . Searcher . EVENT _CHANGE , action : function ( ) { a . fireEvent ( BI . SearchTextValueTrigger . EVENT _CHANGE ) } } ] } } , { el : { type : "bi.layout" , width : 30 } , width : 30 } ] } } , _setState : function ( a ) { this . editor . setState ( a ) } , _digest : function ( a , b ) { var c = this . options ; a = BI . isArray ( a ) ? a : [ a ] ; var d = [ ] , e = BI . Tree . transformToArrayFormat ( b ) ; return BI . each ( e , function ( b , c ) { BI . deepContains ( a , c . value ) && ! d . contains ( c . text || c . value ) && d . push ( c . text || c . value ) } ) , d . length > 0 ? d . join ( "," ) : c . text } , stopEditing : function ( ) { this . searcher . stopSearch ( ) } , getSearcher : function ( ) { return this . searcher } , populate : function ( a ) { this . options . items = a } , setValue : function ( a ) { this . _setState ( this . _digest ( a , this . options . items ) ) } , getValue : function ( ) { return this . searcher . getValue ( ) } } ) , BI . SearchTextValueTrigger . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . SearchTextValueTrigger . EVENT _STOP = "EVENT_STOP" , BI . SearchTextValueTrigger . EVENT _START = "EVENT_START" , BI . SearchTextValueTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.search_text_value_trigger" , BI . SearchTextValueTrigger ) , BI . StaticCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . StaticCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-static-combo" , height : 24 , text : "" , el : { } , items : [ ] , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE } ) } , _init : function ( ) { BI . StaticCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : "bi.text_trigger" , cls : "bi-border" , items : b . items , height : b . height , text : b . text , readonly : ! 0 } ) , this . popup = BI . createWidget ( { type : "bi.text_value_combo_popup" , textAlign : b . textAlign , chooseType : b . chooseType , items : b . items , value : b . value } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . popup . on ( BI . TextValueComboPopup . EVENT _CHANGE , function ( ) { a . combo . hideView ( ) , a . fireEvent ( BI . StaticCombo . EVENT _CHANGE , arguments ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , element : this , adjustLength : 2 , el : this . trigger , popup : { el : this . popup } } ) } , populate : function ( a ) { this . combo . populate ( a ) } , setValue : function ( a ) { this . popup . setValue ( a ) } , getValue : function ( ) { var a = this . popup . getValue ( ) ; return BI . isNull ( a ) ? [ ] : BI . isArray ( a ) ? a : [ a ] } } ) , BI . StaticCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.static_combo" , BI . StaticCombo ) , BI . TextValueCheckCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . TextValueCheckCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseClass : "bi-text-value-check-combo" , width : 100 , height : 24 , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , value : "" } ) } , _init : function ( ) { BI . TextValueCheckCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : "bi.select_text_trigger" , items : b . items , height : b . height , text : b . text , value : b . value } ) , this . popup = BI . createWidget ( { type : "bi.text_value_check_combo_popup" , chooseType : b . chooseType , items : b . items , value : b . value } ) , this . popup . on ( BI . TextValueCheckComboPopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . textIconCheckCombo . hideView ( ) , a . fireEvent ( BI . TextValueCheckCombo . EVENT _CHANGE ) } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . textIconCheckCombo = B
this . text . element . addClass ( "bi-water-mark" ) ) : ( this . text . setValue ( this . editor . getValue ( ) ) , this . text . element . removeClass ( "bi-water-mark" ) ) } , this ) ) } , _showInput : function ( ) { this . editor . visible ( ) , this . text . invisible ( ) } , _showHint : function ( ) { this . editor . invisible ( ) , this . text . visible ( ) } , setTitle : function ( a ) { this . text . setTitle ( a ) } , setWarningTitle : function ( a ) { this . text . setWarningTitle ( a ) } , focus : function ( ) { this . _showInput ( ) , this . editor . focus ( ) } , blur : function ( ) { this . editor . blur ( ) , this . _showHint ( ) , this . _checkText ( ) } , doRedMark : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , isValid : function ( ) { return this . editor . isValid ( ) } , setErrorText : function ( a ) { this . editor . setErrorText ( a ) } , getErrorText : function ( ) { return this . editor . getErrorText ( ) } , isEditing : function ( ) { return this . editor . isEditing ( ) } , getLastValidValue : function ( ) { return this . editor . getLastValidValue ( ) } , setValue : function ( a ) { this . editor . setValue ( a ) , this . _checkText ( ) } , getValue : function ( ) { return this . editor . getValue ( ) } , getState : function ( ) { return this . text . getValue ( ) } , setState : function ( a ) { this . _showHint ( ) , this . text . setValue ( a ) } } ) , BI . SignEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . SignEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . SignEditor . EVENT _BLUR = "EVENT_BLUR" , BI . SignEditor . EVENT _CLICK = "EVENT_CLICK" , BI . SignEditor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . SignEditor . EVENT _CLICK _LABEL = "EVENT_CLICK_LABEL" , BI . SignEditor . EVENT _START = "EVENT_START" , BI . SignEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . SignEditor . EVENT _STOP = "EVENT_STOP" , BI . SignEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . SignEditor . EVENT _VALID = "EVENT_VALID" , BI . SignEditor . EVENT _ERROR = "EVENT_ERROR" , BI . SignEditor . EVENT _ENTER = "EVENT_ENTER" , BI . SignEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . SignEditor . EVENT _SPACE = "EVENT_SPACE" , BI . SignEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.sign_editor" , BI . SignEditor ) , BI . StateEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . StateEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-state-editor" , hgap : 4 , vgap : 2 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 0 , watermark : "" , errorText : "" , height : 24 } ) } , _init : function ( ) { BI . StateEditor . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . editor = BI . createWidget ( { type : "bi.editor" , height : b . height , hgap : b . hgap , vgap : b . vgap , lgap : b . lgap , rgap : b . rgap , tgap : b . tgap , bgap : b . bgap , value : b . value , validationChecker : b . validationChecker , quitChecker : b . quitChecker , allowBlank : b . allowBlank , watermark : b . watermark , errorText : b . errorText } ) , this . text = BI . createWidget ( { type : "bi.text_button" , cls : "state-editor-infinite-text" , textAlign : "left" , height : b . height , text : BI . i18nText ( "BI-Basic_Unrestricted" ) , hgap : 4 , handler : function ( ) { a . _showInput ( ) , a . editor . focus ( ) , a . editor . setValue ( "" ) } } ) , this . text . on ( BI . TextButton . EVENT _CHANGE , function ( ) { BI . nextTick ( function ( ) { a . fireEvent ( BI . StateEditor . EVENT _CLICK _LABEL ) } ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . text , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . editor . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _FOCUS , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _FOCUS , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _BLUR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _CLICK , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( b ) { a . fireEvent ( BI . StateEditor . EVENT _KEY _DOWN , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _VALID , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { a . _sh
margin : a . css ( "margin" ) } ) , b . element } , update : function ( ) { } } , start : function ( a , b ) { } , stop : function ( b , c ) { a . fireEvent ( BI . SortList . EVENT _CHANGE ) } , over : function ( a , b ) { } } ) } , _formatItems : function ( a ) { return BI . each ( a , function ( a , b ) { b = BI . stripEL ( b ) , b . cls = b . cls ? b . cls + " sort-item" : "sort-item" , b . attributes = { sorted : b . value } } ) , a } , hasNext : function ( ) { return this . loader . hasNext ( ) } , addItems : function ( a ) { this . loader . addItems ( a ) } , populate : function ( a ) { a && ( arguments [ 0 ] = this . _formatItems ( a ) ) , this . loader . populate . apply ( this . loader , arguments ) } , empty : function ( ) { this . loader . empty ( ) } , setNotSelectedValue : function ( ) { this . loader . setNotSelectedValue . apply ( this . loader , arguments ) } , getNotSelectedValue : function ( ) { return this . loader . getNotSelectedValue ( ) } , setValue : function ( ) { this . loader . setValue . apply ( this . loader , arguments ) } , getValue : function ( ) { return this . loader . getValue ( ) } , getAllButtons : function ( ) { return this . loader . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . loader . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . loader . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . loader . getNotSelectedButtons ( ) } , getIndexByValue : function ( a ) { return this . loader . getIndexByValue ( a ) } , getNodeById : function ( a ) { return this . loader . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . loader . getNodeByValue ( a ) } , getSortedValues : function ( ) { return this . loader . element . sortable ( "toArray" , { attribute : "sorted" } ) } } ) , BI . SortList . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.sort_list" , BI . SortList ) , BI . AllCountPager = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . AllCountPager . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-all-count-pager" , height : 30 , pages : 1 , curr : 1 , count : 1 } ) } , _init : function ( ) { BI . AllCountPager . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . editor = BI . createWidget ( { type : "bi.small_text_editor" , cls : "pager-editor" , validationChecker : function ( b ) { return 0 === a . rowCount . getValue ( ) && "0" === b || BI . isPositiveInteger ( b ) } , hgap : 4 , vgap : 0 , value : b . curr , errorText : BI . i18nText ( "BI-Please_Input_Positive_Integer" ) , width : 35 , height : 20 } ) , this . pager = BI . createWidget ( { type : "bi.pager" , width : 36 , layouts : [ { type : "bi.horizontal" , hgap : 1 , vgap : 1 } ] , dynamicShow : ! 1 , pages : b . pages , curr : b . curr , groups : 0 , first : ! 1 , last : ! 1 , prev : { type : "bi.icon_button" , value : "prev" , title : BI . i18nText ( "BI-Previous_Page" ) , warningTitle : BI . i18nText ( "BI-Current_Is_First_Page" ) , height : 20 , cls : "all-pager-prev column-pre-page-h-font" } , next : { type : "bi.icon_button" , value : "next" , title : BI . i18nText ( "BI-Next_Page" ) , warningTitle : BI . i18nText ( "BI-Current_Is_Last_Page" ) , height : 20 , cls : "all-pager-next column-next-page-h-font" } , hasPrev : b . hasPrev , hasNext : b . hasNext , firstPage : b . firstPage , lastPage : b . lastPage } ) , this . editor . on ( BI . TextEditor . EVENT _CONFIRM , function ( ) { a . pager . setValue ( BI . parseInt ( a . editor . getValue ( ) ) ) , a . fireEvent ( BI . AllCountPager . EVENT _CHANGE ) } ) , this . pager . on ( BI . Pager . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . AllCountPager . EVENT _CHANGE ) } ) , this . pager . on ( BI . Pager . EVENT _AFTER _POPULATE , function ( ) { a . editor . setValue ( a . pager . getCurrentPage ( ) ) } ) , this . allPages = BI . createWidget ( { type : "bi.label" , width : 30 , title : b . pages , text : "/" + b . pages } ) , this . rowCount = BI . createWidget ( { type : "bi.label" , height : b . height , hgap : 5 , text : b . count , title : b . count } ) ; var c = BI . createWidget ( { type : "bi.left" , height : b . height , scrollable : ! 1 , items : [ { type : "bi.label" , height : b . height , text : BI . i18nText ( "BI-Basic_Total" ) , width : 15 } , this . rowCount , { type : "bi.label" , height : b . height , text : BI . i18nText ( "BI-Tiao_Data" ) , width : 50 , textAlign : "left" } ] } ) ; BI . createWidget ( { type : "bi.center_adapt" , element : this , columnSize : [ "" , 35 , 40 , 36 ] , items : [ c , this . editor , this . allPages , this . pager ] } ) } , alwaysShowPager : ! 0 , setAllPages : function ( a ) { this . allPages . setText ( "/" + a ) , this . allPages . setTitle ( a ) , this . pager . setAllPages ( a ) , this . editor . setEnable ( a >= 1 ) } , setValue : function ( a ) { this . pager . setValue ( a ) } , setVPage : function ( a ) { this . pager . setValue ( a ) } , setCount : function ( a ) { this . rowCount . setText ( a ) , this . rowCount . setTitle ( a ) } , getCurrentPage : function ( ) { return this . pager . getCurrentPage ( ) } , hasPrev : function ( ) { return this . pager . hasPrev ( ) } , hasNext : function ( ) { return this . pager . hasNext ( ) } , setPagerV
readonly : ! 0 , hgap : 5 } ) } , _init : function ( ) { BI . SegmentButton . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . text = BI . createWidget ( { type : "bi.label" , element : this , height : a . height - 2 , whiteSpace : a . whiteSpace , text : a . text , value : a . value , hgap : a . hgap } ) } , setSelected : function ( ) { BI . SegmentButton . superclass . setSelected . apply ( this , arguments ) } , setText : function ( a ) { BI . SegmentButton . superclass . setText . apply ( this , arguments ) , this . text . setText ( a ) } , destroy : function ( ) { BI . SegmentButton . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.segment_button" , BI . SegmentButton ) , BI . Segment = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Segment . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-segment" , items : [ ] , height : 24 } ) } , _init : function ( ) { BI . Segment . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . buttonGroup = BI . createWidget ( { element : this , type : "bi.button_group" , items : BI . createItems ( b . items , { type : "bi.segment_button" , height : b . height - 2 , whiteSpace : b . whiteSpace } ) , layout : [ { type : "bi.center" } ] } ) , this . buttonGroup . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . buttonGroup . on ( BI . ButtonGroup . EVENT _CHANGE , function ( b , c ) { a . fireEvent ( BI . Segment . EVENT _CHANGE , b , c ) } ) } , setValue : function ( a ) { this . buttonGroup . setValue ( a ) } , setEnabledValue : function ( a ) { this . buttonGroup . setEnabledValue ( a ) } , getValue : function ( ) { return this . buttonGroup . getValue ( ) } } ) , BI . Segment . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.segment" , BI . Segment ) , BI . AdaptiveTable = BI . inherit ( BI . Widget , { _const : { perColumnSize : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . AdaptiveTable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-adaptive-table" , el : { type : "bi.resizable_table" } , isNeedResize : ! 0 , isNeedFreeze : ! 1 , freezeCols : [ ] , isNeedMerge : ! 1 , mergeCols : [ ] , mergeRule : BI . emptyFn , columnSize : [ ] , minColumnSize : [ ] , maxColumnSize : [ ] , headerRowSize : 25 , rowSize : 25 , regionColumnSize : [ ] , header : [ ] , items : [ ] , crossHeader : [ ] , crossItems : [ ] } ) } , _init : function ( ) { BI . AdaptiveTable . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _digest ( ) ; this . table = BI . createWidget ( b . el , { type : "bi.resizable_table" , element : this , width : b . width , height : b . height , isNeedResize : b . isNeedResize , isResizeAdapt : ! 1 , isNeedFreeze : b . isNeedFreeze , freezeCols : c . freezeCols , isNeedMerge : b . isNeedMerge , mergeCols : b . mergeCols , mergeRule : b . mergeRule , columnSize : c . columnSize , headerRowSize : b . headerRowSize , rowSize : b . rowSize , regionColumnSize : c . regionColumnSize , header : b . header , items : b . items , crossHeader : b . crossHeader , crossItems : b . crossItems } ) , this . table . on ( BI . Table . EVENT _TABLE _SCROLL , function ( ) { a . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _AFTER _REGION _RESIZE , function ( ) { b . regionColumnSize = this . getRegionColumnSize ( ) , a . _populate ( ) , a . table . populate ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _REGION _RESIZE , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , function ( ) { b . columnSize = this . getColumnSize ( ) , a . _populate ( ) , a . table . populate ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , arguments ) } ) } , _getFreezeColLength : function ( ) { var a = this . options ; return a . isNeedFreeze === ! 0 ? BI . clamp ( a . freezeCols . length , 0 , a . columnSize . length ) : 0 } , _digest : function ( ) { var a = this . options , b = a . columnSize . slice ( ) , c = a . regionColumnSize . slice ( ) , d = a . freezeCols . slice ( ) , e = a . regionColumnSize [ 0 ] , f = this . _getFreezeColLength ( ) ; ( ! e || e > a . width - 10 || e < 10 ) && ( e = ( f > a . columnSize . length / 2 ? 2 / 3 : 1 / 3 ) * a . width ) , 0 === f && ( e = 0 ) , d . length >= b . length && ( d = [ ] ) , BI . isNumber ( b [ 0 ] ) || ( b = a . minColumnSize . slice ( ) ) ; var g = 0 , h = 0 ; return BI . each ( b , function ( a , b ) { a < f && ( g += b ) , h += b } ) , f > 0 && ( b [ f - 1 ] = BI . clamp ( e - ( g - b [ f - 1 ] ) , a . minColumnSize [ f - 1 ] || 10 , a . maxColumnSize [ f - 1 ] || Number . MAX _VALUE ) ) , b . length > 0 && ( b [ b . length - 1 ] = BI . clamp ( a . width - BI . GridTableScrollbar . SIZE - e - ( h - g - b [ b . length - 1 ] ) , a . minColumnSize [ b . length - 1 ] || 10 , a . maxColumnSize [ b . length - 1 ] || Number . MAX _VALUE ) ) , c [ 0 ] = e , { freezeCols : d , columnSize : b , regionColumnSize : c } } , _populate : function ( ) { var a = this . options , b = this . _digest ( ) ; a . regionColumnSize = b . regionColumnSize , a . columnSize = b . columnSize , this . table . setColumnSize ( b . columnSize ) , this . table . se
this . populate ( this . options . items ) } , _stratification : function ( ) { var a = [ ] ; return this . tree . recursion ( function ( b , c ) { b . leaf = b . isLeaf ( ) , a [ c . length - 1 ] || ( a [ c . length - 1 ] = [ ] ) , a [ c . length - 1 ] . push ( b ) } ) , a } , _calculateLeaves : function ( ) { function a ( b ) { var c = 0 ; return b . isLeaf ( ) ? 1 : ( BI . each ( b . getChildren ( ) , function ( b , d ) { c += a ( d ) } ) , b . set ( "leaves" , c ) , c ) } var b = 0 ; return b = a ( this . tree . getRoot ( ) ) } , _translate : function ( a ) { var b = [ ] , c = a . length ; return BI . each ( a , function ( d , e ) { b [ d ] || ( b [ d ] = [ ] ) , BI . each ( e , function ( f , g ) { if ( g . isLeaf ( ) && d < c - 1 ) { var h = new BI . Node ( BI . UUID ( ) ) ; h . isNew = ! 0 ; var i = 0 ; if ( f > 0 ) { var j = e [ f - 1 ] . getLastChild ( ) ; i = a [ d + 1 ] . indexOf ( j ) + 1 } a [ d + 1 ] . splice ( i , 0 , g ) ; var k = g . parent . getChildIndex ( g . id ) ; g . parent . removeChildByIndex ( k ) , g . parent . addChild ( h , k ) , h . addChild ( g ) , b [ d ] . push ( h ) , e [ f ] = h } else b [ d ] . push ( g ) } ) } ) , b } , _fill : function ( a ) { var b = [ ] , c = a . length ; return BI . each ( a , function ( d , e ) { b [ d ] || ( b [ d ] = [ ] ) , BI . each ( e , function ( f , g ) { if ( g . isLeaf ( ) && d < c - 1 ) { var h = new BI . Node ( BI . UUID ( ) ) ; h . leaf = ! 0 , h . width = g . width , h . height = g . height , h . isNew = ! 0 ; var i = 0 ; if ( f > 0 ) { var j = e [ f - 1 ] . getLastChild ( ) ; i = a [ d + 1 ] . indexOf ( j ) + 1 } a [ d + 1 ] . splice ( i , 0 , h ) , g . addChild ( h ) } b [ d ] . push ( g ) } ) } ) , b } , _adjust : function ( a ) { for ( ; ; ) { var b = ! 1 ; if ( BI . backEach ( a , function ( a , c ) { BI . each ( c , function ( a , c ) { if ( ! c . isNew ) { var d = ! 0 ; if ( BI . any ( c . getChildren ( ) , function ( a , b ) { if ( ! b . isNew ) return d = ! 1 , ! 0 } ) , ! c . isLeaf ( ) && d === ! 0 ) { var e = [ ] ; BI . each ( c . getChildren ( ) , function ( a , b ) { e = e . concat ( b . getChildren ( ) ) } ) , c . removeAllChilds ( ) , BI . each ( e , function ( a , b ) { c . addChild ( b ) } ) ; var f = new BI . Node ( BI . UUID ( ) ) ; f . isNew = ! 0 ; var g = c . parent . getChildIndex ( c . id ) ; c . parent . removeChildByIndex ( g ) , c . parent . addChild ( f , g ) , f . addChild ( c ) , b = ! 0 } } } ) } ) , b === ! 1 ) break ; a = this . _stratification ( ) } return a } , _calculateWidth : function ( ) { function a ( b ) { var c = 0 ; return b . isLeaf ( ) ? b . width : ( BI . each ( b . getChildren ( ) , function ( b , d ) { c += a ( d ) } ) , c ) } function b ( a ) { var c = 0 ; return a . isLeaf ( ) ? a . height : ( BI . each ( a . getChildren ( ) , function ( a , d ) { c += b ( d ) } ) , c ) } var c = ( this . options , 0 ) ; return c = this . _isVertical ( ) ? a ( this . tree . getRoot ( ) ) : b ( this . tree . getRoot ( ) ) } , _isVertical : function ( ) { var a = this . options ; return a . direction === BI . Direction . Top || a . direction === BI . Direction . Bottom } , _calculateHeight : function ( ) { function a ( b ) { var c = 0 ; return BI . each ( b . getChildren ( ) , function ( b , d ) { c = Math . max ( c , a ( d ) ) } ) , c + ( b . height || 0 ) } function b ( a ) { var c = 0 ; return BI . each ( a . getChildren ( ) , function ( a , d ) { c = Math . max ( c , b ( d ) ) } ) , c + ( a . width || 0 ) } var c = ( this . options , 0 ) ; return c = this . _isVertical ( ) ? a ( this . tree . getRoot ( ) ) : b ( this . tree . getRoot ( ) ) } , _calculateXY : function ( a ) { var b = ( this . options , this . _calculateWidth ( ) ) , c = this . _calculateHeight ( ) , d = a . length , e = this . _calculateLeaves ( ) , f = { } , g = c / d ; return BI . each ( a , function ( a , c ) { var d = [ ] ; BI . each ( c , function ( a , b ) { d [ a ] = ( b . get ( "leaves" ) || 1 ) / e } ) , BI . each ( c , function ( c , e ) { var h = BI . sum ( d . slice ( 0 , c ) ) , i = h * b + d [ c ] * b / 2 , j = a * g + g / 2 ; f [ e . id ] = { x : i , y : j } } ) } ) , f } , _stroke : function ( a , b ) { var c = this . _calculateHeight ( ) , d = a . length , e = c / d , f = this , g = this . options ; switch ( g . direction ) { case BI . Direction . Top : BI . each ( a , function ( a , c ) { BI . each ( c , function ( a , c ) { if ( c . getChildrenLength ( ) > 0 && ! c . leaf ) { var d = "" , h = b [ c . id ] , i = h . y + e / 2 ; d += "M" + h . x + "," + ( h . y + g . centerOffset ) + "L" + h . x + "," + i ; var j = [ ] ; BI . each ( c . getChildren ( ) , function ( a , c ) { var e = j [ a ] = b [ c . id ] ; d += "M" + e . x + "," + ( e . y + g . centerOffset ) + "L" + e . x + "," + i } ) , j . length > 0 && ( d += "M" + BI . first ( j ) . x + "," + i + "L" + BI . last ( j ) . x + "," + i ) , f . svg . path ( d ) . attr ( "stroke" , "#d4dadd" ) } } ) } ) ; break ; case BI . Direction . Bottom : BI . each ( a , function ( a , c ) { BI . each ( c , function ( a , c ) { if ( c . getChildrenLength ( ) > 0 && ! c . leaf ) { var d = "" , h = b [ c . id ] , i = h . y - e / 2 ; d += "M" + h . x + "," + ( h . y - g . centerOffset ) + "L" + h . x + "," + i ; var j = [ ] ; BI . each ( c . getChildren ( ) , function ( a , c ) { var e = j [ a ] = b [ c . id ] ; d += "M" + e . x + "," + ( e . y - g . centerOffset ) + "L" + e . x + "," + i } ) , j . length > 0 && ( d += "M" + BI . first ( j ) . x + "," + i + "L" + BI . last ( j ) . x + "," + i ) , f . svg . path ( d ) . attr ( "stroke" , "#d4dadd" ) } } ) } ) ; break ; case BI . Direction . Left : BI . each ( a , function ( a , c ) { BI . each ( c , function ( a , c ) { if ( c . getChildrenLength ( ) > 0 && ! c . leaf ) { var d = "" , h = b [ c . id ] , i = h . y + e / 2 ; d += "M" + ( h . y + g . centerOffset ) + "," + h . x + "L" + i + "," + h . x ; var j = [ ] ; BI . each ( c . getChildren ( ) , function ( a , c ) { var e = j [ a ] = b [ c . id ] ; d += "M" + ( e . y + g . centerOffset ) + "," + e . x + "L" + i + "," + e . x } ) , j . length > 0 && ( d += "M" + i + "," + BI . first ( j ) . x + "L" + i + "," + BI . last ( j ) . x ) , f
var a = BI . DatePicker . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-date-picker bi-background" , height : 25 , min : "1900-01-01" , max : "2099-12-31" } ) } , _init : function ( ) { BI . DatePicker . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . _year = Date . getDate ( ) . getFullYear ( ) , this . _month = Date . getDate ( ) . getMonth ( ) , this . left = BI . createWidget ( { type : "bi.icon_button" , cls : "pre-page-h-font" , width : 25 , height : 25 } ) , this . left . on ( BI . IconButton . EVENT _CHANGE , function ( ) { 0 === a . _month ? a . setValue ( { year : a . year . getValue ( ) - 1 , month : 11 } ) : a . setValue ( { year : a . year . getValue ( ) , month : a . month . getValue ( ) - 1 } ) , a . fireEvent ( BI . DatePicker . EVENT _CHANGE ) , a . _checkLeftValid ( ) , a . _checkRightValid ( ) } ) , this . right = BI . createWidget ( { type : "bi.icon_button" , cls : "next-page-h-font" , width : 25 , height : 25 } ) , this . right . on ( BI . IconButton . EVENT _CHANGE , function ( ) { 11 === a . _month ? a . setValue ( { year : a . year . getValue ( ) + 1 , month : 0 } ) : a . setValue ( { year : a . year . getValue ( ) , month : a . month . getValue ( ) + 1 } ) , a . fireEvent ( BI . DatePicker . EVENT _CHANGE ) , a . _checkLeftValid ( ) , a . _checkRightValid ( ) } ) , this . year = BI . createWidget ( { type : "bi.year_date_combo" , min : b . min , max : b . max } ) , this . year . on ( BI . YearDateCombo . EVENT _CHANGE , function ( ) { a . setValue ( { year : a . year . getValue ( ) , month : a . month . getValue ( ) } ) , a . fireEvent ( BI . DatePicker . EVENT _CHANGE ) } ) , this . month = BI . createWidget ( { type : "bi.month_date_combo" } ) , this . month . on ( BI . MonthDateCombo . EVENT _CHANGE , function ( ) { a . setValue ( { year : a . year . getValue ( ) , month : a . month . getValue ( ) } ) , a . fireEvent ( BI . DatePicker . EVENT _CHANGE ) } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : this . left , width : 25 } , { type : "bi.center_adapt" , items : [ { type : "bi.horizontal" , width : 100 , items : [ this . year , this . month ] } ] } , { el : this . right , width : 25 } ] } ) , this . setValue ( { year : this . _year , month : this . _month } ) } , _checkLeftValid : function ( ) { var a = this . options , b = ! ( 0 === this . _month && this . _year === Date . parseDateTime ( a . min , "%Y-%X-%d" ) . getFullYear ( ) ) ; return this . left . setEnable ( b ) , b } , _checkRightValid : function ( ) { var a = this . options , b = ! ( 11 === this . _month && this . _year === Date . parseDateTime ( a . max , "%Y-%X-%d" ) . getFullYear ( ) ) ; return this . right . setEnable ( b ) , b } , setValue : function ( a ) { this . _year = a . year , this . _month = a . month , this . year . setValue ( a . year ) , this . month . setValue ( a . month ) , this . _checkLeftValid ( ) , this . _checkRightValid ( ) } , getValue : function ( ) { return { year : this . year . getValue ( ) , month : this . month . getValue ( ) } } } ) , BI . DatePicker . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.date_picker" , BI . DatePicker ) , BI . DateCalendarPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . DateCalendarPopup . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-date-calendar-popup" , min : "1900-01-01" , max : "2099-12-31" , selectedTime : null } ) } , _createNav : function ( a ) { var b = BI . Calendar . getDateJSONByPage ( a ) , c = BI . createWidget ( { type : "bi.calendar" , logic : { dynamic : ! 0 } , min : this . options . min , max : this . options . max , year : b . year , month : b . month , day : this . selectedTime . day } ) ; return c } , _init : function ( ) { BI . DateCalendarPopup . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . today = Date . getDate ( ) , this . _year = this . today . getFullYear ( ) , this . _month = this . today . getMonth ( ) , this . _day = this . today . getDate ( ) , this . selectedTime = b . selectedTime || { year : this . _year , month : this . _month , day : this . _day } , this . datePicker = BI . createWidget ( { type : "bi.date_picker" , min : b . min , max : b . max } ) , this . calendar = BI . createWidget ( { direction : "top" , element : this , logic : { dynamic : ! 0 } , type : "bi.navigation" , tab : this . datePicker , cardCreator : BI . bind ( this . _createNav , this ) , afterCardCreated : function ( ) { } , afterCardShow : function ( ) { this . setValue ( a . selectedTime ) } } ) , this . datePicker . on ( BI . DatePicker . EVENT _CHANGE , function ( ) { a . selectedTime = a . datePicker . getValue ( ) , a . selectedTime . day = 1 , a . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( a . selectedTime ) ) } ) , this . calendar . on ( BI . Navigation . EVENT _CHANGE , function ( ) { a . selectedTime = a . calendar . getValue ( ) , a . setValue ( a . selectedTime ) , a . fireEvent ( BI . DateCalendarPopup . EVENT _CHANGE ) } ) } , setValue : function ( a ) { this . datePicker . setValue ( a ) , this . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( a ) ) , this . calendar . setValue ( a ) , this . selectedTime = a } , getValue : function ( ) { return this . selectedTime }
} ) } , hover : function ( ) { BI . DownListGroupItem . superclass . hover . apply ( this , arguments ) , this . icon1 . element . addClass ( "hover" ) , this . icon2 . element . addClass ( "hover" ) } , dishover : function ( ) { BI . DownListGroupItem . superclass . dishover . apply ( this , arguments ) , this . icon1 . element . removeClass ( "hover" ) , this . icon2 . element . removeClass ( "hover" ) } , doClick : function ( ) { BI . DownListGroupItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . DownListGroupItem . EVENT _CHANGE , this . getValue ( ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , setValue : function ( a ) { this . icon1 . setSelected ( this . _digest ( a ) ) } } ) , BI . DownListGroupItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.down_list_group_item" , BI . DownListGroupItem ) , BI . DownListPopup = BI . inherit ( BI . Pane , { constants : { nextIcon : "pull-right-e-font" , height : 25 , iconHeight : 12 , iconWidth : 12 , hgap : 0 , vgap : 0 , border : 1 } , _defaultConfig : function ( ) { var a = BI . DownListPopup . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-down-list-popup" , items : [ ] , chooseType : BI . Selection . Multi } ) } , _init : function ( ) { BI . DownListPopup . superclass . _init . apply ( this , arguments ) , this . singleValues = [ ] , this . childValueMap = { } , this . fatherValueMap = { } ; var a = this , b = this . options , c = this . _createChildren ( b . items ) ; this . popup = BI . createWidget ( { type : "bi.button_tree" , items : BI . createItems ( c , { } , { adjustLength : - 2 } ) , layouts : [ { type : "bi.vertical" , hgap : this . constants . hgap , vgap : this . constants . vgap } ] , value : this . _digest ( b . value ) , chooseType : b . chooseType } ) , this . popup . on ( BI . ButtonTree . EVENT _CHANGE , function ( b , c ) { var d = b ; if ( BI . isNotNull ( a . childValueMap [ b ] ) ? ( d = a . childValueMap [ b ] , a . fireEvent ( BI . DownListPopup . EVENT _SON _VALUE _CHANGE , d , a . fatherValueMap [ b ] ) ) : a . fireEvent ( BI . DownListPopup . EVENT _CHANGE , d , c ) , ! a . singleValues . contains ( d ) ) { var e = a . getValue ( ) , f = [ ] ; BI . each ( e , function ( a , b ) { b . value != d && f . push ( b ) } ) , a . setValue ( f ) } } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . popup ] } ) } , _createChildren : function ( a ) { var b = this , c = [ ] ; return BI . each ( a , function ( d , e ) { var f = { type : "bi.down_list_group" , items : [ ] } ; if ( BI . each ( e , function ( a , c ) { BI . isNotEmptyArray ( c . children ) && ! BI . isEmpty ( c . el ) ? ( c . type = "bi.combo_group" , c . cls = "down-list-group" , c . trigger = "hover" , c . isNeedAdjustWidth = ! 1 , c . el . title = c . el . title || c . el . text , c . el . type = "bi.down_list_group_item" , c . el . logic = { dynamic : ! 0 } , c . el . height = b . constants . height , c . el . iconCls2 = b . constants . nextIcon , c . popup = { lgap : 4 , el : { type : "bi.button_tree" , chooseType : 0 , layouts : [ { type : "bi.vertical" } ] } } , c . el . childValues = [ ] , BI . each ( c . children , function ( a , d ) { var e = BI . deepClone ( c . el . value ) , f = BI . deepClone ( d . value ) ; b . singleValues . push ( d . value ) , d . type = "bi.down_list_item" , d . extraCls = " child-down-list-item" , d . title = d . title || d . text , d . textRgap = 10 , d . isNeedAdjustWidth = ! 1 , d . logic = { dynamic : ! 0 } , d . father = e , b . fatherValueMap [ b . _createChildValue ( e , f ) ] = e , b . childValueMap [ b . _createChildValue ( e , f ) ] = f , d . value = b . _createChildValue ( e , f ) , c . el . childValues . push ( d . value ) } ) ) : ( c . type = "bi.down_list_item" , c . title = c . title || c . text , c . textRgap = 10 , c . isNeedAdjustWidth = ! 1 , c . logic = { dynamic : ! 0 } ) ; var d = { } ; d . el = c , f . items . push ( d ) } ) , b . _isGroup ( f . items ) && BI . each ( f . items , function ( a , c ) { b . singleValues . push ( c . el . value ) } ) , c . push ( f ) , b . _needSpliter ( d , a . length ) ) { var g = BI . createWidget ( { type : "bi.vertical" , items : [ { el : { type : "bi.layout" , cls : "bi-down-list-spliter bi-border-top cursor-pointer" , height : 0 } } ] , cls : "bi-down-list-spliter-container cursor-pointer" , lgap : 10 , rgap : 10 } ) ; c . push ( g ) } } ) , c } , _isGroup : function ( a ) { return a . length > 1 } , _needSpliter : function ( a , b ) { return a < b - 1 } , _createChildValue : function ( a , b ) { return a + "_" + b } , _digest : function ( a ) { var b = this , c = [ ] ; return BI . each ( a , function ( a , d ) { var e ; e = BI . isNotNull ( d . childValue ) ? b . _createChildValue ( d . value , d . childValue ) : d . value , c . push ( e ) } ) , c } , _checkValues : function ( a ) { function b ( b ) { switch ( c . chooseType ) { case BI . Selection . Single : return a [ 0 ] ; case BI . Selection . Multi : return a [ b ] } } var c = this . options , d = [ ] ; return BI . each ( c . items , function ( a , c ) { BI . each ( c , function ( c , e ) { if ( BI . isNotNull ( e . children ) ) { var f = BI . pluck ( e . children , "value" ) ; BI . contains ( f , b ( a ) ) && d . push ( b ( a ) ) } else e . value === b ( a ) && d . push (
if ( c > - 1 ) { d = b . split ( "e" ) ; var e = BI . size ( d [ 0 ] . split ( "." ) [ 1 ] ) , f = BI . parseInt ( d [ 1 ] . substring ( 1 ) ) ; return e - f } return d = b . split ( "." ) , d . length > 1 ? d [ 1 ] . length : 0 } , _assertValue : function ( a ) { return a <= this . min ? this . min : a >= this . max ? this . max : a } , getValue : function ( ) { return this . valueOne <= this . valueTwo ? { min : this . valueOne , max : this . valueTwo } : { min : this . valueTwo , max : this . valueOne } } , setMinAndMax : function ( a ) { var b = BI . parseFloat ( a . min ) , c = BI . parseFloat ( a . max ) ; ! isNaN ( b ) && ! isNaN ( c ) && c >= b && ( this . min = b , this . max = c , this . valueOne = b , this . valueTwo = c , this . precision = this . _getPrecision ( ) , this . _setDraggableEnable ( ! 0 ) ) , c === b && this . _setDraggableEnable ( ! 1 ) } , setValue : function ( a ) { var b = this . options , c = BI . parseFloat ( a . min ) , d = BI . parseFloat ( a . max ) ; c = b . digit === ! 1 ? c : c . toFixed ( b . digit ) , d = b . digit === ! 1 ? d : d . toFixed ( b . digit ) , isNaN ( c ) || isNaN ( d ) || ( this . _checkValidation ( c ) && ( this . valueOne = c ) , this . _checkValidation ( d ) && ( this . valueTwo = d ) , c < this . min && ( this . valueOne = this . min ) , d > this . max && ( this . valueTwo = this . max ) ) } , reset : function ( ) { this . _setVisible ( ! 1 ) , this . enable = ! 1 , this . valueOne = "" , this . valueTwo = "" , this . min = NaN , this . max = NaN , this . _setBlueTrackWidth ( 0 ) } , populate : function ( ) { isNaN ( this . min ) || isNaN ( this . max ) || ( this . enable = ! 0 , this . _setVisible ( ! 0 ) , this . _setErrorText ( ) , ( BI . isNumeric ( this . valueOne ) || BI . isNotEmptyString ( this . valueOne ) ) && ( BI . isNumeric ( this . valueTwo ) || BI . isNotEmptyString ( this . valueTwo ) ) ? ( this . labelOne . setValue ( this . valueOne ) , this . labelTwo . setValue ( this . valueTwo ) , this . _setAllPosition ( this . _getPercentByValue ( this . valueOne ) , this . _getPercentByValue ( this . valueTwo ) ) ) : ( this . labelOne . setValue ( this . min ) , this . labelTwo . setValue ( this . max ) , this . _setAllPosition ( 0 , 100 ) ) ) } } ) , BI . IntervalSlider . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.interval_slider" , BI . IntervalSlider ) , BI . AccurateCalculationModel = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . AccurateCalculationModel . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "" } ) } , _init : function ( ) { BI . AccurateCalculationModel . superclass . _init . apply ( this , arguments ) } , _getMagnitude : function ( a ) { for ( var b = "1" , c = 0 ; c < a ; c ++ ) b += "0" ; return BI . parseInt ( b ) } , _formatDecimal : function ( a , b ) { if ( a . numDecimalLength !== b . numDecimalLength ) { var c = a . numDecimalLength - b . numDecimalLength ; if ( c > 0 ) var d = b ; else { var d = a ; c = 0 - c } for ( var e = 0 ; e < c ; e ++ ) "0" === d . numDecimal && 0 === e || ( d . numDecimal += "0" ) } } , _stringNumberFactory : function ( a ) { var b = a . toString ( ) , c = b . split ( "." ) , d = c [ 0 ] ; if ( 1 === c . length ) var e = "0" , f = 0 ; else var e = c [ 1 ] , f = c [ 1 ] . length ; return { numInteger : d , numDecimal : e , numDecimalLength : f } } , _accurateSubtraction : function ( a , b ) { function c ( a , b ) { return a . numDecimal . length >= b . numDecimal . length ? a . numDecimal . length : b . numDecimal . length } function d ( a , b ) { for ( var c = b - a . length , d = 0 ; d < c ; d ++ ) a = "0" + a ; return a } var e = this . _stringNumberFactory ( a ) , f = this . _stringNumberFactory ( b ) , g = BI . parseInt ( e . numInteger ) - BI . parseInt ( f . numInteger ) ; this . _formatDecimal ( e , f ) ; var h = c ( e , f ) ; if ( BI . parseInt ( e . numDecimal ) >= BI . parseInt ( f . numDecimal ) ) var i = ( BI . parseInt ( e . numDecimal ) - BI . parseInt ( f . numDecimal ) ) . toString ( ) , j = d ( i , h ) ; else { g -- ; var k = this . _getMagnitude ( h ) , i = ( k + BI . parseInt ( e . numDecimal ) - BI . parseInt ( f . numDecimal ) ) . toString ( ) , j = d ( i , h ) } var l = g + "." + j ; return BI . parseFloat ( l ) } , _accurateAddition : function ( a , b ) { function c ( a , b ) { for ( var c = b - a . length , d = 0 ; d < c ; d ++ ) a = "0" + a ; return a } var d = this . _stringNumberFactory ( a ) , e = this . _stringNumberFactory ( b ) , f = BI . parseInt ( d . numInteger ) + BI . parseInt ( e . numInteger ) ; this . _formatDecimal ( d , e ) ; var g = ( BI . parseInt ( d . numDecimal ) + BI . parseInt ( e . numDecimal ) ) . toString ( ) ; "0" !== g && ( g . length <= d . numDecimal . length ? g = c ( g , d . numDecimal . length ) : ( f ++ , g = g . slice ( 1 ) ) ) ; var h = f + "." + g ; return BI . parseFloat ( h ) } , _accurateMultiplication : function ( a , b ) { var c = this . _stringNumberFactory ( a ) , d = this . _stringNumberFactory ( b ) , e = BI . parseInt ( c . numInteger ) * BI . parseInt ( d . numInteger ) , f = this . _accurateDivisionTenExponent ( BI . parseInt ( c . numDecimal ) * BI . parseInt ( d . numInteger ) , c . numDecimalLength ) , g = this . _accurateDivisionTenExponent ( BI . parseInt ( c . numInteger ) * BI . parseInt ( d . numDecimal ) , d . numDecimalLength ) , h = this . _accurateDivisionTenExponent ( BI . parseInt ( c . numDecimal ) * BI . parseInt ( d . numDecimal ) , c . numDecimalLength + d . numDecimalLength ) ; return this . _acc
text : "" , height : 30 , isEditorExist : ! 0 , selected : ! 1 , defaultEditorValue : "1" } ) } , _init : function ( ) { BI . MultiDateSegment . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . radio = BI . createWidget ( { type : "bi.radio" , selected : b . selected } ) , this . radio . on ( BI . Controller . EVENT _CHANGE , function ( b ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . textEditor = BI . createWidget ( { type : "bi.text_editor" , value : this . constants . defaultEditorValue , title : function ( ) { return a . textEditor . getValue ( ) } , tipType : "success" , cls : "bi-multidate-editor" , width : this . constants . textWidth , height : this . constants . itemHeight } ) , this . textEditor . on ( BI . Controller . EVENT _CHANGE , function ( b ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , cls : "bi-multidate-normal-label" , text : b . text , height : this . constants . itemHeight } ) , this . _createSegment ( ) } , _createSegment : function ( ) { return this . options . isEditorExist === ! 0 ? BI . createWidget ( { element : this , type : "bi.left" , items : [ { el : { type : "bi.center_adapt" , items : [ this . radio ] , height : this . constants . itemHeight } , lgap : 0 } , { el : { type : "bi.center_adapt" , items : [ this . textEditor ] , widgetName : "textEditor" } , lgap : this . constants . maxGap } , { el : this . text , lgap : this . constants . minGap } ] } ) : BI . createWidget ( { element : this , type : "bi.left" , items : [ { el : { type : "bi.center_adapt" , items : [ this . radio ] , height : this . constants . itemHeight } , lgap : 0 } , { el : this . text , lgap : this . constants . maxGap } ] } ) } , setSelected : function ( a ) { BI . isNotNull ( this . radio ) && ( this . radio . setSelected ( a ) , this . textEditor . setEnable ( a ) ) } , isSelected : function ( ) { return this . radio . isSelected ( ) } , getValue : function ( ) { return this . options . value } , getInputValue : function ( ) { return 0 | this . textEditor . getValue ( ) } , setInputValue : function ( a ) { this . textEditor . setValue ( a ) } , isEditorExist : function ( ) { return this . options . isEditorExist } } ) , BI . MultiDateSegment . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multidate_segment" , BI . MultiDateSegment ) , BI . WeekCard = BI . inherit ( BI . MultiDateCard , { _defaultConfig : function ( ) { return $ . extend ( BI . WeekCard . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multidate-weekcard" } ) } , _init : function ( ) { BI . WeekCard . superclass . _init . apply ( this , arguments ) } , dateConfig : function ( ) { return [ { selected : ! 0 , isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Week_Prev" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _WEEK _PREV } , { isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Week_Next" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _WEEK _AFTER } ] } , defaultSelectedItem : function ( ) { return BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _WEEK _PREV } } ) , BI . WeekCard . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.weekcard" , BI . WeekCard ) , BI . YearCard = BI . inherit ( BI . MultiDateCard , { _defaultConfig : function ( ) { return $ . extend ( BI . YearCard . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multidate-yearcard" } ) } , _init : function ( ) { BI . YearCard . superclass . _init . apply ( this , arguments ) } , dateConfig : function ( ) { return [ { selected : ! 0 , isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Year_Prev" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _PREV } , { isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Year_Next" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _AFTER } , { isEditorExist : ! 1 , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _BEGIN , text : BI . i18nText ( "BI-Multi_Date_Year_Begin" ) } , { isEditorExist : ! 1 , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _END , text : BI . i18nText ( "BI-Multi_Date_Year_End" ) } ] } , defaultSelectedItem : function ( ) { return BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _PREV } } ) , BI . YearCard . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.yearcard" , BI . YearCard ) , BI . MultiLayerSelectTreeCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiLayerSelectTreeCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer_select_tree-combo" , isDefaultInit : ! 1 , height : 30 , text : "" , items : [ ] , value : "" } ) } , _init : function ( ) { BI . MultiLayerSelectTreeCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : "bi.single_tree_trigger" , text : b . text , height : b . height , items : b . items , value : b . value } ) , this . popup = BI . createWidget ( { type : " bi . multilayer _select _tree
masker : { offset : { left : 1 , top : 1 , right : 2 , bottom : 33 } } , valueFormatter : b . valueFormatter , itemsCreator : function ( c , d ) { b . itemsCreator ( c , function ( b ) { 1 === c . times && BI . isNotNull ( c . keywords ) && a . trigger . setValue ( BI . deepClone ( a . getValue ( ) ) ) , d . apply ( a , arguments ) } ) } , value : b . value } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _START , function ( ) { a . _setStartValue ( "" ) , this . getSearcher ( ) . setValue ( a . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _STOP , function ( ) { a . _setStartValue ( "" ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _PAUSE , function ( ) { var b = this . getSearcher ( ) . getKeyword ( ) ; a . _join ( { type : BI . Selection . Multi , value : [ b ] } , function ( ) { a . storeValue . type === BI . Selection . Multi && a . storeValue . value . pushDistinct ( b ) , a . combo . setValue ( a . storeValue ) , a . _setStartValue ( b ) , c ( ) , a . populate ( ) , a . _setStartValue ( "" ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( b ) { var d = BI . last ( b ) ; b = BI . initial ( b || [ ] ) , b . length > 0 && a . _joinKeywords ( b , function ( ) { BI . isEndWithBlank ( d ) ? ( a . combo . setValue ( a . storeValue ) , c ( ) , a . combo . populate ( ) , a . _setStartValue ( "" ) ) : ( a . combo . setValue ( a . storeValue ) , c ( ) ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( b , d ) { d instanceof BI . MultiSelectBar ? a . _joinAll ( this . getValue ( ) , function ( ) { c ( ) } ) : a . _join ( this . getValue ( ) , function ( ) { c ( ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW , function ( ) { this . getCounter ( ) . setValue ( a . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { a . combo . isViewVisible ( ) || a . combo . showView ( ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! 1 , el : this . trigger , adjustLength : 1 , popup : { type : "bi.multi_select_popup_view" , ref : function ( ) { a . popup = this , a . trigger . setAdapter ( this ) } , listeners : [ { eventName : BI . MultiSelectPopupView . EVENT _CHANGE , action : function ( ) { a . storeValue = this . getValue ( ) , a . _adjust ( function ( ) { c ( ) } ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CONFIRM , action : function ( ) { a . _defaultState ( ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CLEAR , action : function ( ) { a . setValue ( ) , a . _defaultState ( ) } } ] , itemsCreator : b . itemsCreator , valueFormatter : b . valueFormatter , onLoaded : function ( ) { BI . nextTick ( function ( ) { a . combo . adjustWidth ( ) , a . combo . adjustHeight ( ) , a . trigger . getCounter ( ) . adjustView ( ) , a . trigger . getSearcher ( ) . adjustView ( ) } ) } } , value : b . value , hideChecker : function ( a ) { return 0 === d . element . find ( a . target ) . length } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { this . setValue ( a . storeValue ) , BI . nextTick ( function ( ) { a . populate ( ) } ) } ) , this . wants2Quit = ! 1 , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { a . trigger . stopEditing ( ) , a . requesting === ! 0 ? a . wants2Quit = ! 0 : a . fireEvent ( BI . MultiSelectInsertCombo . EVENT _CONFIRM ) } ) ; var d = BI . createWidget ( { type : "bi.trigger_icon_button" , width : b . height , height : b . height , cls : "multi-select-trigger-icon-button" } ) ; d . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { a . trigger . getCounter ( ) . hideView ( ) , a . combo . isViewVisible ( ) ? a . combo . hideView ( ) : a . combo . showView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : d , right : 0 , top : 0 , bottom : 0 } ] } ) } , _defaultState : function ( ) { this . trigger . stopEditing ( ) , this . combo . hideView ( ) } , _assertValue : function ( a ) { a || ( a = { } ) , a . type || ( a . type = BI . Selection . Multi ) , a . value || ( a . value = [ ] ) } , _makeMap : function ( a ) { return BI . makeObject ( a || [ ] ) } , _joinKeywords : function ( a , b ) { function c ( c ) { var e = d . _makeMap ( c ) ; BI . each ( a , function ( a , b ) { BI . isNotNull ( e [ b ] ) && d . storeValue . value [ d . storeValue . type === BI . Selection . Multi ? "pushDistinct" : "remove" ] ( b ) } ) , d . _adjust ( b ) } var d = this , e = this . options ; this . _assertValue ( this . storeValue ) , this . requesting = ! 0 , e . itemsCreator ( { type : BI . MultiSelectInsertCombo . REQ _GET _ALL _DATA , keywords : a } , function ( a ) { var b = BI . pluck ( a . items , "value" ) ; c ( b ) } ) } , _joinAll : function ( a , b ) { var c = this , d = this . options ; this . _assertValue ( a ) , this . requesting = ! 0 , d . itemsCreator ( { type : BI . MultiSelectInsertCombo . REQ _GET _ALL _DATA , keywords : [ this . trigger . getKey ( ) ] } , function ( d ) { var e = BI . pluck ( d . items , "value" ) ; if ( c . storeValue . type === a . type ) { var f = ! 1 , g = c . _makeMap ( c . storeValue . value ) ; return BI . each ( e , function ( a , b ) { BI . isNotNull ( g [ b ] ) && ( f = ! 0 , delete g [ b ] ) } ) , f && ( c . storeValue . value = BI . values ( g ) ) , void
a . stopPropagation ( ) } ) } , adjustView : function ( ) { this . switcher . adjustView ( ) } , hideView : function ( ) { this . switcher . empty ( ) , this . switcher . hideView ( ) } , setAdapter : function ( a ) { this . switcher . setAdapter ( a ) } , setValue : function ( a ) { this . switcher . setValue ( a ) } , setButtonChecked : function ( a ) { this . button . setValue ( a ) } , getValue : function ( ) { } , populate : function ( a ) { this . switcher . populate . apply ( this . switcher , arguments ) } } ) , BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE = "MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE" , BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW = "MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.multi_select_check_selected_switcher" , BI . MultiSelectCheckSelectedSwitcher ) , BI . MultiSelectInsertList = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectInsertList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-insert-list" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectInsertList . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . storeValue = { } ; var c = function ( ) { BI . isKey ( a . _startValue ) && a . storeValue . value [ a . storeValue . type === BI . Selection . All ? "remove" : "pushDistinct" ] ( a . _startValue ) } ; this . adapter = BI . createWidget ( { type : "bi.multi_select_loader" , cls : "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom" , itemsCreator : b . itemsCreator , valueFormatter : b . valueFormatter , logic : { dynamic : ! 1 } , el : { } } ) , this . adapter . on ( BI . MultiSelectLoader . EVENT _CHANGE , function ( ) { a . storeValue = this . getValue ( ) , c ( ) , a . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) , this . searcherPane = BI . createWidget ( { type : "bi.multi_select_search_pane" , cls : "bi-border-left bi-border-right bi-border-bottom" , valueFormatter : b . valueFormatter , keywordGetter : function ( ) { return a . trigger . getKeyword ( ) } , itemsCreator : function ( c , d ) { c . keyword = a . trigger . getKeyword ( ) , this . setKeyword ( c . keyword ) , b . itemsCreator ( c , d ) } } ) , this . searcherPane . setVisible ( ! 1 ) , this . trigger = BI . createWidget ( { type : "bi.searcher" , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( a , b ) { b ( ) } , adapter : this . adapter , popup : this . searcherPane , height : 200 , masker : ! 1 , listeners : [ { eventName : BI . Searcher . EVENT _START , action : function ( ) { a . _showSearcherPane ( ) , a . _setStartValue ( "" ) , this . setValue ( BI . deepClone ( a . storeValue ) ) } } , { eventName : BI . Searcher . EVENT _STOP , action : function ( ) { a . _showAdapter ( ) , a . _setStartValue ( "" ) , a . adapter . setValue ( a . storeValue ) , a . adapter . populate ( ) } } , { eventName : BI . Searcher . EVENT _PAUSE , action : function ( ) { var b = this . getKeyword ( ) ; this . hasMatched ( ) ? a . _join ( { type : BI . Selection . Multi , value : [ b ] } , function ( ) { a . storeValue . type === BI . Selection . Multi && a . storeValue . value . pushDistinct ( b ) , a . _showAdapter ( ) , a . adapter . setValue ( a . storeValue ) , a . _setStartValue ( b ) , c ( ) , a . adapter . populate ( ) , a . _setStartValue ( "" ) , a . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) : ( a . storeValue . type === BI . Selection . Multi && a . storeValue . value . pushDistinct ( b ) , a . _showAdapter ( ) , a . adapter . setValue ( a . storeValue ) , a . adapter . populate ( ) , a . storeValue . type === BI . Selection . Multi && a . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) ) } } , { eventName : BI . Searcher . EVENT _SEARCHING , action : function ( ) { var b = this . getKeyword ( ) , d = BI . last ( b ) ; b = BI . initial ( b || [ ] ) , b . length > 0 && a . _joinKeywords ( b , function ( ) { BI . isEndWithBlank ( d ) ? ( a . adapter . setValue ( a . storeValue ) , c ( ) , a . adapter . populate ( ) , a . _setStartValue ( "" ) ) : ( a . adapter . setValue ( a . storeValue ) , c ( ) ) } ) } } , { eventName : BI . Searcher . EVENT _CHANGE , action : function ( b , d ) { d instanceof BI . MultiSelectBar ? a . _joinAll ( this . getValue ( ) , function ( ) { c ( ) , a . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) : a . _join ( this . getValue ( ) , function ( ) { c ( ) , a . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) } } ] } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { el : this . trigger , height : 24 } , { el : this . adapter , height : "fill" } ] } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . searcherPane , top : 30 , bottom : 0 , left : 0 , right : 0 } ] } ) } , _showAdapter : function ( ) { this . adapter . setVisible ( ! 0 ) , this . searcherPane . setVisible ( ! 1 ) } , _showSearcherPane : function ( ) { this . searcherPane . setVisible ( ! 0 ) , this . adapter . setVisible ( ! 1 ) } , _defaultState : function ( ) { this . trigger . st
} , _init : function ( ) { var a = this , b = this . constants , c = this . options ; BI . NumberInterval . superclass . _init . apply ( this , arguments ) , this . smallEditor = BI . createWidget ( { type : "bi.editor" , height : c . height - 2 , watermark : BI . i18nText ( "BI-Basic_Unrestricted" ) , allowBlank : ! 0 , value : c . min , level : "warning" , tipType : "warning" , quitChecker : function ( ) { return ! 1 } , validationChecker : function ( c ) { return ! ! BI . isNumeric ( c ) || ( a . smallEditorBubbleType = b . typeError , ! 1 ) } , cls : "number-interval-small-editor bi-border-top bi-border-bottom bi-border-left" } ) , this . smallTip = BI . createWidget ( { type : "bi.label" , text : c . numTip , height : c . height - 2 , invisible : ! 0 } ) , BI . createWidget ( { type : "bi.absolute" , element : this . smallEditor . element , items : [ { el : this . smallTip , top : 0 , right : 5 } ] } ) , this . bigEditor = BI . createWidget ( { type : "bi.editor" , height : c . height - 2 , watermark : BI . i18nText ( "BI-Basic_Unrestricted" ) , allowBlank : ! 0 , value : c . max , level : "warning" , tipType : "warning" , quitChecker : function ( ) { return ! 1 } , validationChecker : function ( c ) { return ! ! BI . isNumeric ( c ) || ( a . bigEditorBubbleType = b . typeError , ! 1 ) } , cls : "number-interval-big-editor bi-border-top bi-border-bottom bi-border-right" } ) , this . bigTip = BI . createWidget ( { type : "bi.label" , text : c . numTip , height : c . height - 2 , invisible : ! 0 } ) , BI . createWidget ( { type : "bi.absolute" , element : this . bigEditor . element , items : [ { el : this . bigTip , top : 0 , right : 5 } ] } ) , this . smallCombo = BI . createWidget ( { type : "bi.icon_combo" , cls : "number-interval-small-combo bi-border" , height : c . height - 2 , items : [ { text : "(" + BI . i18nText ( "BI-Less_Than" ) + ")" , iconCls : "less-font" , value : 0 } , { text : "(" + BI . i18nText ( "BI-Less_And_Equal" ) + ")" , value : 1 , iconCls : "less-equal-font" } ] } ) , c . closemin === ! 0 ? this . smallCombo . setValue ( 1 ) : this . smallCombo . setValue ( 0 ) , this . bigCombo = BI . createWidget ( { type : "bi.icon_combo" , cls : "number-interval-big-combo bi-border" , height : c . height - 2 , items : [ { text : "(" + BI . i18nText ( "BI-Less_Than" ) + ")" , iconCls : "less-font" , value : 0 } , { text : "(" + BI . i18nText ( "BI-Less_And_Equal" ) + ")" , value : 1 , iconCls : "less-equal-font" } ] } ) , c . closemax === ! 0 ? this . bigCombo . setValue ( 1 ) : this . bigCombo . setValue ( 0 ) , this . label = BI . createWidget ( { type : "bi.label" , text : BI . i18nText ( "BI-Basic_Value" ) , textHeight : c . height - 2 * b . border , width : b . width - 2 * b . border , height : c . height - 2 * b . border , level : "warning" , tipType : "warning" } ) , this . left = BI . createWidget ( { type : "bi.htape" , items : [ { el : a . smallEditor } , { el : a . smallCombo , width : b . width - 2 * b . border } ] } ) , this . right = BI . createWidget ( { type : "bi.htape" , items : [ { el : a . bigCombo , width : b . width - 2 * b . border } , { el : a . bigEditor } ] } ) , BI . createWidget ( { element : a , type : "bi.center" , hgap : 15 , height : c . height , items : [ { type : "bi.absolute" , items : [ { el : a . left , left : - 15 , right : 0 , top : 0 , bottom : 0 } ] } , { type : "bi.absolute" , items : [ { el : a . right , left : 0 , right : - 15 , top : 0 , bottom : 0 } ] } ] } ) , BI . createWidget ( { element : a , type : "bi.horizontal_auto" , items : [ a . label ] } ) , a . _setValidEvent ( a . bigEditor , b . bigEditor ) , a . _setValidEvent ( a . smallEditor , b . smallEditor ) , a . _setErrorEvent ( a . bigEditor , b . bigEditor ) , a . _setErrorEvent ( a . smallEditor , b . smallEditor ) , a . _setBlurEvent ( a . bigEditor ) , a . _setBlurEvent ( a . smallEditor ) , a . _setFocusEvent ( a . bigEditor ) , a . _setFocusEvent ( a . smallEditor ) , a . _setComboValueChangedEvent ( a . bigCombo ) , a . _setComboValueChangedEvent ( a . smallCombo ) , a . _setEditorValueChangedEvent ( a . bigEditor ) , a . _setEditorValueChangedEvent ( a . smallEditor ) } , _checkValidation : function ( ) { var a = this , b = this . constants , c = this . options ; if ( a . _setTitle ( "" ) , BI . Bubbles . hide ( b . typeError ) , BI . Bubbles . hide ( b . numberError ) , BI . Bubbles . hide ( b . signalError ) , ! a . smallEditor . isValid ( ) || ! a . bigEditor . isValid ( ) ) return a . element . removeClass ( "number-error" ) , c . validation = "invalid" , b . typeError ; if ( BI . isEmptyString ( a . smallEditor . getValue ( ) ) || BI . isEmptyString ( a . bigEditor . getValue ( ) ) ) return a . element . removeClass ( "number-error" ) , c . validation = "valid" , "" ; var d = parseFloat ( a . smallEditor . getValue ( ) ) , e = parseFloat ( a . bigEditor . getValue ( ) ) , f = a . bigCombo . getValue ( ) , g = a . smallCombo . getValue ( ) ; return f [ 0 ] === b . less _equal && g [ 0 ] === b . less _equal ? d > e ? ( a . element . addClass ( "number-error" ) , c . validation = "invalid" , b . numberError ) : ( a . element . removeClass ( "number-error" ) , c . validation = "valid" , "" ) : d > e ? ( a . element . addClass ( "number-error" ) , c . validation = "invalid" , b . numberError ) : d === e ? ( a . element . addClass ( "number-error" ) , c . va
BI . SelectTreeLastPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . SelectTreeLastPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-select-tree-last-plus-group-node bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . SelectTreeLastPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.last_tree_node_checkbox" , stopPropagation : ! 0 } ) , this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : b . height , height : b . height , hgap : b . hgap , text : b . text , value : b . value , py : b . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && ( this . isSelected ( ) ? a . triggerExpand ( ) : a . triggerCollapse ( ) ) } ) ; var c = BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Left ) , d = BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Left , { width : 25 , el : this . checkbox } , this . text ) ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( c , BI . extend ( b . logic , { items : d } ) ) ) ) } , isOnce : function ( ) { return ! 0 } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . NodeButton . superclass . doClick . apply ( this , arguments ) } , setOpened : function ( a ) { BI . SelectTreeLastPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( a ) } } ) , BI . shortcut ( "bi.select_tree_last_plus_group_node" , BI . SelectTreeLastPlusGroupNode ) , BI . SelectTreeMidPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . SelectTreeMidPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-select-tree-mid-plus-group-node bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . SelectTreeMidPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.mid_tree_node_checkbox" , stopPropagation : ! 0 } ) , this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : b . height , height : b . height , hgap : b . hgap , text : b . text , value : b . value , py : b . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && ( this . isSelected ( ) ? a . triggerExpand ( ) : a . triggerCollapse ( ) ) } ) ; var c = BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Left ) , d = BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Left , { width : 25 , el : this . checkbox } , this . text ) ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( c , BI . extend ( b . logic , { items : d } ) ) ) ) } , isOnce : function ( ) { return ! 0 } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . NodeButton . superclass . doClick . apply ( this , arguments ) } , setOpened : function ( a ) { BI . SelectTreeMidPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( a ) } } ) , BI . shortcut ( "bi.select_tree_mid_plus_group_node" , BI . SelectTreeMidPlusGroupNode ) , BI . SelectTreeCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SelectTreeCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-select-tree-combo" , height : 30 , text : "" , items : [ ] , value : "" } ) } , _init : function ( ) { BI . SelectTreeCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : "bi.single_tree_trigger" , text : b . text , height : b . height , items : b . items , value : b . value } ) , this . popup = BI . createWidget ( { type : "bi.select_level_tree" , items : b . items , value : b . value } ) , this . combo = BI . createWidget ( { type : "bi.combo" , element : this , adjustLength : 2 , el : this . trigger , popup : { el : this . popup } } ) , this . combo . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . popup . on ( BI . SingleTreePopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . combo . hideView ( ) } ) } , setValue : function ( a ) { a = BI . isArray ( a ) ? a : [ a ] , this . trigger . setValue ( a ) ,
maxWidth : "auto" , minWidth : 135 , maxHeight : 400 , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . SingleSelectPopupView . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . loader = BI . createWidget ( { type : "bi.single_select_loader" , itemsCreator : b . itemsCreator , valueFormatter : b . valueFormatter , onLoaded : b . onLoaded } ) , this . popupView = BI . createWidget ( { type : "bi.multi_popup_view" , stopPropagation : ! 1 , maxWidth : b . maxWidth , minWidth : b . minWidth , maxHeight : b . maxHeight , element : this , buttons : [ BI . i18nText ( "BI-Basic_Clears" ) , BI . i18nText ( "BI-Basic_Sure" ) ] , el : this . loader } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . SingleSelectPopupView . EVENT _CHANGE ) } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CLICK _TOOLBAR _BUTTON , function ( b ) { switch ( b ) { case 0 : a . fireEvent ( BI . SingleSelectPopupView . EVENT _CLICK _CLEAR ) ; break ; case 1 : a . fireEvent ( BI . SingleSelectPopupView . EVENT _CLICK _CONFIRM ) } } ) } , setStartValue : function ( a ) { this . loader . setStartValue ( a ) } , setValue : function ( a ) { this . popupView . setValue ( a ) } , getValue : function ( ) { return this . popupView . getValue ( ) } , populate : function ( a ) { this . popupView . populate . apply ( this . popupView , arguments ) } , resetHeight : function ( a ) { this . popupView . resetHeight ( a ) } , resetWidth : function ( a ) { this . popupView . resetWidth ( a ) } } ) , BI . SingleSelectPopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . SingleSelectPopupView . EVENT _CLICK _CONFIRM = "EVENT_CLICK_CONFIRM" , BI . SingleSelectPopupView . EVENT _CLICK _CLEAR = "EVENT_CLICK_CLEAR" , BI . shortcut ( "bi.single_select_popup_view" , BI . SingleSelectPopupView ) , BI . SingleSelectTrigger = BI . inherit ( BI . Trigger , { constants : { height : 14 , rgap : 4 , lgap : 4 } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-select-trigger bi-border" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , searcher : { } , switcher : { } , adapter : null , masker : { } } ) } , _init : function ( ) { BI . SingleSelectTrigger . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; b . height && this . setHeight ( b . height - 2 ) , this . searcher = BI . createWidget ( b . searcher , { type : "bi.single_select_searcher" , height : b . height , itemsCreator : b . itemsCreator , valueFormatter : b . valueFormatter , popup : { } , adapter : b . adapter , masker : b . masker } ) , this . searcher . on ( BI . SingleSelectSearcher . EVENT _START , function ( ) { a . fireEvent ( BI . SingleSelectTrigger . EVENT _START ) } ) , this . searcher . on ( BI . SingleSelectSearcher . EVENT _PAUSE , function ( ) { a . fireEvent ( BI . SingleSelectTrigger . EVENT _PAUSE ) } ) , this . searcher . on ( BI . SingleSelectSearcher . EVENT _SEARCHING , function ( ) { a . fireEvent ( BI . SingleSelectTrigger . EVENT _SEARCHING , arguments ) } ) , this . searcher . on ( BI . SingleSelectSearcher . EVENT _STOP , function ( ) { a . fireEvent ( BI . SingleSelectTrigger . EVENT _STOP ) } ) , this . searcher . on ( BI . SingleSelectSearcher . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . SingleSelectTrigger . EVENT _CHANGE , arguments ) } ) ; BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : this . searcher , width : "fill" } , { el : BI . createWidget ( ) , width : 30 } ] } ) } , getSearcher : function ( ) { return this . searcher } , stopEditing : function ( ) { this . searcher . stopSearch ( ) } , setAdapter : function ( a ) { this . searcher . setAdapter ( a ) } , setValue : function ( a ) { this . searcher . setValue ( a ) } , getKey : function ( ) { return this . searcher . getKey ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } } ) , BI . SingleSelectTrigger . EVENT _TRIGGER _CLICK = "EVENT_TRIGGER_CLICK" , BI . SingleSelectTrigger . EVENT _COUNTER _CLICK = "EVENT_COUNTER_CLICK" , BI . SingleSelectTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . SingleSelectTrigger . EVENT _START = "EVENT_START" , BI . SingleSelectTrigger . EVENT _STOP = "EVENT_STOP" , BI . SingleSelectTrigger . EVENT _PAUSE = "EVENT_PAUSE" , BI . SingleSelectTrigger . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . SingleSelectTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW" , BI . shortcut ( "bi.single_select_trigger" , BI . SingleSelectTrigger ) , BI . SingleSelectEditor = BI . inherit ( BI . Widget , { _const : { checkSelected : BI . i18nText ( "BI-Check_Selected" ) } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectEditor . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-select-editor" , el : { } } ) } , _init : function ( ) { BI . SingleSelectEditor . superclass . _init . apply ( this ,
this . _setAllPosition ( this . _getPercentByValue ( this . value ) ) ) : ( this . label . setValue ( this . max ) , this . _setAllPosition ( 100 ) ) ) } } ) , BI . SingleSlider . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_slider" , BI . SingleSlider ) , BI . SingleSliderLabel = BI . inherit ( BI . Widget , { _constant : { EDITOR _WIDTH : 90 , EDITOR _HEIGHT : 20 , HEIGHT : 20 , SLIDER _WIDTH _HALF : 15 , SLIDER _WIDTH : 30 , SLIDER _HEIGHT : 30 , TRACK _HEIGHT : 24 } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSliderLabel . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-slider-label bi-slider-track" , digit : ! 1 , unit : "" } ) } , _init : function ( ) { BI . SingleSliderLabel . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _constant ; this . enable = ! 1 , this . value = "" , this . grayTrack = BI . createWidget ( { type : "bi.layout" , cls : "gray-track" , height : 6 } ) , this . blueTrack = BI . createWidget ( { type : "bi.layout" , cls : "blue-track bi-high-light-background" , height : 6 } ) , this . track = this . _createTrackWrapper ( ) , this . slider = BI . createWidget ( { type : "bi.single_slider_button" } ) , this . _draggable ( this . slider ) ; var d = BI . createWidget ( { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ this . slider ] } ] , hgap : c . SLIDER _WIDTH _HALF , height : c . SLIDER _HEIGHT } ) ; d . element . click ( function ( d ) { if ( a . enable ) { var e = d . clientX - a . element . offset ( ) . left - c . SLIDER _WIDTH _HALF , f = a . track . element [ 0 ] . scrollWidth , g = 0 ; e < 0 && ( g = 0 ) , e > 0 && e < f - c . SLIDER _WIDTH && ( g = 100 * e / a . _getGrayTrackLength ( ) ) , e > f - c . SLIDER _WIDTH && ( g = 100 ) ; var h = BI . parseFloat ( g . toFixed ( 1 ) ) ; a . _setAllPosition ( h ) ; var i = a . _getValueByPercent ( h ) ; i = b . digit === ! 1 ? i : i . toFixed ( b . digit ) , a . label . setText ( i + b . unit ) , a . value = i , a . fireEvent ( BI . SingleSliderLabel . EVENT _CHANGE ) } } ) , this . label = BI . createWidget ( { type : "bi.label" , height : c . HEIGHT , width : c . EDITOR _WIDTH - 2 } ) , this . _setVisible ( ! 1 ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . track , width : "100%" , height : c . TRACK _HEIGHT } ] } ] , hgap : 7 , height : c . TRACK _HEIGHT } , top : 13 , left : 0 , width : "100%" } , { el : d , top : 10 , left : 0 , width : "100%" } , { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ this . label ] } ] , rgap : c . EDITOR _WIDTH , height : c . EDITOR _HEIGHT } , top : 0 , left : 0 , width : "100%" } ] } ) } , _draggable : function ( a ) { function b ( a ) { return BI . clamp ( a , 0 , c . _getGrayTrackLength ( ) ) } var c = this , d = this . options , e = ! 1 , f = 0 , g = 0 , h = 0 , i = new BI . MouseMoveTracker ( function ( j ) { if ( i . isDragging ( ) ) { e = ! 0 , g += j , f = b ( h + g ) , a . element . addClass ( "dragging" ) ; var k = 100 * f / c . _getGrayTrackLength ( ) , l = BI . parseFloat ( k . toFixed ( 1 ) ) ; c . _setBlueTrack ( l ) , c . _setLabelPosition ( l ) , c . _setSliderPosition ( l ) ; var m = c . _getValueByPercent ( l ) ; m = d . digit === ! 1 ? m : m . toFixed ( d . digit ) , c . label . setValue ( m ) , c . value = m , c . fireEvent ( BI . SingleSliderLabel . EVENT _CHANGE ) } } , function ( ) { if ( e === ! 0 ) { f = b ( f ) ; var d = 100 * f / c . _getGrayTrackLength ( ) , j = BI . parseFloat ( d . toFixed ( 1 ) ) ; c . _setSliderPosition ( j ) , f = 0 , g = 0 , h = f , e = ! 1 } a . element . removeClass ( "dragging" ) , i . releaseMouseMoves ( ) , c . fireEvent ( BI . SingleSliderLabel . EVENT _CHANGE ) } , document ) ; a . element . on ( "mousedown" , function ( c ) { a . isEnabled ( ) && ( h = this . offsetLeft , b ( h ) , i . captureMouseMoves ( c ) ) } ) } , _createTrackWrapper : function ( ) { return BI . createWidget ( { type : "bi.absolute" , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . grayTrack , top : 0 , left : 0 , width : "100%" } , { el : this . blueTrack , top : 0 , left : 0 , width : "0%" } ] } ] , hgap : 8 , height : 8 } , top : 8 , left : 0 , width : "100%" } ] } ) } , _checkValidation : function ( a ) { return BI . isNumeric ( a ) && ! ( BI . isNull ( a ) || a < this . min || a > this . max ) } , _setBlueTrack : function ( a ) { this . blueTrack . element . css ( { width : a + "%" } ) } , _setLabelPosition : function ( a ) { this . label . element . css ( { left : a + "%" } ) } , _setSliderPosition : function ( a ) { this . slider . element . css ( { left : a + "%" } ) } , _setAllPosition : function ( a ) { this . _setSliderPosition ( a ) , this . _setLabelPosition ( a ) , this . _setBlueTrack ( a ) } , _setVisible : function ( a ) { this . slider . setVisible ( a ) , this . label . setVisible ( a ) } , _getGrayTrackLength : function ( ) { return this . grayTrack . element [ 0 ] . scrollWidth } , _getValueByPercent : function ( a ) { var b = BI . parseInt ( 10 * a ) ; return ( this . max - this . min ) * b / 1e3 + this . min } , _getPercentByValue : function ( a ) { return 100 * ( a - this . min ) / ( this . max - this . min ) } , getValue : function ( ) { return this . value } , setValue : function ( a ) { var b = this . options ; a = BI . parseFloat ( a ) , a = b . dig
void b ( { items : g } ) ) } , _reqSelectedTreeNode : function ( a , b ) { function c ( a ) { var b = m . concat ( k ) ; if ( g ( a , b ) ) if ( f ( b ) ) i . _deleteNode ( a , b ) ; else { var c = [ ] , j = e ( m , k , [ ] , c ) ; j && BI . isNotEmptyArray ( c ) && BI . each ( c , function ( b , c ) { var e = i . _getNode ( a , c ) ; e ? i . _deleteNode ( a , c ) : d ( a , c , BI . last ( c ) ) } ) } if ( h ( a , b ) ) { var l = [ ] , j = ! 1 ; f ( b ) ? j = ! 0 : ( j = e ( m , k , l ) , b = m ) , j === ! 0 && ( d ( a , b , k ) , l . length > 0 && BI . each ( l , function ( b , c ) { i . _buildTree ( a , c ) } ) ) } } function d ( a , b , c ) { var d = a , e = [ ] , f = [ ] ; BI . some ( b , function ( g , h ) { var j = d [ h ] ; if ( null == j ) { if ( 0 === g ) return ! 0 ; if ( ! BI . isEmpty ( d ) ) return ! 0 ; var k = b . slice ( 0 , g ) , l = i . _getChildren ( k ) ; if ( f . push ( k ) , e . push ( l . length ) , g === b . length - 1 && 1 === l . length && l [ 0 ] === c ) for ( var m = e . length - 1 ; m >= 0 && 1 === e [ m ] ; m -- ) i . _deleteNode ( a , f [ m ] ) ; else BI . each ( l , function ( a , e ) { return g === b . length - 1 && e . value === c || void ( d [ e . value ] = { } ) } ) ; d = d [ h ] } else d = j } ) } function e ( a , b , c , d ) { var f = BI . clone ( a ) ; if ( f . push ( b ) , i . _isMatch ( a , b , l ) ) return d && d . push ( f ) , ! 0 ; var g = i . _getChildren ( f ) , h = [ ] , j = ! 1 ; return BI . each ( g , function ( a , b ) { e ( f , b . value , c , d ) ? j = ! 0 : h . push ( b . value ) } ) , j === ! 0 && BI . each ( h , function ( a , b ) { var d = BI . clone ( f ) ; d . push ( b ) , c . push ( d ) } ) , j } function f ( a ) { for ( var b = 0 , c = a . length ; b < c ; b ++ ) if ( i . _isMatch ( a . slice ( 0 , a . length - 1 ) , a [ b ] , l ) ) return ! 0 ; return ! 1 } function g ( a , b ) { for ( var c = a , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; if ( c = c [ e ] , null == c ) return ! 1 } return ! 0 } function h ( a , b ) { for ( var c = a , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; if ( ! BI . has ( c , e ) ) return ! 1 ; if ( c = c [ e ] , BI . isEmpty ( c ) ) return ! 0 } return ! 1 } var i = this , j = BI . deepClone ( a . selectedValues ) , k = a . notSelectedValue || { } , l = a . keyword || "" , m = a . parentValues || [ ] ; return null == j || BI . isEmpty ( j ) ? void b ( { } ) : ( c ( j ) , void b ( j ) ) } , _reqAdjustTreeNode : function ( a , b ) { function c ( a , b ) { if ( null == a || BI . isEmpty ( a ) ) return ! 0 ; var e = ! 0 ; return BI . each ( a , function ( d , g ) { var h = BI . clone ( b ) ; h . push ( d ) , c ( a [ d ] , h ) || ( BI . each ( a [ d ] , function ( a , b ) { var c = BI . clone ( h ) ; c . push ( a ) , f . push ( c ) } ) , e = ! 1 ) } ) , e && d ( a , b ) } function d ( a , b ) { return BI . isEmpty ( a ) || e . _getChildCount ( b ) === BI . size ( a ) } var e = this , f = [ ] , g = a . selectedValues ; if ( null == g || BI . isEmpty ( g ) ) return void b ( { } ) ; BI . each ( g , function ( a , b ) { f . push ( [ a ] ) } ) , c ( g , [ ] ) ; var h = { } ; BI . each ( f , function ( a , b ) { e . _buildTree ( h , b ) } ) , b ( h ) } , _reqInitTreeNode : function ( a , b ) { function c ( ) { var a = j . _getChildren ( [ ] ) , b = a . length ; if ( "" !== n ) { for ( var c = 0 , e = b ; c < e ; c ++ ) if ( a [ c ] . value === n ) { b = c + 1 ; break } } else b = 0 ; for ( var f = [ ] , g = b , e = a . length ; g < e ; g ++ ) { if ( f . length < j . _const . perPage ) var h = d ( 1 , [ ] , a [ g ] . value , ! 1 , k ) ; else if ( f . length === j . _const . perPage ) var h = d ( 1 , [ ] , a [ g ] . value , ! 1 , [ ] ) ; if ( h [ 0 ] === ! 0 && f . push ( a [ g ] . value ) , f . length > j . _const . perPage ) break } return f } function d ( a , b , c , i , k ) { if ( j . _isMatch ( b , c , l ) ) { var m = i || h ( b , c ) ; return e ( b , c , ! 1 , m , ! i && f ( b , c ) , ! 0 , k ) , [ ! 0 , m ] } var n = BI . clone ( b ) ; n . push ( c ) ; var o = j . _getChildren ( n ) , p = ! 1 , m = ! 1 , q = i || g ( b , c ) ; return BI . each ( o , function ( b , c ) { var e = d ( a + 1 , n , c . value , q , k ) ; e [ 1 ] === ! 0 && ( m = ! 0 ) , e [ 0 ] === ! 0 && ( p = ! 0 ) } ) , p === ! 0 && ( m = q || h ( b , c ) && m , e ( b , c , ! 0 , m , ! 1 , ! 1 , k ) ) , [ p , m ] } function e ( a , b , c , d , e , f , g ) { var h = j . _getTreeNode ( a , b ) ; g . push ( { id : h . id , pId : h . pId , text : h . text , value : h . value , title : h . title , isParent : h . getChildrenLength ( ) > 0 , open : c , checked : d , halfCheck : e , flag : f } ) } function f ( a , b ) { var c = i ( a ) ; return null == c ? null : BI . any ( c , function ( a , c ) { if ( a === b && null != c && ! BI . isEmpty ( c ) ) return ! 0 } ) } function g ( a , b ) { var c = i ( a ) ; return null == c ? null : BI . any ( c , function ( a , c ) { if ( a === b && null != c && BI . isEmpty ( c ) ) return ! 0 } ) } function h ( a , b ) { var c = i ( a ) ; return null != c && BI . any ( c , function ( a ) { if ( a === b ) return ! 0 } ) } function i ( a ) { var b = m ; return null == b ? null : ( BI . every ( a , function ( a , c ) { return b = b [ c ] , null != b } ) , b ) } var j = this , k = [ ] , l = a . keyword || "" , m = a . selectedValues , n = a . lastSearchValue || "" , o = c ( ) ; BI . nextTick ( function ( ) { b ( { hasNext : o . length > j . _const . perPage , items : k , lastSearchValue : BI . last ( o ) } ) } ) } , _reqTreeNode : function ( a , b ) { function c ( a , b ) { var c = { } ; return BI . each ( a , function ( a , c ) { b = b [ c ] || { } } ) , BI . each ( b , function ( a , b ) { if ( BI . isNull ( b ) ) return void ( c [ a ] = [ 0 , 0 ] ) ; if ( BI . isEmpty ( b ) ) return void ( c [ a ] = [ 2 , 0 ] ) ; var d = { } ; BI . each ( b , function ( a , b ) { ( BI . isNull ( b ) || BI . isEmpty ( b ) ) && ( d [ a ] = ! 0 ) } ) , c [ a ] = [ 1 , BI . size ( d ) ] } ) , c } function d ( a , b , c , d ) { var f = d . checked , g = d . half , h = ! 1 , i = ! 1 ; if ( BI . has ( c , a ) ) if ( 1 === c [ a ] [ 0 ] ) { var j = BI . clone ( b ) ; j . push ( a ) ; var k = e . _getChildCount ( j ) ; k > 0 && k !== c [ a ] [ 1 ] && ( i = ! 0 ) } else 2 === c [ a ] [ 0 ] && ( h = ! 0 ) ; var l ; return l = f || i || h ? ( h || f ) && ! g || BI . has ( c , a )