/* 2020-9-22 15:23:19 | 版权所有 军懋国兴 */
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(S,E){"use strict";if(!S.jstree){var s=0,a=!1,n=!1,o=!1,r=[],e=S("script:last").attr("src"),y=window.document;S.jstree={version:"3.3.7",defaults:{plugins:[]},plugins:{},path:e&&-1!==e.indexOf("/")?e.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},S.jstree.create=function(e,r){var i=new S.jstree.core(++s),t=r;return r=S.extend(!0,{},S.jstree.defaults,r),t&&t.plugins&&(r.plugins=t.plugins),S.each(r.plugins,function(e,t){"core"!==e&&(i=i.plugin(t,r[t]))}),S(e).data("jstree",i),i.init(e,r),i},S.jstree.destroy=function(){S(".jstree:jstree").jstree("destroy"),S(y).off(".jstree")},S.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},S.jstree.reference=function(t){var r=null,e=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!e||!e.length)try{e=S(t)}catch(e){}if(!e||!e.length)try{e=S("#"+t.replace(S.jstree.idregex,"\\$&"))}catch(e){}return e&&e.length&&(e=e.closest(".jstree")).length&&(e=e.data("jstree"))?r=e:S(".jstree").each(function(){var e=S(this).data("jstree");return e&&e._model.data[t]?(r=e,!1):void 0}),r},S.fn.jstree=function(r){var i="string"==typeof r,s=Array.prototype.slice.call(arguments,1),a=null;return!(!0===r&&!this.length)&&(this.each(function(){var e=S.jstree.reference(this),t=i&&e?e[r]:null;return a=i&&t?t.apply(e,s):null,e||i||r!==E&&!S.isPlainObject(r)||S.jstree.create(this,r),(e&&!i||!0===r)&&(a=e||!1),(null===a||a===E)&&void 0}),null!==a&&a!==E?a:this)},S.expr.pseudos.jstree=S.expr.createPseudo(function(e){return function(e){return S(e).hasClass("jstree")&&S(e).data("jstree")!==E}}),S.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:S.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(e){e.type="click",S(e.currentTarget).trigger(e)},enter:function(e){e.type="click",S(e.currentTarget).trigger(e)},left:function(e){var t;e.preventDefault(),this.is_open(e.currentTarget)?this.close_node(e.currentTarget):(t=this.get_parent(e.currentTarget))&&t.id!==S.jstree.root&&this.get_node(t,!0).children(".jstree-anchor").focus()},up:function(e){e.preventDefault();var t=this.get_prev_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},right:function(e){var t;e.preventDefault(),this.is_closed(e.currentTarget)?this.open_node(e.currentTarget,function(e){this.get_node(e,!0).children(".jstree-anchor").focus()}):!this.is_open(e.currentTarget)||(t=this.get_node(e.currentTarget,!0).children(".jstree-children")[0])&&S(this._firstChild(t)).children(".jstree-anchor").focus()},down:function(e){e.preventDefault();var t=this.get_next_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},"*":function(){this.open_all()},home:function(e){e.preventDefault();var t=this._firstChild(this.get_container_ul()[0]);t&&S(t).children(".jstree-anchor").filter(":visible").focus()},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}}},S.jstree.core.prototype={plugin:function(e,t){var r=S.jstree.plugins[e];return r?(this._data[e]={},r.prototype=this,new r(t,this)):this},init:function(e,t){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[S.jstree.root]={id:S.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=S(e).addClass("jstree jstree-"+this._id),this.settings=t,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("
"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(S.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e,t,r=y.createElement("LI");return r.setAttribute("role","treeitem"),(e=y.createElement("I")).className="jstree-icon jstree-ocl",e.setAttribute("role","presentation"),r.appendChild(e),(e=y.createElement("A")).className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),(t=y.createElement("I")).className="jstree-icon jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),r.appendChild(e),e=t=null,r},_kbevent_to_func:function(e){var t=[];e.ctrlKey&&t.push("ctrl"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.push({8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",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:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"}[e.which]||e.which),t=t.sort().join("-").toLowerCase();var r,i,s=this.settings.core.keyboard;for(r in s)if(s.hasOwnProperty(r)&&("-"!==(i=r)&&"+"!==i&&(i=(i=i.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),i===t))return s[r];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var a="",n=null,t=0;this.element.on("dblclick.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(y.selection&&y.selection.empty)y.selection.empty();else if(window.getSelection){var t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(e){}}}).on("mousedown.jstree",S.proxy(function(e){e.target===this.element[0]&&(e.preventDefault(),t=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(e){e.preventDefault()}).on("click.jstree",".jstree-ocl",S.proxy(function(e){this.toggle_node(e.target)},this)).on("dblclick.jstree",".jstree-anchor",S.proxy(function(e){return!(!e.target.tagName||"input"!==e.target.tagName.toLowerCase())||void(this.settings.core.dblclick_toggle&&this.toggle_node(e.target))},this)).on("click.jstree",".jstree-anchor",S.proxy(function(e){e.preventDefault(),e.currentTarget!==y.activeElement&&S(e.currentTarget).focus(),this.activate_node(e.currentTarget,e)},this)).on("keydown.jstree",".jstree-anchor",S.proxy(function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var t=this._kbevent_to_func(e);if(t){var r=t.call(this,e);if(!1===r||!0===r)return r}},this)).on("load_node.jstree",S.proxy(function(e,t){t.status&&(t.node.id!==S.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(S.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){for(var e=[],t=0,r=this._data.core.selected.length;t .jstree-anchor").focus())},this)).on("mouseenter.jstree",".jstree-anchor",S.proxy(function(e){this.hover_node(e.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",S.proxy(function(e){this.dehover_node(e.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),S(y).off(".jstree-"+this._id)},trigger:function(e,t){((t=t||{}).instance=this).element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var t=this.settings.core.strings;return S.isFunction(t)?t.call(this,e):t&&t[e]?t[e]:e},_firstChild:function(e){for(e=e?e.firstChild:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_nextSibling:function(e){for(e=e?e.nextSibling:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_previousSibling:function(e){for(e=e?e.previousSibling:null;null!==e&&1!==e.nodeType;)e=e.previousSibling;return e},get_node:function(e,t){var r;e&&e.id&&(e=e.id),e instanceof jQuery&&e.length&&e[0].id&&(e=e[0].id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(r=S("#"+e.replace(S.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[r.closest(".jstree-node").attr("id")])e=this._model.data[r.closest(".jstree-node").attr("id")];else if((r=this.element.find(e)).length&&this._model.data[r.closest(".jstree-node").attr("id")])e=this._model.data[r.closest(".jstree-node").attr("id")];else{if(!(r=this.element.find(e)).length||!r.hasClass("jstree"))return!1;e=this._model.data[S.jstree.root]}return t&&(e=e.id===S.jstree.root?this.element:S("#"+e.id.replace(S.jstree.idregex,"\\$&"),this.element)),e}catch(e){return!1}},get_path:function(e,t,r){if(!(e=e.parents?e:this.get_node(e))||e.id===S.jstree.root||!e.parents)return!1;var i,s,a=[];for(a.push(r?e.id:e.text),i=0,s=e.parents.length;i").html(n),c.text=this.settings.core.force_text?n.text():n.html(),n=e.data(),c.data=n?S.extend(!0,{},n):null,c.state.opened=e.hasClass("jstree-open"),c.state.selected=e.children("a").hasClass("jstree-clicked"),c.state.disabled=e.children("a").hasClass("jstree-disabled"),c.data&&c.data.jstree)for(a in c.data.jstree)c.data.jstree.hasOwnProperty(a)&&(c.state[a]=c.data.jstree[a]);for((n=e.children("a").children(".jstree-themeicon")).length&&(c.icon=!n.hasClass("jstree-themeicon-hidden")&&n.attr("rel")),c.state.icon!==E&&(c.icon=c.state.icon),c.icon!==E&&null!==c.icon&&""!==c.icon||(c.icon=!0),n=e.children("ul").children("li");d[o="j"+this._id+"_"+ ++this._cnt];);return c.id=c.li_attr.id?c.li_attr.id.toString():o,n.length?(n.each(S.proxy(function(e,t){i=this._parse_model_from_html(S(t),c.id,r),s=this._model.data[i],c.children.push(i),s.children_d.length&&(c.children_d=c.children_d.concat(s.children_d))},this)),c.children_d=c.children_d.concat(c.children)):e.hasClass("jstree-closed")&&(c.state.loaded=!1),c.li_attr.class&&(c.li_attr.class=c.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),c.a_attr.class&&(c.a_attr.class=c.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),(d[c.id]=c).state.selected&&this._data.core.selected.push(c.id),c.id},_parse_model_from_flat_json:function(e,t,r){r=r?r.concat():[],t&&r.unshift(t);var i,s,a,n,o=e.id.toString(),d=this._model.data,c=this._model.default_state,l={id:o,text:e.text||"",icon:e.icon===E||e.icon,parent:t,parents:r,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(i in c)c.hasOwnProperty(i)&&(l.state[i]=c[i]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),l.icon!==E&&null!==l.icon&&""!==l.icon||(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(i in e.data.jstree)e.data.jstree.hasOwnProperty(i)&&(l.state[i]=e.data.jstree[i]);if(e&&"object"==_typeof(e.state))for(i in e.state)e.state.hasOwnProperty(i)&&(l.state[i]=e.state[i]);if(e&&"object"==_typeof(e.li_attr))for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(l.li_attr[i]=e.li_attr[i]);if(l.li_attr.id||(l.li_attr.id=o),e&&"object"==_typeof(e.a_attr))for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(l.a_attr[i]=e.a_attr[i]);for(e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),i=0,s=(d[l.id]=l).children.length;i"+this.get_string("Loading ...")+""),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(S.jstree.root,function(e,t){t&&(this.get_container_ul()[0].className=r,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(S.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===S.jstree.root)return!1;var r=[],e=[],i=this._data.core.selected.concat([]);e.push(t.id),!0===t.state.opened&&r.push(t.id),this.get_node(t,!0).find(".jstree-open").each(function(){e.push(this.id),r.push(this.id)}),this._load_nodes(e,S.proxy(function(e){this.open_node(r,!1,0),this.select_node(i),this.trigger("refresh_node",{node:t,nodes:e})},this),!1,!0)},set_id:function(e,t){if(!(e=this.get_node(e))||e.id===S.jstree.root)return!1;var r,i,s=this._model.data,a=e.id;for(t=t.toString(),s[e.parent].children[S.inArray(e.id,s[e.parent].children)]=t,r=0,i=e.parents.length;re.children.length&&(r=e.children.length),t.id||(t.id=!0),!this.check("create_node",t,e,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===t.id&&delete t.id,!(t=this._parse_model_from_json(t,e.id,e.parents.concat())))return!1;for(a=this.get_node(t),(n=[]).push(t),n=n.concat(a.children_d),this.trigger("model",{nodes:n,parent:e.id}),e.children_d=e.children_d.concat(n),o=0,d=e.parents.length;oh.children.length&&(r=h.children.length),!this.check("move_node",e,h,r,{core:!0,origin:n,is_multi:_&&_._id&&_._id!==this._id,is_foreign:!_||!_._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(e.parent===h.id){for(g=h.children.concat(),-1!==(f=S.inArray(e.id,g))&&(g=S.vakata.array_remove(g,f),ff.children.length&&(r=f.children.length),!this.check("copy_node",e,f,r,{core:!0,origin:n,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(u=p?p.get_json(e,{no_id:!0,no_data:!0,no_state:!0}):e))return!1;if(!0===u.id&&delete u.id,!(u=this._parse_model_from_json(u,f.id,f.parents.concat())))return!1;for(l=this.get_node(u),e&&e.state&&!1===e.state.loaded&&(l.state.loaded=!1),(c=[]).push(u),c=c.concat(l.children_d),this.trigger("model",{nodes:c,parent:f.id}),h=0,_=f.parents.length;h<_;h++)this._model.data[f.parents[h]].children_d=this._model.data[f.parents[h]].children_d.concat(c);for(c=[],h=0,_=f.children.length;h<_;h++)c[r<=h?h+1:h]=f.children[h];return c[r]=l.id,f.children=c,f.children_d.push(l.id),f.children_d=f.children_d.concat(l.children_d),f.id===S.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(f.id),a||this.redraw(f.id===S.jstree.root),i&&i.call(this,l,f,r),this.trigger("copy_node",{node:l,original:e,parent:f.id,position:r,old_parent:g,old_position:p&&p._id&&g&&p._model.data[g]&&p._model.data[g].children?S.inArray(e.id,p._model.data[g].children):-1,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id,old_instance:p,new_instance:this}),l.id},cut:function(e){if(e=e||this._data.core.selected.concat(),S.isArray(e)||(e=[e]),!e.length)return!1;for(var t,r=[],i=0,s=e.length;i"),d=e,c=S("",{css:{position:"absolute",top:"-200px",left:t?"0px":"-1000px",visibility:"hidden"}}).appendTo(y.body),l=S("",{value:d,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:S.proxy(function(e){e.stopImmediatePropagation(),e.preventDefault();var t,r=o.children(".jstree-rename-input").val(),i=this.settings.core.force_text;""===r&&(r=d),c.remove(),o.replaceWith(n),o.remove(),d=i?d:S("").append(S.parseHTML(d)).html(),s=this.get_node(s),this.set_text(s,d),(t=!!this.rename_node(s,i?S("").text(r).text():S("").append(S.parseHTML(r)).html()))||this.set_text(s,d),this._data.core.focused=h.id,setTimeout(S.proxy(function(){var e=this.get_node(h.id,!0);e.length&&(this._data.core.focused=h.id,e.children(".jstree-anchor").focus())},this),0),a&&a.call(this,h,t,_),l=null},this),keydown:function(e){var t=e.which;27===t&&(_=!0,this.value=d),27!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&32!==t||e.stopImmediatePropagation(),27!==t&&13!==t||(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(){l.width(Math.min(c.text("pW"+this.value).width(),r))},keypress:function(e){return 13!==e.which&&void 0}}),i={fontFamily:n.css("fontFamily")||"",fontSize:n.css("fontSize")||"",fontWeight:n.css("fontWeight")||"",fontStyle:n.css("fontStyle")||"",fontStretch:n.css("fontStretch")||"",fontVariant:n.css("fontVariant")||"",letterSpacing:n.css("letterSpacing")||"",wordSpacing:n.css("wordSpacing")||""},o.attr("class",n.attr("class")).append(n.contents().clone()).append(l),n.replaceWith(o),c.css(i),l.css(i).width(Math.min(c.text("pW"+l[0].value).width(),r))[0].select(),void S(y).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(e){l&&e.target!==l&&S(l).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,t){if(!e)return!1;!0===t&&(t=(this.settings.core.themes.dir||S.jstree.path+"/themes")+"/"+e+"/style.css"),t&&-1===S.inArray(t,r)&&(S("head").append(''),r.push(t)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),(this._data.core.themes.variant=e)&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(e,t){var r,i,s,a;if(S.isArray(e)){for(r=0,i=(e=e.slice()).length;r"),f.each(e,function(e,t){return!t||(m.items.push(t),!s&&t.separator_before&&(i+=" "),s=!1,i+="",void(t.separator_after&&(i+=" ",s=!0)))}),i=i.replace(/<\/li\>$/,""),t&&(i+=""),t||(m.html=i,f.vakata.context._trigger("parse")),10"),m.element.on("mouseenter","li",function(e){e.stopImmediatePropagation(),f.contains(this,e.relatedTarget)||(t&&clearTimeout(t),m.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),f(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),f.vakata.context._show_submenu(this))}).on("mouseleave","li",function(e){f.contains(this,e.relatedTarget)||f(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(e){f(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),f.vakata.context.settings.hide_onmouseleave&&(t=setTimeout(function(){f.vakata.context.hide()},f.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(e){e.preventDefault(),f(this).blur().parent().hasClass("vakata-context-disabled")||!1===f.vakata.context._execute(f(this).attr("rel"))||f.vakata.context.hide()}).on("keydown","a",function(e){var t=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),f(e.currentTarget).trigger(e);break;case 37:m.is_visible&&(m.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 38:m.is_visible&&((t=m.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(t=m.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),t.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 39:m.is_visible&&(m.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 40:m.is_visible&&((t=m.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(t=m.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),t.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 27:f.vakata.context.hide(),e.preventDefault()}}).on("keydown",function(e){e.preventDefault();var t=m.element.find(".vakata-contextmenu-shortcut-"+e.which).parent();t.parent().not(".vakata-context-disabled")&&t.click()}),f(y).on("mousedown.vakata.jstree",function(e){m.is_visible&&m.element[0]!==e.target&&!f.contains(m.element[0],e.target)&&f.vakata.context.hide()}).on("context_show.vakata.jstree",function(e,t){m.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),p&&m.element.addClass("vakata-context-rtl").css("direction","rtl"),m.element.find("ul").hide().end()})}),S.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},S.jstree.plugins.dnd=function(e,o){this.init=function(e,t){o.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in y.createElement("span")},this.bind=function(){o.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",S.proxy(function(e){if(this.settings.dnd.large_drag_target&&S(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!S(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var t=this.get_node(e.target),r=this.is_selected(t)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,i=1'+i+'+');S.vakata.dnd._trigger("start",e,{helper:S(),element:c,data:d})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(e){return e.preventDefault(),S.vakata.dnd._trigger("move",e,{helper:S(),element:c,data:d}),!1}).on("drop.jstree",S.proxy(function(e){return e.preventDefault(),S.vakata.dnd._trigger("stop",e,{helper:S(),element:c,data:d}),!1},this))},this.redraw_node=function(e,t,r,i){if((e=o.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0);else{for(var s=null,a=0,n=e.childNodes.length;a ').hide();S(y).on("dragover.vakata.jstree",function(e){c&&S.vakata.dnd._trigger("move",e,{helper:S(),element:c,data:d})}).on("drop.vakata.jstree",function(e){c&&(S.vakata.dnd._trigger("stop",e,{helper:S(),element:c,data:d}),d=c=null)}).on("dnd_start.vakata.jstree",function(e,t){T=C=!1,t&&t.data&&t.data.jstree&&O.appendTo(y.body)}).on("dnd_move.vakata.jstree",function(e,s){var a=s.event.target!==T.target;if(!N||s.event&&"dragover"===s.event.type&&!a||clearTimeout(N),s&&s.data&&s.data.jstree&&(!s.event.target.id||"jstree-marker"!==s.event.target.id)){T=s.event;var n,t,o,d,c,l,h,_,u,g,f,p,m,v,j,y,k,x,b=S.jstree.reference(s.event.target),w=!1;if(b&&b._data&&b._data.dnd)if(O.attr("class","jstree-"+b.get_theme()+(b.settings.core.themes.responsive?" jstree-dnd-responsive":"")),k=s.data.origin&&(s.data.origin.settings.dnd.always_copy||s.data.origin.settings.dnd.copy&&(s.event.metaKey||s.event.ctrlKey)),s.helper.children().attr("class","jstree-"+b.get_theme()+" jstree-"+b.get_theme()+"-"+b.get_theme_variant()+" "+(b.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[k?"show":"hide"](),s.event.target!==b.element[0]&&s.event.target!==b.get_container_ul()[0]||0!==b.get_container_ul().children().length){if((w=b.settings.dnd.large_drop_target?S(s.event.target).closest(".jstree-node").children(".jstree-anchor"):S(s.event.target).closest(".jstree-anchor"))&&w.length&&w.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(n=w.offset(),t=(s.event.pageY!==E?s.event.pageY:s.event.originalEvent.pageY)-n.top,c=w.outerHeight(),_=tS.inArray(s.data.nodes[g],v.children)&&--m),!(u=u&&(b&&b.settings&&b.settings.dnd&&!1===b.settings.dnd.check_while_dragging||b.check(p,s.data.origin&&s.data.origin!==b?s.data.origin.get_node(s.data.nodes[g]):s.data.nodes[g],l,m,{dnd:!0,ref:b.get_node(w.parent()),pos:t,origin:s.data.origin,is_multi:s.data.origin&&s.data.origin!==b,is_foreign:!s.data.origin})))){b&&b.last_error&&(A=b.last_error());break}return"i"===t&&w.parent().is(".jstree-closed")&&b.settings.dnd.open_timeout&&(!s.event||"dragover"!==s.event.type||a)&&(N&&clearTimeout(N),N=setTimeout((i=w,function(){r.open_node(i)}),(r=b).settings.dnd.open_timeout)),u?((x=b.get_node(l,!0)).hasClass(".jstree-dnd-parent")||(S(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),x.addClass("jstree-dnd-parent")),C={ins:b,par:l,pos:"i"!==t||"last"!==j||0!==h||b.is_loaded(y)?h:"last"},O.css({left:o+"px",top:d+"px"}).show(),s.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),s.event.originalEvent&&s.event.originalEvent.dataTransfer&&(s.event.originalEvent.dataTransfer.dropEffect=k?"copy":"move"),A={},!(_=!0)):void 0;var r,i}),!0===_))return}else{for(u=!0,g=0,f=s.data.nodes.length;g"),escape:function(e){return u.vakata.html.div.text(e).html()},strip:function(e){return u.vakata.html.div.empty().append(u.parseHTML(e)).text()}}),target:!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,is_touch:!1},u.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(e,t,r){r===E&&(r=u.vakata.dnd._get()),r.event=t,u(y).triggerHandler("dnd_"+e+".vakata",r)},_get:function(){return{data:g.data,element:g.element,helper:g.helper}},_clean:function(){g.helper&&g.helper.remove(),g.scroll_i&&(clearInterval(g.scroll_i),g.scroll_i=!1),g={element:!1,target:!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,is_touch:!1},u(y).off("mousemove.vakata.jstree touchmove.vakata.jstree",u.vakata.dnd.drag),u(y).off("mouseup.vakata.jstree touchend.vakata.jstree",u.vakata.dnd.stop)},_scroll:function(e){if(!g.scroll_e||!g.scroll_l&&!g.scroll_t)return g.scroll_i&&(clearInterval(g.scroll_i),g.scroll_i=!1),!1;if(!g.scroll_i)return g.scroll_i=setInterval(u.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var t=g.scroll_e.scrollTop(),r=g.scroll_e.scrollLeft();g.scroll_e.scrollTop(t+g.scroll_t*u.vakata.dnd.settings.scroll_speed),g.scroll_e.scrollLeft(r+g.scroll_l*u.vakata.dnd.settings.scroll_speed),t===g.scroll_e.scrollTop()&&r===g.scroll_e.scrollLeft()||u.vakata.dnd._trigger("scroll",g.scroll_e)},start:function(e,t,r){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=y.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),g.is_drag&&u.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(e){}return g.init_x=e.pageX,g.init_y=e.pageY,g.data=t,g.is_down=!0,g.element=e.currentTarget,g.target=e.target,g.is_touch="touchstart"===e.type,!1!==r&&(g.helper=u("").html(r).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),u(y).on("mousemove.vakata.jstree touchmove.vakata.jstree",u.vakata.dnd.drag),u(y).on("mouseup.vakata.jstree touchend.vakata.jstree",u.vakata.dnd.stop),!1},drag:function(r){if("touchmove"===r.type&&r.originalEvent&&r.originalEvent.changedTouches&&r.originalEvent.changedTouches[0]&&(r.pageX=r.originalEvent.changedTouches[0].pageX,r.pageY=r.originalEvent.changedTouches[0].pageY,r.target=y.elementFromPoint(r.originalEvent.changedTouches[0].pageX-window.pageXOffset,r.originalEvent.changedTouches[0].pageY-window.pageYOffset)),g.is_down){if(!g.is_drag){if(!(Math.abs(r.pageX-g.init_x)>(g.is_touch?u.vakata.dnd.settings.threshold_touch:u.vakata.dnd.settings.threshold)||Math.abs(r.pageY-g.init_y)>(g.is_touch?u.vakata.dnd.settings.threshold_touch:u.vakata.dnd.settings.threshold)))return;g.helper&&(g.helper.appendTo(y.body),g.helper_w=g.helper.outerWidth()),g.is_drag=!0,u(g.target).one("click.vakata",!1),u.vakata.dnd._trigger("start",r)}var e,t,i,s,a=!1,n=!1,o=!1,d=!1,c=!1,l=!1;return g.scroll_t=0,g.scroll_l=0,g.scroll_e=!1,u(u(r.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(u(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var e=u(this),t=e.offset();return this.scrollHeight>this.offsetHeight&&(t.top+e.height()-r.pageYthis.offsetWidth&&(t.left+e.width()-r.pageXd&&(l=d-(g.helper_w+2)),g.helper.css({left:l+"px",top:c+"px"})),u.vakata.dnd._trigger("move",r),!1}},stop:function(e){var t;return"touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=y.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),g.is_drag?(e.target!==g.target&&u(g.target).off("click.vakata"),u.vakata.dnd._trigger("stop",e)):"touchend"===e.type&&e.target===g.target&&(t=setTimeout(function(){u(e.target).click()},100),u(e.target).one("click",function(){t&&clearTimeout(t)})),u.vakata.dnd._clean(),!1}},S.jstree.defaults.massload=null,S.jstree.plugins.massload=function(e,l){this.init=function(e,t){this._data.massload={},l.init.call(this,e,t)},this._load_nodes=function(a,n,o,d){var e,t,c,r=this.settings.massload,i=(JSON.stringify(a),[]),s=this._model.data;if(!o){for(e=0,t=a.length;eh)break;a=d}return{isMatch:0<=_,score:g}},!0===e?{search:t}:t(e)},_.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1},S.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1};var i=!(S.jstree.plugins.sort=function(e,t){this.bind=function(){t.bind.call(this),this.element.on("model.jstree",S.proxy(function(e,t){this.sort(t.parent,!0)},this)).on("rename_node.jstree create_node.jstree",S.proxy(function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",S.proxy(function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)},this))},this.sort=function(e,t){var r,i;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(S.proxy(this.settings.sort,this)),t))for(r=0,i=e.children_d.length;rr.ttl)&&(r&&r.state&&(r=r.state),r&&S.isFunction(this.settings.state.filter)&&(r=this.settings.state.filter.call(this,r)),!!r&&(this.settings.state.preserve_loaded||delete r.core.loaded,this.element.one("set_state.jstree",function(e,t){t.instance.trigger("restore_state",{state:S.extend(!0,{},r)})}),this.set_state(r),!0))},this.clear_state=function(){return S.vakata.storage.del(this.settings.state.key)}},S.vakata.storage={set:function(e,t){return window.localStorage.setItem(e,t)},get:function(e){return window.localStorage.getItem(e)},del:function(e){return window.localStorage.removeItem(e)}},S.jstree.defaults.types={default:{}},S.jstree.defaults.types[S.jstree.root]={},S.jstree.plugins.types=function(e,l){this.init=function(e,t){var r,i;if(t&&t.types&&t.types.default)for(r in t.types)if("default"!==r&&r!==S.jstree.root&&t.types.hasOwnProperty(r))for(i in t.types.default)t.types.default.hasOwnProperty(i)&&t.types[r][i]===E&&(t.types[r][i]=t.types.default[i]);l.init.call(this,e,t),this._model.data[S.jstree.root].type=S.jstree.root},this.refresh=function(e,t){l.refresh.call(this,e,t),this._model.data[S.jstree.root].type=S.jstree.root},this.bind=function(){this.element.on("model.jstree",S.proxy(function(e,t){for(var r,i=this._model.data,s=t.nodes,a=this.settings.types,n="default",o=0,d=s.length;o .jstree-ocl",S.proxy(function(e){e.stopImmediatePropagation();var t=S.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});S(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",S.proxy(function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",S.proxy(function(e){this.dehover_node(e.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),a.teardown.call(this)},this.redraw_node=function(e,t,r,i){var s;return(e=a.redraw_node.apply(this,arguments))&&(s=h.cloneNode(!0),-1!==S.inArray(e.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(s.className+=" jstree-wholerow-hovered"),e.insertBefore(s,e.childNodes[0])),e}},window.customElements&&Object&&Object.create){var t=Object.create(HTMLElement.prototype);t.createdCallback=function(){var e,t={core:{},plugins:[]};for(e in S.jstree.plugins)S.jstree.plugins.hasOwnProperty(e)&&this.attributes[e]&&(t.plugins.push(e),this.getAttribute(e)&&JSON.parse(this.getAttribute(e))&&(t[e]=JSON.parse(this.getAttribute(e))));for(e in S.jstree.defaults.core)S.jstree.defaults.core.hasOwnProperty(e)&&this.attributes[e]&&(t.core[e]=JSON.parse(this.getAttribute(e))||this.getAttribute(e));S(this).jstree(t)};try{window.customElements.define("vakata-jstree",function(){},{prototype:t})}catch(e){}}}var _,u,g,f,p,m});