2013-01-03 11:53:00 -05:00
/ * !
* jQuery JavaScript Library v1 . 8.1
* http : //jquery.com/
*
* Includes Sizzle . js
* http : //sizzlejs.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
* http : //jquery.org/license
*
* Date : Thu Aug 30 2012 17 : 17 : 22 GMT - 0400 ( Eastern Daylight Time )
* /
2013-01-03 18:21:46 -05:00
function BestInPlaceEditor ( e ) { this . element = e , this . initOptions ( ) , this . bindForm ( ) , this . initNil ( ) , jQuery ( this . activator ) . bind ( "click" , { editor : this } , this . clickHandler ) } function openAnalyze ( ) { analyzeOpen = ! 0 , findOpen && closeFind ( ) , organizeOpen && closeOrganize ( ) , $ ( "#sideOptionFind" ) . css ( "z-index" , "8" ) , $ ( "#sideOptionAnalyze, #closeAnalyze" ) . css ( "z-index" , "10" ) , $ ( "#sideOptionOrganize" ) . css ( "z-index" , "8" ) , $ ( "#sideOptionAnalyze" ) . animate ( { width : "100px" , height : "76px" } , 100 ) , $ ( "#closeAnalyze" ) . css ( "display" , "block" ) , $ ( "#sideOptionAnalyze" ) . css ( "cursor" , "default" ) } function closeAnalyze ( ) { analyzeOpen = ! 1 , $ ( "#closeAnalyze" ) . css ( "display" , "none" ) , $ ( "#sideOptionAnalyze" ) . css ( "cursor" , "pointer" ) , $ ( "#sideOptionAnalyze" ) . animate ( { width : "64px" , height : "32px" } , 100 ) } function switchVisible ( e , t ) { categoryVisible [ e ] == 1 ? hideCategory ( e , t ) : categoryVisible [ e ] == 0 && showCategory ( e , t ) } function hideCategory ( e , t ) { t == null && ( t = 500 ) , Mconsole . graph . eachNode ( function ( t ) { t . getData ( "metacode" ) == e && ( t . setData ( "alpha" , . 4 , "end" ) , t . eachAdjacency ( function ( e ) { e . setData ( "alpha" , . 4 , "end" ) } ) ) } ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : t } ) } function showCategory ( e , t ) { t == null && ( t = 500 ) , Mconsole . graph . eachNode ( function ( t ) { t . getData ( "metacode" ) == e && ( t . setData ( "alpha" , 1 , "end" ) , t . eachAdjacency ( function ( e ) { e . setData ( "alpha" , 1 , "end" ) } ) ) } ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : t } ) } function hideAll ( e ) { e == null && ( e = 500 ) , Mconsole . graph . eachNode ( function ( e ) { ! e . getData ( "inCommons" ) && ! e . getData ( "onCanvas" ) && ( e . setData ( "alpha" , . 4 , "end" ) , e . eachAdjacency ( function ( e ) { e . setData ( "alpha" , . 4 , "end" ) } ) ) } ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : e } ) } function showAll ( e ) { e == null && ( e = 500 ) , Mconsole . graph . eachNode ( function ( e ) { e . setData ( "alpha" , 1 , "end" ) , e . eachAdjacency ( function ( e ) { e . setData ( "alpha" , 1 , "end" ) } ) } ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : e } ) } function onCanvasSearch ( e , t , n ) { Mconsole . graph . eachNode ( function ( r ) { e != null ? r . name . indexOf ( e ) !== - 1 && e != "" ? r . setData ( "onCanvas" , ! 0 ) : r . setData ( "onCanvas" , ! 1 ) : t != null ? r . getData ( "inmaps" ) . indexOf ( parseInt ( t ) ) !== - 1 ? r . setData ( "onCanvas" , ! 0 ) : r . setData ( "onCanvas" , ! 1 ) : n != null && ( r . getData ( "userid" ) . toString ( ) == n ? r . setData ( "onCanvas" , ! 0 ) : r . setData ( "onCanvas" , ! 1 ) ) , Mconsole . plot ( ) } ) } function clearCanvas ( ) { Mconsole . graph . eachNode ( function ( e ) { Mconsole . graph . removeNode ( e . id ) , Mconsole . labels . disposeLabel ( e . id ) } ) , Mconsole . plot ( ) } function clearFoundData ( ) { Mconsole . graph . eachNode ( function ( e ) { e . getData ( "inCommons" ) === ! 0 && ( Mconsole . graph . removeNode ( e . id ) , Mconsole . labels . disposeLabel ( e . id ) ) } ) , Mconsole . plot ( ) } function openFind ( ) { findOpen = ! 0 , analyzeOpen && closeAnalyze ( ) , organizeOpen && closeOrganize ( ) , $ ( "#sideOptionFind, #closeFind" ) . css ( "z-index" , "10" ) , $ ( "#sideOptionAnalyze" ) . css ( "z-index" , "9" ) , $ ( "#sideOptionOrganize" ) . css ( "z-index" , "8" ) , firstVal = $ ( '#sideOptionFind option[value="name"]' ) . attr ( "selected" ) , secondVal = $ ( '#sideOptionFind option[value="metacode"]' ) . attr ( "selected" ) , thirdVal = $ ( '#sideOptionFind option[value="map (by name)"]' ) . attr ( "selected" ) , fourthVal = $ ( '#sideOptionFind option[value="mapper (by name)"]' ) . attr ( "selected" ) , firstVal === "selected" || thirdVal === "selected" || fourthVal === "selected" ? $ ( "#sideOptionFind" ) . animate ( { width : "305px" , height : "76px" } , 100 , function ( ) { $ ( "#topic_by_name_input" ) . focus ( ) } ) : secondVal === "selected" ? $ ( "#sideOptionFind" ) . animate ( { width : "380px" , height : "463px" } , 100 , function ( ) { } ) : thirdVal === "selected" ? $ ( "#sideOptionFind" ) . animate ( { width : "305px" , height : "76px" } , 100 , function ( ) { $ ( "#map_by_name_input" ) . focus ( ) } ) : fourthVal === "selected" && $ ( "#sideOptionFind" ) . animate ( { width : "305px" , height : "76px" } , 100 , function ( ) { $ ( "#mapper_by_name_input" ) . focus ( ) } ) , $ ( "#closeFind, #findWhere" ) . css ( "display" , "block" ) , $ ( "#sideOptionFind" ) . css ( "cursor" , "default" ) } function closeFind ( ) { findOpen = ! 1 , Mconsole . graph . eachNode ( function ( e ) { e . setData ( "inCommons" , ! 1 ) , e . setData ( "onCanvas" , ! 1 ) } ) , Mconsole . plot ( ) , $ ( "#closeFind, #findWhere" ) . css ( "display" , "none" ) , $ ( "#sideOptionFind" ) . css ( "cursor" , "pointer" ) , $ ( "#sideOptionFind" ) . animate ( { width :
( e ) ? f . call ( r , e ) : v . merge ( r , e ) ) , r } , inArray : function ( e , t , n ) { var r ; if ( t ) { if ( c ) return c . call ( t , e , n ) ; r = t . length , n = n ? n < 0 ? Math . max ( 0 , r + n ) : n : 0 ; for ( ; n < r ; n ++ ) if ( n in t && t [ n ] === e ) return n } return - 1 } , merge : function ( e , n ) { var r = n . length , i = e . length , s = 0 ; if ( typeof r == "number" ) for ( ; s < r ; s ++ ) e [ i ++ ] = n [ s ] ; else while ( n [ s ] !== t ) e [ i ++ ] = n [ s ++ ] ; return e . length = i , e } , grep : function ( e , t , n ) { var r , i = [ ] , s = 0 , o = e . length ; n = ! ! n ; for ( ; s < o ; s ++ ) r = ! ! t ( e [ s ] , s ) , n !== r && i . push ( e [ s ] ) ; return i } , map : function ( e , n , r ) { var i , s , o = [ ] , u = 0 , a = e . length , f = e instanceof v || a !== t && typeof a == "number" && ( a > 0 && e [ 0 ] && e [ a - 1 ] || a === 0 || v . isArray ( e ) ) ; if ( f ) for ( ; u < a ; u ++ ) i = n ( e [ u ] , u , r ) , i != null && ( o [ o . length ] = i ) ; else for ( s in e ) i = n ( e [ s ] , s , r ) , i != null && ( o [ o . length ] = i ) ; return o . concat . apply ( [ ] , o ) } , guid : 1 , proxy : function ( e , n ) { var r , i , s ; return typeof n == "string" && ( r = e [ n ] , n = e , e = r ) , v . isFunction ( e ) ? ( i = l . call ( arguments , 2 ) , s = function ( ) { return e . apply ( n , i . concat ( l . call ( arguments ) ) ) } , s . guid = e . guid = e . guid || s . guid || v . guid ++ , s ) : t } , access : function ( e , n , r , i , s , o , u ) { var a , f = r == null , l = 0 , c = e . length ; if ( r && typeof r == "object" ) { for ( l in r ) v . access ( e , n , l , r [ l ] , 1 , o , i ) ; s = 1 } else if ( i !== t ) { a = u === t && v . isFunction ( i ) , f && ( a ? ( a = n , n = function ( e , t , n ) { return a . call ( v ( e ) , n ) } ) : ( n . call ( e , i ) , n = null ) ) ; if ( n ) for ( ; l < c ; l ++ ) n ( e [ l ] , r , a ? i . call ( e [ l ] , l , n ( e [ l ] , r ) ) : i , u ) ; s = 1 } return s ? e : f ? n . call ( e ) : c ? n ( e [ 0 ] , r ) : o } , now : function ( ) { return ( new Date ) . getTime ( ) } } ) , v . ready . promise = function ( t ) { if ( ! r ) { r = v . Deferred ( ) ; if ( i . readyState === "complete" ) setTimeout ( v . ready , 1 ) ; else if ( i . addEventListener ) i . addEventListener ( "DOMContentLoaded" , A , ! 1 ) , e . addEventListener ( "load" , v . ready , ! 1 ) ; else { i . attachEvent ( "onreadystatechange" , A ) , e . attachEvent ( "onload" , v . ready ) ; var n = ! 1 ; try { n = e . frameElement == null && i . documentElement } catch ( s ) { } n && n . doScroll && function o ( ) { if ( ! v . isReady ) { try { n . doScroll ( "left" ) } catch ( e ) { return setTimeout ( o , 50 ) } v . ready ( ) } } ( ) } } return r . promise ( t ) } , v . each ( "Boolean Number String Function Array Date RegExp Object" . split ( " " ) , function ( e , t ) { O [ "[object " + t + "]" ] = t . toLowerCase ( ) } ) , n = v ( i ) ; var M = { } ; v . Callbacks = function ( e ) { e = typeof e == "string" ? M [ e ] || _ ( e ) : v . extend ( { } , e ) ; var n , r , i , s , o , u , a = [ ] , f = ! e . once && [ ] , l = function ( t ) { n = e . memory && t , r = ! 0 , u = s || 0 , s = 0 , o = a . length , i = ! 0 ; for ( ; a && u < o ; u ++ ) if ( a [ u ] . apply ( t [ 0 ] , t [ 1 ] ) === ! 1 && e . stopOnFalse ) { n = ! 1 ; break } i = ! 1 , a && ( f ? f . length && l ( f . shift ( ) ) : n ? a = [ ] : c . disable ( ) ) } , c = { add : function ( ) { if ( a ) { var t = a . length ; ( function r ( t ) { v . each ( t , function ( t , n ) { var i = v . type ( n ) ; i === "function" && ( ! e . unique || ! c . has ( n ) ) ? a . push ( n ) : n && n . length && i !== "string" && r ( n ) } ) } ) ( arguments ) , i ? o = a . length : n && ( s = t , l ( n ) ) } return this } , remove : function ( ) { return a && v . each ( arguments , function ( e , t ) { var n ; while ( ( n = v . inArray ( t , a , n ) ) > - 1 ) a . splice ( n , 1 ) , i && ( n <= o && o -- , n <= u && u -- ) } ) , this } , has : function ( e ) { return v . inArray ( e , a ) > - 1 } , empty : function ( ) { return a = [ ] , this } , disable : function ( ) { return a = f = n = t , this } , disabled : function ( ) { return ! a } , lock : function ( ) { return f = t , n || c . disable ( ) , this } , locked : function ( ) { return ! f } , fireWith : function ( e , t ) { return t = t || [ ] , t = [ e , t . slice ? t . slice ( ) : t ] , a && ( ! r || f ) && ( i ? f . push ( t ) : l ( t ) ) , this } , fire : function ( ) { return c . fireWith ( this , arguments ) , this } , fired : function ( ) { return ! ! r } } ; return c } , v . extend ( { Deferred : function ( e ) { var t = [ [ "resolve" , "done" , v . Callbacks ( "once memory" ) , "resolved" ] , [ "reject" , "fail" , v . Callbacks ( "once memory" ) , "rejected" ] , [ "notify" , "progress" , v . Callbacks ( "memory" ) ] ] , n = "pending" , r = { state : function ( ) { return n } , always : function ( ) { return i . done ( arguments ) . fail ( arguments ) , this } , then : function ( ) { var e = arguments ; return v . Deferred ( function ( n ) { v . each ( t , function ( t , r ) { var s = r [ 0 ] , o = e [ t ] ; i [ r [ 1 ] ] ( v . isFunction ( o ) ? function ( ) { var e = o . apply ( this , arguments ) ; e && v . isFunction ( e . promise ) ? e . promise ( ) . done ( n . resolve ) . fail ( n . reject ) . progress ( n . notify ) : n [ s + "With" ] ( this === i ? n : this , [ e ] ) } : n [ s ] ) } ) , e = null } ) . promise ( ) } , promise : function ( e ) { return typeof e == "object" ? v . extend ( e , r ) : r } } , i = { } ; return r . pipe = r . then , v . each ( t , function ( e , s ) { var o = s [ 2 ] , u = s [ 3 ] ; r [ s [ 1 ] ] = o . add , u && o . add ( function ( ) { n = u } , t [ e ^ 1 ] [ 2 ] . disable , t [ 2 ] [ 2 ] . lock ) , i [ s [ 0 ] ] = o . fire , i [ s [ 0 ] + "With" ] = o . fireWith } ) , r . promise ( i ) , e && e . call ( i , i ) , i } , when : function ( e ) { var t = 0 , n = l . call ( arguments ) , r = n . length , i = r !== 1 || e && v . isFunction ( e . promise ) ? r : 0 , s = i === 1 ? e : v . Deferred ( ) , o = function ( e , t , n ) { return f
( ) ] ; return a || Y . error ( t ) , ( e || ! ( u = i ) ) && ut ( e || "*" , r , u = [ ] , i ) , u . length > 0 ? a ( u , n , o ) : [ ] } function ft ( e , n , r , i ) { var s , o , u , a , f , l , c , h , p , d , v , m , g , y = 0 , b = e . length , E = W . POS , S = new RegExp ( "^" + E . source + "(?!" + C + ")" , "i" ) , x = function ( ) { var e = 1 , n = arguments . length - 2 ; for ( ; e < n ; e ++ ) arguments [ e ] === t && ( p [ e ] = t ) } ; for ( ; y < b ; y ++ ) { s = e [ y ] , o = "" , h = i ; for ( u = 0 , a = s . length ; u < a ; u ++ ) { f = s [ u ] , l = f . string ; if ( f . part === "PSEUDO" ) { E . exec ( "" ) , c = 0 ; while ( p = E . exec ( l ) ) { d = ! 0 , v = E . lastIndex = p . index + p [ 0 ] . length ; if ( v > c ) { o += l . slice ( c , p . index ) , c = v , m = [ n ] , H . test ( o ) && ( h && ( m = h ) , h = i ) ; if ( g = q . test ( o ) ) o = o . slice ( 0 , - 5 ) . replace ( H , "$&*" ) , c ++ ; p . length > 1 && p [ 0 ] . replace ( S , x ) , h = at ( o , p [ 1 ] , p [ 2 ] , m , h , g ) } o = "" } } d || ( o += l ) , d = ! 1 } o ? H . test ( o ) ? ut ( o , h || [ n ] , r , i ) : Y ( o , n , r , i ? i . concat ( h ) : h ) : w . apply ( r , h ) } return b === 1 ? r : Y . uniqueSort ( r ) } function lt ( e , t , i , o , u ) { e = e . replace ( D , "$1" ) ; var a , l , c , h , p , d , v , m , g , y , E = nt ( e , t , u ) , S = t . nodeType ; if ( W . POS . test ( e ) ) return ft ( E , t , i , o ) ; if ( o ) a = b . call ( o , 0 ) ; else if ( E . length === 1 ) { if ( ( d = b . call ( E [ 0 ] , 0 ) ) . length > 2 && ( v = d [ 0 ] ) . part === "ID" && S === 9 && ! u && s . relative [ d [ 1 ] . part ] ) { t = s . find . ID ( v . captures [ 0 ] . replace ( z , "" ) , t , u ) [ 0 ] ; if ( ! t ) return i ; e = e . slice ( d . shift ( ) . string . length ) } g = ( E = I . exec ( d [ 0 ] . string ) ) && ! E . index && t . parentNode || t , m = "" ; for ( p = d . length - 1 ; p >= 0 ; p -- ) { v = d [ p ] , y = v . part , m = v . string + m ; if ( s . relative [ y ] ) break ; if ( s . order . test ( y ) ) { a = s . find [ y ] ( v . captures [ 0 ] . replace ( z , "" ) , g , u ) ; if ( a == null ) continue ; e = e . slice ( 0 , e . length - m . length ) + m . replace ( W [ y ] , "" ) , e || w . apply ( i , b . call ( a , 0 ) ) ; break } } } if ( e ) { l = f ( e , t , u ) , n = l . dirruns ++ , a == null && ( a = s . find . TAG ( "*" , I . test ( e ) && t . parentNode || t ) ) ; for ( p = 0 ; h = a [ p ] ; p ++ ) r = l . runs ++ , l ( h ) && i . push ( h ) } return i } var n , r , i , s , o , u , a , f , l , c , h = ! 0 , p = "undefined" , d = ( "sizcache" + Math . random ( ) ) . replace ( "." , "" ) , m = e . document , g = m . documentElement , y = 0 , b = [ ] . slice , w = [ ] . push , E = function ( e , t ) { return e [ d ] = t || ! 0 , e } , S = function ( ) { var e = { } , t = [ ] ; return E ( function ( n , r ) { return t . push ( n ) > s . cacheLength && delete e [ t . shift ( ) ] , e [ n ] = r } , e ) } , x = S ( ) , T = S ( ) , N = S ( ) , C = "[\\x20\\t\\r\\n\\f]" , k = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+" , L = k . replace ( "w" , "w#" ) , A = "([*^$|!~]?=)" , O = "\\[" + C + "*(" + k + ")" + C + "*(?:" + A + C + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + L + ")|)|)" + C + "*\\]" , M = ":(" + k + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + O + ")|[^:]|\\\\.)*|.*))\\)|)" , _ = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)" , D = new RegExp ( "^" + C + "+|((?:^|[^\\\\])(?:\\\\.)*)" + C + "+$" , "g" ) , P = new RegExp ( "^" + C + "*," + C + "*" ) , H = new RegExp ( "^" + C + "*([\\x20\\t\\r\\n\\f>+~])" + C + "*" ) , B = new RegExp ( M ) , j = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/ , F = /^:not/ , I = /[\x20\t\r\n\f]*[+~]/ , q = /:not\($/ , R = /h\d/i , U = /input|select|textarea|button/i , z = /\\(?!\\)/g , W = { ID : new RegExp ( "^#(" + k + ")" ) , CLASS : new RegExp ( "^\\.(" + k + ")" ) , NAME : new RegExp ( "^\\[name=['\"]?(" + k + ")['\"]?\\]" ) , TAG : new RegExp ( "^(" + k . replace ( "w" , "w*" ) + ")" ) , ATTR : new RegExp ( "^" + O ) , PSEUDO : new RegExp ( "^" + M ) , CHILD : new RegExp ( "^:(only|nth|last|first)-child(?:\\(" + C + "*(even|odd|(([+-]|)(\\d*)n|)" + C + "*(?:([+-]|)" + C + "*(\\d+)|))" + C + "*\\)|)" , "i" ) , POS : new RegExp ( _ , "ig" ) , needsContext : new RegExp ( "^" + C + "*[>+~]|" + _ , "i" ) } , X = function ( e ) { var t = m . createElement ( "div" ) ; try { return e ( t ) } catch ( n ) { return ! 1 } finally { t = null } } , V = X ( function ( e ) { return e . appendChild ( m . createComment ( "" ) ) , ! e . getElementsByTagName ( "*" ) . length } ) , $ = X ( function ( e ) { return e . innerHTML = "<a href='#'></a>" , e . firstChild && typeof e . firstChild . getAttribute !== p && e . firstChild . getAttribute ( "href" ) === "#" } ) , J = X ( function ( e ) { e . innerHTML = "<select></select>" ; var t = typeof e . lastChild . getAttribute ( "multiple" ) ; return t !== "boolean" && t !== "string" } ) , K = X ( function ( e ) { return e . innerHTML = "<div class='hidden e'></div><div class='hidden'></div>" , ! e . getElementsByClassName || ! e . getElementsByClassName ( "e" ) . length ? ! 1 : ( e . lastChild . className = "e" , e . getElementsByClassName ( "e" ) . length === 2 ) } ) , Q = X ( function ( e ) { e . id = d + 0 , e . innerHTML = "<a name='" + d + "'></a><div name='" + d + "'></div>" , g . insertBefore ( e , g . firstChild ) ; var t = m . getElementsByName && m . getElementsByName ( d ) . length === 2 + m . getElementsByName ( d + 0 ) . length ; return i = ! m . getElementById ( d ) , g . removeChild ( e ) , t } ) ; try { b . call ( g . childNodes , 0 ) [ 0 ] . nodeType } catch ( G ) { b = function ( e ) { var t , n = [ ] ; for ( ; t = this [ e ] ; e ++ ) n . push ( t ) ; return n } } Y . matches = function ( e , t ) { return Y ( e , null , null , t ) } , Y . matchesSelector = functi
) , m . fireWith ( h , [ x , T ] ) , f && ( p . trigger ( "ajaxComplete" , [ x , c ] ) , -- v . active || v . event . trigger ( "ajaxStop" ) ) } typeof e == "object" && ( n = e , e = t ) , n = n || { } ; var r , i , s , o , u , a , f , l , c = v . ajaxSetup ( { } , n ) , h = c . context || c , p = h !== c && ( h . nodeType || h instanceof v ) ? v ( h ) : v . event , d = v . Deferred ( ) , m = v . Callbacks ( "once memory" ) , g = c . statusCode || { } , b = { } , w = { } , E = 0 , S = "canceled" , x = { readyState : 0 , setRequestHeader : function ( e , t ) { if ( ! E ) { var n = e . toLowerCase ( ) ; e = w [ n ] = w [ n ] || e , b [ e ] = t } return this } , getAllResponseHeaders : function ( ) { return E === 2 ? i : null } , getResponseHeader : function ( e ) { var n ; if ( E === 2 ) { if ( ! s ) { s = { } ; while ( n = pn . exec ( i ) ) s [ n [ 1 ] . toLowerCase ( ) ] = n [ 2 ] } n = s [ e . toLowerCase ( ) ] } return n === t ? null : n } , overrideMimeType : function ( e ) { return E || ( c . mimeType = e ) , this } , abort : function ( e ) { return e = e || S , o && o . abort ( e ) , T ( 0 , e ) , this } } ; d . promise ( x ) , x . success = x . done , x . error = x . fail , x . complete = m . add , x . statusCode = function ( e ) { if ( e ) { var t ; if ( E < 2 ) for ( t in e ) g [ t ] = [ g [ t ] , e [ t ] ] ; else t = e [ x . status ] , x . always ( t ) } return this } , c . url = ( ( e || c . url ) + "" ) . replace ( hn , "" ) . replace ( mn , cn [ 1 ] + "//" ) , c . dataTypes = v . trim ( c . dataType || "*" ) . toLowerCase ( ) . split ( y ) , c . crossDomain == null && ( a = wn . exec ( c . url . toLowerCase ( ) ) , c . crossDomain = ! ( ! a || a [ 1 ] == cn [ 1 ] && a [ 2 ] == cn [ 2 ] && ( a [ 3 ] || ( a [ 1 ] === "http:" ? 80 : 443 ) ) == ( cn [ 3 ] || ( cn [ 1 ] === "http:" ? 80 : 443 ) ) ) ) , c . data && c . processData && typeof c . data != "string" && ( c . data = v . param ( c . data , c . traditional ) ) , kn ( Sn , c , n , x ) ; if ( E === 2 ) return x ; f = c . global , c . type = c . type . toUpperCase ( ) , c . hasContent = ! vn . test ( c . type ) , f && v . active ++ === 0 && v . event . trigger ( "ajaxStart" ) ; if ( ! c . hasContent ) { c . data && ( c . url += ( gn . test ( c . url ) ? "&" : "?" ) + c . data , delete c . data ) , r = c . url ; if ( c . cache === ! 1 ) { var N = v . now ( ) , C = c . url . replace ( bn , "$1_=" + N ) ; c . url = C + ( C === c . url ? ( gn . test ( c . url ) ? "&" : "?" ) + "_=" + N : "" ) } } ( c . data && c . hasContent && c . contentType !== ! 1 || n . contentType ) && x . setRequestHeader ( "Content-Type" , c . contentType ) , c . ifModified && ( r = r || c . url , v . lastModified [ r ] && x . setRequestHeader ( "If-Modified-Since" , v . lastModified [ r ] ) , v . etag [ r ] && x . setRequestHeader ( "If-None-Match" , v . etag [ r ] ) ) , x . setRequestHeader ( "Accept" , c . dataTypes [ 0 ] && c . accepts [ c . dataTypes [ 0 ] ] ? c . accepts [ c . dataTypes [ 0 ] ] + ( c . dataTypes [ 0 ] !== "*" ? ", " + Tn + "; q=0.01" : "" ) : c . accepts [ "*" ] ) ; for ( l in c . headers ) x . setRequestHeader ( l , c . headers [ l ] ) ; if ( ! c . beforeSend || c . beforeSend . call ( h , x , c ) !== ! 1 && E !== 2 ) { S = "abort" ; for ( l in { success : 1 , error : 1 , complete : 1 } ) x [ l ] ( c [ l ] ) ; o = kn ( xn , c , n , x ) ; if ( ! o ) T ( - 1 , "No Transport" ) ; else { x . readyState = 1 , f && p . trigger ( "ajaxSend" , [ x , c ] ) , c . async && c . timeout > 0 && ( u = setTimeout ( function ( ) { x . abort ( "timeout" ) } , c . timeout ) ) ; try { E = 1 , o . send ( b , T ) } catch ( k ) { if ( ! ( E < 2 ) ) throw k ; T ( - 1 , k ) } } return x } return x . abort ( ) } , active : 0 , lastModified : { } , etag : { } } ) ; var Mn = [ ] , _n = /\?/ , Dn = /(=)\?(?=&|$)|\?\?/ , Pn = v . now ( ) ; v . ajaxSetup ( { jsonp : "callback" , jsonpCallback : function ( ) { var e = Mn . pop ( ) || v . expando + "_" + Pn ++ ; return this [ e ] = ! 0 , e } } ) , v . ajaxPrefilter ( "json jsonp" , function ( n , r , i ) { var s , o , u , a = n . data , f = n . url , l = n . jsonp !== ! 1 , c = l && Dn . test ( f ) , h = l && ! c && typeof a == "string" && ! ( n . contentType || "" ) . indexOf ( "application/x-www-form-urlencoded" ) && Dn . test ( a ) ; if ( n . dataTypes [ 0 ] === "jsonp" || c || h ) return s = n . jsonpCallback = v . isFunction ( n . jsonpCallback ) ? n . jsonpCallback ( ) : n . jsonpCallback , o = e [ s ] , c ? n . url = f . replace ( Dn , "$1" + s ) : h ? n . data = a . replace ( Dn , "$1" + s ) : l && ( n . url += ( _n . test ( f ) ? "&" : "?" ) + n . jsonp + "=" + s ) , n . converters [ "script json" ] = function ( ) { return u || v . error ( s + " was not called" ) , u [ 0 ] } , n . dataTypes [ 0 ] = "json" , e [ s ] = function ( ) { u = arguments } , i . always ( function ( ) { e [ s ] = o , n [ s ] && ( n . jsonpCallback = r . jsonpCallback , Mn . push ( s ) ) , u && v . isFunction ( o ) && o ( u [ 0 ] ) , u = o = t } ) , "script" } ) , v . ajaxSetup ( { accepts : { script : "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" } , contents : { script : /javascript|ecmascript/ } , converters : { "text script" : function ( e ) { return v . globalEval ( e ) , e } } } ) , v . ajaxPrefilter ( "script" , function ( e ) { e . cache === t && ( e . cache = ! 1 ) , e . crossDomain && ( e . type = "GET" , e . global = ! 1 ) } ) , v . ajaxTransport ( "script" , function ( e ) { if ( e . crossDomain ) { var n , r = i . head || i . getElementsByTagName ( "head" ) [ 0 ] || i . documentElement ; return { send : function ( s , o ) { n = i . createElement ( "script" ) , n . async = "async" , e . scriptCharset && ( n . charset = e . scriptCharset ) , n . src = e . url , n . onload = n . onreadystatechange = function ( e , i ) { if ( i || ! n . readyState || / l o a d e d | c o m p l e t
[ 0 ] != this . element [ 0 ] && ! this . cancelHelperRemoval && this . helper . remove ( ) , this . helper = null , this . cancelHelperRemoval = ! 1 } , _trigger : function ( t , n , r ) { return r = r || this . _uiHash ( ) , e . ui . plugin . call ( this , t , [ n , r ] ) , t == "drag" && ( this . positionAbs = this . _convertPositionTo ( "absolute" ) ) , e . Widget . prototype . _trigger . call ( this , t , n , r ) } , plugins : { } , _uiHash : function ( e ) { return { helper : this . helper , position : this . position , originalPosition : this . originalPosition , offset : this . positionAbs } } } ) , e . extend ( e . ui . draggable , { version : "1.8.23" } ) , e . ui . plugin . add ( "draggable" , "connectToSortable" , { start : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) , i = r . options , s = e . extend ( { } , n , { item : r . element } ) ; r . sortables = [ ] , e ( i . connectToSortable ) . each ( function ( ) { var n = e . data ( this , "sortable" ) ; n && ! n . options . disabled && ( r . sortables . push ( { instance : n , shouldRevert : n . options . revert } ) , n . refreshPositions ( ) , n . _trigger ( "activate" , t , s ) ) } ) } , stop : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) , i = e . extend ( { } , n , { item : r . element } ) ; e . each ( r . sortables , function ( ) { this . instance . isOver ? ( this . instance . isOver = 0 , r . cancelHelperRemoval = ! 0 , this . instance . cancelHelperRemoval = ! 1 , this . shouldRevert && ( this . instance . options . revert = ! 0 ) , this . instance . _mouseStop ( t ) , this . instance . options . helper = this . instance . options . _helper , r . options . helper == "original" && this . instance . currentItem . css ( { top : "auto" , left : "auto" } ) ) : ( this . instance . cancelHelperRemoval = ! 1 , this . instance . _trigger ( "deactivate" , t , i ) ) } ) } , drag : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) , i = this , s = function ( t ) { var n = this . offset . click . top , r = this . offset . click . left , i = this . positionAbs . top , s = this . positionAbs . left , o = t . height , u = t . width , a = t . top , f = t . left ; return e . ui . isOver ( i + n , s + r , a , f , o , u ) } ; e . each ( r . sortables , function ( s ) { this . instance . positionAbs = r . positionAbs , this . instance . helperProportions = r . helperProportions , this . instance . offset . click = r . offset . click , this . instance . _intersectsWith ( this . instance . containerCache ) ? ( this . instance . isOver || ( this . instance . isOver = 1 , this . instance . currentItem = e ( i ) . clone ( ) . removeAttr ( "id" ) . appendTo ( this . instance . element ) . data ( "sortable-item" , ! 0 ) , this . instance . options . _helper = this . instance . options . helper , this . instance . options . helper = function ( ) { return n . helper [ 0 ] } , t . target = this . instance . currentItem [ 0 ] , this . instance . _mouseCapture ( t , ! 0 ) , this . instance . _mouseStart ( t , ! 0 , ! 0 ) , this . instance . offset . click . top = r . offset . click . top , this . instance . offset . click . left = r . offset . click . left , this . instance . offset . parent . left -= r . offset . parent . left - this . instance . offset . parent . left , this . instance . offset . parent . top -= r . offset . parent . top - this . instance . offset . parent . top , r . _trigger ( "toSortable" , t ) , r . dropped = this . instance . element , r . currentItem = r . element , this . instance . fromOutside = r ) , this . instance . currentItem && this . instance . _mouseDrag ( t ) ) : this . instance . isOver && ( this . instance . isOver = 0 , this . instance . cancelHelperRemoval = ! 0 , this . instance . options . revert = ! 1 , this . instance . _trigger ( "out" , t , this . instance . _uiHash ( this . instance ) ) , this . instance . _mouseStop ( t , ! 0 ) , this . instance . options . helper = this . instance . options . _helper , this . instance . currentItem . remove ( ) , this . instance . placeholder && this . instance . placeholder . remove ( ) , r . _trigger ( "fromSortable" , t ) , r . dropped = ! 1 ) } ) } } ) , e . ui . plugin . add ( "draggable" , "cursor" , { start : function ( t , n ) { var r = e ( "body" ) , i = e ( this ) . data ( "draggable" ) . options ; r . css ( "cursor" ) && ( i . _cursor = r . css ( "cursor" ) ) , r . css ( "cursor" , i . cursor ) } , stop : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) . options ; r . _cursor && e ( "body" ) . css ( "cursor" , r . _cursor ) } } ) , e . ui . plugin . add ( "draggable" , "opacity" , { start : function ( t , n ) { var r = e ( n . helper ) , i = e ( this ) . data ( "draggable" ) . options ; r . css ( "opacity" ) && ( i . _opacity = r . css ( "opacity" ) ) , r . css ( "opacity" , i . opacity ) } , stop : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) . options ; r . _opacity && e ( n . helper ) . css ( "opacity" , r . _opacity ) } } ) , e . ui . plugin . add ( "draggable" , "scroll" , { start : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) ; r . scrollParent [ 0 ] != document && r . scrollParent [ 0 ] . tagName != "HTML" && ( r . overflowOffset = r . scrollParent . offset ( ) ) } , drag : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) , i = r . options , s = ! 1 ; if ( r . scrollParent [ 0 ] != document && r . scrollParent [ 0 ] . tagName != "HTML" ) { if ( ! i . axis || i . axis != "x" ) r . overflowOffset . top + r . scr
{ unselecting : r . element } ) ) } ) , e ( t . target ) . parents ( ) . andSelf ( ) . each ( function ( ) { var r = e . data ( this , "selectable-item" ) ; if ( r ) { var i = ! t . metaKey && ! t . ctrlKey || ! r . $element . hasClass ( "ui-selected" ) ; return r . $element . removeClass ( i ? "ui-unselecting" : "ui-selected" ) . addClass ( i ? "ui-selecting" : "ui-unselecting" ) , r . unselecting = ! i , r . selecting = i , r . selected = i , i ? n . _trigger ( "selecting" , t , { selecting : r . element } ) : n . _trigger ( "unselecting" , t , { unselecting : r . element } ) , ! 1 } } ) } , _mouseDrag : function ( t ) { var n = this ; this . dragged = ! 0 ; if ( this . options . disabled ) return ; var r = this . options , i = this . opos [ 0 ] , s = this . opos [ 1 ] , o = t . pageX , u = t . pageY ; if ( i > o ) { var a = o ; o = i , i = a } if ( s > u ) { var a = u ; u = s , s = a } return this . helper . css ( { left : i , top : s , width : o - i , height : u - s } ) , this . selectees . each ( function ( ) { var a = e . data ( this , "selectable-item" ) ; if ( ! a || a . element == n . element [ 0 ] ) return ; var f = ! 1 ; r . tolerance == "touch" ? f = ! ( a . left > o || a . right < i || a . top > u || a . bottom < s ) : r . tolerance == "fit" && ( f = a . left > i && a . right < o && a . top > s && a . bottom < u ) , f ? ( a . selected && ( a . $element . removeClass ( "ui-selected" ) , a . selected = ! 1 ) , a . unselecting && ( a . $element . removeClass ( "ui-unselecting" ) , a . unselecting = ! 1 ) , a . selecting || ( a . $element . addClass ( "ui-selecting" ) , a . selecting = ! 0 , n . _trigger ( "selecting" , t , { selecting : a . element } ) ) ) : ( a . selecting && ( ( t . metaKey || t . ctrlKey ) && a . startselected ? ( a . $element . removeClass ( "ui-selecting" ) , a . selecting = ! 1 , a . $element . addClass ( "ui-selected" ) , a . selected = ! 0 ) : ( a . $element . removeClass ( "ui-selecting" ) , a . selecting = ! 1 , a . startselected && ( a . $element . addClass ( "ui-unselecting" ) , a . unselecting = ! 0 ) , n . _trigger ( "unselecting" , t , { unselecting : a . element } ) ) ) , a . selected && ! t . metaKey && ! t . ctrlKey && ! a . startselected && ( a . $element . removeClass ( "ui-selected" ) , a . selected = ! 1 , a . $element . addClass ( "ui-unselecting" ) , a . unselecting = ! 0 , n . _trigger ( "unselecting" , t , { unselecting : a . element } ) ) ) } ) , ! 1 } , _mouseStop : function ( t ) { var n = this ; this . dragged = ! 1 ; var r = this . options ; return e ( ".ui-unselecting" , this . element [ 0 ] ) . each ( function ( ) { var r = e . data ( this , "selectable-item" ) ; r . $element . removeClass ( "ui-unselecting" ) , r . unselecting = ! 1 , r . startselected = ! 1 , n . _trigger ( "unselected" , t , { unselected : r . element } ) } ) , e ( ".ui-selecting" , this . element [ 0 ] ) . each ( function ( ) { var r = e . data ( this , "selectable-item" ) ; r . $element . removeClass ( "ui-selecting" ) . addClass ( "ui-selected" ) , r . selecting = ! 1 , r . selected = ! 0 , r . startselected = ! 0 , n . _trigger ( "selected" , t , { selected : r . element } ) } ) , this . _trigger ( "stop" , t ) , this . helper . remove ( ) , ! 1 } } ) , e . extend ( e . ui . selectable , { version : "1.8.23" } ) } ( jQuery ) , function ( e , t ) { e . widget ( "ui.sortable" , e . ui . mouse , { widgetEventPrefix : "sort" , ready : ! 1 , options : { appendTo : "parent" , axis : ! 1 , connectWith : ! 1 , containment : ! 1 , cursor : "auto" , cursorAt : ! 1 , dropOnEmpty : ! 0 , forcePlaceholderSize : ! 1 , forceHelperSize : ! 1 , grid : ! 1 , handle : ! 1 , helper : "original" , items : "> *" , opacity : ! 1 , placeholder : ! 1 , revert : ! 1 , scroll : ! 0 , scrollSensitivity : 20 , scrollSpeed : 20 , scope : "default" , tolerance : "intersect" , zIndex : 1e3 } , _create : function ( ) { var e = this . options ; this . containerCache = { } , this . element . addClass ( "ui-sortable" ) , this . refresh ( ) , this . floating = this . items . length ? e . axis === "x" || /left|right/ . test ( this . items [ 0 ] . item . css ( "float" ) ) || /inline|table-cell/ . test ( this . items [ 0 ] . item . css ( "display" ) ) : ! 1 , this . offset = this . element . offset ( ) , this . _mouseInit ( ) , this . ready = ! 0 } , destroy : function ( ) { e . Widget . prototype . destroy . call ( this ) , this . element . removeClass ( "ui-sortable ui-sortable-disabled" ) , this . _mouseDestroy ( ) ; for ( var t = this . items . length - 1 ; t >= 0 ; t -- ) this . items [ t ] . item . removeData ( this . widgetName + "-item" ) ; return this } , _setOption : function ( t , n ) { t === "disabled" ? ( this . options [ t ] = n , this . widget ( ) [ n ? "addClass" : "removeClass" ] ( "ui-sortable-disabled" ) ) : e . Widget . prototype . _setOption . apply ( this , arguments ) } , _mouseCapture : function ( t , n ) { var r = this ; if ( this . reverting ) return ! 1 ; if ( this . options . disabled || this . options . type == "static" ) return ! 1 ; this . _refreshItems ( t ) ; var i = null , s = this , o = e ( t . target ) . parents ( ) . each ( function ( ) { if ( e . data ( this , r . widgetName + "-item" ) == s ) return i = e ( this ) , ! 1 } ) ; e . data ( t . target , r . widgetName + "-item" ) == s && ( i = e ( t . target ) ) ; if ( ! i ) return ! 1 ; if ( this . options . handle && ! n ) { var u = ! 1 ; e ( this . options . handle , i ) . find ( "*" ) . andSelf ( ) . each ( function ( ) { this == t . target && ( u = ! 0 ) } ) ; if ( ! u ) return ! 1 } return this .
. _show . apply ( this , arguments ) ; var t = l . apply ( this , arguments ) ; return t [ 1 ] . mode = "show" , this . effect . apply ( this , t ) } , _hide : e . fn . hide , hide : function ( e ) { if ( c ( e ) ) return this . _hide . apply ( this , arguments ) ; var t = l . apply ( this , arguments ) ; return t [ 1 ] . mode = "hide" , this . effect . apply ( this , t ) } , _ _toggle : e . fn . toggle , toggle : function ( t ) { if ( c ( t ) || typeof t == "boolean" || e . isFunction ( t ) ) return this . _ _toggle . apply ( this , arguments ) ; var n = l . apply ( this , arguments ) ; return n [ 1 ] . mode = "toggle" , this . effect . apply ( this , n ) } , cssUnit : function ( t ) { var n = this . css ( t ) , r = [ ] ; return e . each ( [ "em" , "px" , "%" , "pt" ] , function ( e , t ) { n . indexOf ( t ) > 0 && ( r = [ parseFloat ( n ) , t ] ) } ) , r } } ) ; var h = { } ; e . each ( [ "Quad" , "Cubic" , "Quart" , "Quint" , "Expo" ] , function ( e , t ) { h [ t ] = function ( t ) { return Math . pow ( t , e + 2 ) } } ) , e . extend ( h , { Sine : function ( e ) { return 1 - Math . cos ( e * Math . PI / 2 ) } , Circ : function ( e ) { return 1 - Math . sqrt ( 1 - e * e ) } , Elastic : function ( e ) { return e === 0 || e === 1 ? e : - Math . pow ( 2 , 8 * ( e - 1 ) ) * Math . sin ( ( ( e - 1 ) * 80 - 7.5 ) * Math . PI / 15 ) } , Back : function ( e ) { return e * e * ( 3 * e - 2 ) } , Bounce : function ( e ) { var t , n = 4 ; while ( e < ( ( t = Math . pow ( 2 , -- n ) ) - 1 ) / 11 ) ; return 1 / Math . pow ( 4 , 3 - n ) - 7.5625 * Math . pow ( ( t * 3 - 2 ) / 22 - e , 2 ) } } ) , e . each ( h , function ( t , n ) { e . easing [ "easeIn" + t ] = n , e . easing [ "easeOut" + t ] = function ( e ) { return 1 - n ( 1 - e ) } , e . easing [ "easeInOut" + t ] = function ( e ) { return e < . 5 ? n ( e * 2 ) / 2 : n ( e * - 2 + 2 ) / - 2 + 1 } } ) } ( jQuery ) , function ( e , t ) { e . effects . blind = function ( t ) { return this . queue ( function ( ) { var n = e ( this ) , r = [ "position" , "top" , "bottom" , "left" , "right" ] , i = e . effects . setMode ( n , t . options . mode || "hide" ) , s = t . options . direction || "vertical" ; e . effects . save ( n , r ) , n . show ( ) ; var u = e . effects . createWrapper ( n ) . css ( { overflow : "hidden" } ) , a = s == "vertical" ? "height" : "width" , f = s == "vertical" ? u . height ( ) : u . width ( ) ; i == "show" && u . css ( a , 0 ) ; var l = { } ; l [ a ] = i == "show" ? f : 0 , u . animate ( l , t . duration , t . options . easing , function ( ) { i == "hide" && n . hide ( ) , e . effects . restore ( n , r ) , e . effects . removeWrapper ( n ) , t . callback && t . callback . apply ( n [ 0 ] , arguments ) , n . dequeue ( ) } ) } ) } } ( jQuery ) , function ( e , t ) { e . effects . bounce = function ( t ) { return this . queue ( function ( ) { var n = e ( this ) , r = [ "position" , "top" , "bottom" , "left" , "right" ] , i = e . effects . setMode ( n , t . options . mode || "effect" ) , s = t . options . direction || "up" , u = t . options . distance || 20 , a = t . options . times || 5 , f = t . duration || 250 ; /show|hide/ . test ( i ) && r . push ( "opacity" ) , e . effects . save ( n , r ) , n . show ( ) , e . effects . createWrapper ( n ) ; var l = s == "up" || s == "down" ? "top" : "left" , c = s == "up" || s == "left" ? "pos" : "neg" , u = t . options . distance || ( l == "top" ? n . outerHeight ( ! 0 ) / 3 : n . outerWidth ( ! 0 ) / 3 ) ; i == "show" && n . css ( "opacity" , 0 ) . css ( l , c == "pos" ? - u : u ) , i == "hide" && ( u /= a * 2 ) , i != "hide" && a -- ; if ( i == "show" ) { var h = { opacity : 1 } ; h [ l ] = ( c == "pos" ? "+=" : "-=" ) + u , n . animate ( h , f / 2 , t . options . easing ) , u /= 2 , a -- } for ( var p = 0 ; p < a ; p ++ ) { var d = { } , v = { } ; d [ l ] = ( c == "pos" ? "-=" : "+=" ) + u , v [ l ] = ( c == "pos" ? "+=" : "-=" ) + u , n . animate ( d , f / 2 , t . options . easing ) . animate ( v , f / 2 , t . options . easing ) , u = i == "hide" ? u * 2 : u / 2 } if ( i == "hide" ) { var h = { opacity : 0 } ; h [ l ] = ( c == "pos" ? "-=" : "+=" ) + u , n . animate ( h , f / 2 , t . options . easing , function ( ) { n . hide ( ) , e . effects . restore ( n , r ) , e . effects . removeWrapper ( n ) , t . callback && t . callback . apply ( this , arguments ) } ) } else { var d = { } , v = { } ; d [ l ] = ( c == "pos" ? "-=" : "+=" ) + u , v [ l ] = ( c == "pos" ? "+=" : "-=" ) + u , n . animate ( d , f / 2 , t . options . easing ) . animate ( v , f / 2 , t . options . easing , function ( ) { e . effects . restore ( n , r ) , e . effects . removeWrapper ( n ) , t . callback && t . callback . apply ( this , arguments ) } ) } n . queue ( "fx" , function ( ) { n . dequeue ( ) } ) , n . dequeue ( ) } ) } } ( jQuery ) , function ( e , t ) { e . effects . clip = function ( t ) { return this . queue ( function ( ) { var n = e ( this ) , r = [ "position" , "top" , "bottom" , "left" , "right" , "height" , "width" ] , i = e . effects . setMode ( n , t . options . mode || "hide" ) , s = t . options . direction || "vertical" ; e . effects . save ( n , r ) , n . show ( ) ; var u = e . effects . createWrapper ( n ) . css ( { overflow : "hidden" } ) , a = n [ 0 ] . tagName == "IMG" ? u : n , f = { size : s == "vertical" ? "height" : "width" , position : s == "vertical" ? "top" : "left" } , l = s == "vertical" ? a . height ( ) : a . width ( ) ; i == "show" && ( a . css ( f . size , 0 ) , a . css ( f . position , l / 2 ) ) ; var c = { } ; c [ f . size ] = i == "show" ? l : 0 , c [ f . position ] = i == "show" ? 0 : l / 2 , a . animate ( c , { queue : ! 1 , duration : t . duration , easing : t . options . easing , complete : function ( ) { i == "hide" && n . hide ( ) , e . effects . restore ( n , r ) , e . effects . removeWrapper ( n ) , t . callback && t . callback . apply ( n [ 0 ] , arguments ) , n . dequeue ( ) } } ) } ) } } ( jQuery ) , function ( e , t ) { e
( "form" ) . unbind ( "reset.button" ) . bind ( "reset.button" , f ) , typeof this . options . disabled != "boolean" ? this . options . disabled = ! ! this . element . propAttr ( "disabled" ) : this . element . propAttr ( "disabled" , this . options . disabled ) , this . _determineButtonType ( ) , this . hasTitle = ! ! this . buttonElement . attr ( "title" ) ; var t = this , u = this . options , a = this . type === "checkbox" || this . type === "radio" , c = "ui-state-hover" + ( a ? "" : " ui-state-active" ) , h = "ui-state-focus" ; u . label === null && ( u . label = this . buttonElement . html ( ) ) , this . buttonElement . addClass ( o ) . attr ( "role" , "button" ) . bind ( "mouseenter.button" , function ( ) { if ( u . disabled ) return ; e ( this ) . addClass ( "ui-state-hover" ) , this === n && e ( this ) . addClass ( "ui-state-active" ) } ) . bind ( "mouseleave.button" , function ( ) { if ( u . disabled ) return ; e ( this ) . removeClass ( c ) } ) . bind ( "click.button" , function ( e ) { u . disabled && ( e . preventDefault ( ) , e . stopImmediatePropagation ( ) ) } ) , this . element . bind ( "focus.button" , function ( ) { t . buttonElement . addClass ( h ) } ) . bind ( "blur.button" , function ( ) { t . buttonElement . removeClass ( h ) } ) , a && ( this . element . bind ( "change.button" , function ( ) { if ( s ) return ; t . refresh ( ) } ) , this . buttonElement . bind ( "mousedown.button" , function ( e ) { if ( u . disabled ) return ; s = ! 1 , r = e . pageX , i = e . pageY } ) . bind ( "mouseup.button" , function ( e ) { if ( u . disabled ) return ; if ( r !== e . pageX || i !== e . pageY ) s = ! 0 } ) ) , this . type === "checkbox" ? this . buttonElement . bind ( "click.button" , function ( ) { if ( u . disabled || s ) return ! 1 ; e ( this ) . toggleClass ( "ui-state-active" ) , t . buttonElement . attr ( "aria-pressed" , t . element [ 0 ] . checked ) } ) : this . type === "radio" ? this . buttonElement . bind ( "click.button" , function ( ) { if ( u . disabled || s ) return ! 1 ; e ( this ) . addClass ( "ui-state-active" ) , t . buttonElement . attr ( "aria-pressed" , "true" ) ; var n = t . element [ 0 ] ; l ( n ) . not ( n ) . map ( function ( ) { return e ( this ) . button ( "widget" ) [ 0 ] } ) . removeClass ( "ui-state-active" ) . attr ( "aria-pressed" , "false" ) } ) : ( this . buttonElement . bind ( "mousedown.button" , function ( ) { if ( u . disabled ) return ! 1 ; e ( this ) . addClass ( "ui-state-active" ) , n = this , e ( document ) . one ( "mouseup" , function ( ) { n = null } ) } ) . bind ( "mouseup.button" , function ( ) { if ( u . disabled ) return ! 1 ; e ( this ) . removeClass ( "ui-state-active" ) } ) . bind ( "keydown.button" , function ( t ) { if ( u . disabled ) return ! 1 ; ( t . keyCode == e . ui . keyCode . SPACE || t . keyCode == e . ui . keyCode . ENTER ) && e ( this ) . addClass ( "ui-state-active" ) } ) . bind ( "keyup.button" , function ( ) { e ( this ) . removeClass ( "ui-state-active" ) } ) , this . buttonElement . is ( "a" ) && this . buttonElement . keyup ( function ( t ) { t . keyCode === e . ui . keyCode . SPACE && e ( this ) . click ( ) } ) ) , this . _setOption ( "disabled" , u . disabled ) , this . _resetButton ( ) } , _determineButtonType : function ( ) { this . element . is ( ":checkbox" ) ? this . type = "checkbox" : this . element . is ( ":radio" ) ? this . type = "radio" : this . element . is ( "input" ) ? this . type = "input" : this . type = "button" ; if ( this . type === "checkbox" || this . type === "radio" ) { var e = this . element . parents ( ) . filter ( ":last" ) , t = "label[for='" + this . element . attr ( "id" ) + "']" ; this . buttonElement = e . find ( t ) , this . buttonElement . length || ( e = e . length ? e . siblings ( ) : this . element . siblings ( ) , this . buttonElement = e . filter ( t ) , this . buttonElement . length || ( this . buttonElement = e . find ( t ) ) ) , this . element . addClass ( "ui-helper-hidden-accessible" ) ; var n = this . element . is ( ":checked" ) ; n && this . buttonElement . addClass ( "ui-state-active" ) , this . buttonElement . attr ( "aria-pressed" , n ) } else this . buttonElement = this . element } , widget : function ( ) { return this . buttonElement } , destroy : function ( ) { this . element . removeClass ( "ui-helper-hidden-accessible" ) , this . buttonElement . removeClass ( o + " " + u + " " + a ) . removeAttr ( "role" ) . removeAttr ( "aria-pressed" ) . html ( this . buttonElement . find ( ".ui-button-text" ) . html ( ) ) , this . hasTitle || this . buttonElement . removeAttr ( "title" ) , e . Widget . prototype . destroy . call ( this ) } , _setOption : function ( t , n ) { e . Widget . prototype . _setOption . apply ( this , arguments ) ; if ( t === "disabled" ) { n ? this . element . propAttr ( "disabled" , ! 0 ) : this . element . propAttr ( "disabled" , ! 1 ) ; return } this . _resetButton ( ) } , refresh : function ( ) { var t = this . element . is ( ":disabled" ) ; t !== this . options . disabled && this . _setOption ( "disabled" , t ) , this . type === "radio" ? l ( this . element [ 0 ] ) . each ( function ( ) { e ( this ) . is ( ":checked" ) ? e ( this ) . button ( "widget" ) . addClass ( "ui-state-active" ) . attr ( "aria-pressed" , "true" ) : e ( this ) . button ( "widget" ) . removeClass ( "ui-state-active" ) . attr ( "aria-pressed" , "false"
. input && e . input . val ( r ? "" : this . _formatDate ( e ) ) } , _getDate : function ( e ) { var t = ! e . currentYear || e . input && e . input . val ( ) == "" ? null : this . _daylightSavingAdjust ( new Date ( e . currentYear , e . currentMonth , e . currentDay ) ) ; return t } , _attachHandlers : function ( e ) { var t = this . _get ( e , "stepMonths" ) , n = "#" + e . id . replace ( /\\\\/g , "\\" ) ; e . dpDiv . find ( "[data-handler]" ) . map ( function ( ) { var e = { prev : function ( ) { window [ "DP_jQuery_" + dpuuid ] . datepicker . _adjustDate ( n , - t , "M" ) } , next : function ( ) { window [ "DP_jQuery_" + dpuuid ] . datepicker . _adjustDate ( n , + t , "M" ) } , hide : function ( ) { window [ "DP_jQuery_" + dpuuid ] . datepicker . _hideDatepicker ( ) } , today : function ( ) { window [ "DP_jQuery_" + dpuuid ] . datepicker . _gotoToday ( n ) } , selectDay : function ( ) { return window [ "DP_jQuery_" + dpuuid ] . datepicker . _selectDay ( n , + this . getAttribute ( "data-month" ) , + this . getAttribute ( "data-year" ) , this ) , ! 1 } , selectMonth : function ( ) { return window [ "DP_jQuery_" + dpuuid ] . datepicker . _selectMonthYear ( n , this , "M" ) , ! 1 } , selectYear : function ( ) { return window [ "DP_jQuery_" + dpuuid ] . datepicker . _selectMonthYear ( n , this , "Y" ) , ! 1 } } ; $ ( this ) . bind ( this . getAttribute ( "data-event" ) , e [ this . getAttribute ( "data-handler" ) ] ) } ) } , _generateHTML : function ( e ) { var t = new Date ; t = this . _daylightSavingAdjust ( new Date ( t . getFullYear ( ) , t . getMonth ( ) , t . getDate ( ) ) ) ; var n = this . _get ( e , "isRTL" ) , r = this . _get ( e , "showButtonPanel" ) , i = this . _get ( e , "hideIfNoPrevNext" ) , s = this . _get ( e , "navigationAsDateFormat" ) , o = this . _getNumberOfMonths ( e ) , u = this . _get ( e , "showCurrentAtPos" ) , a = this . _get ( e , "stepMonths" ) , f = o [ 0 ] != 1 || o [ 1 ] != 1 , l = this . _daylightSavingAdjust ( e . currentDay ? new Date ( e . currentYear , e . currentMonth , e . currentDay ) : new Date ( 9999 , 9 , 9 ) ) , c = this . _getMinMaxDate ( e , "min" ) , h = this . _getMinMaxDate ( e , "max" ) , p = e . drawMonth - u , d = e . drawYear ; p < 0 && ( p += 12 , d -- ) ; if ( h ) { var v = this . _daylightSavingAdjust ( new Date ( h . getFullYear ( ) , h . getMonth ( ) - o [ 0 ] * o [ 1 ] + 1 , h . getDate ( ) ) ) ; v = c && v < c ? c : v ; while ( this . _daylightSavingAdjust ( new Date ( d , p , 1 ) ) > v ) p -- , p < 0 && ( p = 11 , d -- ) } e . drawMonth = p , e . drawYear = d ; var m = this . _get ( e , "prevText" ) ; m = s ? this . formatDate ( m , this . _daylightSavingAdjust ( new Date ( d , p - a , 1 ) ) , this . _getFormatConfig ( e ) ) : m ; var g = this . _canAdjustMonth ( e , - 1 , d , p ) ? '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="' + m + '"><span class="ui-icon ui-icon-circle-triangle-' + ( n ? "e" : "w" ) + '">' + m + "</span></a>" : i ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + m + '"><span class="ui-icon ui-icon-circle-triangle-' + ( n ? "e" : "w" ) + '">' + m + "</span></a>" , y = this . _get ( e , "nextText" ) ; y = s ? this . formatDate ( y , this . _daylightSavingAdjust ( new Date ( d , p + a , 1 ) ) , this . _getFormatConfig ( e ) ) : y ; var b = this . _canAdjustMonth ( e , 1 , d , p ) ? '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="' + y + '"><span class="ui-icon ui-icon-circle-triangle-' + ( n ? "w" : "e" ) + '">' + y + "</span></a>" : i ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + y + '"><span class="ui-icon ui-icon-circle-triangle-' + ( n ? "w" : "e" ) + '">' + y + "</span></a>" , w = this . _get ( e , "currentText" ) , E = this . _get ( e , "gotoCurrent" ) && e . currentDay ? l : t ; w = s ? this . formatDate ( w , E , this . _getFormatConfig ( e ) ) : w ; var S = e . inline ? "" : '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' + this . _get ( e , "closeText" ) + "</button>" , x = r ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + ( n ? S : "" ) + ( this . _isInRange ( e , E ) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">' + w + "</button>" : "" ) + ( n ? "" : S ) + "</div>" : "" , T = parseInt ( this . _get ( e , "firstDay" ) , 10 ) ; T = isNaN ( T ) ? 0 : T ; var N = this . _get ( e , "showWeek" ) , C = this . _get ( e , "dayNames" ) , k = this . _get ( e , "dayNamesShort" ) , L = this . _get ( e , "dayNamesMin" ) , A = this . _get ( e , "monthNames" ) , O = this . _get ( e , "monthNamesShort" ) , M = this . _get ( e , "beforeShowDay" ) , _ = this . _get ( e , "showOtherMonths" ) , D = this . _get ( e , "selectOtherMonths" ) , P = this . _get ( e , "calculateWeek" ) || this . iso8601Week , H = this . _getDefaultDate ( e ) , B = "" ; for ( var j = 0 ; j < o [ 0 ] ; j ++ ) { var F = "" ; this . maxRows = 4 ; for ( var I = 0 ; I < o [ 1 ] ; I ++ ) { var q = this . _daylightSavingAdjust ( new Date ( d , p , e . selectedDay ) ) , R = " ui-corner-all" , U = "" ; if ( f ) { U += ' < d
this . options . values . length ? ( r = this . values ( t ? 0 : 1 ) , this . options . values . length === 2 && this . options . range === ! 0 && ( t === 0 && n > r || t === 1 && n < r ) && ( n = r ) , n !== this . values ( t ) && ( i = this . values ( ) , i [ t ] = n , s = this . _trigger ( "slide" , e , { handle : this . handles [ t ] , value : n , values : i } ) , r = this . values ( t ? 0 : 1 ) , s !== ! 1 && this . values ( t , n , ! 0 ) ) ) : n !== this . value ( ) && ( s = this . _trigger ( "slide" , e , { handle : this . handles [ t ] , value : n } ) , s !== ! 1 && this . value ( n ) ) } , _stop : function ( e , t ) { var n = { handle : this . handles [ t ] , value : this . value ( ) } ; this . options . values && this . options . values . length && ( n . value = this . values ( t ) , n . values = this . values ( ) ) , this . _trigger ( "stop" , e , n ) } , _change : function ( e , t ) { if ( ! this . _keySliding && ! this . _mouseSliding ) { var n = { handle : this . handles [ t ] , value : this . value ( ) } ; this . options . values && this . options . values . length && ( n . value = this . values ( t ) , n . values = this . values ( ) ) , this . _trigger ( "change" , e , n ) } } , value : function ( e ) { if ( arguments . length ) { this . options . value = this . _trimAlignValue ( e ) , this . _refreshValue ( ) , this . _change ( null , 0 ) ; return } return this . _value ( ) } , values : function ( t , n ) { var r , i , s ; if ( arguments . length > 1 ) { this . options . values [ t ] = this . _trimAlignValue ( n ) , this . _refreshValue ( ) , this . _change ( null , t ) ; return } if ( ! arguments . length ) return this . _values ( ) ; if ( ! e . isArray ( arguments [ 0 ] ) ) return this . options . values && this . options . values . length ? this . _values ( t ) : this . value ( ) ; r = this . options . values , i = arguments [ 0 ] ; for ( s = 0 ; s < r . length ; s += 1 ) r [ s ] = this . _trimAlignValue ( i [ s ] ) , this . _change ( null , s ) ; this . _refreshValue ( ) } , _setOption : function ( t , n ) { var r , i = 0 ; e . isArray ( this . options . values ) && ( i = this . options . values . length ) , e . Widget . prototype . _setOption . apply ( this , arguments ) ; switch ( t ) { case "disabled" : n ? ( this . handles . filter ( ".ui-state-focus" ) . blur ( ) , this . handles . removeClass ( "ui-state-hover" ) , this . handles . propAttr ( "disabled" , ! 0 ) , this . element . addClass ( "ui-disabled" ) ) : ( this . handles . propAttr ( "disabled" , ! 1 ) , this . element . removeClass ( "ui-disabled" ) ) ; break ; case "orientation" : this . _detectOrientation ( ) , this . element . removeClass ( "ui-slider-horizontal ui-slider-vertical" ) . addClass ( "ui-slider-" + this . orientation ) , this . _refreshValue ( ) ; break ; case "value" : this . _animateOff = ! 0 , this . _refreshValue ( ) , this . _change ( null , 0 ) , this . _animateOff = ! 1 ; break ; case "values" : this . _animateOff = ! 0 , this . _refreshValue ( ) ; for ( r = 0 ; r < i ; r += 1 ) this . _change ( null , r ) ; this . _animateOff = ! 1 } } , _value : function ( ) { var e = this . options . value ; return e = this . _trimAlignValue ( e ) , e } , _values : function ( e ) { var t , n , r ; if ( arguments . length ) return t = this . options . values [ e ] , t = this . _trimAlignValue ( t ) , t ; n = this . options . values . slice ( ) ; for ( r = 0 ; r < n . length ; r += 1 ) n [ r ] = this . _trimAlignValue ( n [ r ] ) ; return n } , _trimAlignValue : function ( e ) { if ( e <= this . _valueMin ( ) ) return this . _valueMin ( ) ; if ( e >= this . _valueMax ( ) ) return this . _valueMax ( ) ; var t = this . options . step > 0 ? this . options . step : 1 , n = ( e - this . _valueMin ( ) ) % t , r = e - n ; return Math . abs ( n ) * 2 >= t && ( r += n > 0 ? t : - t ) , parseFloat ( r . toFixed ( 5 ) ) } , _valueMin : function ( ) { return this . options . min } , _valueMax : function ( ) { return this . options . max } , _refreshValue : function ( ) { var t = this . options . range , n = this . options , r = this , i = this . _animateOff ? ! 1 : n . animate , s , o = { } , u , a , f , l ; this . options . values && this . options . values . length ? this . handles . each ( function ( t , a ) { s = ( r . values ( t ) - r . _valueMin ( ) ) / ( r . _valueMax ( ) - r . _valueMin ( ) ) * 100 , o [ r . orientation === "horizontal" ? "left" : "bottom" ] = s + "%" , e ( this ) . stop ( 1 , 1 ) [ i ? "animate" : "css" ] ( o , n . animate ) , r . options . range === ! 0 && ( r . orientation === "horizontal" ? ( t === 0 && r . range . stop ( 1 , 1 ) [ i ? "animate" : "css" ] ( { left : s + "%" } , n . animate ) , t === 1 && r . range [ i ? "animate" : "css" ] ( { width : s - u + "%" } , { queue : ! 1 , duration : n . animate } ) ) : ( t === 0 && r . range . stop ( 1 , 1 ) [ i ? "animate" : "css" ] ( { bottom : s + "%" } , n . animate ) , t === 1 && r . range [ i ? "animate" : "css" ] ( { height : s - u + "%" } , { queue : ! 1 , duration : n . animate } ) ) ) , u = s } ) : ( a = this . value ( ) , f = this . _valueMin ( ) , l = this . _valueMax ( ) , s = l !== f ? ( a - f ) / ( l - f ) * 100 : 0 , o [ r . orientation === "horizontal" ? "left" : "bottom" ] = s + "%" , this . handle . stop ( 1 , 1 ) [ i ? "animate" : "css" ] ( o , n . animate ) , t === "min" && this . orientation === "horizontal" && this . range . stop ( 1 , 1 ) [ i ? "animate" : "css" ] ( { width : s + "%" } , n . animate ) , t === "max" && this . orientation === "horizontal" && this . range [ i ? "animate" : "css" ] ( { width : 100 - s + "%" } , { queue : ! 1 , duration : n . animate } ) , t === "min" && this . orientation === "vertical" && this . r
, enableSelector : "input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled" , requiredInputSelector : "input[name][required]:not([disabled]),textarea[name][required]:not([disabled])" , fileInputSelector : "input:file" , linkDisableSelector : "a[data-disable-with]" , CSRFProtection : function ( t ) { var n = e ( 'meta[name="csrf-token"]' ) . attr ( "content" ) ; n && t . setRequestHeader ( "X-CSRF-Token" , n ) } , fire : function ( t , n , r ) { var i = e . Event ( n ) ; return t . trigger ( i , r ) , i . result !== ! 1 } , confirm : function ( e ) { return confirm ( e ) } , ajax : function ( t ) { return e . ajax ( t ) } , href : function ( e ) { return e . attr ( "href" ) } , handleRemote : function ( n ) { var i , s , o , u , a , f , l , c ; if ( r . fire ( n , "ajax:before" ) ) { u = n . data ( "cross-domain" ) , a = u === t ? null : u , f = n . data ( "with-credentials" ) || null , l = n . data ( "type" ) || e . ajaxSettings && e . ajaxSettings . dataType ; if ( n . is ( "form" ) ) { i = n . attr ( "method" ) , s = n . attr ( "action" ) , o = n . serializeArray ( ) ; var h = n . data ( "ujs:submit-button" ) ; h && ( o . push ( h ) , n . data ( "ujs:submit-button" , null ) ) } else n . is ( r . inputChangeSelector ) ? ( i = n . data ( "method" ) , s = n . data ( "url" ) , o = n . serialize ( ) , n . data ( "params" ) && ( o = o + "&" + n . data ( "params" ) ) ) : ( i = n . data ( "method" ) , s = r . href ( n ) , o = n . data ( "params" ) || null ) ; c = { type : i || "GET" , data : o , dataType : l , beforeSend : function ( e , i ) { return i . dataType === t && e . setRequestHeader ( "accept" , "*/*;q=0.5, " + i . accepts . script ) , r . fire ( n , "ajax:beforeSend" , [ e , i ] ) } , success : function ( e , t , r ) { n . trigger ( "ajax:success" , [ e , t , r ] ) } , complete : function ( e , t ) { n . trigger ( "ajax:complete" , [ e , t ] ) } , error : function ( e , t , r ) { n . trigger ( "ajax:error" , [ e , t , r ] ) } , xhrFields : { withCredentials : f } , crossDomain : a } , s && ( c . url = s ) ; var p = r . ajax ( c ) ; return n . trigger ( "ajax:send" , p ) , p } return ! 1 } , handleMethod : function ( n ) { var i = r . href ( n ) , s = n . data ( "method" ) , o = n . attr ( "target" ) , u = e ( "meta[name=csrf-token]" ) . attr ( "content" ) , a = e ( "meta[name=csrf-param]" ) . attr ( "content" ) , f = e ( '<form method="post" action="' + i + '"></form>' ) , l = '<input name="_method" value="' + s + '" type="hidden" />' ; a !== t && u !== t && ( l += '<input name="' + a + '" value="' + u + '" type="hidden" />' ) , o && f . attr ( "target" , o ) , f . hide ( ) . append ( l ) . appendTo ( "body" ) , f . submit ( ) } , disableFormElements : function ( t ) { t . find ( r . disableSelector ) . each ( function ( ) { var t = e ( this ) , n = t . is ( "button" ) ? "html" : "val" ; t . data ( "ujs:enable-with" , t [ n ] ( ) ) , t [ n ] ( t . data ( "disable-with" ) ) , t . prop ( "disabled" , ! 0 ) } ) } , enableFormElements : function ( t ) { t . find ( r . enableSelector ) . each ( function ( ) { var t = e ( this ) , n = t . is ( "button" ) ? "html" : "val" ; t . data ( "ujs:enable-with" ) && t [ n ] ( t . data ( "ujs:enable-with" ) ) , t . prop ( "disabled" , ! 1 ) } ) } , allowAction : function ( e ) { var t = e . data ( "confirm" ) , n = ! 1 , i ; return t ? ( r . fire ( e , "confirm" ) && ( n = r . confirm ( t ) , i = r . fire ( e , "confirm:complete" , [ n ] ) ) , n && i ) : ! 0 } , blankInputs : function ( t , n , r ) { var i = e ( ) , s , o , u = n || "input,textarea" , a = t . find ( u ) ; return a . each ( function ( ) { s = e ( this ) , o = s . is ( ":checkbox,:radio" ) ? s . is ( ":checked" ) : s . val ( ) ; if ( ! o == ! r ) { if ( s . is ( ":radio" ) && a . filter ( 'input:radio:checked[name="' + s . attr ( "name" ) + '"]' ) . length ) return ! 0 ; i = i . add ( s ) } } ) , i . length ? i : ! 1 } , nonBlankInputs : function ( e , t ) { return r . blankInputs ( e , t , ! 0 ) } , stopEverything : function ( t ) { return e ( t . target ) . trigger ( "ujs:everythingStopped" ) , t . stopImmediatePropagation ( ) , ! 1 } , callFormSubmitBindings : function ( n , r ) { var i = n . data ( "events" ) , s = ! 0 ; return i !== t && i . submit !== t && e . each ( i . submit , function ( e , t ) { if ( typeof t . handler == "function" ) return s = t . handler ( r ) } ) , s } , disableElement : function ( e ) { e . data ( "ujs:enable-with" , e . html ( ) ) , e . html ( e . data ( "disable-with" ) ) , e . bind ( "click.railsDisable" , function ( e ) { return r . stopEverything ( e ) } ) } , enableElement : function ( e ) { e . data ( "ujs:enable-with" ) !== t && ( e . html ( e . data ( "ujs:enable-with" ) ) , e . data ( "ujs:enable-with" , ! 1 ) ) , e . unbind ( "click.railsDisable" ) } } , r . fire ( e ( document ) , "rails:attachBindings" ) && ( e . ajaxPrefilter ( function ( e , t , n ) { e . crossDomain || r . CSRFProtection ( n ) } ) , e ( document ) . delegate ( r . linkDisableSelector , "ajax:complete" , function ( ) { r . enableElement ( e ( this ) ) } ) , e ( document ) . delegate ( r . linkClickSelector , "click.rails" , function ( n ) { var i = e ( this ) , s = i . data ( "method" ) , o = i . data ( "params" ) ; if ( ! r . allowAction ( i ) ) return r . stopEverything ( n ) ; i . is ( r . linkDisableSelector ) && r . disableElement ( i ) ; if ( i . data ( "remote" ) !== t ) { if ( ( n . metaKey || n . ctrlKey ) && ( ! s || s === "GET" ) && ! o ) return ! 0 ; var u = r . handleRem
) . addClass ( "toggledOff" ) ; for ( var n in categoryVisible ) categoryVisible [ n ] = ! 1 } } else { var r = $ ( this ) . children ( "img" ) . attr ( "alt" ) ; switchVisible ( r ) , categoryVisible [ r ] == 1 ? ( $ ( this ) . addClass ( "toggledOff" ) , categoryVisible [ r ] = ! 1 ) : categoryVisible [ r ] == 0 && ( $ ( this ) . removeClass ( "toggledOff" ) , categoryVisible [ r ] = ! 0 ) } } ) } ) ; var renderMidArrow = function ( e , t , n , r , i ) { var s = i . getCtx ( ) ; if ( r ) { var o = e ; e = t , t = o } var u = new $jit . Complex ( t . x - e . x , t . y - e . y ) ; u . $scale ( n / u . norm ( ) ) ; var a = new $jit . Complex ( ( t . x + e . x ) / 2 , ( t . y + e . y ) / 2 ) ; a . x += u . x / . 7 , a . y += u . y / . 7 ; var f = new $jit . Complex ( a . x - u . x , a . y - u . y ) , l = new $jit . Complex ( - u . y / 2 , u . x / 2 ) , c = f . add ( l ) , h = f . $add ( l . $scale ( - 1 ) ) ; s . beginPath ( ) , s . moveTo ( e . x , e . y ) , s . lineTo ( t . x , t . y ) , s . stroke ( ) , s . beginPath ( ) , s . moveTo ( c . x , c . y ) , s . lineTo ( a . x , a . y ) , s . lineTo ( h . x , h . y ) , s . stroke ( ) } , nodeSettings = { customNode : { render : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) , i = e . getData ( "metacode" ) , s = e . getData ( "inCommons" ) , o = e . getData ( "onCanvas" ) , u = t . getCtx ( ) ; s && ( u . beginPath ( ) , u . arc ( n . x , n . y , r + 3 , 0 , 2 * Math . PI , ! 1 ) , u . strokeStyle = "#67be5f" , u . lineWidth = 2 , u . stroke ( ) ) , o && ( u . beginPath ( ) , u . arc ( n . x , n . y , r + 3 , 0 , 2 * Math . PI , ! 1 ) , u . strokeStyle = "white" , u . lineWidth = 2 , u . stroke ( ) ) , u . drawImage ( imgArray [ i ] , n . x - r , n . y - r , r * 2 , r * 2 ) } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; return this . nodeHelper . circle . contains ( n , t , r ) } } } , edgeSettings = { customEdge : { render : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) , i = e . getData ( "category" ) ; if ( i == "none" ) this . edgeHelper . line . render ( { x : n . x , y : n . y } , { x : r . x , y : r . y } , t ) ; else if ( i == "both" ) renderMidArrow ( { x : n . x , y : n . y } , { x : r . x , y : r . y } , 13 , ! 0 , t ) , renderMidArrow ( { x : n . x , y : n . y } , { x : r . x , y : r . y } , 13 , ! 1 , t ) ; else if ( i == "from-to" ) { var s = e . data . $direction , o = s && s . length > 1 && s [ 0 ] != e . nodeFrom . id ; renderMidArrow ( { x : n . x , y : n . y } , { x : r . x , y : r . y } , 13 , o , t ) } var u = e . getData ( "desc" ) , a = e . getData ( "showDesc" ) ; if ( u != "" && a ) { var f = t . getSize ( ) , l = parseInt ( ( n . x + r . x - u . length * 5 ) / 2 ) , c = parseInt ( ( n . y + r . y ) / 2 ) ; t . getCtx ( ) . fillStyle = "#000" , t . getCtx ( ) . font = "bold 14px arial" , t . getCtx ( ) . fillText ( u , l , c ) } } , contains : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) ; return this . edgeHelper . line . contains ( n , r , t , e . Edge . epsilon ) } } } , canvasDoubleClickHandlerObject = new Object ; canvasDoubleClickHandlerObject . storedTime = 0 , function ( ) { window . $jit = function ( e ) { e = e || window ; for ( var t in $jit ) $jit [ t ] . $extend && ( e [ t ] = $jit [ t ] ) } , $jit . version = "2.0.0b" ; var e = function ( e ) { return document . getElementById ( e ) } ; e . empty = function ( ) { } , e . extend = function ( e , t ) { for ( var n in t || { } ) e [ n ] = t [ n ] ; return e } , e . lambda = function ( e ) { return typeof e == "function" ? e : function ( ) { return e } } , e . time = Date . now || function ( ) { return + ( new Date ) } , e . splat = function ( t ) { var n = e . type ( t ) ; return n ? n != "array" ? [ t ] : t : [ ] } , e . type = function ( t ) { var n = e . type . s . call ( t ) . match ( /^\[object\s(.*)\]$/ ) [ 1 ] . toLowerCase ( ) ; return n != "object" ? n : t && t . $$family ? t . $$family : t && t . nodeName && t . nodeType == 1 ? "element" : n } , e . type . s = Object . prototype . toString , e . each = function ( t , n ) { var r = e . type ( t ) ; if ( r == "object" ) for ( var i in t ) n ( t [ i ] , i ) ; else for ( var s = 0 , o = t . length ; s < o ; s ++ ) n ( t [ s ] , s ) } , e . indexOf = function ( e , t ) { if ( Array . indexOf ) return e . indexOf ( t ) ; for ( var n = 0 , r = e . length ; n < r ; n ++ ) if ( e [ n ] === t ) return n ; return - 1 } , e . map = function ( t , n ) { var r = [ ] ; return e . each ( t , function ( e , t ) { r . push ( n ( e , t ) ) } ) , r } , e . reduce = function ( e , t , n ) { var r = e . length ; if ( r == 0 ) return n ; var i = arguments . length == 3 ? n : e [ -- r ] ; while ( r -- ) i = t ( i , e [ r ] ) ; return i } , e . merge = function ( ) { var t = { } ; for ( var n = 0 , r = arguments . length ; n < r ; n ++ ) { var i = arguments [ n ] ; if ( e . type ( i ) != "object" ) continue ; for ( var s in i ) { var o = i [ s ] , u = t [ s ] ; t [ s ] = u && e . type ( o ) == "object" && e . type ( u ) == "object" ? e . merge ( u , o ) : e . unlink ( o ) } } return t } , e . unlink = function ( t ) { var n ; switch ( e . type ( t ) ) { case "object" : n = { } ; for ( var r in t ) n [ r ] = e . unlink ( t [ r ] ) ; break ; case "array" : n = [ ] ; for ( var i = 0 , s = t . length ; i < s ; i ++ ) n [ i ] = e . unlink ( t [ i ] ) ; break ; default : return t } return n } , e . zip = function ( ) { if ( arguments . length === 0 ) return [ ] ; for ( var e = 0 , t = [ ] , n = arguments . length , r = arguments [ 0 ] . length ; e < r ; e ++ ) { for ( var i = 0 , s = [ ] ; i < n ; i ++ ) s . push ( arguments [ i ] [ e ] ) ; t . push ( s ) } return t } , e . rgbToHex = function ( e , t ) { if ( e . length < 3 ) return null ; if ( e . length == 4 && e [ 3 ] == 0 && ! t ) return "transparent" ; var n = [ ] ; for ( var r = 0 ; r < 3 ; r ++ ) { var i = ( e [ r ] - 0 ) . toString ( 16 ) ; n . pu
e ; delete r . data [ n ] , delete r . endData [ n ] , delete r . startData [ n ] } ) } ; v = { getData : function ( e , n , r ) { return t . call ( this , "" , e , n , r , this . Config ) } , setData : function ( e , t , r ) { n . call ( this , "" , e , t , r ) } , setDataset : function ( t , n ) { t = e . splat ( t ) ; for ( var r in n ) for ( var i = 0 , s = e . splat ( n [ r ] ) , o = t . length ; i < o ; i ++ ) this . setData ( r , s [ i ] , t [ i ] ) } , removeData : function ( ) { r . call ( this , "" , Array . prototype . slice . call ( arguments ) ) } , getCanvasStyle : function ( e , n , r ) { return t . call ( this , "canvas" , e , n , r , this . Config . CanvasStyles ) } , setCanvasStyle : function ( e , t , r ) { n . call ( this , "canvas" , e , t , r ) } , setCanvasStyles : function ( t , n ) { t = e . splat ( t ) ; for ( var r in n ) for ( var i = 0 , s = e . splat ( n [ r ] ) , o = t . length ; i < o ; i ++ ) this . setCanvasStyle ( r , s [ i ] , t [ i ] ) } , removeCanvasStyle : function ( ) { r . call ( this , "canvas" , Array . prototype . slice . call ( arguments ) ) } , getLabelData : function ( e , n , r ) { return t . call ( this , "label" , e , n , r , this . Label ) } , setLabelData : function ( e , t , r ) { n . call ( this , "label" , e , t , r ) } , setLabelDataset : function ( t , n ) { t = e . splat ( t ) ; for ( var r in n ) for ( var i = 0 , s = e . splat ( n [ r ] ) , o = t . length ; i < o ; i ++ ) this . setLabelData ( r , s [ i ] , t [ i ] ) } , removeLabelData : function ( ) { r . call ( this , "label" , Array . prototype . slice . call ( arguments ) ) } } } ) ( ) , d . Node = new t ( { initialize : function ( t , n , r , i , s ) { var o = { id : "" , name : "" , data : { } , startData : { } , endData : { } , adjacencies : { } , selected : ! 1 , drawn : ! 1 , exist : ! 1 , angleSpan : { begin : 0 , end : 0 } , pos : n && p ( 0 , 0 ) || c ( 0 , 0 ) , startPos : n && p ( 0 , 0 ) || c ( 0 , 0 ) , endPos : n && p ( 0 , 0 ) || c ( 0 , 0 ) } ; e . extend ( this , e . extend ( o , t ) ) , this . Config = this . Node = r , this . Edge = i , this . Label = s } , adjacentTo : function ( e ) { return e . id in this . adjacencies } , getAdjacency : function ( e ) { return this . adjacencies [ e ] } , getPos : function ( e ) { e = e || "current" ; if ( e == "current" ) return this . pos ; if ( e == "end" ) return this . endPos ; if ( e == "start" ) return this . startPos } , setPos : function ( e , t ) { t = t || "current" ; var n ; t == "current" ? n = this . pos : t == "end" ? n = this . endPos : t == "start" && ( n = this . startPos ) , n . set ( e ) } } ) , d . Node . implement ( v ) , d . Adjacence = new t ( { initialize : function ( e , t , n , r , i ) { this . nodeFrom = e , this . nodeTo = t , this . data = n || { } , this . startData = { } , this . endData = { } , this . Config = this . Edge = r , this . Label = i } } ) , d . Adjacence . implement ( v ) , d . Util = { filter : function ( t ) { if ( ! t || e . type ( t ) != "string" ) return function ( ) { return ! 0 } ; var n = t . split ( " " ) ; return function ( e ) { for ( var t = 0 ; t < n . length ; t ++ ) if ( e [ n [ t ] ] ) return ! 1 ; return ! 0 } } , getNode : function ( e , t ) { return e . nodes [ t ] } , eachNode : function ( e , t , n ) { var r = this . filter ( n ) ; for ( var i in e . nodes ) r ( e . nodes [ i ] ) && t ( e . nodes [ i ] ) } , eachAdjacency : function ( e , t , n ) { var r = e . adjacencies , i = this . filter ( n ) ; for ( var s in r ) { var o = r [ s ] ; if ( i ( o ) ) { if ( o . nodeFrom != e ) { var u = o . nodeFrom ; o . nodeFrom = o . nodeTo , o . nodeTo = u } t ( o , s ) } } } , computeLevels : function ( e , t , n , r ) { n = n || 0 ; var i = this . filter ( r ) ; this . eachNode ( e , function ( e ) { e . _flag = ! 1 , e . _depth = - 1 } , r ) ; var s = e . getNode ( t ) ; s . _depth = n ; var o = [ s ] ; while ( o . length != 0 ) { var u = o . pop ( ) ; u . _flag = ! 0 , this . eachAdjacency ( u , function ( e ) { var t = e . nodeTo ; t . _flag == 0 && i ( t ) && ( t . _depth < 0 && ( t . _depth = u . _depth + 1 + n ) , o . unshift ( t ) ) } , r ) } } , eachBFS : function ( e , t , n , r ) { var i = this . filter ( r ) ; this . clean ( e ) ; var s = [ e . getNode ( t ) ] ; while ( s . length != 0 ) { var o = s . pop ( ) ; o . _flag = ! 0 , n ( o , o . _depth ) , this . eachAdjacency ( o , function ( e ) { var t = e . nodeTo ; t . _flag == 0 && i ( t ) && ( t . _flag = ! 0 , s . unshift ( t ) ) } , r ) } } , eachLevel : function ( e , t , n , r , i ) { var s = e . _depth , o = this . filter ( i ) , u = this ; n = n === ! 1 ? Number . MAX _VALUE - s : n , function a ( e , t , n ) { var i = e . _depth ; i >= t && i <= n && o ( e ) && r ( e , i ) , i < n && u . eachAdjacency ( e , function ( e ) { var r = e . nodeTo ; r . _depth > i && a ( r , t , n ) } ) } ( e , t + s , n + s ) } , eachSubgraph : function ( e , t , n ) { this . eachLevel ( e , 0 , ! 1 , t , n ) } , eachSubnode : function ( e , t , n ) { this . eachLevel ( e , 1 , 1 , t , n ) } , anySubnode : function ( t , n , r ) { var i = ! 1 ; n = n || e . lambda ( ! 0 ) ; var s = e . type ( n ) == "string" ? function ( e ) { return e [ n ] } : n ; return this . eachSubnode ( t , function ( e ) { s ( e ) && ( i = ! 0 ) } , r ) , i } , getSubnodes : function ( t , n , r ) { var i = [ ] , s = this ; n = n || 0 ; var o , u ; return e . type ( n ) == "array" ? ( o = n [ 0 ] , u = n [ 1 ] ) : ( o = n , u = Number . MAX _VALUE - t . _depth ) , this . eachLevel ( t , o , u , function ( e ) { i . push ( e ) } , r ) , i } , getParents : function ( e ) { var t = [ ] ; return this . eachAdjacency ( e , function ( n ) { var r = n . nodeTo ; r . _depth < e . _depth && t . push ( r ) } ) , t } , isDescendantOf : function ( e , t ) { if ( e . id == t ) return ! 0 ; var n = this . getParents ( e ) , r = ! 1 ; for ( var i = 0 ; ! r && i < n . length ; i ++ ) r = r || this . isDescendantOf ( n [ i ] , t ) ; return r } , clean : function ( e ) { this . e
e ) { e . selected = ! 1 } ) ; for ( var s = 0 , o = [ t . id ] . concat ( n ) ; s < o . length ; s ++ ) i ( this . graph . getNode ( o [ s ] ) ) } , setRoot : function ( e , t , n ) { function u ( ) { if ( this . config . multitree && o . data . $orn ) { var t = o . data . $orn , u = { left : "right" , right : "left" , top : "bottom" , bottom : "top" } [ t ] ; s . data . $orn = u , function a ( t ) { t . eachSubnode ( function ( t ) { t . id != e && ( t . data . $orn = u , a ( t ) ) } ) } ( s ) , delete o . data . $orn } this . root = e , this . clickedNode = o , this . graph . computeLevels ( this . root , 0 , "ignore" ) , this . geom . setRightLevelToShow ( o , i , { execHide : ! 1 , onShow : function ( e ) { e . drawn || ( e . drawn = ! 0 , e . setData ( "alpha" , 1 , "end" ) , e . setData ( "alpha" , 0 ) , e . pos . setc ( o . pos . x , o . pos . y ) ) } } ) , this . compute ( "end" ) , this . busy = ! 0 , this . fx . animate ( { modes : [ "linear" , "node-property:alpha" ] , onComplete : function ( ) { r . busy = ! 1 , r . onClick ( e , { onComplete : function ( ) { n && n . onComplete ( ) } } ) } } ) } if ( this . busy ) return ; this . busy = ! 0 ; var r = this , i = this . canvas , s = this . graph . getNode ( this . root ) , o = this . graph . getNode ( e ) ; delete s . data . $orns , t == "animate" ? ( u . call ( this ) , r . selectPath ( o ) ) : t == "replot" && ( u . call ( this ) , this . select ( this . root ) ) } , addSubtree : function ( t , n , r ) { n == "replot" ? this . op . sum ( t , e . extend ( { type : "replot" } , r || { } ) ) : n == "animate" && this . op . sum ( t , e . extend ( { type : "fade:seq" } , r || { } ) ) } , removeSubtree : function ( t , n , r , i ) { var s = this . graph . getNode ( t ) , o = [ ] ; s . eachLevel ( + ! n , ! 1 , function ( e ) { o . push ( e . id ) } ) , r == "replot" ? this . op . removeNode ( o , e . extend ( { type : "replot" } , i || { } ) ) : r == "animate" && this . op . removeNode ( o , e . extend ( { type : "fade:seq" } , i || { } ) ) } , select : function ( t , n ) { var i = this . group , o = this . geom , u = this . graph . getNode ( t ) , a = this . canvas , f = this . graph . getNode ( this . root ) , l = e . merge ( this . controller , n ) , c = this ; l . onBeforeCompute ( u ) , this . selectPath ( u ) , this . clickedNode = u , this . requestNodes ( u , { onComplete : function ( ) { i . hide ( i . prepare ( r . call ( c ) ) , l ) , o . setRightLevelToShow ( u , a ) , c . compute ( "current" ) , c . graph . eachNode ( function ( e ) { var t = e . pos . getc ( ! 0 ) ; e . startPos . setc ( t . x , t . y ) , e . endPos . setc ( t . x , t . y ) , e . visited = ! 1 } ) ; var e = { x : l . offsetX , y : l . offsetY } ; c . geom . translate ( u . endPos . add ( e ) . $scale ( - 1 ) , [ "start" , "current" , "end" ] ) , i . show ( s . call ( c ) ) , c . plot ( ) , l . onAfterCompute ( c . clickedNode ) , l . onComplete ( ) } } ) } , onClick : function ( t , n ) { var r = this . canvas , i = this , s = this . geom , o = this . config , u = { Move : { enable : ! 0 , offsetX : o . offsetX || 0 , offsetY : o . offsetY || 0 } , setRightLevelToShowConfig : ! 1 , onBeforeRequest : e . empty , onBeforeContract : e . empty , onBeforeMove : e . empty , onBeforeExpand : e . empty } , a = e . merge ( this . controller , u , n ) ; if ( ! this . busy ) { this . busy = ! 0 ; var f = this . graph . getNode ( t ) ; this . selectPath ( f , this . clickedNode ) , this . clickedNode = f , a . onBeforeCompute ( f ) , a . onBeforeRequest ( f ) , this . requestNodes ( f , { onComplete : function ( ) { a . onBeforeContract ( f ) , i . contract ( { onComplete : function ( ) { s . setRightLevelToShow ( f , r , a . setRightLevelToShowConfig ) , a . onBeforeMove ( f ) , i . move ( f , { Move : a . Move , onComplete : function ( ) { a . onBeforeExpand ( f ) , i . expand ( f , { onComplete : function ( ) { i . busy = ! 1 , a . onAfterCompute ( t ) , a . onComplete ( ) } } ) } } ) } } ) } } ) } } } ) } ( ) , $jit . ST . $extend = ! 0 , $jit . ST . Op = new t ( { Implements : d . Op } ) , $jit . ST . Group = new t ( { initialize : function ( e ) { this . viz = e , this . canvas = e . canvas , this . config = e . config , this . animation = new r , this . nodes = null } , requestNodes : function ( e , t ) { var n = 0 , r = e . length , i = { } , s = function ( ) { t . onComplete ( ) } , o = this . viz ; r == 0 && s ( ) ; for ( var u = 0 ; u < r ; u ++ ) i [ e [ u ] . id ] = e [ u ] , t . request ( e [ u ] . id , e [ u ] . _level , { onComplete : function ( e , t ) { t && t . children && ( t . id = e , o . op . sum ( t , { type : "nothing" } ) ) , ++ n == r && ( o . graph . computeLevels ( o . root , 0 ) , s ( ) ) } } ) } , contract : function ( t , n ) { var r = this . viz , i = this ; t = this . prepare ( t ) , this . animation . setOptions ( e . merge ( n , { $animating : ! 1 , compute : function ( e ) { e == 1 && ( e = . 99 ) , i . plotStep ( 1 - e , n , this . $animating ) , this . $animating = "contract" } , complete : function ( ) { i . hide ( t , n ) } } ) ) . start ( ) } , hide : function ( t , n ) { var r = this . viz ; for ( var i = 0 ; i < t . length ; i ++ ) t [ i ] . eachLevel ( 1 , ! 1 , function ( t ) { t . exist && e . extend ( t , { drawn : ! 1 , exist : ! 1 } ) } ) ; n . onComplete ( ) } , expand : function ( t , n ) { var r = this ; this . show ( t ) , this . animation . setOptions ( e . merge ( n , { $animating : ! 1 , compute : function ( e ) { r . plotStep ( e , n , this . $animating ) , this . $animating = "expand" } , complete : function ( ) { r . plotStep ( undefined , n , ! 1 ) , n . onComplete ( ) } } ) ) . start ( ) } , show : function ( t ) { var n = this . config ; this . prepare ( t ) , e . each ( t , function ( e ) { if ( n . multitree && ! ( "$orn" in e . data ) ) { delete e . data . $orns ; var t = " "
( function ( e ) { n = e . nodeTo } ) ; var r = n . getData ( "colorArray" ) , i = r . length ; return e . each ( n . getData ( "stringArray" ) , function ( e , n ) { t [ e ] = r [ n % i ] } ) , t } , getMaxValue : function ( ) { var t = 0 , n = this . config . type . split ( ":" ) [ 0 ] == "stacked" ; return this . st . graph . eachNode ( function ( r ) { var i = r . getData ( "valueArray" ) , s = 0 ; if ( ! i ) return ; n ? e . each ( i , function ( e ) { s += + e } ) : s = Math . max . apply ( null , i ) , t = t > s ? t : s } ) , t } , setBarType : function ( e ) { this . config . type = e , this . st . config . Node . type = "barchart-" + e . split ( ":" ) [ 0 ] } , normalizeDims : function ( ) { var t = this . st . graph . getNode ( this . st . root ) , n = 0 ; t . eachAdjacency ( function ( ) { n ++ } ) ; var r = this . getMaxValue ( ) || 1 , i = this . st . canvas . getSize ( ) , s = this . config , o = s . Margin , u = o . left + o . right , a = o . top + o . bottom , f = s . orientation == "horizontal" , l = ( i [ f ? "height" : "width" ] - ( f ? a : u ) - ( n - 1 ) * s . barsOffset ) / n , c = s . animate , h = i [ f ? "width" : "height" ] - ( f ? u : a ) - ( ! f && s . showAggregates && s . Label . size + s . labelOffset ) - ( s . showLabels && s . Label . size + s . labelOffset ) , p = f ? "height" : "width" , d = f ? "width" : "height" ; this . st . graph . eachNode ( function ( t ) { var n = 0 , i = [ ] ; e . each ( t . getData ( "valueArray" ) , function ( e ) { n += + e , i . push ( 0 ) } ) , t . setData ( p , l ) ; if ( c ) { t . setData ( d , n * h / r , "end" ) , t . setData ( "dimArray" , e . map ( t . getData ( "valueArray" ) , function ( e ) { return e * h / r } ) , "end" ) ; var s = t . getData ( "dimArray" ) ; s || t . setData ( "dimArray" , i ) } else t . setData ( d , n * h / r ) , t . setData ( "dimArray" , e . map ( t . getData ( "valueArray" ) , function ( e ) { return e * h / r } ) ) } ) } } ) , i . PieChart = { $extend : ! 0 , animate : ! 0 , offset : 25 , sliceOffset : 0 , labelOffset : 3 , type : "stacked" , hoveredColor : "#9fd4ff" , Events : { enable : ! 1 , onClick : e . empty } , Tips : { enable : ! 1 , onShow : e . empty , onHide : e . empty } , showLabels : ! 0 , resizeLabels : ! 1 , updateHeights : ! 1 } , b . Radial = new t ( { compute : function ( t ) { var n = e . splat ( t || [ "current" , "start" , "end" ] ) ; w . compute ( this . graph , n , this . config ) , this . graph . computeLevels ( this . root , 0 , "ignore" ) ; var r = this . createLevelDistanceFunc ( ) ; this . computeAngularWidths ( n ) , this . computePositions ( n , r ) } , computePositions : function ( e , t ) { var n = e , r = this . graph , i = r . getNode ( this . root ) , s = this . parent , o = this . config ; for ( var u = 0 , a = n . length ; u < a ; u ++ ) { var f = n [ u ] ; i . setPos ( c ( 0 , 0 ) , f ) , i . setData ( "span" , Math . PI * 2 , f ) } i . angleSpan = { begin : 0 , end : 2 * Math . PI } , r . eachBFS ( this . root , function ( e ) { var r = e . angleSpan . end - e . angleSpan . begin , i = e . angleSpan . begin , o = t ( e ) , u = 0 , a = [ ] , f = { } ; e . eachSubnode ( function ( e ) { u += e . _treeAngularWidth ; for ( var t = 0 , r = n . length ; t < r ; t ++ ) { var i = n [ t ] , s = e . getData ( "dim" , i ) ; f [ i ] = i in f ? s > f [ i ] ? s : f [ i ] : s } a . push ( e ) } , "ignore" ) , s && s . id == e . id && a . length > 0 && a [ 0 ] . dist && a . sort ( function ( e , t ) { return ( e . dist >= t . dist ) - ( e . dist <= t . dist ) } ) ; for ( var l = 0 , h = a . length ; l < h ; l ++ ) { var p = a [ l ] ; if ( ! p . _flag ) { var d = p . _treeAngularWidth / u * r , v = i + d / 2 ; for ( var m = 0 , g = n . length ; m < g ; m ++ ) { var y = n [ m ] ; p . setPos ( c ( v , o ) , y ) , p . setData ( "span" , d , y ) , p . setData ( "dim-quotient" , p . getData ( "dim" , y ) / f [ y ] , y ) } p . angleSpan = { begin : i , end : i + d } , i += d } } } , "ignore" ) } , setAngularWidthForNodes : function ( e ) { this . graph . eachBFS ( this . root , function ( t , n ) { var r = t . getData ( "angularWidth" , e [ 0 ] ) || 5 ; t . _angularWidth = r / n } , "ignore" ) } , setSubtreesAngularWidth : function ( ) { var e = this ; this . graph . eachNode ( function ( t ) { e . setSubtreeAngularWidth ( t ) } , "ignore" ) } , setSubtreeAngularWidth : function ( e ) { var t = this , n = e . _angularWidth , r = 0 ; e . eachSubnode ( function ( e ) { t . setSubtreeAngularWidth ( e ) , r += e . _treeAngularWidth } , "ignore" ) , e . _treeAngularWidth = Math . max ( n , r ) } , computeAngularWidths : function ( e ) { this . setAngularWidthForNodes ( e ) , this . setSubtreesAngularWidth ( ) } } ) , $jit . Sunburst = new t ( { Implements : [ y , a , b . Radial ] , initialize : function ( t ) { var n = $jit . Sunburst , r = { interpolation : "linear" , levelDistance : 100 , Node : { type : "multipie" , height : 0 } , Edge : { type : "none" } , Label : { textAlign : "start" , textBaseline : "middle" } } ; this . controller = this . config = e . merge ( i ( "Canvas" , "Node" , "Edge" , "Fx" , "Tips" , "NodeStyles" , "Events" , "Navigation" , "Controller" , "Label" ) , r , t ) ; var s = this . config ; s . useCanvas ? ( this . canvas = s . useCanvas , this . config . labelContainer = this . canvas . id + "-label" ) : ( s . background && ( s . background = e . merge ( { type : "Circles" } , s . background ) ) , this . canvas = new f ( this , s ) , this . config . labelContainer = ( typeof s . injectInto == "string" ? s . injectInto : s . injectInto . id ) + "-label" ) , this . graphOptions = { complex : ! 1 , Node : { selected : ! 1 , exist : ! 0 , drawn : ! 0 } } , this . graph = new d ( this . graphOptions , this . config . Node , this . confi
e ) { this . viz = e } , placeLabel : function ( e , t , n ) { var r = t . pos . getc ( ! 0 ) , i = this . viz . canvas , s = i . translateOffsetX , o = i . translateOffsetY , u = i . scaleOffsetX , a = i . scaleOffsetY , f = i . getSize ( ) , l = { x : Math . round ( r . x * u + s + f . width / 2 ) , y : Math . round ( r . y * a + o + f . height / 2 ) } , c = e . style ; c . left = l . x + "px" , c . top = l . y + "px" , c . display = this . fitsInCanvas ( l , i ) ? "" : "none" , n . onPlaceLabel ( e , t ) } } ) , n . Plot . NodeTypes = new t ( { none : { render : e . empty , contains : e . lambda ( ! 1 ) } , circle : { render : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; this . nodeHelper . circle . render ( "fill" , n , r , t ) } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; return this . nodeHelper . circle . contains ( n , t , r ) } } , ellipse : { render : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "width" ) , i = e . getData ( "height" ) ; this . nodeHelper . ellipse . render ( "fill" , n , r , i , t ) } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "width" ) , i = e . getData ( "height" ) ; return this . nodeHelper . ellipse . contains ( n , t , r , i ) } } , square : { render : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; this . nodeHelper . square . render ( "fill" , n , r , t ) } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; return this . nodeHelper . square . contains ( n , t , r ) } } , rectangle : { render : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "width" ) , i = e . getData ( "height" ) ; this . nodeHelper . rectangle . render ( "fill" , n , r , i , t ) } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "width" ) , i = e . getData ( "height" ) ; return this . nodeHelper . rectangle . contains ( n , t , r , i ) } } , triangle : { render : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; this . nodeHelper . triangle . render ( "fill" , n , r , t ) } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; return this . nodeHelper . triangle . contains ( n , t , r ) } } , star : { render : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; this . nodeHelper . star . render ( "fill" , n , r , t ) } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "dim" ) ; return this . nodeHelper . star . contains ( n , t , r ) } } } ) , n . Plot . EdgeTypes = new t ( { none : e . empty , line : { render : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) ; this . edgeHelper . line . render ( n , r , t ) } , contains : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) ; return this . edgeHelper . line . contains ( n , r , t , this . edge . epsilon ) } } , arrow : { render : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) , i = e . getData ( "dim" ) , s = e . data . $direction , o = s && s . length > 1 && s [ 0 ] != e . nodeFrom . id ; this . edgeHelper . arrow . render ( n , r , i , o , t ) } , contains : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) ; return this . edgeHelper . arrow . contains ( n , r , t , this . edge . epsilon ) } } } ) } ( $jit . ForceDirected ) , $jit . TM = { } ; var E = $jit . TM ; $jit . TM . $extend = ! 0 , E . Base = { layout : { orientation : "h" , vertical : function ( ) { return this . orientation == "v" } , horizontal : function ( ) { return this . orientation == "h" } , change : function ( ) { this . orientation = this . vertical ( ) ? "h" : "v" } } , initialize : function ( t ) { var n = { orientation : "h" , titleHeight : 13 , offset : 2 , levelsToShow : 0 , constrained : ! 1 , animate : ! 1 , Node : { type : "rectangle" , overridable : ! 0 , width : 3 , height : 3 , color : "#444" } , Label : { textAlign : "center" , textBaseline : "top" } , Edge : { type : "none" } , duration : 700 , fps : 45 } ; this . controller = this . config = e . merge ( i ( "Canvas" , "Node" , "Edge" , "Fx" , "Controller" , "Tips" , "NodeStyles" , "Events" , "Navigation" , "Label" ) , n , t ) , this . layout . orientation = this . config . orientation ; var r = this . config ; r . useCanvas ? ( this . canvas = r . useCanvas , this . config . labelContainer = this . canvas . id + "-label" ) : ( r . background && ( r . background = e . merge ( { type : "Circles" } , r . background ) ) , this . canvas = new f ( this , r ) , this . config . labelContainer = ( typeof r . injectInto == "string" ? r . injectInto : r . injectInto . id ) + "-label" ) , this . graphOptions = { complex : ! 0 , Node : { selected : ! 1 , exist : ! 0 , drawn : ! 0 } } , this . graph = new d ( this . graphOptions , this . config . Node , this . config . Edge ) , this . labels = new E . Label [ r . Label . type ] ( this ) , this . fx = new E . Plot ( this ) , this . op = new E . Op ( this ) , this . group = new E . Group ( this ) , this . geom = new E . Geom ( this ) , this . clickedNode = null , this . busy = ! 1 , this . initializeExtras ( ) } , refresh : function ( ) { if ( this . busy ) return ; this . busy = ! 0 ; var t = this ; if ( this . config . animate ) this . compute ( "end" ) , this . config . levelsToShow > 0 && this . geom . setRightLevelToShow ( this . graph . getNode ( this . clickedNode && this . clickedNode . i
) , e . addEvents ( t , { mouseup : function ( t , r ) { var i = e . event . get ( t , r ) ; n . handleEvent ( "MouseUp" , t , r , n . makeEventObject ( t , r ) , e . event . isRightClick ( i ) ) } , mousedown : function ( t , r ) { var i = e . event . get ( t , r ) ; n . handleEvent ( "MouseDown" , t , r , n . makeEventObject ( t , r ) , e . event . isRightClick ( i ) ) } , mousemove : function ( e , t ) { n . handleEvent ( "MouseMove" , e , t , n . makeEventObject ( e , t ) ) } , mouseover : function ( e , t ) { n . handleEvent ( "MouseOver" , e , t , n . makeEventObject ( e , t ) ) } , mouseout : function ( e , t ) { n . handleEvent ( "MouseOut" , e , t , n . makeEventObject ( e , t ) ) } , touchstart : function ( e , t ) { n . handleEvent ( "TouchStart" , e , t , n . makeEventObject ( e , t ) ) } , touchmove : function ( e , t ) { n . handleEvent ( "TouchMove" , e , t , n . makeEventObject ( e , t ) ) } , touchend : function ( e , t ) { n . handleEvent ( "TouchEnd" , e , t , n . makeEventObject ( e , t ) ) } } ) ; var r = function ( t , r ) { var i = e . event . get ( t , r ) , s = e . event . getWheel ( i ) ; n . handleEvent ( "MouseWheel" , t , r , s ) } ; ! document . getBoxObjectFor && window . mozInnerScreenX == null ? e . addEvent ( t , "mousewheel" , r ) : t . addEventListener ( "DOMMouseScroll" , r , ! 1 ) } , register : function ( e ) { this . registeredObjects . push ( e ) } , handleEvent : function ( ) { var e = Array . prototype . slice . call ( arguments ) , t = e . shift ( ) ; for ( var n = 0 , r = this . registeredObjects , i = r . length ; n < i ; n ++ ) r [ n ] [ "on" + t ] . apply ( r [ n ] , e ) } , makeEventObject : function ( t , n ) { var r = this , i = this . viz . graph , s = this . viz . fx , o = s . nodeTypes , u = s . edgeTypes ; return { pos : ! 1 , node : ! 1 , edge : ! 1 , contains : ! 1 , getNodeCalled : ! 1 , getEdgeCalled : ! 1 , getPos : function ( ) { var i = r . viz . canvas , s = i . getSize ( ) , o = i . getPos ( ) , u = i . translateOffsetX , a = i . translateOffsetY , f = i . scaleOffsetX , l = i . scaleOffsetY , c = e . event . getPos ( t , n ) ; return this . pos = { x : ( c . x - o . x - s . width / 2 - u ) * 1 / f , y : ( c . y - o . y - s . height / 2 - a ) * 1 / l } , this . pos } , getNode : function ( ) { if ( this . getNodeCalled ) return this . node ; this . getNodeCalled = ! 0 ; for ( var e in i . nodes ) { var t = i . nodes [ e ] , n = t && o [ t . getData ( "type" ) ] , u = n && n . contains && n . contains . call ( s , t , this . getPos ( ) ) ; if ( u ) return this . contains = u , r . node = this . node = t } return r . node = this . node = ! 1 } , getEdge : function ( ) { if ( this . getEdgeCalled ) return this . edge ; this . getEdgeCalled = ! 0 ; var e = { } ; for ( var t in i . edges ) { var n = i . edges [ t ] ; e [ t ] = ! 0 ; for ( var o in n ) { if ( o in e ) continue ; var a = n [ o ] , f = a && u [ a . getData ( "type" ) ] , l = f && f . contains && f . contains . call ( s , a , this . getPos ( ) ) ; if ( l ) return this . contains = l , r . edge = this . edge = a } } return r . edge = this . edge = ! 1 } , getContains : function ( ) { return this . getNodeCalled ? this . contains : ( this . getNode ( ) , this . contains ) } } } } ) , a = { initializeExtras : function ( ) { var t = new u ( this ) , n = this ; e . each ( [ "NodeStyles" , "Tips" , "Navigation" , "Events" ] , function ( e ) { var r = new a . Classes [ e ] ( e , n ) ; r . isEnabled ( ) && t . register ( r ) , r . setAsProperty ( ) && ( n [ e . toLowerCase ( ) ] = r ) } ) } } ; a . Classes = { } , a . Classes . Events = new t ( { Implements : [ s , o ] , initializePost : function ( ) { this . fx = this . viz . fx , this . ntypes = this . viz . fx . nodeTypes , this . etypes = this . viz . fx . edgeTypes , this . hovered = ! 1 , this . pressed = ! 1 , this . touched = ! 1 , this . touchMoved = ! 1 , this . moved = ! 1 } , setAsProperty : e . lambda ( ! 0 ) , onMouseUp : function ( t , n , r , i ) { var s = e . event . get ( t , n ) ; this . moved || ( i ? this . config . onRightClick ( this . hovered , r , s ) : this . config . onClick ( this . pressed , r , s ) ) , this . pressed && ( this . moved ? this . config . onDragEnd ( this . pressed , r , s ) : this . config . onDragCancel ( this . pressed , r , s ) , this . pressed = this . moved = ! 1 ) } , onMouseOut : function ( t , n , r ) { var i = e . event . get ( t , n ) , s ; if ( this . dom && ( s = this . isLabel ( t , n ) ) ) { this . config . onMouseLeave ( this . viz . graph . getNode ( s . id ) , r , i ) , this . hovered = ! 1 ; return } var o = i . relatedTarget , u = this . canvas . getElement ( ) ; while ( o && o . parentNode ) { if ( u == o . parentNode ) return ; o = o . parentNode } this . hovered && ( this . config . onMouseLeave ( this . hovered , r , i ) , this . hovered = ! 1 ) } , onMouseOver : function ( t , n , r ) { var i = e . event . get ( t , n ) , s ; this . dom && ( s = this . isLabel ( t , n ) ) && ( this . hovered = this . viz . graph . getNode ( s . id ) , this . config . onMouseEnter ( this . hovered , r , i ) ) } , onMouseMove : function ( t , n , r ) { var i , s = e . event . get ( t , n ) ; if ( this . pressed ) { this . moved = ! 0 , this . config . onDragMove ( this . pressed , r , s ) ; return } if ( this . dom ) this . config . onMouseMove ( this . hovered , r , s ) ; else { if ( this . hovered ) { var o = this . hovered , u = o . nodeFrom ? this . etypes [ o . getData ( "type" ) ] : this . ntypes [ o . getData ( "type" ) ] , a = u && u . contains && u . contains . call ( this . fx , o , r . getPos ( ) ) ; if ( a ) { this . config . onMouseMove ( o , r , s ) ; return } this . config . onMouseLeave ( o , r , s ) , this . hovered = ! 1 } ( this . hovered = r
, contains : function ( e , t , n , r ) { n /= 2 , r /= 2 ; var i = ( n + r ) / 2 , s = e . x - t . x , o = e . y - t . y , u = s * s + o * o ; return u <= i * i } } , square : { render : function ( e , t , n , r ) { r . getCtx ( ) [ e + "Rect" ] ( t . x - n , t . y - n , 2 * n , 2 * n ) } , contains : function ( e , t , n ) { return Math . abs ( t . x - e . x ) <= n && Math . abs ( t . y - e . y ) <= n } } , rectangle : { render : function ( e , t , n , r , i ) { i . getCtx ( ) [ e + "Rect" ] ( t . x - n / 2 , t . y - r / 2 , n , r ) } , contains : function ( e , t , n , r ) { return Math . abs ( t . x - e . x ) <= n / 2 && Math . abs ( t . y - e . y ) <= r / 2 } } , triangle : { render : function ( e , t , n , r ) { var i = r . getCtx ( ) , s = t . x , o = t . y - n , u = s - n , a = t . y + n , f = s + n , l = a ; i . beginPath ( ) , i . moveTo ( s , o ) , i . lineTo ( u , a ) , i . lineTo ( f , l ) , i . closePath ( ) , i [ e ] ( ) } , contains : function ( e , t , n ) { return m . circle . contains ( e , t , n ) } } , star : { render : function ( e , t , n , r ) { var i = r . getCtx ( ) , s = Math . PI / 5 ; i . save ( ) , i . translate ( t . x , t . y ) , i . beginPath ( ) , i . moveTo ( n , 0 ) ; for ( var o = 0 ; o < 9 ; o ++ ) i . rotate ( s ) , o % 2 == 0 ? i . lineTo ( n / . 525731 * . 200811 , 0 ) : i . lineTo ( n , 0 ) ; i . closePath ( ) , i [ e ] ( ) , i . restore ( ) } , contains : function ( e , t , n ) { return m . circle . contains ( e , t , n ) } } } , g = { line : { render : function ( e , t , n ) { var r = n . getCtx ( ) ; r . beginPath ( ) , r . moveTo ( e . x , e . y ) , r . lineTo ( t . x , t . y ) , r . stroke ( ) } , contains : function ( e , t , n , r ) { var i = Math . min , s = Math . max , o = i ( e . x , t . x ) , u = s ( e . x , t . x ) , a = i ( e . y , t . y ) , f = s ( e . y , t . y ) ; if ( n . x >= o && n . x <= u && n . y >= a && n . y <= f ) { if ( Math . abs ( t . x - e . x ) <= r ) return ! 0 ; var l = ( t . y - e . y ) / ( t . x - e . x ) * ( n . x - e . x ) + e . y ; return Math . abs ( l - n . y ) <= r } return ! 1 } } , arrow : { render : function ( e , t , n , r , i ) { var s = i . getCtx ( ) ; if ( r ) { var o = e ; e = t , t = o } var u = new h ( t . x - e . x , t . y - e . y ) ; u . $scale ( n / u . norm ( ) ) ; var a = new h ( t . x - u . x , t . y - u . y ) , f = new h ( - u . y / 2.5 , u . x / 2.5 ) , l = a . add ( f ) , c = a . $add ( f . $scale ( - 1 ) ) , p = new h ( t . x - e . x , t . y - e . y ) ; p . $scale ( 15 / p . norm ( ) ) ; var d = new h ( t . x - p . x , t . y - p . y ) ; t . x = d . x , t . y = d . y , s . beginPath ( ) , s . moveTo ( e . x , e . y ) , s . lineTo ( t . x , t . y ) , s . stroke ( ) , s . beginPath ( ) , s . moveTo ( l . x , l . y ) , s . lineTo ( c . x , c . y ) , s . lineTo ( t . x , t . y ) , s . closePath ( ) , s . fill ( ) } , contains : function ( e , t , n , r ) { return g . line . contains ( e , t , n , r ) } } , hyperline : { render : function ( e , t , n , r ) { function f ( e , t ) { var n = e . x * t . y - e . y * t . x , r = n , i = e . squaredNorm ( ) , s = t . squaredNorm ( ) ; if ( n == 0 ) return { x : 0 , y : 0 , ratio : - 1 } ; var o = ( e . y * s - t . y * i + e . y - t . y ) / n , u = ( t . x * i - e . x * s + t . x - e . x ) / r , a = - o / 2 , f = - u / 2 , l = ( o * o + u * u ) / 4 - 1 ; if ( l < 0 ) return { x : 0 , y : 0 , ratio : - 1 } ; var c = Math . sqrt ( l ) , h = { x : a , y : f , ratio : c > 1e3 ? - 1 : c , a : o , b : u } ; return h } function a ( e , t ) { return e < t ? e + Math . PI > t ? ! 1 : ! 0 : t + Math . PI > e ? ! 0 : ! 1 } var i = r . getCtx ( ) , s = f ( e , t ) ; if ( s . a > 1e3 || s . b > 1e3 || s . ratio < 0 ) i . beginPath ( ) , i . moveTo ( e . x * n , e . y * n ) , i . lineTo ( t . x * n , t . y * n ) , i . stroke ( ) ; else { var o = Math . atan2 ( t . y - s . y , t . x - s . x ) , u = Math . atan2 ( e . y - s . y , e . x - s . x ) , a = a ( o , u ) ; i . beginPath ( ) , i . arc ( s . x * n , s . y * n , s . ratio * n , o , u , a ) , i . stroke ( ) } } , contains : e . lambda ( ! 1 ) } } ; d . Plot = { initialize : function ( e , t ) { this . viz = e , this . config = e . config , this . node = e . config . Node , this . edge = e . config . Edge , this . animation = new r , this . nodeTypes = new t . Plot . NodeTypes , this . edgeTypes = new t . Plot . EdgeTypes , this . labels = e . labels } , nodeHelper : m , edgeHelper : g , Interpolator : { map : { border : "color" , color : "color" , width : "number" , height : "number" , dim : "number" , alpha : "number" , lineWidth : "number" , angularWidth : "number" , span : "number" , valueArray : "array-number" , dimArray : "array-number" } , canvas : { globalAlpha : "number" , fillStyle : "color" , strokeStyle : "color" , lineWidth : "number" , shadowBlur : "number" , shadowColor : "color" , shadowOffsetX : "number" , shadowOffsetY : "number" , miterLimit : "number" } , label : { size : "number" , color : "color" } , compute : function ( e , t , n ) { return e + ( t - e ) * n } , moebius : function ( e , t , n , r ) { var i = r . scale ( - n ) ; if ( i . norm ( ) < 1 ) { var s = i . x , o = i . y , u = e . startPos . getc ( ) . moebiusTransformation ( i ) ; e . pos . setc ( u . x , u . y ) , i . x = s , i . y = o } } , linear : function ( e , t , n ) { var r = e . startPos . getc ( ! 0 ) , i = e . endPos . getc ( ! 0 ) ; e . pos . setc ( this . compute ( r . x , i . x , n ) , this . compute ( r . y , i . y , n ) ) } , polar : function ( e , t , n ) { var r = e . startPos . getp ( ! 0 ) , i = e . endPos . getp ( ) , s = i . interpolate ( r , n ) ; e . pos . setp ( s . theta , s . rho ) } , number : function ( e , t , n , r , i ) { var s = e [ r ] ( t , "start" ) , o = e [ r ] ( t , "end" ) ; e [ i ] ( t , this . compute ( s , o , n ) ) } , color : function ( t , n , r , i , s ) { var o = e . hexToRgb ( t [ i ] ( n , "start" ) ) , u = e . hexToRgb ( t [ i ] ( n , "end" ) ) , a = this . compute , f = e . rgbToHex ( [ parseInt ( a ( o [ 0 ] , u [ 0 ] , r ) ) , parseInt ( a ( o [ 1 ] , u [ 1 ] , r ) ) , parseInt ( a ( o [ 2 ] , u [ 2 ] , r ) ) ] ) ; t [ s ] ( n , f ) } , "array-number" : function ( e , t , n , r , i ) { var s = e [ r ] ( t , "start" ) , o = e [ r ] ( t , "end" ) , u = [ ] ; for ( var a = 0 , f = s . length ; a < f ; a ++ ) { var l = s [ a ] , c = o [ a ] ; if ( l . length ) { for ( var h = 0 , p = l . leng
. implement ( nodeSettings ) , $jit . ForceDirected . Plot . EdgeTypes . implement ( edgeSettings ) , $jit . RGraph . Plot . NodeTypes . implement ( nodeSettings ) , $jit . RGraph . Plot . EdgeTypes . implement ( edgeSettings ) , $ ( document ) . ready ( function ( ) { $ ( "#sideOptionOrganize" ) . bind ( "click" , function ( ) { organizeOpen || openOrganize ( ) } ) , $ ( "#closeOrganize" ) . bind ( "click" , function ( ) { organizeOpen && closeOrganize ( ) } ) } ) , function ( e ) { function t ( t , n , r ) { var i , s , o = t . width , u = t . width , a , f ; f = e ( t . parentNode ) , this . element = i = f . append ( "<canvas class='reflection' style='position:absolute'/>" ) . find ( ":last" ) [ 0 ] ; if ( ! i . getContext && e . browser . msie ) this . element = i = f . append ( "<img class='reflection' style='position:absolute'/>" ) . find ( ":last" ) [ 0 ] , i . src = t . src , i . style . filter = "flipv progid:DXImageTransform.Microsoft.Alpha(opacity=" + r * 100 + ", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy=" + n / u * 100 + ")" ; else { s = i . getContext ( "2d" ) ; try { e ( i ) . attr ( { width : o , height : n } ) , s . save ( ) , s . translate ( 0 , u - 1 ) , s . scale ( 1 , - 1 ) , s . drawImage ( t , 0 , 0 , o , u ) , s . restore ( ) , s . globalCompositeOperation = "destination-out" , a = s . createLinearGradient ( 0 , 0 , 0 , n ) , a . addColorStop ( 0 , "rgba(255, 255, 255, " + ( 1 - r ) + ")" ) , a . addColorStop ( 1 , "rgba(255, 255, 255, 1.0)" ) , s . fillStyle = a , s . fillRect ( 0 , 0 , o , n ) } catch ( l ) { return } } e ( i ) . attr ( { alt : e ( t ) . attr ( "alt" ) , title : e ( t ) . attr ( "title" ) } ) } var n = function ( n , r ) { this . orgWidth = n . width , this . orgHeight = n . height , this . image = n , this . reflection = null , this . alt = n . alt , this . title = n . title , this . imageOK = ! 1 , this . options = r , this . imageOK = ! 0 , this . options . reflHeight > 0 && ( this . reflection = new t ( this . image , this . options . reflHeight , this . options . reflOpacity ) ) , e ( this . image ) . css ( "position" , "absolute" ) } , r = function ( t , r , i ) { var s = [ ] , o = Math . sin , u = Math . cos , a = this ; this . controlTimer = 0 , this . stopped = ! 1 , this . container = t , this . xRadius = i . xRadius , this . yRadius = i . yRadius , this . showFrontTextTimer = 0 , this . autoRotateTimer = 0 , i . xRadius === 0 && ( this . xRadius = e ( t ) . width ( ) / 2.3 ) , i . yRadius === 0 && ( this . yRadius = e ( t ) . height ( ) / 6 ) , this . xCentre = i . xPos , this . yCentre = i . yPos , this . frontIndex = 0 , this . rotation = this . destRotation = Math . PI / 2 , this . timeDelay = 1e3 / i . FPS , i . altBox !== null && ( e ( i . altBox ) . css ( "display" , "block" ) , e ( i . titleBox ) . css ( "display" , "block" ) ) , e ( t ) . css ( { position : "relative" , overflow : "hidden" } ) , e ( i . buttonLeft ) . css ( "display" , "inline" ) , e ( i . buttonRight ) . css ( "display" , "inline" ) , e ( i . buttonLeft ) . bind ( "mouseup" , this , function ( e ) { return e . data . rotate ( - 1 ) , ! 1 } ) , e ( i . buttonRight ) . bind ( "mouseup" , this , function ( e ) { return e . data . rotate ( 1 ) , ! 1 } ) , i . mouseWheel && e ( t ) . bind ( "mousewheel" , this , function ( e , t ) { return e . data . rotate ( t ) , ! 1 } ) , e ( t ) . bind ( "mouseover click" , this , function ( t ) { clearInterval ( t . data . autoRotateTimer ) ; var n = e ( t . target ) . attr ( "alt" ) ; if ( n !== undefined && n !== null ) { clearTimeout ( t . data . showFrontTextTimer ) , e ( i . altBox ) . html ( e ( t . target ) . attr ( "alt" ) ) ; if ( i . bringToFront && t . type == "click" ) { e ( i . titleBox ) . html ( e ( t . target ) . attr ( "title" ) ) , e ( "#topic_metacode" ) . val ( e ( t . target ) . attr ( "title" ) ) ; var s = e ( t . target ) . data ( "itemIndex" ) , o = t . data . frontIndex , u = ( s - o ) % r . length ; Math . abs ( u ) > r . length / 2 && ( u += u > 0 ? - r . length : r . length ) , t . data . rotate ( - u ) } } } ) , e ( t ) . bind ( "mouseout" , this , function ( e ) { var t = e . data ; clearTimeout ( t . showFrontTextTimer ) , t . showFrontTextTimer = setTimeout ( function ( ) { t . showFrontText ( ) } , 1e3 ) , t . autoRotate ( ) } ) , e ( t ) . bind ( "mousedown" , this , function ( e ) { return e . data . container . focus ( ) , ! 1 } ) , t . onselectstart = function ( ) { return ! 1 } , this . innerWrapper = e ( t ) . wrapInner ( '<div style="position:absolute;width:100%;height:100%;"/>' ) . children ( ) [ 0 ] , this . showFrontText = function ( ) { if ( s [ this . frontIndex ] === undefined ) return ; e ( "#topic_metacode" ) . val ( e ( s [ this . frontIndex ] . image ) . attr ( "title" ) ) , e ( i . titleBox ) . html ( e ( s [ this . frontIndex ] . image ) . attr ( "title" ) ) , e ( i . altBox ) . html ( e ( s [ this . frontIndex ] . image ) . attr ( "alt" ) ) } , this . go = function ( ) { if ( this . controlTimer !== 0 ) return ; var e = this ; this . controlTimer = setTimeout ( function ( ) { e . updateAll ( ) } , this . timeDelay ) } , this . stop = function ( ) { clearTimeout ( this . controlTimer ) , this . controlTimer = 0 } , this . rotate = function ( e ) { this . frontIndex -= e , this . frontIndex %= s . length , this . destRotation += Math . PI / s . length * 2 * e , this . showFrontText ( ) , this . go ( ) } , this . autoRotate = function ( ) { if ( i . autoRotate !== "no" ) { var e = i . autoRotate === "right" ? 1 : - 1 ; this . autoRota
, this . instance . fromOutside = r ) , this . instance . currentItem && this . instance . _mouseDrag ( t ) ) : this . instance . isOver && ( this . instance . isOver = 0 , this . instance . cancelHelperRemoval = ! 0 , this . instance . options . revert = ! 1 , this . instance . _trigger ( "out" , t , this . instance . _uiHash ( this . instance ) ) , this . instance . _mouseStop ( t , ! 0 ) , this . instance . options . helper = this . instance . options . _helper , this . instance . currentItem . remove ( ) , this . instance . placeholder && this . instance . placeholder . remove ( ) , r . _trigger ( "fromSortable" , t ) , r . dropped = ! 1 ) } ) } } ) , e . ui . plugin . add ( "draggable" , "cursor" , { start : function ( t , n ) { var r = e ( "body" ) , i = e ( this ) . data ( "draggable" ) . options ; r . css ( "cursor" ) && ( i . _cursor = r . css ( "cursor" ) ) , r . css ( "cursor" , i . cursor ) } , stop : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) . options ; r . _cursor && e ( "body" ) . css ( "cursor" , r . _cursor ) } } ) , e . ui . plugin . add ( "draggable" , "opacity" , { start : function ( t , n ) { var r = e ( n . helper ) , i = e ( this ) . data ( "draggable" ) . options ; r . css ( "opacity" ) && ( i . _opacity = r . css ( "opacity" ) ) , r . css ( "opacity" , i . opacity ) } , stop : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) . options ; r . _opacity && e ( n . helper ) . css ( "opacity" , r . _opacity ) } } ) , e . ui . plugin . add ( "draggable" , "scroll" , { start : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) ; r . scrollParent [ 0 ] != document && r . scrollParent [ 0 ] . tagName != "HTML" && ( r . overflowOffset = r . scrollParent . offset ( ) ) } , drag : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) , i = r . options , s = ! 1 ; if ( r . scrollParent [ 0 ] != document && r . scrollParent [ 0 ] . tagName != "HTML" ) { if ( ! i . axis || i . axis != "x" ) r . overflowOffset . top + r . scrollParent [ 0 ] . offsetHeight - t . pageY < i . scrollSensitivity ? r . scrollParent [ 0 ] . scrollTop = s = r . scrollParent [ 0 ] . scrollTop + i . scrollSpeed : t . pageY - r . overflowOffset . top < i . scrollSensitivity && ( r . scrollParent [ 0 ] . scrollTop = s = r . scrollParent [ 0 ] . scrollTop - i . scrollSpeed ) ; if ( ! i . axis || i . axis != "y" ) r . overflowOffset . left + r . scrollParent [ 0 ] . offsetWidth - t . pageX < i . scrollSensitivity ? r . scrollParent [ 0 ] . scrollLeft = s = r . scrollParent [ 0 ] . scrollLeft + i . scrollSpeed : t . pageX - r . overflowOffset . left < i . scrollSensitivity && ( r . scrollParent [ 0 ] . scrollLeft = s = r . scrollParent [ 0 ] . scrollLeft - i . scrollSpeed ) } else { if ( ! i . axis || i . axis != "x" ) t . pageY - e ( document ) . scrollTop ( ) < i . scrollSensitivity ? s = e ( document ) . scrollTop ( e ( document ) . scrollTop ( ) - i . scrollSpeed ) : e ( window ) . height ( ) - ( t . pageY - e ( document ) . scrollTop ( ) ) < i . scrollSensitivity && ( s = e ( document ) . scrollTop ( e ( document ) . scrollTop ( ) + i . scrollSpeed ) ) ; if ( ! i . axis || i . axis != "y" ) t . pageX - e ( document ) . scrollLeft ( ) < i . scrollSensitivity ? s = e ( document ) . scrollLeft ( e ( document ) . scrollLeft ( ) - i . scrollSpeed ) : e ( window ) . width ( ) - ( t . pageX - e ( document ) . scrollLeft ( ) ) < i . scrollSensitivity && ( s = e ( document ) . scrollLeft ( e ( document ) . scrollLeft ( ) + i . scrollSpeed ) ) } s !== ! 1 && e . ui . ddmanager && ! i . dropBehaviour && e . ui . ddmanager . prepareOffsets ( r , t ) } } ) , e . ui . plugin . add ( "draggable" , "snap" , { start : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) , i = r . options ; r . snapElements = [ ] , e ( i . snap . constructor != String ? i . snap . items || ":data(draggable)" : i . snap ) . each ( function ( ) { var t = e ( this ) , n = t . offset ( ) ; this != r . element [ 0 ] && r . snapElements . push ( { item : this , width : t . outerWidth ( ) , height : t . outerHeight ( ) , top : n . top , left : n . left } ) } ) } , drag : function ( t , n ) { var r = e ( this ) . data ( "draggable" ) , i = r . options , s = i . snapTolerance , o = n . offset . left , u = o + r . helperProportions . width , f = n . offset . top , l = f + r . helperProportions . height ; for ( var c = r . snapElements . length - 1 ; c >= 0 ; c -- ) { var h = r . snapElements [ c ] . left , p = h + r . snapElements [ c ] . width , d = r . snapElements [ c ] . top , v = d + r . snapElements [ c ] . height ; if ( ! ( h - s < o && o < p + s && d - s < f && f < v + s || h - s < o && o < p + s && d - s < l && l < v + s || h - s < u && u < p + s && d - s < f && f < v + s || h - s < u && u < p + s && d - s < l && l < v + s ) ) { r . snapElements [ c ] . snapping && r . options . snap . release && r . options . snap . release . call ( r . element , t , e . extend ( r . _uiHash ( ) , { snapItem : r . snapElements [ c ] . item } ) ) , r . snapElements [ c ] . snapping = ! 1 ; continue } if ( i . snapMode != "inner" ) { var m = Math . abs ( d - l ) <= s , g = Math . abs ( v - f ) <= s , y = Math . abs ( h - u ) <= s , b = Math . abs ( p - o ) <= s ; m && ( n . position . top = r . _convertPositionTo ( "relative" , { top : d - r . helperProportions . height , left : 0 } ) . top - r . margins . top ) , g && ( n . position . top = r . _convertPositionTo ( "relative" , { top : v , left : 0 } ) . top - r . margins . top ) , y && ( n . position . left = r . _convertPositionTo ( "relative" , { top : 0 , left : h - r . helperProportions . width } ) . left - r . margins . left ) , b && ( n . positio