"use strict";(function(){if(jQuery&&jQuery.jstree){return}var c=false,b=false,a=false;(function(g){g.vakata={};g.vakata.css={get_css:function(n,k,l){n=n.toLowerCase();var m=l.cssRules||l.rules,i=0;do{if(m.length&&i>m.length+5){return false}if(m[i].selectorText&&m[i].selectorText.toLowerCase()==n){if(k===true){if(l.removeRule){l.removeRule(i)}if(l.deleteRule){l.deleteRule(i)}return true}else{return m[i]}}}while(m[++i]);return false},add_css:function(j,i){if(g.jstree.css.get_css(j,false,i)){return false}if(i.insertRule){i.insertRule(j+" { }",0)}else{i.addRule(j,null,0)}return g.vakata.css.get_css(j)},remove_css:function(j,i){return g.vakata.css.get_css(j,true,i)},add_sheet:function(j){var i=false,l=true;if(j.str){if(j.title){i=g("style[id='"+j.title+"-stylesheet']")[0]}if(i){l=false}else{i=document.createElement("style");i.setAttribute("type","text/css");if(j.title){i.setAttribute("id",j.title+"-stylesheet")}}if(i.styleSheet){if(l){document.getElementsByTagName("head")[0].appendChild(i);i.styleSheet.cssText=j.str}else{i.styleSheet.cssText=i.styleSheet.cssText+" "+j.str}}else{i.appendChild(document.createTextNode(j.str));document.getElementsByTagName("head")[0].appendChild(i)}return i.sheet||i.styleSheet}if(j.url){if(document.createStyleSheet){try{i=document.createStyleSheet(j.url)}catch(k){}}else{i=document.createElement("link");i.rel="stylesheet";i.type="text/css";i.media="all";i.href=j.url;document.getElementsByTagName("head")[0].appendChild(i);return i.styleSheet}}}};var h=[],f=-1,e={},d={};g.fn.jstree=function(l){var i=(typeof l=="string"),j=Array.prototype.slice.call(arguments,1),k=this;if(i){if(l.substring(0,1)=="_"){return k}this.each(function(){var m=h[g.data(this,"jstree_instance_id")],n=(m&&g.isFunction(m[l]))?m[l].apply(m,j):m;if(typeof n!=="undefined"&&(l.indexOf("is_")===0||(n!==true&&n!==false))){k=n;return false}})}else{this.each(function(){var q=g.data(this,"jstree_instance_id"),n=[],m=l?g.extend({},true,l):{},r=g(this),p=false,o=[];n=n.concat(j);if(r.data("jstree")){n.push(r.data("jstree"))}m=n.length?g.extend.apply(null,[true,m].concat(n)):m;if(typeof q!=="undefined"&&h[q]){h[q].destroy()}q=parseInt(h.push({}),10)-1;g.data(this,"jstree_instance_id",q);m.plugins=g.isArray(m.plugins)?m.plugins:g.jstree.defaults.plugins.slice();m.plugins.unshift("core");m.plugins=m.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");p=g.extend(true,{},g.jstree.defaults,m);p.plugins=m.plugins;g.each(e,function(s,t){if(g.inArray(s,p.plugins)===-1){p[s]=null;delete p[s]}else{o.push(s)}});p.plugins=o;h[q]=new g.jstree._instance(q,g(this).addClass("jstree jstree-"+q),p);g.each(h[q]._get_settings().plugins,function(s,t){h[q].data[t]={}});g.each(h[q]._get_settings().plugins,function(s,t){if(e[t]){e[t].__init.apply(h[q])}});setTimeout(function(){if(h[q]){h[q].init()}},0)})}return k};g.jstree={defaults:{plugins:[]},_focused:function(){return h[f]||null},_reference:function(i){if(h[i]){return h[i]}var j=g(i);if(!j.length&&typeof i==="string"){j=g("#"+i)}if(!j.length){return null}return h[j.closest(".jstree").data("jstree_instance_id")]||null},_instance:function(j,i,k){this.data={core:{}};this.get_settings=function(){return g.extend(true,{},k)};this._get_settings=function(){return k};this.get_index=function(){return j};this.get_container=function(){return i};this.get_container_ul=function(){return i.children("ul:eq(0)")};this._set_settings=function(l){k=g.extend(true,{},k,l)}},_fn:{},plugin:function(i,j){j=g.extend({},{__init:g.noop,__destroy:g.noop,_fn:{},defaults:false},j);e[i]=j;g.jstree.defaults[i]=j.defaults;g.each(j._fn,function(k,l){l.plugin=i;l.old=g.jstree._fn[k];g.jstree._fn[k]=function(){var m,o=l,n=Array.prototype.slice.call(arguments),q=new g.Event("before.jstree"),p=false;if(this.data.core.locked===true&&k!=="unlock"&&k!=="is_locked"){return}do{if(o&&o.plugin&&g.inArray(o.plugin,this._get_settings().plugins)!==-1){break}o=o.old}while(o);if(!o){return}if(k.indexOf("_")===0){m=o.apply(this,n)}else{m=this.get_container().triggerHandler(q,{func:k,inst:this,args:n,plugin:o.plugin});if(m===false){return}if(typeof m!=="undefined"){n=m}m=o.apply(g.extend({},this,{__callback:function(r){this.get_container().triggerHandler(k+".jstree",{inst:this,args:n,rslt:r,rlbk:p})},__rollback:function(){p=this.get_rollback();return p},__call_old:function(r){return o.old.apply(this,(r?Array.prototype.slice.call(arguments,1):n))}}),n)}return m};g.jstree._fn[k].old=l.old;g.jstree._fn[k].plugin=i})},rollback:function(i){if(i){if(!g.isArray(i)){i=[i]}g.each(i,function(j,k){h[k.i].set_rollback(k.h,k.d)})}}};g.jstree._fn=g.jstree._instance.prototype={};g(function(){var k=navigator.userAgent.toLowerCase(),j=(k.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],i=".jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } .jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } .jstree-rtl li { margin-left:0; margin-right:18px; } .jstree > ul > li { margin-left:0px; } .jstree-rtl > ul > li { margin-right:0px; } .jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } .jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } .jstree a:focus { outline: none; } .jstree a > ins { height:16px; width:16px; } .jstree a > .jstree-icon { margin-right:3px; } .jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } li.jstree-open > ul { display:block; } li.jstree-closed > ul { display:none; } ";if(/msie/.test(k)&&parseInt(j,10)==6){c=true;try{document.execCommand("BackgroundImageCache",false,true)}catch(l){}i+=".jstree li { height:18px; margin-left:0; margin-right:0; } .jstree li li { margin-left:18px; } .jstree-rtl li li { margin-left:0px; margin-right:18px; } li.jstree-open ul { display:block; } li.jstree-closed ul { display:none !important; } .jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } .jstree li a ins { height:16px; width:16px; margin-right:3px; } .jstree-rtl li a ins { margin-right:0px; margin-left:3px; } "}if(/msie/.test(k)&&parseInt(j,10)==7){b=true;i+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } "}if(!/compatible/.test(k)&&/mozilla/.test(k)&&parseFloat(j,10)<1.9){a=true;i+=".jstree ins { display:-moz-inline-box; } .jstree li { line-height:12px; } .jstree a { display:-moz-inline-box; } .jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } "}g.vakata.css.add_sheet({str:i,title:"jstree"})});g.jstree.plugin("core",{__init:function(){this.data.core.locked=false;this.data.core.to_open=this.get_settings().core.initially_open;this.data.core.to_load=this.get_settings().core.initially_load},defaults:{html_titles:false,animation:500,initially_open:[],initially_load:[],open_parents:true,notify_plugins:true,rtl:false,load_open:false,strings:{loading:"Loading ...",new_node:"New node",multiple_selection:"Multiple selection"}},_fn:{init:function(){this.set_focus();if(this._get_settings().core.rtl){this.get_container().addClass("jstree-rtl").css("direction","rtl")}this.get_container().html("
");this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18;this.get_container().delegate("li > ins","click.jstree",g.proxy(function(j){var i=g(j.target);this.toggle_node(i)},this)).bind("mousedown.jstree",g.proxy(function(){this.set_focus()},this)).bind("dblclick.jstree",function(j){var k;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(window.getSelection){k=window.getSelection();try{k.removeAllRanges();k.collapse()}catch(i){}}}});if(this._get_settings().core.notify_plugins){this.get_container().bind("load_node.jstree",g.proxy(function(k,j){var l=this._get_node(j.rslt.obj),i=this;if(l===-1){l=this.get_container_ul()}if(!l.length){return}l.find("li").each(function(){var m=g(this);if(m.data("jstree")){g.each(m.data("jstree"),function(o,n){if(i.data[o]&&g.isFunction(i["_"+o+"_notify"])){i["_"+o+"_notify"].call(i,m,n)}})}})},this))}if(this._get_settings().core.load_open){this.get_container().bind("load_node.jstree",g.proxy(function(k,j){var l=this._get_node(j.rslt.obj),i=this;if(l===-1){l=this.get_container_ul()}if(!l.length){return}l.find("li.jstree-open:not(:has(ul))").each(function(){i.load_node(this,g.noop,g.noop)})},this))}this.__callback();this.load_node(-1,function(){this.loaded();this.reload_nodes()})},destroy:function(){var j,m=this.get_index(),k=this._get_settings(),l=this;g.each(k.plugins,function(n,p){try{e[p].__destroy.apply(l)}catch(o){}});this.__callback();if(this.is_focused()){for(j in h){if(h.hasOwnProperty(j)&&j!=m){h[j].set_focus();break}}}if(m===f){f=-1}this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree_instance_id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,"")});g(document).unbind(".jstree-"+m).undelegate(".jstree-"+m);h[m]=null;delete h[m]},_core_notify:function(j,i){if(i.opened){this.open_node(j,false,true)}},lock:function(){this.data.core.locked=true;this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7");this.__callback({})},unlock:function(){this.data.core.locked=false;this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");this.__callback({})},is_locked:function(){return this.data.core.locked},save_opened:function(){var i=this;this.data.core.to_open=[];this.get_container_ul().find("li.jstree-open").each(function(){if(this.id){i.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}});this.__callback(i.data.core.to_open)},save_loaded:function(){},reload_nodes:function(j){var m=this,i=true,l=[],k=[];if(!j){this.data.core.reopen=false;this.data.core.refreshing=true;this.data.core.to_open=g.map(g.makeArray(this.data.core.to_open),function(o){return"#"+o.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")});this.data.core.to_load=g.map(g.makeArray(this.data.core.to_load),function(o){return"#"+o.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")});if(this.data.core.to_open.length){this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open)}}if(this.data.core.to_load.length){g.each(this.data.core.to_load,function(n,o){if(o=="#"){return true}if(g(o).length){l.push(o)}else{k.push(o)}});if(l.length){this.data.core.to_load=k;g.each(l,function(n,o){if(!m._is_loaded(o)){m.load_node(o,function(){m.reload_nodes(true)},function(){m.reload_nodes(true)});i=false}})}}if(this.data.core.to_open.length){g.each(this.data.core.to_open,function(n,o){m.open_node(o,false,true)})}if(i){if(this.data.core.reopen){clearTimeout(this.data.core.reopen)}this.data.core.reopen=setTimeout(function(){m.__callback({},m)},50);this.data.core.refreshing=false;this.reopen()}},reopen:function(){var i=this;if(this.data.core.to_open.length){g.each(this.data.core.to_open,function(j,k){i.open_node(k,false,true)})}this.__callback({})},refresh:function(i){var j=this;this.save_opened();if(!i){i=-1}i=this._get_node(i);if(!i){i=-1}if(i!==-1){i.children("UL").remove()}else{this.get_container_ul().empty()}this.load_node(i,function(){j.__callback({obj:i});j.reload_nodes()})},loaded:function(){this.__callback()},set_focus:function(){if(this.is_focused()){return}var i=g.jstree._focused();if(i){i.unset_focus()}this.get_container().addClass("jstree-focused");f=this.get_index();this.__callback()},is_focused:function(){return f==this.get_index()},unset_focus:function(){if(this.is_focused()){this.get_container().removeClass("jstree-focused");f=-1}this.__callback()},_get_node:function(i){var j=g(i,this.get_container());if(j.is(".jstree")||i==-1){return -1}j=j.closest("li",this.get_container());return j.length?j:false},_get_next:function(j,i){j=this._get_node(j);if(j===-1){return this.get_container().find("> ul > li:first-child")}if(!j.length){return false}if(i){return(j.nextAll("li").size()>0)?j.nextAll("li:eq(0)"):false}if(j.hasClass("jstree-open")){return j.find("li:eq(0)")}else{if(j.nextAll("li").size()>0){return j.nextAll("li:eq(0)")}else{return j.parentsUntil(".jstree","li").next("li").eq(0)}}},_get_prev:function(j,i){j=this._get_node(j);if(j===-1){return this.get_container().find("> ul > li:last-child")}if(!j.length){return false}if(i){return(j.prevAll("li").length>0)?j.prevAll("li:eq(0)"):false}if(j.prev("li").length){j=j.prev("li").eq(0);while(j.hasClass("jstree-open")){j=j.children("ul:eq(0)").children("li:last")}return j}else{var k=j.parentsUntil(".jstree","li:eq(0)");return k.length?k:false}},_get_parent:function(i){i=this._get_node(i);if(i==-1||!i.length){return false}var j=i.parentsUntil(".jstree","li:eq(0)");return j.length?j:-1},_get_children:function(i){i=this._get_node(i);if(i===-1){return this.get_container().children("ul:eq(0)").children("li")}if(!i.length){return false}return i.children("ul:eq(0)").children("li")},get_path:function(k,i){var j=[],l=this;k=this._get_node(k);if(k===-1||!k||!k.length){return false}k.parentsUntil(".jstree","li").each(function(){j.push(i?this.id:l.get_text(this))});j.reverse();j.push(i?k.attr("id"):this.get_text(k));return j},_get_string:function(i){return this._get_settings().core.strings[i]||i},is_open:function(i){i=this._get_node(i);return i&&i!==-1&&i.hasClass("jstree-open")},is_closed:function(i){i=this._get_node(i);return i&&i!==-1&&i.hasClass("jstree-closed")},is_leaf:function(i){i=this._get_node(i);return i&&i!==-1&&i.hasClass("jstree-leaf")},correct_state:function(i){i=this._get_node(i);if(!i||i===-1){return false}i.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:i})},open_node:function(l,m,j){l=this._get_node(l);if(!l.length){return false}if(!l.hasClass("jstree-closed")){if(m){m.call()}return false}var k=j||c?0:this._get_settings().core.animation,i=this;if(!this._is_loaded(l)){l.children("a").addClass("jstree-loading");this.load_node(l,function(){i.open_node(l,m,j)},m)}else{if(this._get_settings().core.open_parents){l.parentsUntil(".jstree",".jstree-closed").each(function(){i.open_node(this,false,true)})}if(k){l.children("ul").css("display","none")}l.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");if(k){l.children("ul").stop(true,true).slideDown(k,function(){this.style.display="";i.after_open(l)})}else{i.after_open(l)}this.__callback({obj:l});if(m){m.call()}}},after_open:function(i){this.__callback({obj:i})},close_node:function(l,j){l=this._get_node(l);var k=j||c?0:this._get_settings().core.animation,i=this;if(!l.length||!l.hasClass("jstree-open")){return false}if(k){l.children("ul").attr("style","display:block !important")}l.removeClass("jstree-open").addClass("jstree-closed");if(k){l.children("ul").stop(true,true).slideUp(k,function(){this.style.display="";i.after_close(l)})}else{i.after_close(l)}this.__callback({obj:l})},after_close:function(i){this.__callback({obj:i})},toggle_node:function(i){i=this._get_node(i);if(i.hasClass("jstree-closed")){return this.open_node(i)}if(i.hasClass("jstree-open")){return this.close_node(i)}},open_all:function(k,j,i){k=k?this._get_node(k):-1;if(!k||k===-1){k=this.get_container_ul()}if(i){k=k.find("li.jstree-closed")}else{i=k;if(k.is(".jstree-closed")){k=k.find("li.jstree-closed").andSelf()}else{k=k.find("li.jstree-closed")}}var l=this;k.each(function(){var m=this;if(!l._is_loaded(this)){l.open_node(this,function(){l.open_all(m,j,i)},!j)}else{l.open_node(this,false,!j)}});if(i.find("li.jstree-closed").length===0){this.__callback({obj:i})}},close_all:function(j,i){var k=this;j=j?this._get_node(j):this.get_container();if(!j||j===-1){j=this.get_container_ul()}j.find("li.jstree-open").andSelf().each(function(){k.close_node(this,!i)});this.__callback({obj:j})},clean_node:function(i){i=i&&i!=-1?g(i):this.get_container_ul();i=i.is("li")?i.find("li").andSelf():i.find("li");i.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");i.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:i})},get_rollback:function(){this.__callback();return{i:this.get_index(),h:this.get_container().children("ul").clone(true),d:this.data}},set_rollback:function(i,j){this.get_container().empty().append(i);this.data=j;this.__callback()},load_node:function(k,i,j){this.__callback({obj:k})},_is_loaded:function(i){return true},create_node:function(n,i,m,p,j){n=this._get_node(n);i=typeof i==="undefined"?"last":i;var o=g(""),l=this._get_settings().core,k;if(n!==-1&&!n.length){return false}if(!j&&!this._is_loaded(n)){this.load_node(n,function(){this.create_node(n,i,m,p,true)});return false}this.__rollback();if(typeof m==="string"){m={data:m}}if(!m){m={}}if(m.attr){o.attr(m.attr)}if(m.metadata){o.data(m.metadata)}if(m.state){o.addClass("jstree-"+m.state)}if(!m.data){m.data=this._get_string("new_node")}if(!g.isArray(m.data)){k=m.data;m.data=[];m.data.push(k)}g.each(m.data,function(r,q){k=g("");if(g.isFunction(q)){q=q.call(this,m)}if(typeof q=="string"){k.attr("href","#")[l.html_titles?"html":"text"](q)}else{if(!q.attr){q.attr={}}if(!q.attr.href){q.attr.href="#"}k.attr(q.attr)[l.html_titles?"html":"text"](q.title);if(q.language){k.addClass(q.language)}}k.prepend(" ");if(!q.icon&&m.icon){q.icon=m.icon}if(q.icon){if(q.icon.indexOf("/")===-1){k.children("ins").addClass(q.icon)}else{k.children("ins").css("background","url('"+q.icon+"') center center no-repeat")}}o.append(k)});o.prepend(" ");if(n===-1){n=this.get_container();if(i==="before"){i="first"}if(i==="after"){i="last"}}switch(i){case"before":n.before(o);k=this._get_parent(n);break;case"after":n.after(o);k=this._get_parent(n);break;case"inside":case"first":if(!n.children("ul").length){n.append("")}n.children("ul").prepend(o);k=n;break;case"last":if(!n.children("ul").length){n.append("")}n.children("ul").append(o);k=n;break;default:if(!n.children("ul").length){n.append("")}if(!i){i=0}k=n.children("ul").children("li").eq(i);if(k.length){k.before(o)}else{n.children("ul").append(o)}k=n;break}if(k===-1||k.get(0)===this.get_container().get(0)){k=-1}this.clean_node(k);this.__callback({obj:o,parent:k});if(p){p.call(this,o)}return o},get_text:function(j){j=this._get_node(j);if(!j.length){return false}var i=this._get_settings().core.html_titles;j=j.children("a:eq(0)");if(i){j=j.clone();j.children("INS").remove();return j.html()}else{j=j.contents().filter(function(){return this.nodeType==3})[0];return j.nodeValue}},set_text:function(j,k){j=this._get_node(j);if(!j.length){return false}j=j.children("a:eq(0)");if(this._get_settings().core.html_titles){var i=j.children("INS").clone();j.html(k).prepend(i);this.__callback({obj:j,name:k});return true}else{j=j.contents().filter(function(){return this.nodeType==3})[0];this.__callback({obj:j,name:k});return(j.nodeValue=k)}},rename_node:function(i,j){i=this._get_node(i);this.__rollback();if(i&&i.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))){this.__callback({obj:i,name:j})}},delete_node:function(l){l=this._get_node(l);if(!l.length){return false}this.__rollback();var k=this._get_parent(l),j=g([]),i=this;l.each(function(){j=j.add(i._get_prev(this))});l=l.detach();if(k!==-1&&k.find("> ul > li").length===0){k.removeClass("jstree-open jstree-closed").addClass("jstree-leaf")}this.clean_node(k);this.__callback({obj:l,prev:j,parent:k});return l},prepare_move:function(m,k,n,i,j){var l={};l.ot=g.jstree._reference(m)||this;l.o=l.ot._get_node(m);l.r=k===-1?-1:this._get_node(k);l.p=(typeof n==="undefined"||n===false)?"last":n;if(!j&&d.o&&d.o[0]===l.o[0]&&d.r[0]===l.r[0]&&d.p===l.p){this.__callback(d);if(i){i.call(this,d)}return}l.ot=g.jstree._reference(l.o)||this;l.rt=g.jstree._reference(l.r)||this;if(l.r===-1||!l.r){l.cr=-1;switch(l.p){case"first":case"before":case"inside":l.cp=0;break;case"after":case"last":l.cp=l.rt.get_container().find(" > ul > li").length;break;default:l.cp=l.p;break}}else{if(!/^(before|after)$/.test(l.p)&&!this._is_loaded(l.r)){return this.load_node(l.r,function(){this.prepare_move(m,k,n,i,true)})}switch(l.p){case"before":l.cp=l.r.index();l.cr=l.rt._get_parent(l.r);break;case"after":l.cp=l.r.index()+1;l.cr=l.rt._get_parent(l.r);break;case"inside":case"first":l.cp=0;l.cr=l.r;break;case"last":l.cp=l.r.find(" > ul > li").length;l.cr=l.r;break;default:l.cp=l.p;l.cr=l.r;break}}l.np=l.cr==-1?l.rt.get_container():l.cr;l.op=l.ot._get_parent(l.o);l.cop=l.o.index();if(l.op===-1){l.op=l.ot?l.ot.get_container():this.get_container()}if(!/^(before|after)$/.test(l.p)&&l.op&&l.np&&l.op[0]===l.np[0]&&l.o.index() ul > li:nth-child("+(l.cp+1)+")");d=l;this.__callback(d);if(i){i.call(this,d)}},check_move:function(){var k=d,i=true,j=k.r===-1?this.get_container():k.r;if(!k||!k.o||k.or[0]===k.o[0]){return false}if(k.op&&k.np&&k.op[0]===k.np[0]&&k.cp-1===k.o.index()){return false}k.o.each(function(){if(j.parentsUntil(".jstree","li").andSelf().index(this)!==-1){i=false;return false}});return i},move_node:function(p,l,i,k,j,n){if(!j){return this.prepare_move(p,l,i,function(o){this.move_node(o,false,false,k,true,n)})}if(k){d.cy=true}if(!n&&!this.check_move()){return false}this.__rollback();var q=false;if(k){q=p.o.clone(true);q.find("*[id]").andSelf().each(function(){if(this.id){this.id="copy_"+this.id}})}else{q=p.o}if(p.or.length){p.or.before(q)}else{if(!p.np.children("ul").length){g("").appendTo(p.np)}p.np.children("ul:eq(0)").append(q)}try{p.ot.clean_node(p.op);p.rt.clean_node(p.np);if(!p.op.find("> ul > li").length){p.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}}catch(m){}if(k){d.cy=true;d.oc=q}this.__callback(d);return d},_get_move:function(){return d}}})})(jQuery);(function(d){var g,f,e;d(function(){if(/msie/.test(navigator.userAgent.toLowerCase())){f=d('').css({position:"absolute",top:-1000,left:0}).appendTo("body");e=d('').css({position:"absolute",top:-1000,left:0}).appendTo("body");g=f.width()-e.width();f.add(e).remove()}else{f=d("").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:0}).prependTo("body").append("").find("div").css({width:"100%",height:200});g=100-f.width();f.parent().remove()}});d.jstree.plugin("ui",{__init:function(){this.data.ui.selected=d();this.data.ui.last_selected=false;this.data.ui.hovered=null;this.data.ui.to_select=this.get_settings().ui.initially_select;this.get_container().delegate("a","click.jstree",d.proxy(function(h){h.preventDefault();h.currentTarget.blur();if(!d(h.currentTarget).hasClass("jstree-loading")){this.select_node(h.currentTarget,true,h)}},this)).delegate("a","mouseenter.jstree",d.proxy(function(h){if(!d(h.currentTarget).hasClass("jstree-loading")){this.hover_node(h.target)}},this)).delegate("a","mouseleave.jstree",d.proxy(function(h){if(!d(h.currentTarget).hasClass("jstree-loading")){this.dehover_node(h.target)}},this)).bind("reopen.jstree",d.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",d.proxy(function(){this.dehover_node();this.save_selected()},this)).bind("set_rollback.jstree",d.proxy(function(){this.reselect()},this)).bind("close_node.jstree",d.proxy(function(i,j){var h=this._get_settings().ui,k=this._get_node(j.rslt.obj),l=(k&&k.length)?k.children("ul").find("a.jstree-clicked"):d(),m=this;if(h.selected_parent_close===false||!l.length){return}l.each(function(){m.deselect_node(this);if(h.selected_parent_close==="select_parent"){m.select_node(k)}})},this)).bind("delete_node.jstree",d.proxy(function(i,j){var h=this._get_settings().ui.select_prev_on_delete,k=this._get_node(j.rslt.obj),l=(k&&k.length)?k.find("a.jstree-clicked"):[],m=this;l.each(function(){m.deselect_node(this)});if(h&&l.length){j.rslt.prev.each(function(){if(this.parentNode){m.select_node(this);return false}})}},this)).bind("move_node.jstree",d.proxy(function(h,i){if(i.rslt.cy){i.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked")}},this))},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:true,select_prev_on_delete:true,disable_selecting_children:false,initially_select:[]},_fn:{_get_node:function(h,i){if(typeof h==="undefined"||h===null){return i?this.data.ui.selected:this.data.ui.last_selected}var j=d(h,this.get_container());if(j.is(".jstree")||h==-1){return -1}j=j.closest("li",this.get_container());return j.length?j:false},_ui_notify:function(i,h){if(h.selected){this.select_node(i,false)}},save_selected:function(){var h=this;this.data.ui.to_select=[];this.data.ui.selected.each(function(){if(this.id){h.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}});this.__callback(this.data.ui.to_select)},reselect:function(){var i=this,h=this.data.ui.to_select;h=d.map(d.makeArray(h),function(j){return"#"+j.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")});d.each(h,function(j,k){if(k&&k!=="#"){i.select_node(k)}});this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode});this.__callback()},refresh:function(h){this.save_selected();return this.__call_old()},hover_node:function(h){h=this._get_node(h);if(!h.length){return false}if(!h.hasClass("jstree-hovered")){this.dehover_node()}this.data.ui.hovered=h.children("a").addClass("jstree-hovered").parent();this._fix_scroll(h);this.__callback({obj:h})},dehover_node:function(){var i=this.data.ui.hovered,h;if(!i||!i.length){return false}h=i.children("a").removeClass("jstree-hovered").parent();if(this.data.ui.hovered[0]===h[0]){this.data.ui.hovered=null}this.__callback({obj:i})},select_node:function(k,h,l){k=this._get_node(k);if(k==-1||!k||!k.length){return false}var p=this._get_settings().ui,n=(p.select_multiple_modifier=="on"||(p.select_multiple_modifier!==false&&l&&l[p.select_multiple_modifier+"Key"])),i=(p.select_range_modifier!==false&&l&&l[p.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==k[0]&&this.data.ui.last_selected.parent()[0]===k.parent()[0]),j=this.is_selected(k),m=true,o=this;if(h){if(p.disable_selecting_children&&n&&((k.parentsUntil(".jstree","li").children("a.jstree-clicked").length)||(k.children("ul").find("a.jstree-clicked:eq(0)").length))){return false}m=false;switch(!0){case (i):this.data.ui.last_selected.addClass("jstree-last-selected");k=k[k.index()0){this.deselect_all();m=true}break;case (j&&n):this.deselect_node(k);break;case (!j&&n):if(p.select_limit==-1||this.data.ui.selected.length+1<=p.select_limit){m=true}break}}if(m&&!j){if(!i){this.data.ui.last_selected=k}k.children("a").addClass("jstree-clicked");if(p.selected_parent_open){k.parents(".jstree-closed").each(function(){o.open_node(this,false,true)})}this.data.ui.selected=this.data.ui.selected.add(k);this._fix_scroll(k.eq(0));this.__callback({obj:k,e:l})}},_fix_scroll:function(i){var j=this.get_container()[0],h;if(j.scrollHeight>j.offsetHeight){i=this._get_node(i);if(!i||i===-1||!i.length||!i.is(":visible")){return}h=i.offset().top-this.get_container().offset().top;if(h<0){j.scrollTop=j.scrollTop+h-1}if(h+this.data.core.li_height+(j.scrollWidth>j.offsetWidth?g:0)>j.offsetHeight){j.scrollTop=j.scrollTop+(h-j.offsetHeight+this.data.core.li_height+1+(j.scrollWidth>j.offsetWidth?g:0))}}},deselect_node:function(h){h=this._get_node(h);if(!h.length){return false}if(this.is_selected(h)){h.children("a").removeClass("jstree-clicked");this.data.ui.selected=this.data.ui.selected.not(h);if(this.data.ui.last_selected.get(0)===h.get(0)){this.data.ui.last_selected=this.data.ui.selected.eq(0)}this.__callback({obj:h})}},toggle_select:function(h){h=this._get_node(h);if(!h.length){return false}if(this.is_selected(h)){this.deselect_node(h)}else{this.select_node(h)}},is_selected:function(h){return this.data.ui.selected.index(this._get_node(h))>=0},get_selected:function(h){return h?d(h).find("a.jstree-clicked").parent():this.data.ui.selected},deselect_all:function(i){var h=i?d(i).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();h.children("a.jstree-clicked").removeClass("jstree-clicked");this.data.ui.selected=d([]);this.data.ui.last_selected=false;this.__callback({obj:h})}}});d.jstree.defaults.plugins.push("ui")})(jQuery);(function(d){var e=[];d.jstree._themes=false;d.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",d.proxy(function(){var f=this._get_settings().themes;this.data.themes.dots=f.dots;this.data.themes.icons=f.icons;this.set_theme(f.theme,f.url)},this)).bind("loaded.jstree",d.proxy(function(){if(!this.data.themes.dots){this.hide_dots()}else{this.show_dots()}if(!this.data.themes.icons){this.hide_icons()}else{this.show_icons()}},this))},defaults:{theme:"default",url:false,dots:true,icons:true},_fn:{set_theme:function(g,f){if(!g){return false}if(!f){f=d.jstree._themes+g+"/style.css"}if(d.inArray(f,e)==-1){d.vakata.css.add_sheet({url:f});e.push(f)}if(this.data.themes.theme!=g){this.get_container().removeClass("jstree-"+this.data.themes.theme);this.data.themes.theme=g}this.get_container().addClass("jstree-"+g);if(!this.data.themes.dots){this.hide_dots()}else{this.show_dots()}if(!this.data.themes.icons){this.hide_icons()}else{this.show_icons()}this.__callback()},get_theme:function(){return this.data.themes.theme},show_dots:function(){this.data.themes.dots=true;this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=false;this.get_container().children("ul").addClass("jstree-no-dots")},toggle_dots:function(){if(this.data.themes.dots){this.hide_dots()}else{this.show_dots()}},show_icons:function(){this.data.themes.icons=true;this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=false;this.get_container().children("ul").addClass("jstree-no-icons")},toggle_icons:function(){if(this.data.themes.icons){this.hide_icons()}else{this.show_icons()}}}});d(function(){if(d.jstree._themes===false){d("script").each(function(){if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)){d.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/";return false}})}if(d.jstree._themes===false){d.jstree._themes="themes/"}});d.jstree.defaults.plugins.push("themes")})(jQuery);(function(d){d.jstree.plugin("json_data",{__init:function(){var e=this._get_settings().json_data;if(e.progressive_unload){this.get_container().bind("after_close.jstree",function(g,f){f.rslt.obj.children("ul").remove()})}},defaults:{data:false,ajax:false,correct_state:true,progressive_render:false,progressive_unload:false},_fn:{load_node:function(g,e,f){var h=this;this.load_node_json(g,function(){h.__callback({obj:h._get_node(g)});e.call(this)},f)},_is_loaded:function(f){var e=this._get_settings().json_data;f=this._get_node(f);return f==-1||!f||(!e.ajax&&!e.progressive_render&&!d.isFunction(e.data))||f.is(".jstree-open, .jstree-leaf")||f.children("ul").children("li").length>0},refresh:function(f){f=this._get_node(f);var e=this._get_settings().json_data;if(f&&f!==-1&&e.progressive_unload&&(d.isFunction(e.data)||!!e.ajax)){f.removeData("jstree_children")}return this.__call_old()},load_node_json:function(i,e,g){var h=this.get_settings().json_data,k,f=function(){},j=function(){};i=this._get_node(i);if(i&&i!==-1&&(h.progressive_render||h.progressive_unload)&&!i.is(".jstree-open, .jstree-leaf")&&i.children("ul").children("li").length===0&&i.data("jstree_children")){k=this._parse_json(i.data("jstree_children"),i);if(k){i.append(k);if(!h.progressive_unload){i.removeData("jstree_children")}}this.clean_node(i);if(e){e.call(this)}return}if(i&&i!==-1){if(i.data("jstree_is_loading")){return}else{i.data("jstree_is_loading",true)}}switch(!0){case (!h.data&&!h.ajax):throw"Neither data nor ajax settings supplied.";case (d.isFunction(h.data)):h.data.call(this,i,d.proxy(function(l){l=this._parse_json(l,i);if(!l){if(i===-1||!i){if(h.correct_state){this.get_container().children("ul").empty()}}else{i.children("a.jstree-loading").removeClass("jstree-loading");i.removeData("jstree_is_loading");if(h.correct_state){this.correct_state(i)}}if(g){g.call(this)}}else{if(i===-1||!i){this.get_container().children("ul").empty().append(l.children())}else{i.append(l).children("a.jstree-loading").removeClass("jstree-loading");i.removeData("jstree_is_loading")}this.clean_node(i);if(e){e.call(this)}}},this));break;case (!!h.data&&!h.ajax)||(!!h.data&&!!h.ajax&&(!i||i===-1)):if(!i||i==-1){k=this._parse_json(h.data,i);if(k){this.get_container().children("ul").empty().append(k.children());this.clean_node()}else{if(h.correct_state){this.get_container().children("ul").empty()}}}if(e){e.call(this)}break;case (!h.data&&!!h.ajax)||(!!h.data&&!!h.ajax&&i&&i!==-1):f=function(m,n,o){var l=this.get_settings().json_data.ajax.error;if(l){l.call(this,m,n,o)}if(i!=-1&&i.length){i.children("a.jstree-loading").removeClass("jstree-loading");i.removeData("jstree_is_loading");if(n==="success"&&h.correct_state){this.correct_state(i)}}else{if(n==="success"&&h.correct_state){this.get_container().children("ul").empty()}}if(g){g.call(this)}};j=function(o,m,l){var n=this.get_settings().json_data.ajax.success;if(n){o=n.call(this,o,m,l)||o}if(o===""||(o&&o.toString&&o.toString().replace(/^[\s\n]+$/,"")==="")||(!d.isArray(o)&&!d.isPlainObject(o))){return f.call(this,l,m,"")}o=this._parse_json(o,i);if(o){if(i===-1||!i){this.get_container().children("ul").empty().append(o.children())}else{i.append(o).children("a.jstree-loading").removeClass("jstree-loading");i.removeData("jstree_is_loading")}this.clean_node(i);if(e){e.call(this)}}else{if(i===-1||!i){if(h.correct_state){this.get_container().children("ul").empty();if(e){e.call(this)}}}else{i.children("a.jstree-loading").removeClass("jstree-loading");i.removeData("jstree_is_loading");if(h.correct_state){this.correct_state(i);if(e){e.call(this)}}}}};h.ajax.context=this;h.ajax.error=f;h.ajax.success=j;if(!h.ajax.dataType){h.ajax.dataType="json"}if(d.isFunction(h.ajax.url)){h.ajax.url=h.ajax.url.call(this,i)}if(d.isFunction(h.ajax.data)){h.ajax.data=h.ajax.data.call(this,i)}d.ajax(h.ajax);break}},_parse_json:function(e,k,q){var m=false,f=this._get_settings(),u=f.json_data,r=f.core.html_titles,l,h,g,o,n;if(!e){return m}if(u.progressive_unload&&k&&k!==-1){k.data("jstree_children",m)}if(d.isArray(e)){m=d();if(!e.length){return false}for(h=0,g=e.length;h");if(e.attr){m.attr(e.attr)}if(e.metadata){m.data(e.metadata)}if(e.state){m.addClass("jstree-"+e.state)}if(!d.isArray(e.data)){l=e.data;e.data=[];e.data.push(l)}d.each(e.data,function(p,j){l=d("");if(d.isFunction(j)){j=j.call(this,e)}if(typeof j=="string"){l.attr("href","#")[r?"html":"text"](j)}else{if(!j.attr){j.attr={}}if(!j.attr.href){j.attr.href="#"}l.attr(j.attr)[r?"html":"text"](j.title);if(j.language){l.addClass(j.language)}}l.prepend(" ");if(!j.icon&&e.icon){j.icon=e.icon}if(j.icon){if(j.icon.indexOf("/")===-1){l.children("ins").addClass(j.icon)}else{l.children("ins").css("background","url('"+j.icon+"') center center no-repeat")}}m.append(l)});m.prepend(" ");if(e.children){if(u.progressive_render&&e.state!=="open"){m.addClass("jstree-closed").data("jstree_children",e.children)}else{if(u.progressive_unload){m.data("jstree_children",e.children)}if(d.isArray(e.children)&&e.children.length){l=this._parse_json(e.children,k,true);if(l.length){n=d("");n.append(l);m.append(n)}}}}}if(!q){o=d("");o.append(m);m=o}return m},get_json:function(j,g,e,n){var q=[],p=this._get_settings(),k=this,i,h,m,l,o,f;j=this._get_node(j);if(!j||j===-1){j=this.get_container().find("> ul > li")}g=d.isArray(g)?g:["id","class"];if(!n&&this.data.types){g.push(p.types.type_attr)}e=d.isArray(e)?e:[];j.each(function(){m=d(this);i={data:[]};if(g.length){i.attr={}}d.each(g,function(s,r){h=m.attr(r);if(h&&h.length&&h.replace(/jstree[^ ]*/ig,"").length){i.attr[r]=(" "+h).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")}});if(m.hasClass("jstree-open")){i.state="open"}if(m.hasClass("jstree-closed")){i.state="closed"}if(m.data()){i.metadata=m.data()}l=m.children("a");l.each(function(){o=d(this);if(e.length||d.inArray("languages",p.plugins)!==-1||o.children("ins").get(0).style.backgroundImage.length||(o.children("ins").get(0).className&&o.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").length)){f=false;if(d.inArray("languages",p.plugins)!==-1&&d.isArray(p.languages)&&p.languages.length){d.each(p.languages,function(r,s){if(o.hasClass(s)){f=s;return false}})}h={attr:{},title:k.get_text(o,f)};d.each(e,function(r,s){h.attr[s]=(" "+(o.attr(s)||"")).replace(/ jstree[^ ]*/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")});if(d.inArray("languages",p.plugins)!==-1&&d.isArray(p.languages)&&p.languages.length){d.each(p.languages,function(r,s){if(o.hasClass(s)){h.language=s;return true}})}if(o.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"").length){h.icon=o.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")}if(o.children("ins").get(0).style.backgroundImage.length){h.icon=o.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","")}}else{h=k.get_text(o)}if(l.length>1){i.data.push(h)}else{i.data=h}});m=m.find("> ul > li");if(m.length){i.children=k.get_json(m,g,e,true)}q.push(i)});return q}}})})(jQuery);(function(d){d.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui;if(this.data.ui&&this.data.checkbox.noui){this.select_node=this.deselect_node=this.deselect_all=d.noop;this.get_selected=this.get_checked}this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",d.proxy(function(g,f){this._prepare_checkboxes(f.rslt.obj)},this)).bind("loaded.jstree",d.proxy(function(f){this._prepare_checkboxes()},this)).delegate((this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox"),"click.jstree",d.proxy(function(f){f.preventDefault();if(this._get_node(f.target).hasClass("jstree-checked")){this.uncheck_node(f.target)}else{this.check_node(f.target)}if(this.data.ui&&this.data.checkbox.noui){this.save_selected();if(this.data.cookies){this.save_cookie("select_node")}}else{f.stopImmediatePropagation();return false}},this))},defaults:{override_ui:false,two_state:false,real_checkboxes:false,checked_parent_open:true,real_checkboxes_names:function(e){return[("check_"+(e[0].id||Math.ceil(Math.random()*10000))),1]}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove()},_fn:{_checkbox_notify:function(f,e){if(e.checked){this.check_node(f,false)}},_prepare_checkboxes:function(i){i=!i||i==-1?this.get_container().find("> ul > li"):this._get_node(i);if(i===false){return}var k,j=this,e,g=this._get_settings().checkbox.two_state,h=this._get_settings().checkbox.real_checkboxes,f=this._get_settings().checkbox.real_checkboxes_names;i.each(function(){e=d(this);k=e.is("li")&&(e.hasClass("jstree-checked")||(h&&e.children(":checked").length))?"jstree-checked":"jstree-unchecked";e.find("li").andSelf().each(function(){var m=d(this),l;m.children("a"+(j.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend(" ").parent().not(".jstree-checked, .jstree-unchecked").addClass(g?"jstree-unchecked":k);if(h){if(!m.children(":checkbox").length){l=f.call(j,m);m.prepend("")}else{m.children(":checkbox").addClass("jstree-real-checkbox")}}if(!g){if(k==="jstree-checked"||m.hasClass("jstree-checked")||m.children(":checked").length){m.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",true)}}else{if(m.hasClass("jstree-checked")||m.children(":checked").length){m.addClass("jstree-checked").children(":checkbox").prop("checked",true)}}})});if(!g){i.find(".jstree-checked").parent().parent().each(function(){j._repair_state(this)})}},change_state:function(h,g){h=this._get_node(h);var e=false,f=this._get_settings().checkbox.real_checkboxes;if(!h||h===-1){return false}g=(g===false||g===true)?g:h.hasClass("jstree-checked");if(this._get_settings().checkbox.two_state){if(g){h.removeClass("jstree-checked").addClass("jstree-unchecked");if(f){h.children(":checkbox").prop("checked",false)}}else{h.removeClass("jstree-unchecked").addClass("jstree-checked");if(f){h.children(":checkbox").prop("checked",true)}}}else{if(g){e=h.find("li").andSelf();if(!e.filter(".jstree-checked, .jstree-undetermined").length){return false}e.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(f){e.children(":checkbox").prop("checked",false)}}else{e=h.find("li").andSelf();if(!e.filter(".jstree-unchecked, .jstree-undetermined").length){return false}e.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(f){e.children(":checkbox").prop("checked",true)}if(this.data.ui){this.data.ui.last_selected=h}this.data.checkbox.last_selected=h}h.parentsUntil(".jstree","li").each(function(){var i=d(this);if(g){if(i.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){i.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(f){i.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false)}return false}else{i.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(f){i.children(":checkbox").prop("checked",false)}}}else{if(i.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length){i.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(f){i.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false)}return false}else{i.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(f){i.children(":checkbox").prop("checked",true)}}}})}if(this.data.ui&&this.data.checkbox.noui){this.data.ui.selected=this.get_checked()}this.__callback(h);return true},check_node:function(f){if(this.change_state(f,false)){f=this._get_node(f);if(this._get_settings().checkbox.checked_parent_open){var e=this;f.parents(".jstree-closed").each(function(){e.open_node(this,false,true)})}this.__callback({obj:f})}},uncheck_node:function(e){if(this.change_state(e,true)){this.__callback({obj:this._get_node(e)})}},check_all:function(){var f=this,e=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");e.each(function(){f.change_state(this,false)});this.__callback()},uncheck_all:function(){var f=this,e=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");e.each(function(){f.change_state(this,true)});this.__callback()},is_checked:function(e){e=this._get_node(e);return e.length?e.is(".jstree-checked"):false},get_checked:function(f,e){f=!f||f===-1?this.get_container():this._get_node(f);return e||this._get_settings().checkbox.two_state?f.find(".jstree-checked"):f.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(f,e){f=!f||f===-1?this.get_container():this._get_node(f);return e||this._get_settings().checkbox.two_state?f.find(".jstree-unchecked"):f.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(h){h=this._get_node(h);if(!h.length){return}if(this._get_settings().checkbox.two_state){h.find("li").andSelf().not(".jstree-checked").removeClass("jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",true);return}var g=this._get_settings().checkbox.real_checkboxes,f=h.find("> ul > .jstree-checked").length,e=h.find("> ul > .jstree-undetermined").length,i=h.find("> ul > li").length;if(i===0){if(h.hasClass("jstree-undetermined")){this.change_state(h,false)}}else{if(f===0&&e===0){this.change_state(h,true)}else{if(f===i){this.change_state(h,false)}else{h.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(g){h.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",false)}}}}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var f=this,e=this.data.ui.to_select;e=d.map(d.makeArray(e),function(g){return"#"+g.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")});this.deselect_all();d.each(e,function(g,h){f.check_node(h)});this.__callback()}else{this.__call_old()}},save_loaded:function(){var e=this;this.data.core.to_load=[];this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){if(this.id){e.data.core.to_load.push("#"+this.id)}})}}});d(function(){var e=".jstree .jstree-real-checkbox { display:none; } ";d.vakata.css.add_sheet({str:e,title:"jstree"})})})(jQuery)})();