2014-02-03 05:35:21 +00: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 )
* /
2014-02-04 01:43:31 +00:00
function BestInPlaceEditor ( e ) { this . element = e , this . initOptions ( ) , this . bindForm ( ) , this . initNil ( ) , jQuery ( this . activator ) . bind ( "click" , { editor : this } , this . clickHandler ) } 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 . setData ( "alpha" , . 4 , "end" ) , e . eachAdjacency ( function ( e ) { e . setData ( "alpha" , . 2 , "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" , . 4 , "end" ) } ) } ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : e } ) } function filterTopicsByMap ( e ) { Mconsole . graph . eachNode ( function ( t ) { t . getData ( "inmaps" ) . indexOf ( parseInt ( e ) ) !== - 1 ? t . setData ( "alpha" , 1 , "end" ) : t . setData ( "alpha" , . 4 , "end" ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : 500 } ) } ) } function filterTopicsByMapper ( e ) { Mconsole . graph . eachNode ( function ( t ) { t . getData ( "userid" ) . toString ( ) == e ? t . setData ( "alpha" , 1 , "end" ) : t . setData ( "alpha" , . 4 , "end" ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : 500 } ) } ) } function filterTopicsByName ( e ) { Mconsole . graph . eachNode ( function ( t ) { nodeName = t . name . toLowerCase ( ) , nodeName . indexOf ( e ) !== - 1 && e != "" ? t . setData ( "alpha" , 1 , "end" ) : t . setData ( "alpha" , . 4 , "end" ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : 500 } ) } ) } function clearCanvas ( ) { Mconsole . graph . eachNode ( function ( e ) { Mconsole . graph . removeNode ( e . id ) } ) , Mconsole . plot ( ) } function clearCanvasExceptRoot ( ) { var e = new Array ; Mconsole . graph . eachNode ( function ( t ) { e . push ( t . id ) } ) ; var t = Mconsole . graph . nodes [ Mconsole . root ] ; e . forEach ( function ( e , n ) { e != t . id && Mconsole . graph . removeNode ( e ) } ) , fetchRelatives ( t ) } function selectEdgeOnClickHandler ( e , t ) { if ( Mconsole . busy ) return ; if ( synapseWasDoubleClicked ( ) ) { synapseDoubleClickHandler ( e , t ) ; return } var n = MetamapsModel . selectedEdges . indexOf ( e ) ; n == - 1 ? n = ! 1 : n != - 1 && ( n = ! 0 ) , n && t . shiftKey ? deselectEdge ( e ) : ! n && t . shiftKey ? selectEdge ( e ) : n && ! t . shiftKey ? deselectAllEdges ( ) : ! n && ! t . shiftKey && ( deselectAllEdges ( ) , selectEdge ( e ) ) , Mconsole . plot ( ) } function synapseDoubleClickHandler ( e , t ) { editEdge ( e , t ) } function synapseWasDoubleClicked ( ) { var e = MetamapsModel . lastSynapseClick , t = Date . now ( ) ; return MetamapsModel . lastSynapseClick = t , t - e < MetamapsModel . DOUBLE _CLICK _TOLERANCE ? ! 0 : ! 1 } function nodeDoubleClickHandler ( e , t ) { openNodeShowcard ( e ) } function enterKeyHandler ( ) { $ ( ".new_topic" ) . css ( "display" ) != "none" && $ ( ".new_topic" ) . submit ( ) } function escKeyHandler ( ) { deselectAllEdges ( ) , deselectAllNodes ( ) } function keepFromCommons ( e , t ) { if ( userid == null ) return ; return $ ( "#topic_addSynapse" ) . val ( "false" ) , $ ( "#topic_x" ) . val ( 0 ) , $ ( "#topic_y" ) . val ( 0 ) , $ ( "#topic_grabTopic" ) . val ( t ) , $ ( ".new_topic" ) . submit ( ) , e . preventDefault ( ) , e . stopPropagation ( ) , ! 1 } function nodeWasDoubleClicked ( ) { var e = MetamapsModel . lastNodeClick , t = Date . now ( ) ; return MetamapsModel . lastNodeClick = t , t - e < MetamapsModel . DOUBLE _CLICK _TOLERANCE ? ! 0 : ! 1 } function selectNodeOnClickHandler ( e , t ) { if ( Mconsole . busy ) return ; if ( nodeWasDoubleClicked ( ) ) { nodeDoubleClickHandler ( e , t ) ; return } t . shiftKey || Mconsole . graph . eachNode ( function ( t ) { t . id != e . id && deselectNode ( t ) } ) , e . selected ? deselectNode ( e ) : selectNode ( e ) , Mconsole . fx . animate ( { modes : [ "edge-property:lineWidth:color:alpha" ] , duration : 500 } ) , Mconsole . plot ( ) } function selectNodeOnRightClickHandler ( e , t ) { t . preventDefault ( ) , t . stopPropagation ( ) ; if ( Mconsole . busy ) return ; selectNod
2014-02-03 05:35:21 +00:00
r + "/removefrommap" } ) } hideEdge ( n ) } MetamapsModel . selectedEdges = new Array } function deleteSelectedEdges ( ) { var e = MetamapsModel . selectedEdges . length ; for ( var t = e - 1 ; t >= 0 ; t -= 1 ) { var n = MetamapsModel . selectedEdges [ t ] , r = n . getData ( "id" ) ; $ . ajax ( { type : "DELETE" , url : "/synapses/" + r } ) , hideEdge ( n ) } MetamapsModel . selectedEdges = new Array } function selectNode ( e ) { if ( MetamapsModel . selectedNodes . indexOf ( e ) != - 1 ) return ; e . selected = ! 0 , e . setData ( "dim" , 30 , "current" ) , e . setData ( "whiteCircle" , ! 0 ) , e . eachAdjacency ( function ( e ) { selectEdge ( e ) } ) , MetamapsModel . selectedNodes . push ( e ) } function deselectNode ( e ) { delete e . selected , e . setData ( "whiteCircle" , ! 1 ) , e . eachAdjacency ( function ( e ) { deselectEdge ( e ) } ) , e . setData ( "dim" , 25 , "current" ) , MetamapsModel . selectedNodes . splice ( MetamapsModel . selectedNodes . indexOf ( e ) , 1 ) } function selectEdge ( e ) { if ( MetamapsModel . selectedEdges . indexOf ( e ) != - 1 ) return ; e . setData ( "showDesc" , ! 0 , "current" ) , MetamapsModel . embed ? MetamapsModel . embed && e . setDataset ( "end" , { lineWidth : 4 , color : "#999" , alpha : 1 } ) : e . setDataset ( "end" , { lineWidth : 4 , color : "#FFFFFF" , alpha : 1 } ) , Mconsole . fx . animate ( { modes : [ "edge-property:lineWidth:color:alpha" ] , duration : 100 } ) , MetamapsModel . selectedEdges . push ( e ) } function deselectEdge ( e ) { e . setData ( "showDesc" , ! 1 , "current" ) , e . setDataset ( "end" , { lineWidth : 2 , color : "#222222" , alpha : . 4 } ) , MetamapsModel . edgeHoveringOver == e && ( e . setData ( "showDesc" , ! 0 , "current" ) , e . setDataset ( "end" , { lineWidth : 4 , color : "#222222" , alpha : 1 } ) ) , Mconsole . fx . animate ( { modes : [ "edge-property:lineWidth:color:alpha" ] , duration : 100 } ) , MetamapsModel . selectedEdges . splice ( MetamapsModel . selectedEdges . indexOf ( e ) , 1 ) } function hideNode ( e ) { var t = Mconsole . graph . getNode ( e ) ; if ( e == Mconsole . root && gType == "centered" ) { alert ( "You can't hide this topic, it is the root of your graph." ) ; return } deselectNode ( t ) , t . setData ( "alpha" , 0 , "end" ) , t . eachAdjacency ( function ( e ) { e . setData ( "alpha" , 0 , "end" ) } ) , Mconsole . fx . animate ( { modes : [ "node-property:alpha" , "edge-property:alpha" ] , duration : 1e3 } ) , Mconsole . graph . removeNode ( e ) } function hideSelectedNodes ( ) { var e = MetamapsModel . selectedNodes . length ; for ( var t = e - 1 ; t >= 0 ; t -= 1 ) { var n = MetamapsModel . selectedNodes [ t ] ; hideNode ( n . id ) } } function removeNode ( e ) { var t = Mconsole . graph . getNode ( e ) ; deselectNode ( t ) , mapperm && $ . ajax ( { type : "POST" , url : "/topics/" + mapid + "/" + e + "/removefrommap" } ) } function removeSelectedNodes ( ) { if ( mapperm ) { var e = MetamapsModel . selectedNodes . length ; for ( var t = e - 1 ; t >= 0 ; t -= 1 ) { var n = MetamapsModel . selectedNodes [ t ] ; removeNode ( n . id ) } } } function deleteNode ( e ) { if ( e == Mconsole . root && gType == "centered" ) { alert ( "You can't delete this topic, it is the root of your graph." ) ; return } $ . ajax ( { type : "DELETE" , url : "/topics/" + e } ) } function deleteSelectedNodes ( ) { var e = MetamapsModel . selectedNodes . length ; for ( var t = e - 1 ; t >= 0 ; t -= 1 ) { var n = MetamapsModel . selectedNodes [ t ] ; deleteNode ( n . id ) } } function addHoverForSettings ( ) { $ ( ".permActivator" ) . unbind ( "mouseover" ) , $ ( ".permActivator" ) . unbind ( "mouseout" ) ; var e = ! 1 , t , n ; $ ( ".permActivator" ) . bind ( "mouseover" , function ( ) { clearTimeout ( n ) , that = this , t = setTimeout ( function ( ) { e || ( e = ! 0 , $ ( that ) . animate ( { width : "203px" , height : "37px" } , 300 , function ( ) { e = ! 1 } ) ) } , 300 ) } ) , $ ( ".permActivator" ) . bind ( "mouseout" , function ( ) { clearTimeout ( t ) , that = this , n = setTimeout ( function ( ) { e || ( e = ! 0 , $ ( that ) . animate ( { height : "16px" , width : "16px" } , 300 , function ( ) { e = ! 1 } ) ) } , 800 ) } ) , $ ( ".best_in_place_permission" ) . unbind ( "ajax:success" ) , $ ( ".best_in_place_permission" ) . bind ( "ajax:success" , function ( ) { var e = $ ( this ) . html ( ) , t = $ ( this ) . parents ( ".cardSettings" ) . find ( ".mapPerm" ) ; t . attr ( "title" , e ) , e == "commons" ? t . html ( "co" ) : e == "public" ? t . html ( "pu" ) : e == "private" && t . html ( "pr" ) } ) } function saveLayoutAll ( ) { $ ( ".wandSaveLayout" ) . html ( "Saving..." ) ; var e = "" ; if ( gType == "arranged" || gType == "chaotic" ) Mconsole . graph . eachNode ( function ( t ) { e = e + t . getData ( "mappingid" ) + "/" + t . pos . x + "/" + t . pos . y + "," } ) , e = e . slice ( 0 , - 1 ) , $ ( "#map_coordinates" ) . val ( e ) , $ ( "#saveMapLayout" ) . submit ( ) } function saveLayout ( e ) { var t = Mconsole . graph . getNode ( e ) ; $ ( "#map_coordinates" ) . val ( t . getData ( "mappingid" ) + "/" + t . pos . x + "/" + t . pos . y ) , $ ( "#saveMapLayout" ) . submit ( ) , dragged = 0 , $ ( ".wandSaveLayout" ) . html ( "Saved!" ) , setTimeout ( function ( ) { $ ( ".wandSaveLayout" ) . html ( "Save Layout" ) } , 1500 ) } function saveToMap ( ) { var e = "" , t = ""
) if ( ! i . className && t . length === 1 ) i . className = e ; else { s = " " + i . className + " " ; for ( o = 0 , u = t . length ; o < u ; o ++ ) ~ s . indexOf ( " " + t [ o ] + " " ) || ( s += t [ o ] + " " ) ; i . className = v . trim ( s ) } } } return this } , removeClass : function ( e ) { var n , r , i , s , o , u , a ; if ( v . isFunction ( e ) ) return this . each ( function ( t ) { v ( this ) . removeClass ( e . call ( this , t , this . className ) ) } ) ; if ( e && typeof e == "string" || e === t ) { n = ( e || "" ) . split ( y ) ; for ( u = 0 , a = this . length ; u < a ; u ++ ) { i = this [ u ] ; if ( i . nodeType === 1 && i . className ) { r = ( " " + i . className + " " ) . replace ( q , " " ) ; for ( s = 0 , o = n . length ; s < o ; s ++ ) while ( r . indexOf ( " " + n [ s ] + " " ) > - 1 ) r = r . replace ( " " + n [ s ] + " " , " " ) ; i . className = e ? v . trim ( r ) : "" } } } return this } , toggleClass : function ( e , t ) { var n = typeof e , r = typeof t == "boolean" ; return v . isFunction ( e ) ? this . each ( function ( n ) { v ( this ) . toggleClass ( e . call ( this , n , this . className , t ) , t ) } ) : this . each ( function ( ) { if ( n === "string" ) { var i , s = 0 , o = v ( this ) , u = t , a = e . split ( y ) ; while ( i = a [ s ++ ] ) u = r ? u : ! o . hasClass ( i ) , o [ u ? "addClass" : "removeClass" ] ( i ) } else if ( n === "undefined" || n === "boolean" ) this . className && v . _data ( this , "__className__" , this . className ) , this . className = this . className || e === ! 1 ? "" : v . _data ( this , "__className__" ) || "" } ) } , hasClass : function ( e ) { var t = " " + e + " " , n = 0 , r = this . length ; for ( ; n < r ; n ++ ) if ( this [ n ] . nodeType === 1 && ( " " + this [ n ] . className + " " ) . replace ( q , " " ) . indexOf ( t ) > - 1 ) return ! 0 ; return ! 1 } , val : function ( e ) { var n , r , i , s = this [ 0 ] ; if ( ! arguments . length ) { if ( s ) return n = v . valHooks [ s . type ] || v . valHooks [ s . nodeName . toLowerCase ( ) ] , n && "get" in n && ( r = n . get ( s , "value" ) ) !== t ? r : ( r = s . value , typeof r == "string" ? r . replace ( R , "" ) : r == null ? "" : r ) ; return } return i = v . isFunction ( e ) , this . each ( function ( r ) { var s , o = v ( this ) ; if ( this . nodeType !== 1 ) return ; i ? s = e . call ( this , r , o . val ( ) ) : s = e , s == null ? s = "" : typeof s == "number" ? s += "" : v . isArray ( s ) && ( s = v . map ( s , function ( e ) { return e == null ? "" : e + "" } ) ) , n = v . valHooks [ this . type ] || v . valHooks [ this . nodeName . toLowerCase ( ) ] ; if ( ! n || ! ( "set" in n ) || n . set ( this , s , "value" ) === t ) this . value = s } ) } } ) , v . extend ( { valHooks : { option : { get : function ( e ) { var t = e . attributes . value ; return ! t || t . specified ? e . value : e . text } } , select : { get : function ( e ) { var t , n , r , i , s = e . selectedIndex , o = [ ] , u = e . options , a = e . type === "select-one" ; if ( s < 0 ) return null ; n = a ? s : 0 , r = a ? s + 1 : u . length ; for ( ; n < r ; n ++ ) { i = u [ n ] ; if ( i . selected && ( v . support . optDisabled ? ! i . disabled : i . getAttribute ( "disabled" ) === null ) && ( ! i . parentNode . disabled || ! v . nodeName ( i . parentNode , "optgroup" ) ) ) { t = v ( i ) . val ( ) ; if ( a ) return t ; o . push ( t ) } } return a && ! o . length && u . length ? v ( u [ s ] ) . val ( ) : o } , set : function ( e , t ) { var n = v . makeArray ( t ) ; return v ( e ) . find ( "option" ) . each ( function ( ) { this . selected = v . inArray ( v ( this ) . val ( ) , n ) >= 0 } ) , n . length || ( e . selectedIndex = - 1 ) , n } } } , attrFn : { } , attr : function ( e , n , r , i ) { var s , o , u , a = e . nodeType ; if ( ! e || a === 3 || a === 8 || a === 2 ) return ; if ( i && v . isFunction ( v . fn [ n ] ) ) return v ( e ) [ n ] ( r ) ; if ( typeof e . getAttribute == "undefined" ) return v . prop ( e , n , r ) ; u = a !== 1 || ! v . isXMLDoc ( e ) , u && ( n = n . toLowerCase ( ) , o = v . attrHooks [ n ] || ( X . test ( n ) ? F : j ) ) ; if ( r !== t ) { if ( r === null ) { v . removeAttr ( e , n ) ; return } return o && "set" in o && u && ( s = o . set ( e , r , n ) ) !== t ? s : ( e . setAttribute ( n , "" + r ) , r ) } return o && "get" in o && u && ( s = o . get ( e , n ) ) !== null ? s : ( s = e . getAttribute ( n ) , s === null ? t : s ) } , removeAttr : function ( e , t ) { var n , r , i , s , o = 0 ; if ( t && e . nodeType === 1 ) { r = t . split ( y ) ; for ( ; o < r . length ; o ++ ) i = r [ o ] , i && ( n = v . propFix [ i ] || i , s = X . test ( i ) , s || v . attr ( e , i , "" ) , e . removeAttribute ( V ? i : n ) , s && n in e && ( e [ n ] = ! 1 ) ) } } , attrHooks : { type : { set : function ( e , t ) { if ( U . test ( e . nodeName ) && e . parentNode ) v . error ( "type property can't be changed" ) ; else if ( ! v . support . radioValue && t === "radio" && v . nodeName ( e , "input" ) ) { var n = e . value ; return e . setAttribute ( "type" , t ) , n && ( e . value = n ) , t } } } , value : { get : function ( e , t ) { return j && v . nodeName ( e , "button" ) ? j . get ( e , t ) : t in e ? e . value : null } , set : function ( e , t , n ) { if ( j && v . nodeName ( e , "button" ) ) return j . set ( e , t , n ) ; e . value = t } } } , propFix : { tabindex : "tabIndex" , readonly : "readOnly" , "for" : "htmlFor" , "class" : "className" , maxlength : "maxLength" , cellspacing : "cellSpacing" , cellpadding : "cellPadding" , rowspan : "rowSpan" , colspan : "colSpan" , usemap : "useMap" , frameborder : "frameBorder" , contenteditable : "contentEditable" } , prop : function ( e , n , r ) { var i , s , o , u = e . nodeType ; if ( ! e || u === 3 || u === 8 || u === 2 ) return ; return o = u !== 1 || ! v . isXMLDoc ( e ) , o && ( n = v . propFix [ n ] || n , s = v . propHooks [ n ] ) , r !== t ? s && "set" in s && ( i = s . set ( e , r , n ) ) !== t ? i
) } catch ( n ) { } } ) , s = new RegExp ( s . join ( "|" ) ) , Y . matchesSelector = function ( t , n ) { n = n . replace ( r , "='$1']" ) ; if ( ! u ( t ) && ! s . test ( n ) && ( ! i || ! i . test ( n ) ) ) try { var a = o . call ( t , n ) ; if ( a || e || t . document && t . document . nodeType !== 11 ) return a } catch ( f ) { } return Y ( n , null , null , [ t ] ) . length > 0 } ) } ( ) , s . setFilters . nth = s . setFilters . eq , s . filters = s . pseudos , Y . attr = v . attr , v . find = Y , v . expr = Y . selectors , v . expr [ ":" ] = v . expr . pseudos , v . unique = Y . uniqueSort , v . text = Y . getText , v . isXMLDoc = Y . isXML , v . contains = Y . contains } ( e ) ; var nt = /Until$/ , rt = /^(?:parents|prev(?:Until|All))/ , it = /^.[^:#\[\.,]*$/ , st = v . expr . match . needsContext , ot = { children : ! 0 , contents : ! 0 , next : ! 0 , prev : ! 0 } ; v . fn . extend ( { find : function ( e ) { var t , n , r , i , s , o , u = this ; if ( typeof e != "string" ) return v ( e ) . filter ( function ( ) { for ( t = 0 , n = u . length ; t < n ; t ++ ) if ( v . contains ( u [ t ] , this ) ) return ! 0 } ) ; o = this . pushStack ( "" , "find" , e ) ; for ( t = 0 , n = this . length ; t < n ; t ++ ) { r = o . length , v . find ( e , this [ t ] , o ) ; if ( t > 0 ) for ( i = r ; i < o . length ; i ++ ) for ( s = 0 ; s < r ; s ++ ) if ( o [ s ] === o [ i ] ) { o . splice ( i -- , 1 ) ; break } } return o } , has : function ( e ) { var t , n = v ( e , this ) , r = n . length ; return this . filter ( function ( ) { for ( t = 0 ; t < r ; t ++ ) if ( v . contains ( this , n [ t ] ) ) return ! 0 } ) } , not : function ( e ) { return this . pushStack ( ft ( this , e , ! 1 ) , "not" , e ) } , filter : function ( e ) { return this . pushStack ( ft ( this , e , ! 0 ) , "filter" , e ) } , is : function ( e ) { return ! ! e && ( typeof e == "string" ? st . test ( e ) ? v ( e , this . context ) . index ( this [ 0 ] ) >= 0 : v . filter ( e , this ) . length > 0 : this . filter ( e ) . length > 0 ) } , closest : function ( e , t ) { var n , r = 0 , i = this . length , s = [ ] , o = st . test ( e ) || typeof e != "string" ? v ( e , t || this . context ) : 0 ; for ( ; r < i ; r ++ ) { n = this [ r ] ; while ( n && n . ownerDocument && n !== t && n . nodeType !== 11 ) { if ( o ? o . index ( n ) > - 1 : v . find . matchesSelector ( n , e ) ) { s . push ( n ) ; break } n = n . parentNode } } return s = s . length > 1 ? v . unique ( s ) : s , this . pushStack ( s , "closest" , e ) } , index : function ( e ) { return e ? typeof e == "string" ? v . inArray ( this [ 0 ] , v ( e ) ) : v . inArray ( e . jquery ? e [ 0 ] : e , this ) : this [ 0 ] && this [ 0 ] . parentNode ? this . prevAll ( ) . length : - 1 } , add : function ( e , t ) { var n = typeof e == "string" ? v ( e , t ) : v . makeArray ( e && e . nodeType ? [ e ] : e ) , r = v . merge ( this . get ( ) , n ) ; return this . pushStack ( ut ( n [ 0 ] ) || ut ( r [ 0 ] ) ? r : v . unique ( r ) ) } , addBack : function ( e ) { return this . add ( e == null ? this . prevObject : this . prevObject . filter ( e ) ) } } ) , v . fn . andSelf = v . fn . addBack , v . each ( { parent : function ( e ) { var t = e . parentNode ; return t && t . nodeType !== 11 ? t : null } , parents : function ( e ) { return v . dir ( e , "parentNode" ) } , parentsUntil : function ( e , t , n ) { return v . dir ( e , "parentNode" , n ) } , next : function ( e ) { return at ( e , "nextSibling" ) } , prev : function ( e ) { return at ( e , "previousSibling" ) } , nextAll : function ( e ) { return v . dir ( e , "nextSibling" ) } , prevAll : function ( e ) { return v . dir ( e , "previousSibling" ) } , nextUntil : function ( e , t , n ) { return v . dir ( e , "nextSibling" , n ) } , prevUntil : function ( e , t , n ) { return v . dir ( e , "previousSibling" , n ) } , siblings : function ( e ) { return v . sibling ( ( e . parentNode || { } ) . firstChild , e ) } , children : function ( e ) { return v . sibling ( e . firstChild ) } , contents : function ( e ) { return v . nodeName ( e , "iframe" ) ? e . contentDocument || e . contentWindow . document : v . merge ( [ ] , e . childNodes ) } } , function ( e , t ) { v . fn [ e ] = function ( n , r ) { var i = v . map ( this , t , n ) ; return nt . test ( e ) || ( r = n ) , r && typeof r == "string" && ( i = v . filter ( r , i ) ) , i = this . length > 1 && ! ot [ e ] ? v . unique ( i ) : i , this . length > 1 && rt . test ( e ) && ( i = i . reverse ( ) ) , this . pushStack ( i , e , l . call ( arguments ) . join ( "," ) ) } } ) , v . extend ( { filter : function ( e , t , n ) { return n && ( e = ":not(" + e + ")" ) , t . length === 1 ? v . find . matchesSelector ( t [ 0 ] , e ) ? [ t [ 0 ] ] : [ ] : v . find . matches ( e , t ) } , dir : function ( e , n , r ) { var i = [ ] , s = e [ n ] ; while ( s && s . nodeType !== 9 && ( r === t || s . nodeType !== 1 || ! v ( s ) . is ( r ) ) ) s . nodeType === 1 && i . push ( s ) , s = s [ n ] ; return i } , sibling : function ( e , t ) { var n = [ ] ; for ( ; e ; e = e . nextSibling ) e . nodeType === 1 && e !== t && n . push ( e ) ; return n } } ) ; var ct = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video" , ht = / jQuery\d+="(?:null|\d+)"/g , pt = /^\s+/ , dt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi , vt = /<([\w:]+)/ , mt = /<tbody/i , gt = /<|&#?\w+;/ , yt = /<(?:script|style|link)/i , bt = /<(?:script|object|embed|option|style)/i , wt = new RegExp ( "<(?:" + ct + ")[\\s/>]" , "i" ) , Et = /^(?:checkbox|radio)$/ , St = /checked\s*(?:[^=]|=\s*.checked.)/i , xt = /\/(java|ecma)script/i , Tt = / ^ \ s * < ! ( ? : \ [ C D A T A \ [ | \ - \ - ) | [ \ ] \ - ] { 2 }
. nodeName . toLowerCase ( ) !== "map" ? ! 1 : ( u = e ( "img[usemap=#" + o + "]" ) [ 0 ] , ! ! u && r ( u ) ) } return ( /input|select|textarea|button|object/ . test ( i ) ? ! t . disabled : "a" == i ? t . href || n : n ) && r ( t ) } function r ( t ) { return ! e ( t ) . parents ( ) . andSelf ( ) . filter ( function ( ) { return e . curCSS ( this , "visibility" ) === "hidden" || e . expr . filters . hidden ( this ) } ) . length } e . ui = e . ui || { } ; if ( e . ui . version ) return ; e . extend ( e . ui , { version : "1.8.23" , keyCode : { ALT : 18 , BACKSPACE : 8 , CAPS _LOCK : 20 , COMMA : 188 , COMMAND : 91 , COMMAND _LEFT : 91 , COMMAND _RIGHT : 93 , CONTROL : 17 , DELETE : 46 , DOWN : 40 , END : 35 , ENTER : 13 , ESCAPE : 27 , HOME : 36 , INSERT : 45 , LEFT : 37 , MENU : 93 , NUMPAD _ADD : 107 , NUMPAD _DECIMAL : 110 , NUMPAD _DIVIDE : 111 , NUMPAD _ENTER : 108 , NUMPAD _MULTIPLY : 106 , NUMPAD _SUBTRACT : 109 , PAGE _DOWN : 34 , PAGE _UP : 33 , PERIOD : 190 , RIGHT : 39 , SHIFT : 16 , SPACE : 32 , TAB : 9 , UP : 38 , WINDOWS : 91 } } ) , e . fn . extend ( { propAttr : e . fn . prop || e . fn . attr , _focus : e . fn . focus , focus : function ( t , n ) { return typeof t == "number" ? this . each ( function ( ) { var r = this ; setTimeout ( function ( ) { e ( r ) . focus ( ) , n && n . call ( r ) } , t ) } ) : this . _focus . apply ( this , arguments ) } , scrollParent : function ( ) { var t ; return e . browser . msie && /(static|relative)/ . test ( this . css ( "position" ) ) || /absolute/ . test ( this . css ( "position" ) ) ? t = this . parents ( ) . filter ( function ( ) { return /(relative|absolute|fixed)/ . test ( e . curCSS ( this , "position" , 1 ) ) && /(auto|scroll)/ . test ( e . curCSS ( this , "overflow" , 1 ) + e . curCSS ( this , "overflow-y" , 1 ) + e . curCSS ( this , "overflow-x" , 1 ) ) } ) . eq ( 0 ) : t = this . parents ( ) . filter ( function ( ) { return /(auto|scroll)/ . test ( e . curCSS ( this , "overflow" , 1 ) + e . curCSS ( this , "overflow-y" , 1 ) + e . curCSS ( this , "overflow-x" , 1 ) ) } ) . eq ( 0 ) , /fixed/ . test ( this . css ( "position" ) ) || ! t . length ? e ( document ) : t } , zIndex : function ( n ) { if ( n !== t ) return this . css ( "zIndex" , n ) ; if ( this . length ) { var r = e ( this [ 0 ] ) , i , s ; while ( r . length && r [ 0 ] !== document ) { i = r . css ( "position" ) ; if ( i === "absolute" || i === "relative" || i === "fixed" ) { s = parseInt ( r . css ( "zIndex" ) , 10 ) ; if ( ! isNaN ( s ) && s !== 0 ) return s } r = r . parent ( ) } } return 0 } , disableSelection : function ( ) { return this . bind ( ( e . support . selectstart ? "selectstart" : "mousedown" ) + ".ui-disableSelection" , function ( e ) { e . preventDefault ( ) } ) } , enableSelection : function ( ) { return this . unbind ( ".ui-disableSelection" ) } } ) , e ( "<a>" ) . outerWidth ( 1 ) . jquery || e . each ( [ "Width" , "Height" ] , function ( n , r ) { function u ( t , n , r , s ) { return e . each ( i , function ( ) { n -= parseFloat ( e . curCSS ( t , "padding" + this , ! 0 ) ) || 0 , r && ( n -= parseFloat ( e . curCSS ( t , "border" + this + "Width" , ! 0 ) ) || 0 ) , s && ( n -= parseFloat ( e . curCSS ( t , "margin" + this , ! 0 ) ) || 0 ) } ) , n } var i = r === "Width" ? [ "Left" , "Right" ] : [ "Top" , "Bottom" ] , s = r . toLowerCase ( ) , o = { innerWidth : e . fn . innerWidth , innerHeight : e . fn . innerHeight , outerWidth : e . fn . outerWidth , outerHeight : e . fn . outerHeight } ; e . fn [ "inner" + r ] = function ( n ) { return n === t ? o [ "inner" + r ] . call ( this ) : this . each ( function ( ) { e ( this ) . css ( s , u ( this , n ) + "px" ) } ) } , e . fn [ "outer" + r ] = function ( t , n ) { return typeof t != "number" ? o [ "outer" + r ] . call ( this , t ) : this . each ( function ( ) { e ( this ) . css ( s , u ( this , t , ! 0 , n ) + "px" ) } ) } } ) , e . extend ( e . expr [ ":" ] , { data : e . expr . createPseudo ? e . expr . createPseudo ( function ( t ) { return function ( n ) { return ! ! e . data ( n , t ) } } ) : function ( t , n , r ) { return ! ! e . data ( t , r [ 3 ] ) } , focusable : function ( t ) { return n ( t , ! isNaN ( e . attr ( t , "tabindex" ) ) ) } , tabbable : function ( t ) { var r = e . attr ( t , "tabindex" ) , i = isNaN ( r ) ; return ( i || r >= 0 ) && n ( t , ! i ) } } ) , e ( function ( ) { var t = document . body , n = t . appendChild ( n = document . createElement ( "div" ) ) ; n . offsetHeight , e . extend ( n . style , { minHeight : "100px" , height : "auto" , padding : 0 , borderWidth : 0 } ) , e . support . minHeight = n . offsetHeight === 100 , e . support . selectstart = "onselectstart" in n , t . removeChild ( n ) . style . display = "none" } ) , e . curCSS || ( e . curCSS = e . css ) , e . extend ( e . ui , { plugin : { add : function ( t , n , r ) { var i = e . ui [ t ] . prototype ; for ( var s in r ) i . plugins [ s ] = i . plugins [ s ] || [ ] , i . plugins [ s ] . push ( [ n , r [ s ] ] ) } , call : function ( e , t , n ) { var r = e . plugins [ t ] ; if ( ! r || ! e . element [ 0 ] . parentNode ) return ; for ( var i = 0 ; i < r . length ; i ++ ) e . options [ r [ i ] [ 0 ] ] && r [ i ] [ 1 ] . apply ( e . element , n ) } } , contains : function ( e , t ) { return document . compareDocumentPosition ? e . compareDocumentPosition ( t ) & 16 : e !== t && e . contains ( t ) } , hasScroll : function ( t , n ) { if ( e ( t ) . css ( "overflow" ) === "hidden" ) return ! 1 ; var r = n && n === "left" ? "scrollLeft" : "scrollTop" , i = ! 1 ; return t [ r ] > 0 ? ! 0 : ( t [ r ] = 1 , i = t [ r ] > 0 , t [ r ] = 0 , i ) } , isOverAxis : function ( e , t , n ) { return e > t && e < t + n } , isOver : function ( t , n , r , i , s , o ) { re
. droppables [ t . options . scope ] || [ ] , function ( ) { if ( ! this . options ) return ; ! this . options . disabled && this . visible && e . ui . intersect ( t , this , this . options . tolerance ) && ( r = this . _drop . call ( this , n ) || r ) , ! this . options . disabled && this . visible && this . accept . call ( this . element [ 0 ] , t . currentItem || t . element ) && ( this . isout = 1 , this . isover = 0 , this . _deactivate . call ( this , n ) ) } ) , r } , dragStart : function ( t , n ) { t . element . parents ( ":not(body,html)" ) . bind ( "scroll.droppable" , function ( ) { t . options . refreshPositions || e . ui . ddmanager . prepareOffsets ( t , n ) } ) } , drag : function ( t , n ) { t . options . refreshPositions && e . ui . ddmanager . prepareOffsets ( t , n ) , e . each ( e . ui . ddmanager . droppables [ t . options . scope ] || [ ] , function ( ) { if ( this . options . disabled || this . greedyChild || ! this . visible ) return ; var r = e . ui . intersect ( t , this , this . options . tolerance ) , i = ! r && this . isover == 1 ? "isout" : r && this . isover == 0 ? "isover" : null ; if ( ! i ) return ; var s ; if ( this . options . greedy ) { var o = this . element . parents ( ":data(droppable):eq(0)" ) ; o . length && ( s = e . data ( o [ 0 ] , "droppable" ) , s . greedyChild = i == "isover" ? 1 : 0 ) } s && i == "isover" && ( s . isover = 0 , s . isout = 1 , s . _out . call ( s , n ) ) , this [ i ] = 1 , this [ i == "isout" ? "isover" : "isout" ] = 0 , this [ i == "isover" ? "_over" : "_out" ] . call ( this , n ) , s && i == "isout" && ( s . isout = 0 , s . isover = 1 , s . _over . call ( s , n ) ) } ) } , dragStop : function ( t , n ) { t . element . parents ( ":not(body,html)" ) . unbind ( "scroll.droppable" ) , t . options . refreshPositions || e . ui . ddmanager . prepareOffsets ( t , n ) } } } ( jQuery ) , function ( e , t ) { e . widget ( "ui.resizable" , e . ui . mouse , { widgetEventPrefix : "resize" , options : { alsoResize : ! 1 , animate : ! 1 , animateDuration : "slow" , animateEasing : "swing" , aspectRatio : ! 1 , autoHide : ! 1 , containment : ! 1 , ghost : ! 1 , grid : ! 1 , handles : "e,s,se" , helper : ! 1 , maxHeight : null , maxWidth : null , minHeight : 10 , minWidth : 10 , zIndex : 1e3 } , _create : function ( ) { var t = this , n = this . options ; this . element . addClass ( "ui-resizable" ) , e . extend ( this , { _aspectRatio : ! ! n . aspectRatio , aspectRatio : n . aspectRatio , originalElement : this . element , _proportionallyResizeElements : [ ] , _helper : n . helper || n . ghost || n . animate ? n . helper || "ui-resizable-helper" : null } ) , this . element [ 0 ] . nodeName . match ( /canvas|textarea|input|select|button|img/i ) && ( this . element . wrap ( e ( '<div class="ui-wrapper" style="overflow: hidden;"></div>' ) . css ( { position : this . element . css ( "position" ) , width : this . element . outerWidth ( ) , height : this . element . outerHeight ( ) , top : this . element . css ( "top" ) , left : this . element . css ( "left" ) } ) ) , this . element = this . element . parent ( ) . data ( "resizable" , this . element . data ( "resizable" ) ) , this . elementIsWrapper = ! 0 , this . element . css ( { marginLeft : this . originalElement . css ( "marginLeft" ) , marginTop : this . originalElement . css ( "marginTop" ) , marginRight : this . originalElement . css ( "marginRight" ) , marginBottom : this . originalElement . css ( "marginBottom" ) } ) , this . originalElement . css ( { marginLeft : 0 , marginTop : 0 , marginRight : 0 , marginBottom : 0 } ) , this . originalResizeStyle = this . originalElement . css ( "resize" ) , this . originalElement . css ( "resize" , "none" ) , this . _proportionallyResizeElements . push ( this . originalElement . css ( { position : "static" , zoom : 1 , display : "block" } ) ) , this . originalElement . css ( { margin : this . originalElement . css ( "margin" ) } ) , this . _proportionallyResize ( ) ) , this . handles = n . handles || ( e ( ".ui-resizable-handle" , this . element ) . length ? { n : ".ui-resizable-n" , e : ".ui-resizable-e" , s : ".ui-resizable-s" , w : ".ui-resizable-w" , se : ".ui-resizable-se" , sw : ".ui-resizable-sw" , ne : ".ui-resizable-ne" , nw : ".ui-resizable-nw" } : "e,s,se" ) ; if ( this . handles . constructor == String ) { this . handles == "all" && ( this . handles = "n,e,s,w,se,sw,ne,nw" ) ; var r = this . handles . split ( "," ) ; this . handles = { } ; for ( var i = 0 ; i < r . length ; i ++ ) { var s = e . trim ( r [ i ] ) , o = "ui-resizable-" + s , u = e ( '<div class="ui-resizable-handle ' + o + '"></div>' ) ; u . css ( { zIndex : n . zIndex } ) , "se" == s && u . addClass ( "ui-icon ui-icon-gripsmall-diagonal-se" ) , this . handles [ s ] = ".ui-resizable-" + s , this . element . append ( u ) } } this . _renderAxis = function ( t ) { t = t || this . element ; for ( var n in this . handles ) { this . handles [ n ] . constructor == String && ( this . handles [ n ] = e ( this . handles [ n ] , this . element ) . show ( ) ) ; if ( this . elementIsWrapper && this . originalElement [ 0 ] . nodeName . match ( /textarea|input|select|button/i ) ) { var r = e ( this . handles [ n ] , this . element ) , i = 0 ; i = /sw|ne|nw|se|n|s/ . test ( n ) ? r . outerHeight ( ) : r . outerWidth ( ) ; var s = [ "padding" , /ne|nw|n/ . test ( n ) ? "Top" : /se|sw|s/ .
items ) ? this . options . items . call ( this . element , null , { options : this . options , item : this . currentItem } ) : e ( this . options . items , this . element ) . not ( ".ui-sortable-helper" ) . not ( ".ui-sortable-placeholder" ) , this ] ) ; for ( var o = i . length - 1 ; o >= 0 ; o -- ) i [ o ] [ 0 ] . each ( function ( ) { r . push ( this ) } ) ; return e ( r ) } , _removeCurrentsFromItems : function ( ) { var e = this . currentItem . find ( ":data(" + this . widgetName + "-item)" ) ; for ( var t = 0 ; t < this . items . length ; t ++ ) for ( var n = 0 ; n < e . length ; n ++ ) e [ n ] == this . items [ t ] . item [ 0 ] && this . items . splice ( t , 1 ) } , _refreshItems : function ( t ) { this . items = [ ] , this . containers = [ this ] ; var n = this . items , r = this , i = [ [ e . isFunction ( this . options . items ) ? this . options . items . call ( this . element [ 0 ] , t , { item : this . currentItem } ) : e ( this . options . items , this . element ) , this ] ] , s = this . _connectWith ( ) ; if ( s && this . ready ) for ( var o = s . length - 1 ; o >= 0 ; o -- ) { var u = e ( s [ o ] ) ; for ( var a = u . length - 1 ; a >= 0 ; a -- ) { var f = e . data ( u [ a ] , this . widgetName ) ; f && f != this && ! f . options . disabled && ( i . push ( [ e . isFunction ( f . options . items ) ? f . options . items . call ( f . element [ 0 ] , t , { item : this . currentItem } ) : e ( f . options . items , f . element ) , f ] ) , this . containers . push ( f ) ) } } for ( var o = i . length - 1 ; o >= 0 ; o -- ) { var l = i [ o ] [ 1 ] , c = i [ o ] [ 0 ] ; for ( var a = 0 , h = c . length ; a < h ; a ++ ) { var p = e ( c [ a ] ) ; p . data ( this . widgetName + "-item" , l ) , n . push ( { item : p , instance : l , width : 0 , height : 0 , left : 0 , top : 0 } ) } } } , refreshPositions : function ( t ) { this . offsetParent && this . helper && ( this . offset . parent = this . _getParentOffset ( ) ) ; for ( var n = this . items . length - 1 ; n >= 0 ; n -- ) { var r = this . items [ n ] ; if ( r . instance != this . currentContainer && this . currentContainer && r . item [ 0 ] != this . currentItem [ 0 ] ) continue ; var i = this . options . toleranceElement ? e ( this . options . toleranceElement , r . item ) : r . item ; t || ( r . width = i . outerWidth ( ) , r . height = i . outerHeight ( ) ) ; var s = i . offset ( ) ; r . left = s . left , r . top = s . top } if ( this . options . custom && this . options . custom . refreshContainers ) this . options . custom . refreshContainers . call ( this ) ; else for ( var n = this . containers . length - 1 ; n >= 0 ; n -- ) { var s = this . containers [ n ] . element . offset ( ) ; this . containers [ n ] . containerCache . left = s . left , this . containers [ n ] . containerCache . top = s . top , this . containers [ n ] . containerCache . width = this . containers [ n ] . element . outerWidth ( ) , this . containers [ n ] . containerCache . height = this . containers [ n ] . element . outerHeight ( ) } return this } , _createPlaceholder : function ( t ) { var n = t || this , r = n . options ; if ( ! r . placeholder || r . placeholder . constructor == String ) { var i = r . placeholder ; r . placeholder = { element : function ( ) { var t = e ( document . createElement ( n . currentItem [ 0 ] . nodeName ) ) . addClass ( i || n . currentItem [ 0 ] . className + " ui-sortable-placeholder" ) . removeClass ( "ui-sortable-helper" ) [ 0 ] ; return i || ( t . style . visibility = "hidden" ) , t } , update : function ( e , t ) { if ( i && ! r . forcePlaceholderSize ) return ; t . height ( ) || t . height ( n . currentItem . innerHeight ( ) - parseInt ( n . currentItem . css ( "paddingTop" ) || 0 , 10 ) - parseInt ( n . currentItem . css ( "paddingBottom" ) || 0 , 10 ) ) , t . width ( ) || t . width ( n . currentItem . innerWidth ( ) - parseInt ( n . currentItem . css ( "paddingLeft" ) || 0 , 10 ) - parseInt ( n . currentItem . css ( "paddingRight" ) || 0 , 10 ) ) } } } n . placeholder = e ( r . placeholder . element . call ( n . element , n . currentItem ) ) , n . currentItem . after ( n . placeholder ) , r . placeholder . update ( n , n . placeholder ) } , _contactContainers : function ( t ) { var n = null , r = null ; for ( var i = this . containers . length - 1 ; i >= 0 ; i -- ) { if ( e . ui . contains ( this . currentItem [ 0 ] , this . containers [ i ] . element [ 0 ] ) ) continue ; if ( this . _intersectsWith ( this . containers [ i ] . containerCache ) ) { if ( n && e . ui . contains ( this . containers [ i ] . element [ 0 ] , n . element [ 0 ] ) ) continue ; n = this . containers [ i ] , r = i } else this . containers [ i ] . containerCache . over && ( this . containers [ i ] . _trigger ( "out" , t , this . _uiHash ( this ) ) , this . containers [ i ] . containerCache . over = 0 ) } if ( ! n ) return ; if ( this . containers . length === 1 ) this . containers [ r ] . _trigger ( "over" , t , this . _uiHash ( this ) ) , this . containers [ r ] . containerCache . over = 1 ; else if ( this . currentContainer != this . containers [ r ] ) { var s = 1e4 , o = null , u = this . positionAbs [ this . containers [ r ] . floating ? "left" : "top" ] ; for ( var a = this . items . length - 1 ; a >= 0 ; a -- ) { if ( ! e . ui . contains ( this . containers [ r ] . element [ 0 ] , this . items [ a ] . item [ 0 ] ) ) continue ; var f = this . containers [ r ] . floating ? this . items [ a ] . item . offset ( ) . left : this . items [ a ] . item . offset ( ) . top ; Math . abs ( f - u ) < s && ( s = Math . abs ( f - u ) , o = this . items [ a ] , this . direction = f - u > 0 ? "down" : "up" ) } if
: "neg" , h = { } , p = { } , d = { } ; h [ l ] = ( c == "pos" ? "-=" : "+=" ) + u , p [ l ] = ( c == "pos" ? "+=" : "-=" ) + u * 2 , d [ l ] = ( c == "pos" ? "-=" : "+=" ) + u * 2 , n . animate ( h , f , t . options . easing ) ; for ( var v = 1 ; v < a ; v ++ ) n . animate ( p , f , t . options . easing ) . animate ( d , f , t . options . easing ) ; n . animate ( p , f , t . options . easing ) . animate ( h , 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 . slide = function ( t ) { return this . queue ( function ( ) { var n = e ( this ) , r = [ "position" , "top" , "bottom" , "left" , "right" ] , i = e . effects . setMode ( n , t . options . mode || "show" ) , s = t . options . direction || "left" ; e . effects . save ( n , r ) , n . show ( ) , e . effects . createWrapper ( n ) . css ( { overflow : "hidden" } ) ; var u = s == "up" || s == "down" ? "top" : "left" , a = s == "up" || s == "left" ? "pos" : "neg" , f = t . options . distance || ( u == "top" ? n . outerHeight ( ! 0 ) : n . outerWidth ( ! 0 ) ) ; i == "show" && n . css ( u , a == "pos" ? isNaN ( f ) ? "-" + f : - f : f ) ; var l = { } ; l [ u ] = ( i == "show" ? a == "pos" ? "+=" : "-=" : a == "pos" ? "-=" : "+=" ) + f , n . animate ( l , { 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 ( this , arguments ) , n . dequeue ( ) } } ) } ) } } ( jQuery ) , function ( e , t ) { e . effects . transfer = function ( t ) { return this . queue ( function ( ) { var n = e ( this ) , r = e ( t . options . to ) , i = r . offset ( ) , s = { top : i . top , left : i . left , height : r . innerHeight ( ) , width : r . innerWidth ( ) } , u = n . offset ( ) , a = e ( '<div class="ui-effects-transfer"></div>' ) . appendTo ( document . body ) . addClass ( t . options . className ) . css ( { top : u . top , left : u . left , height : n . innerHeight ( ) , width : n . innerWidth ( ) , position : "absolute" } ) . animate ( s , t . duration , t . options . easing , function ( ) { a . remove ( ) , t . callback && t . callback . apply ( n [ 0 ] , arguments ) , n . dequeue ( ) } ) } ) } } ( jQuery ) , function ( e , t ) { e . widget ( "ui.accordion" , { options : { active : 0 , animated : "slide" , autoHeight : ! 0 , clearStyle : ! 1 , collapsible : ! 1 , event : "click" , fillSpace : ! 1 , header : "> li > :first-child,> :not(li):even" , icons : { header : "ui-icon-triangle-1-e" , headerSelected : "ui-icon-triangle-1-s" } , navigation : ! 1 , navigationFilter : function ( ) { return this . href . toLowerCase ( ) === location . href . toLowerCase ( ) } } , _create : function ( ) { var t = this , n = t . options ; t . running = 0 , t . element . addClass ( "ui-accordion ui-widget ui-helper-reset" ) . children ( "li" ) . addClass ( "ui-accordion-li-fix" ) , t . headers = t . element . find ( n . header ) . addClass ( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" ) . bind ( "mouseenter.accordion" , function ( ) { if ( n . disabled ) return ; e ( this ) . addClass ( "ui-state-hover" ) } ) . bind ( "mouseleave.accordion" , function ( ) { if ( n . disabled ) return ; e ( this ) . removeClass ( "ui-state-hover" ) } ) . bind ( "focus.accordion" , function ( ) { if ( n . disabled ) return ; e ( this ) . addClass ( "ui-state-focus" ) } ) . bind ( "blur.accordion" , function ( ) { if ( n . disabled ) return ; e ( this ) . removeClass ( "ui-state-focus" ) } ) , t . headers . next ( ) . addClass ( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) ; if ( n . navigation ) { var r = t . element . find ( "a" ) . filter ( n . navigationFilter ) . eq ( 0 ) ; if ( r . length ) { var i = r . closest ( ".ui-accordion-header" ) ; i . length ? t . active = i : t . active = r . closest ( ".ui-accordion-content" ) . prev ( ) } } t . active = t . _findActive ( t . active || n . active ) . addClass ( "ui-state-default ui-state-active" ) . toggleClass ( "ui-corner-all" ) . toggleClass ( "ui-corner-top" ) , t . active . next ( ) . addClass ( "ui-accordion-content-active" ) , t . _createIcons ( ) , t . resize ( ) , t . element . attr ( "role" , "tablist" ) , t . headers . attr ( "role" , "tab" ) . bind ( "keydown.accordion" , function ( e ) { return t . _keydown ( e ) } ) . next ( ) . attr ( "role" , "tabpanel" ) , t . headers . not ( t . active || "" ) . attr ( { "aria-expanded" : "false" , "aria-selected" : "false" , tabIndex : - 1 } ) . next ( ) . hide ( ) , t . active . length ? t . active . attr ( { "aria-expanded" : "true" , "aria-selected" : "true" , tabIndex : 0 } ) : t . headers . eq ( 0 ) . attr ( "tabIndex" , 0 ) , e . browser . safari || t . headers . find ( "a" ) . attr ( "tabIndex" , - 1 ) , n . event && t . headers . bind ( n . event . split ( " " ) . join ( ".accordion " ) + ".accordion" , function ( e ) { t . _clickHandler . call ( t , e , this ) , e . preventDefault ( ) } ) } , _createIcons : function ( ) { var t = this . options ; t . icons && ( e ( "<span></span>" ) . addClass ( "ui-icon " + t . icons . header ) . prependTo ( this . headers ) , this . active . children ( ".ui-icon" ) . toggleClass ( t . icons . header ) . t
function ( e , n ) { return this . _get ( t , n ) } ) , $ . data ( e , PROP _NAME , t ) , this . _setDate ( t , this . _getDefaultDate ( t ) , ! 0 ) , this . _updateDatepicker ( t ) , this . _updateAlternate ( t ) , t . settings . disabled && this . _disableDatepicker ( e ) , t . dpDiv . css ( "display" , "block" ) } , _dialogDatepicker : function ( e , t , n , r , i ) { var s = this . _dialogInst ; if ( ! s ) { this . uuid += 1 ; var o = "dp" + this . uuid ; this . _dialogInput = $ ( '<input type="text" id="' + o + '" style="position: absolute; top: -100px; width: 0px;"/>' ) , this . _dialogInput . keydown ( this . _doKeyDown ) , $ ( "body" ) . append ( this . _dialogInput ) , s = this . _dialogInst = this . _newInst ( this . _dialogInput , ! 1 ) , s . settings = { } , $ . data ( this . _dialogInput [ 0 ] , PROP _NAME , s ) } extendRemove ( s . settings , r || { } ) , t = t && t . constructor == Date ? this . _formatDate ( s , t ) : t , this . _dialogInput . val ( t ) , this . _pos = i ? i . length ? i : [ i . pageX , i . pageY ] : null ; if ( ! this . _pos ) { var u = document . documentElement . clientWidth , a = document . documentElement . clientHeight , f = document . documentElement . scrollLeft || document . body . scrollLeft , l = document . documentElement . scrollTop || document . body . scrollTop ; this . _pos = [ u / 2 - 100 + f , a / 2 - 150 + l ] } return this . _dialogInput . css ( "left" , this . _pos [ 0 ] + 20 + "px" ) . css ( "top" , this . _pos [ 1 ] + "px" ) , s . settings . onSelect = n , this . _inDialog = ! 0 , this . dpDiv . addClass ( this . _dialogClass ) , this . _showDatepicker ( this . _dialogInput [ 0 ] ) , $ . blockUI && $ . blockUI ( this . dpDiv ) , $ . data ( this . _dialogInput [ 0 ] , PROP _NAME , s ) , this } , _destroyDatepicker : function ( e ) { var t = $ ( e ) , n = $ . data ( e , PROP _NAME ) ; if ( ! t . hasClass ( this . markerClassName ) ) return ; var r = e . nodeName . toLowerCase ( ) ; $ . removeData ( e , PROP _NAME ) , r == "input" ? ( n . append . remove ( ) , n . trigger . remove ( ) , t . removeClass ( this . markerClassName ) . unbind ( "focus" , this . _showDatepicker ) . unbind ( "keydown" , this . _doKeyDown ) . unbind ( "keypress" , this . _doKeyPress ) . unbind ( "keyup" , this . _doKeyUp ) ) : ( r == "div" || r == "span" ) && t . removeClass ( this . markerClassName ) . empty ( ) } , _enableDatepicker : function ( e ) { var t = $ ( e ) , n = $ . data ( e , PROP _NAME ) ; if ( ! t . hasClass ( this . markerClassName ) ) return ; var r = e . nodeName . toLowerCase ( ) ; if ( r == "input" ) e . disabled = ! 1 , n . trigger . filter ( "button" ) . each ( function ( ) { this . disabled = ! 1 } ) . end ( ) . filter ( "img" ) . css ( { opacity : "1.0" , cursor : "" } ) ; else if ( r == "div" || r == "span" ) { var i = t . children ( "." + this . _inlineClass ) ; i . children ( ) . removeClass ( "ui-state-disabled" ) , i . find ( "select.ui-datepicker-month, select.ui-datepicker-year" ) . removeAttr ( "disabled" ) } this . _disabledInputs = $ . map ( this . _disabledInputs , function ( t ) { return t == e ? null : t } ) } , _disableDatepicker : function ( e ) { var t = $ ( e ) , n = $ . data ( e , PROP _NAME ) ; if ( ! t . hasClass ( this . markerClassName ) ) return ; var r = e . nodeName . toLowerCase ( ) ; if ( r == "input" ) e . disabled = ! 0 , n . trigger . filter ( "button" ) . each ( function ( ) { this . disabled = ! 0 } ) . end ( ) . filter ( "img" ) . css ( { opacity : "0.5" , cursor : "default" } ) ; else if ( r == "div" || r == "span" ) { var i = t . children ( "." + this . _inlineClass ) ; i . children ( ) . addClass ( "ui-state-disabled" ) , i . find ( "select.ui-datepicker-month, select.ui-datepicker-year" ) . attr ( "disabled" , "disabled" ) } this . _disabledInputs = $ . map ( this . _disabledInputs , function ( t ) { return t == e ? null : t } ) , this . _disabledInputs [ this . _disabledInputs . length ] = e } , _isDisabledDatepicker : function ( e ) { if ( ! e ) return ! 1 ; for ( var t = 0 ; t < this . _disabledInputs . length ; t ++ ) if ( this . _disabledInputs [ t ] == e ) return ! 0 ; return ! 1 } , _getInst : function ( e ) { try { return $ . data ( e , PROP _NAME ) } catch ( t ) { throw "Missing instance data for this datepicker" } } , _optionDatepicker : function ( e , t , n ) { var r = this . _getInst ( e ) ; if ( arguments . length == 2 && typeof t == "string" ) return t == "defaults" ? $ . extend ( { } , $ . datepicker . _defaults ) : r ? t == "all" ? $ . extend ( { } , r . settings ) : this . _get ( r , t ) : null ; var i = t || { } ; typeof t == "string" && ( i = { } , i [ t ] = n ) ; if ( r ) { this . _curInst == r && this . _hideDatepicker ( ) ; var s = this . _getDateDatepicker ( e , ! 0 ) , o = this . _getMinMaxDate ( r , "min" ) , u = this . _getMinMaxDate ( r , "max" ) ; extendRemove ( r . settings , i ) , o !== null && i . dateFormat !== undefined && i . minDate === undefined && ( r . settings . minDate = this . _formatDate ( r , o ) ) , u !== null && i . dateFormat !== undefined && i . maxDate === undefined && ( r . settings . maxDate = this . _formatDate ( r , u ) ) , this . _attachments ( $ ( e ) , r ) , this . _autoSize ( r ) , this . _setDate ( r , s ) , this . _updateAlternate ( r ) , this . _updateDatepicker ( r ) } } , _changeDatepicker : function ( e , t , n ) { this . _optionDatepicker ( e , t , n ) } , _refreshDatepicker : function ( e ) { var t = this . _getInst
( function ( ) { f . addClass ( "ui-state-hover" ) } , function ( ) { f . removeClass ( "ui-state-hover" ) } ) . focus ( function ( ) { f . addClass ( "ui-state-focus" ) } ) . blur ( function ( ) { f . removeClass ( "ui-state-focus" ) } ) . click ( function ( e ) { return t . close ( e ) , ! 1 } ) . appendTo ( a ) , l = ( t . uiDialogTitlebarCloseText = e ( "<span></span>" ) ) . addClass ( "ui-icon ui-icon-closethick" ) . text ( r . closeText ) . appendTo ( f ) , c = e ( "<span></span>" ) . addClass ( "ui-dialog-title" ) . attr ( "id" , s ) . html ( i ) . prependTo ( a ) ; e . isFunction ( r . beforeclose ) && ! e . isFunction ( r . beforeClose ) && ( r . beforeClose = r . beforeclose ) , a . find ( "*" ) . add ( a ) . disableSelection ( ) , r . draggable && e . fn . draggable && t . _makeDraggable ( ) , r . resizable && e . fn . resizable && t . _makeResizable ( ) , t . _createButtons ( r . buttons ) , t . _isOpen = ! 1 , e . fn . bgiframe && o . bgiframe ( ) } , _init : function ( ) { this . options . autoOpen && this . open ( ) } , destroy : function ( ) { var e = this ; return e . overlay && e . overlay . destroy ( ) , e . uiDialog . hide ( ) , e . element . unbind ( ".dialog" ) . removeData ( "dialog" ) . removeClass ( "ui-dialog-content ui-widget-content" ) . hide ( ) . appendTo ( "body" ) , e . uiDialog . remove ( ) , e . originalTitle && e . element . attr ( "title" , e . originalTitle ) , e } , widget : function ( ) { return this . uiDialog } , close : function ( t ) { var n = this , r , i ; if ( ! 1 === n . _trigger ( "beforeClose" , t ) ) return ; return n . overlay && n . overlay . destroy ( ) , n . uiDialog . unbind ( "keypress.ui-dialog" ) , n . _isOpen = ! 1 , n . options . hide ? n . uiDialog . hide ( n . options . hide , function ( ) { n . _trigger ( "close" , t ) } ) : ( n . uiDialog . hide ( ) , n . _trigger ( "close" , t ) ) , e . ui . dialog . overlay . resize ( ) , n . options . modal && ( r = 0 , e ( ".ui-dialog" ) . each ( function ( ) { this !== n . uiDialog [ 0 ] && ( i = e ( this ) . css ( "z-index" ) , isNaN ( i ) || ( r = Math . max ( r , i ) ) ) } ) , e . ui . dialog . maxZ = r ) , n } , isOpen : function ( ) { return this . _isOpen } , moveToTop : function ( t , n ) { var r = this , i = r . options , s ; return i . modal && ! t || ! i . stack && ! i . modal ? r . _trigger ( "focus" , n ) : ( i . zIndex > e . ui . dialog . maxZ && ( e . ui . dialog . maxZ = i . zIndex ) , r . overlay && ( e . ui . dialog . maxZ += 1 , r . overlay . $el . css ( "z-index" , e . ui . dialog . overlay . maxZ = e . ui . dialog . maxZ ) ) , s = { scrollTop : r . element . scrollTop ( ) , scrollLeft : r . element . scrollLeft ( ) } , e . ui . dialog . maxZ += 1 , r . uiDialog . css ( "z-index" , e . ui . dialog . maxZ ) , r . element . attr ( s ) , r . _trigger ( "focus" , n ) , r ) } , open : function ( ) { if ( this . _isOpen ) return ; var t = this , n = t . options , r = t . uiDialog ; return t . overlay = n . modal ? new e . ui . dialog . overlay ( t ) : null , t . _size ( ) , t . _position ( n . position ) , r . show ( n . show ) , t . moveToTop ( ! 0 ) , n . modal && r . bind ( "keydown.ui-dialog" , function ( t ) { if ( t . keyCode !== e . ui . keyCode . TAB ) return ; var n = e ( ":tabbable" , this ) , r = n . filter ( ":first" ) , i = n . filter ( ":last" ) ; if ( t . target === i [ 0 ] && ! t . shiftKey ) return r . focus ( 1 ) , ! 1 ; if ( t . target === r [ 0 ] && t . shiftKey ) return i . focus ( 1 ) , ! 1 } ) , e ( t . element . find ( ":tabbable" ) . get ( ) . concat ( r . find ( ".ui-dialog-buttonpane :tabbable" ) . get ( ) . concat ( r . get ( ) ) ) ) . eq ( 0 ) . focus ( ) , t . _isOpen = ! 0 , t . _trigger ( "open" ) , t } , _createButtons : function ( t ) { var n = this , r = ! 1 , i = e ( "<div></div>" ) . addClass ( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ) , s = e ( "<div></div>" ) . addClass ( "ui-dialog-buttonset" ) . appendTo ( i ) ; n . uiDialog . find ( ".ui-dialog-buttonpane" ) . remove ( ) , typeof t == "object" && t !== null && e . each ( t , function ( ) { return ! ( r = ! 0 ) } ) , r && ( e . each ( t , function ( t , r ) { r = e . isFunction ( r ) ? { click : r , text : t } : r ; var i = e ( '<button type="button"></button>' ) . click ( function ( ) { r . click . apply ( n . element [ 0 ] , arguments ) } ) . appendTo ( s ) ; e . each ( r , function ( e , t ) { if ( e === "click" ) return ; e in i ? i [ e ] ( t ) : i . attr ( e , t ) } ) , e . fn . button && i . button ( ) } ) , i . appendTo ( n . uiDialog ) ) } , _makeDraggable : function ( ) { function s ( e ) { return { position : e . position , offset : e . offset } } var t = this , n = t . options , r = e ( document ) , i ; t . uiDialog . draggable ( { cancel : ".ui-dialog-content, .ui-dialog-titlebar-close" , handle : ".ui-dialog-titlebar" , containment : "document" , start : function ( r , o ) { i = n . height === "auto" ? "auto" : e ( this ) . height ( ) , e ( this ) . height ( e ( this ) . height ( ) ) . addClass ( "ui-dialog-dragging" ) , t . _trigger ( "dragStart" , r , s ( o ) ) } , drag : function ( e , n ) { t . _trigger ( "drag" , e , s ( n ) ) } , stop : function ( o , u ) { n . position = [ u . position . left - r . scrollLeft ( ) , u . position . top - r . scrollTop ( ) ] , e ( this ) . removeClass ( "ui-dialog-dragging" ) . height ( i ) , t . _trigger ( "dragStop" , o , s ( u ) ) , e . ui . dialog . overlay . resize ( ) } } ) } , _makeResizable : function ( n ) { function u ( e ) { return { originalPosition : e . originalPosition , originalSize : e . originalSize , position : e . p
, function ( ) { s . _trigger ( "show" , null , s . _ui ( s . anchors [ 0 ] , s . panels [ 0 ] ) ) } ) , this . load ( 0 ) ) , this . _trigger ( "add" , null , this . _ui ( this . anchors [ i ] , this . panels [ i ] ) ) , this } , remove : function ( t ) { t = this . _getIndex ( t ) ; var n = this . options , r = this . lis . eq ( t ) . remove ( ) , i = this . panels . eq ( t ) . remove ( ) ; return r . hasClass ( "ui-tabs-selected" ) && this . anchors . length > 1 && this . select ( t + ( t + 1 < this . anchors . length ? 1 : - 1 ) ) , n . disabled = e . map ( e . grep ( n . disabled , function ( e , n ) { return e != t } ) , function ( e , n ) { return e >= t ? -- e : e } ) , this . _tabify ( ) , this . _trigger ( "remove" , null , this . _ui ( r . find ( "a" ) [ 0 ] , i [ 0 ] ) ) , this } , enable : function ( t ) { t = this . _getIndex ( t ) ; var n = this . options ; if ( e . inArray ( t , n . disabled ) == - 1 ) return ; return this . lis . eq ( t ) . removeClass ( "ui-state-disabled" ) , n . disabled = e . grep ( n . disabled , function ( e , n ) { return e != t } ) , this . _trigger ( "enable" , null , this . _ui ( this . anchors [ t ] , this . panels [ t ] ) ) , this } , disable : function ( e ) { e = this . _getIndex ( e ) ; var t = this , n = this . options ; return e != n . selected && ( this . lis . eq ( e ) . addClass ( "ui-state-disabled" ) , n . disabled . push ( e ) , n . disabled . sort ( ) , this . _trigger ( "disable" , null , this . _ui ( this . anchors [ e ] , this . panels [ e ] ) ) ) , this } , select : function ( e ) { e = this . _getIndex ( e ) ; if ( e == - 1 ) { if ( ! this . options . collapsible || this . options . selected == - 1 ) return this ; e = this . options . selected } return this . anchors . eq ( e ) . trigger ( this . options . event + ".tabs" ) , this } , load : function ( t ) { t = this . _getIndex ( t ) ; var n = this , r = this . options , i = this . anchors . eq ( t ) [ 0 ] , s = e . data ( i , "load.tabs" ) ; this . abort ( ) ; if ( ! s || this . element . queue ( "tabs" ) . length !== 0 && e . data ( i , "cache.tabs" ) ) { this . element . dequeue ( "tabs" ) ; return } this . lis . eq ( t ) . addClass ( "ui-state-processing" ) ; if ( r . spinner ) { var o = e ( "span" , i ) ; o . data ( "label.tabs" , o . html ( ) ) . html ( r . spinner ) } return this . xhr = e . ajax ( e . extend ( { } , r . ajaxOptions , { url : s , success : function ( s , o ) { n . element . find ( n . _sanitizeSelector ( i . hash ) ) . html ( s ) , n . _cleanup ( ) , r . cache && e . data ( i , "cache.tabs" , ! 0 ) , n . _trigger ( "load" , null , n . _ui ( n . anchors [ t ] , n . panels [ t ] ) ) ; try { r . ajaxOptions . success ( s , o ) } catch ( u ) { } } , error : function ( e , s , o ) { n . _cleanup ( ) , n . _trigger ( "load" , null , n . _ui ( n . anchors [ t ] , n . panels [ t ] ) ) ; try { r . ajaxOptions . error ( e , s , t , i ) } catch ( o ) { } } } ) ) , n . element . dequeue ( "tabs" ) , this } , abort : function ( ) { return this . element . queue ( [ ] ) , this . panels . stop ( ! 1 , ! 0 ) , this . element . queue ( "tabs" , this . element . queue ( "tabs" ) . splice ( - 2 , 2 ) ) , this . xhr && ( this . xhr . abort ( ) , delete this . xhr ) , this . _cleanup ( ) , this } , url : function ( e , t ) { return this . anchors . eq ( e ) . removeData ( "cache.tabs" ) . data ( "load.tabs" , t ) , this } , length : function ( ) { return this . anchors . length } } ) , e . extend ( e . ui . tabs , { version : "1.8.23" } ) , e . extend ( e . ui . tabs . prototype , { rotation : null , rotate : function ( e , t ) { var n = this , r = this . options , i = n . _rotate || ( n . _rotate = function ( t ) { clearTimeout ( n . rotation ) , n . rotation = setTimeout ( function ( ) { var e = r . selected ; n . select ( ++ e < n . anchors . length ? e : 0 ) } , e ) , t && t . stopPropagation ( ) } ) , s = n . _unrotate || ( n . _unrotate = t ? function ( e ) { i ( ) } : function ( e ) { e . clientX && n . rotate ( null ) } ) ; return e ? ( this . element . bind ( "tabsshow" , i ) , this . anchors . bind ( r . event + ".tabs" , s ) , i ( ) ) : ( clearTimeout ( n . rotation ) , this . element . unbind ( "tabsshow" , i ) , this . anchors . unbind ( r . event + ".tabs" , s ) , delete this . _rotate , delete this . _unrotate ) , this } } ) } ( jQuery ) , function ( e ) { e . purr = function ( t , n ) { function i ( ) { var i = document . createElement ( "a" ) ; e ( i ) . attr ( { className : "close" , href : "#close" , innerHTML : "Close" } ) . appendTo ( t ) . click ( function ( ) { return s ( ) , ! 1 } ) , t . appendTo ( r ) . hide ( ) , jQuery . browser . msie && n . usingTransparentPNG ? t . show ( ) : t . fadeIn ( n . fadeInSpeed ) ; if ( ! n . isSticky ) var o = setInterval ( function ( ) { t . prevAll ( ".not-sticky" ) . length == 0 && ( clearInterval ( o ) , setTimeout ( function ( ) { s ( ) } , n . removeTimer ) ) } , 200 ) } function s ( ) { jQuery . browser . msie && n . usingTransparentPNG ? t . css ( { opacity : 0 } ) . animate ( { height : "0px" } , { duration : n . fadeOutSpeed , complete : function ( ) { t . remove ( ) } } ) : t . animate ( { opacity : "0" } , { duration : n . fadeOutSpeed , complete : function ( ) { t . animate ( { height : "0px" } , { duration : n . fadeOutSpeed , complete : function ( ) { t . remove ( ) } } ) } } ) } t = e ( t ) , n . isSticky || t . addClass ( "not-sticky" ) ; var r = document . getElementById ( "purr-container" ) ; r || ( r = '<div id="purr-container"></div>' ) , r = e ( r ) , e ( "body" ) . append ( r ) , i ( ) } , e . fn . purr = function ( t ) { return t = t || { } , t . fadeInSpeed = t . fadeInSpeed || 500 , t . fadeOutSpeed = t . fadeOutSpeed || 5
: "#F08080" , lightcyan : "#E0FFFF" , lightgoldenrodyellow : "#FAFAD2" , lightgreen : "#90EE90" , lightgrey : "#D3D3D3" , lightpink : "#FFB6C1" , lightsalmon : "#FFA07A" , lightseagreen : "#20B2AA" , lightskyblue : "#87CEFA" , lightslategray : "#778899" , lightslategrey : "#778899" , lightsteelblue : "#B0C4DE" , lightyellow : "#FFFFE0" , limegreen : "#32CD32" , linen : "#FAF0E6" , magenta : "#FF00FF" , mediumaquamarine : "#66CDAA" , mediumblue : "#0000CD" , mediumorchid : "#BA55D3" , mediumpurple : "#9370DB" , mediumseagreen : "#3CB371" , mediumslateblue : "#7B68EE" , mediumspringgreen : "#00FA9A" , mediumturquoise : "#48D1CC" , mediumvioletred : "#C71585" , midnightblue : "#191970" , mintcream : "#F5FFFA" , mistyrose : "#FFE4E1" , moccasin : "#FFE4B5" , navajowhite : "#FFDEAD" , oldlace : "#FDF5E6" , olivedrab : "#6B8E23" , orange : "#FFA500" , orangered : "#FF4500" , orchid : "#DA70D6" , palegoldenrod : "#EEE8AA" , palegreen : "#98FB98" , paleturquoise : "#AFEEEE" , palevioletred : "#DB7093" , papayawhip : "#FFEFD5" , peachpuff : "#FFDAB9" , peru : "#CD853F" , pink : "#FFC0CB" , plum : "#DDA0DD" , powderblue : "#B0E0E6" , rosybrown : "#BC8F8F" , royalblue : "#4169E1" , saddlebrown : "#8B4513" , salmon : "#FA8072" , sandybrown : "#F4A460" , seagreen : "#2E8B57" , seashell : "#FFF5EE" , sienna : "#A0522D" , skyblue : "#87CEEB" , slateblue : "#6A5ACD" , slategray : "#708090" , slategrey : "#708090" , snow : "#FFFAFA" , springgreen : "#00FF7F" , steelblue : "#4682B4" , tan : "#D2B48C" , thistle : "#D8BFD8" , tomato : "#FF6347" , turquoise : "#40E0D0" , violet : "#EE82EE" , wheat : "#F5DEB3" , whitesmoke : "#F5F5F5" , yellowgreen : "#9ACD32" } , O = { } , _ = { style : "normal" , variant : "normal" , weight : "normal" , size : 10 , family : "sans-serif" } , D = { } , j = { butt : "flat" , round : "round" } , q = I . prototype ; q . clearRect = function ( ) { this . textMeasureEl _ && ( this . textMeasureEl _ . removeNode ( ! 0 ) , this . textMeasureEl _ = null ) , this . element _ . innerHTML = "" } , q . beginPath = function ( ) { this . currentPath _ = [ ] } , q . moveTo = function ( e , t ) { var n = W ( this , e , t ) ; this . currentPath _ . push ( { type : "moveTo" , x : n . x , y : n . y } ) , this . currentX _ = n . x , this . currentY _ = n . y } , q . lineTo = function ( e , t ) { var n = W ( this , e , t ) ; this . currentPath _ . push ( { type : "lineTo" , x : n . x , y : n . y } ) , this . currentX _ = n . x , this . currentY _ = n . y } , q . bezierCurveTo = function ( e , t , n , r , i , s ) { var o = W ( this , i , s ) , u = W ( this , e , t ) , a = W ( this , n , r ) ; R ( this , u , a , o ) } , q . quadraticCurveTo = function ( e , t , n , r ) { var i = W ( this , e , t ) , s = W ( this , n , r ) , o = { x : this . currentX _ + 2 / 3 * ( i . x - this . currentX _ ) , y : this . currentY _ + 2 / 3 * ( i . y - this . currentY _ ) } , u = { x : o . x + ( s . x - this . currentX _ ) / 3 , y : o . y + ( s . y - this . currentY _ ) / 3 } ; R ( this , o , u , s ) } , q . arc = function ( e , t , i , s , a , f ) { i *= o ; var l = f ? "at" : "wa" , c = e + r ( s ) * i - u , h = t + n ( s ) * i - u , p = e + r ( a ) * i - u , d = t + n ( a ) * i - u ; c == p && ! f && ( c += . 125 ) ; var v = W ( this , e , t ) , m = W ( this , c , h ) , g = W ( this , p , d ) ; this . currentPath _ . push ( { type : l , x : v . x , y : v . y , radius : i , xStart : m . x , yStart : m . y , xEnd : g . x , yEnd : g . y } ) } , q . rect = function ( e , t , n , r ) { this . moveTo ( e , t ) , this . lineTo ( e + n , t ) , this . lineTo ( e + n , t + r ) , this . lineTo ( e , t + r ) , this . closePath ( ) } , q . strokeRect = function ( e , t , n , r ) { var i = this . currentPath _ ; this . beginPath ( ) , this . moveTo ( e , t ) , this . lineTo ( e + n , t ) , this . lineTo ( e + n , t + r ) , this . lineTo ( e , t + r ) , this . closePath ( ) , this . stroke ( ) , this . currentPath _ = i } , q . fillRect = function ( e , t , n , r ) { var i = this . currentPath _ ; this . beginPath ( ) , this . moveTo ( e , t ) , this . lineTo ( e + n , t ) , this . lineTo ( e + n , t + r ) , this . lineTo ( e , t + r ) , this . closePath ( ) , this . fill ( ) , this . currentPath _ = i } , q . createLinearGradient = function ( e , t , n , r ) { var i = new $ ( "gradient" ) ; return i . x0 _ = e , i . y0 _ = t , i . x1 _ = n , i . y1 _ = r , i } , q . createRadialGradient = function ( e , t , n , r , i , s ) { var o = new $ ( "gradientradial" ) ; return o . x0 _ = e , o . y0 _ = t , o . r0 _ = n , o . x1 _ = r , o . y1 _ = i , o . r1 _ = s , o } , q . drawImage = function ( n , r ) { var i , s , u , a , f , l , c , h , p = n . runtimeStyle . width , d = n . runtimeStyle . height ; n . runtimeStyle . width = "auto" , n . runtimeStyle . height = "auto" ; var v = n . width , m = n . height ; n . runtimeStyle . width = p , n . runtimeStyle . height = d ; if ( arguments . length == 3 ) i = arguments [ 1 ] , s = arguments [ 2 ] , f = l = 0 , c = u = v , h = a = m ; else if ( arguments . length == 5 ) i = arguments [ 1 ] , s = arguments [ 2 ] , u = arguments [ 3 ] , a = arguments [ 4 ] , f = l = 0 , c = v , h = m ; else { if ( arguments . length != 9 ) throw Error ( "Invalid number of arguments" ) ; f = arguments [ 1 ] , l = arguments [ 2 ] , c = arguments [ 3 ] , h = arguments [ 4 ] , i = arguments [ 5 ] , s = arguments [ 6 ] , u = arguments [ 7 ] , a = arguments [ 8 ] } var g = W ( this , i , s ) , y = c / 2 , b = h / 2 , w = [ ] , E = 10 , S = 10 ; w . push ( " <g_vml_:group" , ' coordsize="' , o * E , "," , o * S , '"' , ' coordorigin="0,0"' , ' style="width:' , E , "px;height:" , S , "px;position:absolute;" ) ; i
) } , onMouseMove : function ( e , t , n ) { this . down && ( this . move = ! 0 ) ; if ( this . dom && this . isLabel ( e , t ) ) return ; var r = this . nodeStylesOnHover ; if ( ! r ) return ; if ( ! this . dom ) { if ( this . hoveredNode ) { var i = this . types [ this . hoveredNode . getData ( "type" ) ] , s = i && i . contains && i . contains . call ( this . fx , this . hoveredNode , n . getPos ( ) ) ; if ( s ) return } var o = n . getNode ( ) ; if ( ! this . hoveredNode && ! o ) return ; if ( o . hovered ) return ; o && ! o . selected ? ( this . fx . nodeFxAnimation . stopTimer ( ) , this . viz . graph . eachNode ( function ( e ) { if ( e . hovered && ! e . selected ) { for ( var t in r ) e . setData ( t , e . styles [ "$" + t ] , "end" ) ; delete e . hovered } } ) , o . hovered = ! 0 , this . hoveredNode = o , this . toggleStylesOnHover ( o , ! 0 ) ) : this . hoveredNode && ! this . hoveredNode . selected && ( this . fx . nodeFxAnimation . stopTimer ( ) , this . toggleStylesOnHover ( this . hoveredNode , ! 1 ) , delete this . hoveredNode . hovered , this . hoveredNode = ! 1 ) } } } ) , a . Classes . Navigation = new t ( { Implements : [ s , o ] , initializePost : function ( ) { this . pos = ! 1 , this . pressed = ! 1 } , onMouseWheel : function ( t , n , r ) { if ( ! this . config . zooming ) return ; e . event . stop ( e . event . get ( t , n ) ) ; var i = this . config . zooming / 1e3 , s = 1 + r * i ; this . canvas . scale ( s , s ) } , onMouseDown : function ( e , t , n ) { if ( ! this . config . panning ) return ; if ( this . config . panning == "avoid nodes" && n . getNode ( ) ) return ; this . pressed = ! 0 , this . pos = n . getPos ( ) ; var r = this . canvas , i = r . translateOffsetX , s = r . translateOffsetY , o = r . scaleOffsetX , u = r . scaleOffsetY ; this . pos . x *= o , this . pos . x += i , this . pos . y *= u , this . pos . y += s } , onMouseMove : function ( e , t , n ) { if ( ! this . config . panning ) return ; if ( ! this . pressed ) return ; if ( this . config . panning == "avoid nodes" && n . getNode ( ) ) return ; var r = this . pos , i = n . getPos ( ) , s = this . canvas , o = s . translateOffsetX , u = s . translateOffsetY , a = s . scaleOffsetX , f = s . scaleOffsetY ; i . x *= a , i . y *= f , i . x += o , i . y += u ; var l = i . x - r . x , c = i . y - r . y ; this . pos = i , this . canvas . translate ( l * 1 / a , c * 1 / f ) } , onMouseUp : function ( e , t , n , r ) { if ( ! this . config . panning ) return ; this . pressed = ! 1 } } ) ; var f ; ( function ( ) { function i ( t , n ) { var i = document . createElement ( t ) ; for ( var s in n ) typeof n [ s ] == "object" ? e . extend ( i [ s ] , n [ s ] ) : i [ s ] = n [ s ] ; return t == "canvas" && ! r && G _vmlCanvasManager && ( i = G _vmlCanvasManager . initElement ( document . body . appendChild ( i ) ) ) , i } var n = typeof HTMLCanvasElement , r = n == "object" || n == "function" ; $jit . Canvas = f = new t ( { canvases : [ ] , pos : ! 1 , element : ! 1 , labelContainer : ! 1 , translateOffsetX : 0 , translateOffsetY : 0 , scaleOffsetX : 1 , scaleOffsetY : 1 , initialize : function ( t , n ) { this . viz = t , this . opt = n ; var r = e . type ( n . injectInto ) == "string" ? n . injectInto : n . injectInto . id , s = r + "-label" , o = e ( r ) , u = n . width || o . offsetWidth , a = n . height || o . offsetHeight ; this . id = r ; var l = { injectInto : r , width : u , height : a } ; this . element = i ( "div" , { id : r + "-canvaswidget" , style : { position : "relative" , width : u + "px" , height : a + "px" } } ) , this . labelContainer = this . createLabelContainer ( n . Label . type , s , l ) , this . canvases . push ( new f . Base ( { config : e . extend ( { idSuffix : "-canvas" } , l ) , plot : function ( e ) { t . fx . plot ( ) } , resize : function ( ) { t . refresh ( ) } } ) ) ; var c = n . background ; if ( c ) { var h = new f . Background [ c . type ] ( t , e . extend ( c , l ) ) ; this . canvases . push ( new f . Base ( h ) ) } var p = this . canvases . length ; while ( p -- ) this . element . appendChild ( this . canvases [ p ] . canvas ) , p > 0 && this . canvases [ p ] . plot ( ) ; this . element . appendChild ( this . labelContainer ) , o . appendChild ( this . element ) ; var d = null , v = this ; e . addEvent ( window , "scroll" , function ( ) { clearTimeout ( d ) , d = setTimeout ( function ( ) { v . getPos ( ! 0 ) } , 500 ) } ) } , getCtx : function ( e ) { return this . canvases [ e || 0 ] . getCtx ( ) } , getConfig : function ( ) { return this . opt } , getElement : function ( ) { return this . element } , getSize : function ( e ) { return this . canvases [ e || 0 ] . getSize ( ) } , resize : function ( e , t ) { this . getPos ( ! 0 ) , this . translateOffsetX = this . translateOffsetY = 0 , this . scaleOffsetX = this . scaleOffsetY = 1 ; for ( var n = 0 , r = this . canvases . length ; n < r ; n ++ ) this . canvases [ n ] . resize ( e , t ) ; var i = this . element . style ; i . width = e + "px" , i . height = t + "px" , this . labelContainer && ( this . labelContainer . style . width = e + "px" ) } , translate : function ( e , t , n ) { this . translateOffsetX += e * this . scaleOffsetX , this . translateOffsetY += t * this . scaleOffsetY ; for ( var r = 0 , i = this . canvases . length ; r < i ; r ++ ) this . canvases [ r ] . translate ( e , t , n ) } , scale : function ( e , t , n ) { var r = this . scaleOffsetX * e , i = this . scaleOffsetY * t , s = this . translateOffsetX * ( e - 1 ) / r , o = this . translateOffsetY * ( t - 1 ) / i ; this . scaleOffsetX = r , this . scaleOffsetY = i ; for ( var u = 0 , a = this . canvases . lengt
e . getData ( "lineWidth" ) , o = e . getData ( "color" ) , u = t . getCtx ( ) ; u . lineWidth = s , u . fillStyle = u . strokeStyle = o ; for ( var a in i ) u [ a ] = e . getCanvasStyle ( a ) ; this . edgeTypes [ r ] . render . call ( this , e , t , n ) } } } , d . Label = { } , d . Label . Native = new t ( { plotLabel : function ( e , t , n ) { var r = e . getCtx ( ) , i = t . pos . getc ( ! 0 ) ; r . font = t . getLabelData ( "style" ) + " " + t . getLabelData ( "size" ) + "px " + t . getLabelData ( "family" ) , r . textAlign = t . getLabelData ( "textAlign" ) , r . fillStyle = r . strokeStyle = t . getLabelData ( "color" ) , r . textBaseline = t . getLabelData ( "textBaseline" ) , this . renderLabel ( e , t , n ) } , renderLabel : function ( e , t , n ) { var r = e . getCtx ( ) , i = t . pos . getc ( ! 0 ) ; r . fillText ( t . name , i . x , i . y + t . getData ( "height" ) / 2 ) } , hideLabel : e . empty , hideLabels : e . empty } ) , d . Label . DOM = new t ( { labelsHidden : ! 1 , labelContainer : ! 1 , labels : { } , getLabelContainer : function ( ) { return this . labelContainer ? this . labelContainer : this . labelContainer = document . getElementById ( this . viz . config . labelContainer ) } , getLabel : function ( e ) { return e in this . labels && this . labels [ e ] != null ? this . labels [ e ] : this . labels [ e ] = document . getElementById ( e ) } , hideLabels : function ( e ) { var t = this . getLabelContainer ( ) ; e ? t . style . display = "none" : t . style . display = "" , this . labelsHidden = e } , clearLabels : function ( e ) { for ( var t in this . labels ) if ( e || ! this . viz . graph . hasNode ( t ) ) this . disposeLabel ( t ) , delete this . labels [ t ] } , disposeLabel : function ( e ) { var t = this . getLabel ( e ) ; t && t . parentNode && t . parentNode . removeChild ( t ) } , hideLabel : function ( t , n ) { t = e . splat ( t ) ; var r = n ? "" : "none" , i , s = this ; e . each ( t , function ( e ) { var t = s . getLabel ( e . id ) ; t && ( t . style . display = r ) } ) } , fitsInCanvas : function ( e , t ) { var n = t . getSize ( ) ; return e . x >= n . width || e . x < 0 || e . y >= n . height || e . y < 0 ? ! 1 : ! 0 } } ) , d . Label . HTML = new t ( { Implements : d . Label . DOM , plotLabel : function ( e , t , n ) { var r = t . id , i = this . getLabel ( r ) ; if ( ! i && ! ( i = document . getElementById ( r ) ) ) { i = document . createElement ( "div" ) ; var s = this . getLabelContainer ( ) ; i . id = r , i . className = "node" , i . style . position = "absolute" , n . onCreateLabel ( i , t ) , s . appendChild ( i ) , this . labels [ t . id ] = i } this . placeLabel ( i , t , n ) } } ) , d . Label . SVG = new t ( { Implements : d . Label . DOM , plotLabel : function ( e , t , n ) { var r = t . id , i = this . getLabel ( r ) ; if ( ! i && ! ( i = document . getElementById ( r ) ) ) { var s = "http://www.w3.org/2000/svg" ; i = document . createElementNS ( s , "svg:text" ) ; var o = document . createElementNS ( s , "svg:tspan" ) ; i . appendChild ( o ) ; var u = this . getLabelContainer ( ) ; i . setAttribute ( "id" , r ) , i . setAttribute ( "class" , "node" ) , u . appendChild ( i ) , n . onCreateLabel ( i , t ) , this . labels [ t . id ] = i } this . placeLabel ( i , t , n ) } } ) , d . Geom = new t ( { initialize : function ( e ) { this . viz = e , this . config = e . config , this . node = e . config . Node , this . edge = e . config . Edge } , translate : function ( t , n ) { n = e . splat ( n ) , this . viz . graph . eachNode ( function ( r ) { e . each ( n , function ( e ) { r . getPos ( e ) . $add ( t ) } ) } ) } , setRightLevelToShow : function ( t , n , r ) { var i = this . getRightLevelToShow ( t , n ) , s = this . viz . labels , o = e . merge ( { execShow : ! 0 , execHide : ! 0 , onHide : e . empty , onShow : e . empty } , r || { } ) ; t . eachLevel ( 0 , this . config . levelsToShow , function ( e ) { var n = e . _depth - t . _depth ; n > i ? ( o . onHide ( e ) , o . execHide && ( e . drawn = ! 1 , e . exist = ! 1 , s . hideLabel ( e , ! 1 ) ) ) : ( o . onShow ( e ) , o . execShow && ( e . exist = ! 0 ) ) } ) , t . drawn = ! 0 } , getRightLevelToShow : function ( e , t ) { var n = this . config , r = n . levelsToShow , i = n . constrained ; if ( ! i ) return r ; while ( ! this . treeFitsInCanvas ( e , t , r ) && r > 1 ) r -- ; return r } } ) ; var y = { construct : function ( t ) { var n = e . type ( t ) == "array" , r = new d ( this . graphOptions , this . config . Node , this . config . Edge , this . config . Label ) ; return n ? function ( t , n ) { var r = function ( e ) { for ( var r = 0 , i = n . length ; r < i ; r ++ ) if ( n [ r ] . id == e ) return n [ r ] ; var s = { id : e , name : e } ; return t . addNode ( s ) } ; for ( var i = 0 , s = n . length ; i < s ; i ++ ) { t . addNode ( n [ i ] ) ; var o = n [ i ] . adjacencies ; if ( o ) for ( var u = 0 , a = o . length ; u < a ; u ++ ) { var f = o [ u ] , l = { } ; typeof o [ u ] != "string" && ( l = e . merge ( f . data , { } ) , f = f . nodeTo ) , t . addAdjacence ( n [ i ] , r ( f ) , l ) } } } ( r , t ) : function ( e , t ) { e . addNode ( t ) ; if ( t . children ) for ( var n = 0 , r = t . children ; n < r . length ; n ++ ) e . addAdjacence ( t , r [ n ] ) , arguments . callee ( e , r [ n ] ) } ( r , t ) , r } , loadJSON : function ( t , n ) { this . json = t , this . labels && this . labels . clearLabels && this . labels . clearLabels ( ! 0 ) , this . graph = this . construct ( t ) , e . type ( t ) != "array" ? this . root = t . id : this . root = t [ n ? n : 0 ] . id } , toJSON : function ( e ) { e = e || "tree" ; if ( e == "tree" ) { var t = { } , n = this . graph . getNode ( this . root ) , t = function i ( e ) { var t = { } ; t . id = e . id , t . name = e . name , t . data = e
: 1500 , onComplete : function ( ) { r . busy = ! 1 } } ) } , restore : function ( ) { if ( this . busy ) return ; this . busy = ! 0 , this . config . Tips . enable && this . st . tips . hide ( ) , this . select ( ! 1 , ! 1 , ! 1 ) , this . normalizeDims ( ) ; var e = this ; this . st . fx . animate ( { modes : [ "node-property:height:dimArray" ] , duration : 1500 , onComplete : function ( ) { e . busy = ! 1 } } ) } , select : function ( e , t , n ) { if ( ! this . config . selectOnHover ) return ; var r = this . selected ; if ( r . id != e || r . name != t || r . index != n ) { r . id = e , r . name = t , r . index = n , this . st . graph . eachNode ( function ( e ) { e . setData ( "border" , ! 1 ) } ) ; if ( e ) { var i = this . st . graph . getNode ( e ) ; i . setData ( "border" , r ) ; var s = n === 0 ? "prev" : "next" ; s = i . getData ( s ) , s && ( i = this . st . graph . getByName ( s ) , i && i . setData ( "border" , { name : t , index : 1 - n } ) ) } this . st . plot ( ) } } , getLegend : function ( ) { var t = { } , n ; this . st . graph . getNode ( this . st . root ) . eachAdjacency ( 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 ; return this . st . graph . eachNode ( function ( n ) { var r = n . getData ( "valueArray" ) , i = 0 , s = 0 ; e . each ( r , function ( e ) { i += + e [ 0 ] , s += + e [ 1 ] } ) ; var o = s > i ? s : i ; t = t > o ? t : o } ) , t } , 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 = s . labelOffset + s . Label . size , a = ( i . width - ( o . left + o . right ) ) / n , f = s . animate , l = i . height - ( o . top + o . bottom ) - ( s . showAggregates && u ) - ( s . showLabels && u ) ; this . st . graph . eachNode ( function ( t ) { var n = 0 , i = 0 , s = [ ] ; e . each ( t . getData ( "valueArray" ) , function ( e ) { n += + e [ 0 ] , i += + e [ 1 ] , s . push ( [ 0 , 0 ] ) } ) ; var o = i > n ? i : n ; t . setData ( "width" , a ) ; if ( f ) { t . setData ( "height" , o * l / r , "end" ) , t . setData ( "dimArray" , e . map ( t . getData ( "valueArray" ) , function ( e ) { return [ e [ 0 ] * l / r , e [ 1 ] * l / r ] } ) , "end" ) ; var u = t . getData ( "dimArray" ) ; u || t . setData ( "dimArray" , s ) } else t . setData ( "height" , o * l / r ) , t . setData ( "dimArray" , e . map ( t . getData ( "valueArray" ) , function ( e ) { return [ e [ 0 ] * l / r , e [ 1 ] * l / r ] } ) ) } ) } } ) , i . BarChart = { $extend : ! 0 , animate : ! 0 , type : "stacked" , labelOffset : 3 , barsOffset : 0 , hoveredColor : "#9fd4ff" , orientation : "horizontal" , showAggregates : ! 0 , showLabels : ! 0 , Tips : { enable : ! 1 , onShow : e . empty , onHide : e . empty } , Events : { enable : ! 1 , onClick : e . empty } } , $jit . ST . Plot . NodeTypes . implement ( { "barchart-stacked" : { render : function ( t , n ) { var r = t . pos . getc ( ! 0 ) , i = t . getData ( "width" ) , s = t . getData ( "height" ) , o = this . getAlignedPos ( r , i , s ) , u = o . x , a = o . y , f = t . getData ( "dimArray" ) , l = t . getData ( "valueArray" ) , c = t . getData ( "colorArray" ) , h = c . length , p = t . getData ( "stringArray" ) , d = n . getCtx ( ) , v = { } , m = t . getData ( "border" ) , g = t . getData ( "gradient" ) , y = t . getData ( "config" ) , b = y . orientation == "horizontal" , w = y . showAggregates , E = y . showLabels , S = y . Label ; if ( c && f && p ) { for ( var x = 0 , T = f . length , N = 0 , C = 0 ; x < T ; x ++ ) { d . fillStyle = d . strokeStyle = c [ x % h ] ; if ( g ) { var k ; b ? k = d . createLinearGradient ( u + N + f [ x ] / 2 , a , u + N + f [ x ] / 2 , a + s ) : k = d . createLinearGradient ( u , a - N - f [ x ] / 2 , u + i , a - N - f [ x ] / 2 ) ; var L = e . rgbToHex ( e . map ( e . hexToRgb ( c [ x % h ] . slice ( 1 ) ) , function ( e ) { return e * . 5 >> 0 } ) ) ; k . addColorStop ( 0 , L ) , k . addColorStop ( . 5 , c [ x % h ] ) , k . addColorStop ( 1 , L ) , d . fillStyle = k } b ? d . fillRect ( u + N , a , f [ x ] , s ) : d . fillRect ( u , a - N - f [ x ] , i , f [ x ] ) , m && m . name == p [ x ] && ( v . acum = N , v . dimValue = f [ x ] ) , N += f [ x ] || 0 , C += l [ x ] || 0 } m && ( d . save ( ) , d . lineWidth = 2 , d . strokeStyle = m . color , b ? d . strokeRect ( u + v . acum + 1 , a + 1 , v . dimValue - 2 , s - 2 ) : d . strokeRect ( u + 1 , a - v . acum - v . dimValue + 1 , i - 2 , v . dimValue - 2 ) , d . restore ( ) ) , S . type == "Native" && ( d . save ( ) , d . fillStyle = d . strokeStyle = S . color , d . font = S . style + " " + S . size + "px " + S . family , d . textBaseline = "middle" , w ( t . name , C ) && ( b ? ( d . textAlign = "right" , d . fillText ( C , u + N - y . labelOffset , a + s / 2 ) ) : ( d . textAlign = "center" , d . fillText ( C , u + i / 2 , a - s - S . size / 2 - y . labelOffset ) ) ) , E ( t . name , C , t ) && ( b ? ( d . textAlign = "center" , d . translate ( u - y . labelOffset - S . size / 2 , a + s / 2 ) , d . rotate ( Math . PI / 2 ) , d . fillText ( t . name , 0 , 0 ) ) : ( d . textAlign = "center" , d . fillText ( t . name , u + i / 2 , a + S . size / 2 + y . labelOffset ) ) ) , d . restore ( ) ) } } , contains : function ( e , t ) { var n = e . pos . getc ( ! 0 ) , r = e . getData ( "width" ) , i = e . getData ( "height" ) , s = this . getAlignedPos ( n , r , i ) , o = s . x , u = s . y , a = e . getData ( "dimArray" ) , f = e . getData ( "config" ) , l = t . x - o , c = f . orientation == "horizontal" ; if ( c ) { if ( t . x < o || t . x > o + r || t . y > u + i || t . y < u ) return ! 1 } else if ( t . x < o || t . x > o + r || t . y > u || t . y < u - i ) return ! 1 ; for ( var h = 0 , p = a . length , d = c ? o : u ; h < p ; h ++ ) { var
t , n ) } } } , processChildrenLayout : function ( e , t , n , r ) { var i = n . width * n . height , s , o = t . length , u = 0 , a = [ ] ; for ( s = 0 ; s < o ; s ++ ) a [ s ] = + t [ s ] . getData ( "area" , r ) , u += a [ s ] ; for ( s = 0 ; s < o ; s ++ ) t [ s ] . _area = i * a [ s ] / u ; var f = this . layout . horizontal ( ) ? n . width : n . height , l = [ t [ 0 ] ] , c = t . slice ( 1 ) ; this . stripify ( c , l , f , n , r ) } , stripify : function ( e , t , n , r , i ) { this . computeDim ( e , t , n , r , this . avgAspectRatio , i ) } , layoutRow : function ( e , t , n , r ) { return this . layout . horizontal ( ) ? this . layoutH ( e , t , n , r ) : this . layoutV ( e , t , n , r ) } , layoutV : function ( t , n , r , i ) { var s = 0 ; e . each ( t , function ( e ) { s += e . _area } ) ; var o = s / n , u = 0 ; for ( var a = 0 , f = t . length ; a < f ; a ++ ) { var l = t [ a ] , c = l . _area / o ; l . getPos ( i ) . setc ( r . left , r . top + ( n - c - u ) ) , l . setData ( "width" , o , i ) , l . setData ( "height" , c , i ) , u += c } return { height : r . height , width : r . width - o , top : r . top , left : r . left + o , dim : n } } , layoutH : function ( t , n , r , i ) { var s = 0 ; e . each ( t , function ( e ) { s += e . _area } ) ; var o = s / n , u = r . height - o , a = 0 ; for ( var f = 0 , l = t . length ; f < l ; f ++ ) { var c = t [ f ] , h = c . _area / o ; c . getPos ( i ) . setc ( r . left + a , r . top + u ) , c . setData ( "width" , h , i ) , c . setData ( "height" , o , i ) , a += h } return { height : r . height - o , width : r . width , top : r . top , left : r . left , dim : n } } } ) , b . Icicle = new t ( { compute : function ( e ) { e = e || "current" ; var t = this . graph . getNode ( this . root ) , n = this . config , r = this . canvas . getSize ( ) , i = r . width , s = r . height , o = n . offset , u = n . constrained ? n . levelsToShow : Number . MAX _VALUE ; this . controller . onBeforeCompute ( t ) , d . Util . computeLevels ( this . graph , t . id , 0 , "ignore" ) ; var a = 0 ; d . Util . eachLevel ( t , 0 , ! 1 , function ( e , t ) { t > a && ( a = t ) } ) ; var f = this . graph . getNode ( this . clickedNode && this . clickedNode . id || t . id ) , l = Math . min ( a , u - 1 ) , c = f . _depth ; this . layout . horizontal ( ) ? this . computeSubtree ( f , - i / 2 , - s / 2 , i / ( l + 1 ) , s , c , l , e ) : this . computeSubtree ( f , - i / 2 , - s / 2 , i , s / ( l + 1 ) , c , l , e ) } , computeSubtree : function ( t , n , r , i , s , o , u , a ) { t . getPos ( a ) . setc ( n , r ) , t . setData ( "width" , i , a ) , t . setData ( "height" , s , a ) ; var f , l = 0 , c = 0 , h = d . Util . getSubnodes ( t , [ 1 , 1 ] ) ; if ( ! h . length ) return ; e . each ( h , function ( e ) { c += e . getData ( "dim" ) } ) ; for ( var p = 0 , v = h . length ; p < v ; p ++ ) this . layout . horizontal ( ) ? ( f = s * h [ p ] . getData ( "dim" ) / c , this . computeSubtree ( h [ p ] , n + i , r , i , f , o , u , a ) , r += f ) : ( f = i * h [ p ] . getData ( "dim" ) / c , this . computeSubtree ( h [ p ] , n , r + s , f , s , o , u , a ) , n += f ) } } ) , $jit . Icicle = new t ( { Implements : [ y , a , b . Icicle ] , 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 = { animate : ! 1 , orientation : "h" , offset : 2 , levelsToShow : Number . MAX _VALUE , constrained : ! 1 , Node : { type : "rectangle" , overridable : ! 0 } , Edge : { type : "none" } , Label : { type : "Native" } , duration : 700 , fps : 45 } , r = i ( "Canvas" , "Node" , "Edge" , "Fx" , "Tips" , "NodeStyles" , "Events" , "Navigation" , "Controller" , "Label" ) ; this . controller = this . config = e . merge ( r , n , t ) , this . layout . orientation = this . config . orientation ; var s = this . config ; s . useCanvas ? ( this . canvas = s . useCanvas , this . config . labelContainer = this . canvas . id + "-label" ) : ( this . canvas = new f ( this , s ) , this . config . labelContainer = ( typeof s . injectInto == "string" ? s . injectInto : s . 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 . config . Label ) , this . labels = new $jit . Icicle . Label [ this . config . Label . type ] ( this ) , this . fx = new $jit . Icicle . Plot ( this , $jit . Icicle ) , this . op = new $jit . Icicle . Op ( this ) , this . group = new $jit . Icicle . Group ( this ) , this . clickedNode = null , this . initializeExtras ( ) } , refresh : function ( ) { var e = this . config . Label . type ; if ( e != "Native" ) { var t = this ; this . graph . eachNode ( function ( e ) { t . labels . hideLabel ( e , ! 1 ) } ) } this . compute ( ) , this . plot ( ) } , plot : function ( ) { this . fx . plot ( this . config ) } , enter : function ( e ) { if ( this . busy ) return ; this . busy = ! 0 ; var t = this , n = this . config , r = { onComplete : function ( ) { n . request && t . compute ( ) , n . animate ? ( t . graph . nodeList . setDataset ( [ "current" , "end" ] , { alpha : [ 1 , 0 ] } ) , d . Util . eachSubgraph ( e , function ( e ) { e . setData ( "alpha" , 1 , "end" ) } , "ignore" ) , t . fx . animate ( { duration : 500 , modes : [ "node-property:alpha" ] , onComplete : function ( ) { t . clickedNode = e , t . compute ( "end" ) , t . fx . animate ( { modes : [ "linear" , "node-property:width:height" ] , duration : 1e3 , onComplete : function ( ) { t . busy = ! 1 , t . clickedNode = e } } ) } } ) ) : ( t . clickedNode = e , t . busy = ! 1 , t . refresh ( ) ) } } ; n . request ? this . requestNodes
i , r , t ) } , contains : function ( e , t ) { var n = e . getData ( "dim" ) , r = e . pos . getc ( ) . $scale ( e . scale ) ; return this . nodeHelper . triangle . contains ( r , t , n ) } } , star : { render : function ( e , t ) { var n = this . node , r = e . getData ( "dim" ) , i = e . pos . getc ( ) ; r = n . transform ? r * ( 1 - i . squaredNorm ( ) ) : r , i . $scale ( e . scale ) , r > . 2 && this . nodeHelper . star . render ( "fill" , i , r , t ) } , contains : function ( e , t ) { var n = e . getData ( "dim" ) , r = e . pos . getc ( ) . $scale ( e . scale ) ; return this . nodeHelper . star . contains ( r , t , n ) } } } ) , 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 ) , i = e . nodeFrom . scale ; this . edgeHelper . line . render ( { x : n . x * i , y : n . y * i } , { x : r . x * i , y : r . y * i } , t ) } , contains : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) , i = e . nodeFrom . scale ; this . edgeHelper . line . contains ( { x : n . x * i , y : n . y * i } , { x : r . x * i , y : r . y * i } , t , this . edge . epsilon ) } } , arrow : { render : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) , i = e . nodeFrom . scale , s = e . getData ( "dim" ) , o = e . data . $direction , u = o && o . length > 1 && o [ 0 ] != e . nodeFrom . id ; this . edgeHelper . arrow . render ( { x : n . x * i , y : n . y * i } , { x : r . x * i , y : r . y * i } , s , u , t ) } , contains : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ! 0 ) , r = e . nodeTo . pos . getc ( ! 0 ) , i = e . nodeFrom . scale ; this . edgeHelper . arrow . contains ( { x : n . x * i , y : n . y * i } , { x : r . x * i , y : r . y * i } , t , this . edge . epsilon ) } } , hyperline : { render : function ( e , t ) { var n = e . nodeFrom . pos . getc ( ) , r = e . nodeTo . pos . getc ( ) , i = this . viz . getRadius ( ) ; this . edgeHelper . hyperline . render ( n , r , i , t ) } , contains : e . lambda ( ! 1 ) } } ) } ( $jit . Hypertree ) } ) ( ) , 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 . push ( i . length == 1 ? "0" + i : i ) } return t ? n : "#" + n . join ( "" ) } , e . hexToRgb = function ( e ) { if ( e . length != 7 ) { e = e . match ( /^#?(\w{1,2})(\w{1,2})(\w{1,2})$/ ) , e . shift ( ) ; if ( e . length != 3 ) return null ; var t = [ ] ; for ( var n = 0 ; n < 3 ; n ++ ) { var r = e [ n ] ; r . length == 1 && ( r += r ) , t . push ( parseInt ( r , 16 ) ) } return t } return e = parseInt ( e . slice ( 1 ) , 16 ) , [ e >> 16 , e >> 8 & 255 , e & 255 ] } , e . destroy = function ( t ) { e . clean ( t ) , t . parentNode && t . parentNode . removeChild ( t ) , t . clearAttributes && t . clearAttributes ( ) } , e . clean = function ( t ) { for ( var n = t . childNodes , r = 0 , i = n . length ; r < i ; r ++ ) e . destroy ( n [ r ] ) } , e . addEvent = function ( e , t , n ) { e . addEventListener ? e . addEventListener ( t , n , ! 1 ) : e . attachEvent ( "on" + t , n ) } , e . addEvents = function ( t , n ) { for ( var r in n ) e . addEvent ( t , r , n [ r ] ) } , e . hasClass = function ( e , t ) { return ( " " + e . className + " " ) . indexOf
2014-02-04 01:43:31 +00:00
: 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 . eachNode ( e , function ( e ) { e . _flag = ! 1 } ) } , getClosestNodeToOrigin : function ( e , t , n ) { return this . getClosestNodeToPos ( e , l . KER , t , n ) } , getClosestNodeToPos : function ( e , t , n , r ) { var i = null ; n = n || "current" , t = t &&
, 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 . ForceDirected = new t ( { Implements : [ y , a , b . ForceDirected ] , initialize : function ( t ) { var n = $jit . ForceDirected , r = { iterations : 50 , levelDistance : 50 } ; 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 : ! 0 , Node : { selected : ! 1 , exist : ! 0 , drawn : ! 0 } } , this . graph = new d ( this . graphOptions , this . config . Node , this . config . Edge ) , this . labels = new n . Label [ s . Label . type ] ( this ) , this . fx = new n . Plot ( this , n ) , this . op = new n . Op ( this ) , this . json = null , this . busy = ! 1 , this . initializeExtras ( ) } , refresh : function ( ) { this . compute ( ) , this . plot ( ) } , reposition : function ( ) { this . compute ( "end" ) } , computeIncremental : function ( t ) { t = e . merge ( { iter : 20 , property : "end" , onStep : e . empty , onComplete : e . empty } , t || { } ) , this . config . onBeforeCompute ( this . graph . getNode ( this . root ) ) , this . compute ( t . property , t ) } , plot : function ( ) { this . fx . plot ( ) } , animate : function ( t ) { this . fx . animate ( e . merge ( { modes : [ "linear" ] } , t || { } ) ) } } ) , $jit . ForceDirected . $extend = ! 0 , function ( n ) { n . Op = new t ( { Implements : d . Op } ) , n . Plot = new t ( { Implements : d . Plot } ) , n . Label = { } , n . Label . Native = new t ( { Implements : d . Label . Native } ) , n . Label . SVG = new t ( { Implements : d . Label . SVG , initialize : function ( 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 ) } ; e . setAttribute ( "x" , l . x ) , e . setAttribute ( "y" , l . y ) , n . onPlaceLabel ( e , t ) } } ) , n . Label . HTML = new t ( { Implements : d . Label . HTML , initialize : function ( 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 . nodeHel
. widgetEventPrefix ? t : this . widgetEventPrefix + t ) . toLowerCase ( ) , n . target = this . element [ 0 ] , s = n . originalEvent ; if ( s ) for ( i in s ) i in n || ( n [ i ] = s [ i ] ) ; return this . element . trigger ( n , r ) , ! ( e . isFunction ( o ) && o . call ( this . element [ 0 ] , n , r ) === ! 1 || n . isDefaultPrevented ( ) ) } } } ( jQuery ) , function ( e , t ) { var n = ! 1 ; e ( document ) . mouseup ( function ( e ) { n = ! 1 } ) , e . widget ( "ui.mouse" , { options : { cancel : ":input,option" , distance : 1 , delay : 0 } , _mouseInit : function ( ) { var t = this ; this . element . bind ( "mousedown." + this . widgetName , function ( e ) { return t . _mouseDown ( e ) } ) . bind ( "click." + this . widgetName , function ( n ) { if ( ! 0 === e . data ( n . target , t . widgetName + ".preventClickEvent" ) ) return e . removeData ( n . target , t . widgetName + ".preventClickEvent" ) , n . stopImmediatePropagation ( ) , ! 1 } ) , this . started = ! 1 } , _mouseDestroy : function ( ) { this . element . unbind ( "." + this . widgetName ) , this . _mouseMoveDelegate && e ( document ) . unbind ( "mousemove." + this . widgetName , this . _mouseMoveDelegate ) . unbind ( "mouseup." + this . widgetName , this . _mouseUpDelegate ) } , _mouseDown : function ( t ) { if ( n ) return ; this . _mouseStarted && this . _mouseUp ( t ) , this . _mouseDownEvent = t ; var r = this , i = t . which == 1 , s = typeof this . options . cancel == "string" && t . target . nodeName ? e ( t . target ) . closest ( this . options . cancel ) . length : ! 1 ; if ( ! i || s || ! this . _mouseCapture ( t ) ) return ! 0 ; this . mouseDelayMet = ! this . options . delay , this . mouseDelayMet || ( this . _mouseDelayTimer = setTimeout ( function ( ) { r . mouseDelayMet = ! 0 } , this . options . delay ) ) ; if ( this . _mouseDistanceMet ( t ) && this . _mouseDelayMet ( t ) ) { this . _mouseStarted = this . _mouseStart ( t ) !== ! 1 ; if ( ! this . _mouseStarted ) return t . preventDefault ( ) , ! 0 } return ! 0 === e . data ( t . target , this . widgetName + ".preventClickEvent" ) && e . removeData ( t . target , this . widgetName + ".preventClickEvent" ) , this . _mouseMoveDelegate = function ( e ) { return r . _mouseMove ( e ) } , this . _mouseUpDelegate = function ( e ) { return r . _mouseUp ( e ) } , e ( document ) . bind ( "mousemove." + this . widgetName , this . _mouseMoveDelegate ) . bind ( "mouseup." + this . widgetName , this . _mouseUpDelegate ) , t . preventDefault ( ) , n = ! 0 , ! 0 } , _mouseMove : function ( t ) { return ! e . browser . msie || document . documentMode >= 9 || ! ! t . button ? this . _mouseStarted ? ( this . _mouseDrag ( t ) , t . preventDefault ( ) ) : ( this . _mouseDistanceMet ( t ) && this . _mouseDelayMet ( t ) && ( this . _mouseStarted = this . _mouseStart ( this . _mouseDownEvent , t ) !== ! 1 , this . _mouseStarted ? this . _mouseDrag ( t ) : this . _mouseUp ( t ) ) , ! this . _mouseStarted ) : this . _mouseUp ( t ) } , _mouseUp : function ( t ) { return e ( document ) . unbind ( "mousemove." + this . widgetName , this . _mouseMoveDelegate ) . unbind ( "mouseup." + this . widgetName , this . _mouseUpDelegate ) , this . _mouseStarted && ( this . _mouseStarted = ! 1 , t . target == this . _mouseDownEvent . target && e . data ( t . target , this . widgetName + ".preventClickEvent" , ! 0 ) , this . _mouseStop ( t ) ) , ! 1 } , _mouseDistanceMet : function ( e ) { return Math . max ( Math . abs ( this . _mouseDownEvent . pageX - e . pageX ) , Math . abs ( this . _mouseDownEvent . pageY - e . pageY ) ) >= this . options . distance } , _mouseDelayMet : function ( e ) { return this . mouseDelayMet } , _mouseStart : function ( e ) { } , _mouseDrag : function ( e ) { } , _mouseStop : function ( e ) { } , _mouseCapture : function ( e ) { return ! 0 } } ) } ( jQuery ) , function ( e , t ) { e . ui = e . ui || { } ; var n = /left|center|right/ , r = /top|center|bottom/ , i = "center" , s = { } , o = e . fn . position , u = e . fn . offset ; e . fn . position = function ( t ) { if ( ! t || ! t . of ) return o . apply ( this , arguments ) ; t = e . extend ( { } , t ) ; var u = e ( t . of ) , l = u [ 0 ] , h = ( t . collision || "flip" ) . split ( " " ) , p = t . offset ? t . offset . split ( " " ) : [ 0 , 0 ] , v , m , y ; return l . nodeType === 9 ? ( v = u . width ( ) , m = u . height ( ) , y = { top : 0 , left : 0 } ) : l . setTimeout ? ( v = u . width ( ) , m = u . height ( ) , y = { top : u . scrollTop ( ) , left : u . scrollLeft ( ) } ) : l . preventDefault ? ( t . at = "left top" , v = m = 0 , y = { top : t . of . pageY , left : t . of . pageX } ) : ( v = u . outerWidth ( ) , m = u . outerHeight ( ) , y = u . offset ( ) ) , e . each ( [ "my" , "at" ] , function ( ) { var e = ( t [ this ] || "" ) . split ( " " ) ; e . length === 1 && ( e = n . test ( e [ 0 ] ) ? e . concat ( [ i ] ) : r . test ( e [ 0 ] ) ? [ i ] . concat ( e ) : [ i , i ] ) , e [ 0 ] = n . test ( e [ 0 ] ) ? e [ 0 ] : i , e [ 1 ] = r . test ( e [ 1 ] ) ? e [ 1 ] : i , t [ this ] = e } ) , h . length === 1 && ( h [ 1 ] = h [ 0 ] ) , p [ 0 ] = parseInt ( p [ 0 ] , 10 ) || 0 , p . length === 1 && ( p [ 1 ] = p [ 0 ] ) , p [ 1 ] = parseInt ( p [ 1 ] , 10 ) || 0 , t . at [ 0 ] === "right" ? y . left += v : t . at [ 0 ] === i && ( y . left += v / 2 ) , t . at [ 1 ] === "bottom" ? y . top += m : t . at [ 1 ] === i && ( y . top += m / 2 ) , y . left += p [ 0 ] , y . top += p [ 1 ] , this . each ( function ( ) { var n = e ( this ) , r = n . outerWidth ( ) , o = n . outerHeight ( ) , u = parseInt ( e . curCSS ( this , "marginLeft" , ! 0 ) ) || 0 , l = parseInt ( e . curCSS ( this , " margin
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 ) { var t = { init : function ( t ) { function r ( ) { return "ontouchstart" in window ? 1 : 0 } var n = { set _width : ! 1 , set _height : ! 1 , horizontalScroll : ! 1 , scrollInertia : 550 , scrollEasing : "easeOutCirc" , mouseWheel : "auto" , autoDraggerLength : ! 0 , scrollButtons : { enable : ! 1 , scrollType : "continuous" , scrollSpeed : 20 , scrollAmount : 40 } , advanced : { updateOnBrowserResize : ! 0 , updateOnContentResize : ! 1 , autoExpandHorizontalScroll : ! 1 } , callbacks : { onScroll : function ( ) { } , onTotalScroll : function ( ) { } , onTotalScrollOffset : 0 } } , t = e . extend ( ! 0 , n , t ) ; return e ( document ) . data ( "mCS-is-touch-device" , ! 1 ) , r ( ) && e ( document ) . data ( "mCS-is-touch-device" , ! 0 ) , this . each ( function ( ) { var n = e ( this ) ; t . set _width && n . css ( "width" , t . set _width ) , t . set _height && n . css ( "height" , t . set _height ) ; if ( ! e ( document ) . data ( "mCustomScrollbar-index" ) ) e ( document ) . data ( "mCustomScrollbar-index" , "1" ) ; else { var i = parseInt ( e ( document ) . data ( "mCustomScrollbar-index" ) ) ; e ( document ) . data ( "mCustomScrollbar-index" , i + 1 ) } n . wrapInner ( "<div class='mCustomScrollBox' id='mCSB_" + e ( document ) . data ( "mCustomScrollbar-index" ) + "' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />" ) . addClass ( "mCustomScrollbar _mCS_" + e ( document ) . data ( "mCustomScrollbar-index" ) ) ; var s = n . children ( ".mCustomScrollBox" ) ; if ( t . horizontalScroll ) { s . addClass ( "mCSB_horizontal" ) . wrapInner ( "<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />" ) ; var o = s . children ( ".mCSB_h_wrapper" ) ; o . wrapInner ( "<div class='mCSB_container' style='position:absolute; left:0;' />" ) . children ( ".mCSB_container" ) . css ( { width : o . children ( ) . outerWidth ( ) , position : "relative" } ) . unwrap ( ) } else s . wrapInner ( "<div class='mCSB_container' style='position:relative; top:0;' />" ) ; var u = s . children ( ".mCSB_container" ) ; if ( ! e ( document ) . data ( "mCS-is-touch-device" ) ) { u . after ( "<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer' style='position:relative;'><div class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' style='position:relative;'></div></div><div class='mCSB_draggerRail'></div></div></div>" ) ; var a = s . children ( ".mCSB_scrollTools" ) , f = a . children ( ".mCSB_draggerContainer" ) , l = f . children ( ".mCSB_dragger" ) ; t . horizontalScroll ? l . data ( "minDraggerWidth" , l . width ( ) ) : l . data ( "minDraggerHeight" , l . height ( ) ) , t . scrollButtons . enable && ( t . horizontalScroll ? a . prepend ( "<a class='mCSB_buttonLeft' style='display:block; position:relative;'></a>" ) . append ( "<a class='mCSB_buttonRight' style='display:block; position:relative;'></a>" ) : a . prepend ( "<a class='mCSB_buttonUp' style='display:block; position:relative;'></a>" ) . append ( "<a class='mCSB_buttonDown' style='display:block; position:relative;'></a>" ) ) , s . bind ( "scroll" , function ( ) { s . scrollTop ( 0 ) . scrollLeft ( 0 ) } ) , n . data ( { horizontalScroll : t . horizontalScroll , scrollInertia : t . scrollInertia , scrollEasing : t . scrollEasing , mouseWheel : t . mouseWheel , autoDraggerLength : t . autoDraggerLength , "scrollButtons-enable" : t . scrollButtons . enable , "scrollButtons-scrollType" : t . scrollButtons . scrollType , "scrollButtons-scrollSpeed" : t . scrollButtons . scrollSpeed , "scrollButtons-scrollAmount" : t . scrollButtons . scrollAmount , autoExpandHorizontalScroll : t . advanced . autoExpandHorizontalScroll , "onScroll-Callback" : t . callbacks . onScroll , "onTotalScroll-Callback" : t . callbacks . onTotalScroll , "onTotalScroll-Offset" : t . callbacks . onTotalScrollOffset } ) . mCustomScrollbar ( "update" ) ; if ( t . advanced . updateOnBrowserResize ) { var h ; e ( window ) . resize ( function ( ) { h && clearTimeout ( h ) , h = setTimeout ( function ( ) { n . mCustomScrollbar ( "update" ) } , 150 ) } ) } } else { var p = navigator . userAgent ; if ( p . indexOf ( "
( ) ) } , r . prototype . flushBuffer = function ( ) { this . transport . payload ( this . buffer ) , this . buffer = [ ] } , r . prototype . disconnect = function ( ) { if ( this . connected || this . connecting ) this . open && this . of ( "" ) . packet ( { type : "disconnect" } ) , this . onDisconnect ( "booted" ) ; return this } , r . prototype . disconnectSync = function ( ) { var e = t . util . request ( ) , n = [ "http" + ( this . options . secure ? "s" : "" ) + ":/" , this . options . host + ":" + this . options . port , this . options . resource , t . protocol , "" , this . sessionid ] . join ( "/" ) + "/?disconnect=1" ; e . open ( "GET" , n , ! 1 ) , e . send ( null ) , this . onDisconnect ( "booted" ) } , r . prototype . isXDomain = function ( ) { var e = n . location . port || ( "https:" == n . location . protocol ? 443 : 80 ) ; return this . options . host !== n . location . hostname || this . options . port != e } , r . prototype . onConnect = function ( ) { this . connected || ( this . connected = ! 0 , this . connecting = ! 1 , this . doBuffer || this . setBuffer ( ! 1 ) , this . emit ( "connect" ) ) } , r . prototype . onOpen = function ( ) { this . open = ! 0 } , r . prototype . onClose = function ( ) { this . open = ! 1 , clearTimeout ( this . heartbeatTimeoutTimer ) } , r . prototype . onPacket = function ( e ) { this . of ( e . endpoint ) . onPacket ( e ) } , r . prototype . onError = function ( e ) { e && e . advice && e . advice === "reconnect" && ( this . connected || this . connecting ) && ( this . disconnect ( ) , this . options . reconnect && this . reconnect ( ) ) , this . publish ( "error" , e && e . reason ? e . reason : e ) } , r . prototype . onDisconnect = function ( e ) { var t = this . connected , n = this . connecting ; this . connected = ! 1 , this . connecting = ! 1 , this . open = ! 1 ; if ( t || n ) this . transport . close ( ) , this . transport . clearTimeouts ( ) , t && ( this . publish ( "disconnect" , e ) , "booted" != e && this . options . reconnect && ! this . reconnecting && this . reconnect ( ) ) } , r . prototype . reconnect = function ( ) { function i ( ) { if ( e . connected ) { for ( var t in e . namespaces ) e . namespaces . hasOwnProperty ( t ) && "" !== t && e . namespaces [ t ] . packet ( { type : "connect" } ) ; e . publish ( "reconnect" , e . transport . name , e . reconnectionAttempts ) } clearTimeout ( e . reconnectionTimer ) , e . removeListener ( "connect_failed" , s ) , e . removeListener ( "connect" , s ) , e . reconnecting = ! 1 , delete e . reconnectionAttempts , delete e . reconnectionDelay , delete e . reconnectionTimer , delete e . redoTransports , e . options [ "try multiple transports" ] = n } function s ( ) { if ( ! e . reconnecting ) return ; if ( e . connected ) return i ( ) ; if ( e . connecting && e . reconnecting ) return e . reconnectionTimer = setTimeout ( s , 1e3 ) ; e . reconnectionAttempts ++ >= t ? e . redoTransports ? ( e . publish ( "reconnect_failed" ) , i ( ) ) : ( e . on ( "connect_failed" , s ) , e . options [ "try multiple transports" ] = ! 0 , e . transports = e . origTransports , e . transport = e . getTransport ( ) , e . redoTransports = ! 0 , e . connect ( ) ) : ( e . reconnectionDelay < r && ( e . reconnectionDelay *= 2 ) , e . connect ( ) , e . publish ( "reconnecting" , e . reconnectionDelay , e . reconnectionAttempts ) , e . reconnectionTimer = setTimeout ( s , e . reconnectionDelay ) ) } this . reconnecting = ! 0 , this . reconnectionAttempts = 0 , this . reconnectionDelay = this . options [ "reconnection delay" ] ; var e = this , t = this . options [ "max reconnection attempts" ] , n = this . options [ "try multiple transports" ] , r = this . options [ "reconnection limit" ] ; this . options [ "try multiple transports" ] = ! 1 , this . reconnectionTimer = setTimeout ( s , this . reconnectionDelay ) , this . on ( "connect" , s ) } } ( "undefined" != typeof io ? io : module . exports , "undefined" != typeof io ? io : module . parent . exports , this ) , function ( e , t ) { function n ( e , t ) { this . socket = e , this . name = t || "" , this . flags = { } , this . json = new r ( this , "json" ) , this . ackPackets = 0 , this . acks = { } } function r ( e , t ) { this . namespace = e , this . name = t } e . SocketNamespace = n , t . util . mixin ( n , t . EventEmitter ) , n . prototype . $emit = t . EventEmitter . prototype . emit , n . prototype . of = function ( ) { return this . socket . of . apply ( this . socket , arguments ) } , n . prototype . packet = function ( e ) { return e . endpoint = this . name , this . socket . packet ( e ) , this . flags = { } , this } , n . prototype . send = function ( e , t ) { var n = { type : this . flags . json ? "json" : "message" , data : e } ; return "function" == typeof t && ( n . id = ++ this . ackPackets , n . ack = ! 0 , this . acks [ n . id ] = t ) , this . packet ( n ) } , n . prototype . emit = function ( e ) { var t = Array . prototype . slice . call ( arguments , 1 ) , n = t [ t . length - 1 ] , r = { type : "event" , name : e } ; return "function" == typeof n && ( r . id = ++ this . ackPackets , r . ack = "data" , this . acks [ r . id ] = n , t = t . slice ( 0 , t . length - 1 ) ) , r . args = t , this . packet ( r ) } , n . prototype . disconnect = function ( ) { return this . name === "" ? this . socket . disconnect ( ) : ( this . packet ( { type : "disconnect" } ) , this . $emit ( " discon
. mixin ( e . prototype , { get : function ( e ) { return this . cache [ e ] } , set : function ( e , t ) { var n ; this . cachedKeysByAge . length === this . sizeLimit && ( n = this . cachedKeysByAge . shift ( ) , delete this . cache [ n ] ) , this . cache [ e ] = t , this . cachedKeysByAge . push ( e ) } } ) , e } ( ) , u = function ( ) { function t ( e ) { n . bindAll ( this ) , e = n . isString ( e ) ? { url : e } : e , a = a || new o , u = n . isNumber ( e . maxParallelRequests ) ? e . maxParallelRequests : u || 6 , this . url = e . url , this . wildcard = e . wildcard || "%QUERY" , this . filter = e . filter , this . replace = e . replace , this . ajaxSettings = { type : "get" , cache : e . cache , timeout : e . timeout , dataType : e . dataType || "json" , beforeSend : e . beforeSend } , this . _get = ( /^throttle$/i . test ( e . rateLimitFn ) ? n . throttle : n . debounce ) ( this . _get , e . rateLimitWait || 300 ) } function r ( ) { f ++ } function i ( ) { f -- } function s ( ) { return u > f } var u , a , f = 0 , l = { } ; return n . mixin ( t . prototype , { _get : function ( e , t ) { function n ( n ) { var i = r . filter ? r . filter ( n ) : n ; t && t ( i ) , a . set ( e , n ) } var r = this ; s ( ) ? this . _sendRequest ( e ) . done ( n ) : this . onDeckRequestArgs = [ ] . slice . call ( arguments , 0 ) } , _sendRequest : function ( t ) { function n ( ) { i ( ) , l [ t ] = null , s . onDeckRequestArgs && ( s . _get . apply ( s , s . onDeckRequestArgs ) , s . onDeckRequestArgs = null ) } var s = this , o = l [ t ] ; return o || ( r ( ) , o = l [ t ] = e . ajax ( t , this . ajaxSettings ) . always ( n ) ) , o } , get : function ( e , t ) { var r , i , s = this , o = encodeURIComponent ( e || "" ) ; return t = t || n . noop , r = this . replace ? this . replace ( this . url , o ) : this . url . replace ( this . wildcard , o ) , ( i = a . get ( r ) ) ? n . defer ( function ( ) { t ( s . filter ? s . filter ( i ) : i ) } ) : this . _get ( r , t ) , ! ! i } } ) , t } ( ) , a = function ( ) { function r ( t ) { n . bindAll ( this ) , n . isString ( t . template ) && ! t . engine && e . error ( "no template engine specified" ) , t . local || t . prefetch || t . remote || e . error ( "one of local, prefetch, or remote is required" ) , this . name = t . name || n . getUniqueId ( ) , this . limit = t . limit || 5 , this . minLength = t . minLength || 1 , this . header = t . header , this . footer = t . footer , this . valueKey = t . valueKey || "value" , this . template = i ( t . template , t . engine , this . valueKey ) , this . local = t . local , this . prefetch = t . prefetch , this . remote = t . remote , this . itemHash = { } , this . adjacencyList = { } , this . storage = t . name ? new s ( t . name ) : null } function i ( e , t , r ) { var i , s ; return n . isFunction ( e ) ? i = e : n . isString ( e ) ? ( s = t . compile ( e ) , i = n . bind ( s . render , s ) ) : i = function ( e ) { return "<p>" + e [ r ] + "</p>" } , i } var o = { thumbprint : "thumbprint" , protocol : "protocol" , itemHash : "itemHash" , adjacencyList : "adjacencyList" } ; return n . mixin ( r . prototype , { _processLocalData : function ( e ) { this . _mergeProcessedData ( this . _processData ( e ) ) } , _loadPrefetchData : function ( r ) { function i ( e ) { var t = r . filter ? r . filter ( e ) : e , i = h . _processData ( t ) , s = i . itemHash , u = i . adjacencyList ; h . storage && ( h . storage . set ( o . itemHash , s , r . ttl ) , h . storage . set ( o . adjacencyList , u , r . ttl ) , h . storage . set ( o . thumbprint , p , r . ttl ) , h . storage . set ( o . protocol , n . getProtocol ( ) , r . ttl ) ) , h . _mergeProcessedData ( i ) } var s , u , a , f , l , c , h = this , p = t + ( r . thumbprint || "" ) ; return this . storage && ( s = this . storage . get ( o . thumbprint ) , u = this . storage . get ( o . protocol ) , a = this . storage . get ( o . itemHash ) , f = this . storage . get ( o . adjacencyList ) ) , l = s !== p || u !== n . getProtocol ( ) , r = n . isString ( r ) ? { url : r } : r , r . ttl = n . isNumber ( r . ttl ) ? r . ttl : 864e5 , a && f && ! l ? ( this . _mergeProcessedData ( { itemHash : a , adjacencyList : f } ) , c = e . Deferred ( ) . resolve ( ) ) : c = e . getJSON ( r . url ) . done ( i ) , c } , _transformDatum : function ( e ) { var t = n . isString ( e ) ? e : e [ this . valueKey ] , r = e . tokens || n . tokenizeText ( t ) , i = { value : t , tokens : r } ; return n . isString ( e ) ? ( i . datum = { } , i . datum [ this . valueKey ] = e ) : i . datum = e , i . tokens = n . filter ( i . tokens , function ( e ) { return ! n . isBlankString ( e ) } ) , i . tokens = n . map ( i . tokens , function ( e ) { return e . toLowerCase ( ) } ) , i } , _processData : function ( e ) { var t = this , r = { } , i = { } ; return n . each ( e , function ( e , s ) { var o = t . _transformDatum ( s ) , u = n . getUniqueId ( o . value ) ; r [ u ] = o , n . each ( o . tokens , function ( e , t ) { var r = t . charAt ( 0 ) , s = i [ r ] || ( i [ r ] = [ u ] ) ; ! ~ n . indexOf ( s , u ) && s . push ( u ) } ) } ) , { itemHash : r , adjacencyList : i } } , _mergeProcessedData : function ( e ) { var t = this ; n . mixin ( this . itemHash , e . itemHash ) , n . each ( e . adjacencyList , function ( e , n ) { var r = t . adjacencyList [ e ] ; t . adjacencyList [ e ] = r ? r . concat ( n ) : n } ) } , _getLocalSuggestions : function ( e ) { var t , r = this , i = [ ] , s = [ ] , o = [ ] ; return n . each ( e , function ( e , t ) { var r = t . charAt ( 0 ) ; ! ~ n . indexOf ( i , r ) && i . push ( r ) } ) , n . each ( i , function ( e , n ) { var i = r . adjacencyList [ n ] ; return i ? ( s . push ( i ) , ( ! t || i . length < t . length ) && ( t = i ) , void 0 ) : ! 1 } ) , s . length < i . le