/*! jstree - v1.0.0 - 2013-01-16 - (MIT, GPL) */
(function(e){e.vakata={}})(jQuery),function(e){e.fn.vakata_reverse=[].reverse}(jQuery),function(){jQuery.expr[":"].vakata_icontains=function(e,t,n){return(e.textContent||e.innerText||"").toLowerCase().indexOf(n[3].toLowerCase())>=0}}(jQuery),function(e){e.vakata.array_remove=function(e,t,n){var a=e.slice((n||t)+1||e.length);return e.length=0>t?e.length+t:t,e.push.apply(e,a),e}}(jQuery),function(e){e.vakata.array_unique=function(e){var t,n,a,i=[];for(t=0,a=e.length;a>t;t++){for(n=0;t>=n&&e[t]!==e[n];n++);n===t&&i.push(e[t])}return i}}(jQuery),function(e){e.vakata.attributes=function(t,n){t=e(t)[0];var a=n?{}:[];return e.each(t.attributes,function(t,i){-1===e.inArray(i.nodeName.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==i.nodeValue&&""!==e.trim(i.nodeValue)&&(n?a[i.nodeName]=i.nodeValue:a.push(i.nodeName))}),a}}(jQuery),function(e){var t;e.vakata.get_scrollbar_width=function(){var n,a;return t||(/msie/.test(navigator.userAgent.toLowerCase())?(n=e('').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),a=e('').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),t=n.width()-a.width(),n.add(a).remove()):(n=e("
").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:0}).prependTo("body").append("").find("div").css({width:"100%",height:200}),t=100-n.width(),n.parent().remove())),t}}(jQuery),function(e){e.vakata.css={get_css:function(e,t,n){e=e.toLowerCase();var a=n.cssRules||n.rules,i=0;do{if(a.length&&i>a.length+5)return!1;if(a[i].selectorText&&a[i].selectorText.toLowerCase()===e)return t===!0?(n.removeRule&&n.removeRule(i),n.deleteRule&&n.deleteRule(i),!0):a[i]}while(a[++i]);return!1},add_css:function(t,n){return e.jstree.css.get_css(t,!1,n)?!1:(n.insertRule?n.insertRule(t+" { }",0):n.addRule(t,null,0),e.vakata.css.get_css(t))},remove_css:function(t,n){return e.vakata.css.get_css(t,!0,n)},add_sheet:function(t){var n=!1,a=!0;if(t.str)return t.title&&(n=e("style[id='"+t.title+"-stylesheet']")[0]),n?a=!1:(n=document.createElement("style"),n.setAttribute("type","text/css"),t.title&&n.setAttribute("id",t.title+"-stylesheet")),n.styleSheet?a?(document.getElementsByTagName("head")[0].appendChild(n),n.styleSheet.cssText=t.str):n.styleSheet.cssText=n.styleSheet.cssText+" "+t.str:(n.appendChild(document.createTextNode(t.str)),document.getElementsByTagName("head")[0].appendChild(n)),n.sheet||n.styleSheet;if(t.url){if(!document.createStyleSheet)return n=document.createElement("link"),n.rel="stylesheet",n.type="text/css",n.media="all",n.href=t.url,document.getElementsByTagName("head")[0].appendChild(n),n.styleSheet;try{n=document.createStyleSheet(t.url)}catch(i){}}}}}(jQuery),function(e){var t={element:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1};e.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5},_trigger:function(t,n){var a=e.vakata.dnd._get();a.event=n,e(document).triggerHandler("dnd_"+t+".vakata",a)},_get:function(){return{data:t.data,element:t.element,helper:t.helper}},_clean:function(){t.helper&&t.helper.remove(),t.scroll_i&&(clearInterval(t.scroll_i),t.scroll_i=!1),t={element:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1},e(document).unbind("mousemove",e.vakata.dnd.drag),e(document).unbind("mouseup",e.vakata.dnd.stop)},_scroll:function(n){if(!t.scroll_e||!t.scroll_l&&!t.scroll_t)return t.scroll_i&&(clearInterval(t.scroll_i),t.scroll_i=!1),!1;if(!t.scroll_i)return t.scroll_i=setInterval(e.vakata.dnd._scroll,100),!1;if(n===!0)return!1;var a=t.scroll_e.scrollTop(),i=t.scroll_e.scrollLeft();t.scroll_e.scrollTop(a+t.scroll_t*e.vakata.dnd.settings.scroll_speed),t.scroll_e.scrollLeft(i+t.scroll_l*e.vakata.dnd.settings.scroll_speed),(a!==t.scroll_e.scrollTop()||i!==t.scroll_e.scrollLeft())&&e.vakata.dnd._trigger("scroll",t.scroll_e)},start:function(n,a,i){t.is_drag&&e.vakata.dnd.stop({});try{n.currentTarget.unselectable="on",n.currentTarget.onselectstart=function(){return!1},n.currentTarget.style&&(n.currentTarget.style.MozUserSelect="none")}catch(s){}return t.init_x=n.pageX,t.init_y=n.pageY,t.data=a,t.is_down=!0,t.element=n.currentTarget,i!==!1&&(t.helper=e("").html(i).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),e(document).bind("mousemove",e.vakata.dnd.drag),e(document).bind("mouseup",e.vakata.dnd.stop),!1},drag:function(n){if(t.is_down){if(!t.is_drag){if(!(Math.abs(n.pageX-t.init_x)>e.vakata.dnd.settings.threshold||Math.abs(n.pageY-t.init_y)>e.vakata.dnd.settings.threshold))return;t.helper&&(t.helper.appendTo("body"),t.helper_w=t.helper.outerWidth()),t.is_drag=!0,e.vakata.dnd._trigger("start",n)}var a=!1,i=!1,s=!1,r=!1,o=!1,l=!1,c=!1,d=!1,h=!1,u=!1;t.scroll_t=0,t.scroll_l=0,t.scroll_e=!1,e(n.target).parentsUntil("body").addBack().vakata_reverse().filter(function(){return/^auto|scroll$/.test(e(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var a=e(this),i=a.offset();return this.scrollHeight>this.offsetHeight&&(i.top+a.height()-n.pageYthis.offsetWidth&&(i.left+a.width()-n.pageXr&&n.pageY-cr&&r-(n.pageY-c)l&&n.pageX-dl&&l-(n.pageX-d)s&&(h=s-50),o&&u+t.helper_w>o&&(u=o-(t.helper_w+2)),t.helper.css({left:u+"px",top:h+"px"})),e.vakata.dnd._trigger("move",n)}},stop:function(n){t.is_drag&&e.vakata.dnd._trigger("stop",n),e.vakata.dnd._clean()}}}(jQuery),function(e){e.vakata.xslt=function(t,n){var a,i,s,r=!1;if(r===!1&&window.ActiveXObject)try{r=new ActiveXObject("Msxml2.XSLTemplate"),i=new ActiveXObject("Msxml2.DOMDocument"),i.loadXML(t),s=new ActiveXObject("Msxml2.FreeThreadedDOMDocument"),s.loadXML(n),r.stylesheet=s,a=r.createProcessor(),a.input=i,a.transform(),r=a.output}catch(o){}return t=e.parseXML(t),n=e.parseXML(n),r===!1&&"undefined"!=typeof XSLTProcessor&&(a=new XSLTProcessor,a.importStylesheet(n),r=a.transformToFragment(t,document),r=e("").append(r).html()),r===!1&&t.transformNode!==void 0&&(r=t.transformNode(n)),r}}(jQuery),jQuery.hotkeys===void 0&&function(e){function t(e){if("string"==typeof e.data){var t=e.handler,n=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var a="keypress"!==e.type&&jQuery.vakata_hotkeys.specialKeys[e.which],i=String.fromCharCode(e.which).toLowerCase(),s="",r={};e.altKey&&"alt"!==a&&(s+="alt+"),e.ctrlKey&&"ctrl"!==a&&(s+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==a&&(s+="meta+"),e.shiftKey&&"shift"!==a&&(s+="shift+"),a?r[s+a]=!0:(r[s+i]=!0,r[s+jQuery.vakata_hotkeys.shiftNums[i]]=!0,"shift+"===s&&(r[jQuery.vakata_hotkeys.shiftNums[i]]=!0));for(var o=0,l=n.length;l>o;o++)if(r[n[o]])return t.apply(this,arguments)}}}}e.vakata_hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},jQuery.each(["keydown","keyup","keypress"],function(){jQuery.event.special[this]={add:t}})}(jQuery),function(e){var t=!1,n={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};e.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(t){e(document).triggerHandler("context_"+t+".vakata",{reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}})},_execute:function(e){return e=n.items[e],e&&!e._disabled&&e.action?e.action.call(null,{item:e,reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}}):!1},_parse:function(t,a){if(!t)return!1;a||(n.html="",n.items=[]);var i,s="",r=!1;return a&&(s+=""),e.each(t,function(t,a){return a?(n.items.push(a),!r&&a.separator_before&&(s+="-
"),r=!1,s+="",a.separator_after&&(s+="-
",r=!0),void 0):!0}),s=s.replace(/- <\/li\>$/,""),a&&(s+="
"),a||(n.html=s,e.vakata.context._trigger("parse")),s.length>10?s:!1},_show_submenu:function(n){if(n=e(n),n.length&&n.children("ul").length){var a=n.children("ul"),i=n.offset().left+n.outerWidth(),s=n.offset().top,r=a.width(),o=a.height(),l=e(window).width()+e(window).scrollLeft(),c=e(window).height()+e(window).scrollTop();t?n[0>i-(r+10+n.outerWidth())?"addClass":"removeClass"]("vakata-context-left"):n[i+r+10>l?"addClass":"removeClass"]("vakata-context-right"),s+o+10>c&&a.css("bottom","-1px"),a.show()}},show:function(a,i,s){switch(n.element&&n.element.length&&n.element.width(""),!0){case!i&&!a:return!1;case!!i&&!!a:n.reference=a,n.position_x=i.x,n.position_y=i.y;break;case!i&&!!a:n.reference=a;var r=a.offset();n.position_x=r.left+a.outerHeight(),n.position_y=r.top;break;case!!i&&!a:n.position_x=i.x,n.position_y=i.y}if(a&&!s&&e(a).data("vakata_contextmenu")&&(s=e(a).data("vakata_contextmenu")),e.vakata.context._parse(s)&&n.element.html(n.html),n.items.length){var o=n.element,l=n.position_x,c=n.position_y,d=o.width(),h=o.height(),u=e(window).width()+e(window).scrollLeft(),_=e(window).height()+e(window).scrollTop();t&&(l-=o.outerWidth(),e(window).scrollLeft()+20>l&&(l=e(window).scrollLeft()+20)),l+d+20>u&&(l=u-(d+20)),c+h+20>_&&(c=_-(h+20)),n.element.css({left:l,top:c}).show().width(n.element.outerWidth()),n.is_visible=!0,e.vakata.context._trigger("show")}},hide:function(){n.is_visible&&(n.element.hide().find("ul").hide(),n.is_visible=!1,e.vakata.context._trigger("hide"))}},e(function(){t="rtl"===e("body").css("direction");var a=!1,i='.vakata-context { display:none; _width:1px; } .vakata-context, .vakata-context ul { margin:0; padding:2px; position:absolute; background:#f5f5f5; border:1px solid #979797; -moz-box-shadow:5px 5px 4px -4px #666666; -webkit-box-shadow:2px 2px 2px #999999; box-shadow:2px 2px 2px #999999; }.vakata-context ul { list-style:none; left:100%; margin-top:-2.7em; margin-left:-4px; } .vakata-context li.vakata-context-right ul { left:auto; right:100%; margin-left:auto; margin-right:-4px; } .vakata-context li { list-style:none; display:inline; }.vakata-context li a { display:block; padding:0 2em 0 2em; text-decoration:none; width:auto; color:black; white-space:nowrap; line-height:2.4em; -moz-text-shadow:1px 1px 0px white; -webkit-text-shadow:1px 1px 0px white; text-shadow:1px 1px 0px white; -moz-border-radius:1px; -webkit-border-radius:1px; border-radius:1px; }.vakata-context li a:hover { position:relative; background-color:#e8eff7; -moz-box-shadow:0px 0px 2px #0a6aa1; -webkit-box-shadow:0px 0px 2px #0a6aa1; box-shadow:0px 0px 2px #0a6aa1; }.vakata-context li.vakata-context-hover > a { position:relative; background-color:#e8eff7; -moz-box-shadow:0px 0px 2px #0a6aa1; -webkit-box-shadow:0px 0px 2px #0a6aa1; box-shadow:0px 0px 2px #0a6aa1; }.vakata-context li a.vakata-context-parent { background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw=="); background-position:right center; background-repeat:no-repeat; } .vakata-context li.vakata-context-separator a, .vakata-context li.vakata-context-separator a:hover { background:white; border:0; border-top:1px solid #e2e3e3; height:1px; min-height:1px; max-height:1px; padding:0; margin:0 0 0 2.4em; border-left:1px solid #e0e0e0; _overflow:hidden; -moz-text-shadow:0 0 0 transparent; -webkit-text-shadow:0 0 0 transparent; text-shadow:0 0 0 transparent; -moz-box-shadow:0 0 0 transparent; -webkit-box-shadow:0 0 0 transparent; box-shadow:0 0 0 transparent; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0; }.vakata-context li.vakata-contextmenu-disabled a, .vakata-context li.vakata-contextmenu-disabled a:hover { color:silver; background-color:transparent; border:0; box-shadow:0 0 0; }.vakata-context li a ins { text-decoration:none; display:inline-block; width:2.4em; height:2.4em; background:transparent; margin:0 0 0 -2em; } .vakata-context li a span { display:inline-block; width:1px; height:2.4em; background:white; margin:0 0.5em 0 0; border-left:1px solid #e2e3e3; _overflow:hidden; } .vakata-context-rtl ul { left:auto; right:100%; margin-left:auto; margin-right:-4px; } .vakata-context-rtl li a.vakata-context-parent { background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7"); background-position:left center; background-repeat:no-repeat; } .vakata-context-rtl li.vakata-context-separator a { margin:0 2.4em 0 0; border-left:0; border-right:1px solid #e2e3e3;} .vakata-context-rtl li.vakata-context-left ul { right:auto; left:100%; margin-left:-4px; margin-right:auto; } .vakata-context-rtl li a ins { margin:0 -2em 0 0; } .vakata-context-rtl li a span { margin:0 0 0 0.5em; border-left-color:white; background:#e2e3e3; } ';e.vakata.css.add_sheet({str:i,title:"vakata-context"}),n.element=e(""),n.element.delegate("li","mouseenter",function(t){t.stopImmediatePropagation(),e.contains(this,t.relatedTarget)||(a&&clearTimeout(a),n.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),e(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),e.vakata.context._show_submenu(this))}).delegate("li","mouseleave",function(t){e.contains(this,t.relatedTarget)||e(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).bind("mouseleave",function(){e(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),e.vakata.context.settings.hide_onmouseleave&&(a=setTimeout(function(){return function(){e.vakata.context.hide()}}(this),e.vakata.context.settings.hide_onmouseleave))}).delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(){e(this).blur().parent().hasClass("vakata-context-disabled")||e.vakata.context._execute(e(this).attr("rel"))===!1||e.vakata.context.hide()}).appendTo("body"),e(document).bind("mousedown",function(t){n.is_visible&&!e.contains(n.element[0],t.target)&&e.vakata.context.hide()}).bind("context_show.vakata",function(){n.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),t&&n.element.addClass("vakata-context-rtl").css("direction","rtl"),n.element.find("ul").hide().end()}),(e.hotkeys!==void 0||e.vakata_hotkeys!==void 0)&&e(document).bind("keydown","up",function(e){if(n.is_visible){var t=n.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first();t.length||(t=n.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),t.addClass("vakata-context-hover"),e.stopImmediatePropagation(),e.preventDefault()}}).bind("keydown","down",function(e){if(n.is_visible){var t=n.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first();t.length||(t=n.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),t.addClass("vakata-context-hover"),e.stopImmediatePropagation(),e.preventDefault()}}).bind("keydown","right",function(e){n.is_visible&&(n.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover"),e.stopImmediatePropagation(),e.preventDefault())}).bind("keydown","left",function(e){n.is_visible&&(n.element.find(".vakata-context-hover").last().parents("li:eq(0)").find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover"),e.stopImmediatePropagation(),e.preventDefault())}).bind("keydown","esc",function(t){e.vakata.context.hide(),t.preventDefault()}).bind("keydown","space",function(e){n.element.find(".vakata-context-hover").last().children("a").click(),e.preventDefault()})})}(jQuery),function(e){var t=function(e){var t=/["\\\x00-\x1f\x7f-\x9f]/g,n={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return e.match(t)?'"'+e.replace(t,function(e){var t=n[e];return"string"==typeof t?t:(t=e.charCodeAt(),"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16))})+'"':'"'+e+'"'};e.vakata.json={encode:function(n){if(null===n)return"null";var a,i=[];switch(typeof n){case"undefined":return void 0;case"number":case"boolean":return n+"";case"string":return t(n);case"object":if(e.isFunction(n.toJSON))return e.vakata.json.encode(n.toJSON());if(n.constructor===Date)return'"'+n.getUTCFullYear()+"-"+("0"+(n.getUTCMonth()+1)+"").slice(-2)+"-"+("0"+n.getUTCDate()+"").slice(-2)+"T"+("0"+n.getUTCHours()+"").slice(-2)+":"+("0"+n.getUTCMinutes()+"").slice(-2)+":"+("0"+n.getUTCSeconds()+"").slice(-2)+"."+("00"+n.getUTCMilliseconds()+"").slice(-3)+'Z"';if(n.constructor===Array){for(a=0;n.length>a;a++)i.push(e.vakata.json.encode(n[a])||"null");return"["+i.join(",")+"]"}return e.each(n,function(n,a){return e.isFunction(a)?!0:(n="number"==typeof n?'"'+n+'"':t(n),a=e.vakata.json.encode(a),i.push(n+":"+a),void 0)}),"{"+i.join(", ")+"}"}},decode:function(t){return e.parseJSON(t)}}}(jQuery),function(e,t,n){var a=function(e){return e},i=function(e){return decodeURIComponent(e.replace(/\+/g," "))},s=e.vakata.cookie=function(r,o,l){if(o!==n){if(l=e.extend({},s.defaults,l),null===o&&(l.expires=-1),"number"==typeof l.expires){var c=l.expires,d=l.expires=new Date;d.setDate(d.getDate()+c)}return o=s.json?e.vakata.json.encode(o):o+"",t.cookie=[encodeURIComponent(r),"=",s.raw?o:encodeURIComponent(o),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var h=s.raw?a:i,u=t.cookie.split("; "),_=0,p=u.length;p>_;_++){var f=u[_].split("=");if(h(f.shift())===r){var g=h(f.join("="));return s.json?e.vakata.json.decode(g):g}}return null};s.defaults={},e.vakata.removeCookie=function(t,n){return null!==e.cookie(t)?(e.cookie(t,null,n),!0):!1}}(jQuery,document),function(e){function t(){var t=!1;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","tmpval"),t=!0,window.localStorage.removeItem("_tmptest")}catch(a){}if(t)try{window.localStorage&&(o=window.localStorage,u="localStorage")}catch(i){}else if("globalStorage"in window)try{window.globalStorage&&(o=window.globalStorage[window.location.hostname],u="globalStorage")}catch(r){}else{if(l=document.createElement("link"),l.addBehavior){l.style.behavior="url(#default#userData)",document.getElementsByTagName("head")[0].appendChild(l);try{l.load("jStorage");var c="{}";c=l.getAttribute("jStorage"),o.jStorage=c,u="userDataBehavior"}catch(d){}}if(!u&&(e.vakata.cookie("__vjstorage")||e.vakata.cookie("__vjstorage","{}",{expires:365})&&"{}"===e.vakata.cookie("__vjstorage"))&&(l=null,o.jStorage=e.vakata.cookie("__vjstorage"),u="cookie"),!u)return l=null,void 0}n(),s()}function n(){if(o.jStorage)try{r=h(o.jStorage+"")}catch(e){o.jStorage="{}"}else o.jStorage="{}";c=o.jStorage?(o.jStorage+"").length:0}function a(){try{o.jStorage=d(r),"userDataBehavior"===u&&(l.setAttribute("jStorage",o.jStorage),l.save("jStorage")),"cookie"===u&&e.vakata.cookie("__vjstorage",o.jStorage,{expires:365}),c=o.jStorage?(o.jStorage+"").length:0}catch(t){}}function i(e){if(!e||"string"!=typeof e&&"number"!=typeof e)throw new TypeError("Key name must be string or numeric");if("__jstorage_meta"===e)throw new TypeError("Reserved key name");return!0}function s(){var e,t,n=+new Date,i=1/0,o=!1;if(_!==!1&&clearTimeout(_),r.__jstorage_meta&&"object"==typeof r.__jstorage_meta.TTL){t=r.__jstorage_meta.TTL;for(e in t)t.hasOwnProperty(e)&&(n>=t[e]?(delete t[e],delete r[e],o=!0):i>t[e]&&(i=t[e]));1/0!==i&&(_=setTimeout(s,i-n)),o&&a()}}var r={},o={jStorage:"{}"},l=null,c=0,d=e.vakata.json.encode,h=e.vakata.json.decode,u=!1,_=!1;e.vakata.storage={version:"0.3.0",set:function(t,n,s){return i(t),"object"==typeof n&&(n=h(d(n))),r[t]=n,a(),s&&parseInt(s,10)&&e.vakata.storage.setTTL(t,parseInt(s,10)),n},get:function(e,t){return i(e),e in r?r[e]:t===void 0?null:t},del:function(e){return i(e),e in r?(delete r[e],r.__jstorage_meta&&"object"==typeof r.__jstorage_meta.TTL&&e in r.__jstorage_meta.TTL&&delete r.__jstorage_meta.TTL[e],a(),!0):!1},setTTL:function(e,t){var n=+new Date;return i(e),t=Number(t)||0,e in r?(r.__jstorage_meta||(r.__jstorage_meta={}),r.__jstorage_meta.TTL||(r.__jstorage_meta.TTL={}),t>0?r.__jstorage_meta.TTL[e]=n+t:delete r.__jstorage_meta.TTL[e],a(),s(),!0):!1},getTTL:function(e){var t,n=+new Date;return i(e),e in r&&r.__jstorage_meta.TTL&&r.__jstorage_meta.TTL[e]?(t=r.__jstorage_meta.TTL[e]-n,t||0):0},flush:function(){return r={},a(),!0},storageObj:function(){return e.extend(!0,{},r)},index:function(){var t=[];return e.each(r,function(e){"__jstorage_meta"!==e&&t.push(e)}),t},storageSize:function(){return c},currentBackend:function(){return u},storageAvailable:function(){return!!u}},t()}(jQuery),function(e){e.vakata.pretty_date={lang:{ago:"Ago",from:"From Now",now:"Just Now",minute:"Minute",minutes:"Minutes",hour:"Hour",hours:"Hours",day:"Day",days:"Days",week:"Week",weeks:"Weeks",month:"Month",months:"Months",year:"Year",years:"Years"},parse:function(t,n){t=new Date(t.replace(/-/g,"/").replace(/[TZ]/g," ").replace(/\+\d\d\:\d\d$/,"").replace(/\+\d\d\d\d$/,"")),n=n||new Date;var a,i=e.vakata.pretty_date.lang,s=[[60,i.now],[3600,i.minute,i.minutes,60],[86400,i.hour,i.hours,3600],[604800,i.day,i.days,86400],[2628e3,i.week,i.weeks,604800],[31536e3,i.month,i.months,2628e3],[1/0,i.year,i.years,31536e3]],r=(n-t+6e4*n.getTimezoneOffset())/1e3,o=function(e,t){var n=.1;return e>=t&&t*(1+n)>=e?t:e};0>r?(r=Math.abs(r),a=" "+i.from):a=" "+i.ago;for(var l=0,c=s[0];s[l];c=s[++l])if(c[0]>r){if(0===l)return c[1];var d=Math.ceil(o(r,c[3])/c[3]);return d+" "+(1!==d?c[2]:c[1])+(l>0?a:"")}},init:function(t,n){e("time, [datetime]").vakata_pretty_date(n),setInterval(function(){e("time, [datetime]").vakata_pretty_date(n)},t||6e4)}},e.fn.vakata_pretty_date=function(t,n){return t||(t="%{s}"),this.each(function(){var a=jQuery(this),i=e.vakata.pretty_date.parse(a.attr("datetime"),n);i&&(i=t.replace("%{s}",i),a.html()!==i&&a.html(i))})}}(jQuery),function(e){e.vakata.selection={get:function(e){if(window.getSelection){if(e)return""+window.getSelection();var t=window.getSelection(),n=t.getRangeAt&&t.rangeCount?t.getRangeAt(0):document.createRange(),a=document.createElement("div");return t.getRangeAt||(n.setStart(t.anchorNode,t.anchorOffset),n.setEnd(t.focusNode,t.focusOffset)),a.appendChild(n.cloneContents()),a.innerHTML}return document.selection?document.selection.createRange()[e?"text":"htmlText"]:""},elm_get:function(e){if(e="string"==typeof e?document.getElementById(e):e,e.jquery&&(e=e.get(0)),"selectionStart"in e)return{start:e.selectionStart,end:e.selectionEnd,length:e.selectionEnd-e.selectionStart,text:e.value.substr(e.selectionStart,e.selectionEnd-e.selectionStart)};if(!document.selection)return{start:e.value.length,end:e.value.length,length:0,text:""};e.focus();var t,n,a,i,s=document.selection.createRange(),r=!1,o=!1;return s&&s.parentElement()===e?(t=e.value.length,n=e.value.replace(/\r\n/g,"\n"),r=e.createTextRange(),r.moveToBookmark(s.getBookmark()),o=e.createTextRange(),o.collapse(!1),r.compareEndPoints("StartToEnd",o)>-1?a=i=t:(a=-r.moveStart("character",-t),a+=n.slice(0,a).split("\n").length-1,r.compareEndPoints("EndToEnd",o)>-1?i=t:(i=-r.moveEnd("character",-t),i+=n.slice(0,i).split("\n").length-1)),n=e.value.slice(a,i),{start:a,end:i,length:n.length,text:n}):void 0},elm_set:function(t,n,a){if(t="string"==typeof t?document.getElementById(t):t,t.jquery&&(t=t.get(0)),"selectionStart"in t)t.focus(),t.selectionStart=n,t.selectionEnd=a;else if(document.selection){t.focus();var i=t.createTextRange(),s=t.value.replace(/\r\n/g,"\n");n-=s.slice(0,n).split("\n").length-1,a-=s.slice(0,a).split("\n").length-1,i.collapse(!0),i.moveEnd("character",a),i.moveStart("character",n),i.select()}return e.vakata.selection.elm_get(t)},elm_replace:function(t,n){t="string"==typeof t?document.getElementById(t):t,t.jquery&&(t=t.get(0));var a=e.vakata.selection.elm_get(t),i=a.start,s=i+n.length;return t.value=t.value.substr(0,i)+n+t.value.substr(a.end,t.value.length),e.vakata.selection.elm_set(t,i,s),{start:i,end:s,length:n.length,text:n}},elm_get_caret:function(t){return e.vakata.selection.elm_get(t).end},elm_set_caret:function(t,n){return e.vakata.selection.elm_set(t,n,n)},elm_get_caret_position:function(t){t="string"==typeof t?document.getElementById(t):t,t.jquery&&(t=t.get(0));var n=e.vakata.selection.elm_get_caret(t),a=t.value.substring(0,n).replace(/&/g,"&").replace(//gi,">").replace(/\r/g,"").replace(/\t/g,"
").replace(/\n/gi,"
"),i=e.vakata.get_scrollbar_width(),s=e(t).width(),r=e(t).height();return t.scrollHeight>r&&(s-=i),t.scrollWidth>s&&(r-=i),t=e(t),t=e("").html(a).css({background:"red",width:s+"px",height:"auto",position:"absolute",left:"0px",top:"-10000px",fontSize:t.css("fontSize"),fontFamily:t.css("fontFamily"),fontWeight:t.css("fontWeight"),fontVariant:t.css("fontVariant"),fontStyle:t.css("fontStyle"),textTransform:t.css("textTransform"),lineHeight:t.css("lineHeight"),whiteSpace:"pre-wrap"}),t.append(' ').appendTo("body"),a=t.find("span.caret"),n=a.offset(),n.top=n.top+1e4+a.height(),t.remove(),n}}}(jQuery),function(e){e.fn.vakata_highlight=function(t){var n=this;return"string"==typeof t&&(t=[t]),e.isArray(t)&&(t={words:t}),t=e.extend(!0,{},{css_class:"vakata-highlight",words:[],color:"#99ccff"},t),t.words.length&&this.each(function(){var n=e(this);e.each(t.words,function(a,i){var s=!1;"string"==typeof t.color&&(s=t.color),e.isArray(t.color)&&"string"==typeof t.color[a]&&(s=t.color[a]),n.find(':vakata_icontains("'+i.replace(/\"/gi,"")+'")').filter("strong, span, li, p, h1, h2, h3, h4, h5, h6, div, u, em, i, dt, dd").contents().filter(function(){return 3===this.nodeType}).each(function(){if(this.nodeValue.toLowerCase().indexOf(i.toLowerCase())>=0){this.nodeValue=this.nodeValue.replace(RegExp("("+i.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")+")","ig"),"|{{{$1}}}|");var n=e(this).parent();n.html(n.html().replace(/\|\{\{\{/g,'").replace(/\}\}\}\|/g,""))}})})}),n}}(jQuery),function(e){var t={},n=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},a=n(navigator.userAgent);a.browser&&(t[a.browser]=!0,t.version=a.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),e.vakata.browser=t}(jQuery),function(){"use strict";if(!jQuery)throw"jsTree: jQuery not included.";jQuery.jstree||(function(e){var t=[],n=-1,a={},i={};e.jstree={VERSION:"1.0.0",IS_IE6:e.vakata.browser.msie&&6===parseInt(e.vakata.browser.version,10),IS_IE7:e.vakata.browser.msie&&6===parseInt(e.vakata.browser.version,10),IS_FF2:e.vakata.browser.mozilla&&1.9>parseFloat(e.vakata.browser.version,10),__construct:function(n){var i={},s={},r=[],o=[],l=0;return n=e(n),e.jstree._reference(n)&&e.jstree.__destruct(n),e.extend.apply(null,[!0,i].concat(Array.prototype.slice.call(arguments,1),n.data("jstree")||{})),r=e.isArray(i.plugins)?i.plugins:e.jstree.defaults.plugins.slice(),r=e.vakata.array_unique(r),i=e.extend(!0,{},e.jstree.defaults,i),e.each(a,function(t){"core"!==t&&-1===e.inArray(t,r)?(i[t]=null,delete i[t]):(o.push(t),s[t]={})}),i.plugins=o,l=parseInt(t.push({}),10)-1,n.data("jstree_instance_id",l).addClass("jstree jstree-"+l),this.data=s,this.get_index=function(){return l},this.get_container=function(){return n},this.get_container_ul=function(){return n.children("ul:eq(0)")},this.get_settings=function(t){return t?i:e.extend(!0,{},i)},this.__trigger=function(e,t){return e?(t||(t={}),"string"==typeof e&&(e=e.replace(".jstree","")+".jstree"),t.inst=this,this.get_container().triggerHandler(e,t)):void 0},t[l]=this,e.each(o,function(e,n){a[n]&&a[n].__construct.apply(t[l])}),this.__trigger("__construct"),e.jstree._focus(l),this},__destruct:function(i){if(i=e.jstree._reference(i),!i)return!1;var s=i.get_settings(),r=i.get_index(),o=0;if(n===r){for(o in t)if(t.hasOwnProperty(o)&&o!==r){e.jstree._focus(o);break}n===r&&e.jstree._focus(!1)}return e.each(s.plugins,function(e,t){try{a[t].__destruct.apply(i)}catch(n){}}),i.__trigger("__destruct"),i.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree_instance_id").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),e(document).unbind(".jstree-"+r).undelegate(".jstree-"+r),delete t[r],!0},__call:function(t,n,a){return t=e.jstree._reference(t),t&&e.isFunction(t[n])?t[n].apply(t,a):void 0},_reference:function(n){if(t[n])return t[n];var a=e(n);return a.length||"string"!=typeof n||(a=e("#"+n)),a.length?t[a.closest(".jstree").data("jstree_instance_id")]||null:null},_focused:function(){return t[n]||null},_focus:function(a){return a===!1?(t[n].get_container().removeClass("jstree-focused"),t[n].__trigger("_defocus"),n=-1,!1):(a=e.jstree._reference(a),a&&a.get_index()!==n?(-1!==n&&(t[n].get_container().removeClass("jstree-focused"),t[n].__trigger("_defocus")),n=a.get_index(),a.get_container().addClass("jstree-focused"),a.__trigger("_focus"),!0):!1)},plugin:function(t,n){n=e.extend({},{__construct:e.noop,__destuct:e.noop,_fn:{},defaults:!1},n),a[t]=n,e.jstree.defaults[t]=n.defaults,e.each(n._fn,function(n,a){a.plugin=t,a.old=i[n],i[n]=function(){var t,i=a,s=Array.prototype.slice.call(arguments),r=new e.Event("before.jstree"),o=this.get_settings(!0).plugins;
do{if(i&&i.plugin&&-1!==e.inArray(i.plugin,o))break;i=i.old}while(i);if(i){if(0===n.indexOf("_"))t=i.apply(this,s);else{if(t=this.__trigger(r,{func:n,args:s,plugin:i.plugin}),t===!1)return;t=i.apply(e.extend({},this,{__callback:function(e){return this.__trigger(n,{args:s,rslt:e,plugin:i.plugin}),e},__call_old:function(e){return i.old.apply(this,e?Array.prototype.slice.call(arguments,1):s)}}),s)}return t}},i[n].old=a.old,i[n].plugin=t})},defaults:{plugins:[]}},e.fn.jstree=function(t){var n="string"==typeof t,a=Array.prototype.slice.call(arguments,1),i=this;return this.each(function(){if(n){var s=e.jstree.__call(this,t,a);if(s!==void 0&&(t.indexOf(false)||s!==!0&&s!==!1))return i=s,!1}else n=new e.jstree.__construct(this,t)}),i},i=e.jstree.__construct.prototype,e.expr[":"].jstree=function(t){return e(t).data("jstree_instance_id")!==void 0}}(jQuery),function(e){var t=!1,n=!1;e(function(){e.jstree.SCROLLBAR_WIDTH=e.vakata.get_scrollbar_width()}),e.jstree.plugin("core",{__construct:function(){this.data.core.rtl="rtl"===this.get_container().css("direction"),this.data.core.rtl&&this.get_container().addClass("jstree-rtl"),this.data.core.ready=!1,e.support.touch&&this.get_container().addTouch(),this.get_container().bind("__construct.jstree",e.proxy(function(){setTimeout(e.proxy(function(){this&&this.init()},this),0)},this)).bind("before.jstree",e.proxy(function(e,t){return!/^is_locked|unlock$/.test(t.func)&&this.data.core.locked?(e.stopImmediatePropagation(),!1):void 0},this)).bind("create_node.jstree",e.proxy(function(e,t){this.clean_node(t.rslt.obj)},this)).bind("load_node.jstree",e.proxy(function(e,t){if(t.rslt.status){if(-1===t.rslt.obj){var n=this.get_container_ul().detach();n.children("li").length&&this.clean_node(n.children("li")),this.get_container().prepend(n)}else t.rslt.obj.find("> ul > li").length&&this.clean_node(t.rslt.obj.find("> ul > li"));this.data.core.ready||this.get_container_ul().find(".jstree-loading:eq(0)").length||(this.data.core.ready=!0,this.__trigger("__ready"))}},this)).bind("__loaded.jstree",e.proxy(function(e,t){t.inst.get_container_ul().children("li").each(function(){t.inst.correct_node(this)})},this)).bind("open_node.jstree",e.proxy(function(e,t){t.rslt.obj.find("> ul > li").each(function(){t.inst.correct_node(this)})},this)).bind("mousedown.jstree",e.proxy(function(){e.jstree._focus(this.get_index())},this)).bind("dblclick.jstree",function(){if(document.selection&&document.selection.empty)document.selection.empty();else if(window.getSelection){var e=window.getSelection();try{e.removeAllRanges(),e.collapse()}catch(t){}}}).delegate(".jstree-ocl","click.jstree",e.proxy(function(e){this.toggle_node(e.target)},this))},__destruct:function(){},defaults:{strings:!1,check_callback:!0,animation:100},_fn:{_get_string:function(t){var n=this.get_settings(!0).core.strings;return e.isFunction(n)?n.call(this,t):n&&n[t]?n[t]:t},init:function(){this.data.core.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.get_container().html(""),this.clean_node(-1),this.data.core.li_height=this.get_container_ul().children("li:eq(0)").height()||18,this.load_node(-1,function(){this.__trigger("__loaded")})},lock:function(){this.data.core.locked=!0,this.get_container().addClass("jstree-locked"),this.__callback()},unlock:function(){this.data.core.locked=!1,this.get_container().removeClass("jstree-locked"),this.__callback()},is_locked:function(){return this.data.core.locked},get_node:function(t){var n=e(t,this.get_container());return n.is(".jstree")||-1===t?-1:(n=n.closest("li",this.get_container()),n.length?n:!1)},get_next:function(e,t){return e=this.get_node(e),-1===e?this.get_container_ul().children("li:eq(0)"):e&&e.length?t?e.nextAll("li").size()>0?e.nextAll("li:eq(0)"):!1:e.hasClass("jstree-open")?e.find("li:eq(0)"):e.nextAll("li").size()>0?e.nextAll("li:eq(0)"):e.parentsUntil(".jstree","li").next("li").eq(0):!1},get_prev:function(e,t){if(e=this.get_node(e),-1===e)return this.get_container().find("> ul > li:last-child");if(!e||!e.length)return!1;if(t)return e.prevAll("li").length>0?e.prevAll("li:eq(0)"):!1;if(e.prev("li").length){for(e=e.prev("li").eq(0);e.hasClass("jstree-open");)e=e.children("ul:eq(0)").children("li:last");return e}var n=e.parentsUntil(".jstree","li:eq(0)");return n.length?n:!1},get_parent:function(e){if(e=this.get_node(e),-1===e||!e||!e.length)return!1;var t=e.parentsUntil(".jstree","li:eq(0)");return t.length?t:-1},get_children:function(e){return e=this.get_node(e),-1===e?this.get_container_ul().children("li"):e&&e.length?e.find("> ul > li"):!1},is_parent:function(e){return e=this.get_node(e),e&&-1!==e&&(e.find("> ul > li:eq(0)").length||e.hasClass("jstree-closed"))},is_loaded:function(e){return e=this.get_node(e),e&&(-1===e&&!this.get_container().find("> ul > li.jstree-loading").length||-1!==e&&!e.hasClass("jstree-loading")&&(e.find("> ul > li").length||e.hasClass("jstree-leaf")))},is_loading:function(e){return e=this.get_node(e),e&&(-1===e&&this.get_container().find("> ul > li.jstree-loading").length||-1!==e&&e.hasClass("jstree-loading"))},is_open:function(e){return e=this.get_node(e),e&&-1!==e&&e.hasClass("jstree-open")},is_closed:function(e){return e=this.get_node(e),e&&-1!==e&&e.hasClass("jstree-closed")},is_leaf:function(e){return e=this.get_node(e),e&&-1!==e&&e.hasClass("jstree-leaf")},load_node:function(t,n){return(t=this.get_node(t))?(-1!==t&&t.addClass("jstree-loading"),this._load_node(t,e.proxy(function(e){-1!==t&&t.removeClass("jstree-loading"),this.__callback({obj:t,status:e}),n&&n.call(this,t,e)},this)),!0):(n.call(this,t,!1),!1)},_load_node:function(e,t){-1===e&&this.get_container_ul().empty().append(this.data.core.original_container_html.clone(!0)),t.call(null,!0)},open_node:function(t,n,a){if(t=this.get_node(t),a="undefined"===(typeof a).toLowerCase()?this.get_settings().core.animation:a,-1===t||!t||!t.length)return!1;if(!this.is_closed(t))return n&&n.call(this,t,!1),!1;if(this.is_loaded(t)){var i=this;t.children("ul").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children("ul").stop(!0,!0).slideDown(e.jstree.IS_IE6?0:a,function(){this.style.display="",i.__trigger("__after_open",{rslt:{obj:t}})}),n&&n.call(this,t,!0),this.__callback({obj:t})}else this.load_node(t,function(e,t){return t?this.open_node(e,n,a):n?n.call(this,e,!1):!1})},close_node:function(t,n){if(t=this.get_node(t),n="undefined"===(typeof n).toLowerCase()?this.get_settings().core.animation:n,!t||!t.length||!this.is_open(t))return!1;var a=this;t.children("ul").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children("ul").stop(!0,!0).slideUp(e.jstree.IS_IE6?0:n,function(){this.style.display="",a.__trigger("__after_close",{rslt:{obj:t}})}),this.__callback({obj:t})},toggle_node:function(e){return this.is_closed(e)?this.open_node(e):this.is_open(e)?this.close_node(e):void 0},open_all:function(e,t,n){e=e?this.get_node(e):-1,e=e&&-1!==e?e:this.get_container_ul(),n=n||e;var a=this;e=this.is_closed(e)?e.find("li.jstree-closed").addBack():e.find("li.jstree-closed"),e.each(function(){a.open_node(this,a.is_loaded(this)?!1:function(e){this.open_all(e,t,n)},t||0)}),0===n.find("li.jstree-closed").length&&this.__callback({obj:n})},close_all:function(e,t){e=e?this._get_node(e):-1;var n=e&&-1!==e?e:this.get_container_ul(),a=this;n=this.is_open(n)?n.find("li.jstree-open").addBack():n.find("li.jstree-open"),n.each(function(){a.close_node(this,t||0)}),this.__callback({obj:e})},clean_node:function(t){t=this.get_node(t),t=t&&-1!==t?t.find("li").addBack():this.get_container().find("li");var n=this;return t.each(function(){var t=e(this),a=t.data("jstree"),i=a&&a.opened||t.hasClass("jstree-open")?"open":a&&a.closed||t.children("ul").length||a&&a.children?"closed":"leaf";switch(a&&a.opened&&delete a.opened,a&&a.closed&&delete a.closed,t.removeClass("jstree-open jstree-closed jstree-leaf jstree-last"),t.children("a").length?e.trim(t.children("a").attr("href"))||t.children("a").attr("href","#"):(t.contents().filter(function(){return 3===this.nodeType||"UL"!==this.tagName}).wrapAll(''),t.children("a").html(t.children("a").html().replace(/[\s\t\n]+$/,""))),t.children("ins.jstree-ocl").length||t.prepend(" "),t.is(":last-child")&&t.addClass("jstree-last"),i){case"leaf":t.addClass("jstree-leaf");break;case"closed":t.addClass("jstree-open"),n.close_node(t,0);break;case"open":t.addClass("jstree-closed"),n.open_node(t,!1,0)}})},correct_node:function(t,n){return t=this.get_node(t),!t||-1===t&&!n?!1:(t=-1===t?this.get_container().find("li"):n?t.find("li").addBack():t,t.each(function(){var t=e(this);switch(!0){case t.hasClass("jstree-open")&&!t.find("> ul > li").length:t.removeClass("jstree-open").addClass("jstree-leaf").children("ul").remove();break;case t.hasClass("jstree-leaf")&&!!t.find("> ul > li").length:t.removeClass("jstree-leaf").addClass("jstree-closed")}t[t.is(":last-child")?"addClass":"removeClass"]("jstree-last")}),t)},scroll_to_node:function(t){var n,a=this.get_container()[0];if(a.scrollHeight>a.offsetHeight){if(t=this.get_node(t),!t||-1===t||!t.length||!t.is(":visible"))return;n=t.offset().top-this.get_container().offset().top,0>n&&(a.scrollTop=a.scrollTop+n-1),n+this.data.core.li_height+(a.scrollWidth>a.offsetWidth?e.jstree.SCROLLBAR_WIDTH:0)>a.offsetHeight&&(a.scrollTop=a.scrollTop+(n-a.offsetHeight+this.data.core.li_height+1+(a.scrollWidth>a.offsetWidth?e.jstree.SCROLLBAR_WIDTH:0)))}},get_state:function(){var e={open:[],scroll:{left:this.get_container().scrollLeft(),top:this.get_container().scrollTop()}};return this.get_container_ul().find(".jstree-open").each(function(){this.id&&e.open.push(this.id)}),e},set_state:function(t,n){if(t){if(e.isArray(t.open)){var a=!0,i=this;return e.each(t.open.concat([]),function(n,s){s=document.getElementById(s),s&&(i.is_loaded(s)?(i.is_closed(s)&&i.open_node(s,!1,0),e.vakata.array_remove(t.open,n)):(i.is_loading(s)||i.open_node(s,e.proxy(function(){this.set_state(t)},i),0),a=!1))}),a&&(delete t.open,this.set_state(t,n)),!1}return t.scroll?(t.scroll&&t.scroll.left!==void 0&&this.get_container().scrollLeft(t.scroll.left),t.scroll&&t.scroll.top!==void 0&&this.get_container().scrollTop(t.scroll.top),delete t.scroll,delete t.open,this.set_state(t,n),!1):e.isEmptyObject(t)?(n&&n.call(this),this.__callback(),!1):!0}return!1},refresh:function(){this.data.core.state=this.get_state(),this.load_node(-1,function(t,n){n&&this.set_state(e.extend(!0,{},this.data.core.state),function(){this.__trigger("refresh")}),this.data.core.state=null})},get_text:function(t,n){return t=this.get_node(t),t&&-1!==t&&t.length?(t=t.children("a:eq(0)").clone(),t.children(".jstree-icon").remove(),t=t[n?"text":"html"](),t=e("")[n?"text":"html"](t),t.html()):!1},set_text:function(e,t){if(e=this.get_node(e),!e||-1===e||!e.length)return!1;e=e.children("a:eq(0)");var n=e.children("INS").clone();return e.html(t).prepend(n),this.__callback({obj:e,text:t}),!0},parse_json:function(t){var n,a,i,s;return null===t||e.isArray(t)&&0===t.length?!1:e.isArray(t)?(i=e(""),s=this,e.each(t,function(e,t){i.append(s.parse_json(t))}),i):(t===void 0&&(t={}),"string"==typeof t&&(t={title:t}),t.li_attr||(t.li_attr={}),t.a_attr||(t.a_attr={}),t.a_attr.href||(t.a_attr.href="#"),t.title||(t.title=this._get_string("New node")),n=e("").attr(t.li_attr),a=e("").attr(t.a_attr).html(t.title),i=e(""),t.data&&!e.isEmptyObject(t.data)&&n.data(t.data),(t.children===!0||e.isArray(t.children)||n.data("jstree")&&e.isArray(n.data("jstree").children))&&(n.data("jstree")||n.data("jstree",{}),n.data("jstree").closed=!0),n.append(a),e.isArray(t.children)&&(e.each(t.children,e.proxy(function(e,t){i.append(this.parse_json(t))},this)),n.append(i)),n)},get_json:function(t,n){t=t!==void 0?this.get_node(t):!1,n||t&&-1!==t||(t=this.get_container_ul().children("li"));var a,i,s={},r={},o={};return t&&t.length?t.length>1||!n?(a=[],i=this,t.each(function(){a.push(i.get_json(e(this),!0))}),a):(o=e.vakata.attributes(t,!0),e.each(o,function(t,n){return"id"===t?(s[t]=n,!0):(n=e.trim(n.replace(/\bjstree[^ ]*/gi,"").replace(/\s+$/gi," ")),n.length&&(s[t]=n),void 0)}),o=e.vakata.attributes(t.children("a"),!0),e.each(o,function(t,n){return"id"===t?(r[t]=n,!0):(n=e.trim(n.replace(/\bjstree[^ ]*/gi,"").replace(/\s+$/gi," ")),n.length&&(r[t]=n),void 0)}),a={title:this.get_text(t),data:e.extend(!0,{},t.data()||{}),children:!1,li_attr:s,a_attr:r},a.data.jstree||(a.data.jstree={}),this.is_open(t)&&(a.data.jstree.opened=!0),this.is_closed(t)&&(a.data.jstree.closed=!0),t=t.find("> ul > li"),t.length&&(a.children=[],i=this,t.each(function(){a.children.push(i.get_json(e(this),!0))})),a):!1},create_node:function(e,t,n,a,i){if(e=this.get_node(e),n=n===void 0?"last":n,-1!==e&&!e.length)return!1;if(!n.match(/^(before|after)$/)&&!i&&!this.is_loaded(e))return this.load_node(e,function(){this.create_node(e,t,n,a,!0)});var s=this.parse_json(t),r=-1===e?this.get_container():e;switch(-1===e&&("before"===n&&(n="first"),"after"===n&&(n="last")),n){case"before":n=e.index(),e=this.get_parent(e);break;case"after":n=e.index()+1,e=this.get_parent(e);break;case"inside":case"first":n=0;break;case"last":n=r.children("ul").children("li").length;break;default:n||(n=0)}return this.check("create_node",s,e,n)?(r=-1===e?this.get_container():e,r.children("ul").length||r.append(""),r.children("ul").children("li").eq(n).length?r.children("ul").children("li").eq(n).before(s):r.children("ul").append(s),this.correct_node(e,!0),a&&a.call(this,s),this.__callback({obj:s,parent:e,position:s.index()}),s):!1},rename_node:function(e,t){e=this.get_node(e);var n=this.get_text(e);return this.check("rename_node",e,this.get_parent(e),t)?(e&&e.length&&(this.set_text(e,t),this.__callback({obj:e,title:t,old:n})),void 0):!1},delete_node:function(e){if(e=this.get_node(e),!e||-1===e||!e.length)return!1;var t=this.get_parent(e),n=this.get_prev(e);return this.check("delete_node",e,t,e.index())?(e=e.detach(),this.correct_node(t),this.correct_node(n),this.__callback({obj:e,prev:n,parent:t}),e):!1},check:function(t,n,a,i){var s=t.match(/^move_node|copy_node|create_node$/i)?a:n,r=this.get_settings().core.check_callback;if(r===!1||e.isFunction(r)&&r.call(this,t,n,a,i)===!1)return!1;if(s=-1===s?this.get_container().data("jstree"):s.data("jstree"),s&&s.functions&&s.functions[t]&&(s=s.functions[t],e.isFunction(s)&&(s=s.call(this,t,n,a,i)),s===!1))return!1;switch(t){case"create_node":break;case"rename_node":break;case"move_node":if(s=-1===a?this.get_container():a,s=s.children("ul").children("li"),s.length&&-1!==s.index(n)&&(i===n.index()||i===n.index()+1))return!1;if(-1!==a&&-1!==a.parentsUntil(".jstree","li").addBack().index(n))return!1;break;case"copy_node":break;case"delete_node":}return!0},move_node:function(t,n,a,i,s){if(t=this.get_node(t),n=this.get_node(n),a=a===void 0?0:a,!t||-1===t||!t.length)return!1;if(-1!==n&&!n.length)return!1;if(!(""+a).match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,function(){this.move_node(t,n,a,i,!0)});var r=this.get_parent(t),o=(""+a).match(/^(before|after)$/)&&-1!==n?this.get_parent(n):n,l=e.jstree._reference(t),c=-1===n?this:e.jstree._reference(n),d=l.get_index()!==c.get_index();switch(-1===o&&(n=c.get_container(),"before"===a&&(a="first"),"after"===a&&(a="last")),a){case"before":a=n.index();break;case"after":a=n.index()+1;break;case"inside":case"first":a=0;break;case"last":a=n.children("ul").children("li").length;break;default:a||(a=0)}return this.check("move_node",t,o,a)?(n.children("ul").length||n.append(""),n.children("ul").children("li").eq(a).length?n.children("ul").children("li").eq(a).before(t):n.children("ul").append(t),d&&(t.find(".jstree-icon, .jstree-ocl").remove(),this.clean_node(t)),l.correct_node(r,!0),c.correct_node(o,!0),i&&i.call(this,t,o,t.index()),this.__callback({obj:t,parent:o,position:t.index(),old_parent:r,is_multi:d,old_instance:l,new_instance:c}),!0):!1},copy_node:function(t,n,a,i,s){if(t=this.get_node(t),n=this.get_node(n),a=a===void 0?"last":a,!t||-1===t||!t.length)return!1;if(-1!==n&&!n.length)return!1;if(!(""+a).match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,function(){this.copy_node(t,n,a,i,!0)});var r=t,o=this.get_parent(t),l=(""+a).match(/^(before|after)$/)&&-1!==n?this.get_parent(n):n,c=e.jstree._reference(t),d=-1===n?this:e.jstree._reference(n),h=c.get_index()!==d.get_index();switch(t=t.clone(!0),t.find("*[id]").addBack().each(function(){this.id&&(this.id="copy_"+this.id)}),-1===l&&(n=d.get_container(),"before"===a&&(a="first"),"after"===a&&(a="last")),a){case"before":a=n.index();break;case"after":a=n.index()+1;break;case"inside":case"first":a=0;break;case"last":a=n.children("ul").children("li").length;break;default:a||(a=0)}return this.check("copy_node",r,l,a)?(n.children("ul").length||n.append(""),n.children("ul").children("li").eq(a).length?n.children("ul").children("li").eq(a).before(t):n.children("ul").append(t),h&&t.find(".jstree-icon, .jstree-ocl").remove(),d.clean_node(t),d.correct_node(l,!0),i&&i.call(this,t,l,t.index(),r),this.__callback({obj:t,parent:l,old_parent:o,position:t.index(),original:r,is_multi:h,old_instance:c,new_instance:d}),!0):!1},cut:function(e){return e=this.get_node(e),e&&-1!==e&&e.length?(t=e,n="move_node",this.__callback({obj:e}),void 0):!1},copy:function(e){return e=this.get_node(e),e&&-1!==e&&e.length?(t=e,n="copy_node",this.__callback({obj:e}),void 0):!1},can_paste:function(){return n!==!1&&t!==!1},paste:function(e){return e=this.get_node(e),e&&n&&n.match(/^(copy_node|move_node)$/)&&t?(this[n](t,e),this.__callback({obj:e,nodes:t,mode:n}),t=!1,n=!1,void 0):!1},edit:function(t,n){if(t=this.get_node(t),!t||-1===t||!t.length)return!1;t.parentsUntil(".jstree",".jstree-closed").each(e.proxy(function(e,t){this.open_node(t,!1,0)},this));var a=this.data.core.rtl,i=this.get_container().width(),s=t.children("a:eq(0)"),r=t.children("ins"),o=s.children("ins"),l=r.width()*r.length,c=o.width()*o.length,d="string"==typeof n?n:this.get_text(t),h=e("",{css:{position:"absolute",top:"-200px",left:a?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),u=t.css("position","relative").append(e("",{value:d,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver",position:"absolute",left:a?"auto":l+c+4+"px",right:a?l+c+4+"px":"auto",top:"0px",height:this.data.core.li_height-2+"px",lineHeight:this.data.core.li_height-2+"px",width:"150px"},blur:e.proxy(function(){var e=t.children(".jstree-rename-input"),n=e.val();""===n&&(n=d),h.remove(),e.remove(),this.rename_node(t,n),t.css("position","")},this),keyup:function(e){var t=e.keyCode||e.which;return 27===t?(this.value=d,this.blur(),void 0):13===t?(this.blur(),void 0):(u.width(Math.min(h.text("pW"+this.value).width(),i)),void 0)},keypress:function(e){var t=e.keyCode||e.which;return 13===t?!1:void 0}})).children(".jstree-rename-input"),_={fontFamily:s.css("fontFamily")||"",fontSize:s.css("fontSize")||"",fontWeight:s.css("fontWeight")||"",fontStyle:s.css("fontStyle")||"",fontStretch:s.css("fontStretch")||"",fontVariant:s.css("fontVariant")||"",letterSpacing:s.css("letterSpacing")||"",wordSpacing:s.css("wordSpacing")||""};this.set_text(t,""),h.css(_),u.css(_).width(Math.min(h.text("pW"+u[0].value).width(),i))[0].select()}}}),e(function(){var t=".jstree * { -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; }.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; list-style-image: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 .jstree-icon { display:inline-block; text-decoration:none; margin:0; padding:0; vertical-align:top; } .jstree .jstree-ocl { width:18px; height:18px; text-align:center; line-height:18px; cursor:pointer; vertical-align:top; } .jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; padding:1px 2px; margin:0; } .jstree a:focus { outline: none; } li.jstree-open > ul { display:block; } li.jstree-closed > ul { display:none; } ";if(e.jstree.IS_IE6){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(n){}t+=".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; } "}e.jstree.IS_IE7&&(t+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } "),e.jstree.IS_FF2&&(t+=".jstree .jstree-icon { display:-moz-inline-box; } .jstree li { line-height:12px; } .jstree a { display:-moz-inline-box; } "),e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery))}(),function(e){e.jstree.plugin("checkbox",{__construct:function(){this.get_container().bind("__construct.jstree",e.proxy(function(){},this)).bind("move_node.jstree, copy_node.jstree",function(t,n){n.rslt.old_instance&&n.rslt.old_parent&&e.isFunction(n.rslt.old_instance.checkbox_repair)&&n.rslt.old_instance.checkbox_repair(n.rslt.old_parent),n.rslt.new_instance&&e.isFunction(n.rslt.new_instance.checkbox_repair)&&n.rslt.new_instance.checkbox_repair(n.rslt.parent)}).bind("delete_node.jstree",function(e,t){this.checkbox_repair(t.rslt.parent)}).delegate("a","click.jstree",e.proxy(function(e){e.preventDefault(),e.currentTarget.blur();var t=this.get_node(e.currentTarget);this.toggle_check(t)},this))},defaults:{three_state:!0,name:"jstree[]"},_fn:{check_node:function(e){e=this.get_node(e),e.find(" > a > .jstree-checkbox").removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked").children(":checkbox").prop("checked",!0).prop("indeterminate",!1),this.checkbox_repair(e),this.__callback({obj:e})},uncheck_node:function(e){e=this.get_node(e),e.find(" > a > .jstree-checkbox").removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",!1).prop("indeterminate",!1),this.checkbox_repair(e),this.__callback({obj:e})},toggle_check:function(e){e=e.find(" > a > .jstree-checkbox").removeClass("jstree-undetermined").toggleClass("jstree-checked"),e.hasClass("jstree-checked")?this.check_node(e):this.uncheck_node(e)},uncheck_all:function(t){var n=t?e(t).find(".jstree-checked").closest("li"):this.get_container().find(".jstree-checked").closest("li");n.children(".jstree-checkbox").removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",!1).prop("indeterminate",!1),this.__callback({obj:n})},checkbox_repair:function(t){if(!this.get_settings(!0).checkbox.three_state)return!1;if(t&&-1!==t||(t=this.get_container_ul().children("li")),t.length>1)return t.each(e.proxy(function(t,n){this.checkbox_repair(e(n))},this)),void 0;var n,a,i,s,r,o=t.find(" > a > .jstree-checkbox"),l=!0;for(o.hasClass("jstree-checked")||o.hasClass("jstree-unchecked")||(n=this.get_parent(t),n&&-1!==n&&n.length&&n.find("> a > .jstree-checked").length?o.addClass("jstree-checked"):o.addClass("jstree-unchecked"),l=!1),o.hasClass("jstree-checked")&&t.find(".jstree-checkbox").removeClass("jstree-undetermined jstree-unchecked").addClass("jstree-checked").children(":checkbox").prop("checked",!0).prop("indeterminate",!1),o.hasClass("jstree-unchecked")&&t.find(".jstree-checkbox").removeClass("jstree-undetermined jstree-checked").addClass("jstree-unchecked").children(":checkbox").prop("checked",!1).prop("indeterminate",!1);l;){if(t=this.get_parent(t),!t||-1===t||!t.length)return;if(a=t.find(" > ul > li"),i=a.find(" > a > .jstree-checked").length,s=a.find(" > a > .jstree-unchecked").length,r=a.find(" > a > .jstree-undetermined").length,a=a.length,a>i+s+r)return;if(s!==a){if(i!==a)return t.parentsUntil(".jstree","li").addBack().find(" > a > .jstree-checkbox").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined").children(":checkbox").prop("checked",!1).prop("undetermined",!0),void 0;if(o=t.find(" > a > .jstree-checkbox"),o.hasClass("jstree-checked"))return;o.removeClass("jstree-undetermined jstree-unchecked").addClass("jstree-checked").children(":checkbox").prop("checked",!0).prop("indeterminate",!1)}else{if(o=t.find(" > a > .jstree-checkbox"),o.hasClass("jstree-unchecked"))return;o.removeClass("jstree-undetermined jstree-checked").addClass("jstree-unchecked").children(":checkbox").prop("checked",!1).prop("indeterminate",!1)}}},clean_node:function(t){t=this.__call_old();var n=this;return t=t.each(function(){var t=e(this),a=t.data("jstree");t.find(" > a > .jstree-checkbox").remove(),t.children("a").prepend("")}),n.checkbox_repair(t),t},get_state:function(){var e=this.__call_old();return e.checkbox=[],this.get_container().find(".jstree-checked").closest("li").each(function(){this.id&&e.checkbox.push(this.id)}),e},set_state:function(t,n){if(this.__call_old()){if(t.checkbox){var a=this;return this.uncheck_all(),e.each(t.checkbox,function(e,t){a.check_node(document.getElementById(t))}),this.checkbox_repair(),delete t.checkbox,this.set_state(t,n),!1}return!0}return!1},get_json:function(e,t){var n,a=this.__call_old();return t&&(n=e.find("> a > ins > :checkbox"),a.data.jstree.checkbox={},a.data.jstree.checkbox.checked=n.parent().hasClass("jstree-checked"),"jstree[]"!==n.attr("name")&&(a.data.jstree.checkbox.name=n.attr("name")),n.val()!==e.attr("id")&&(a.data.jstree.checkbox.value=n.val())),a}}}),e(function(){var t=".jstree a > .jstree-checkbox { height:16px; width:16px; margin-right:1px; } .jstree-rtl a > .jstree-checkbox { margin-right:0; margin-left:1px; } .jstree .jstree-check { margin:0; padding:0; border:0; display:inline; vertical-align:text-bottom; } ";e.jstree.IS_IE6&&(t+=".jstree li a .jstree-checkbox { height:16px; width:16px; background:transparent; margin-right:1px; } .jstree-rtl li a .jstree-checkbox { margin-right:0; margin-left:1px; } "),e.vakata.css.add_sheet({str:t,title:"jstree"})}),e.jstree.defaults.plugins.push("checkbox")}(jQuery),function(e){e.jstree.plugin("contextmenu",{__construct:function(){this.get_container().delegate("a","contextmenu.jstree",e.proxy(function(e){e.preventDefault(),this.is_loading(e.currentTarget)||this.show_contextmenu(e.currentTarget,e.pageX,e.pageY)},this)).delegate("a","click.jstree",e.proxy(function(){this.data.contextmenu.visible&&this._hide_contextmenu()},this)),e(document).bind("context_hide.vakata",e.proxy(function(){this.data.contextmenu=!1},this))},__destruct:function(){this.data.contextmenu&&this._hide_contextmenu()},defaults:{select_node:!0,show_at_node:!0,items:function(){return{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(t){var n=e.jstree._reference(t.reference),a=n.get_node(t.reference);n.create_node(a,{},"last",function(e){setTimeout(function(){n.edit(e)},0)})}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(t){var n=e.jstree._reference(t.reference),a=n.get_node(t.reference);n.edit(a)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(t){var n=e.jstree._reference(t.reference),a=n.get_node(t.reference);n.data.ui&&n.is_selected(a)&&(a=n.get_selected()),n.delete_node(a)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(t){var n=e.jstree._reference(t.reference),a=n.get_node(t.reference);this.data.ui&&n.is_selected(a)&&(a=n.get_selected()),n.cut(a)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(t){var n=e.jstree._reference(t.reference),a=n.get_node(t.reference);this.data.ui&&n.is_selected(a)&&(a=n.get_selected()),n.copy(a)}},paste:{separator_before:!1,icon:!1,_disabled:!this.can_paste(),separator_after:!1,label:"Paste",action:function(t){var n=e.jstree._reference(t.reference),a=n.get_node(t.reference);n.paste(a)}}}}}}},_fn:{show_contextmenu:function(t,n,a){t=this.get_node(t);var i=this.get_settings().contextmenu,s=t.children("a:visible:eq(0)"),r=!1,o=!1;(i.show_at_node||n===void 0||a===void 0)&&(r=s.offset(),n=r.left,a=r.top+this.data.core.li_height),i.select_node&&this.data.ui&&!this.is_selected(t)&&(this.deselect_all(),this.select_node(t)),o=t.data("jstree")&&t.data("jstree").contextmenu?t.data("jstree").contextmenu:i.items,e.isFunction(o)&&(o=o.call(this,t)),e(document).one("context_show.vakata",e.proxy(function(t,n){var a="jstree-contextmenu";this.data.themes.theme&&(a+=" jstree-"+this.data.themes.theme+"-contextmenu"),e(n.element).addClass(a)},this)),this.data.contextmenu.visible=!0,e.vakata.context.show(s,{x:n,y:a},o),this.__callback({obj:t,x:n,y:a})}}}),e.jstree.defaults.plugins.push("contextmenu")}(jQuery),function(e){e.jstree.plugin("dnd",{__construct:function(){this.get_container().delegate("a","mousedown",e.proxy(function(t){var n=this.get_node(t.target);return n&&-1!==n&&n.length&&1===t.which?(this.get_container().trigger("mousedown.jstree"),e.vakata.dnd.start(t,{jstree:!0,origin:this,obj:n},' '+this.get_text(t.currentTarget,!0)+'+
')):void 0},this))},defaults:{copy_modifier:"ctrl",open_timeout:500}}),e(function(){var t=!1,n=!1,a=e('
').hide().appendTo("body");e(document).bind("dnd_start.vakata",function(){t=!1}).bind("dnd_move.vakata",function(i,s){if(n&&clearTimeout(n),s.data.jstree&&(!s.event.target.id||"jstree-marker"!==s.event.target.id)){var r,o,l,c,d,h,u=e.jstree._reference(s.event.target),_=!1,p=!1,f=!1;if(u&&u.data&&u.data.dnd)if(a.attr("class",u.data.themes?"jstree-"+u.get_theme():""),s.helper.children().attr("class",u.data.themes?"jstree-"+u.get_theme():"").find(".jstree-copy:eq(0)")[s.event[s.data.origin.get_settings().dnd.copy_modifier+"Key"]?"show":"hide"](),s.event.target===u.get_container()[0]||s.event.target===u.get_container_ul()[0]){if(u.check(s.event[s.data.origin.get_settings().dnd.copy_modifier+"Key"]?"copy_node":"move_node",s.data.obj,-1,"last"))return t={ins:u,par:-1,pos:"last"},a.hide(),s.helper.find(".jstree-icon:eq(0)").removeClass("jstree-er").addClass("jstree-ok"),void 0}else if(_=e(s.event.target).closest("a"),_&&_.length&&_.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(p=_.offset(),f=s.event.pageY-p.top,l=_.height(),h=l/3>f?["b","i","a"]:f>l-l/3?["a","i","b"]:f>l/2?["i","a","b"]:["i","b","a"],e.each(h,function(e,i){switch(i){case"b":r=p.left-6,o=p.top-5,c=u.get_parent(_),d=_.parent().index();break;case"i":r=p.left-2,o=p.top-5+l/2+1,c=_.parent(),d=0;break;case"a":r=p.left-6,o=p.top-5+l+2,c=u.get_parent(_),d=_.parent().index()+1}return u.check(s.event[s.data.origin.get_settings().dnd.copy_modifier+"Key"]?"copy_node":"move_node",s.data.obj,c,d)?("i"===i&&_.parent().is(".jstree-closed")&&u.get_settings(!0).dnd.open_timeout&&(n=setTimeout(function(e,t){return function(){e.open_node(t)
}}(u,_),u.get_settings(!0).dnd.open_timeout)),t={ins:u,par:c,pos:d},a.css({left:r+"px",top:o+"px"}).show(),s.helper.find(".jstree-icon:eq(0)").removeClass("jstree-er").addClass("jstree-ok"),h=!0,!1):void 0}),h===!0))return;t=!1,s.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),a.hide()}}).bind("dnd_scroll.vakata",function(e,n){n.data.jstree&&(a.hide(),t=!1,n.helper.find(".jstree-icon:eq(0)").removeClass("jstree-ok").addClass("jstree-er"))}).bind("dnd_stop.vakata",function(e,i){n&&clearTimeout(n),i.data.jstree&&(a.hide(),t&&t.ins[i.event[i.data.origin.get_settings().dnd.copy_modifier+"Key"]?"copy_node":"move_node"](i.data.obj,t.par,t.pos))}).bind("keyup keydown",function(t,n){n=e.vakata.dnd._get(),n.data&&n.data.jstree&&n.helper.find(".jstree-copy:eq(0)")[t[n.data.origin.get_settings().dnd.copy_modifier+"Key"]?"show":"hide"]()});var i="#jstree-marker { position: absolute; top:0; left:0; margin:0; padding:0; border-right:0; border-top:5px solid transparent; border-bottom:5px solid transparent; border-left:5px solid; width:0; height:0; font-size:0; line-height:0; _border-top-color:pink; _border-botton-color:pink; _filter:chroma(color=pink); } #jstree-dnd { line-height:16px; margin:0; padding:4px; } #jstree-dnd .jstree-icon, #jstree-dnd .jstree-copy { display:inline-block; text-decoration:none; margin:0 2px 0 0; padding:0; width:16px; height:16px; } #jstree-dnd .jstree-ok { background:green; } #jstree-dnd .jstree-er { background:red; } #jstree-dnd .jstree-copy { margin:0 2px 0 2px; }";e.vakata.css.add_sheet({str:i,title:"jstree"})}),e.jstree.defaults.plugins.push("dnd")}(jQuery),function(e){function t(t,n){var a,i=e.jstree._focused();return i&&i.data&&i.data.hotkeys&&i.data.hotkeys.enabled&&(a=i.get_settings(!0).hotkeys[t])?a.call(i,n):!0}if(e.hotkeys===void 0&&e.vakata_hotkeys===void 0)throw"jsTree hotkeys: jQuery hotkeys plugin not included.";var n=[];e.jstree.plugin("hotkeys",{__construct:function(){if(!this.data.ui)throw"jsTree hotkeys: jsTree UI plugin not included.";e.each(this.get_settings(!0).hotkeys,function(a,i){i!==!1&&-1===e.inArray(a,n)&&(e(document).bind("keydown",a,function(e){return t(a,e)}),n.push(a))}),this.get_container().bind("lock.jstree",e.proxy(function(){this.data.hotkeys.enabled&&(this.data.hotkeys.enabled=!1,this.data.hotkeys.revert=!0)},this)).bind("unlock.jstree",e.proxy(function(){this.data.hotkeys.revert&&(this.data.hotkeys.enabled=!0)},this)),this.enable_hotkeys()},defaults:{up:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this.get_prev(e)),!1},"ctrl+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this.get_prev(e)),!1},"shift+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this.get_prev(e)),!1},down:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this.get_next(e)),!1},"ctrl+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this.get_next(e)),!1},"shift+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this.get_next(e)),!1},left:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this.get_prev(e))),!1},"ctrl+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this.get_prev(e))),!1},"shift+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this.get_prev(e))),!1},right:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this.get_next(e))),!1},"ctrl+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this.get_next(e))),!1},"shift+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this.get_next(e))),!1},space:function(){return this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").click(),!0},"ctrl+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1},"shift+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=!0},disable_hotkeys:function(){this.data.hotkeys.enabled=!1}}}),e.jstree.defaults.plugins.push("hotkeys")}(jQuery),function(e){e.jstree.plugin("html",{defaults:{data:!1,ajax:!1},_fn:{_append_html_data:function(t,n){return n=e(n),t=this.get_node(t),n&&n.length&&n.is("ul, li")?(-1===t&&(t=this.get_container()),t.length?(t.children("ul").length||t.append(""),t.children("ul").empty().append(n.is("ul")?n.children("li"):n),!0):!1):(t&&-1!==t&&t.is("li")&&t.removeClass("jstree-closed").addClass("jstree-leaf").children("ul").remove(),!0)},_load_node:function(t,n){var a=this.get_settings().html;if(t=this.get_node(t),!t)return!1;switch(!0){case!a.data&&!a.ajax:return-1===t&&this._append_html_data(-1,this.data.core.original_container_html.clone(!0)),n.call(this,!0);case e.isFunction(a.data):return a.data.call(this,t,e.proxy(function(e){return n.call(this,this._append_html_data(t,e))},this));case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&-1===t:return n.call(this,this._append_html_data(t,a.data));case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&-1!==t:return a.ajax.success=e.proxy(function(a,i,s){var r=this.get_settings().html.ajax;e.isFunction(r.success)&&(a=r.success.call(this,a,i,s)||a),n.call(this,this._append_html_data(t,a))},this),a.ajax.error=e.proxy(function(t,a,i){var s=this.get_settings().html.ajax;e.isFunction(s.error)&&s.error.call(this,t,a,i),n.call(this,!1)},this),a.ajax.dataType||(a.ajax.dataType="html"),e.isFunction(a.ajax.url)&&(a.ajax.url=a.ajax.url.call(this,t)),e.isFunction(a.ajax.data)&&(a.ajax.data=a.ajax.data.call(this,t)),e.ajax(a.ajax)}}}}),e.jstree.defaults.plugins.push("html")}(jQuery),function(e){e.jstree.plugin("json",{__construct:function(){this.get_container().bind("__after_close.jstree",e.proxy(function(t,n){var a=e(n.rslt.obj);this.get_settings(!0).json.progressive_unload&&(a.data("jstree").children=this.get_json(a)[0].children,a.children("ul").remove())},this))},defaults:{data:!1,ajax:!1,progressive_render:!1,progressive_unload:!1},_fn:{parse_json:function(t){var n=this.get_settings(!0).json;return e.isArray(t.children)&&n.progressive_render&&(t.data||(t.data={}),t.data.jstree||(t.data.jstree={}),t.data.jstree.children=t.children,t.children=!0),this.__call_old(!0,t)},_append_json_data:function(e,t){return e=this.get_node(e),-1===e&&(e=this.get_container()),t=this.parse_json(t),e.length?t?(e.children("ul").length||e.append(""),e.children("ul").empty().append(t.is("li")?t:t.children("li")),!0):(e&&e.is("li")&&e.removeClass("jstree-closed").addClass("jstree-leaf").children("ul").remove(),!0):!1},_load_node:function(t,n){var a=!1,i=this.get_settings().json;if(t=this.get_node(t),!t)return!1;switch(!0){case-1===t&&this.get_container().data("jstree")&&e.isArray(this.get_container().data("jstree").children):return a=this.get_container().data("jstree").children,this.get_container().data("jstree").children=null,n.call(this,this._append_json_data(t,a));case-1!==t&&t.length&&t.data("jstree")&&e.isArray(t.data("jstree").children):return a=t.data("jstree").children,t.data("jstree").children=null,n.call(this,this._append_json_data(t,a));case!i.data&&!i.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(i.data):return i.data.call(this,t,e.proxy(function(e){return n.call(this,this._append_json_data(t,e))},this));case!!i.data&&!i.ajax||!!i.data&&!!i.ajax&&-1===t:return n.call(this,this._append_json_data(t,i.data));case!i.data&&!!i.ajax||!!i.data&&!!i.ajax&&-1!==t:return i.ajax.success=e.proxy(function(a,i,s){var r=this.get_settings().json.ajax;e.isFunction(r.success)&&(a=r.success.call(this,a,i,s)||a),n.call(this,this._append_json_data(t,a))},this),i.ajax.error=e.proxy(function(t,a,i){var s=this.get_settings().json.ajax;e.isFunction(s.error)&&s.error.call(this,t,a,i),n.call(this,!1)},this),i.ajax.dataType||(i.ajax.dataType="json"),e.isFunction(i.ajax.url)&&(i.ajax.url=i.ajax.url.call(this,t)),e.isFunction(i.ajax.data)&&(i.ajax.data=i.ajax.data.call(this,t)),e.ajax(i.ajax)}}}})}(jQuery),function(e){var t=!1,n=0;e.jstree.plugin("rules",{__construct:function(){},defaults:{check_max_depth:!0,check_max_children:!0,check_valid_children:!0,types:{}},_fn:{get_rules:function(e){if(e=this.get_node(e),-1===e)return e=this.get_container(),e=e.data("jstree"),{type:!1,max_depth:e&&e.max_depth?e.max_depth:-1,max_children:e&&e.max_children?e.max_children:-1,valid_children:e&&e.valid_children?e.valid_children:-1};if(!e||!e.length)return!1;e=e.data("jstree");var t=this.get_settings().rules,n=this.get_type(e),a={type:n,max_depth:-1,max_children:-1,valid_children:-1};return n&&t[n]&&(t[n].max_depth&&(a.max_depth=t[n].max_depth),t[n].max_children&&(a.max_children=t[n].max_children),t[n].valid_children&&(a.valid_children=t[n].valid_children)),e&&e.max_depth&&(a.max_depth=e.max_depth),e&&e.max_children&&(a.max_children=e.max_children),e&&e.valid_children&&(a.valid_children=e.valid_children),a},get_type:function(e){return e=this.get_node(e),-1===e&&(e=this.get_container()),e&&e.length?(e=e.data("jstree"),e&&e.type?e.type:!1):!1},set_type:function(e,t){if(e=this.get_node(e),-1===e&&(e=this.get_container()),!e||!e.length)return!1;var n=e.data("jstree");return n||(n={}),n.type=t,e.data("jstree",n),!0},check:function(a,i,s){if(this.__call_old()===!1)return!1;var r=!1,o=this.get_settings().rules,l=this,c=!1,d=0;switch(a){case"create_node":case"move_node":case"copy_node":if((o.check_max_children||o.check_valid_children||o.check_max_depth)&&(r=this.get_rules(s)),o.check_max_children&&r.max_children!==void 0&&-1!==r.max_children&&s.find("> ul > li").not("move_node"===a?i:null).length+i.length>r.max_children)return!1;if(o.check_valid_children&&r.valid_children!==void 0&&-1!==r.valid_children){if(!e.isArray(r.valid_children))return!1;if(i.each(function(){return-1===e.inArray(l.get_type(this),r.valid_children)?(l=!1,!1):void 0}),l===!1)return!1}if(o.check_max_depth&&r.max_depth!==void 0&&-1!==r.max_depth){if(0===r.max_depth)return!1;if(d=0,t!==i){for(c=i;c.length>0;)c=c.find("> ul > li"),d++;n=d,t=i}else d=n;if(c=0,s.children("a:eq(0)").parentsUntil(".jstree","li").each(function(e){var t=l.get_rules(this);return t.max_depth!==void 0&&t.max_depth>=0&&t+e>t.max_depth?(l=!1,!1):(c=e,void 0)}),l===!1)return!1;if(l=this.get_rules(-1),l.max_depth!==void 0&&l.max_depth>=0&&d+c>l.max_depth)return!1}}return!0}}}),e.jstree.defaults.plugins.push("rules")}(jQuery),function(e){e.jstree.plugin("sort",{__construct:function(){this.get_container().bind("load_node.jstree",e.proxy(function(e,t){var n=this.get_node(t.rslt.obj);n=-1===n?this.get_container_ul():n.children("ul"),this._sort(n,!0)},this)).bind("rename_node.jstree create_node.jstree",e.proxy(function(e,t){this._sort(t.rslt.obj.parent(),!1)},this)).bind("move_node.jstree copy_node.jstree",e.proxy(function(e,t){var n=-1===t.rslt.parent?this.get_container_ul():t.rslt.parent.children("ul");this._sort(n,!1)},this))},defaults:function(e,t){return this.get_text(e,!0)>this.get_text(t,!0)?1:-1},_fn:{_sort:function(t,n){var a=this.get_settings(!0).sort,i=this;t.append(e.makeArray(t.children("li")).sort(e.proxy(a,i))),t.children("li").each(function(){i.correct_node(this,!1)}),n&&(t.find("> li > ul").each(function(){i._sort(e(this))}),i.correct_node(t.children("li"),!0))}}}),e.jstree.defaults.plugins.push("sort")}(jQuery),function(e){e.jstree.plugin("state",{__construct:function(){if(e.vakata.storage===void 0)throw"jsTree state plugin: vakata storage helper not included.";this.get_container().bind("__loaded.jstree",e.proxy(function(){this.restore_state()},this)).bind("__ready.jstree",e.proxy(function(){this.get_container().bind(this.get_settings(!0).state.events,e.proxy(function(){this.save_state()},this))},this))},defaults:{key:"jstree",events:"select_node.jstree open_node.jstree close_node.jstree deselect_node.jstree deselect_all.jstree check_node.jstree uncheck_node.jstree uncheck_all.jstree"},_fn:{save_state:function(){var t=this.get_settings(!0).state;e.vakata.storage.set(t.key,this.get_state())},restore_state:function(){var t=this.get_settings(!0).state,n=e.vakata.storage.get(t.key);n&&this.set_state(n)}}})}(jQuery),function(e){var t=[];e.jstree.THEMES_DIR=!1,e.jstree.plugin("themes",{__construct:function(){this.get_container().bind("__construct.jstree",e.proxy(function(){var e=this.get_settings(!0).themes;this.data.themes.dots=e.dots,this.data.themes.icons=e.icons,e.url===!1&&e.theme===!1&&(e.theme=this.data.core.rtl?"default-rtl":"default"),this.set_theme(e.theme,e.url,e.no_load)},this)).bind("__construct.jstree __ready.jstree __loaded.jstree",e.proxy(function(){this[this.data.themes.dots?"show_dots":"hide_dots"](),this[this.data.themes.icons?"show_icons":"hide_icons"]()},this))},defaults:{theme:!1,url:!1,no_load:!1,dots:!0,icons:!0},_fn:{set_theme:function(n,a,i){return n?(a||(a=e.jstree.THEMES_DIR+n+"/style.css"),i||-1!==e.inArray(a,t)||(e.vakata.css.add_sheet({url:a}),t.push(a)),this.data.themes.theme!==n&&(this.get_container().removeClass("jstree-"+this.data.themes.theme),this.data.themes.theme=n),this.get_container().addClass("jstree-"+n),this.__callback(n),void 0):!1},get_theme:function(){return this.data.themes.theme},show_dots:function(){this.data.themes.dots=!0,this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=!1,this.get_container().children("ul").addClass("jstree-no-dots")},toggle_dots:function(){this.data.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this.data.themes.icons=!0,this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=!1,this.get_container().children("ul").addClass("jstree-no-icons")},toggle_icons:function(){this.data.themes.icons?this.hide_icons():this.show_icons()},set_icon:function(e,t){return e=this.get_node(e),e&&-1!==e&&e.length?(e=e.find("> a > .jstree-themeicon"),t===!1?this.hide_icon(e):-1===t.indexOf("/")?e.addClass(t).attr("rel",t):e.css("background","url('"+t+"') center center no-repeat").attr("rel",t),!0):!1},get_icon:function(e){return e=this.get_node(e),e&&-1!==e&&e.length?(e=e.find("> a > .jstree-themeicon"),e.hasClass("jstree-themeicon-hidden")?!1:(e=e.attr("rel"),e&&e.length?e:null)):null},hide_icon:function(e){return e=this.get_node(e),e&&-1!==e&&e.length?(e.find("> a > .jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(e){return e=this.get_node(e),e&&-1!==e&&e.length?(e.find("> a > .jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0):!1},clean_node:function(t){t=this.__call_old();var n=this;return t.each(function(){var t=e(this),a=t.data("jstree");t.find("> a > ins.jstree-themeicon").length||t.children("a").prepend(" "),a&&a.icon!==void 0&&(n.set_icon(t,a.icon),delete a.icon)})},get_state:function(){var e=this.__call_old();return e.themes={theme:this.get_theme(),icons:this.data.themes.icons,dots:this.data.themes.dots},e},set_state:function(e,t){return this.__call_old()?e.themes?(e.themes.theme&&this.set_theme(e.themes.theme),e.themes.dots!==void 0&&this[e.themes.dots?"show_dots":"hide_dots"](),e.themes.icons!==void 0&&this[e.themes.icons?"show_icons":"hide_icons"](),delete e.themes,this.set_state(e,t),!1):!0:!1},get_json:function(e,t){var n,a=this.__call_old();return t&&(n=this.get_icon(e),n!==void 0&&null!==n&&(a.data.jstree.icon=n)),a}}}),e(function(){e.jstree.THEMES_DIR===!1&&e("script").each(function(){return(""+this.src).match(/jstree[^\/]*?\.js(\?.*)?$/)?(e.jstree.THEMES_DIR=(""+this.src).replace(/jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/",!1):void 0}),e.jstree.THEMES_DIR===!1&&(e.jstree.THEMES_DIR="themes/");var t=".jstree a { text-decoration:none; } .jstree a > .jstree-themeicon { height:16px; width:16px; margin-right:3px; } .jstree-rtl a > .jstree-themeicon { margin-left:3px; margin-right:0; } .jstree .jstree-no-icons .jstree-themeicon, .jstree .jstree-themeicon-hidden { display:none; } ";e.jstree.IS_IE6&&(t+=".jstree li a .jstree-themeicon { height:16px; width:16px; margin-right:3px; } .jstree-rtl li a .jstree-themeicon { margin-right:0px; margin-left:3px; } "),e.vakata.css.add_sheet({str:t,title:"jstree"})}),e.jstree.defaults.plugins.push("themes")}(jQuery),function(e){e.jstree.plugin("ui",{__construct:function(){this.data.ui.selected=e(),this.data.ui.hovered=null,this.data.ui.last_selected=!1,this.get_container().delegate("a","click.jstree",e.proxy(function(e,t){e.preventDefault(),e.currentTarget.blur();var n=this.get_settings(!0).ui;t&&("on"!==n.select_multiple_modifier&&n.select_multiple_modifier!==!1&&t[n.select_multiple_modifier+"Key"]&&(e[n.select_multiple_modifier+"Key"]=t[n.select_multiple_modifier+"Key"]),"on"!==n.select_range_modifier&&n.select_range_modifier!==!1&&t[n.select_range_modifier+"Key"]&&(e[n.select_range_modifier+"Key"]=t[n.select_range_modifier+"Key"]));var a=this.get_node(e.currentTarget),i=this.is_selected(a),s="on"===n.select_multiple_modifier||n.select_multiple_modifier!==!1&&e&&e[n.select_multiple_modifier+"Key"],r="on"===n.select_range_modifier||n.select_range_modifier!==!1&&e&&e[n.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==a[0]&&this.data.ui.last_selected.parent()[0]===a.parent()[0];switch(!0){case r&&this.data.ui.last_selected!==!1:this.select_range(a);break;case r&&this.data.ui.last_selected===!1:this.select_one(a);break;case i&&s:this.deselect_node(a);break;default:this.select_one(a,s)}},this)).delegate("a","mouseenter.jstree",e.proxy(function(e){this.hover_node(e.target)},this)).delegate("a","mouseleave.jstree",e.proxy(function(e){this.dehover_node(e.target)},this)).bind("delete_node.jstree",e.proxy(function(t,n){var a=this.get_node(n.rslt.obj),i=a&&a.length?a.find("a.jstree-clicked"):e(),s=this;i.each(function(){s.deselect_node(this)})},this)).bind("move_node.jstree",e.proxy(function(e,t){t.rslt.cy&&t.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked")},this))},defaults:{select_multiple_modifier:"ctrl",select_range_modifier:"shift",disable_nested_selection:!0},_fn:{get_node:function(e,t){return e===void 0||null===e?t?this.data.ui.selected:this.data.ui.last_selected:this.__call_old()},hover_node:function(e){return e=this.get_node(e),e&&e.length&&!this.is_loading(e)?(e.hasClass("jstree-hovered")||this.dehover_node(),this.data.ui.hovered=e.children("a").addClass("jstree-hovered").parent(),this.scroll_to_node(e),this.__callback({obj:e}),void 0):!1},dehover_node:function(){var e,t=this.data.ui.hovered;return t&&t.length?(e=t.children("a").removeClass("jstree-hovered").parent(),this.data.ui.hovered[0]===e[0]&&(this.data.ui.hovered=null),this.__callback({obj:t}),void 0):!1},select_node:function(e){var t=this;return e=this.get_node(e),-1!==e&&e&&e.length&&!this.is_loading(e)?(e.children("a").addClass("jstree-clicked"),this.data.ui.last_selected=e,this.data.ui.selected=this.data.ui.selected.add(e),e.parents(".jstree-closed").each(function(){t.open_node(this,!1,0)}),this.__callback({obj:e}),void 0):!1},deselect_node:function(e){return e=this.get_node(e),e&&e.length?(this.is_selected(e)&&(e.children("a").removeClass("jstree-clicked"),this.data.ui.selected=this.data.ui.selected.not(e),this.data.ui.last_selected.get(0)===e.get(0)&&(this.data.ui.last_selected=this.data.ui.selected.eq(0)),this.__callback({obj:e})),void 0):!1},deselect_all:function(t){var n=t?e(t).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();n.children("a.jstree-clicked").removeClass("jstree-clicked"),this.data.ui.selected=e(),this.data.ui.last_selected=!1,this.__callback({obj:n})},is_selected:function(e){return this.data.ui.selected.index(this.get_node(e))>=0},get_selected:function(t){return t?e(t).find("a.jstree-clicked").parent():this.data.ui.selected},select_range:function(e,t,n){var a,i,s=this;return e=this.get_node(e),t||(i=!0,t=this.data.ui.last_selected),t=this.get_node(t),-1!==e&&e&&e.length&&!this.is_loading(e)?-1!==t&&t&&t.length&&!this.is_loading(t)?(n||this.deselect_all(),a=e.index()").html(i).text():this.get_text(n,!0),r=[],o=this;switch(a.children("ul").children("li").each(function(){r.push(o.get_text(this,!0))}),t){case"delete_node":return!0;case"rename_node":case"copy_node":return-1===e.inArray(s,r);case"move_node":return-1!==a.children("ul").children("li").index(n)||-1===e.inArray(s,r)}return!0}}}),e.jstree.defaults.plugins.push("unique")}(jQuery),function(e){e.jstree.plugin("wholerow",{__construct:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.themes&&this.get_container().bind("set_state.jstree",e.proxy(function(){this.hide_dots()},this)),this.get_container().bind("__ready.jstree",e.proxy(function(){var t=this;e(function(){t.get_container_ul().addClass("jstree-wholerow-ul"),e.vakata.css.add_sheet({str:".jstree-"+t.get_index()+" .jstree-wholerow { height:"+t.data.core.li_height+"px; }",title:"jstree"})})},this)).bind("deselect_all.jstree",e.proxy(function(){this.get_container().find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).bind("select_node.jstree deselect_node.jstree ",e.proxy(function(t,n){n.rslt.obj.each(function(){e(this).children(".jstree-wholerow")["select_node"===t.type?"addClass":"removeClass"]("jstree-wholerow-clicked")})},this)).bind("hover_node.jstree dehover_node.jstree",e.proxy(function(t,n){this.get_container().find(".jstree-wholerow-hovered").removeClass("jstree-wholerow-hovered"),"hover_node"===t.type&&n.rslt.obj.each(function(){e(this).children(".jstree-wholerow").addClass("jstree-wholerow-hovered")})},this)).delegate(".jstree-wholerow","contextmenu.jstree",e.proxy(function(t){this.data.contextmenu!==void 0&&(t.preventDefault(),e(t.currentTarget).closest("li").children("a:eq(0)").trigger("contextmenu",t))},this)).delegate(".jstree-wholerow","click.jstree",function(t){t.stopImmediatePropagation(),e(t.currentTarget).closest("li").children("a:eq(0)").trigger("click",t)}).delegate(".jstree-leaf > .jstree-ocl","click.jstree",e.proxy(function(t){t.stopImmediatePropagation(),e(t.currentTarget).closest("li").children("a:eq(0)").trigger("click",t)},this)).delegate("li","mouseover.jstree",e.proxy(function(t){return t.stopImmediatePropagation(),e(t.currentTarget).closest("li").children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(t.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",e.proxy(function(e){this.dehover_node(e.currentTarget)},this))},defaults:{},__destroy:function(){this.get_container().find(".jstree-wholerow").remove()},_fn:{clean_node:function(t){return t=this.__call_old(),t.each(function(){var t=e(this);t.find("> .jstree-wholerow").length||t.prepend("
")})}}}),e(function(){e.vakata.css.add_sheet({str:".jstree .jstree-wholerow-ul { position:relative; display:inline-block; min-width:100%; }.jstree-wholerow-ul li > a, .jstree-wholerow-ul li > ins { position:relative; }.jstree-wholerow-ul .jstree-wholerow { width:100%; cursor:pointer; position:absolute; left:0; user-select:none;-webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; }",title:"jstree"})}),e.jstree.defaults.plugins.push("wholerow")}(jQuery),function(e){var t={nest:' ',flat:' '},n=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")};e.jstree.plugin("xml",{defaults:{xsl:"flat",data:!1,ajax:!1},_fn:{_append_xml_data:function(n,a){return a=e.vakata.xslt(a,t[this.get_settings().xml.xsl]),a===!1?!1:(a=e(a),n=this.get_node(n),a&&a.length&&a.is("ul, li")?(-1===n&&(n=this.get_container()),n.length?(n.children("ul").length||n.append(""),n.children("ul").empty().append(a.is("ul")?a.children("li"):a),!0):!1):(n&&-1!==n&&n.is("li")&&n.removeClass("jstree-closed").addClass("jstree-leaf").children("ul").remove(),!0))},_load_node:function(t,n){var a=this.get_settings().xml;if(t=this.get_node(t),!t)return!1;switch(!0){case e.isFunction(a.data):return a.data.call(this,t,e.proxy(function(e){return n.call(this,this._append_xml_data(t,e))},this));case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&-1===t:return n.call(this,this._append_xml_data(t,a.data));case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&-1!==t:return a.ajax.success=e.proxy(function(a,i,s){var r=this.get_settings().xml.ajax;e.isFunction(r.success)&&(a=r.success.call(this,a,i,s)||a),n.call(this,this._append_xml_data(t,a))},this),a.ajax.error=e.proxy(function(t,a,i){var s=this.get_settings().xml.ajax;e.isFunction(s.error)&&s.error.call(this,t,a,i),n.call(this,!1)},this),a.ajax.dataType||(a.ajax.dataType="xml"),e.isFunction(a.ajax.url)&&(a.ajax.url=a.ajax.url.call(this,t)),e.isFunction(a.ajax.data)&&(a.ajax.data=a.ajax.data.call(this,t)),e.ajax(a.ajax)}},get_xml:function(t,a,i){var s="";return t||(t="flat"),i===void 0?(a=this.get_json(a),e.each(a,e.proxy(function(e,n){s+=this.get_xml(t,n,!0)},this)),''+s+""):(s+="- ",s+="","flat"===t&&(s+="
"),a.children&&e.each(a.children,e.proxy(function(e,n){s+=this.get_xml(t,n,a.li_attr&&a.li_attr.id?a.li_attr.id:!0)},this)),"nest"===t&&(s+=""),s)}}}),e.jstree.defaults.plugins.push("xml")}(jQuery),function(e){e.jstree.plugin("z_no_clean",{_fn:{clean_node:function(){return!1}}}),e.jstree.defaults.plugins.push("z_no_clean")}(jQuery);