/*! 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 } ( ) , 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" != typeof c || ( e ? k [ l ] = ia . extend ( k [ l ] , c ) : k [ l ] . data = ia . extend ( k [ l ] . data , c ) ) , f = k [ l ] , e || ( f . data || ( f . data = { } ) , f = f . data ) , d !== b && ( f [ ia . camelCase ( c ) ] = d ) , i ? ( g = f [ c ] , null == g && ( g = f [ ia . camelCase ( c ) ] ) ) : g = f , g } } function f ( a , b , c ) { if ( ia . acceptData ( a ) ) { var d , e , f , g = a . nodeType , i = g ? ia . cache : a , j = g ? a [ ia . expando ] : ia . expando ; if ( i [ j ] ) { if ( b && ( f = c ? i [ j ] : i [ j ] . data ) ) { ia . isArray ( b ) ? b = b . concat ( ia . map ( b , ia . camelCase ) ) : b in f ? b = [ b ] : ( b = ia . camelCase ( b ) , b = b in f ? [ b ] : b
} ) } , 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 : d . specified ) ? d . value : b } , set : function ( a , c , d ) { var e = a . getAttributeNode ( d ) ; return e || a . setAttributeNode ( e = a . ownerDocument . createAttribute ( d ) ) , e . value = c += "" , "value" === d || c === a . getAttribute ( d ) ? c : b } } , ia . attrHooks . contenteditable = { get : Aa . get , set : function ( a , b , c ) { Aa . set ( a , "" !== b && b , c ) } } , ia . each ( [ "width" , "height" ] , function ( a , b ) { ia . attrHooks [ b ] = ia . extend ( ia . attrHooks [ b ] , { set : function ( a , c ) { if ( "" === c ) return a . setAttribute ( b , "auto" ) , c } } ) } ) ) , ia . support . hrefNormalize
} , 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 ) { var e = ia . map ( this , b , c ) ; return Pa . test ( a ) || ( d = c ) , d && "string" == typeof d && ( e = ia . filter ( d , e ) ) , e = this . length > 1 && ! Ta [ a ] ? ia . unique ( e ) : e , this . length > 1 && Qa . test ( a ) && ( e = e . reverse ( ) ) , this . pushStack ( e ) } } ) , ia . extend ( { filter : function ( a , b , c ) { return c && ( a = ":not(" + a + ")" ) , 1 === b . length ? ia . find . matchesSelector ( b [ 0 ] , a ) ? [ b [ 0 ] ] : [ ] : ia . find . matches ( a , b ) } , dir : function ( a , c , d ) { for ( var e = [ ] , f = a [ c ] ; f && 9 !== f . nodeType && ( d === b || 1 !== f . nodeType || ! ia ( f ) . is ( d ) ) ; ) 1 === f . nodeType && e . push ( f ) , f =
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 ++ ) d = a [ h ] , d > f && ( f = d ) } else b = t ( b , c ) , r . each ( a , function ( a , c , d ) { e = b ( a , c , d ) , ( e > g || e === - ( 1 / 0 ) && f === - ( 1 / 0 ) ) && ( f = a , g = e ) } ) ; return f } , r . min = 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 ++ ) d = a [ h ] , d < f && ( f = d ) } else b = t ( b , c ) , r . each ( a , function ( a , c , d ) { e = b ( a , c , d ) , ( e < g || e === 1 / 0 && f === 1 / 0 ) && ( f = a , g = e ) } ) ; return f } , r . shuffle = function ( a ) { for ( var b , c = x ( a ) ? a : r . values ( a
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 , c ) { c != b && d . push ( c ) } ) , 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 . 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 : "" } ) } , 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 . beforeCreate && this . beforeCreate ( ) , this . _initRoot ( ) , this . _initElementWidth ( ) , this . _initElementHeight ( ) , this . _initVisual ( ) , this . _initState ( ) , 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 . width = a , this . _initElementWidth ( ) } , setHeight : function ( a ) { this . options . height = a , this . _initElementHeight ( ) } , _setEnable : function ( a ) { a === ! 0 ? this . options . disabled = ! 1 : a === ! 1 && ( this . options . disabled = ! 0 ) , BI . each ( this . _children , function ( b , c ) { ! c . _manualSetEnable && c . _setEnable && c . _setEnable ( a ) } ) } , _setValid : function ( a ) { a === ! 0 ? this . options . invalid = ! 1 : a === ! 1 && ( this . options . invalid = ! 0 ) , BI . each ( this . _children , function ( b , c ) { ! c . _manualSetValid && c . _setValid && c . _setValid ( a ) } ) } , _setVisible : function ( a ) { a === ! 0 ? this . options . invisible = ! 1 : a === ! 1 && ( this . options . invisible = ! 0 ) } , setEnable : function ( a ) { this . _manualSetEnable = ! 0 , this . _setEnable ( a ) , a === ! 0 ? this . element . removeClass ( "base-disabled disabled" ) : a === ! 1 && this . element .
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
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" , BVW : "beforeverifywrite" , AVW : "afterverifywrite" , AV : "afterverify" , BW : "beforewrite" , AW : "afterwrite" , WS : "writesuccess" , WF : "writefailure" , BA : "beforeappend" , AA : "afterappend" , BD : "beforedelete" , AD : "beforedelete" , UC : "unloadcheck" , BTOPDF : "beforetopdf" , ATOPDF : "aftertopdf" , BTOEXCEL : "beforetoexcel" , ATOEXCEL : "aftertoexcel" , BTOWORD : "beforetoword" , ATOWORD : "aftertoword" , BTOIMAGE : "beforetoimage" , ATOIMAGE : "aftertoimage" , BTOHTML : "beforetohtml" , ATOHTML : "aftertohtml" , BIMEXCEL : "beforeimportexcel" , AIMEXCEL : "afterimportexcel" , BPDFPRINT : "beforepdfprint" , APDFPRINT : "afterpdfprint" , BFLASHPRINT : "beforeflashprint" , AFLASHPRINT : "afterflashprint" , BAPPLETPRINT : "beforeappletprint" , AAPPLETPRINT : "afterappletprint" , BSEVERPRINT : "beforeserverprint" , ASERVERPRINT : "afterserverprint" , BEMAIL : "beforeemail" , AEMAIL : "afteremail" } } ) , BI . extend ( jQuery . fn , { destroy : function ( ) { this . remove ( ) , BI . isIE ( ) === ! 0 && ( this [ 0 ] . outerHTML = "" ) } , _ _textKeywordMarked _ _ : function ( a , b , c ) { if ( ! BI . isKey ( b ) || ( a + "" ) . length > 100 ) return this . html ( BI . htmlEncode ( a ) ) ; b += "" , b = BI . toUpperCase ( b ) ; var d = ( a || "" ) + "" ; for ( c = ( c || BI . makeFirstPY ( a ) ) + "" , null != c && ( c = BI . toUpperCase ( c ) ) , this . empty ( ) ; ; ) { var e = BI . toUpperCase ( d ) . indexOf ( b ) , f = null ; if ( null != c && ( f = c . indexOf ( b ) , f >= 0 && ( f %= a . length ) ) , e >= 0 ) this . append ( d . substr ( 0 , e ) ) , this . append ( $ ( "<span>" ) . addClass ( "bi-keyword-red-mark" ) . html ( BI . htmlEncode ( d . substr ( e , b . length ) ) ) ) , d = d . substr ( e + b . length ) , null != c && ( c = c . substr ( e + b . length ) ) ; else { if ( ! ( null != f && f >= 0 && Math . floor ( f / a . length ) === Math . floor ( ( f + b . length - 1 ) / a . length ) ) ) { this . append ( d ) ; break } this . append ( d . substr ( 0 , f ) ) , this . append ( $ ( "<span>" ) . addClass ( "bi-keyword-red-mark" ) . html ( BI . htmlEncode ( d . substr ( f , b . length ) ) ) ) , null != c && ( c = c . substr ( f + b . length ) ) , d = d . substr ( f + b . length ) } } return this } , getDomHeight : function ( a ) { var b = $ ( this ) . clone ( ) ; b . appendTo ( $ ( a || "body" ) ) ; var c = b . height ( ) ; return b . remove ( ) , c } , hasVerticalScroll : function ( ) { return this . height ( ) > 0 && this [ 0 ] . clientWidth < this [ 0 ] . offsetWidth } , hasHorizonScroll : function ( ) { return this . width ( ) > 0 && this [ 0 ] . clientHeight < this [ 0 ] . offsetHeight } , getStyle : function ( a ) { var b = this [ 0 ] , c = void 0 ; if ( window . getComputedStyle && ( c = window . getComputedStyle ( b , null ) ) ) return c . getPropertyValue ( BI . hyphenate ( a ) ) ; if ( document . defaultView && document . defaultVie
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 ( a ) { return accDiv ( this , a ) } , _ . extend ( String . prototype , { startWith : function ( a ) { return ! ( null == a || "" == a || 0 === this . length || a . length > this . length ) && this . substr ( 0 , a . length ) == a } , endWith : function ( a ) { return ! ( null == a || "" == a || 0 === this . length || a . length > this . length ) && this . substring ( this . length - a . length ) == a } , getQuery : function ( a ) { var b = new RegExp ( "(^|&)" + a + "=([^&]*)(&|$)" ) , c = this . substr ( this . indexOf ( "?" ) + 1 ) . match ( b ) ; return c ? unescape ( c [ 2 ] ) : null } , appendQuery : function ( a ) { if ( ! a ) return this ; var b = this ; return b . indexOf ( "?" ) === - 1 && ( b += "?" ) , b . endWith ( "?" ) !== ! 1 || ( b += "&" ) , _ . each ( a , function ( a , c ) { "string" == typeof c && ( b += c + "=" + a + "&" ) } ) , b = b . substr ( 0 , b . length - 1 ) } , replaceAll : function ( a , b ) { return this . replace ( new RegExp ( a , "gm" ) , b ) } , perfectStart : function ( a ) { return this . startWith ( a ) ? this : a + this } , allIndexOf : function ( a ) { if ( "string" != typeof a ) return [ ] ; for ( var b = this , c = [ ] , d = 0 ; b . length > 0 ; ) { var e = b . indexOf ( a ) ; if ( e === - 1 ) break ; c . push ( d + e ) , b = b . substring ( e + a . length , b . length ) , d += e + a . length } return c } } ) , _ . extend ( String , { escape : function ( a ) { return a . replace ( /('|\\)/g , "\\$1" ) } , leftPad : function ( a , b , c ) { var d = String ( a ) ; for ( c || ( c = " " ) ; d . length < b ; ) d = c + d ; return d . toString ( ) } , format : function ( a ) { var b = Array . prototype . slice . call ( arguments , 1 ) ; return a . replace ( /\{(\d+)\}/g , function ( a , c ) { return b [ c ] } ) } } ) , BI . EventListener = { listen : function ( a , b , c ) { return a . addEventListener ? ( a . addEventListener ( b , c , ! 1 ) , { remove : function ( ) { a . removeEventListener ( b , c , ! 1 ) } } ) : a . attachEvent ? ( a . attachEvent ( "on" + b , c ) , { remove : function ( ) { a . detachEvent ( "on" + b , c ) } } ) : void 0 } , capture : function ( a , b , c ) { return a . addEventListener ? ( a . addEventListener ( b , c , ! 0 ) , { remove : function ( ) { a . removeEventListener ( b , c , ! 0 ) } } ) : { remove : BI . emptyFn } } , registerDefault : function ( ) { } } , ! function ( ) { var a = window . cancelAnimationFrame || window . webkitCancelAnimationFrame || window . mozCancelAnimationFrame || window . oCancelAnimationFrame || window . msCancelAnimationFrame || window . clearTimeout , b = window . requestAnimationFrame || window . webkitRequestAnimationFrame || window . mozRequestAnimationFrame || window . oRequestAnimationFrame || window . msRequestAnimationFrame || window . setTimeout ; BI . MouseMoveTracker = function ( a , b , c ) { this . _isDragging = ! 1 , this . _animationFrameID = null , this . _domNode = c , this . _onMove = a , this . _onMoveEnd = b , this . _onMouseMove = BI . bind ( this . _onMouseMove , this ) , this . _onMouseUp = BI . bind ( this . _onMouseUp , this ) , this . _didMouseMove = BI . bind ( this . _didMouseMove , this ) } , BI . MouseMoveTracker . prototype = { constructor : BI . MouseMoveTracker , captureMouseMoves : function ( a ) { this . _eventMoveToken || this . _eventUpToken || ( this . _eventMoveToken = BI . EventListener . listen ( this . _domNode , "mousemove" , this . _onMouseMove ) , this . _eventUpToken = BI . EventListener . listen ( this . _domNode , "mouseup" , this . _onMouseUp ) ) , this . _isDragging || ( this . _deltaX = 0 , this . _deltaY = 0 , this . _isDragging = ! 0 , this . _x = a . clientX , this . _y = a . cl
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 ) } , _addElement : function ( a , b ) { var c = this . options , d = BI . AdaptiveLayout . superclass . _addElement . apply ( this , arguments ) ; d . element . css ( { position : "relative" } ) ; var e = 0 , f = 0 , g = 0 , h = 0 ; return BI . isNotNull ( b . left ) && d . element . css ( { "margin-left" : b . left } ) , BI . isNotNull ( b . right ) && d . element . css ( { "margin-right" : b . right } ) , BI . isNotNull ( b . top ) && d . element . css ( { "margin-top" : b . top } ) , BI . isNotNull ( b . bottom ) && d . element . css ( { "margin-bottom" : 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 } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( a ) { BI . AbsoluteLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.adaptive" , BI . AdaptiveLayout ) , BI . BorderLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . BorderLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-border-layout" , items : { } } ) } , render : function ( ) { BI . BorderLayout . 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 ) { var b , c = 0 , d = 0 , e = 0 , f = 0 ; if ( "north" in a && ( b = a . north , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "north" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "north" , g ) } this . getWidgetByName ( this . getName ( ) + "north" ) . element . height ( b . height ) . css ( { position : "absolute" , top : b . top || 0 , left : b . left || 0 , right : b . right || 0 , bottom : "initial" } ) } c = ( b . height || 0 ) + ( b . top || 0 ) + ( b . bottom || 0 ) } if ( "south" in a && ( b = a . south , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "south" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "south" , g ) } this . getWidgetByName ( this . getName ( ) + "south" ) . element . height ( b . height ) . css ( { position : "absolute" , bottom : b . bottom || 0 , left : b . left || 0 , right : b . right || 0 , top : "initial" } ) } d = ( b . height || 0 ) + ( b . top || 0 ) + ( b . bottom || 0 ) } if ( "west" in a && ( b = a . west , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "west" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "west" , g ) } this . getWidgetByName ( this . getName ( ) + "west" ) . element . width ( b . width ) . css ( { position : "absolute" , left : b . left || 0 , top : c , bottom : d , right : "initial" } ) } e = ( b . width || 0 ) + ( b . left || 0 ) + ( b . right || 0 ) } if ( "east" in a && ( b = a . east , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "east" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "east" , g ) } this . getWidgetByName ( this . getName ( ) + "east" ) . element . width ( b . width ) . css ( { position : "absolute" , right : b . right || 0 , top : c , bottom : d , left : "initial" } ) } f = ( b . width || 0 ) + ( b . left || 0 ) + ( b . right || 0 ) } if ( "center" in a && ( b = a . center , null != b ) ) { if ( ! this . hasWidget ( this . getName ( ) + "center" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "center" , g ) } this . getWidgetByName ( this . getName ( ) + "center" ) . element . css ( { position : "absolute" , top : c , bottom : d , left : e , right : f } ) } } , populate : function ( a ) { BI . BorderLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.border" , BI . BorderLayout ) , BI . CardLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . CardLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-card-layout" , items : [ ] } ) } , render : function ( ) { BI . CardLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , stroke : function ( a ) { var b = this , c = this . options ; this . showIndex = void 0 , BI . each ( a , function ( a , d ) { if ( d ) { if ( b . hasWidget ( d . cardName ) ) var e = b . getWidgetByName ( d . cardName ) ; else { var e = BI . cr
this . _mount ( ) } } ) , BI . shortcut ( "bi.center" , BI . CenterLayout ) , BI . FloatCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FloatCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-float-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . FloatCenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] , d = 100 / a . length ; BI . each ( a , function ( b ) { var e = BI . createWidget ( { type : "bi.default" } ) ; e . element . addClass ( "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) ) . css ( { width : d + "%" , height : "100%" } ) , c . push ( { el : e } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , width : "auto" , height : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.left" , element : this , items : c } ) } , populate : function ( a ) { BI . FloatCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.float_center" , BI . FloatCenterLayout ) , BI . HorizontalCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . HorizontalCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-horizontal-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . HorizontalCenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] ; BI . each ( a , function ( b ) { c . push ( { column : b , row : 0 , el : BI . createWidget ( { type : "bi.default" , cls : "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) } ) } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , width : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.grid" , element : this , columns : c . length , rows : 1 , items : c } ) } , populate : function ( a ) { BI . HorizontalCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.horizontal_center" , BI . HorizontalCenterLayout ) , BI . VerticalCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . VerticalCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-vertical-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . VerticalCenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] ; BI . each ( a , function ( b ) { c . push ( { column : 0 , row : b , el : BI . createWidget ( { type : "bi.default" , cls : "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) } ) } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , height : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.grid" , element : this , columns : 1 , rows : c . length , items : c } ) } , populate : function ( a ) { BI . VerticalCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.vertical_center" , BI . VerticalCenterLayout ) , BI . Data = Data = { } , Data . Constant = BICst = { } , function ( ) { var a = { } ; Data . BufferPool = { put : function ( b , c ) { if ( BI . isNotNull ( a [ b ] ) ) throw new Error ( "Buffer Pool has the key already!" ) ; a [ b ] = c } , get : function ( b ) { return a [ b ] } } } ( ) , function ( ) { var a = { } ; Data . SharingPool = { _Shared : a , put : function ( b , c ) { a [ b ] = c } , cat : function ( ) { for ( var b = Array . prototype . slice . call ( arguments , 0 ) , c = a , d = 0 ; d < b . length ; d ++ ) c = c && c [ b [ d ] ] ; return c } , get : function ( ) { return BI . deepClone ( this . cat . apply ( this , arguments ) ) } , remove : function ( b ) { delete a [ b ] } } } ( ) , Data . Req = { } , Data . Source = BISource = { } , function ( a , b ) { "object" == typeof exports && "undefined" != typeof module ? b ( exports ) : "function" == typeof define && define . amd ? define ( [ "exports" ] , b ) : b ( a . Fix = a . Fix || { } ) } ( this , function ( a ) { "use strict" ; function b ( a , b , c ) { } function
} , { def : 'FIELDS(connectionName,tableName):返回tableName这个表中的所有字段名。\n示例:\n数据库BASE中有个名叫task的表的内容如下:\nname start end\na 2008 2009\nb 2009 2012\n那么FIELDS("BASE","task")等于[name,start,end].' , name : "FIELDS" , type : "REPORT" } , { def : 'DATEDIF(start_date,end_date,unit):返回两个指定日期间的天数、月数或年数。\nStart_date:代表所指定时间段的初始日期。\nEnd_date:代表所指定时间段的终止日期。\nUnit:函数返回信息的类型。\n若unit=“Y”,则DATEDIF返回指定时间段的年差数。\n若unit=“M”,则DATEDIF返回指定时间段的月差数。\n若unit=“D”,则DATEDIF返回指定时间段的日差数。\n若unit=“MD”,则DATEDIF忽略年和月,返回指定时间段的日差数。\n若unit=“YM”,则DATEDIF忽略年和日,返回指定时间段的月差数。\n若unit=“YD”,则DATEDIF忽略年,返回指定时间段的日差数。\n示例:\nDATEDIF("2001/2/28","2004/3/20","Y")等于3,即在2001年2月28日与2004年3月20日之间有3个整年。\nDATEDIF("2001/2/28","2004/3/20","M")等于37,即在2001年2月28日与2004年3月20日之间有36个整月。\nDATEDIF("2001/2/28","2004/3/20","D")等于1116,即在2001年2月28日与2004年3月20日之间有1116个整天。\nDATEDIF("2001/2/28","2004/3/20","MD")等于8,即忽略月和年后,2001年2月28日与2004年3月20日的差为8天。\nDATEDIF("2001/1/28","2004/3/20","YM")等于2,即忽略日和年后,2001年1月28日与2004年3月20日的差为2个月。\nDATEDIF("2001/2/28","2004/3/20","YD")等于21,即忽略年后,2001年2月28日与2004年3月20日的差为21天。' , name : "DATEDIF" , type : "DATETIME" } , { def : 'TOIMAGE(path):显示指定路径下的图片。此处默认开启了图片缓存功能以加速报表的生成.\n如不需要缓存,请在参数后面追加值FALSE,例如:TOIMAGE("D:/fr.png",false).\n如需要指定图片大小,拉伸显示, 则需要添加参数,TOIMAGE(patch, true, width, height).\n示例:=toimage("d:/1.jpg", true, "50%", 300), 第三个参数为指定宽度, 第四个参数为指定高度.\n如果参数为整数, 则直接写数字, 如果为百分比, 则需要加上引号, 如"300%"' , name : "TOIMAGE" , type : "OTHER" } , { def : 'LEFT(text,num_chars): 根据指定的字符数返回文本串中的第一个或前几个字符。\nText:包含需要选取字符的文本串或单元格引用。\nNum_chars:指定返回的字符串长度。\n备注:\n Num_chars的值必须等于或大于0。\n 如果num_chars大于整个文本的长度,LEFT函数将返回所有的文本。\n 如果省略num_chars,则默认值为1。\n示例:\nLEFT("Fine software",8)等于“Fine sof”。\nLEFT("Fine software")等于“F”。\n如果单元格A3中含有“China”,则LEFT(A3,2)等于“Ch”。' , name : "LEFT" , type : "TEXT" } , { def : 'SUBSTITUTE(text,old_text,new_text,instance_num): 用new_text替换文本串中的old_text。\nText:需要被替换字符的文本,或含有文本的单元格引用。\nOld_text:需要被替换的部分文本。\nNew_text:用于替换old_text的文本。\nInstance_num:指定用new_text来替换第几次出现的old_text。如果指定了instance_num,则只有指定位置上的old_text被替换,否则文字串中出现的所有old_text都被new_text替换。\n备注:\n 如果需要替换文本串中的指定文本,则使用SUBSTITUTE函数;如果需要替换文本串中指定位置上的任意文本,则使用REPLACE函数。\n示例:\nSUBSTITUTE("data base","base","model")等于“data model”。\nSUBSTITUTE("July 28, 2000","2","1",1)等于“July 18, 2000”。\nSUBSTITUTE("July 28, 2000","2","1")等于“July 18, 1000”。\nSUBSTITUTE("July 28, 2000","2","1",2)等于“July 28, 1000”。 ' , name : "SUBSTITUTE" , type : "TEXT" } , { def : " LOG ( number , base ) : 按指定的任意底数 , 返回数值的对数 。 \ nNumber : 需要求对数的正实数 。 \ nBase : 对数的底数 。 如果省略底数 , 默认值为10 。 \ n示例 : \ nLOG ( 16 , 2 ) 等于4 。 \ nLOG ( 10 ) 等于1 。 \ nLOG ( 24 , 3 ) 等于2 . 89
name : "REMOVEARRAY" , type : "ARRAY" } , { def : "WEBIMAGE(path):在web页面上显示指定路径下的图片。" , name : "WEBIMAGE" , type : "OTHER" } , { def : 'WEEK(serial_num):返回一个代表一年中的第几周的数字。\nSerial_num:表示输入的日期。\n备注:\nFineReport将日期保存为系列数,一个系列数代表一个与之匹配的日期,以方便用户对日期进行数值式计算。\n在1900年日期系统中,FineReport电子表格将1900年1月1日保存为系列数2,将1900年1月2日保存为系列数3,\n将1900年1月3日保存为系列数4……依此类推。如在1900年日期系统,1998年1月1日存为系列数35796。\n示例:\nWEEK("2010/1/1")等于52。\nWEEK("2010/1/6")等于1。\nWEEK(35796)等于1。' , name : "WEEK" , type : "DATETIME" } , { def : "filename(file)获取文件的文件名。\n当file为单文件时,返回文件名字符串,当file为多文件时,返回文件名的字符串数组。\n如果file不为文件类型,则返回错误信息。\n示例:\n假设文件控件在B2单元格,而B2单元格依次上传了三个不同类型文件{A.doc, C.xls ,B.cpt },则filename(B2)返回值为[“A.doc”, “C.xls”, “B.cpt”]。" , name : "FILENAME" , type : "OTHER" } , { def : "COSH(number): 返回一个数值的双曲线余弦值。\nNumber:需要求其双曲线余弦值的一个实数。\n备注:\n 双曲线余弦值计算公式为: ,其中e是自然对数的底,e=2.71828182845904。\n示例:\nCOSH(3)等于10.06766200。\nCOSH(5)等于74.20994852。\nCOSH(6)等于201.7156361。" , name : "COSH" , type : "MATH" } , { def : 'WEEKDAY(Serial_number):获取日期并返回星期数。返回值为介于0到6之间的某一整数,分别代表星期中的某一天(从星期日到星期六)。\nSerial_number:输入的日期\n备注:\nFineReport将日期保存为系列数,一个系列数代表一个与之匹配的日期,以方便用户对日期进行数值式计算。\n在1900年日期系统中,FineReport电子表格将1900年1月1日保存为系列数2,将1900年1月2日保存为系列数3,\n将1900年1月3日保存为系列数4……依此类推。如在1900年日期系统,1998年1月1日存为系列数35796。\n举例:\nWEEKDAY("2005/9/10")等于6(星期六)。\nWEEKDAY("2005/9/11")等于0(星期日)。\nWEEKDAY(35796)等于4(星期四)。\n' , name : "WEEKDAY" , type : "DATETIME" } , { def : "OR(logical1,logical2,…): 当所有参数的值为假时,返回FALSE;当任意参数的值为真时,返回TRUE。\nLogical1,logical2,…:指1到30个需要检验TRUE或FALSE的条件值。\n备注:\n 参数必须是逻辑值,或是含有逻辑值的数组或引用。\n 如果数组或引用中含有文本或空的单元格,则忽略其值。\n 如果在指定的单元格区域中没有逻辑值,AND函数将返回错误信息*NAME?。\n示例:\nOR(1+7=9,5+7=11)等于FALSE。\nOR(1+7=8,5+7=11)等于TRUE。" , name : "OR" , type : "LOGIC" } , { def : "MOD(number,divisor):返回两数相除的余数。结果的正负号与除数相同。\nnumber:为被除数。\ndivisor:为除数。\n示例:\nMOD(3, 2) 等于 1\nMOD(-3, 2) 等于 1\nMOD(3, -2) 等于 -1\nMOD(-3, -2) 等于 -1\n" , name : "MOD" , type : "MATH" } , { def : "TODAY():获取当前日期。\n示例:\n如果系统日期是2005年9月10日\n则TODAY()等于2005-9-10。" , name : "TODAY" , type : "DATETIME" } , { def : "ROUNDUP(number,num_digits):远离零值,向上(绝对值增大的方向)舍入数字。\nnumber:为需要向上舍入的任意实数。\nnum_digits:舍入后的数字的位数。\n函数 ROUNDUP 和函数 ROUND 功能相似,不同之处在于函数 ROUNDUP 总是向上舍入数字。\n示例:\nROUNDUP(3.2,0) 等于 4\nROUNDUP(76.9,0) 等于 77\nROUNDUP(3.14159, 3) 等于 3.142\nROUNDUP(-3.14159, 1) 等于 -3.2\nROUNDUP(31415.92654, -2) 等于 31,500\n\n" , name : "ROUNDUP" , type : "MATH" } , { def : " ROUND5 ( number , num _digits ) : 这个是四舍五入 , 奇进偶不进 。 \ nnumber : 需要进行舍入的数字 。 \ nnum _digits : 指定的位数 , 按此位数进行舍入 。 \ n如果 num _digits 大于 0 , 则舍入到指定的小数位 。 \ n如果 num _digits 等于 0 <EFBFBD>
var e = c . getNodesByParam ( b , a , null ) ; BI . each ( e , function ( a , b ) { BI . extend ( b , { checked : ! 0 } , d ) , c . updateNode ( b ) } ) } ) } } , refresh : function ( ) { this . nodes && this . nodes . refresh ( ) } , getValue : function ( ) { return this . nodes ? this . _getSelectedValues ( ) : null } , destroyed : function ( ) { this . stop ( ) , this . nodes && this . nodes . destroy ( ) } } ) , BI . extend ( BI . TreeView , { REQ _TYPE _INIT _DATA : 1 , REQ _TYPE _ADJUST _DATA : 2 , REQ _TYPE _SELECT _DATA : 3 , REQ _TYPE _GET _SELECTED _DATA : 4 } ) , BI . TreeView . EVENT _CHANGE = "EVENT_CHANGE" , BI . TreeView . EVENT _INIT = BI . Events . INIT , BI . TreeView . EVENT _AFTERINIT = BI . Events . AFTERINIT , BI . shortcut ( "bi.tree_view" , BI . TreeView ) , BI . AsyncTree = BI . inherit ( BI . TreeView , { _defaultConfig : function ( ) { return BI . extend ( BI . AsyncTree . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . AsyncTree . superclass . _init . apply ( this , arguments ) } , _configSetting : function ( ) { function a ( a , b , c ) { var d = $ . fn . zTree . getZTreeObj ( b ) ; d . checkNode ( c , ! c . checked , ! 0 , ! 0 ) } function b ( a , b ) { function c ( a ) { BI . each ( a , function ( a , b ) { b . halfCheck === ! 0 && ( b . halfCheck = ! 1 , c ( b . children ) ) } ) } if ( b . halfCheck = ! 1 , b . checked === ! 0 ) { c ( b . children ) ; var d = $ . fn . zTree . getZTreeObj ( a ) , e = d . getSelectedNodes ( ) ; BI . each ( e , function ( a , b ) { b . halfCheck = ! 1 } ) } } function c ( a , b ) { h . _beforeExpandNode ( a , b ) } function d ( a , b , c ) { h . _selectTreeNode ( b , c ) } function e ( a , b , c ) { c . halfCheck = ! 1 } function f ( a , b , c ) { c . halfCheck = ! 1 } var g = this . options . paras , h = this , i = { async : { enable : ! 1 , otherParam : BI . cjkEncodeDO ( g ) } , check : { enable : ! 0 } , data : { key : { title : "title" , name : "text" } , simpleData : { enable : ! 0 } } , view : { showIcon : ! 1 , expandSpeed : "" , nameIsHTML : ! 0 , dblClickExpand : ! 1 } , callback : { beforeCheck : b , onCheck : d , beforeExpand : c , onExpand : e , onCollapse : f , onClick : a } } ; return i } , _selectTreeNode : function ( a , b ) { var c = this , d = ( this . options , BI . deepClone ( b . parentValues || c . _getParentValues ( b ) ) ) , e = this . _getNodeValue ( b ) ; if ( b . checked === ! 0 ) ; else { var f = b , g = this . _getTree ( this . options . paras . selectedValues , d ) ; for ( BI . isNotNull ( g [ e ] ) && delete g [ e ] ; null != f && BI . isEmpty ( g ) ; ) d = d . slice ( 0 , d . length - 1 ) , f = f . getParentNode ( ) , null != f && ( g = this . _getTree ( this . options . paras . selectedValues , d ) , e = this . _getNodeValue ( f ) , delete g [ e ] ) } BI . AsyncTree . superclass . _selectTreeNode . apply ( c , arguments ) } , _beforeExpandNode : function ( a , b ) { function c ( a , c ) { d . nodes . addNodes ( b , a ) , c === ! 0 && BI . delay ( function ( ) { i ++ , g . times = i , e . itemsCreator ( g , h ) } , 100 ) } var d = this , e = this . options , f = b . parentValues || d . _getParentValues ( b ) , g = BI . extend ( { } , e . paras , { id : b . id , times : 1 , parentValues : f . concat ( this . _getNodeValue ( b ) ) , checkState : b . getCheckStatus ( ) } ) , h = function ( a ) { var b = a . items || [ ] ; b . length > 0 && c ( d . _dealWidthNodes ( b ) , ! ! a . hasNext ) } , i = 1 ; b . children || setTimeout ( function ( ) { e . itemsCreator ( g , h ) } , 17 ) } , _join : function ( a , b ) { function c ( a , b , f ) { BI . each ( b , function ( g , h ) { BI . isNull ( f [ g ] ) ? d . _addTreeNode ( e , a , g , h ) : BI . isEmpty ( f [ g ] ) ? d . _addTreeNode ( e , a , g , { } ) : c ( a . concat ( [ g ] ) , b [ g ] , f [ g ] ) } ) } var d = this , e = { } ; return c ( [ ] , a , b ) , c ( [ ] , b , a ) , e } , hasChecked : function ( ) { return ! BI . isEmpty ( this . options . paras . selectedValues ) || BI . AsyncTree . superclass . hasChecked . apply ( this , arguments ) } , getValue : function ( ) { if ( ! this . nodes ) return { } ; var a = this . _getSelectedValues ( ) ; return BI . isEmpty ( a ) ? BI . deepClone ( this . options . paras . selectedValues ) : BI . isEmpty ( this . options . paras . selectedValues ) ? a : this . _join ( a , this . options . paras . selectedValues ) } , stroke : function ( a ) { delete this . options . keyword , BI . extend ( this . options . paras , a ) ; var b = this . _configSetting ( ) ; this . _initTree ( b ) } } ) , BI . shortcut ( "bi.async_tree" , BI . AsyncTree ) , BI . PartTree = BI . inherit ( BI . AsyncTree , { _defaultConfig : function ( ) { return BI . extend ( BI . PartTree . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . PartTree . superclass . _init . apply ( this , arguments ) } , _loadMore : function ( ) { var a = this , b = this . options , c = BI . extend ( { } , b . paras , { type : BI . TreeView . REQ _TYPE _INIT _DATA , times : ++ this . times } ) ; this . tip . setLoading ( ) , b . itemsCreator ( c , function ( c ) { var d = ! ! c . hasNext , e = c . items || [ ] ; b . paras . lastSearchValue = c . lastSearchValue , a . _stop !== ! 0 && ( d ? a . tip . setLoaded ( ) : a . tip . setEnd ( ) , e . length > 0 && a . nodes . addNodes ( null , a . _dealWidthNodes ( e ) ) ) } ) } , _selectTreeNode : function ( a , b ) { var c = this , d = this . options , e = BI . deepClone ( b . parentValues || c . _getParentValues ( b ) ) , f = this . _getNodeValue ( b ) ; if ( b . checked === ! 0 ) BI . AsyncTree . supercl
b . isNeedAdjustWidth = c . isNeedAdjustWidth , b . adjustLength = c . adjustLength , b . popup = c . popup ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , element : this , height : c . height , trigger : c . trigger , direction : c . direction , isDefaultInit : c . isDefaultInit , isNeedAdjustWidth : c . isNeedAdjustWidth , isNeedAdjustHeight : c . isNeedAdjustHeight , adjustLength : c . adjustLength , el : a , popup : BI . extend ( { } , c . popup , { el : BI . extend ( { items : d } , c . popup . el ) } ) } ) , this . combo . on ( BI . Controller . EVENT _CHANGE , function ( a , c , d ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . ComboGroup . EVENT _CHANGE , d ) } ) } , getValue : function ( ) { return this . combo . getValue ( ) } , setValue : function ( a ) { this . combo . setValue ( a ) } } ) , BI . ComboGroup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.combo_group" , BI . ComboGroup ) , BI . VirtualGroup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . VirtualGroup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-virtual-group" , items : [ ] , layouts : [ { type : "bi.center" , hgap : 0 , vgap : 0 } ] } ) } , render : function ( ) { this . populate ( this . options . items ) } , _packageBtns : function ( a ) { for ( var b = this . options , c = b . layouts . length - 1 ; c > 0 ; c -- ) a = BI . map ( a , function ( a , d ) { return BI . extend ( { } , b . layouts [ c ] , { items : [ BI . extend ( { } , b . layouts [ c ] . el , { el : BI . stripEL ( d ) } ) ] } ) } ) ; return a } , _packageItems : function ( a , b ) { return BI . createItems ( BI . makeArrayByArray ( a , { } ) , BI . clone ( b ) ) } , _packageLayout : function ( a ) { for ( var b = this . options , c = BI . deepClone ( b . layouts [ 0 ] ) , d = BI . formatEL ( c ) . el ; d && d . items && ! BI . isEmpty ( d . items ) ; ) d = BI . formatEL ( d . items [ 0 ] ) . el ; return d . items = a , c } , addItems : function ( a ) { this . layouts . addItems ( a ) } , prependItems : function ( a ) { this . layouts . prependItems ( a ) } , setValue : function ( a ) { } , getValue : function ( ) { return this . layouts . getValue ( ) } , populate : function ( a ) { a = a || [ ] , this . options . items = a , a = this . _packageBtns ( a ) , this . layouts ? this . layouts . populate ( a ) : this . layouts = BI . createWidget ( BI . extend ( { element : this } , this . _packageLayout ( a ) ) ) } } ) , BI . VirtualGroup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.virtual_group" , BI . VirtualGroup ) , BI . Loader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Loader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-loader" , direction : "top" , isDefaultInit : ! 0 , logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { type : "bi.button_group" } , items : [ ] , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn , count : ! 1 , prev : ! 1 , next : { } , hasPrev : BI . emptyFn , hasNext : BI . emptyFn } ) } , _prevLoad : function ( ) { var a = this , b = this . options ; this . prev . setLoading ( ) , b . itemsCreator . apply ( this , [ { times : -- this . times } , function ( ) { a . prev . setLoaded ( ) , a . prependItems . apply ( a , arguments ) } ] ) } , _nextLoad : function ( ) { var a = this , b = this . options ; this . next . setLoading ( ) , b . itemsCreator . apply ( this , [ { times : ++ this . times } , function ( ) { a . next . setLoaded ( ) , a . addItems . apply ( a , arguments ) } ] ) } , _init : function ( ) { BI . Loader . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; b . itemsCreator === ! 1 && ( b . prev = ! 1 , b . next = ! 1 ) , b . prev !== ! 1 && ( this . prev = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , b . prev ) ) , this . prev . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . _prevLoad ( ) } ) ) , this . button _group = BI . createWidget ( b . el , { type : "bi.button_group" , chooseType : 0 , items : b . items , behaviors : { } , layouts : [ { type : "bi.vertical" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( b , c , d ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , b === BI . Events . CLICK && a . fireEvent ( BI . Loader . EVENT _CHANGE , d ) } ) , b . next !== ! 1 && ( this . next = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , b . next ) ) , this . next . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . _nextLoad ( ) } ) ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( b . direction ) , BI . extend ( { scrolly : ! 0 } , b . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( b . direction , this . prev , this . button _group , this . next ) } ) ) ) ) , b . isDefaultInit && BI . isEmpty ( b . items ) && BI . nextTick ( BI . bind ( function ( ) { b . isDefaultInit && BI . isEmpty ( b . items ) && this . populate ( ) } , this ) ) , BI . isNotEmptyArray ( b . items ) && this . populate ( b . items ) } , hasPrev : function ( ) { var a = this . options ; return BI . isNumber ( a . count ) ? this . count < a . count : ! ! a . hasPrev . apply ( this , [ { times : this . times , count : thi
if ( c . length != d . lineNumChars ) { var e = d . measure . appendChild ( Me ( "div" , [ Me ( "div" , c ) ] , "CodeMirror-linenumber CodeMirror-gutter-elt" ) ) , f = e . firstChild . offsetWidth , g = e . offsetWidth - f ; return d . lineGutter . style . width = "" , d . lineNumInnerWidth = Math . max ( f , d . lineGutter . offsetWidth - g ) + 1 , d . lineNumWidth = d . lineNumInnerWidth + g , d . lineNumChars = d . lineNumInnerWidth ? c . length : - 1 , d . lineGutter . style . width = d . lineNumWidth + "px" , k ( a ) , ! 0 } return ! 1 } function x ( a , b ) { return String ( a . lineNumberFormatter ( b + a . firstLineNumber ) ) } function y ( a ) { return a . scroller . getBoundingClientRect ( ) . left - a . sizer . getBoundingClientRect ( ) . left } function z ( a , b , c ) { var d = a . display ; this . viewport = b , this . visible = u ( d , a . doc , b ) , this . editorIsHidden = ! d . wrapper . offsetWidth , this . wrapperHeight = d . wrapper . clientHeight , this . wrapperWidth = d . wrapper . clientWidth , this . oldDisplayWidth = Ua ( a ) , this . force = c , this . dims = H ( a ) , this . events = [ ] } function A ( a ) { var b = a . display ; ! b . scrollbarsClipped && b . scroller . offsetWidth && ( b . nativeBarWidth = b . scroller . offsetWidth - b . scroller . clientWidth , b . heightForcer . style . height = Ta ( a ) + "px" , b . sizer . style . marginBottom = - b . nativeBarWidth + "px" , b . sizer . style . borderRightWidth = Ta ( a ) + "px" , b . scrollbarsClipped = ! 0 ) } function B ( a , b ) { var c = a . display , d = a . doc ; if ( b . editorIsHidden ) return Kb ( a ) , ! 1 ; if ( ! b . force && b . visible . from >= c . viewFrom && b . visible . to <= c . viewTo && ( null == c . updateLineNumbers || c . updateLineNumbers >= c . viewTo ) && c . renderedView == c . view && 0 == Ob ( a ) ) return ! 1 ; w ( a ) && ( Kb ( a ) , b . dims = H ( a ) ) ; var e = d . first + d . size , f = Math . max ( b . visible . from - a . options . viewportMargin , d . first ) , g = Math . min ( e , b . visible . to + a . options . viewportMargin ) ; c . viewFrom < f && f - c . viewFrom < 20 && ( f = Math . max ( d . first , c . viewFrom ) ) , c . viewTo > g && c . viewTo - g < 20 && ( g = Math . min ( e , c . viewTo ) ) , Ef && ( f = qd ( a . doc , f ) , g = rd ( a . doc , g ) ) ; var h = f != c . viewFrom || g != c . viewTo || c . lastWrapHeight != b . wrapperHeight || c . lastWrapWidth != b . wrapperWidth ; Nb ( a , f , g ) , c . viewOffset = _d ( Vd ( a . doc , c . viewFrom ) ) , a . display . mover . style . top = c . viewOffset + "px" ; var i = Ob ( a ) ; if ( ! h && 0 == i && ! b . force && c . renderedView == c . view && ( null == c . updateLineNumbers || c . updateLineNumbers >= c . viewTo ) ) return ! 1 ; var j = Pe ( ) ; return i > 4 && ( c . lineDiv . style . display = "none" ) , I ( a , c . updateLineNumbers , b . dims ) , i > 4 && ( c . lineDiv . style . display = "" ) , c . renderedView = c . view , j && Pe ( ) != j && j . offsetHeight && j . focus ( ) , Ne ( c . cursorDiv ) , Ne ( c . selectionDiv ) , c . gutters . style . height = 0 , h && ( c . lastWrapHeight = b . wrapperHeight , c . lastWrapWidth = b . wrapperWidth , Ma ( a , 400 ) ) , c . updateLineNumbers = null , ! 0 } function C ( a , b ) { for ( var c = b . viewport , d = ! 0 ; ( d && a . options . lineWrapping && b . oldDisplayWidth != Ua ( a ) || ( c && null != c . top && ( c = { top : Math . min ( a . doc . height + Ra ( a . display ) - Va ( a ) , c . top ) } ) , b . visible = u ( a . display , a . doc , c ) , ! ( b . visible . from >= a . display . viewFrom && b . visible . to <= a . display . viewTo ) ) ) && B ( a , b ) ; d = ! 1 ) { F ( a ) ; var e = o ( a ) ; Ha ( a ) , E ( a , e ) , s ( a , e ) } b . signal ( a , "update" , a ) , a . display . viewFrom == a . display . reportedViewFrom && a . display . viewTo == a . display . reportedViewTo || ( b . signal ( a , "viewportChange" , a , a . display . viewFrom , a . display . viewTo ) , a . display . reportedViewFrom = a . display . viewFrom , a . display . reportedViewTo = a . display . viewTo ) } function D ( a , b ) { var c = new z ( a , b ) ; if ( B ( a , c ) ) { F ( a ) , C ( a , c ) ; var d = o ( a ) ; Ha ( a ) , E ( a , d ) , s ( a , d ) , c . finish ( ) } } function E ( a , b ) { a . display . sizer . style . minHeight = b . docHeight + "px" ; var c = b . docHeight + a . display . barHeight ; a . display . heightForcer . style . top = c + "px" , a . display . gutters . style . height = Math . max ( c + Ta ( a ) , b . clientHeight ) + "px" } function F ( a ) { for ( var b = a . display , c = b . lineDiv . offsetTop , d = 0 ; d < b . view . length ; d ++ ) { var e , f = b . view [ d ] ; if ( ! f . hidden ) { if ( nf && of < 8 ) { var g = f . node . offsetTop + f . node . offsetHeight ; e = g - c , c = g } else { var h = f . node . getBoundingClientRect ( ) ; e = h . bottom - h . top } var i = f . line . height - e ; if ( e < 2 && ( e = rb ( b ) ) , ( i > . 001 || i < - . 001 ) && ( Yd ( f . line , e ) , G ( f . line ) , f . rest ) ) for ( var j = 0 ; j < f . rest . length ; j ++ ) G ( f . rest [ j ] ) } } } function G ( a ) { if ( a . widgets ) for ( var b = 0 ; b < a . widgets . length ; ++ b ) a . widgets [ b ] . height = a . widgets [ b ] . node . offsetHeight } function H ( a ) { for ( var b = a . display , c = { } , d = { } , e = b . gutters . clientLeft , f = b . gutters . firstChild , g = 0 ; f ; f = f . nextSibling , ++ g ) c [ a . options . gutters [ g ] ] = f . offsetLeft + f . clientLeft + e , d [ a . options . gutters [ g ] ] = f . clientWidth ; return { fixedPos : y ( b ) , gutterTotalWidth : b . gutters . offsetWidth , gutterLeft : c , gutterWidth : d , wrapperWidth : b . wrapper . clientWi
for ( var d , e = [ ] , f = b ; f < c ; f = d ) { var g = new Gb ( a . doc , Vd ( a . doc , f ) , f ) ; d = f + g . size , e . push ( g ) } return e } function Ib ( a , b , c , d ) { null == b && ( b = a . doc . first ) , null == c && ( c = a . doc . first + a . doc . size ) , d || ( d = 0 ) ; var e = a . display ; if ( d && c < e . viewTo && ( null == e . updateLineNumbers || e . updateLineNumbers > b ) && ( e . updateLineNumbers = b ) , a . curOp . viewChanged = ! 0 , b >= e . viewTo ) Ef && qd ( a . doc , b ) < e . viewTo && Kb ( a ) ; else if ( c <= e . viewFrom ) Ef && rd ( a . doc , c + d ) > e . viewFrom ? Kb ( a ) : ( e . viewFrom += d , e . viewTo += d ) ; else if ( b <= e . viewFrom && c >= e . viewTo ) Kb ( a ) ; else if ( b <= e . viewFrom ) { var f = Mb ( a , c , c + d , 1 ) ; f ? ( e . view = e . view . slice ( f . index ) , e . viewFrom = f . lineN , e . viewTo += d ) : Kb ( a ) } else if ( c >= e . viewTo ) { var f = Mb ( a , b , b , - 1 ) ; f ? ( e . view = e . view . slice ( 0 , f . index ) , e . viewTo = f . lineN ) : Kb ( a ) } else { var g = Mb ( a , b , b , - 1 ) , h = Mb ( a , c , c + d , 1 ) ; g && h ? ( e . view = e . view . slice ( 0 , g . index ) . concat ( Hb ( a , g . lineN , h . lineN ) ) . concat ( e . view . slice ( h . index ) ) , e . viewTo += d ) : Kb ( a ) } var i = e . externalMeasured ; i && ( c < i . lineN ? i . lineN += d : b < i . lineN + i . size && ( e . externalMeasured = null ) ) } function Jb ( a , b , c ) { a . curOp . viewChanged = ! 0 ; var d = a . display , e = a . display . externalMeasured ; if ( e && b >= e . lineN && b < e . lineN + e . size && ( d . externalMeasured = null ) , ! ( b < d . viewFrom || b >= d . viewTo ) ) { var f = d . view [ Lb ( a , b ) ] ; if ( null != f . node ) { var g = f . changes || ( f . changes = [ ] ) ; De ( g , c ) == - 1 && g . push ( c ) } } } function Kb ( a ) { a . display . viewFrom = a . display . viewTo = a . doc . first , a . display . view = [ ] , a . display . viewOffset = 0 } function Lb ( a , b ) { if ( b >= a . display . viewTo ) return null ; if ( b -= a . display . viewFrom , b < 0 ) return null ; for ( var c = a . display . view , d = 0 ; d < c . length ; d ++ ) if ( b -= c [ d ] . size , b < 0 ) return d } function Mb ( a , b , c , d ) { var e , f = Lb ( a , b ) , g = a . display . view ; if ( ! Ef || c == a . doc . first + a . doc . size ) return { index : f , lineN : c } ; for ( var h = 0 , i = a . display . viewFrom ; h < f ; h ++ ) i += g [ h ] . size ; if ( i != b ) { if ( d > 0 ) { if ( f == g . length - 1 ) return null ; e = i + g [ f ] . size - b , f ++ } else e = i - b ; b += e , c += e } for ( ; qd ( a . doc , c ) != c ; ) { if ( f == ( d < 0 ? 0 : g . length - 1 ) ) return null ; c += d * g [ f - ( d < 0 ? 1 : 0 ) ] . size , f += d } return { index : f , lineN : c } } function Nb ( a , b , c ) { var d = a . display , e = d . view ; 0 == e . length || b >= d . viewTo || c <= d . viewFrom ? ( d . view = Hb ( a , b , c ) , d . viewFrom = b ) : ( d . viewFrom > b ? d . view = Hb ( a , b , d . viewFrom ) . concat ( d . view ) : d . viewFrom < b && ( d . view = d . view . slice ( Lb ( a , b ) ) ) , d . viewFrom = b , d . viewTo < c ? d . view = d . view . concat ( Hb ( a , d . viewTo , c ) ) : d . viewTo > c && ( d . view = d . view . slice ( 0 , Lb ( a , c ) ) ) ) , d . viewTo = c } function Ob ( a ) { for ( var b = a . display . view , c = 0 , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; e . hidden || e . node && ! e . changes || ++ c } return c } function Pb ( a ) { function b ( ) { e . activeTouch && ( f = setTimeout ( function ( ) { e . activeTouch = null } , 1e3 ) , g = e . activeTouch , g . end = + new Date ) } function c ( a ) { if ( 1 != a . touches . length ) return ! 1 ; var b = a . touches [ 0 ] ; return b . radiusX <= 1 && b . radiusY <= 1 } function d ( a , b ) { if ( null == b . left ) return ! 0 ; var c = b . left - a . left , d = b . top - a . top ; return c * c + d * d > 400 } var e = a . display ; xg ( e . scroller , "mousedown" , Db ( a , Ub ) ) , nf && of < 11 ? xg ( e . scroller , "dblclick" , Db ( a , function ( b ) { if ( ! ve ( a , b ) ) { var c = Tb ( a , b ) ; if ( c && ! Zb ( a , b ) && ! Sb ( a . display , b ) ) { ug ( b ) ; var d = a . findWordAt ( c ) ; va ( a . doc , d . anchor , d . head ) } } } ) ) : xg ( e . scroller , "dblclick" , function ( b ) { ve ( a , b ) || ug ( b ) } ) , Cf || xg ( e . scroller , "contextmenu" , function ( b ) { pc ( a , b ) } ) ; var f , g = { end : 0 } ; xg ( e . scroller , "touchstart" , function ( a ) { if ( ! c ( a ) ) { clearTimeout ( f ) ; var b = + new Date ; e . activeTouch = { start : b , moved : ! 1 , prev : b - g . end <= 300 ? g : null } , 1 == a . touches . length && ( e . activeTouch . left = a . touches [ 0 ] . pageX , e . activeTouch . top = a . touches [ 0 ] . pageY ) } } ) , xg ( e . scroller , "touchmove" , function ( ) { e . activeTouch && ( e . activeTouch . moved = ! 0 ) } ) , xg ( e . scroller , "touchend" , function ( c ) { var f = e . activeTouch ; if ( f && ! Sb ( e , c ) && null != f . left && ! f . moved && new Date - f . start < 300 ) { var g , h = a . coordsChar ( e . activeTouch , "page" ) ; g = ! f . prev || d ( f , f . prev ) ? new ma ( h , h ) : ! f . prev . prev || d ( f , f . prev . prev ) ? a . findWordAt ( h ) : new ma ( Ff ( h . line , 0 ) , qa ( a . doc , Ff ( h . line + 1 , 0 ) ) ) , a . setSelection ( g . anchor , g . head ) , a . focus ( ) , ug ( c ) } b ( ) } ) , xg ( e . scroller , "touchcancel" , b ) , xg ( e . scroller , "scroll" , function ( ) { e . scroller . clientHeight && ( ac ( a , e . scroller . scrollTop ) , bc ( a , e . scroller . scrollLeft , ! 0 ) , zg ( a , "scroll" , a ) ) } ) , xg ( e . scroller , "mousewheel" , function ( b ) { cc ( a , b ) } ) , xg ( e . scroller , "DOMMouseScroll" , function ( b ) { cc ( a , b ) } ) , xg ( e . wrapper , "scroll" , function ( ) { e . wrapper . scrollTop = e . wrapper . scrollLeft = 0 } ) , e . dragFunctions = { simple : function ( b ) { ve ( a , b ) || wg ( b ) } , start : function ( b ) { _b ( a , b ) } , drop : Db ( a , $b ) } ; var h = e . i
if ( null == e . insertAt ? c . push ( e ) : c . splice ( Math . min ( c . length - 1 , Math . max ( 0 , e . insertAt ) ) , 0 , e ) , e . line = b , f && ! sd ( a , b ) ) { var d = _d ( b ) < a . scrollTop ; Yd ( b , b . height + vd ( e ) ) , d && Hc ( f , null , e . height ) , f . curOp . forceUpdate = ! 0 } return ! 0 } ) , e } function xd ( a , b , c , d ) { a . text = b , a . stateAfter && ( a . stateAfter = null ) , a . styles && ( a . styles = null ) , null != a . order && ( a . order = null ) , fd ( a ) , gd ( a , c ) ; var e = d ? d ( a ) : 1 ; e != a . height && Yd ( a , e ) } function yd ( a ) { a . parent = null , fd ( a ) } function zd ( a , b ) { if ( a ) for ( ; ; ) { var c = a . match ( /(?:^|\s+)line-(background-)?(\S+)/ ) ; if ( ! c ) break ; a = a . slice ( 0 , c . index ) + a . slice ( c . index + c [ 0 ] . length ) ; var d = c [ 1 ] ? "bgClass" : "textClass" ; null == b [ d ] ? b [ d ] = c [ 2 ] : new RegExp ( "(?:^|s)" + c [ 2 ] + "(?:$|s)" ) . test ( b [ d ] ) || ( b [ d ] += " " + c [ 2 ] ) } return a } function Ad ( b , c ) { if ( b . blankLine ) return b . blankLine ( c ) ; if ( b . innerMode ) { var d = a . innerMode ( b , c ) ; return d . mode . blankLine ? d . mode . blankLine ( d . state ) : void 0 } } function Bd ( b , c , d , e ) { for ( var f = 0 ; f < 10 ; f ++ ) { e && ( e [ 0 ] = a . innerMode ( b , d ) . mode ) ; var g = b . token ( c , d ) ; if ( c . pos > c . start ) return g } throw new Error ( "Mode " + b . name + " failed to advance stream." ) } function Cd ( a , b , c , d ) { function e ( a ) { return { start : l . start , end : l . pos , string : l . current ( ) , type : f || null , state : a ? bg ( g . mode , k ) : k } } var f , g = a . doc , h = g . mode ; b = qa ( g , b ) ; var i , j = Vd ( g , b . line ) , k = Pa ( a , b . line , c ) , l = new ig ( j . text , a . options . tabSize ) ; for ( d && ( i = [ ] ) ; ( d || l . pos < b . ch ) && ! l . eol ( ) ; ) l . start = l . pos , f = Bd ( h , l , k ) , d && i . push ( e ( ! 0 ) ) ; return d ? i : e ( ) } function Dd ( a , b , c , d , e , f , g ) { var h = c . flattenSpans ; null == h && ( h = a . options . flattenSpans ) ; var i , j = 0 , k = null , l = new ig ( b , a . options . tabSize ) , m = a . options . addModeClass && [ null ] ; for ( "" == b && zd ( Ad ( c , d ) , f ) ; ! l . eol ( ) ; ) { if ( l . pos > a . options . maxHighlightLength ? ( h = ! 1 , g && Gd ( a , b , d , l . pos ) , l . pos = b . length , i = null ) : i = zd ( Bd ( c , l , d , m ) , f ) , m ) { var n = m [ 0 ] . name ; n && ( i = "m-" + ( i ? n + " " + i : n ) ) } if ( ! h || k != i ) { for ( ; j < l . start ; ) j = Math . min ( l . start , j + 5e4 ) , e ( j , k ) ; k = i } l . start = l . pos } for ( ; j < l . pos ; ) { var o = Math . min ( l . pos , j + 5e4 ) ; e ( o , k ) , j = o } } function Ed ( a , b , c , d ) { var e = [ a . state . modeGen ] , f = { } ; Dd ( a , b . text , a . doc . mode , c , function ( a , b ) { e . push ( a , b ) } , f , d ) ; for ( var g = 0 ; g < a . state . overlays . length ; ++ g ) { var h = a . state . overlays [ g ] , i = 1 , j = 0 ; Dd ( a , b . text , h . mode , ! 0 , function ( a , b ) { for ( var c = i ; j < a ; ) { var d = e [ i ] ; d > a && e . splice ( i , 1 , a , e [ i + 1 ] , d ) , i += 2 , j = Math . min ( a , d ) } if ( b ) if ( h . opaque ) e . splice ( c , i - c , a , "cm-overlay " + b ) , i = c + 2 ; else for ( ; c < i ; c += 2 ) { var f = e [ c + 1 ] ; e [ c + 1 ] = ( f ? f + " " : "" ) + "cm-overlay " + b } } , f ) } return { styles : e , classes : f . bgClass || f . textClass ? f : null } } function Fd ( a , b , c ) { if ( ! b . styles || b . styles [ 0 ] != a . state . modeGen ) { var d = Ed ( a , b , b . stateAfter = Pa ( a , Zd ( b ) ) ) ; b . styles = d . styles , d . classes ? b . styleClasses = d . classes : b . styleClasses && ( b . styleClasses = null ) , c === a . doc . frontier && a . doc . frontier ++ } return b . styles } function Gd ( a , b , c , d ) { var e = a . doc . mode , f = new ig ( b , a . options . tabSize ) ; for ( f . start = f . pos = d || 0 , "" == b && Ad ( e , c ) ; ! f . eol ( ) && f . pos <= a . options . maxHighlightLength ; ) Bd ( e , f , c ) , f . start = f . pos } function Hd ( a , b ) { if ( ! a || /^\s*$/ . test ( a ) ) return null ; var c = b . addModeClass ? pg : og ; return c [ a ] || ( c [ a ] = a . replace ( /\S+/g , "cm-$&" ) ) } function Id ( a , b ) { var c = Me ( "span" , null , null , pf ? "padding-right: .1px" : null ) , d = { pre : Me ( "pre" , [ c ] , "CodeMirror-line" ) , content : c , col : 0 , pos : 0 , cm : a , splitSpaces : ( nf || pf ) && a . getOption ( "lineWrapping" ) } ; b . measure = { } ; for ( var e = 0 ; e <= ( b . rest ? b . rest . length : 0 ) ; e ++ ) { var f , g = e ? b . rest [ e - 1 ] : b . line ; d . pos = 0 , d . addToken = Kd , We ( a . display . measure ) && ( f = ae ( g ) ) && ( d . addToken = Md ( d . addToken , f ) ) , d . map = [ ] ; var h = b != a . display . externalMeasured && Zd ( g ) ; Od ( g , d , Fd ( a , g , h ) ) , g . styleClasses && ( g . styleClasses . bgClass && ( d . bgClass = Re ( g . styleClasses . bgClass , d . bgClass || "" ) ) , g . styleClasses . textClass && ( d . textClass = Re ( g . styleClasses . textClass , d . textClass || "" ) ) ) , 0 == d . map . length && d . map . push ( 0 , 0 , d . content . appendChild ( Ve ( a . display . measure ) ) ) , 0 == e ? ( b . measure . map = d . map , b . measure . cache = { } ) : ( ( b . measure . maps || ( b . measure . maps = [ ] ) ) . push ( d . map ) , ( b . measure . caches || ( b . measure . caches = [ ] ) ) . push ( { } ) ) } return pf && /\bcm-tab\b/ . test ( d . content . lastChild . className ) && ( d . content . className = "cm-tab-wrap-hack" ) , zg ( a , "renderLine" , a , b . line , d . pre ) , d . pre . className && ( d . textClass = Re ( d . pre . className , d . textClass || "" ) ) , d } function Jd ( a ) { var b = Me ( "span" , "•" , "cm-invalidchar" ) ; return b . title = "\\u" + a . charCodeAt ( 0 ) . toString ( 16 ) , b . setAttribute ( "aria-label" , b . title ) , b } function Kd ( a , b , c , d , e , f , g ) { if ( b ) { va
} , forceCompositionEnd : function ( ) { this . composing && ! this . composing . handled && ( this . applyComposition ( this . composing ) , this . composing . handled = ! 0 , this . div . blur ( ) , this . div . focus ( ) ) } , applyComposition : function ( a ) { a . data && a . data != a . startData && Db ( this . cm , $ ) ( this . cm , a . data , 0 , a . sel ) } , setUneditable : function ( a ) { a . setAttribute ( "contenteditable" , "false" ) } , onKeyPress : function ( a ) { a . preventDefault ( ) , Db ( this . cm , $ ) ( this . cm , String . fromCharCode ( null == a . charCode ? a . keyCode : a . charCode ) , 0 ) } , onContextMenu : Fe , resetPosition : Fe , needsContentAttribute : ! 0 } , fa . prototype ) , a . inputStyles = { textarea : da , contenteditable : fa } , la . prototype = { primary : function ( ) { return this . ranges [ this . primIndex ] } , equals : function ( a ) { if ( a == this ) return ! 0 ; if ( a . primIndex != this . primIndex || a . ranges . length != this . ranges . length ) return ! 1 ; for ( var b = 0 ; b < this . ranges . length ; b ++ ) { var c = this . ranges [ b ] , d = a . ranges [ b ] ; if ( 0 != Gf ( c . anchor , d . anchor ) || 0 != Gf ( c . head , d . head ) ) return ! 1 } return ! 0 } , deepCopy : function ( ) { for ( var a = [ ] , b = 0 ; b < this . ranges . length ; b ++ ) a [ b ] = new ma ( V ( this . ranges [ b ] . anchor ) , V ( this . ranges [ b ] . head ) ) ; return new la ( a , this . primIndex ) } , somethingSelected : function ( ) { for ( var a = 0 ; a < this . ranges . length ; a ++ ) if ( ! this . ranges [ a ] . empty ( ) ) return ! 0 ; return ! 1 } , contains : function ( a , b ) { b || ( b = a ) ; for ( var c = 0 ; c < this . ranges . length ; c ++ ) { var d = this . ranges [ c ] ; if ( Gf ( b , d . from ( ) ) >= 0 && Gf ( a , d . to ( ) ) <= 0 ) return c } return - 1 } } , ma . prototype = { from : function ( ) { return X ( this . anchor , this . head ) } , to : function ( ) { return W ( this . anchor , this . head ) } , empty : function ( ) { return this . head . line == this . anchor . line && this . head . ch == this . anchor . ch } } ; var If , Jf , Kf , Lf = { left : 0 , right : 0 , top : 0 , bottom : 0 } , Mf = null , Nf = 0 , Of = 0 , Pf = 0 , Qf = null ; nf ? Qf = - . 53 : kf ? Qf = 15 : rf ? Qf = - . 7 : tf && ( Qf = - 1 / 3 ) ; var Rf = function ( a ) { var b = a . wheelDeltaX , c = a . wheelDeltaY ; return null == b && a . detail && a . axis == a . HORIZONTAL _AXIS && ( b = a . detail ) , null == c && a . detail && a . axis == a . VERTICAL _AXIS ? c = a . detail : null == c && ( c = a . wheelDelta ) , { x : b , y : c } } ; a . wheelEventPixels = function ( a ) { var b = Rf ( a ) ; return b . x *= Qf , b . y *= Qf , b } ; var Sf = new ze , Tf = null , Uf = a . changeEnd = function ( a ) { return a . text ? Ff ( a . from . line + a . text . length - 1 , Ce ( a . text ) . length + ( 1 == a . text . length ? a . from . ch : 0 ) ) : a . to } ; a . prototype = { constructor : a , focus : function ( ) { window . focus ( ) , this . display . input . focus ( ) } , setOption : function ( a , b ) { var c = this . options , d = c [ a ] ; c [ a ] == b && "mode" != a || ( c [ a ] = b , Wf . hasOwnProperty ( a ) && Db ( this , Wf [ a ] ) ( this , b , d ) ) } , getOption : function ( a ) { return this . options [ a ] } , getDoc : function ( ) { return this . doc } , addKeyMap : function ( a , b ) { this . state . keyMaps [ b ? "push" : "unshift" ] ( Rc ( a ) ) } , removeKeyMap : function ( a ) { for ( var b = this . state . keyMaps , c = 0 ; c < b . length ; ++ c ) if ( b [ c ] == a || b [ c ] . name == a ) return b . splice ( c , 1 ) , ! 0 } , addOverlay : Eb ( function ( b , c ) { var d = b . token ? b : a . getMode ( this . options , b ) ; if ( d . startState ) throw new Error ( "Overlays may not be stateful." ) ; this . state . overlays . push ( { mode : d , modeSpec : b , opaque : c && c . opaque } ) , this . state . modeGen ++ , Ib ( this ) } ) , removeOverlay : Eb ( function ( a ) { for ( var b = this . state . overlays , c = 0 ; c < b . length ; ++ c ) { var d = b [ c ] . modeSpec ; if ( d == a || "string" == typeof a && d . name == a ) return b . splice ( c , 1 ) , this . state . modeGen ++ , void Ib ( this ) } } ) , indentLine : Eb ( function ( a , b , c ) { "string" != typeof b && "number" != typeof b && ( b = null == b ? this . options . smartIndent ? "smart" : "prev" : b ? "add" : "subtract" ) , sa ( this . doc , a ) && Kc ( this , a , b , c ) } ) , indentSelection : Eb ( function ( a ) { for ( var b = this . doc . sel . ranges , c = - 1 , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; if ( e . empty ( ) ) e . head . line > c && ( Kc ( this , e . head . line , a , ! 0 ) , c = e . head . line , d == this . doc . sel . primIndex && Ic ( this ) ) ; else { var f = e . from ( ) , g = e . to ( ) , h = Math . max ( c , f . line ) ; c = Math . min ( this . lastLine ( ) , g . line - ( g . ch ? 0 : 1 ) ) + 1 ; for ( var i = h ; i < c ; ++ i ) Kc ( this , i , a ) ; var j = this . doc . sel . ranges ; 0 == f . ch && b . length == j . length && j [ d ] . from ( ) . ch > 0 && xa ( this . doc , d , new ma ( f , j [ d ] . to ( ) ) , Dg ) } } } ) , getTokenAt : function ( a , b ) { return Cd ( this , a , b ) } , getLineTokens : function ( a , b ) { return Cd ( this , Ff ( a ) , b , ! 0 ) } , getTokenTypeAt : function ( a ) { a = qa ( this . doc , a ) ; var b , c = Fd ( this , Vd ( this . doc , a . line ) ) , d = 0 , e = ( c . length - 1 ) / 2 , f = a . ch ; if ( 0 == f ) b = c [ 2 ] ; else for ( ; ; ) { var g = d + e >> 1 ; if ( ( g ? c [ 2 * g - 1 ] : 0 ) >= f ) e = g ; else { if ( ! ( c [ 2 * g + 1 ] < f ) ) { b = c [ 2 * g + 2 ] ; break } d = g + 1 } } var h = b ? b . indexOf ( "cm-overlay " ) : - 1 ; return h < 0 ? b : 0 == h ? null : b . slice ( 0 , h - 1 ) } , getModeAt : function ( b ) { var c = this . doc . mode ; return c . innerMode ? a . innerMo
b = qa ( this , b ) , c = c ? qa ( this , c ) : b , Cc ( this , a , b , c , d ) } , getRange : function ( a , b , c ) { var d = Wd ( this , qa ( this , a ) , qa ( this , b ) ) ; return c === ! 1 ? d : d . join ( c || "\n" ) } , getLine : function ( a ) { var b = this . getLineHandle ( a ) ; return b && b . text } , getLineHandle : function ( a ) { if ( sa ( this , a ) ) return Vd ( this , a ) } , getLineNumber : function ( a ) { return Zd ( a ) } , getLineHandleVisualStart : function ( a ) { return "number" == typeof a && ( a = Vd ( this , a ) ) , od ( a ) } , lineCount : function ( ) { return this . size } , firstLine : function ( ) { return this . first } , lastLine : function ( ) { return this . first + this . size - 1 } , clipPos : function ( a ) { return qa ( this , a ) } , getCursor : function ( a ) { var b , c = this . sel . primary ( ) ; return b = null == a || "head" == a ? c . head : "anchor" == a ? c . anchor : "end" == a || "to" == a || a === ! 1 ? c . to ( ) : c . from ( ) } , listSelections : function ( ) { return this . sel . ranges } , somethingSelected : function ( ) { return this . sel . somethingSelected ( ) } , setCursor : Fb ( function ( a , b , c ) { ya ( this , qa ( this , "number" == typeof a ? Ff ( a , b || 0 ) : a ) , null , c ) } ) , setSelection : Fb ( function ( a , b , c ) { ya ( this , qa ( this , a ) , qa ( this , b || a ) , c ) } ) , extendSelection : Fb ( function ( a , b , c ) { va ( this , qa ( this , a ) , b && qa ( this , b ) , c ) } ) , extendSelections : Fb ( function ( a , b ) { wa ( this , ta ( this , a , b ) ) } ) , extendSelectionsBy : Fb ( function ( a , b ) { wa ( this , Ee ( this . sel . ranges , a ) , b ) } ) , setSelections : Fb ( function ( a , b , c ) { if ( a . length ) { for ( var d = 0 , e = [ ] ; d < a . length ; d ++ ) e [ d ] = new ma ( qa ( this , a [ d ] . anchor ) , qa ( this , a [ d ] . head ) ) ; null == b && ( b = Math . min ( a . length - 1 , this . sel . primIndex ) ) , Ba ( this , na ( e , b ) , c ) } } ) , addSelection : Fb ( function ( a , b , c ) { var d = this . sel . ranges . slice ( 0 ) ; d . push ( new ma ( qa ( this , a ) , qa ( this , b || a ) ) ) , Ba ( this , na ( d , d . length - 1 ) , c ) } ) , getSelection : function ( a ) { for ( var b , c = this . sel . ranges , d = 0 ; d < c . length ; d ++ ) { var e = Wd ( this , c [ d ] . from ( ) , c [ d ] . to ( ) ) ; b = b ? b . concat ( e ) : e } return a === ! 1 ? b : b . join ( a || "\n" ) } , getSelections : function ( a ) { for ( var b = [ ] , c = this . sel . ranges , d = 0 ; d < c . length ; d ++ ) { var e = Wd ( this , c [ d ] . from ( ) , c [ d ] . to ( ) ) ; a !== ! 1 && ( e = e . join ( a || "\n" ) ) , b [ d ] = e } return b } , replaceSelection : function ( a , b , c ) { for ( var d = [ ] , e = 0 ; e < this . sel . ranges . length ; e ++ ) d [ e ] = a ; this . replaceSelections ( d , b , c || "+input" ) } , replaceSelections : Fb ( function ( a , b , c ) { for ( var d = [ ] , e = this . sel , f = 0 ; f < e . ranges . length ; f ++ ) { var g = e . ranges [ f ] ; d [ f ] = { from : g . from ( ) , to : g . to ( ) , text : Ug ( a [ f ] ) , origin : c } } for ( var h = b && "end" != b && uc ( this , d , b ) , f = d . length - 1 ; f >= 0 ; f -- ) wc ( this , d [ f ] ) ; h ? Aa ( this , h ) : this . cm && Ic ( this . cm ) } ) , undo : Fb ( function ( ) { yc ( this , "undo" ) } ) , redo : Fb ( function ( ) { yc ( this , "redo" ) } ) , undoSelection : Fb ( function ( ) { yc ( this , "undo" , ! 0 ) } ) , redoSelection : Fb ( function ( ) { yc ( this , "redo" , ! 0 ) } ) , setExtending : function ( a ) { this . extend = a } , getExtending : function ( ) { return this . extend } , historySize : function ( ) { for ( var a = this . history , b = 0 , c = 0 , d = 0 ; d < a . done . length ; d ++ ) a . done [ d ] . ranges || ++ b ; for ( var d = 0 ; d < a . undone . length ; d ++ ) a . undone [ d ] . ranges || ++ c ; return { undo : b , redo : c } } , clearHistory : function ( ) { this . history = new be ( this . history . maxGeneration ) } , markClean : function ( ) { this . cleanGeneration = this . changeGeneration ( ! 0 ) } , changeGeneration : function ( a ) { return a && ( this . history . lastOp = this . history . lastSelOp = this . history . lastOrigin = null ) , this . history . generation } , isClean : function ( a ) { return this . history . generation == ( a || this . cleanGeneration ) } , getHistory : function ( ) { return { done : me ( this . history . done ) , undone : me ( this . history . undone ) } } , setHistory : function ( a ) { var b = this . history = new be ( this . history . maxGeneration ) ; b . done = me ( a . done . slice ( 0 ) , null , ! 0 ) , b . undone = me ( a . undone . slice ( 0 ) , null , ! 0 ) } , addLineClass : Fb ( function ( a , b , c ) { return Lc ( this , a , "gutter" == b ? "gutter" : "class" , function ( a ) { var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "gutter" == b ? "gutterClass" : "wrapClass" ; if ( a [ d ] ) { if ( Qe ( c ) . test ( a [ d ] ) ) return ! 1 ; a [ d ] += " " + c } else a [ d ] = c ; return ! 0 } ) } ) , removeLineClass : Fb ( function ( a , b , c ) { return Lc ( this , a , "gutter" == b ? "gutter" : "class" , function ( a ) { var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "gutter" == b ? "gutterClass" : "wrapClass" , e = a [ d ] ; if ( ! e ) return ! 1 ; if ( null == c ) a [ d ] = null ; else { var f = e . match ( Qe ( c ) ) ; if ( ! f ) return ! 1 ; var g = f . index + f [ 0 ] . length ; a [ d ] = e . slice ( 0 , f . index ) + ( f . index && g != e . length ? " " : "" ) + e . slice ( g ) || null } return ! 0 } ) } ) , addLineWidget : Fb ( function ( a , b , c ) { return wd ( this , a , b , c ) } ) , removeLineWidget : function ( a ) { a . clear ( ) } , markText : function ( a , b , c ) { return Sc ( this , qa ( this , a ) , qa ( this , b ) , c , "range" ) } , setBookmar
scrollx : b . overflowX === ! 0 && b . overflowY === ! 1 , items : [ this . container ] } ) , b . items . length > 0 && this . _populate ( ) , 0 === b . scrollLeft && 0 === b . scrollTop || BI . nextTick ( function ( ) { a . element . scrollTop ( b . scrollTop ) , a . element . scrollLeft ( b . scrollLeft ) } ) } , _getOverscanIndices : function ( a , b , c , d ) { return { overscanStartIndex : Math . max ( 0 , c - b ) , overscanStopIndex : Math . min ( a - 1 , d + b ) } } , _calculateChildrenToRender : function ( ) { var a = this , b = this . options , c = b . width , d = b . height , e = BI . clamp ( b . scrollLeft , 0 , this . _getMaxScrollLeft ( ) ) , f = BI . clamp ( b . scrollTop , 0 , this . _getMaxScrollTop ( ) ) , g = b . overscanColumnCount , h = b . overscanRowCount ; if ( d > 0 && c > 0 ) { var i = this . _columnSizeAndPositionManager . getVisibleCellRange ( c , e ) , j = this . _rowSizeAndPositionManager . getVisibleCellRange ( d , f ) ; if ( BI . isEmpty ( i ) || BI . isEmpty ( j ) ) return ; var k = this . _columnSizeAndPositionManager . getOffsetAdjustment ( c , e ) , l = this . _rowSizeAndPositionManager . getOffsetAdjustment ( d , f ) ; this . _renderedColumnStartIndex = i . start , this . _renderedColumnStopIndex = i . stop , this . _renderedRowStartIndex = j . start , this . _renderedRowStopIndex = j . stop ; var m = this . _getOverscanIndices ( this . columnCount , g , this . _renderedColumnStartIndex , this . _renderedColumnStopIndex ) , n = this . _getOverscanIndices ( this . rowCount , h , this . _renderedRowStartIndex , this . _renderedRowStopIndex ) , o = m . overscanStartIndex , p = m . overscanStopIndex , q = n . overscanStartIndex , r = n . overscanStopIndex , s = this . _rowSizeAndPositionManager . getSizeAndPositionOfCell ( q ) , t = this . _columnSizeAndPositionManager . getSizeAndPositionOfCell ( o ) , u = this . _rowSizeAndPositionManager . getSizeAndPositionOfCell ( r ) , v = this . _columnSizeAndPositionManager . getSizeAndPositionOfCell ( p ) , w = s . offset + l , x = t . offset + k , y = u . offset + l + u . size , z = v . offset + k + v . size ; if ( w >= this . renderRange . minY && y <= this . renderRange . maxY && x >= this . renderRange . minX && z <= this . renderRange . maxX ) return ; for ( var A = [ ] , B = { } , C = { } , D = this . _getMaxScrollLeft ( ) , E = this . _getMaxScrollTop ( ) , F = 0 , G = 0 , H = 0 , I = q ; I <= r ; I ++ ) for ( var J = this . _rowSizeAndPositionManager . getSizeAndPositionOfCell ( I ) , K = o ; K <= p ; K ++ ) { var L , M = I + "-" + K , N = this . _columnSizeAndPositionManager . getSizeAndPositionOfCell ( K ) , O = this . renderedKeys [ M ] && this . renderedKeys [ M ] [ 2 ] ; O >= 0 ? ( N . size !== this . renderedCells [ O ] . _width && ( this . renderedCells [ O ] . _width = N . size , this . renderedCells [ O ] . el . setWidth ( N . size ) ) , J . size !== this . renderedCells [ O ] . _height && ( this . renderedCells [ O ] . _height = J . size , this . renderedCells [ O ] . el . setHeight ( J . size ) ) , this . renderedCells [ O ] . _left !== N . offset + k && this . renderedCells [ O ] . el . element . css ( "left" , N . offset + k + "px" ) , this . renderedCells [ O ] . _top !== J . offset + l && this . renderedCells [ O ] . el . element . css ( "top" , J . offset + l + "px" ) , A . push ( L = this . renderedCells [ O ] ) ) : ( L = BI . createWidget ( BI . extend ( { type : "bi.label" , width : N . size , height : J . size } , b . items [ I ] [ K ] , { cls : ( b . items [ I ] [ K ] . cls || "" ) + " grid-cell" + ( 0 === I ? " first-row" : "" ) + ( 0 === K ? " first-col" : "" ) , _rowIndex : I , _columnIndex : K , _left : N . offset + k , _top : J . offset + l } ) ) , A . push ( { el : L , left : N . offset + k , top : J . offset + l , _left : N . offset + k , _top : J . offset + l , _width : N . size , _height : J . size } ) ) , D = Math . min ( D , N . offset + k ) , F = Math . max ( F , N . offset + k + N . size ) , E = Math . min ( E , J . offset + l ) , G = Math . max ( G , J . offset + l + J . size ) , B [ M ] = [ I , K , H ] , C [ H ] = L , H ++ } var P = { } , Q = { } , R = [ ] ; BI . each ( B , function ( b , c ) { a . renderedKeys [ b ] ? P [ b ] = c : Q [ b ] = c } ) , BI . each ( this . renderedKeys , function ( a , b ) { P [ a ] || Q [ a ] || R . push ( b [ 2 ] ) } ) , BI . each ( R , function ( b , c ) { a . renderedCells [ c ] . el . _destroy ( ) } ) ; var S = [ ] ; BI . each ( Q , function ( a , b ) { S . push ( A [ b [ 2 ] ] ) } ) , this . container . addItems ( S ) , this . container . _children = C , this . container . attr ( "items" , A ) , this . renderedCells = A , this . renderedKeys = B , this . renderRange = { minX : D , minY : E , maxX : F , maxY : G } } } , _getMaxScrollLeft : function ( ) { return Math . max ( 0 , this . _columnSizeAndPositionManager . getTotalSize ( ) - this . options . width + ( this . options . overflowX ? BI . DOM . getScrollWidth ( ) : 0 ) ) } , _getMaxScrollTop : function ( ) { return Math . max ( 0 , this . _rowSizeAndPositionManager . getTotalSize ( ) - this . options . height + ( this . options . overflowY ? BI . DOM . getScrollWidth ( ) : 0 ) ) } , _populate : function ( a ) { var b = this . options ; this . _reRange ( ) , this . columnCount = 0 , this . rowCount = 0 , a && a !== this . options . items && ( this . options . items = a ) , BI . isNumber ( b . columnCount ) ? this . columnCount = b . columnCount : b . items . length > 0 && ( this . columnCount = b . items [ 0 ] . length ) , BI . isNumber ( b . rowCount ) ? th
} ) ) ) ) } , doClick : function ( ) { BI . BlankIconIconTextItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . BlankIconIconTextItem . EVENT _CHANGE , this . getValue ( ) , this ) } , setSelected : function ( a ) { BI . BlankIconIconTextItem . superclass . setSelected . apply ( this , arguments ) , this . icon1 . setSelected ( a ) , this . icon2 . setSelected ( a ) } , 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 ( ) } , 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 . BlankIconIconTextItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.blank_icon_icon_text_item" , BI . BlankIconIconTextItem ) , BI . BlankIconTextIconItem = BI . inherit ( BI . BasicButton , { _const : { commonWidth : 25 } , _defaultConfig : function ( ) { var a = BI . BlankIconTextIconItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-blank-icon-text-icon-item" , logic : { dynamic : ! 1 } , iconCls1 : "close-ha-font" , iconCls2 : "close-ha-font" , blankWidth : 0 , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . BlankIconTextIconItem . 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 } } ] } ) ; BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.center_adapt" , cls : a . iconCls2 , width : b . commonWidth , height : a . height , 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" , { type : "bi.layout" , width : a . blankWidth } , c , this . text , { type : "bi.layout" , width : b . commonWidth } ) } ) ) ) ) } , doClick : function ( ) { BI . BlankIconTextIconItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . BlankIconTextIconItem . 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 . BlankIconTextIconItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.blank_icon_text_icon_item" , BI . BlankIconTextIconItem ) , BI . BlankIconTextItem = BI . inherit ( BI . BasicButton , { _const : { commonWidth : 25 } , _defaultConfig : function ( ) { var a = BI . BlankIconTextItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-blank-icon-text-item" , logic : { dynamic : ! 1 } , cls : "close-ha-font" , blankWidth : 0 , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . BlankIconTextItem . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this . _const , c = BI . createWidget ( { type : "bi.layout" , width : a . blankWidth } ) ; 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 . c
this . watermark . setEnable ( ! b . disabled ) ) : ( this . watermark = BI . createWidget ( { type : "bi.text_button" , cls : "bi-water-mark" , textAlign : "left" , height : 30 , text : b . watermark , invalid : b . invalid , disabled : b . disabled } ) , this . watermark . on ( BI . TextButton . EVENT _CHANGE , function ( ) { a . focus ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . watermark , left : 0 , top : 0 , right : 0 } ] } ) ) ) } , _focus : function ( ) { this . content . element . addClass ( "textarea-editor-focus" ) , this . _checkWaterMark ( ) } , _blur : function ( ) { this . content . element . removeClass ( "textarea-editor-focus" ) , this . _checkWaterMark ( ) } , focus : function ( ) { this . _focus ( ) , this . content . element . focus ( ) } , blur : function ( ) { this . _blur ( ) , this . content . element . blur ( ) } , getValue : function ( ) { return this . content . element . val ( ) } , setValue : function ( a ) { this . content . element . val ( a ) , this . _checkWaterMark ( ) } , setStyle : function ( a ) { this . style = a , this . element . css ( a ) , this . content . element . css ( BI . extend ( { } , a , { color : a . color || BI . DOM . getContrastColor ( BI . DOM . isRGBColor ( a . backgroundColor ) ? BI . DOM . rgb2hex ( a . backgroundColor ) : a . backgroundColor ) } ) ) } , getStyle : function ( ) { return this . style } , _setValid : function ( a ) { BI . TextAreaEditor . superclass . _setValid . apply ( this , arguments ) } } ) , BI . TextAreaEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . TextAreaEditor . EVENT _BLUR = "EVENT_BLUR" , BI . TextAreaEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . shortcut ( "bi.textarea_editor" , BI . TextAreaEditor ) , BI . Icon = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . Icon . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { tagName : "i" , baseCls : ( a . baseCls || "" ) + " x-icon b-font horizon-center display-block" } ) } , _init : function ( ) { BI . Icon . superclass . _init . apply ( this , arguments ) , BI . isIE9Below ( ) && this . element . addClass ( "hack" ) } } ) , BI . shortcut ( "bi.icon" , BI . Icon ) , BI . Iframe = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . Iframe . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-iframe" , src : "" , width : "100%" , height : "100%" } ) } , _init : function ( ) { var a = this . options ; this . options . element = $ ( "<iframe frameborder='0' src='" + a . src + "'>" ) , BI . Iframe . superclass . _init . apply ( this , arguments ) } , setSrc : function ( a ) { this . options . src = a , this . element . attr ( "src" , a ) } , getSrc : function ( ) { return this . options . src } , setName : function ( a ) { this . options . name = a , this . element . attr ( "name" , a ) } , getName : function ( ) { return this . options . name } , getWidth : function ( ) { return this . options . width } , getHeight : function ( ) { return this . options . height } } ) , BI . shortcut ( "bi.iframe" , BI . Iframe ) , BI . Img = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . Img . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-img display-block" , src : "" , width : "100%" , height : "100%" } ) } , _init : function ( ) { var a = this . options ; this . options . element = $ ( "<img src='" + a . src + "'>" ) , BI . Img . superclass . _init . apply ( this , arguments ) } , setSrc : function ( a ) { this . options . src = a , this . element . attr ( "src" , a ) } , getSrc : function ( ) { return this . options . src } } ) , BI . shortcut ( "bi.img" , BI . Img ) , BI . Checkbox = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var a = BI . Checkbox . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-checkbox check-box-icon" , selected : ! 1 , handler : BI . emptyFn , width : 16 , height : 16 , iconWidth : 16 , iconHeight : 16 } ) } , _init : function ( ) { BI . Checkbox . superclass . _init . apply ( this , arguments ) } , doClick : function ( ) { BI . Checkbox . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . Checkbox . EVENT _CHANGE ) } } ) , BI . Checkbox . EVENT _CHANGE = "Checkbox.EVENT_CHANGE" , BI . shortcut ( "bi.checkbox" , BI . Checkbox ) , function ( ) { var F = function ( a ) { return function ( b ) { var c = b . files || [ b ] ; return c . item || ( c . item = a ) , c } } ( function ( a ) { return this [ a ] } ) , event = { add : document . addEventListener ? function ( a , b , c ) { return a . addEventListener ( b , c , ! 1 ) , this } : function ( a , b , c ) { return a . attachEvent ( "on" + b , c ) , this } , del : document . removeEventListener ? function ( a , b , c ) { return a . removeEventListener ( b , c , ! 1 ) , this } : function ( a , b , c ) { return a . detachEvent ( "on" + b , c ) , this } , stop : function ( a ) { return a ? ( a . stopPropagation ? a . stopPropagation ( ) : a . cancelBubble = ! 0 , a . preventDefault ? a . preventDefault ( ) : a . returnValue = ! 1 ) : self . event && ( event . returnValue = ! ( e
} } function k ( a , c , d , e ) { if ( b ( d ) ) for ( var f = 0 ; f < d . length ; f ++ ) j ( c , d [ f ] ) && a . push ( e ( d [ f ] , f ) ) ; else for ( var g in d ) if ( d . hasOwnProperty ( g ) ) { var h = d [ g ] ; h = h && h !== ! 0 ? h . displayText ? { text : h . text , displayText : h . displayText } : h . text : g , j ( c , h ) && a . push ( e ( h ) ) } } function l ( a ) { "." == a . charAt ( 0 ) && ( a = a . substr ( 1 ) ) ; for ( var b = a . split ( t + t ) , c = 0 ; c < b . length ; c ++ ) b [ c ] = b [ c ] . replace ( new RegExp ( t , "g" ) , "" ) ; return b . join ( t ) } function m ( a ) { for ( var b = e ( a ) . split ( "." ) , c = 0 ; c < b . length ; c ++ ) b [ c ] = t + b [ c ] . replace ( new RegExp ( t , "g" ) , t + t ) + t ; var d = b . join ( "." ) ; return "string" == typeof a ? d : ( a = i ( a ) , a . text = d , a ) } function n ( a , b , c , d ) { for ( var e = ! 1 , f = [ ] , g = b . start , j = ! 0 ; j ; ) j = "." == b . string . charAt ( 0 ) , e = e || b . string . charAt ( 0 ) == t , g = b . start , f . unshift ( l ( b . string ) ) , b = d . getTokenAt ( v ( a . line , b . start ) ) , "." == b . string && ( j = ! 0 , b = d . getTokenAt ( v ( a . line , b . start ) ) ) ; var n = f . join ( "." ) ; k ( c , n , q , function ( a ) { return e ? m ( a ) : a } ) , k ( c , n , r , function ( a ) { return e ? m ( a ) : a } ) , n = f . pop ( ) ; var o = f . join ( "." ) , s = ! 1 , u = o ; if ( ! h ( o ) ) { var w = o ; o = p ( o , d ) , o !== w && ( s = ! 0 ) } var x = h ( o ) ; return x && x . columns && ( x = x . columns ) , x && k ( c , n , x , function ( a ) { var b = o ; return 1 == s && ( b = u ) , "string" == typeof a ? a = b + "." + a : ( a = i ( a ) , a . text = b + "." + a . text ) , e ? m ( a ) : a } ) , g } function o ( a , b ) { for ( var c = a . split ( /\s+/ ) , d = 0 ; d < c . length ; d ++ ) c [ d ] && b ( c [ d ] . replace ( /[,;]/g , "" ) ) } function p ( a , b ) { for ( var c = b . doc , d = c . getValue ( ) , e = a . toUpperCase ( ) , f = "" , g = "" , i = [ ] , j = { start : v ( 0 , 0 ) , end : v ( b . lastLine ( ) , b . getLineHandle ( b . lastLine ( ) ) . length ) } , k = d . indexOf ( u . QUERY _DIV ) ; k != - 1 ; ) i . push ( c . posFromIndex ( k ) ) , k = d . indexOf ( u . QUERY _DIV , k + 1 ) ; i . unshift ( v ( 0 , 0 ) ) , i . push ( v ( b . lastLine ( ) , b . getLineHandle ( b . lastLine ( ) ) . text . length ) ) ; for ( var l = null , m = b . getCursor ( ) , n = 0 ; n < i . length ; n ++ ) { if ( ( null == l || w ( m , l ) > 0 ) && w ( m , i [ n ] ) <= 0 ) { j = { start : l , end : i [ n ] } ; break } l = i [ n ] } for ( var p = c . getRange ( j . start , j . end , ! 1 ) , n = 0 ; n < p . length ; n ++ ) { var q = p [ n ] ; if ( o ( q , function ( a ) { var b = a . toUpperCase ( ) ; b === e && h ( f ) && ( g = f ) , b !== u . ALIAS _KEYWORD && ( f = a ) } ) , g ) break } return g } var q , r , s , t , u = { QUERY _DIV : ";" , ALIAS _KEYWORD : "AS" } , v = a . Pos , w = a . cmpPos ; a . registerHelper ( "hint" , "sql" , function ( a , b ) { q = g ( b && b . tables ) ; var e = b && b . defaultTable , f = b && b . disableKeywords ; r = e && h ( e ) , s = c ( a ) ; var i = BI . size ( s ) , j = [ ] , l = { } , m = a . getCursor ( ) , o = a . getTokenAt ( m ) ; BI . each ( BI . FormulaCollections , function ( a , b ) { 0 != b . lastIndexOf ( o . string , 0 ) || BI . contains ( j , b ) || j . push ( b ) } ) , BI . each ( BI . FormulaJson , function ( a , b ) { l [ b . name . toLowerCase ( ) ] = b . def } ) , s = BI . concat ( BI . keys ( s ) , j ) , t = d ( a ) , e && ! r && ( r = p ( e , a ) ) , r = r || [ ] , r . columns && ( r = r . columns ) ; var u , w , x , y = [ ] ; return o . end > m . ch && ( o . end = m . ch , o . string = o . string . slice ( 0 , m . ch - o . start ) ) , o . string . match ( /^[.`"\w@]\w*$/ ) ? ( x = o . string , u = o . start , w = o . end ) : ( u = w = m . ch , x = "" ) , "." == x . charAt ( 0 ) || x . charAt ( 0 ) == t ? u = n ( m , o , y , a ) : ( k ( y , x , q , function ( a ) { return a } ) , k ( y , x , r , function ( a ) { return a } ) , f || k ( y , x , s , function ( a , b ) { var c = b < i ; return { isKeyword : c , text : a } } ) ) , { list : y , from : v ( m . line , u ) , to : v ( m . line , w ) } } ) } ) , function ( a ) { a ( CodeMirror ) } ( function ( a ) { "use strict" ; a . defineMode ( "sql" , function ( b , c ) { function d ( a , b ) { var c = a . next ( ) ; if ( o [ c ] ) { var d = o [ c ] ( a , b ) ; if ( d !== ! 1 ) return d } if ( n . hexNumber && ( "0" == c && a . match ( /^[xX][0-9a-fA-F]+/ ) || ( "x" == c || "X" == c ) && a . match ( /^'[0-9a-fA-F]+'/ ) ) ) return "number" ; if ( n . binaryNumber && ( ( "b" == c || "B" == c ) && a . match ( /^'[01]+'/ ) || "0" == c && a . match ( /^b[01]+/ ) ) ) return "number" ; if ( c . charCodeAt ( 0 ) > 47 && c . charCodeAt ( 0 ) < 58 ) return a . match ( /^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/ ) , n . decimallessFloat && a . match ( /^\.(?!\.)/ ) , "number" ; if ( "?" == c && ( a . eatSpace ( ) || a . eol ( ) || a . eat ( ";" ) ) ) return "variable-3" ; if ( "'" == c || '"' == c && n . doubleQuote ) return b . tokenize = e ( c ) , b . tokenize ( a , b ) ; if ( ( n . nCharCast && ( "n" == c || "N" == c ) || n . charsetCast && "_" == c && a . match ( /[a-z][a-z0-9]*/i ) ) && ( "'" == a . peek ( ) || '"' == a . peek ( ) ) ) return "keyword" ; if ( /^[\(\),\;\[\]]/ . test ( c ) ) return null ; if ( n . commentSlashSlash && "/" == c && a . eat ( "/" ) ) return a . skipToEnd ( ) , "comment" ; if ( n . commentHash && "#" == c || "-" == c && a . eat ( "-" ) && ( ! n . commentSpaceRequired || a . eat ( " " ) ) ) return a . skipToEnd ( ) , "comment" ; if ( "/" == c && a . eat ( "*" ) ) return b . tokenize = f ( 1 ) , b . tokenize ( a , b ) ; if ( "." != c ) { if ( m . test ( c ) ) return a . eatWhile ( m ) , null ; if ( "{" == c && ( a . match ( /^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/ ) || a . match ( /^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/ ) ) ) return "number" ; a . eatWhile ( /^[_\w\d]/ ) ; var g = a . current ( ) . toLowerCase ( ) ; return p . hasOwnProperty ( g ) && ( a . match ( / ^
e = d [ 5 ] , f = d [ 6 ] } var l = O [ C ] ( 0 , g ) , m = O [ C ] ( 0 , h ) , n = N [ C ] ( 0 , g ) , o = N [ C ] ( 0 , h ) , p = n - l , q = o - m , r = { x : l , y : m , x2 : n , y2 : o , width : p , height : q , cx : l + p / 2 , cy : m + q / 2 } ; return b . bbox = c ( r ) , r } , Aa = function ( a ) { var d = c ( a ) ; return d . toString = b . _path2string , d } , Ba = b . _pathToRelative = function ( a ) { var c = ya ( a ) ; if ( c . rel ) return Aa ( c . rel ) ; b . is ( a , U ) && b . is ( a && a [ 0 ] , U ) || ( a = b . parsePathString ( a ) ) ; var d = [ ] , e = 0 , f = 0 , g = 0 , h = 0 , i = 0 ; "M" == a [ 0 ] [ 0 ] && ( e = a [ 0 ] [ 1 ] , f = a [ 0 ] [ 2 ] , g = e , h = f , i ++ , d . push ( [ "M" , e , f ] ) ) ; for ( var j = i , k = a . length ; j < k ; j ++ ) { var l = d [ j ] = [ ] , m = a [ j ] ; if ( m [ 0 ] != L . call ( m [ 0 ] ) ) switch ( l [ 0 ] = L . call ( m [ 0 ] ) , l [ 0 ] ) { case "a" : l [ 1 ] = m [ 1 ] , l [ 2 ] = m [ 2 ] , l [ 3 ] = m [ 3 ] , l [ 4 ] = m [ 4 ] , l [ 5 ] = m [ 5 ] , l [ 6 ] = + ( m [ 6 ] - e ) . toFixed ( 3 ) , l [ 7 ] = + ( m [ 7 ] - f ) . toFixed ( 3 ) ; break ; case "v" : l [ 1 ] = + ( m [ 1 ] - f ) . toFixed ( 3 ) ; break ; case "m" : g = m [ 1 ] , h = m [ 2 ] ; default : for ( var n = 1 , o = m . length ; n < o ; n ++ ) l [ n ] = + ( m [ n ] - ( n % 2 ? e : f ) ) . toFixed ( 3 ) } else { l = d [ j ] = [ ] , "m" == m [ 0 ] && ( g = m [ 1 ] + e , h = m [ 2 ] + f ) ; for ( var p = 0 , q = m . length ; p < q ; p ++ ) d [ j ] [ p ] = m [ p ] } var r = d [ j ] . length ; switch ( d [ j ] [ 0 ] ) { case "z" : e = g , f = h ; break ; case "h" : e += + d [ j ] [ r - 1 ] ; break ; case "v" : f += + d [ j ] [ r - 1 ] ; break ; default : e += + d [ j ] [ r - 2 ] , f += + d [ j ] [ r - 1 ] } } return d . toString = b . _path2string , c . rel = Aa ( d ) , d } , Ca = b . _pathToAbsolute = function ( a ) { var c = ya ( a ) ; if ( c . abs ) return Aa ( c . abs ) ; if ( b . is ( a , U ) && b . is ( a && a [ 0 ] , U ) || ( a = b . parsePathString ( a ) ) , ! a || ! a . length ) return [ [ "M" , 0 , 0 ] ] ; var d = [ ] , e = 0 , f = 0 , h = 0 , i = 0 , j = 0 ; "M" == a [ 0 ] [ 0 ] && ( e = + a [ 0 ] [ 1 ] , f = + a [ 0 ] [ 2 ] , h = e , i = f , j ++ , d [ 0 ] = [ "M" , e , f ] ) ; for ( var k , l , m = 3 == a . length && "M" == a [ 0 ] [ 0 ] && "R" == a [ 1 ] [ 0 ] . toUpperCase ( ) && "Z" == a [ 2 ] [ 0 ] . toUpperCase ( ) , n = j , o = a . length ; n < o ; n ++ ) { if ( d . push ( k = [ ] ) , l = a [ n ] , l [ 0 ] != aa . call ( l [ 0 ] ) ) switch ( k [ 0 ] = aa . call ( l [ 0 ] ) , k [ 0 ] ) { case "A" : k [ 1 ] = l [ 1 ] , k [ 2 ] = l [ 2 ] , k [ 3 ] = l [ 3 ] , k [ 4 ] = l [ 4 ] , k [ 5 ] = l [ 5 ] , k [ 6 ] = + ( l [ 6 ] + e ) , k [ 7 ] = + ( l [ 7 ] + f ) ; break ; case "V" : k [ 1 ] = + l [ 1 ] + f ; break ; case "H" : k [ 1 ] = + l [ 1 ] + e ; break ; case "R" : for ( var p = [ e , f ] [ D ] ( l . slice ( 1 ) ) , q = 2 , r = p . length ; q < r ; q ++ ) p [ q ] = + p [ q ] + e , p [ ++ q ] = + p [ q ] + f ; d . pop ( ) , d = d [ D ] ( g ( p , m ) ) ; break ; case "M" : h = + l [ 1 ] + e , i = + l [ 2 ] + f ; default : for ( q = 1 , r = l . length ; q < r ; q ++ ) k [ q ] = + l [ q ] + ( q % 2 ? e : f ) } else if ( "R" == l [ 0 ] ) p = [ e , f ] [ D ] ( l . slice ( 1 ) ) , d . pop ( ) , d = d [ D ] ( g ( p , m ) ) , k = [ "R" ] [ D ] ( l . slice ( - 2 ) ) ; else for ( var s = 0 , t = l . length ; s < t ; s ++ ) k [ s ] = l [ s ] ; switch ( k [ 0 ] ) { case "Z" : e = h , f = i ; break ; case "H" : e = k [ 1 ] ; break ; case "V" : f = k [ 1 ] ; break ; case "M" : h = k [ k . length - 2 ] , i = k [ k . length - 1 ] ; default : e = k [ k . length - 2 ] , f = k [ k . length - 1 ] } } return d . toString = b . _path2string , c . abs = Aa ( d ) , d } , Da = function ( a , b , c , d ) { return [ a , b , c , d , c , d ] } , Ea = function ( a , b , c , d , e , f ) { var g = 1 / 3 , h = 2 / 3 ; return [ g * a + h * c , g * b + h * d , g * e + h * c , g * f + h * d , e , f ] } , Fa = function ( a , b , c , d , f , g , h , i , j , k ) { var l , m = 120 * R / 180 , n = R / 180 * ( + f || 0 ) , o = [ ] , p = e ( function ( a , b , c ) { var d = a * M . cos ( c ) - b * M . sin ( c ) , e = a * M . sin ( c ) + b * M . cos ( c ) ; return { x : d , y : e } } ) ; if ( k ) y = k [ 0 ] , z = k [ 1 ] , w = k [ 2 ] , x = k [ 3 ] ; else { l = p ( a , b , - n ) , a = l . x , b = l . y , l = p ( i , j , - n ) , i = l . x , j = l . y ; var q = ( M . cos ( R / 180 * f ) , M . sin ( R / 180 * f ) , ( a - i ) / 2 ) , r = ( b - j ) / 2 , s = q * q / ( c * c ) + r * r / ( d * d ) ; s > 1 && ( s = M . sqrt ( s ) , c = s * c , d = s * d ) ; var t = c * c , u = d * d , v = ( g == h ? - 1 : 1 ) * M . sqrt ( P ( ( t * u - t * r * r - u * q * q ) / ( t * r * r + u * q * q ) ) ) , w = v * c * r / d + ( a + i ) / 2 , x = v * - d * q / c + ( b + j ) / 2 , y = M . asin ( ( ( b - x ) / d ) . toFixed ( 9 ) ) , z = M . asin ( ( ( j - x ) / d ) . toFixed ( 9 ) ) ; y = a < w ? R - y : y , z = i < w ? R - z : z , y < 0 && ( y = 2 * R + y ) , z < 0 && ( z = 2 * R + z ) , h && y > z && ( y -= 2 * R ) , ! h && z > y && ( z -= 2 * R ) } var A = z - y ; if ( P ( A ) > m ) { var B = z , C = i , E = j ; z = y + m * ( h && z > y ? 1 : - 1 ) , i = w + c * M . cos ( z ) , j = x + d * M . sin ( z ) , o = Fa ( i , j , c , d , f , 0 , h , C , E , [ z , B , w , x ] ) } A = z - y ; var F = M . cos ( y ) , G = M . sin ( y ) , H = M . cos ( z ) , J = M . sin ( z ) , K = M . tan ( A / 4 ) , L = 4 / 3 * c * K , N = 4 / 3 * d * K , O = [ a , b ] , Q = [ a + L * G , b - N * F ] , S = [ i + L * J , j - N * H ] , T = [ i , j ] ; if ( Q [ 0 ] = 2 * O [ 0 ] - Q [ 0 ] , Q [ 1 ] = 2 * O [ 1 ] - Q [ 1 ] , k ) return [ Q , S , T ] [ D ] ( o ) ; o = [ Q , S , T ] [ D ] ( o ) . join ( ) [ I ] ( "," ) ; for ( var U = [ ] , V = 0 , W = o . length ; V < W ; V ++ ) U [ V ] = V % 2 ? p ( o [ V - 1 ] , o [ V ] , n ) . y : p ( o [ V ] , o [ V + 1 ] , n ) . x ; return U } , 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
return b ( a ) } ) : b ( "object" == typeof exports ? require ( "raphael.core" ) : a . Raphael ) } ( this , function ( a ) { if ( ! a || a . svg ) { var b = "hasOwnProperty" , c = String , d = parseFloat , e = parseInt , f = Math , g = f . max , h = f . abs , i = f . pow , j = /[, ]+/ , k = a . eve , l = "" , m = " " , n = "http://www.w3.org/1999/xlink" , o = { block : "M5,0 0,2.5 5,5z" , classic : "M5,0 0,2.5 5,5 3.5,3 3.5,2z" , diamond : "M2.5,0 5,2.5 2.5,5 0,2.5z" , open : "M6,1 1,3.5 6,6" , oval : "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" } , p = { } ; a . toString = function ( ) { return "Your browser supports SVG.\nYou are running Raphaël " + this . version } ; var q = function ( d , e ) { if ( e ) { "string" == typeof d && ( d = q ( d ) ) ; for ( var f in e ) e [ b ] ( f ) && ( "xlink:" == f . substring ( 0 , 6 ) ? d . setAttributeNS ( n , f . substring ( 6 ) , c ( e [ f ] ) ) : d . setAttribute ( f , c ( e [ f ] ) ) ) } else d = a . _g . doc . createElementNS ( "http://www.w3.org/2000/svg" , d ) , d . style && ( d . style . webkitTapHighlightColor = "rgba(0,0,0,0)" ) ; return d } , r = function ( b , e ) { var j = "linear" , k = b . id + e , m = . 5 , n = . 5 , o = b . node , p = b . paper , r = o . style , s = a . _g . doc . getElementById ( k ) ; if ( ! s ) { if ( e = c ( e ) . replace ( a . _radial _gradient , function ( a , b , c ) { if ( j = "radial" , b && c ) { m = d ( b ) , n = d ( c ) ; var e = 2 * ( n > . 5 ) - 1 ; i ( m - . 5 , 2 ) + i ( n - . 5 , 2 ) > . 25 && ( n = f . sqrt ( . 25 - i ( m - . 5 , 2 ) ) * e + . 5 ) && . 5 != n && ( n = n . toFixed ( 5 ) - 1e-5 * e ) } return l } ) , e = e . split ( /\s*\-\s*/ ) , "linear" == j ) { var t = e . shift ( ) ; if ( t = - d ( t ) , isNaN ( t ) ) return null ; var u = [ 0 , 0 , f . cos ( a . rad ( t ) ) , f . sin ( a . rad ( t ) ) ] , v = 1 / ( g ( h ( u [ 2 ] ) , h ( u [ 3 ] ) ) || 1 ) ; u [ 2 ] *= v , u [ 3 ] *= v , u [ 2 ] < 0 && ( u [ 0 ] = - u [ 2 ] , u [ 2 ] = 0 ) , u [ 3 ] < 0 && ( u [ 1 ] = - u [ 3 ] , u [ 3 ] = 0 ) } var w = a . _parseDots ( e ) ; if ( ! w ) return null ; if ( k = k . replace ( /[\(\)\s,\xb0#]/g , "_" ) , b . gradient && k != b . gradient . id && ( p . defs . removeChild ( b . gradient ) , delete b . gradient ) , ! b . gradient ) { s = q ( j + "Gradient" , { id : k } ) , b . gradient = s , q ( s , "radial" == j ? { fx : m , fy : n } : { x1 : u [ 0 ] , y1 : u [ 1 ] , x2 : u [ 2 ] , y2 : u [ 3 ] , gradientTransform : b . matrix . invert ( ) } ) , p . defs . appendChild ( s ) ; for ( var x = 0 , y = w . length ; x < y ; x ++ ) s . appendChild ( q ( "stop" , { offset : w [ x ] . offset ? w [ x ] . offset : x ? "100%" : "0%" , "stop-color" : w [ x ] . color || "#fff" , "stop-opacity" : isFinite ( w [ x ] . opacity ) ? w [ x ] . opacity : 1 } ) ) } } return q ( o , { fill : "url('" + document . location . origin + document . location . pathname + "#" + k + "')" , opacity : 1 , "fill-opacity" : 1 } ) , r . fill = l , r . opacity = 1 , r . fillOpacity = 1 , 1 } , s = function ( a ) { var b = a . getBBox ( 1 ) ; q ( a . pattern , { patternTransform : a . matrix . invert ( ) + " translate(" + b . x + "," + b . y + ")" } ) } , t = function ( d , e , f ) { if ( "path" == d . type ) { for ( var g , h , i , j , k , m = c ( e ) . toLowerCase ( ) . split ( "-" ) , n = d . paper , r = f ? "end" : "start" , s = d . node , t = d . attrs , u = t [ "stroke-width" ] , v = m . length , w = "classic" , x = 3 , y = 3 , z = 5 ; v -- ; ) switch ( m [ v ] ) { case "block" : case "classic" : case "oval" : case "diamond" : case "open" : case "none" : w = m [ v ] ; break ; case "wide" : y = 5 ; break ; case "narrow" : y = 2 ; break ; case "long" : x = 5 ; break ; case "short" : x = 2 } if ( "open" == w ? ( x += 2 , y += 2 , z += 2 , i = 1 , j = f ? 4 : 1 , k = { fill : "none" , stroke : t . stroke } ) : ( j = i = x / 2 , k = { fill : t . stroke , stroke : "none" } ) , d . _ . arrows ? f ? ( d . _ . arrows . endPath && p [ d . _ . arrows . endPath ] -- , d . _ . arrows . endMarker && p [ d . _ . arrows . endMarker ] -- ) : ( d . _ . arrows . startPath && p [ d . _ . arrows . startPath ] -- , d . _ . arrows . startMarker && p [ d . _ . arrows . startMarker ] -- ) : d . _ . arrows = { } , "none" != w ) { var A = "raphael-marker-" + w , B = "raphael-marker-" + r + w + x + y + "-obj" + d . id ; a . _g . doc . getElementById ( A ) ? p [ A ] ++ : ( n . defs . appendChild ( q ( q ( "path" ) , { "stroke-linecap" : "round" , d : o [ w ] , id : A } ) ) , p [ A ] = 1 ) ; var C , D = a . _g . doc . getElementById ( B ) ; D ? ( p [ B ] ++ , C = D . getElementsByTagName ( "use" ) [ 0 ] ) : ( D = q ( q ( "marker" ) , { id : B , markerHeight : y , markerWidth : x , orient : "auto" , refX : j , refY : y / 2 } ) , C = q ( q ( "use" ) , { "xlink:href" : "#" + A , transform : ( f ? "rotate(180 " + x / 2 + " " + y / 2 + ") " : l ) + "scale(" + x / z + "," + y / z + ")" , "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 + " Ty
var h = a . _rectPath ( c , d , e , f , g ) , i = b . path ( h ) , j = i . attrs ; return i . X = j . x = c , i . Y = j . y = d , i . W = j . width = e , i . H = j . height = f , j . r = g , j . path = h , i . type = "rect" , i } , a . _engine . ellipse = function ( a , b , c , d , e ) { var f = a . path ( ) ; f . attrs ; return f . X = b - d , f . Y = c - e , f . W = 2 * d , f . H = 2 * e , f . type = "ellipse" , B ( f , { cx : b , cy : c , rx : d , ry : e } ) , f } , a . _engine . circle = function ( a , b , c , d ) { var e = a . path ( ) ; e . attrs ; return e . X = b - d , e . Y = c - d , e . W = e . H = 2 * d , e . type = "circle" , B ( e , { cx : b , cy : c , r : d } ) , e } , a . _engine . image = function ( b , c , d , e , f , g ) { var h = a . _rectPath ( d , e , f , g ) , i = b . path ( h ) . attr ( { stroke : "none" } ) , k = i . attrs , l = i . node , m = l . getElementsByTagName ( j ) [ 0 ] ; return k . src = c , i . X = k . x = d , i . Y = k . y = e , i . W = k . width = f , i . H = k . height = g , k . path = h , i . type = "image" , m . parentNode == l && l . removeChild ( m ) , m . rotate = ! 0 , m . src = c , m . type = "tile" , i . _ . fillpos = [ d , e ] , i . _ . fillsize = [ f , g ] , l . appendChild ( m ) , z ( i , 1 , 1 , 0 , 0 , 0 ) , i } , a . _engine . text = function ( b , d , e , g ) { var h = F ( "shape" ) , i = F ( "path" ) , j = F ( "textpath" ) ; d = d || 0 , e = e || 0 , g = g || "" , i . v = a . format ( "m{0},{1}l{2},{1}" , f ( d * u ) , f ( e * u ) , f ( d * u ) + 1 ) , i . textpathok = ! 0 , j . string = c ( g ) , j . on = ! 0 , h . style . cssText = t , h . coordsize = u + n + u , h . coordorigin = "0 0" ; var k = new D ( h , b ) , l = { fill : "#000" , stroke : "none" , font : a . _availableAttrs . font , text : g } ; k . shape = h , k . path = i , k . textpath = j , k . type = "text" , k . attrs . text = c ( g ) , k . attrs . x = d , k . attrs . y = e , k . attrs . w = 1 , k . attrs . h = 1 , B ( k , l ) , h . appendChild ( j ) , h . appendChild ( i ) , b . canvas . appendChild ( h ) ; var m = F ( "skew" ) ; return m . on = ! 0 , h . appendChild ( m ) , k . skew = m , k . transform ( o ) , k } , a . _engine . setSize = function ( b , c ) { var d = this . canvas . style ; return this . width = b , this . height = c , b == + b && ( b += "px" ) , c == + c && ( c += "px" ) , d . width = b , d . height = c , d . clip = "rect(0 " + b + " " + c + " 0)" , this . _viewBox && a . _engine . setViewBox . apply ( this , this . _viewBox ) , this } , a . _engine . setViewBox = function ( b , c , d , e , f ) { a . eve ( "raphael.setViewBox" , this , this . _viewBox , [ b , c , d , e , f ] ) ; var g , h , i = this . getSize ( ) , j = i . width , k = i . height ; return f && ( g = k / e , h = j / d , d * g < j && ( b -= ( j - d * g ) / 2 / g ) , e * h < k && ( c -= ( k - e * h ) / 2 / h ) ) , this . _viewBox = [ b , c , d , e , ! ! f ] , this . _viewBoxShift = { dx : - b , dy : - c , scale : i } , this . forEach ( function ( a ) { a . transform ( "..." ) } ) , this } ; var F ; a . _engine . initWin = function ( a ) { var b = a . document ; b . styleSheets . length < 31 ? b . createStyleSheet ( ) . addRule ( ".rvml" , "behavior:url(#default#VML)" ) : b . styleSheets [ 0 ] . addRule ( ".rvml" , "behavior:url(#default#VML)" ) ; try { ! b . namespaces . rvml && b . namespaces . add ( "rvml" , "urn:schemas-microsoft-com:vml" ) , F = function ( a ) { return b . createElement ( "<rvml:" + a + ' class="rvml">' ) } } catch ( c ) { F = function ( a ) { return b . createElement ( "<" + a + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">' ) } } } , a . _engine . initWin ( a . _g . win ) , a . _engine . create = function ( ) { var b = a . _getContainer . apply ( 0 , arguments ) , c = b . container , d = b . height , e = b . width , f = b . x , g = b . y ; if ( ! c ) throw new Error ( "VML container not found." ) ; var h = new a . _Paper , i = h . canvas = a . _g . doc . createElement ( "div" ) , j = i . style ; return f = f || 0 , g = g || 0 , e = e || 512 , d = d || 342 , h . width = e , h . height = d , e == + e && ( e += "px" ) , d == + d && ( d += "px" ) , h . coordsize = 1e3 * u + n + 1e3 * u , h . coordorigin = "0 0" , h . span = a . _g . doc . createElement ( "span" ) , h . span . style . cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;" , i . appendChild ( h . span ) , j . cssText = a . format ( "top:0;left:0;display:inline-block;position:absolute;clip:rect(0 {0} {1} 0);" , e , d ) , 1 == c ? ( a . _g . doc . body . appendChild ( i ) , j . left = f + "px" , j . top = g + "px" , j . position = "absolute" ) : c . firstChild ? c . insertBefore ( i , c . firstChild ) : c . appendChild ( i ) , h . renderfix = function ( ) { } , h } , a . prototype . clear = function ( ) { a . eve ( "raphael.clear" , this ) , this . canvas . innerHTML = o , 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 expo
return BI . each ( a . header , function ( a , e ) { c [ a ] = [ ] , d [ a ] = [ ] , BI . each ( e , function ( e , f ) { var g = { type : "bi.grid_table_cell" , cell : f } ; e < b ? c [ a ] . push ( g ) : d [ a ] . push ( g ) } ) } ) , [ c , d ] } , _getItems : function ( ) { var a = ( this . options , this . _getFreezeColLength ( ) ) , b = [ ] , c = [ ] ; return BI . each ( this . _getActualItems ( ) , function ( d , e ) { b [ d ] = [ ] , c [ d ] = [ ] , BI . each ( e , function ( e , f ) { var g = { type : "bi.grid_table_cell" , cell : f } ; e < a ? b [ d ] . push ( g ) : c [ d ] . push ( g ) } ) } ) , [ b , c ] } , _populateTable : function ( ) { var a = this . options , b = this . getRegionSize ( ) , c = 0 , d = 0 , e = 0 , f = [ ] , g = this . _getFreezeColLength ( ) ; BI . each ( a . columnSize , function ( b , g ) { a . isNeedFreeze === ! 0 && a . freezeCols . contains ( b ) ? c += g : d += g , e += g , 0 === b ? f [ b ] = g : f [ b ] = f [ b - 1 ] + g } ) ; var h = b , i = this . _getFreezeHeaderHeight ( ) , j = this . _width - b , k = this . _getFreezeHeaderHeight ( ) , l = b , m = this . _height - i , n = this . _width - b , o = this . _height - k , p = h + this . _scrollBarSize , q = i + this . _scrollBarSize , r = j + this . _scrollBarSize , s = k + this . _scrollBarSize , t = l + this . _scrollBarSize , u = m + this . _scrollBarSize , v = n + this . _scrollBarSize , w = o + this . _scrollBarSize , x = function ( a ) { a . element . css ( { overflow : "scroll" , overflowX : "scroll" , overflowY : "scroll" } ) } ; this . topLeft . setWidth ( h ) , this . topLeft . setHeight ( i ) , this . topRight . setWidth ( j ) , this . topRight . setHeight ( k ) , this . bottomLeft . setWidth ( l ) , this . bottomLeft . setHeight ( m ) , this . bottomRight . setWidth ( n ) , this . bottomRight . setHeight ( o ) , this . topLeftGrid . setWidth ( p ) , this . topLeftGrid . setHeight ( q ) , this . topRightGrid . setWidth ( r ) , this . topRightGrid . setHeight ( s ) , this . bottomLeftGrid . setWidth ( t ) , this . bottomLeftGrid . setHeight ( u ) , this . bottomRightGrid . setWidth ( v ) , this . bottomRightGrid . setHeight ( w ) , x ( this . topLeftGrid ) , x ( this . topRightGrid ) , x ( this . bottomLeftGrid ) , x ( this . bottomRightGrid ) , this . topLeftGrid . setEstimatedColumnSize ( g > 0 ? c / g : 0 ) , this . topLeftGrid . setEstimatedRowSize ( a . headerRowSize ) , this . topRightGrid . setEstimatedColumnSize ( a . columnSize . length - g > 0 ? d / ( a . columnSize . length - g ) : 0 ) , this . topRightGrid . setEstimatedRowSize ( a . headerRowSize ) , this . bottomLeftGrid . setEstimatedColumnSize ( g > 0 ? c / g : 0 ) , this . bottomLeftGrid . setEstimatedRowSize ( a . rowSize ) , this . bottomRightGrid . setEstimatedColumnSize ( a . columnSize . length - g > 0 ? d / ( a . columnSize . length - g ) : 0 ) , this . bottomRightGrid . setEstimatedRowSize ( a . rowSize ) , this . topLeftGrid . setColumnCount ( g ) , this . topRightGrid . setColumnCount ( a . columnSize . length - g ) , this . bottomLeftGrid . setColumnCount ( g ) , this . bottomRightGrid . setColumnCount ( a . columnSize . length - g ) ; var y = this . contextLayout . attr ( "items" ) ; y [ 1 ] . left = b , y [ 2 ] . top = this . _getFreezeHeaderHeight ( ) , y [ 3 ] . left = b , y [ 3 ] . top = this . _getFreezeHeaderHeight ( ) , this . contextLayout . attr ( "items" , y ) , this . contextLayout . resize ( ) , this . topLeftGrid . _populate ( this . header [ 0 ] ) , this . topRightGrid . _populate ( this . header [ 1 ] ) , this . bottomLeftGrid . _populate ( this . items [ 0 ] ) , this . bottomRightGrid . _populate ( this . items [ 1 ] ) } , _populate : function ( ) { this . _width <= 0 || this . _height <= 0 || ( this . _populateTable ( ) , this . _populateScrollbar ( ) ) } , getRegionSize : function ( ) { var a = this . options , b = a . regionColumnSize [ 0 ] || 0 ; return a . isNeedFreeze === ! 1 || 0 === a . freezeCols . length ? 0 : ( b || BI . each ( a . freezeCols , function ( c , d ) { b += a . columnSize [ d ] } ) , b ) } , setVerticalScroll : function ( a ) { this . bottomLeftGrid . setScrollTop ( a ) , this . bottomRightGrid . setScrollTop ( a ) } , setLeftHorizontalScroll : function ( a ) { this . topLeftGrid . setScrollLeft ( a ) , this . bottomLeftGrid . setScrollLeft ( a ) } , setRightHorizontalScroll : function ( a ) { this . topRightGrid . setScrollLeft ( a ) , this . bottomRightGrid . setScrollLeft ( a ) } , getVerticalScroll : function ( ) { 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 t
c . freezeCols . contains ( a ) ? ( l += e , b [ d ? "columnRight" : "columnLeft" ] . push ( e ) ) : ( m += e , b [ d ? "columnLeft" : "columnRight" ] . push ( e ) ) } ) , l = this . _calculateWidth ( l ) , m = this . _calculateWidth ( m ) , BI . isNumeric ( l ) && ( l = BI . parseFloat ( l ) + c . freezeCols . length ) , BI . isNumeric ( m ) && ( m = BI . parseFloat ( m ) + c . columnSize . length - c . freezeCols . length ) , this . topLeftContainer . element . width ( d ? m : l ) , this . bottomLeftContainer . element . width ( d ? m : l ) , this . topRightContainer . element . width ( d ? l : m ) , this . bottomRightContainer . element . width ( d ? l : m ) , this . scrollTopLeft . element [ 0 ] . scrollLeft = this . scrollBottomLeft . element [ 0 ] . scrollLeft , this . scrollTopRight . element [ 0 ] . scrollLeft = this . scrollBottomRight . element [ 0 ] . scrollLeft } else { BI . each ( this . colgroupTds , function ( a , d ) { var e = 0 | d . attr ( "width" ) ; if ( "" !== c . columnSize [ a ] && e !== c . columnSize [ a ] ) { var f = b . _calculateWidth ( c . columnSize [ a ] ) ; d . attr ( "width" , f ) . css ( "width" , f ) , BI . each ( b . bodyTds , function ( d , e ) { if ( e [ a ] ) if ( e [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( c . columnSize , function ( b , c ) { e [ a ] . _ _mergeCols . contains ( b ) && ( g += c ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += e [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( g ) ? a == BI . size ( e ) - 1 ? e [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . attr ( "width" , f ) . css ( "width" , f ) : e [ a ] . attr ( "width" , "" ) . css ( "width" , "" ) } else a == BI . size ( e ) - 1 ? e [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . attr ( "width" , f ) . css ( "width" , f ) } ) , BI . each ( b . headerTds , function ( d , e ) { if ( e [ a ] ) if ( e [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( c . columnSize , function ( b , c ) { e [ a ] . _ _mergeCols . contains ( b ) && ( g += c ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += e [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( g ) ? a == BI . size ( e ) - 1 ? e [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . attr ( "width" , f ) . css ( "width" , f ) : e [ a ] . attr ( "width" , "" ) . css ( "width" , "" ) } else a == BI . size ( e ) - 1 ? e [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . attr ( "width" , f ) . css ( "width" , f ) } ) , BI . each ( b . footerTds , function ( d , e ) { if ( e [ a ] ) if ( e [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( c . columnSize , function ( b , c ) { e [ a ] . _ _mergeCols . contains ( b ) && ( g += c ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += e [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( g ) ? a == BI . size ( e ) - 1 ? e [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . attr ( "width" , f ) . css ( "width" , f ) : e [ a ] . attr ( "width" , "" ) . css ( "width" , "" ) } else a == BI . size ( e ) - 1 ? e [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . attr ( "width" , f ) . css ( "width" , f ) } ) , BI . each ( b . bodyItems , function ( d , e ) { if ( e [ a ] ) if ( b . bodyTds [ d ] [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( c . columnSize , function ( c , e ) { b . bodyTds [ d ] [ a ] . _ _mergeCols . contains ( c ) && ( g += e ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += b . bodyTds [ 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" , "" ) } ) , BI . each ( b . headerItems , function ( d , e ) { if ( e [ a ] ) if ( b . headerTds [ d ] [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( c . columnSize , function ( c , e ) { b . headerTds [ d ] [ a ] . _ _mergeCols . contains ( c ) && ( g += e ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += b . headerTds [ 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" , "" ) } ) , 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 . le
if ( ! b ) return null ; var c = caches [ a . treeId ] . nodes [ data . getNodeCacheId ( b ) ] ; return c ? c : null } , getNodeName : function ( a , b ) { var c = a . data . key . name ; return "" + b [ c ] } , getNodeTitle : function ( a , b ) { var c = "" === a . data . key . title ? a . data . key . name : a . data . key . title ; return "" + b [ c ] } , getNodes : function ( a ) { return data . getRoot ( a ) [ a . data . key . children ] } , getNodesByParam : function ( a , b , c , d ) { if ( ! b || ! c ) return [ ] ; for ( var e = a . data . key . children , f = [ ] , g = 0 , h = b . length ; g < h ; g ++ ) b [ g ] [ c ] == d && f . push ( b [ g ] ) , f = f . concat ( data . getNodesByParam ( a , b [ g ] [ e ] , c , d ) ) ; return f } , getNodesByParamFuzzy : function ( a , b , c , d ) { if ( ! b || ! c ) return [ ] ; var e = a . data . key . children , f = [ ] ; d = d . toLowerCase ( ) ; for ( var g = 0 , h = b . length ; g < h ; g ++ ) "string" == typeof b [ g ] [ c ] && b [ g ] [ c ] . toLowerCase ( ) . indexOf ( d ) > - 1 && f . push ( b [ g ] ) , f = f . concat ( data . getNodesByParamFuzzy ( a , b [ g ] [ e ] , c , d ) ) ; return f } , getNodesByFilter : function ( a , b , c , d , e ) { if ( ! b ) return d ? null : [ ] ; for ( var f = a . data . key . children , g = d ? null : [ ] , h = 0 , i = b . length ; h < i ; h ++ ) { if ( tools . apply ( c , [ b [ h ] , e ] , ! 1 ) ) { if ( d ) return b [ h ] ; g . push ( b [ h ] ) } var j = data . getNodesByFilter ( a , b [ h ] [ f ] , c , d , e ) ; if ( d && j ) return j ; g = d ? j : g . concat ( j ) } return g } , getPreNode : function ( a , b ) { if ( ! b ) return null ; for ( var c = a . data . key . children , d = b . parentTId ? b . getParentNode ( ) : data . getRoot ( a ) , e = 0 , f = d [ c ] . length ; e < f ; e ++ ) if ( d [ c ] [ e ] === b ) return 0 == e ? null : d [ c ] [ e - 1 ] ; return null } , getRoot : function ( a ) { return a ? roots [ a . treeId ] : null } , getRoots : function ( ) { return roots } , getSetting : function ( a ) { return settings [ a ] } , getSettings : function ( ) { return settings } , getZTreeTools : function ( a ) { var b = this . getRoot ( this . getSetting ( a ) ) ; return b ? b . treeTools : null } , initCache : function ( a ) { for ( var b = 0 , c = _init . caches . length ; b < c ; b ++ ) _init . caches [ b ] . apply ( this , arguments ) } , initNode : function ( a , b , c , d , e , f ) { for ( var g = 0 , h = _init . nodes . length ; g < h ; g ++ ) _init . nodes [ g ] . apply ( this , arguments ) } , initRoot : function ( a ) { for ( var b = 0 , c = _init . roots . length ; b < c ; b ++ ) _init . roots [ b ] . apply ( this , arguments ) } , isSelectedNode : function ( a , b ) { for ( var c = data . getRoot ( a ) , d = 0 , e = c . curSelectedList . length ; d < e ; d ++ ) if ( b === c . curSelectedList [ d ] ) return ! 0 ; return ! 1 } , removeNodeCache : function ( a , b ) { var c = a . data . key . children ; if ( b [ c ] ) for ( var d = 0 , e = b [ c ] . length ; d < e ; d ++ ) arguments . callee ( a , b [ c ] [ d ] ) ; data . getCache ( a ) . nodes [ data . getNodeCacheId ( b . tId ) ] = null } , removeSelectedNode : function ( a , b ) { for ( var c = data . getRoot ( a ) , d = 0 , e = c . curSelectedList . length ; d < e ; d ++ ) b !== c . curSelectedList [ d ] && data . getNodeCache ( a , c . curSelectedList [ d ] . tId ) || ( c . curSelectedList . splice ( d , 1 ) , d -- , e -- ) } , setCache : function ( a , b ) { caches [ a . treeId ] = b } , setRoot : function ( a , b ) { roots [ a . treeId ] = b } , setZTreeTools : function ( a , b ) { for ( var c = 0 , d = _init . zTreeTools . length ; c < d ; c ++ ) _init . zTreeTools [ c ] . apply ( this , arguments ) } , transformToArrayFormat : function ( a , b ) { if ( ! b ) return [ ] ; var c = a . data . key . children , d = [ ] ; if ( tools . isArray ( b ) ) for ( var e = 0 , f = b . length ; e < f ; e ++ ) d . push ( b [ e ] ) , b [ e ] [ c ] && ( d = d . concat ( data . transformToArrayFormat ( a , b [ e ] [ c ] ) ) ) ; else d . push ( b ) , b [ c ] && ( d = d . concat ( data . transformToArrayFormat ( a , b [ c ] ) ) ) ; return d } , transformTozTreeFormat : function ( a , b ) { var c , d , e = a . data . simpleData . idKey , f = a . data . simpleData . pIdKey , g = a . data . key . children ; if ( ! e || "" == e || ! b ) return [ ] ; if ( tools . isArray ( b ) ) { var h = [ ] , i = [ ] ; for ( c = 0 , d = b . length ; c < d ; c ++ ) i [ b [ c ] [ e ] ] = b [ c ] ; for ( c = 0 , d = b . length ; c < d ; c ++ ) i [ b [ c ] [ f ] ] && b [ c ] [ e ] != b [ c ] [ f ] ? ( i [ b [ c ] [ f ] ] [ g ] || ( i [ b [ c ] [ f ] ] [ g ] = [ ] ) , i [ b [ c ] [ f ] ] [ g ] . push ( b [ c ] ) ) : h . push ( b [ c ] ) ; 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 . prox
} else { var j = b . parentTId ? b . getParentNode ( ) : v . getRoot ( a ) ; for ( d = 0 , e = j [ f ] . length ; d < e ; d ++ ) c = j [ f ] [ d ] , c [ g ] && c != b && ( c [ g ] = ! 1 , u . setChkClass ( a , w ( c , t . id . CHECK , a ) , c ) ) } else if ( a . check . radioType == h . TYPE _ALL ) for ( d = 0 , e = i . length ; d < e ; d ++ ) if ( b == i [ d ] ) { i . splice ( d , 1 ) ; break } } else b [ g ] && ( ! b [ f ] || 0 == b [ f ] . length || a . check . chkboxType . Y . indexOf ( "s" ) > - 1 ) && u . setSonNodeCheckBox ( a , b , ! 0 ) , b [ g ] || b [ f ] && 0 != b [ f ] . length && ! ( a . check . chkboxType . N . indexOf ( "s" ) > - 1 ) || u . setSonNodeCheckBox ( a , b , ! 1 ) , b [ g ] && a . check . chkboxType . Y . indexOf ( "p" ) > - 1 && u . setParentNodeCheckBox ( a , b , ! 0 ) , ! b [ g ] && a . check . chkboxType . N . indexOf ( "p" ) > - 1 && u . setParentNodeCheckBox ( a , b , ! 1 ) } , makeChkClass : function ( a , b ) { var c = a . data . key . checked , d = t . checkbox , e = t . radio , f = "" ; f = b . chkDisabled === ! 0 ? d . DISABLED : b . halfCheck ? d . PART : a . check . chkStyle == e . STYLE ? b . check _Child _State < 1 ? d . FULL : d . PART : b [ c ] ? 2 === b . check _Child _State || b . check _Child _State === - 1 ? d . FULL : d . PART : b . check _Child _State < 1 ? d . FULL : d . PART ; var g = a . check . chkStyle + "_" + ( b [ c ] ? d . TRUE : d . FALSE ) + "_" + f ; return g = b . check _Focus && b . chkDisabled !== ! 0 ? g + "_" + d . FOCUS : g , t . className . BUTTON + " " + d . DEFAULT + " " + g } , repairAllChk : function ( a , b ) { if ( a . check . enable && a . check . chkStyle === t . checkbox . STYLE ) for ( var c = a . data . key . checked , d = a . data . key . children , e = v . getRoot ( a ) , f = 0 , g = e [ d ] . length ; f < g ; f ++ ) { var h = e [ d ] [ f ] ; h . nocheck !== ! 0 && h . chkDisabled !== ! 0 && ( h [ c ] = b ) , u . setSonNodeCheckBox ( a , h , b ) } } , repairChkClass : function ( a , b ) { if ( b && ( v . makeChkFlag ( a , b ) , b . nocheck !== ! 0 ) ) { var c = w ( b , t . id . CHECK , a ) ; u . setChkClass ( a , c , b ) } } , repairParentChkClass : function ( a , b ) { if ( b && b . parentTId ) { var c = b . getParentNode ( ) ; u . repairChkClass ( a , c ) , u . repairParentChkClass ( a , c ) } } , repairParentChkClassWithSelf : function ( a , b ) { if ( b ) { var c = a . data . key . children ; b [ c ] && b [ c ] . length > 0 ? u . repairParentChkClass ( a , b [ c ] [ 0 ] ) : u . repairParentChkClass ( a , b ) } } , repairSonChkDisabled : function ( a , b , c , d ) { if ( b ) { var e = a . data . key . children ; if ( b . chkDisabled != c && ( b . chkDisabled = c ) , u . repairChkClass ( a , b ) , b [ e ] && d ) for ( var f = 0 , g = b [ e ] . length ; f < g ; f ++ ) { var h = b [ e ] [ f ] ; u . repairSonChkDisabled ( a , h , c , d ) } } } , repairParentChkDisabled : function ( a , b , c , d ) { b && ( b . chkDisabled != c && d && ( b . chkDisabled = c ) , u . repairChkClass ( a , b ) , u . repairParentChkDisabled ( a , b . getParentNode ( ) , c , d ) ) } , setChkClass : function ( a , b , c ) { b && ( c . nocheck === ! 0 ? b . hide ( ) : b . show ( ) , b . attr ( "class" , u . makeChkClass ( a , c ) ) ) } , setParentNodeCheckBox : function ( a , b , c , d ) { var e = a . data . key . children , f = a . data . key . checked , g = w ( b , t . id . CHECK , a ) ; if ( d || ( d = b ) , v . makeChkFlag ( a , b ) , b . nocheck !== ! 0 && b . chkDisabled !== ! 0 && ( b [ f ] = c , u . setChkClass ( a , g , b ) , a . check . autoCheckTrigger && b != d && a . treeObj . trigger ( t . event . CHECK , [ null , a . treeId , b ] ) ) , b . parentTId ) { var h = ! 0 ; if ( ! c ) for ( var i = b . getParentNode ( ) [ e ] , j = 0 , k = i . length ; j < k ; j ++ ) if ( i [ j ] . nocheck !== ! 0 && i [ j ] . chkDisabled !== ! 0 && i [ j ] [ f ] || ( i [ j ] . nocheck === ! 0 || i [ j ] . chkDisabled === ! 0 ) && i [ j ] . check _Child _State > 0 ) { h = ! 1 ; break } h && u . setParentNodeCheckBox ( a , b . getParentNode ( ) , c , d ) } } , setSonNodeCheckBox : function ( a , b , c , d ) { if ( b ) { var e = a . data . key . children , f = a . data . key . checked , g = w ( b , t . id . CHECK , a ) ; d || ( d = b ) ; var h = ! 1 ; if ( b [ e ] ) for ( var i = 0 , j = b [ e ] . length ; i < j && b . chkDisabled !== ! 0 ; i ++ ) { var k = b [ e ] [ i ] ; u . setSonNodeCheckBox ( a , k , c , d ) , k . chkDisabled === ! 0 && ( h = ! 0 ) } b != v . getRoot ( a ) && b . chkDisabled !== ! 0 && ( h && b . nocheck !== ! 0 && v . makeChkFlag ( a , b ) , b . nocheck !== ! 0 && b . chkDisabled !== ! 0 ? ( b [ f ] = c , h || ( b . check _Child _State = b [ e ] && b [ e ] . length > 0 ? c ? 2 : 0 : - 1 ) ) : b . check _Child _State = - 1 , 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 . mak
} ) , this . item . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b !== BI . Events . CLICK && a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; var c = [ ] ; BI . count ( 0 , b . layer , function ( ) { c . push ( { type : "bi.layout" , width : 13 , height : b . height } ) } ) , c . push ( this . item ) , BI . createWidget ( { type : "bi.td" , element : this , columnSize : BI . makeArray ( b . layer , 13 ) , items : [ c ] } ) } , doRedMark : function ( ) { this . item . doRedMark . apply ( this . item , arguments ) } , unRedMark : function ( ) { this . item . unRedMark . apply ( this . item , arguments ) } , doHighLight : function ( ) { this . item . doHighLight . apply ( this . item , arguments ) } , unHighLight : function ( ) { this . item . unHighLight . apply ( this . item , arguments ) } , getId : function ( ) { return this . options . id } , getPId : function ( ) { return this . options . pId } , doClick : function ( ) { BI . MultiLayerIconTreeLeafItem . superclass . doClick . apply ( this , arguments ) , this . item . setSelected ( this . isSelected ( ) ) } , setSelected : function ( a ) { BI . MultiLayerIconTreeLeafItem . superclass . setSelected . apply ( this , arguments ) , this . item . setSelected ( a ) } , getValue : function ( ) { return this . options . value } } ) , BI . shortcut ( "bi.multilayer_icon_tree_leaf_item" , BI . MultiLayerIconTreeLeafItem ) , BI . TreeTextLeafItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . TreeTextLeafItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-tree-text-leaf-item bi-list-item-active" , id : "" , pId : "" , height : 25 , hgap : 0 , lgap : 0 , rgap : 0 } ) } , _init : function ( ) { BI . TreeTextLeafItem . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : a . height , height : a . height , hgap : a . hgap , lgap : a . lgap , rgap : a . hgap , text : a . text , value : a . value , py : a . py } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : this . text } ] } ) } , 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 ) } , getId : function ( ) { return this . options . id } , getPId : function ( ) { return this . options . pId } } ) , BI . shortcut ( "bi.tree_text_leaf_item" , BI . TreeTextLeafItem ) , BI . Calendar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . Calendar . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-calendar" , logic : { dynamic : ! 1 } , min : "1900-01-01" , max : "2099-12-31" , year : 2015 , month : 7 , day : 25 } ) } , _dateCreator : function ( a , b , c ) { var d = this . options , e = { } , f = Date . getDate ( ) , g = d . min . match ( /\d+/g ) , h = d . max . match ( /\d+/g ) ; a < ( 0 | g [ 0 ] ) && ( a = 0 | g [ 0 ] ) , a > ( 0 | h [ 0 ] ) && ( a = 0 | h [ 0 ] ) , f . setFullYear ( a , b , c ) , e . ymd = [ f . getFullYear ( ) , f . getMonth ( ) , f . getDate ( ) ] ; var i = Date . _MD . slice ( 0 ) ; i [ 1 ] = Date . isLeap ( e . ymd [ 0 ] ) ? 29 : 28 , f . setFullYear ( e . ymd [ 0 ] , e . ymd [ 1 ] , 1 ) , e . FDay = f . getDay ( ) , e . PDay = i [ 0 === b ? 11 : b - 1 ] - e . FDay + 1 , e . NDay = 1 ; var j = [ ] ; return BI . each ( BI . range ( 42 ) , function ( a ) { var b , c = { } , d = e . ymd [ 0 ] , f = e . ymd [ 1 ] + 1 ; a < e . FDay ? ( c . lastMonth = ! 0 , b = a + e . PDay , 1 === f && ( d -= 1 ) , f = 1 === f ? 12 : f - 1 ) : a >= e . FDay && a < e . FDay + i [ e . ymd [ 1 ] ] ? ( b = a - e . FDay + 1 , a - e . FDay + 1 === e . ymd [ 2 ] && ( c . currentDay = ! 0 ) ) : ( c . nextMonth = ! 0 , b = e . NDay ++ , 12 === f && ( d += 1 ) , f = 12 === f ? 1 : f + 1 ) , Date . checkVoid ( d , f , b , g , h ) [ 0 ] && ( c . disabled = ! 0 ) , c . text = b , j . push ( c ) } ) , j } , _init : function ( ) { BI . Calendar . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = BI . map ( Date . _SDN . slice ( 0 , 7 ) , function ( a , b ) { return { type : "bi.label" , height : 25 , text : b } } ) , d = BI . createWidget ( { type : "bi.button_group" , height : 25 , items : c } ) , e = this . _dateCreator ( b . year , b . month , b . day ) ; c = [ ] , c . push ( e . slice ( 0 , 7 ) ) , c . push ( e . slice ( 7 , 14 ) ) , c . push ( e . slice ( 14 , 21 ) ) , c . push ( e . slice ( 21 , 28 ) ) , c . push ( e . slice ( 28 , 35 ) ) , c . push ( e . slice ( 35 , 42 ) ) , c = BI . map ( c , function ( a , c ) { return BI . map ( c , function ( a , c ) { return BI . extend ( c , { type : "bi.text_item" , cls : "bi-list-item-active" , textAlign : "center" , whiteSpace : "normal" , once : ! 1 , forceSelected : ! 0 , height : 25 , value : b . year + "-" + b . month + "-" + c . text , disabled : c . lastMonth || c . nextMonth || c . disabled } ) } ) } ) , this . days = BI . createWidget ( { type : "bi.button_group" , items : BI . createItems ( c , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { } , b . logic , { columns : 7 , rows : 6 , columnSize : [ 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 ] , rowSize : 25 } ) ) ] } ) , this . days . on ( BI . Controller . EVENT _CHANGE , funct
width : 227 , height : 245 } ) } , _init : function ( ) { BI . CustomColorChooser . superclass . _init . apply ( this , arguments ) ; var a = this ; this . editor = BI . createWidget ( { type : "bi.color_picker_editor" } ) , this . editor . on ( BI . ColorPickerEditor . EVENT _CHANGE , function ( ) { a . setValue ( this . getValue ( ) ) } ) , this . farbtastic = BI . createWidget ( { type : "bi.farbtastic" } ) , this . farbtastic . on ( BI . Farbtastic . EVENT _CHANGE , function ( ) { a . setValue ( this . getValue ( ) ) } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { type : "bi.absolute" , items : [ { el : this . editor , left : 10 , top : 10 , right : 10 } ] , height : 30 } , { type : "bi.absolute" , items : [ { el : this . farbtastic , left : 15 , right : 15 , top : 10 } ] , height : 215 } ] } ) } , setValue : function ( a ) { this . editor . setValue ( a ) , this . farbtastic . setValue ( a ) } , getValue : function ( ) { return this . editor . getValue ( ) } } ) , BI . CustomColorChooser . EVENT _CHANGE = "CustomColorChooser.EVENT_CHANGE" , BI . shortcut ( "bi.custom_color_chooser" , BI . CustomColorChooser ) , BI . ColorChooser = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ColorChooser . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-color-chooser" , el : { } } ) } , _init : function ( ) { BI . ColorChooser . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( BI . extend ( { type : "bi.color_chooser_trigger" , width : b . width , height : b . height } , b . el ) ) , this . colorPicker = BI . createWidget ( { type : "bi.color_chooser_popup" } ) , this . combo = BI . createWidget ( { type : "bi.combo" , element : this , adjustLength : 1 , el : this . trigger , popup : { el : this . colorPicker , stopPropagation : ! 1 , minWidth : 202 } } ) ; var c = function ( ) { var b = a . colorPicker . getValue ( ) ; a . trigger . setValue ( b ) ; var c = BI . string2Array ( BI . Cache . getItem ( "colors" ) || "" ) , d = new BI . Queue ( 8 ) ; d . fromArray ( c ) , d . remove ( b ) , d . unshift ( b ) , BI . Cache . setItem ( "colors" , BI . array2String ( d . toArray ( ) ) ) } ; this . colorPicker . on ( BI . ColorChooserPopup . EVENT _VALUE _CHANGE , function ( ) { c ( ) } ) , this . colorPicker . on ( BI . ColorChooserPopup . EVENT _CHANGE , function ( ) { c ( ) , a . combo . hideView ( ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . colorPicker . setStoreColors ( BI . string2Array ( BI . Cache . getItem ( "colors" ) || "" ) ) } ) , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { a . fireEvent ( BI . ColorChooser . EVENT _CHANGE , arguments ) } ) } , isViewVisible : function ( ) { return this . combo . isViewVisible ( ) } , hideView : function ( ) { this . combo . hideView ( ) } , showView : function ( ) { this . combo . showView ( ) } , setValue : function ( a ) { this . combo . setValue ( a ) } , getValue : function ( ) { return this . colorPicker . getValue ( ) } } ) , BI . ColorChooser . EVENT _CHANGE = "ColorChooser.EVENT_CHANGE" , BI . shortcut ( "bi.color_chooser" , BI . ColorChooser ) , BI . ColorChooserPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ColorChooserPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-color-chooser-popup" , width : 200 , height : 145 } ) } , _init : function ( ) { BI . ColorChooserPopup . superclass . _init . apply ( this , arguments ) ; var a = this ; this . options ; this . colorEditor = BI . createWidget ( { type : "bi.color_picker_editor" } ) , this . colorEditor . on ( BI . ColorPickerEditor . EVENT _CHANGE , function ( ) { a . setValue ( this . getValue ( ) ) , a . fireEvent ( BI . ColorChooserPopup . EVENT _VALUE _CHANGE , arguments ) } ) , this . storeColors = BI . createWidget ( { type : "bi.color_picker" , items : [ [ { value : "" , disabled : ! 0 } , { value : "" , disabled : ! 0 } , { value : "" , disabled : ! 0 } , { value : "" , disabled : ! 0 } , { value : "" , disabled : ! 0 } , { value : "" , disabled : ! 0 } , { value : "" , disabled : ! 0 } , { value : "" , disabled : ! 0 } ] ] , width : 190 , height : 25 } ) , this . storeColors . on ( BI . ColorPicker . EVENT _CHANGE , function ( ) { a . setValue ( this . getValue ( ) [ 0 ] ) , a . fireEvent ( BI . ColorChooserPopup . EVENT _CHANGE , arguments ) } ) , this . colorPicker = BI . createWidget ( { type : "bi.color_picker" , width : 190 , height : 50 } ) , this . colorPicker . on ( BI . ColorPicker . EVENT _CHANGE , function ( ) { a . setValue ( this . getValue ( ) [ 0 ] ) , a . fireEvent ( BI . ColorChooserPopup . EVENT _CHANGE , arguments ) } ) , this . customColorChooser = BI . createWidget ( { type : "bi.custom_color_chooser" } ) ; var b = BI . createWidget ( { type : "bi.popup_panel" , buttons : [ BI . i18nText ( "BI-Basic_Cancel" ) , BI . i18nText ( "BI-Basic_Save" ) ] , title : BI . i18nText ( "BI-Custom_Color" ) , el : this . customColorChooser , stopPropagation : ! 1 , bgap : - 1 , rgap : 1 , lgap : 1 , minWidth : 227 } ) ; this . more = BI . createWidget ( { type : "bi.combo" , direction : "right,top" , isNeedAdjustHeight : ! 1 , el : { type : " bi
baseCls : "bi-icon-text-icon-popup" } ) } , _init : function ( ) { BI . IconTextValueComboPopup . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this ; this . popup = BI . createWidget ( { type : "bi.button_group" , items : BI . createItems ( a . items , { type : "bi.single_select_icon_text_item" , height : 30 } ) , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , layouts : [ { type : "bi.vertical" } ] } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( a , c , d ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . IconTextValueComboPopup . EVENT _CHANGE , c , d ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . popup ] } ) } , populate : function ( a ) { BI . IconTextValueComboPopup . superclass . populate . apply ( this , arguments ) , a = BI . createItems ( a , { type : "bi.single_select_icon_text_item" , height : 30 } ) , this . popup . populate ( a ) } , getValue : function ( ) { return this . popup . getValue ( ) } , setValue : function ( a ) { this . popup . setValue ( a ) } } ) , BI . IconTextValueComboPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_value_combo_popup" , BI . IconTextValueComboPopup ) , 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 ( b . el , { type : "bi.text_icon_item" , cls : "bi-select-text-trigger bi-border pull-down-font" , text : b . text , readonly : ! 0 , textLgap : 5 , height : b . height - 2 } ) , this . popup = BI . createWidget ( { type : "bi.text_value_combo_popup" , textAlign : b . textAlign , chooseType : b . chooseType , items : b . items } ) , 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 . combo . setValue ( a ) } , getValue : function ( ) { return this . combo . getValue ( ) } } ) , 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 } ) , this . popup = BI . createWidget ( { type : "bi.text_value_check_combo_popup" , chooseType : b . chooseType , items : b . items } ) , 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 = BI . createWidget ( { type : "bi.combo" , element : this , adjustLength : 2 , el : this . trigger , popup : { el : this . popup , maxHeight : 300 } } ) , BI . isKey ( b . value ) && this . setValue ( b . value ) } , setTitle : function ( a ) { this . trigger . setTitle ( a ) } , setValue : function ( a ) { this . textIconCheckCombo . setValue ( a ) } , setWarningTitle : function ( a ) { this . trigger . setWarningTitle ( a ) } , getValue : function ( ) { return this . textIconCheckCombo . getValue ( ) } , populate : function ( a ) { this . options . items = a , this . textIconCheckCombo . populate ( a ) } } ) , BI . TextValueCheckCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_check_combo" , BI . TextValueCheckCombo ) , BI . SmallTextValueCheckCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SmallTextValueCheckCombo . superclass . _defaultConfig . apply ( this , arguments ) , { width : 100 , height : 24 , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , text : "" } ) } , _init : function ( ) { BI . SmallTextValueCheckCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWi
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 bi-disabled" , 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 . _showHint ( ) , a . fireEvent ( BI . StateEditor . EVENT _CONFIRM , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _START , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _PAUSE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _STOP , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _SPACE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _ENTER , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _RESTRICT , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _EMPTY , arguments ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) , this . _showHint ( ) } , 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 . doHighLigh
} ) } } ) , 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 ( ) } , setPagerVisible : function ( a ) { this . editor . setVisible ( a ) , this . allPages . setVisible ( a ) , this . pager . setVisible ( a ) } , populate : function ( ) { this . pager . populate ( ) } } ) , BI . AllCountPager . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.all_count_pager" , BI . AllCountPager ) , BI . DirectionPager = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DirectionPager . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-direction-pager" , height : 30 , horizontal : { pages : ! 1 , curr : 1 , hasPrev : BI . emptyFn , hasNext : BI . emptyFn , firstPage : 1 , lastPage : BI . emptyFn } , vertical : { pages : ! 1 , curr : 1 , hasPrev : BI . emptyFn , hasNext : BI . emptyFn , firstPage : 1 , lastPage : BI . emptyFn } } ) } , _init : function ( ) { BI . DirectionPager . superclass . _init . apply ( this , arguments ) ; var a = this . options ; a . vertical , a . horizontal ; this . _createVPager ( ) , this . _createHPager ( ) , this . layout = BI . createWidget ( { type : "bi.absolute" , scrollable : ! 1 , element : this , items : [ { el : this . vpager , top : 5 , right : 74 } , { el : this . vlabel , top : 5 , right : 111 } , { el : this . hpager , top : 5 , right : - 9 } , { el : this . hlabel , top : 5 , right : 28 } ] } ) } , _createVPager : function ( ) { var a = this , b = this . options , c = b . vertical ; this . vlabel = BI . createWidget ( { type : "bi.label" , width : 24 , height : 20 , value : c . curr , title : c . curr , invisible : ! 0 } ) , this . vpager = BI . createWidget ( { type : "bi.pager" , width : 76 , layouts : [ { type : "bi.horizontal" , scrollx : ! 1 , rgap : 24 , vgap : 1 } ] , invisible : ! 0 , dynamicShow : ! 1 , pages : c . pages , curr : c . curr , groups : 0 , first : ! 1 , last : ! 1 , prev : { type : "bi.icon_button" , va
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 . setRegionColumnSize ( b . regionColumnSize ) , this . table . attr ( "freezeCols" , b . freezeCols ) } , setWidth : function ( a ) { BI . AdaptiveTable . superclass . setWidth . apply ( this , arguments ) , this . table . setWidth ( a ) } , setHeight : function ( a ) { BI . AdaptiveTable . superclass . setHeight . apply ( this , arguments ) , this . table . setHeight ( a ) } , setColumnSize : function ( a ) { this . options . columnSize = a } , getColumnSize : function ( ) { return this . table . getColumnSize ( ) } , setRegionColumnSize : function ( a ) { this . options . regionColumnSize = a } , getRegionColumnSize : function ( ) { return this . table . getRegionColumnSize ( ) } , setVerticalScroll : function ( a ) { this . table . setVerticalScroll ( a ) } , setLeftHorizontalScroll : function ( a ) { this . table . setLeftHorizontalScroll ( a ) } , setRightHorizontalScroll : function ( a ) { this . table . setRightHorizontalScroll ( a ) } , getVerticalScroll : function ( ) { return this . table . getVerticalScroll ( ) } , getLeftHorizontalScroll : function ( ) { return this . table . getLeftHorizontalScroll ( ) } , getRightHorizontalScroll : function ( ) { return this . table . getRightHorizontalScroll ( ) } , attr : function ( a , b ) { var c = BI . AdaptiveTable . superclass . attr . apply ( this , arguments ) ; return "freezeCols" === a ? c : this . table . attr . apply ( this . table , arguments ) } , restore : function ( ) { this . table . restore ( ) } , populate : function ( a ) { this . options ; this . _populate ( ) , this . table . populate . apply ( this . table , arguments ) } , destroy : function ( ) { this . table . destroy ( ) , BI . AdaptiveTable . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut (
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 . svg . path ( d ) . attr ( "stroke" , "#d4dadd" ) } } ) } ) ; break ; case BI . Direction . Right : 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 . svg . path ( d ) . attr ( "stroke" , "#d4dadd" ) } } ) } ) } } , _createBranches : function ( a ) { var b = this . options ; b . direction !== BI . Direction . Bottom && b . direction !== BI . Direction . Right || ( a = a . reverse ( ) ) ; var c = this . _calculateXY ( a ) ; this . _stroke ( a , c ) } , _isNeedAdjust : function ( ) { var a = this . options ; return a . direction === BI . Direction . Top && a . align === BI . VerticalAlign . Bottom || a . direction === BI . Direction . Bottom && a . align === BI . VerticalAlign . Top || a . direction === BI . Direction . Left && a . align === BI . HorizontalAlign . Right || a . direction === BI . Direction . Right && a . align === BI . HorizontalAlign . Left } , setValue : function ( a ) { } , getValue : function ( ) { } , _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 ++ ) 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 ( a [ b ] ) ) : d . push ( a [ b ] ) ; return d } return [ a ] } , populate : function ( a ) { var b = this . options ; b . items = a || [ ] , this . empty ( ) , a = this . _transformToTreeFormat ( b . items ) , this . tree = new BI . Tree , this . tree . initTree ( a ) , this . svg = BI . createWidget ( { type : "bi.svg" } ) ; var c = this . _stratification ( ) ; if ( this . _isNeedAdjust ( ) ) { var d = this . _translate ( c ) ; d = this . _adjust (
BI . AdaptiveArrangement . EVENT _SCROLL = "AdaptiveArrangement.EVENT_SCROLL" , BI . shortcut ( "bi.adaptive_arrangement" , BI . AdaptiveArrangement ) , BI . ArrangementBlock = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ArrangementBlock . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-arrangement-block bi-mask" } ) } } ) , BI . shortcut ( "bi.arrangement_block" , BI . ArrangementBlock ) , BI . ArrangementDroppable = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ArrangementDroppable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-arrangement-droppable bi-resizer" } ) } } ) , BI . shortcut ( "bi.arrangement_droppable" , BI . ArrangementDroppable ) , BI . Arrangement = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Arrangement . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-arrangement" , layoutType : BI . Arrangement . LAYOUT _TYPE . GRID , items : [ ] } ) } , _init : function ( ) { BI . Arrangement . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . arrangement = BI . createWidget ( { type : "bi.arrangement_droppable" , cls : "arrangement-block" , invisible : ! 0 } ) , this . block = BI . createWidget ( { type : "bi.arrangement_block" , invisible : ! 0 } ) , this . container = BI . createWidget ( { type : "bi.absolute" , scrollable : ! 0 , cls : "arrangement-container" , items : b . items . concat ( [ this . block , this . arrangement ] ) } ) , this . container . element . scroll ( function ( ) { a . fireEvent ( BI . Arrangement . EVENT _SCROLL , { scrollLeft : a . container . element . scrollLeft ( ) , scrollTop : a . container . element . scrollTop ( ) , clientWidth : a . container . element [ 0 ] . clientWidth , clientHeight : a . container . element [ 0 ] . clientHeight } ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . container , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . regions = { } , b . items . length > 0 && BI . nextTick ( function ( ) { a . populate ( b . items ) } ) } , _calculateRegions : function ( a ) { var b = this ; this . options ; this . regions = { } , BI . each ( a , function ( a , c ) { var d = b . _createOneRegion ( c ) ; b . regions [ d . id ] = d } ) } , _isEqual : function ( a , b ) { return Math . abs ( a - b ) < 2 } , _isLessThan : function ( a , b ) { return a < b && ! this . _isEqual ( a , b ) } , _isMoreThan : function ( a , b ) { return a > b && ! this . _isEqual ( a , b ) } , _isLessThanEqual : function ( a , b ) { return a <= b || this . _isEqual ( a , b ) } , _isMoreThanEqual : function ( a , b ) { return a >= b || this . _isEqual ( a , b ) } , _getRegionOccupied : function ( a ) { this . options ; if ( BI . size ( a || this . regions ) <= 0 ) return { left : 0 , top : 0 , width : 0 , height : 0 } ; var b = BI . MAX , c = BI . MIN , d = BI . MAX , e = BI . MIN ; return BI . each ( a || this . regions , function ( a , f ) { b = Math . min ( b , f . left ) , c = Math . max ( c , f . left + f . width ) , d = Math . min ( d , f . top ) , e = Math . max ( e , f . top + f . height ) } ) , { left : b , top : d , width : c - b , height : e - d } } , _getCrossArea : function ( a , b ) { if ( a . left <= b . left ) { if ( a . top <= b . top ) { if ( a . top + a . height > b . top && a . left + a . width > b . left ) return this . _isEqual ( a . top + a . height , b . top ) || this . _isEqual ( a . left + a . width , b . left ) ? 0 : ( a . top + a . height - b . top ) * ( a . left + a . width - b . left ) } else if ( b . top + b . height > a . top && a . left + a . width > b . left ) return this . _isEqual ( b . top + b . height , a . top ) || this . _isEqual ( a . left + a . width , b . left ) ? 0 : ( b . top + b . height - a . top ) * ( a . left + a . width - b . left ) } else if ( a . top <= b . top ) { if ( a . top + a . height > b . top && b . left + b . width > a . left ) return this . _isEqual ( a . top + a . height , b . top ) || this . _isEqual ( b . left + b . width , a . left ) ? 0 : ( a . top + a . height - b . top ) * ( b . left + b . width - a . left ) } else if ( b . top + b . height > a . top && b . left + b . width > a . left ) return this . _isEqual ( b . top + b . height , a . top ) || this . _isEqual ( b . left + b . width , a . left ) ? 0 : ( b . top + b . height - a . top ) * ( b . left + b . width - a . left ) ; return 0 } , _isRegionOverlay : function ( a ) { var b = [ ] ; BI . each ( a || this . regions , function ( a , c ) { b . push ( new BI . Region ( c . left , c . top , c . width , c . height ) ) } ) ; for ( var c = 0 , d = b . length ; c < d ; c ++ ) for ( var e = c + 1 ; e < d ; e ++ ) { var f = { left : b [ c ] . x , top : b [ c ] . y , width : b [ c ] . w , height : b [ c ] . h } , g = { left : b [ e ] . x , top : b [ e ] . y , width : b [ e ] . w , height : b [ e ] . h } ; if ( b [ c ] . isIntersects ( b [ e ] ) && this . _getCrossArea ( f , g ) > 1 ) return ! 0 } return ! 1 } , _isArrangeFine : function ( a ) { switch ( this . options . layoutType ) { case BI . Arrangement . LAYOUT _TYPE . FREE : return ! 0 ; case BI . Arrangement . LAYOUT _TYPE . GRID : } return ! 0 } , _getRegionNames : function ( a ) { var b = [ ] ; return BI . each ( a || this . regions , function ( a , c ) { b . push ( c . id || c . attr ( "id" ) ) } ) , b } , _getRegionsByNames : function ( a , b ) { if ( a = BI . isArray ( a ) ? a : [ a ] , b = b || this . regions , BI . isArray ( b ) ) { var c = [ ] ; BI . each
BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _YEAR _BEGIN ] = BI . i18nText ( "BI-Multi_Date_Year_Begin" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _YEAR _END ] = BI . i18nText ( "BI-Multi_Date_Year_End" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _QUARTER _PREV ] = BI . i18nText ( "BI-Multi_Date_Quarter_Prev" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _QUARTER _AFTER ] = BI . i18nText ( "BI-Multi_Date_Quarter_Next" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _QUARTER _BEGIN ] = BI . i18nText ( "BI-Multi_Date_Quarter_Begin" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _QUARTER _END ] = BI . i18nText ( "BI-Multi_Date_Quarter_End" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _MONTH _PREV ] = BI . i18nText ( "BI-Multi_Date_Month_Prev" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _MONTH _AFTER ] = BI . i18nText ( "BI-Multi_Date_Month_Next" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _MONTH _BEGIN ] = BI . i18nText ( "BI-Multi_Date_Month_Begin" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _MONTH _END ] = BI . i18nText ( "BI-Multi_Date_Month_End" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _WEEK _PREV ] = BI . i18nText ( "BI-Multi_Date_Week_Prev" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _WEEK _AFTER ] = BI . i18nText ( "BI-Multi_Date_Week_Next" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _DAY _PREV ] = BI . i18nText ( "BI-Multi_Date_Day_Prev" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _DAY _AFTER ] = BI . i18nText ( "BI-Multi_Date_Day_Next" ) , BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _DAY _TODAY ] = BI . i18nText ( "BI-Multi_Date_Today" ) , BI . DateTrigger . EVENT _FOCUS = "EVENT_FOCUS" , BI . DateTrigger . EVENT _START = "EVENT_START" , BI . DateTrigger . EVENT _STOP = "EVENT_STOP" , BI . DateTrigger . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DateTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . DateTrigger . EVENT _VALID = "EVENT_VALID" , BI . DateTrigger . EVENT _ERROR = "EVENT_ERROR" , BI . DateTrigger . EVENT _TRIGGER _CLICK = "EVENT_TRIGGER_CLICK" , BI . DateTrigger . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . shortcut ( "bi.date_trigger" , BI . DateTrigger ) , BI . DatePaneWidget = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . DatePaneWidget . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-date-pane" , min : "1900-01-01" , max : "2099-12-31" , selectedTime : null } ) } , _init : function ( ) { BI . DatePaneWidget . 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 . selectedTime = b . selectedTime || { year : this . _year , month : this . _month } , this . datePicker = BI . createWidget ( { type : "bi.date_picker" , min : b . min , max : b . max } ) , this . datePicker . on ( BI . DatePicker . EVENT _CHANGE , function ( ) { a . selectedTime = a . datePicker . getValue ( ) , a . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( a . selectedTime ) ) } ) , this . calendar = BI . createWidget ( { direction : "top" , element : this , logic : { dynamic : ! 1 } , type : "bi.navigation" , tab : this . datePicker , cardCreator : BI . bind ( this . _createNav , this ) } ) , this . calendar . on ( BI . Navigation . EVENT _CHANGE , function ( ) { a . selectedTime = a . calendar . getValue ( ) , a . calendar . empty ( ) , a . setValue ( a . selectedTime ) , a . fireEvent ( BI . DateCalendarPopup . EVENT _CHANGE ) } ) } , _createNav : function ( a ) { var b = BI . Calendar . getDateJSONByPage ( a ) , c = BI . createWidget ( { type : "bi.calendar" , logic : { dynamic : ! 1 } , min : this . options . min , max : this . options . max , year : b . year , month : b . month , day : this . selectedTime . day } ) ; return c } , _getNewCurrentDate : function ( ) { var a = Date . getDate ( ) ; return { year : a . getFullYear ( ) , month : a . getMonth ( ) } } , _setCalenderValue : function ( a ) { this . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( a ) ) , this . calendar . setValue ( a ) , this . selectedTime = a } , _setDatePicker : function ( a ) { BI . isNull ( a ) || BI . isNull ( a . year ) || BI . isNull ( a . month ) ? this . datePicker . setValue ( this . _getNewCurrentDate ( ) ) : this . datePicker . setValue ( a ) } , _setCalendar : function ( a ) { BI . isNull ( a ) || BI . isNull ( a . day ) ? ( this . calendar . empty ( ) , this . _setCalenderValue ( this . _getNewCurrentDate ( ) ) ) : this . _setCalenderValue ( a ) } , setValue : function ( a ) { this . _setDatePicker ( a
} ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _CHANGE ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( b ) { a . fireEvent ( BI . TextEditor . EVENT _KEY _DOWN ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( b ) { a . fireEvent ( BI . TextEditor . EVENT _SPACE ) } ) , this . editor . on ( BI . Editor . EVENT _BACKSPACE , function ( b ) { a . fireEvent ( BI . TextEditor . EVENT _BACKSPACE ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _VALID ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _CONFIRM ) } ) , this . editor . on ( BI . Editor . EVENT _REMOVE , function ( b ) { a . fireEvent ( BI . TextEditor . EVENT _REMOVE ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _START ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _PAUSE ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _STOP ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _ENTER ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _RESTRICT ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { a . fireEvent ( BI . TextEditor . EVENT _EMPTY ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) } , focus : function ( ) { this . editor . focus ( ) } , blur : function ( ) { this . editor . blur ( ) } , setErrorText : function ( a ) { this . editor . setErrorText ( a ) } , getErrorText : function ( ) { return this . editor . getErrorText ( ) } , isValid : function ( ) { return this . editor . isValid ( ) } , setValue : function ( a ) { this . editor . setValue ( a ) } , getValue : function ( ) { return this . editor . getValue ( ) } } ) , BI . TextEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . TextEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . TextEditor . EVENT _BLUR = "EVENT_BLUR" , BI . TextEditor . EVENT _CLICK = "EVENT_CLICK" , BI . TextEditor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . TextEditor . EVENT _SPACE = "EVENT_SPACE" , BI . TextEditor . EVENT _BACKSPACE = "EVENT_BACKSPACE" , BI . TextEditor . EVENT _START = "EVENT_START" , BI . TextEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . TextEditor . EVENT _STOP = "EVENT_STOP" , BI . TextEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . TextEditor . EVENT _VALID = "EVENT_VALID" , BI . TextEditor . EVENT _ERROR = "EVENT_ERROR" , BI . TextEditor . EVENT _ENTER = "EVENT_ENTER" , BI . TextEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . TextEditor . EVENT _REMOVE = "EVENT_REMOVE" , BI . TextEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.text_editor" , BI . TextEditor ) , BI . SmallTextEditor = BI . inherit ( BI . TextEditor , { _defaultConfig : function ( ) { var a = BI . SmallTextEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-small-text-editor" , height : 25 } ) } , _init : function ( ) { BI . SmallTextEditor . superclass . _init . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.small_text_editor" , BI . SmallTextEditor ) , BI . FileManagerButtonGroup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . FileManagerButtonGroup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-file-manager-button_group" , items : [ ] } ) } , _init : function ( ) { BI . FileManagerButtonGroup . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . button _group = BI . createWidget ( { type : "bi.button_tree" , element : this , chooseType : BI . Selection . Multi , items : this . _formatItems ( b . items ) , layouts : [ { type : "bi.vertical" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , _formatItems : function ( a ) { this . options ; return BI . each ( a , function ( a , b ) { b . children && b . children . length > 0 ? b . type = "bi.file_manager_folder_item" : b . type = "bi.file_manager_file_item" } ) , a } , setValue : function ( a ) { this . button _group . setValue ( a ) } , getValue : function ( ) { return this . button _group . getValue ( ) } , getNotSelectedValue : function ( ) { return this . button _group . getNotSelectedValue ( ) } , getAllLeaves : function ( ) { return this . button _group . getAllLeaves ( ) } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , getSelectedButtons : function ( ) { return this . button _group . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . button _group . getNotSelectedButtons ( ) } , populate : function ( a ) {
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 . _accurateAddition ( this . _accurateAddition ( this . _accurateAddition ( e , f ) , g ) , h ) } , _accurateDivisionTenExponent : 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 ) ; if ( d . numInteger . length > b ) var e = d . numInteger . slice ( 0 , d . numInteger . length - b ) , f = d . numInteger . slice ( - b ) ; else var e = "0" , f = c ( d . numInteger , b ) ; var g = e + "." + f + d . numDecimal ; return BI . parseFloat ( g ) } , accurateSubtraction : function ( a , b ) { return a >= 0 && b >= 0 ? a >= b ? this . _accurateSubtraction ( a , b ) : - this . _accurateSubtraction ( b , a ) : a >= 0 && b < 0 ? this . _accurateAddition ( a , - b ) : a < 0 && b >= 0 ? - this . _accurateAddition ( - a , b ) : a < 0 && b < 0 ? a >= b ? this . _accurateSubtraction ( - b , - a ) : this . _accurateSubtraction ( - a , - b ) : void 0 } , accurateAddition : function ( a , b ) { return a >= 0 && b >= 0 ? this . _accurateAddition ( a , b ) : a >= 0 && b < 0 ? this . accurateSubtraction ( a , - b ) : a < 0 && b >= 0 ? this . accurateSubtraction ( b , - a ) : a < 0 && b < 0 ? - this . _accurateAddition ( - a , - b ) : void 0 } , accurateMultiplication : function ( a , b ) { return a >= 0 && b >= 0 ? this . _accurateMultiplication ( a , b ) : a >= 0 && b < 0 ? - this . _accurateMultiplication ( a , - b ) : a < 0 && b >= 0 ? - this . _accurateMultiplication ( - a , b ) : a < 0 && b < 0 ? this . _accurateMultiplication ( - a , - b ) : void 0 } , accurateDivisionTenExponent : function ( a , b ) { return a >= 0 ? this . _accurateDivisionTenExponent ( a , b ) : - this . _accurateDivisionTenExponent ( - a , b ) } } ) , BI . MonthCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MonthCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-month-combo" , behaviors : { } , height : 25 } ) } , _init : function ( ) { BI . MonthCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : " bi
} , 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 : [ ] } ) } , _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 } ) , this . popup = BI . createWidget ( { type : "bi.multilayer_select_tree_popup" , isDefaultInit : b . isDefaultInit , items : b . items } ) , 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 . MultiLayerSelectTreePopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . combo . hideView ( ) , a . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _CHANGE ) } ) } , setValue : function ( a ) { a = BI . isArray ( a ) ? a : [ a ] , this . trigger . setValue ( a ) , this . popup . setValue ( a ) } , getValue : function ( ) { return this . popup . getValue ( ) } , populate : function ( a ) { this . combo . populate ( a ) } } ) , BI . MultiLayerSelectTreeCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_tree_combo" , BI . MultiLayerSelectTreeCombo ) , BI . MultiLayerSelectLevelTree = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiLayerSelectLevelTree . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-select-level-tree" , isDefaultInit : ! 1 , items : [ ] , itemsCreator : BI . emptyFn } ) } , _init : function ( ) { BI . MultiLayerSelectLevelTree . superclass . _init . apply ( this , arguments ) , this . initTree ( this . options . items ) } , _formatItems : function ( a , b ) { var c = this ; return BI . each ( a , function ( d , e ) { var f = { } ; if ( e . layer = b , BI . isKey ( e . id ) || ( e . id = BI . UUID ( ) ) , e . isParent === ! 0 || BI . isNotEmptyArray ( e . children ) ) { switch ( d ) { case 0 : f . type = "bi.multilayer_select_tree_first_plus_group_node" ; break ; case a . length - 1 : f . type = "bi.multilayer_select_tree_last_plus_group_node" ; break ; default : f . type = "bi.multilayer_select_tree_mid_plus_group_node" } BI . defaults ( e , f ) , c . _formatItems ( e . children , b + 1 ) } else { switch ( d ) { case a . length - 1 : f . type = "bi.multilayer_single_tree_last_tree_leaf_item" ; break ; default : f . type = "bi.multilayer_single_tree_mid_tree_leaf_item" } BI . defaults (
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 ( ) } ) } } , 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 bi-border-left" } ) ; 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 c . _adjust ( b ) } var h = c . _makeMap ( c . storeValue . value ) , i = c . _makeMap ( a . value ) , j = [ ] ; BI . each ( e , function ( a , b ) { BI . isNotNull ( h [ e [ a ] ] ) && delete h [ e [ a ] ] , BI . isNull ( i [ e [ a ] ] ) && j . push ( b ) } ) , c . storeValue . value = j . concat ( BI . values ( h ) ) , c . _adjust ( b ) } ) } , _adjust : function ( a ) { function b ( ) { c . wants2Quit === ! 0 && ( c . fireEvent ( BI . MultiSelectInsertCombo . EVENT _CONFIRM ) , c . wants2Quit = ! 1 ) , c . requesting = ! 1 } var c = this ; this . options ; b ( ) , a ( ) } , _join : function ( a , b ) { var c = this ; this . options ; if ( this . _assertValue ( a ) , this . _assertValue ( this . storeValue ) , this . storeValue . type === a . type ) { var d = this . _makeMap ( this . storeValue . value ) ; BI . each ( a . value , function ( a , b ) { d [ b ] || ( c . storeValue . value . push ( b ) , d [ b ] = b ) } ) ; var e = ! 1 ; return BI . each ( a . assist , function ( a , b ) { BI . isNotNull ( d [ b ] ) && ( e = ! 0 , delete d [ b ] ) } ) , e && ( this . storeValue . value = BI . values ( d ) ) , void c . _adjust ( b ) } this . _joinAll ( a , b ) } , _setStartValue : function ( a ) { this . _startValue = a , this . popup . setStartValue ( a ) } , setValue : function ( a ) { this . storeValue = a || { } , this . _assertValue ( this . storeValue ) , this . combo . setValue ( this . storeValue ) } , getValue : function ( ) { return BI . deepClone ( this . storeValue ) } , populate : function ( ) { this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . extend ( BI . MultiSelectInsertCombo , { REQ _GET _DATA _LENGTH : 0 , REQ _GET _ALL _DATA : - 1 } ) , BI . MultiSelectInsertCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.multi_select_insert_combo" , BI . MultiSelectInsertCombo ) , BI . MultiSelectCombo = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-combo" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , height : 28 } ) } , _init : function ( ) { BI . MultiSelectCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = function ( ) { BI . isKey ( a . _startValue ) && a . storeValue . value [ a . storeValue . type === BI . Selection . All ? "remove" : "pushDistinct" ] ( a . _startValue ) , a . trigger . getSearcher ( ) . setState ( a . storeValue ) , a . trigger . getCounter ( ) . setButtonChecked ( a . storeValue ) } ; this . storeValue = { } , this . requ
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 . stopEditing ( ) } , _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 ) } ) , b ( ) } var d = this , e = this . options ; this . _assertValue ( this . storeValue ) , this . _allData ? c ( this . _allData ) : e . itemsCreator ( { type : BI . MultiSelectInsertList . REQ _GET _ALL _DATA } , function ( a ) { d . _allData = BI . pluck ( a . items , "value" ) , c ( d . _allData ) } ) } , _joinAll : function ( a , b ) { var c = this , d = this . options ; this . _assertValue ( a ) , d . itemsCreator ( { type : BI . MultiSelectInsertList . REQ _GET _ALL _DATA , keyword : c . trigger . getKeyword ( ) } , 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 b ( ) } var h = c . _makeMap ( c . storeValue . value ) , i = c . _makeMap ( a . value ) , j = [ ] ; BI . each ( e , function ( a , b ) { BI . isNotNull ( h [ e [ a ] ] ) && delete h [ e [ a ] ] , BI . isNull ( i [ e [ a ] ] ) && j . push ( b ) } ) , c . storeValue . value = j . concat ( BI . values ( h ) ) , b ( ) } ) } , _join : function ( a , b ) { var c = this ; this . options ; if ( this . _assertValue ( a ) , this . _assertValue ( this . storeValue ) , this . storeValue . type === a . type ) { var d = this . _makeMap ( this . storeValue . value ) ; BI . each ( a . value , function ( a , b ) { d [ b ] || ( c . storeValue . value . push ( b ) , d [ b ] = b ) } ) ; var e = ! 1 ; return BI . each ( a . assist , function ( a , b ) { BI . isNotNull ( d [ b ] ) && ( e = ! 0 , delete d [ b ] ) } ) , e && ( this . storeValue . value = BI . values ( d ) ) , void b ( ) } this . _joinAll ( a , b ) } , _setStartValue : function ( a ) { this . _startValue = a , this . adapter . setStartValue ( a ) } , isAllSelected : function ( ) { return this . adapter . isAllSelected ( ) } , resize : function ( ) { } , setValue : function ( a ) { this . storeValue = a || { } , this . _assertValue ( this . storeValue ) , this . adapter . setValue ( this . storeValue ) , this . trigger . setValue ( this . storeValue ) } , getValue : function ( ) { return BI . deepClone ( this . storeValue ) } , populate : function ( ) { this . _count = null , this . _allData = null , this . adapter . populate . apply ( this . adapter , arguments ) , this . trigger . populate . apply ( this . trigger , arguments ) } } ) , BI . extend ( BI . MultiSelectInsertList , { REQ _GET _DATA _LENGTH : 0 , REQ _GET _ALL _DATA : - 1 } ) , BI . MultiSelectInsertList . EVENT _CHANGE = "BI.MultiSelectInsertList.EVENT_CHANGE" , BI . shortcut ( "bi.multi_select_insert_list" , BI . MultiSelectInsertList ) , BI . MultiSelectList = BI . inherit ( BI . Widget , { _defaultConfig
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 . validation = "invalid" , b . signalError ) : ( a . element . removeClass ( "number-error" ) , c . validation = "valid" , "" ) } , _setTitle : function ( a ) { var b = this ; b . bigEditor . setTitle ( a ) , b . smallEditor . setTitle ( a ) , b . label . setTitle ( a ) } , _setFocusEvent : function ( a ) { var b = this , c = this . constants ; a . on ( BI . Editor . EVENT _FOCUS , function ( ) { switch ( b . _setTitle ( "" ) , b . _checkValidation ( ) ) { case c . typeError : BI . Bubbles . show ( c . typeError , BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) , b , { offsetStyle : "center" } ) ; break ; case c . numberError : BI . Bubbles . show ( c . numberError , BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) , b , { offsetStyle : "center" } ) ; break ; case c . signalError : BI . Bubbles . show ( c . signalError , BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) , b , { offsetStyle : "center" } ) ; break ; default : return } } ) } , _setBlurEvent : function ( a ) { var b = this . constants , c = this ; a . on ( BI . Editor . EVENT _BLUR , function ( ) { switch ( BI . Bubbles . hide ( b . typeError ) , BI . Bubbles . hide ( b . numberError ) , BI . Bubbles . hide ( b . signalError ) , c . _checkValidation ( ) ) { case b . typeError : c . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) ) ; break ; case b . numberError : c . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) ) ; break ; case b . signalError : c . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) ) ; break ; default : c . _setTitle ( "" ) } } ) } , _setErrorEvent : function ( a ) { var b = this . constants , c = this ; a . on ( BI . Editor . EVENT _ERROR , function ( ) { c . _checkValidation ( ) , BI . Bubbles . show ( b . typeError , BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) , c , { offsetStyle : "center" } ) , c . fireEvent ( BI . NumberInterval . EVENT _ERROR ) } ) } , _setValidEvent : function ( a ) { var b = this , c = this . constants ; a . on ( BI . Editor . EVENT _VALID , function ( ) { switch ( b . _checkValidation ( ) ) { case c . numberError : BI . Bubbles . show ( c . numberError , BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) , b , { offsetStyle : "center" } ) , b . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; case c . signalError : BI . Bubbles . show ( c . signalError , BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) , b , { offsetStyle : "center" } ) , b . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; default : b . fireEvent ( BI . NumberInterval . EVENT _VALID ) } } ) } , _setEditorValueChangedEvent : function ( a ) { var b = this , c = this . constants ; a . on ( BI . Editor . EVENT _CHANGE , function ( ) { switch ( b . _checkValidation ( ) ) { case c . typeError : BI . Bubbles . show ( c . typeError , BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) , b , { offsetStyle : "center" } ) ; break ; case c . numberError : BI . Bubbles . show ( c . numberError , BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) , b , { offsetStyle : "center" } ) ; break ; case c . signalError : BI . Bubbles . show ( c . signalError , BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) , b , { offsetStyle : "center" } ) } b . fireEvent ( BI . NumberInterval . EVENT _CHANGE ) } ) } , _setComboValue
} ) } ) } , previewRelationTables : function ( a , b ) { return b ? ( BI . each ( this . storeViews , function ( b , c ) { a . contains ( b ) ? c . setPreviewSelected ( ! 0 ) : c . toggleRegion ( ! 1 ) } ) , void BI . each ( this . lines , function ( b , c ) { BI . each ( c , function ( c , d ) { a . contains ( b ) && a . contains ( c ) || d . hide ( ) } ) } ) ) : ( BI . each ( this . storeViews , function ( a , b ) { b . toggleRegion ( ! 0 ) , b . setPreviewSelected ( ! 1 ) } ) , void BI . each ( this . lines , function ( a , b ) { BI . each ( b , function ( a , b ) { b . show ( ) } ) } ) ) } , doRedMark : function ( a ) { BI . each ( this . storeViews , function ( b , c ) { c . doRedMark ( a ) } ) } , populate : function ( a ) { var b = this , c = this . options , d = this . _const ; c . items = a || [ ] , this . empty ( ) , this . svg = BI . createWidget ( { type : "bi.svg" } ) ; var e = this . regions = { } , f = this . relations = { } ; BI . each ( a , function ( a , b ) { var c = b . primary . region , d = b . foreign && b . foreign . region ; c && ! f [ c ] && ( f [ c ] = { } ) , c && d && ! f [ c ] [ d ] && ( f [ c ] [ d ] = [ ] ) , c && ! e [ c ] && ( e [ c ] = [ ] ) , d && ! e [ d ] && ( e [ d ] = [ ] ) , c && ! BI . deepContains ( e [ c ] , b . primary ) && e [ c ] . push ( b . primary ) , d && ! BI . deepContains ( e [ d ] , b . foreign ) && e [ d ] . push ( b . foreign ) , c && d && f [ c ] [ d ] . push ( b ) } ) ; for ( var g = [ ] , h = BI . clone ( e ) , i = { } ; ! BI . isEmpty ( h ) ; ) { var j = BI . clone ( h ) ; BI . each ( c . items , function ( a , b ) { i [ b . primary . region ] || delete j [ b . foreign && b . foreign . region ] } ) , g . push ( BI . keys ( j ) ) , BI . extend ( i , j ) , BI . each ( j , function ( a , b ) { delete h [ a ] } ) } var k = this . views = { } , l = this . storeViews = { } , m = this . indexes = { } , n = [ ] ; BI . each ( g , function ( a , c ) { k [ a ] || ( k [ a ] = { } ) ; var d = [ ] ; BI . each ( c , function ( c , f ) { var g = e [ f ] ; k [ a ] [ c ] = l [ f ] = BI . createWidget ( { type : "bi.relation_view_region_container" , value : f , header : g [ 0 ] . regionTitle , text : g . length > 0 ? g [ 0 ] . regionText : "" , handler : g . length > 0 ? g [ 0 ] . regionHandler : BI . emptyFn , items : g , disabled : g [ 0 ] . disabled , belongPackage : ! ( g . length > 0 ) || g [ 0 ] . belongPackage } ) , BI . isNotNull ( g [ 0 ] ) && BI . isNotNull ( g [ 0 ] . keyword ) && k [ a ] [ c ] . doRedMark ( g [ 0 ] . keyword ) , k [ a ] [ c ] . on ( BI . RelationViewRegionContainer . EVENT _HOVER _IN , function ( a ) { b . _hoverIn ( a ) } ) , k [ a ] [ c ] . on ( BI . RelationViewRegionContainer . EVENT _HOVER _OUT , function ( a ) { b . _hoverOut ( a ) } ) , k [ a ] [ c ] . on ( BI . RelationViewRegionContainer . EVENT _PREVIEW , function ( a ) { b . fireEvent ( BI . RelationView . EVENT _PREVIEW , f , a ) } ) , m [ f ] = { i : a , j : c } , d . push ( k [ a ] [ c ] ) } ) , n . push ( { type : "bi.horizontal" , items : d } ) } ) ; var o = this . _calculateHeights ( ) , p = this . _calculateWidths ( ) , q = [ 0 ] , r = [ 0 ] ; BI . each ( o , function ( a , b ) { 0 !== a && ( r [ a ] = r [ a - 1 ] + o [ a - 1 ] ) } ) , BI . each ( p , function ( a , b ) { 0 !== a && ( q [ a ] = q [ a - 1 ] + p [ a - 1 ] ) } ) ; var s = this . lines = { } ; BI . each ( f , function ( a , c ) { BI . each ( c , function ( c , e ) { var f = m [ a ] , g = m [ c ] , h = 0 , i = 1 , j = 2 , n = 3 , o = j , t = h , u = function ( a , b , c , d ) { var e , f = q [ b ] + ( p [ b ] - k [ a ] [ b ] . getWidth ( ) ) / 2 , g = r [ a ] , l = "" ; switch ( c ) { case h : e = d ? k [ a ] [ b ] . getTopRightPosition ( ) : k [ a ] [ b ] . getTopLeftPosition ( ) , f += e . x , g += e . y , l = "M" + f + "," + g + "L" + f + "," + ( g - 10 ) , g -= 10 ; break ; case i : e = k [ a ] [ b ] . getRightPosition ( ) , f += e . x , g += e . y , l = "M" + f + "," + g + "L" + ( f + 10 ) + "," + g , f += 10 ; break ; case j : e = k [ a ] [ b ] . getBottomPosition ( ) , f += e . x , g += e . y , l = "M" + f + "," + g + "L" + f + "," + ( g + 10 ) , g += 10 ; break ; case n : e = k [ a ] [ b ] . getLeftPosition ( ) , f += e . x , g += e . y , l = "M" + f + "," + g + "L" + ( f - 10 ) + "," + g , f -= 10 } return { x : f , y : g , path : l } } , v = "" , w = u ( f . i , f . j , o ) , x = u ( g . i , g . j , t , ! 0 ) ; v += w . path + x . path , s [ a ] || ( s [ a ] = { } ) , v += "M" + w . x + "," + w . y + "L" + x . x + "," + x . y ; var y = s [ a ] [ c ] = b . svg . path ( v ) . attr ( { stroke : d . lineColor , "stroke-width" : "2" } ) . hover ( function ( ) { y . attr ( "stroke" , d . selectLineColor ) . toFront ( ) , l [ a ] . setValue ( e [ 0 ] . primary . value ) , l [ c ] . setValue ( e [ 0 ] . foreign . value ) } , function ( ) { y . attr ( "stroke" , d . lineColor ) , l [ a ] . setValue ( [ ] ) , l [ c ] . setValue ( [ ] ) } ) } ) } ) ; var t = BI . createWidget ( ) ; BI . createWidget ( { type : "bi.vertical" , element : t , items : n } ) , BI . createWidget ( { type : "bi.absolute" , element : t , items : [ { el : this . svg , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , BI . createWidget ( { type : "bi.center_adapt" , scrollable : ! 0 , element : this , items : [ t ] } ) } } ) , BI . RelationView . EVENT _CHANGE = "RelationView.EVENT_CHANGE" , BI . RelationView . EVENT _PREVIEW = "EVENT_PREVIEW" , BI . shortcut ( "bi.relation_view" , BI . RelationView ) , BI . RelationViewRegionContainer = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . RelationViewRegionContainer . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-relation-view-region-container" , width : 200 } ) } , _init : function ( ) { BI . RelationViewRegionContainer . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . region = BI . createWidget ( { type : "bi.relation_view_region" , value : b . value , width : b . widt
a . showSequence === ! 0 ? ( this . sequence . setVisible ( ! 0 ) , this . table . element . css ( "left" , "60px" ) , this . table . setWidth ( a . width - 60 ) ) : ( this . sequence . setVisible ( ! 1 ) , this . table . element . css ( "left" , "0px" ) , this . table . setWidth ( a . width ) ) } , setWidth : function ( a ) { BI . PageTable . superclass . setWidth . apply ( this , arguments ) , this . table . setWidth ( this . options . showSequence ? a - 60 : a ) } , setHeight : function ( a ) { BI . PageTable . superclass . setHeight . apply ( this , arguments ) , this . table . setHeight ( a ) , this . sequence . setHeight ( a - BI . GridTableScrollbar . SIZE ) } , setColumnSize : function ( a ) { this . options . columnSize = a , this . table . setColumnSize ( a ) } , getColumnSize : function ( ) { return this . table . getColumnSize ( ) } , setRegionColumnSize : function ( a ) { this . options . columnSize = a , this . table . setRegionColumnSize ( a ) } , getRegionColumnSize : function ( ) { return this . table . getRegionColumnSize ( ) } , hasLeftHorizontalScroll : function ( ) { return this . table . hasLeftHorizontalScroll ( ) } , hasRightHorizontalScroll : function ( ) { return this . table . hasRightHorizontalScroll ( ) } , setLeftHorizontalScroll : function ( a ) { this . table . setLeftHorizontalScroll ( a ) } , setRightHorizontalScroll : function ( a ) { this . table . setRightHorizontalScroll ( a ) } , setVerticalScroll : function ( a ) { this . table . setVerticalScroll ( a ) , this . sequence . setVerticalScroll ( a ) } , getVerticalScroll : function ( ) { return this . table . getVerticalScroll ( ) } , setVPage : function ( a ) { this . sequence . setVPage && this . sequence . setVPage ( a ) } , setHPage : function ( a ) { this . sequence . setHPage && this . sequence . setHPage ( a ) } , attr : function ( ) { BI . SequenceTable . superclass . attr . apply ( this , arguments ) , this . table . attr . apply ( this . table , arguments ) , this . sequence . attr . apply ( this . sequence , arguments ) } , restore : function ( ) { this . table . restore ( ) , this . sequence . restore ( ) } , populate : function ( a , b , c , d ) { var e = this . options ; a && ( e . items = a ) , b && ( e . header = b ) , c && ( e . crossItems = c ) , d && ( e . crossHeader = d ) , this . _populate ( ) , this . table . populate . apply ( this . table , arguments ) , this . sequence . populate . apply ( this . sequence , arguments ) , this . sequence . setVerticalScroll ( this . table . getVerticalScroll ( ) ) } , destroy : function ( ) { this . table . destroy ( ) , BI . SequenceTable . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.sequence_table" , BI . SequenceTable ) , BI . SingleSelectSearchLoader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectSearchLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-select-search-loader" , itemsCreator : BI . emptyFn , keywordGetter : BI . emptyFn , valueFormatter : BI . emptyFn } ) } , _init : function ( ) { BI . SingleSelectSearchLoader . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = ! 1 ; this . button _group = BI . createWidget ( { type : "bi.single_select_list" , element : this , logic : { dynamic : ! 1 } , el : { tipText : BI . i18nText ( "BI-No_Select" ) , el : { type : "bi.loader" , isDefaultInit : ! 1 , logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] } } } , itemsCreator : function ( d , e ) { a . storeValue && ( d = BI . extend ( d || { } , { selectedValues : [ a . storeValue ] } ) ) , b . itemsCreator ( d , function ( f ) { var g = f . keyword = b . keywordGetter ( ) ; c = f . hasNext ; var h = [ ] ; if ( 1 === d . times && a . storeValue ) { var i = BI . map ( [ a . storeValue ] , function ( a , c ) { var d = b . valueFormatter ( c ) || c ; return { text : d , value : c , title : d , selected : ! 1 } } ) ; h = a . _createItems ( i ) } e ( h . concat ( a . _createItems ( f . items ) ) , g ) , 1 === d . times && a . storeValue && a . setValue ( a . storeValue ) } ) } , hasNext : function ( ) { return c } } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button _group . on ( BI . SingleSelectList . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . SingleSelectSearchLoader . EVENT _CHANGE , arguments ) } ) } , _createItems : function ( a ) { return BI . createItems ( a , { type : "bi.single_select_radio_item" , logic : { dynamic : ! 1 } , height : 25 , selected : ! 1 } ) } , _filterValues : function ( a ) { var b = this . options , c = b . keywordGetter ( ) , d = BI . deepClone ( a . value ) || [ ] , e = BI . map ( d , function ( a , c ) { return { text : b . valueFormatter ( c ) || c , value : c } } ) ; if ( BI . isKey ( c ) ) { var f = BI . Func . getSearchResult ( e , c ) ; d = f . matched . concat ( f . finded ) } return BI . map ( d , function ( a , b ) { return { text : b . text , title : b . text , value : b . value , selected : ! 1 } } ) } , setValue : function ( a ) { this . storeValue = a , this . button _group . setValue
} ) ; var d = BI . createWidget ( { type : "bi.trigger_icon_button" , width : b . height , height : b . height , cls : "single-select-trigger-icon-button bi-border-left" } ) ; d . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { 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 = "" ) } , _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 . remove ( b ) } ) , d . _adjust ( b ) } var d = this , e = this . options ; this . _assertValue ( this . storeValue ) , this . requesting = ! 0 , e . itemsCreator ( { type : BI . SingleSelectCombo . 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 . SingleSelectCombo . 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 c . _adjust ( b ) } var h = c . _makeMap ( c . storeValue . value ) , i = c . _makeMap ( a . value ) , j = [ ] ; BI . each ( e , function ( a , b ) { BI . isNotNull ( h [ e [ a ] ] ) && delete h [ e [ a ] ] , BI . isNull ( i [ e [ a ] ] ) && j . push ( b ) } ) , c . storeValue . value = j . concat ( BI . values ( h ) ) , c . _adjust ( b ) } ) } , _adjust : function ( a ) { function b ( ) { c . wants2Quit === ! 0 && ( c . fireEvent ( BI . SingleSelectCombo . EVENT _CONFIRM ) , c . wants2Quit = ! 1 ) , c . requesting = ! 1 } var c = this , d = this . options ; this . _count ? ( b ( ) , a ( ) ) : d . itemsCreator ( { type : BI . SingleSelectCombo . REQ _GET _DATA _LENGTH } , function ( d ) { c . _count = d . count , b ( ) , a ( ) } ) } , _join : function ( a , b ) { var c = this ; this . options ; if ( this . _assertValue ( a ) , this . _assertValue ( this . storeValue ) , this . storeValue . type === a . type ) { var d = this . _makeMap ( this . storeValue . value ) ; BI . each ( a . value , function ( a , b ) { d [ b ] || ( c . storeValue . value . push ( b ) , d [ b ] = b ) } ) ; var e = ! 1 ; return BI . each ( a . assist , function ( a , b ) { BI . isNotNull ( d [ b ] ) && ( e = ! 0 , delete d [ b ] ) } ) , e && ( this . storeValue . value = BI . values ( d ) ) , void c . _adjust ( b ) } this . _joinAll ( a , b ) } , _setStartValue : function ( a ) { this . _startValue = a , this . popup . setStartValue ( a ) } , setValue : function ( a ) { this . storeValue = a || "" , this . _assertValue ( this . storeValue ) , this . combo . setValue ( this . storeValue ) } , getValue : function ( ) { return this . storeValue } , populate : function ( ) { this . _count = null , this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . extend ( BI . SingleSelectCombo , { REQ _GET _DATA _LENGTH : 0 , REQ _GET _ALL _DATA : - 1 } ) , BI . SingleSelectCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.single_select_add_combo" , BI . SingleSelectCombo ) , 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_add_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 , it
right : 0 , top : 0 , bottom : 0 } ] } , { type : "bi.absolute" , items : [ { el : a . right , left : 0 , right : this . constants . offset , top : 0 , bottom : 0 } ] } ] } ) , BI . createWidget ( { type : "bi.horizontal_auto" , element : this , items : [ a . label ] } ) } , _createCombo : function ( ) { var a = this , b = BI . createWidget ( { type : "bi.multidate_combo" } ) ; return b . on ( BI . MultiDateCombo . EVENT _ERROR , function ( ) { a . _clearTitle ( ) , a . element . removeClass ( a . constants . timeErrorCls ) , a . fireEvent ( BI . TimeInterval . EVENT _ERROR ) } ) , b . on ( BI . MultiDateCombo . EVENT _VALID , function ( ) { BI . Bubbles . hide ( "error" ) ; var b = a . left . getKey ( ) , c = a . right . getKey ( ) ; a . _check ( b , c ) && a . _compare ( b , c ) ? ( a . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , a . element . addClass ( a . constants . timeErrorCls ) , BI . Bubbles . show ( "error" , BI . i18nText ( "BI-Time_Interval_Error_Text" ) , a , { offsetStyle : "center" } ) , a . fireEvent ( BI . TimeInterval . EVENT _ERROR ) ) : ( a . _clearTitle ( ) , a . element . removeClass ( a . constants . timeErrorCls ) ) } ) , b . on ( BI . MultiDateCombo . EVENT _FOCUS , function ( ) { BI . Bubbles . hide ( "error" ) ; var b = a . left . getKey ( ) , c = a . right . getKey ( ) ; a . _check ( b , c ) && a . _compare ( b , c ) ? ( a . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , a . element . addClass ( a . constants . timeErrorCls ) , BI . Bubbles . show ( "error" , BI . i18nText ( "BI-Time_Interval_Error_Text" ) , a , { offsetStyle : "center" } ) , a . fireEvent ( BI . TimeInterval . EVENT _ERROR ) ) : ( a . _clearTitle ( ) , a . element . removeClass ( a . constants . timeErrorCls ) ) } ) , b . on ( BI . MultiDateCombo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . left . hidePopupView ( ) , a . right . hidePopupView ( ) } ) , b . on ( BI . MultiDateCombo . EVENT _CONFIRM , function ( ) { BI . Bubbles . hide ( "error" ) ; var b = a . left . getKey ( ) , c = a . right . getKey ( ) ; a . _check ( b , c ) && a . _compare ( b , c ) ? ( a . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , a . element . addClass ( a . constants . timeErrorCls ) , a . fireEvent ( BI . TimeInterval . EVENT _ERROR ) ) : ( a . _clearTitle ( ) , a . element . removeClass ( a . constants . timeErrorCls ) , a . fireEvent ( BI . TimeInterval . EVENT _CHANGE ) ) } ) , b } , _dateCheck : function ( a ) { return Date . parseDateTime ( a , "%Y-%x-%d" ) . print ( "%Y-%x-%d" ) == a || Date . parseDateTime ( a , "%Y-%X-%d" ) . print ( "%Y-%X-%d" ) == a || Date . parseDateTime ( a , "%Y-%x-%e" ) . print ( "%Y-%x-%e" ) == a || Date . parseDateTime ( a , "%Y-%X-%e" ) . print ( "%Y-%X-%e" ) == a } , _checkVoid : function ( a ) { return ! Date . checkVoid ( a . year , a . month , a . day , this . constants . DATE _MIN _VALUE , this . constants . DATE _MAX _VALUE ) [ 0 ] } , _check : function ( a , b ) { var c = a . match ( /\d+/g ) , d = b . match ( /\d+/g ) ; return this . _dateCheck ( a ) && Date . checkLegal ( a ) && this . _checkVoid ( { year : c [ 0 ] , month : c [ 1 ] , day : c [ 2 ] } ) && this . _dateCheck ( b ) && Date . checkLegal ( b ) && this . _checkVoid ( { year : d [ 0 ] , month : d [ 1 ] , day : d [ 2 ] } ) } , _compare : function ( a , b ) { return a = Date . parseDateTime ( a , "%Y-%X-%d" ) . print ( "%Y-%X-%d" ) , b = Date . parseDateTime ( b , "%Y-%X-%d" ) . print ( "%Y-%X-%d" ) , BI . isNotNull ( a ) && BI . isNotNull ( b ) && a > b } , _setTitle : function ( a ) { this . left . setTitle ( a ) , this . right . setTitle ( a ) , this . label . setTitle ( a ) } , _clearTitle : function ( ) { this . left . setTitle ( "" ) , this . right . setTitle ( "" ) , this . label . setTitle ( "" ) } , setValue : function ( a ) { a = a || { } , this . left . setValue ( a . start ) , this . right . setValue ( a . end ) } , getValue : function ( ) { return { start : this . left . getValue ( ) , end : this . right . getValue ( ) } } } ) , BI . TimeInterval . EVENT _VALID = "EVENT_VALID" , BI . TimeInterval . EVENT _ERROR = "EVENT_ERROR" , BI . TimeInterval . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.time_interval" , BI . TimeInterval ) , BI . YearCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . YearCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-year-combo" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" , height : 25 } ) } , _init : function ( ) { BI . YearCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . storeValue = "" , this . trigger = BI . createWidget ( { type : "bi.year_trigger" , min : b . min , max : b . max } ) , this . trigger . on ( BI . YearTrigger . EVENT _FOCUS , function ( ) { a . storeValue = this . getKey ( ) } ) , this . trigger . on ( BI . YearTrigger . EVENT _START , function ( ) { a . combo . isViewVisible ( ) && a . combo . hideView ( ) } ) , this . trigger . on ( BI . YearTrigger . EVENT _STOP , function ( ) { a . combo . showView ( ) } ) , this . trigger . on ( BI . YearTrigger . EVENT _ERROR , function ( ) { a . combo . isViewVisible ( ) && a . combo . hideView ( ) } ) , this . trigger . on ( BI . YearTrigger . EVENT _CONFIRM , function ( ) { a . combo . isViewVisible ( ) || ( this . getKey ( ) && this . getKey ( ) !== a . storeValue ? a . setValue ( this . getKey