2017-01-27 16:07:14 -07:00
! function ( factory ) { "use strict" ; "function" == typeof define && define . amd ? define ( [ "jquery" ] , factory ) : factory ( "object" == typeof exports ? require ( "jquery" ) : jQuery ) } ( function ( $ , undefined ) { "use strict" ; if ( ! $ . jstree ) { var _temp1 , _temp2 , instance _counter = 0 , ccp _node = ! 1 , ccp _mode = ! 1 , ccp _inst = ! 1 , themes _loaded = [ ] , src = $ ( "script:last" ) . attr ( "src" ) , document = window . document , _node = document . createElement ( "LI" ) ; _node . setAttribute ( "role" , "treeitem" ) , _temp1 = document . createElement ( "I" ) , _temp1 . className = "jstree-icon jstree-ocl" , _temp1 . setAttribute ( "role" , "presentation" ) , _node . appendChild ( _temp1 ) , _temp1 = document . createElement ( "A" ) , _temp1 . className = "jstree-anchor" , _temp1 . setAttribute ( "href" , "#" ) , _temp1 . setAttribute ( "tabindex" , "-1" ) , _temp2 = document . createElement ( "I" ) , _temp2 . className = "jstree-icon jstree-themeicon" , _temp2 . setAttribute ( "role" , "presentation" ) , _temp1 . appendChild ( _temp2 ) , _node . appendChild ( _temp1 ) , _temp1 = _temp2 = null , $ . jstree = { version : "3.1.1" , defaults : { plugins : [ ] } , plugins : { } , path : src && src . indexOf ( "/" ) !== - 1 ? src . replace ( /\/[^\/]+$/ , "" ) : "" , idregex : /[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g } , $ . jstree . create = function ( el , options ) { var tmp = new $ . jstree . core ( ++ instance _counter ) , opt = options ; return options = $ . extend ( ! 0 , { } , $ . jstree . defaults , options ) , opt && opt . plugins && ( options . plugins = opt . plugins ) , $ . each ( options . plugins , function ( i , k ) { "core" !== i && ( tmp = tmp . plugin ( k , options [ k ] ) ) } ) , $ ( el ) . data ( "jstree" , tmp ) , tmp . init ( el , options ) , tmp } , $ . jstree . destroy = function ( ) { $ ( ".jstree:jstree" ) . jstree ( "destroy" ) , $ ( document ) . off ( ".jstree" ) } , $ . jstree . core = function ( id ) { this . _id = id , this . _cnt = 0 , this . _wrk = null , this . _data = { core : { themes : { name : ! 1 , dots : ! 1 , icons : ! 1 } , selected : [ ] , last _error : { } , working : ! 1 , worker _queue : [ ] , focused : null } } } , $ . jstree . reference = function ( needle ) { var tmp = null , obj = null ; if ( ! needle || ! needle . id || needle . tagName && needle . nodeType || ( needle = needle . id ) , ! obj || ! obj . length ) try { obj = $ ( needle ) } catch ( ignore ) { } if ( ! obj || ! obj . length ) try { obj = $ ( "#" + needle . replace ( $ . jstree . idregex , "\\$&" ) ) } catch ( ignore ) { } return obj && obj . length && ( obj = obj . closest ( ".jstree" ) ) . length && ( obj = obj . data ( "jstree" ) ) ? tmp = obj : $ ( ".jstree" ) . each ( function ( ) { var inst = $ ( this ) . data ( "jstree" ) ; if ( inst && inst . _model . data [ needle ] ) return tmp = inst , ! 1 } ) , tmp } , $ . fn . jstree = function ( arg ) { var is _method = "string" == typeof arg , args = Array . prototype . slice . call ( arguments , 1 ) , result = null ; return ! ( arg === ! 0 && ! this . length ) && ( this . each ( function ( ) { var instance = $ . jstree . reference ( this ) , method = is _method && instance ? instance [ arg ] : null ; if ( result = is _method && method ? method . apply ( instance , args ) : null , instance || is _method || arg !== undefined && ! $ . isPlainObject ( arg ) || $ . jstree . create ( this , arg ) , ( instance && ! is _method || arg === ! 0 ) && ( result = instance || ! 1 ) , null !== result && result !== undefined ) return ! 1 } ) , null !== result && result !== undefined ? result : this ) } , $ . expr [ ":" ] . jstree = $ . expr . createPseudo ( function ( search ) { return function ( a ) { return $ ( a ) . hasClass ( "jstree" ) && $ ( a ) . data ( "jstree" ) !== undefined } } ) , $ . jstree . defaults . core = { data : ! 1 , strings : ! 1 , check _callback : ! 1 , error : $ . noop , animation : 200 , multiple : ! 0 , themes : { name : ! 1 , url : ! 1 , dir : ! 1 , dots : ! 0 , icons : ! 0 , stripes : ! 1 , variant : ! 1 , responsive : ! 1 } , expand _selected _onload : ! 0 , worker : ! 0 , force _text : ! 1 , dblclick _toggle : ! 0 } , $ . jstree . core . prototype = { plugin : function ( deco , opts ) { var Child = $ . jstree . plugins [ deco ] ; return Child ? ( this . _data [ deco ] = { } , Child . prototype = this , new Child ( opts , this ) ) : this } , init : function ( el , options ) { this . _model = { data : { "#" : { id : "#" , parent : null , parents : [ ] , children : [ ] , children _d : [ ] , state : { loaded : ! 1 } } } , changed : [ ] , force _full _redraw : ! 1 , redraw _timeout : ! 1 , default _state : { loaded : ! 0 , opened : ! 1 , selected : ! 1 , disabled : ! 1 } } , this . element = $ ( el ) . addClass ( "jstree jstree-" + this . _id ) , this . settings = options , this . _data . core . ready = ! 1 , this . _data . core . loaded = ! 1 , this . _data . core . rtl = "rtl" === this . element . css ( "direction" ) , this . element [ this . _data . core . rtl ? "addClass" : "removeClass" ] ( "jstree-rtl" ) , this . element . attr ( "role" , "tree" ) , this . settings . core . multiple && this . element . attr ( "aria-multiselectable" , ! 0 ) , this . element . attr ( "tabindex" ) || this . element . attr ( "tabindex" , "0" ) , this . bind ( ) , this . trigger ( "init" ) , this . _data . core . original _container _html = this . element . find ( " > ul > li" ) . clone ( ! 0 ) , this . _d
if ( d && d . children && d . children . length ) { for ( i = 0 , j = d . children . length ; i < j ; i ++ ) c = this . _parse _model _from _json ( d . children [ i ] , tmp . id , ps ) , e = m [ c ] , tmp . children . push ( c ) , e . children _d . length && ( tmp . children _d = tmp . children _d . concat ( e . children _d ) ) ; tmp . children _d = tmp . children _d . concat ( tmp . children ) } return d && d . children && d . children === ! 0 && ( tmp . state . loaded = ! 1 , tmp . children = [ ] , tmp . children _d = [ ] ) , delete d . data , delete d . children , tmp . original = d , m [ tmp . id ] = tmp , tmp . state . selected && this . _data . core . selected . push ( tmp . id ) , tmp . id } , _redraw : function ( ) { var tmp , i , j , nodes = this . _model . force _full _redraw ? this . _model . data [ "#" ] . children . concat ( [ ] ) : this . _model . changed . concat ( [ ] ) , f = document . createElement ( "UL" ) , fe = this . _data . core . focused ; for ( i = 0 , j = nodes . length ; i < j ; i ++ ) tmp = this . redraw _node ( nodes [ i ] , ! 0 , this . _model . force _full _redraw ) , tmp && this . _model . force _full _redraw && f . appendChild ( tmp ) ; this . _model . force _full _redraw && ( f . className = this . get _container _ul ( ) [ 0 ] . className , f . setAttribute ( "role" , "group" ) , this . element . empty ( ) . append ( f ) ) , null !== fe && ( tmp = this . get _node ( fe , ! 0 ) , tmp && tmp . length && tmp . children ( ".jstree-anchor" ) [ 0 ] !== document . activeElement ? tmp . children ( ".jstree-anchor" ) . focus ( ) : this . _data . core . focused = null ) , this . _model . force _full _redraw = ! 1 , this . _model . changed = [ ] , this . trigger ( "redraw" , { nodes : nodes } ) } , redraw : function ( full ) { full && ( this . _model . force _full _redraw = ! 0 ) , this . _redraw ( ) } , draw _children : function ( node ) { var obj = this . get _node ( node ) , i = ! 1 , j = ! 1 , k = ! 1 , d = document ; if ( ! obj ) return ! 1 ; if ( "#" === obj . id ) return this . redraw ( ! 0 ) ; if ( node = this . get _node ( node , ! 0 ) , ! node || ! node . length ) return ! 1 ; if ( node . children ( ".jstree-children" ) . remove ( ) , node = node [ 0 ] , obj . children . length && obj . state . loaded ) { for ( k = d . createElement ( "UL" ) , k . setAttribute ( "role" , "group" ) , k . className = "jstree-children" , i = 0 , j = obj . children . length ; i < j ; i ++ ) k . appendChild ( this . redraw _node ( obj . children [ i ] , ! 0 , ! 0 ) ) ; node . appendChild ( k ) } } , redraw _node : function ( node , deep , is _callback , force _render ) { var obj = this . get _node ( node ) , par = ! 1 , ind = ! 1 , old = ! 1 , i = ! 1 , j = ! 1 , k = ! 1 , c = "" , d = document , m = this . _model . data , f = ! 1 , tmp = null , t = 0 , l = 0 ; if ( ! obj ) return ! 1 ; if ( "#" === obj . id ) return this . redraw ( ! 0 ) ; if ( deep = deep || 0 === obj . children . length , node = document . querySelector ? this . element [ 0 ] . querySelector ( "#" + ( "0123456789" . indexOf ( obj . id [ 0 ] ) !== - 1 ? "\\3" + obj . id [ 0 ] + " " + obj . id . substr ( 1 ) . replace ( $ . jstree . idregex , "\\$&" ) : obj . id . replace ( $ . jstree . idregex , "\\$&" ) ) ) : document . getElementById ( obj . id ) ) node = $ ( node ) , is _callback || ( par = node . parent ( ) . parent ( ) [ 0 ] , par === this . element [ 0 ] && ( par = null ) , ind = node . index ( ) ) , deep || ! obj . children . length || node . children ( ".jstree-children" ) . length || ( deep = ! 0 ) , deep || ( old = node . children ( ".jstree-children" ) [ 0 ] ) , f = node . children ( ".jstree-anchor" ) [ 0 ] === document . activeElement , node . remove ( ) ; else if ( deep = ! 0 , ! is _callback ) { if ( par = "#" !== obj . parent ? $ ( "#" + obj . parent . replace ( $ . jstree . idregex , "\\$&" ) , this . element ) [ 0 ] : null , ! ( null === par || par && m [ obj . parent ] . state . opened ) ) return ! 1 ; ind = $ . inArray ( obj . id , null === par ? m [ "#" ] . children : m [ obj . parent ] . children ) } node = _node . cloneNode ( ! 0 ) , c = "jstree-node " ; for ( i in obj . li _attr ) if ( obj . li _attr . hasOwnProperty ( i ) ) { if ( "id" === i ) continue ; "class" !== i ? node . setAttribute ( i , obj . li _attr [ i ] ) : c += obj . li _attr [ i ] } obj . a _attr . id || ( obj . a _attr . id = obj . id + "_anchor" ) , node . setAttribute ( "aria-selected" , ! ! obj . state . selected ) , node . setAttribute ( "aria-level" , obj . parents . length ) , node . setAttribute ( "aria-labelledby" , obj . a _attr . id ) , obj . state . disabled && node . setAttribute ( "aria-disabled" , ! 0 ) , obj . state . loaded && ! obj . children . length ? c += " jstree-leaf" : ( c += obj . state . opened && obj . state . loaded ? " jstree-open" : " jstree-closed" , node . setAttribute ( "aria-expanded" , obj . state . opened && obj . state . loaded ) ) , null !== obj . parent && m [ obj . parent ] . children [ m [ obj . parent ] . children . length - 1 ] === obj . id && ( c += " jstree-last" ) , node . id = obj . id , node . className = c , c = ( obj . state . selected ? " jstree-clicked" : "" ) + ( obj . state . disabled ? " jstree-disabled" : "" ) ; for ( j in obj . a _attr ) if ( obj . a _attr . hasOwnProperty ( j ) ) { if ( "href" === j && "#" === obj . a _attr [ j ] ) continue ; "class" !== j ? node . childNodes [ 1 ] . setAttribute ( j , obj . a _attr [ j ] ) : c += " " + obj . a _attr [ j ] } if ( c . length && ( node . childNodes [ 1 ] . className = "jstree-anchor " + c ) , ( obj . icon && obj . icon !== ! 0 || obj . icon === ! 1 ) && ( obj . icon
i = 0 , j = new _par . children . length ; i < j ; i ++ ) dpc [ i >= pos ? i + 1 : i ] = new _par . children [ i ] ; return dpc [ pos ] = tmp . id , new _par . children = dpc , new _par . children _d . push ( tmp . id ) , new _par . children _d = new _par . children _d . concat ( tmp . children _d ) , "#" === new _par . id && ( this . _model . force _full _redraw = ! 0 ) , this . _model . force _full _redraw || this . _node _changed ( new _par . id ) , skip _redraw || this . redraw ( "#" === new _par . id ) , callback && callback . call ( this , tmp , new _par , pos ) , this . trigger ( "copy_node" , { node : tmp , original : obj , parent : new _par . id , position : pos , old _parent : old _par , old _position : old _ins && old _ins . _id && old _par && old _ins . _model . data [ old _par ] && old _ins . _model . data [ old _par ] . children ? $ . inArray ( obj . id , old _ins . _model . data [ old _par ] . children ) : - 1 , is _multi : old _ins && old _ins . _id && old _ins . _id !== this . _id , is _foreign : ! old _ins || ! old _ins . _id , old _instance : old _ins , new _instance : this } ) , tmp . id } , cut : function ( obj ) { if ( obj || ( obj = this . _data . core . selected . concat ( ) ) , $ . isArray ( obj ) || ( obj = [ obj ] ) , ! obj . length ) return ! 1 ; var o , t1 , t2 , tmp = [ ] ; for ( t1 = 0 , t2 = obj . length ; t1 < t2 ; t1 ++ ) o = this . get _node ( obj [ t1 ] ) , o && o . id && "#" !== o . id && tmp . push ( o ) ; return ! ! tmp . length && ( ccp _node = tmp , ccp _inst = this , ccp _mode = "move_node" , void this . trigger ( "cut" , { node : obj } ) ) } , copy : function ( obj ) { if ( obj || ( obj = this . _data . core . selected . concat ( ) ) , $ . isArray ( obj ) || ( obj = [ obj ] ) , ! obj . length ) return ! 1 ; var o , t1 , t2 , tmp = [ ] ; for ( t1 = 0 , t2 = obj . length ; t1 < t2 ; t1 ++ ) o = this . get _node ( obj [ t1 ] ) , o && o . id && "#" !== o . id && tmp . push ( o ) ; return ! ! tmp . length && ( ccp _node = tmp , ccp _inst = this , ccp _mode = "copy_node" , void this . trigger ( "copy" , { node : obj } ) ) } , get _buffer : function ( ) { return { mode : ccp _mode , node : ccp _node , inst : ccp _inst } } , can _paste : function ( ) { return ccp _mode !== ! 1 && ccp _node !== ! 1 } , paste : function ( obj , pos ) { return obj = this . get _node ( obj ) , ! ! ( obj && ccp _mode && ccp _mode . match ( /^(copy_node|move_node)$/ ) && ccp _node ) && ( this [ ccp _mode ] ( ccp _node , obj , pos , ! 1 , ! 1 , ! 1 , ccp _inst ) && this . trigger ( "paste" , { parent : obj . id , node : ccp _node , mode : ccp _mode } ) , ccp _node = ! 1 , ccp _mode = ! 1 , void ( ccp _inst = ! 1 ) ) } , clear _buffer : function ( ) { ccp _node = ! 1 , ccp _mode = ! 1 , ccp _inst = ! 1 , this . trigger ( "clear_buffer" ) } , edit : function ( obj , default _text , callback ) { var rtl , w , a , s , t , h1 , h2 , fn , tmp ; return ! ! ( obj = this . get _node ( obj ) ) && ( this . settings . core . check _callback === ! 1 ? ( this . _data . core . last _error = { error : "check" , plugin : "core" , id : "core_07" , reason : "Could not edit node because of check_callback" } , this . settings . core . error . call ( this , this . _data . core . last _error ) , ! 1 ) : ( tmp = obj , default _text = "string" == typeof default _text ? default _text : obj . text , this . set _text ( obj , "" ) , obj = this . _open _to ( obj ) , tmp . text = default _text , rtl = this . _data . core . rtl , w = this . element . width ( ) , a = obj . children ( ".jstree-anchor" ) , s = $ ( "<span>" ) , t = default _text , h1 = $ ( "<div />" , { css : { position : "absolute" , top : "-200px" , left : rtl ? "0px" : "-1000px" , visibility : "hidden" } } ) . appendTo ( "body" ) , h2 = $ ( "<input />" , { value : t , class : "jstree-rename-input" , css : { padding : "0" , border : "1px solid silver" , "box-sizing" : "border-box" , display : "inline-block" , height : this . _data . core . li _height + "px" , lineHeight : this . _data . core . li _height + "px" , width : "150px" } , blur : $ . proxy ( function ( ) { var nv , i = s . children ( ".jstree-rename-input" ) , v = i . val ( ) , f = this . settings . core . force _text ; "" === v && ( v = t ) , h1 . remove ( ) , s . replaceWith ( a ) , s . remove ( ) , t = f ? t : $ ( "<div></div>" ) . append ( $ . parseHTML ( t ) ) . html ( ) , this . set _text ( obj , t ) , nv = ! ! this . rename _node ( obj , f ? $ ( "<div></div>" ) . text ( v ) . text ( ) : $ ( "<div></div>" ) . append ( $ . parseHTML ( v ) ) . html ( ) ) , nv || this . set _text ( obj , t ) , callback && callback . call ( this , tmp , nv ) } , this ) , keydown : function ( event ) { var key = event . which ; 27 === key && ( this . value = t ) , 27 !== key && 13 !== key && 37 !== key && 38 !== key && 39 !== key && 40 !== key && 32 !== key || event . stopImmediatePropagation ( ) , 27 !== key && 13 !== key || ( event . preventDefault ( ) , this . blur ( ) ) } , click : function ( e ) { e . stopImmediatePropagation ( ) } , mousedown : function ( e ) { e . stopImmediatePropagation ( ) } , keyup : function ( event ) { h2 . width ( Math . min ( h1 . text ( "pW" + this . value ) . width ( ) , w ) ) } , keypress : function ( event ) { if ( 13 === event . which ) return ! 1 } } ) , fn = { fontFamily : a . css ( "fontFamily" ) || "" , fontSize : a . css ( "fontSize" ) || "" , fontWeight : a . css ( "fontWeight" ) || "" , fontStyle : a . css ( "fontStyle" ) || "" , fontStretch : a . css ( "fontStretch" ) || "" , fontVariant : a . css ( "fontVariant" ) || "" , letterSpacing : a . css ( "letterSpacing" ) || "" , wordSpacing : a .
y + h + 10 > dh && e . css ( "bottom" , "-1px" ) , e . show ( ) } } , show : function ( reference , position , data ) { var o , e , x , y , w , h , dw , dh , cond = ! 0 ; switch ( vakata _context . element && vakata _context . element . length && vakata _context . element . width ( "" ) , cond ) { case ! position && ! reference : return ! 1 ; case ! ! position && ! ! reference : vakata _context . reference = reference , vakata _context . position _x = position . x , vakata _context . position _y = position . y ; break ; case ! position && ! ! reference : vakata _context . reference = reference , o = reference . offset ( ) , vakata _context . position _x = o . left + reference . outerHeight ( ) , vakata _context . position _y = o . top ; break ; case ! ! position && ! reference : vakata _context . position _x = position . x , vakata _context . position _y = position . y } reference && ! data && $ ( reference ) . data ( "vakata_contextmenu" ) && ( data = $ ( reference ) . data ( "vakata_contextmenu" ) ) , $ . vakata . context . _parse ( data ) && vakata _context . element . html ( vakata _context . html ) , vakata _context . items . length && ( vakata _context . element . appendTo ( "body" ) , e = vakata _context . element , x = vakata _context . position _x , y = vakata _context . position _y , w = e . width ( ) , h = e . height ( ) , dw = $ ( window ) . width ( ) + $ ( window ) . scrollLeft ( ) , dh = $ ( window ) . height ( ) + $ ( window ) . scrollTop ( ) , right _to _left && ( x -= e . outerWidth ( ) - $ ( reference ) . outerWidth ( ) , x < $ ( window ) . scrollLeft ( ) + 20 && ( x = $ ( window ) . scrollLeft ( ) + 20 ) ) , x + w + 20 > dw && ( x = dw - ( w + 20 ) ) , y + h + 20 > dh && ( y = dh - ( h + 20 ) ) , vakata _context . element . css ( { left : x , top : y } ) . show ( ) . find ( "a" ) . first ( ) . focus ( ) . parent ( ) . addClass ( "vakata-context-hover" ) , vakata _context . is _visible = ! 0 , $ . vakata . context . _trigger ( "show" ) ) } , hide : function ( ) { vakata _context . is _visible && ( vakata _context . element . hide ( ) . find ( "ul" ) . hide ( ) . end ( ) . find ( ":focus" ) . blur ( ) . end ( ) . detach ( ) , vakata _context . is _visible = ! 1 , $ . vakata . context . _trigger ( "hide" ) ) } } , $ ( function ( ) { right _to _left = "rtl" === $ ( "body" ) . css ( "direction" ) ; var to = ! 1 ; vakata _context . element = $ ( "<ul class='vakata-context'></ul>" ) , vakata _context . element . on ( "mouseenter" , "li" , function ( e ) { e . stopImmediatePropagation ( ) , $ . contains ( this , e . relatedTarget ) || ( to && clearTimeout ( to ) , vakata _context . element . find ( ".vakata-context-hover" ) . removeClass ( "vakata-context-hover" ) . end ( ) , $ ( this ) . siblings ( ) . find ( "ul" ) . hide ( ) . end ( ) . end ( ) . parentsUntil ( ".vakata-context" , "li" ) . addBack ( ) . addClass ( "vakata-context-hover" ) , $ . vakata . context . _show _submenu ( this ) ) } ) . on ( "mouseleave" , "li" , function ( e ) { $ . contains ( this , e . relatedTarget ) || $ ( this ) . find ( ".vakata-context-hover" ) . addBack ( ) . removeClass ( "vakata-context-hover" ) } ) . on ( "mouseleave" , function ( e ) { $ ( this ) . find ( ".vakata-context-hover" ) . removeClass ( "vakata-context-hover" ) , $ . vakata . context . settings . hide _onmouseleave && ( to = setTimeout ( function ( t ) { return function ( ) { $ . vakata . context . hide ( ) } } ( this ) , $ . vakata . context . settings . hide _onmouseleave ) ) } ) . on ( "click" , "a" , function ( e ) { e . preventDefault ( ) , $ ( this ) . blur ( ) . parent ( ) . hasClass ( "vakata-context-disabled" ) || $ . vakata . context . _execute ( $ ( this ) . attr ( "rel" ) ) === ! 1 || $ . vakata . context . hide ( ) } ) . on ( "keydown" , "a" , function ( e ) { var o = null ; switch ( e . which ) { case 13 : case 32 : e . type = "mouseup" , e . preventDefault ( ) , $ ( e . currentTarget ) . trigger ( e ) ; break ; case 37 : vakata _context . is _visible && ( vakata _context . element . find ( ".vakata-context-hover" ) . last ( ) . closest ( "li" ) . first ( ) . find ( "ul" ) . hide ( ) . find ( ".vakata-context-hover" ) . removeClass ( "vakata-context-hover" ) . end ( ) . end ( ) . children ( "a" ) . focus ( ) , e . stopImmediatePropagation ( ) , e . preventDefault ( ) ) ; break ; case 38 : vakata _context . is _visible && ( o = vakata _context . element . find ( "ul:visible" ) . addBack ( ) . last ( ) . children ( ".vakata-context-hover" ) . removeClass ( "vakata-context-hover" ) . prevAll ( "li:not(.vakata-context-separator)" ) . first ( ) , o . length || ( o = vakata _context . element . find ( "ul:visible" ) . addBack ( ) . last ( ) . children ( "li:not(.vakata-context-separator)" ) . last ( ) ) , o . addClass ( "vakata-context-hover" ) . children ( "a" ) . focus ( ) , e . stopImmediatePropagation ( ) , e . preventDefault ( ) ) ; break ; case 39 : vakata _context . is _visible && ( vakata _context . element . find ( ".vakata-context-hover" ) . last ( ) . children ( "ul" ) . show ( ) . children ( "li:not(.vakata-context-separator)" ) . removeClass ( "vakata-context-hover" ) . first ( ) . addClass ( "vakata-context-hover" ) . children ( "a" ) . focus ( ) , e . stopImmediatePropagation ( ) , e . preventDefault ( ) ) ; break ; case 40 : vakata _context . is _visible && ( o = vakata _context . elemen
tmp [ i ] . a _attr && tmp [ i ] . a _attr . id && delete tmp [ i ] . a _attr . id ) ; else tmp . type = tmp . id && m [ tmp . id ] && m [ tmp . id ] . type ? m [ tmp . id ] . type : "default" , options && options . no _id && ( tmp = this . _delete _ids ( tmp ) ) ; return tmp } , this . _delete _ids = function ( tmp ) { if ( $ . isArray ( tmp ) ) { for ( var i = 0 , j = tmp . length ; i < j ; i ++ ) tmp [ i ] = this . _delete _ids ( tmp [ i ] ) ; return tmp } return delete tmp . id , tmp . li _attr && tmp . li _attr . id && delete tmp . li _attr . id , tmp . a _attr && tmp . a _attr . id && delete tmp . a _attr . id , tmp . children && $ . isArray ( tmp . children ) && ( tmp . children = this . _delete _ids ( tmp . children ) ) , tmp } , this . check = function ( chk , obj , par , pos , more ) { if ( parent . check . call ( this , chk , obj , par , pos , more ) === ! 1 ) return ! 1 ; obj = obj && obj . id ? obj : this . get _node ( obj ) , par = par && par . id ? par : this . get _node ( par ) ; var tmp , d , i , j , m = obj && obj . id ? more && more . origin ? more . origin : $ . jstree . reference ( obj . id ) : null ; switch ( m = m && m . _model && m . _model . data ? m . _model . data : null , chk ) { case "create_node" : case "move_node" : case "copy_node" : if ( "move_node" !== chk || $ . inArray ( obj . id , par . children ) === - 1 ) { if ( tmp = this . get _rules ( par ) , tmp . max _children !== undefined && tmp . max _children !== - 1 && tmp . max _children === par . children . length ) return this . _data . core . last _error = { error : "check" , plugin : "types" , id : "types_01" , reason : "max_children prevents function: " + chk , data : JSON . stringify ( { chk : chk , pos : pos , obj : ! ( ! obj || ! obj . id ) && obj . id , par : ! ( ! par || ! par . id ) && par . id } ) } , ! 1 ; if ( tmp . valid _children !== undefined && tmp . valid _children !== - 1 && $ . inArray ( obj . type || "default" , tmp . valid _children ) === - 1 ) return this . _data . core . last _error = { error : "check" , plugin : "types" , id : "types_02" , reason : "valid_children prevents function: " + chk , data : JSON . stringify ( { chk : chk , pos : pos , obj : ! ( ! obj || ! obj . id ) && obj . id , par : ! ( ! par || ! par . id ) && par . id } ) } , ! 1 ; if ( m && obj . children _d && obj . parents ) { for ( d = 0 , i = 0 , j = obj . children _d . length ; i < j ; i ++ ) d = Math . max ( d , m [ obj . children _d [ i ] ] . parents . length ) ; d = d - obj . parents . length + 1 } ( d <= 0 || d === undefined ) && ( d = 1 ) ; do { if ( tmp . max _depth !== undefined && tmp . max _depth !== - 1 && tmp . max _depth < d ) return this . _data . core . last _error = { error : "check" , plugin : "types" , id : "types_03" , reason : "max_depth prevents function: " + chk , data : JSON . stringify ( { chk : chk , pos : pos , obj : ! ( ! obj || ! obj . id ) && obj . id , par : ! ( ! par || ! par . id ) && par . id } ) } , ! 1 ; par = this . get _node ( par . parent ) , tmp = this . get _rules ( par ) , d ++ } while ( par ) } } return ! 0 } , this . get _rules = function ( obj ) { if ( obj = this . get _node ( obj ) , ! obj ) return ! 1 ; var tmp = this . get _type ( obj , ! 0 ) ; return tmp . max _depth === undefined && ( tmp . max _depth = - 1 ) , tmp . max _children === undefined && ( tmp . max _children = - 1 ) , tmp . valid _children === undefined && ( tmp . valid _children = - 1 ) , tmp } , this . get _type = function ( obj , rules ) { return obj = this . get _node ( obj ) , ! ! obj && ( rules ? $ . extend ( { type : obj . type } , this . settings . types [ obj . type ] ) : obj . type ) } , this . set _type = function ( obj , type ) { var t , t1 , t2 , old _type , old _icon ; if ( $ . isArray ( obj ) ) { for ( obj = obj . slice ( ) , t1 = 0 , t2 = obj . length ; t1 < t2 ; t1 ++ ) this . set _type ( obj [ t1 ] , type ) ; return ! 0 } return t = this . settings . types , obj = this . get _node ( obj ) , ! ( ! t [ type ] || ! obj ) && ( old _type = obj . type , old _icon = this . get _icon ( obj ) , obj . type = type , ( old _icon === ! 0 || t [ old _type ] && t [ old _type ] . icon !== undefined && old _icon === t [ old _type ] . icon ) && this . set _icon ( obj , t [ type ] . icon === undefined || t [ type ] . icon ) , ! 0 ) } } , $ . jstree . defaults . unique = { case _sensitive : ! 1 , duplicate : function ( name , counter ) { return name + " (" + counter + ")" } } , $ . jstree . plugins . unique = function ( options , parent ) { this . check = function ( chk , obj , par , pos , more ) { if ( parent . check . call ( this , chk , obj , par , pos , more ) === ! 1 ) return ! 1 ; if ( obj = obj && obj . id ? obj : this . get _node ( obj ) , par = par && par . id ? par : this . get _node ( par ) , ! par || ! par . children ) return ! 0 ; var i , j , n = "rename_node" === chk ? pos : obj . text , c = [ ] , s = this . settings . unique . case _sensitive , m = this . _model . data ; for ( i = 0 , j = par . children . length ; i < j ; i ++ ) c . push ( s ? m [ par . children [ i ] ] . text : m [ par . children [ i ] ] . text . toLowerCase ( ) ) ; switch ( s || ( n = n . toLowerCase ( ) ) , chk ) { case "delete_node" : return ! 0 ; case "rename_node" : return i = $ . inArray ( n , c ) === - 1 || obj . text && obj . text [ s ? "toString" : "toLowerCase" ] ( ) === n , i || ( this . _data . core . last _error = { error : "check" , plugin : "unique" , id : "unique_01" , reason : "Child with name " + n + " already exists. Preventing: " + chk , data : JSON . stringify ( { chk : chk , pos : pos , obj : ! ( ! obj || ! obj . id ) && obj . id , par : ! ( ! par || ! par . id ) && par . id } ) } ) , i ; case "create_node" : return i = $