FIX Inserting a 'Download a file' without selecting an image

In the html editor, when inserting a 'Download a file' link without selecting a file to link to, no link should be inserted. Currently is inserting a link to an undefined file id: [file_link,id=undefined]
This commit is contained in:
Mike Cochrane 2016-03-09 21:52:38 +13:00 committed by Daniel Hensby
parent 02a87796ff
commit 3673a5e141
4 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
require=function e(t,i,n){function s(r,o){if(!i[r]){if(!t[r]){var l="function"==typeof require&&require;if(!o&&l)return l(r,!0);if(a)return a(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[r]={exports:{}};t[r][0].call(c.exports,function(e){var i=t[r][1][e];return s(i?i:e)},c,c.exports,e,t,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)s(n[r]);return s}({1:[function(e,t,i){"use strict";e("../../../../thirdparty/jquery/jquery.js"),e("../../../../thirdparty/jquery-ondemand/jquery.ondemand.js"),e("../../src/sspath.js"),e("../../../../thirdparty/jquery-ui/jquery-ui.js"),e("../../../../thirdparty/json-js/json2.js"),e("../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),e("../../../../thirdparty/jquery-cookie/jquery.cookie.js"),e("../../../../thirdparty/jquery-query/jquery.query.js"),e("../../../../thirdparty/jquery-form/jquery.form.js"),e("../../../thirdparty/jquery-notice/jquery.notice.js"),e("../../../thirdparty/jsizes/lib/jquery.sizes.js"),e("../../../thirdparty/jlayout/lib/jlayout.border.js"),e("../../../thirdparty/jlayout/lib/jquery.jlayout.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.html4.js"),e("../../../../thirdparty/jstree/jquery.jstree.js"),e("../../../thirdparty/chosen/chosen/chosen.jquery.js"),e("../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js"),e("../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js"),e("../../../../javascript/src/TreeDropdownField.js"),e("../../../../javascript/src/DateField.js"),e("../../../../javascript/src/HtmlEditorField.js"),e("../../../../javascript/src/TabSet.js"),e("../../src/ssui.core.js"),e("../../../../javascript/src/GridField.js")},{"../../../../javascript/src/DateField.js":13,"../../../../javascript/src/GridField.js":14,"../../../../javascript/src/HtmlEditorField.js":15,"../../../../javascript/src/TabSet.js":16,"../../../../javascript/src/TreeDropdownField.js":17,"../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js":18,"../../../../thirdparty/jquery-cookie/jquery.cookie.js":19,"../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js":20,"../../../../thirdparty/jquery-form/jquery.form.js":21,"../../../../thirdparty/jquery-ondemand/jquery.ondemand.js":22,"../../../../thirdparty/jquery-query/jquery.query.js":23,"../../../../thirdparty/jquery-ui/jquery-ui.js":24,"../../../../thirdparty/jquery/jquery.js":25,"../../../../thirdparty/json-js/json2.js":26,"../../../../thirdparty/jstree/jquery.jstree.js":27,"../../../thirdparty/chosen/chosen/chosen.jquery.js":4,"../../../thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js":5,"../../../thirdparty/history-js/scripts/uncompressed/history.html4.js":6,"../../../thirdparty/history-js/scripts/uncompressed/history.js":7,"../../../thirdparty/jlayout/lib/jlayout.border.js":8,"../../../thirdparty/jlayout/lib/jquery.jlayout.js":9,"../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js":10,"../../../thirdparty/jquery-notice/jquery.notice.js":11,"../../../thirdparty/jsizes/lib/jquery.sizes.js":12,"../../src/sspath.js":2,"../../src/ssui.core.js":3}],2:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=n(s),r=((0,a["default"])(window),(0,a["default"])("html"),(0,a["default"])("head"),{urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(e){if("object"===a["default"].type(e))return e;var t=r.urlParseRE.exec(e||"")||[];return{href:t[0]||"",hrefNoHash:t[1]||"",hrefNoSearch:t[2]||"",domain:t[3]||"",protocol:t[4]||"",doubleSlash:t[5]||"",authority:t[6]||"",username:t[8]||"",password:t[9]||"",host:t[10]||"",hostname:t[11]||"",port:t[12]||"",pathname:t[13]||"",directory:t[14]||"",filename:t[15]||"",search:t[16]||"",hash:t[17]||""}},makePathAbsolute:function(e,t){if(e&&"/"===e.charAt(0))return e;e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";for(var i=t?t.split("/"):[],n=e.split("/"),s=0;s<n.length;s++){var a=n[s];switch(a){case".":break;case"..":i.length&&i.pop();break;default:i.push(a)}}return"/"+i.join("/")},isSameDomain:function(e,t){return r.parseUrl(e).domain===r.parseUrl(t).domain},isRelativeUrl:function(e){return""===r.parseUrl(e).protocol},isAbsoluteUrl:function(e){return""!==r.parseUrl(e).protocol},makeUrlAbsolute:function(e,t){if(!r.isRelativeUrl(e))return e;var i=r.parseUrl(e),n=r.parseUrl(t),s=i.protocol||n.protocol,a=i.protocol?i.doubleSlash:i.doubleSlash||n.doubleSlash,o=i.authority||n.authority,l=""!==i.pathname,h=r.makePathAbsolute(i.pathname||n.filename,n.pathname),c=i.search||!l&&n.search||"",d=i.hash;return s+a+o+h+c+d},addSearchParams:function(e,t){var i=r.parseUrl(e),t="string"==typeof t?r.convertSearchToArray(t):t,n=a["default"].extend(r.convertSearchToArray(i.search),t);return i.hrefNoSearch+"?"+a["default"].param(n)+(i.hash||"")},getSearchParams:function(e){var t=r.parseUrl(e);return r.convertSearchToArray(t.search)},convertSearchToArray:function(e){var t,i,n={},e=e.replace(/^\?/,""),s=e?e.split("&"):[];for(t=0;t<s.length;t++)i=s[t].split("="),n[i[0]]=i[1];return n},convertUrlToDataUrl:function(e){var t=r.parseUrl(e);return r.isEmbeddedPage(t)?t.hash.split(dialogHashKey)[0].replace(/^#/,""):r.isSameDomain(t,document)?t.hrefNoHash.replace(document.domain,""):e},get:function(e){return void 0===e&&(e=location.hash),r.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(e){var t="&"+a["default"].mobile.subPageUrlKey;return e&&e.split(t)[0].split(dialogHashKey)[0]},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(document.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},cleanHash:function(e){return r.stripHash(e.replace(/\?.*$/,"").replace(dialogHashKey,""))},isExternal:function(e){var t=r.parseUrl(e);return!(!t.protocol||t.domain===document.domain)},hasProtocol:function(e){return/^(:?\w+:)/.test(e)}});a["default"].path=r},{jQuery:"jQuery"}],3:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=n(s);a["default"].widget("ssui.button",a["default"].ui.button,{options:{alternate:{icon:null,text:null},showingAlternate:!1},toggleAlternate:function(){this._trigger("ontogglealternate")!==!1&&(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate=!this.options.showingAlternate,this.refresh())},_refreshAlternate:function(){this._trigger("beforerefreshalternate"),(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate?(this.element.find(".ui-button-icon-primary").hide(),this.element.find(".ui-button-text").hide(),this.element.find(".ui-button-icon-alternate").show(),this.element.find(".ui-button-text-alternate").show()):(this.element.find(".ui-button-icon-primary").show(),this.element.find(".ui-button-text").show(),this.element.find(".ui-button-icon-alternate").hide(),this.element.find(".ui-button-text-alternate").hide()),this._trigger("afterrefreshalternate"))},_resetButton:function(){var e=this.element.data("icon-primary"),t=this.element.data("icon-secondary");e||(e=this.element.data("icon")),e&&(this.options.icons.primary="btn-icon-"+e),t&&(this.options.icons.secondary="btn-icon-"+t),a["default"].ui.button.prototype._resetButton.call(this),this.options.alternate.text||(this.options.alternate.text=this.element.data("text-alternate")),this.options.alternate.icon||(this.options.alternate.icon=this.element.data("icon-alternate")),this.options.showingAlternate||(this.options.showingAlternate=this.element.hasClass("ss-ui-alternate")),this.options.alternate.icon&&this.buttonElement.append("<span class='ui-button-icon-alternate ui-button-icon-primary ui-icon btn-icon-"+this.options.alternate.icon+"'></span>"),this.options.alternate.text&&this.buttonElement.append("<span class='ui-button-text-alternate ui-button-text'>"+this.options.alternate.text+"</span>"),this._refreshAlternate()},refresh:function(){a["default"].ui.button.prototype.refresh.call(this),this._refreshAlternate()},destroy:function(){this.element.find(".ui-button-text-alternate").remove(),this.element.find(".ui-button-icon-alternate").remove(),a["default"].ui.button.prototype.destroy.call(this)}}),a["default"].widget("ssui.ssdialog",a["default"].ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function(){a["default"].ui.dialog.prototype._create.call(this);var e=this,t=(0,a["default"])('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>');t.bind("load",function(i){"about:blank"!=(0,a["default"])(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){a["default"].ui.dialog.prototype.open.call(this);var e=this,t=this.element.children("iframe");!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,a["default"])(window).bind("resize.ssdialog",function(){e._resizeIframe()})},close:function(){a["default"].ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,a["default"])(window).unbind("resize.ssdialog")},_resizeIframe:function(){var e,t,i={},n=this.element.children("iframe");this.options.widthRatio&&(e=(0,a["default"])(window).width()*this.options.widthRatio,this.options.minWidth&&e<this.options.minWidth?i.width=this.options.minWidth:this.options.maxWidth&&e>this.options.maxWidth?i.width=this.options.maxWidth:i.width=e),this.options.heightRatio&&(t=(0,a["default"])(window).height()*this.options.heightRatio,this.options.minHeight&&t<this.options.minHeight?i.height=this.options.minHeight:this.options.maxHeight&&t>this.options.maxHeight?i.height=this.options.maxHeight:i.height=t),jQuery.isEmptyObject(i)||(this._setOptions(i),n.attr("width",i.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),n.attr("height",i.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),a["default"].widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var e=this.options,t=e.title||this.originalTitle||"&nbsp;",i=a["default"].ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var n=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var s=(0,a["default"])('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){s.addClass("ui-state-hover")},function(){s.removeClass("ui-state-hover")}).focus(function(){s.addClass("ui-state-focus")}).blur(function(){s.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(n);(this.uiDialogTitlebarCloseText=(0,a["default"])("<span/>")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(s)}(0,a["default"])("<span/>").addClass("ui-dialog-title").attr("id",i).html(t).prependTo(n);n.find("*").add(n).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),a["default"].extend(a["default"].ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)}})},{jQuery:"jQuery"}],4:[function(e,t,i){(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.name="SelectParser",e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,i,n,s,a,r;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),a=e.childNodes,r=[],n=0,s=a.length;s>n;n++)i=a[n],r.push(this.add_option(i,t,e.disabled));return r},e.prototype.add_option=function(e,t,i){return"OPTION"===e.nodeName.toUpperCase()?(e.text.match(/^\s*$/g)?this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}):(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:i===!0?i:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})),this.options_index+=1):void 0},e}(),e.select_to_array=function(t){var i,n,s,a,r;for(n=new e,r=t.childNodes,s=0,a=r.length;a>s;s++)i=r[s],n.add_node(i);return n.parsed},this.SelectParser=e}).call(window),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=null!=t?t:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.set_default_text(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.name="AbstractChosen",e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&this.form_field.options[0].text.match(/^\s*$/g)?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||1/0},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return t.blur_test()},100))},e.prototype.result_add_option=function(e){var t,i;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),i=""!==e.style.cssText?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+i+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,i;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=Math.floor(Math.random()*e.length),t=e.substring(i,i+1)},e}(),t.AbstractChosen=e}.call(window),function(){var e,t,i,n,s={}.hasOwnProperty,a=function(e,t){function i(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};n=this,e=jQuery,e.fn.extend({chosen:function(i){return e.browser.msie&&("6.0"===e.browser.version||"7.0"===e.browser.version&&7===document.documentMode)?this:this.each(function(n){var s;return s=e(this),s.hasClass("chzn-done")?void 0:s.data("chosen",new t(this,i))})}}),t=function(t){function s(){return s.__super__.constructor.apply(this,arguments)}return a(s,t),s.prototype.name="Chosen",s.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},s.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},s.prototype.set_up_html=function(){var t,n,s,a,r;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,t=e("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+(this.options.width||this.f_width)+"px;"}),this.is_multiple?t.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):t.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(t),this.container=e("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),a=this.rise_up(this.container,this.dropdown),n=a?-this.container.find(".chzn-drop").height():this.container.height(),s=this.container.width()-i(this.dropdown),this.dropdown.css({width:s+"px",top:n+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),r=s-i(this.search_container)-i(this.search_field),this.search_field.css({width:r+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},s.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){return e.container_mousedown(t)}),this.container.mouseup(function(t){return e.container_mouseup(t)}),this.container.mouseenter(function(t){return e.mouse_enter(t)}),this.container.mouseleave(function(t){return e.mouse_leave(t)}),this.search_results.mouseup(function(t){return e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){return e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){return e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){return e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){return e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){return e.container_mousedown(t)}),this.search_field.blur(function(t){return e.input_blur(t)}),this.search_field.keyup(function(t){return e.keyup_checker(t)}),this.search_field.keydown(function(t){return e.keydown_checker(t)}),this.search_field.focus(function(t){return e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){return e.choices_click(t)}):this.container.click(function(e){return e.preventDefault()})},s.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field()):(this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus",this.activate_action))},s.prototype.container_mousedown=function(t){var i;return this.is_disabled?void 0:(i=null!=t?e(t.target).hasClass("search-choice-close"):!1,t&&"mousedown"===t.type&&!this.results_showing&&t.stopPropagation(),this.pending_destroy_click||i?this.pending_destroy_click=!1:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chzn-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()))},s.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},s.prototype.blur_test=function(e){return!this.active_field&&this.container.hasClass("chzn-container-active")?this.close_field():void 0},s.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},s.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},s.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},s.prototype.results_build=function(){var e,t,i,s,a;for(this.parsing=!0,this.results_data=n.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",a=this.results_data,i=0,s=a.length;s>i;i++)t=a[i],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},s.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},s.prototype.result_do_highlight=function(e){var t,i,n,s,a;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),n=parseInt(this.search_results.css("maxHeight"),10),a=this.search_results.scrollTop(),s=n+a,i=this.result_highlight.position().top+this.search_results.scrollTop(),t=i+this.result_highlight.outerHeight(),t>=s)return this.search_results.scrollTop(t-n>0?t-n:0);if(a>i)return this.search_results.scrollTop(i)}},s.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},s.prototype.results_show=function(){var e,t,n;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),t=this.container.width()-i(this.dropdown),n=this.rise_up(this.container,this.dropdown),e=n?-this.container.find(".chzn-drop").height():this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.css("width",t-i(this.search_container)-i(this.search_field)+"px"),this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},s.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},s.prototype.set_tab_index=function(e){var t;return this.form_field_jq.attr("tabindex")?(t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)):void 0},s.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},s.prototype.search_results_mouseup=function(t){var i;return i=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),i.length?(this.result_highlight=i,this.result_select(t),this.search_field.focus()):void 0},s.prototype.search_results_mouseover=function(t){var i;return i=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),i?this.result_do_highlight(i):void 0},s.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},s.prototype.choices_click=function(t){return t.preventDefault(),!this.active_field||e(t.target).hasClass("search-choice")||this.results_showing?void 0:this.results_show()},s.prototype.choice_build=function(t){var i,n,s,a=this;return i=this.container_id+"_c_"+t.array_index,this.choices+=1,n=t.disabled?'<li class="search-choice search-choice-disabled" id="'+i+'"><span>'+t.html+"</span></li>":'<li class="search-choice" id="'+i+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(n),s=e("#"+i).find("a").first(),s.click(function(e){return a.choice_destroy_link_click(e)})},s.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},s.prototype.choice_destroy=function(e){return this.result_deselect(e.attr("rel"))?(this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove()):void 0},s.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},s.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},s.prototype.result_select=function(e){var t,i,n,s;return this.result_highlight?(t=this.result_highlight,i=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),s=i.substr(i.lastIndexOf("_")+1),n=this.results_data[s],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.is_multiple?this.choice_build(n):(this.selected_item.find("span").first().text(n.text),this.allow_single_deselect&&this.single_deselect_control_build()),e.metaKey&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()):void 0},s.prototype.result_activate=function(e){return e.addClass("active-result")},s.prototype.result_deactivate=function(e){return e.removeClass("active-result")},s.prototype.result_deselect=function(t){var i,n;return n=this.results_data[t],this.form_field.options[n.options_index].disabled?!1:(n.selected=!1,this.form_field.options[n.options_index].selected=!1,i=e("#"+this.container_id+"_o_"+t),i.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[n.options_index].value}),this.search_field_scale(),!0)},s.prototype.single_deselect_control_build=function(){return this.allow_single_deselect&&this.selected_item.find("abbr").length<1?this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'):void 0},s.prototype.winnow_results=function(){var t,i,n,s,a,r,o,l,h,c,d,u,p,f,g,m,v,_;for(this.no_results_clear(),h=0,c=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),r=this.search_contains?"":"^",a=new RegExp(r+c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),_=this.results_data,f=0,m=_.length;m>f;f++)if(i=_[f],!i.disabled&&!i.empty)if(i.group)e("#"+i.dom_id).css("display","none");else if(!this.is_multiple||!i.selected){if(t=!1,l=i.dom_id,o=e("#"+l),a.test(i.html))t=!0,h+=1;else if((i.html.indexOf(" ")>=0||0===i.html.indexOf("["))&&(s=i.html.replace(/\[|\]/g,"").split(" "),s.length))for(g=0,v=s.length;v>g;g++)n=s[g],a.test(n)&&(t=!0,h+=1);t?(c.length?(d=i.html.search(p),u=i.html.substr(0,d+c.length)+"</em>"+i.html.substr(d+c.length),u=u.substr(0,d)+"<em>"+u.substr(d)):u=i.html,o.html(u),this.result_activate(o),null!=i.group_array_index&&e("#"+this.results_data[i.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&l===this.result_highlight.attr("id")&&this.result_clear_highlight(),
this.result_deactivate(o))}return 1>h&&c.length?this.no_results(c):this.winnow_results_set_highlight()},s.prototype.winnow_results_clear=function(){var t,i,n,s,a;for(this.search_field.val(""),i=this.search_results.find("li"),a=[],n=0,s=i.length;s>n;n++)t=i[n],t=e(t),t.hasClass("group-result")?a.push(t.css("display","auto")):this.is_multiple&&t.hasClass("result-selected")?a.push(void 0):a.push(this.result_activate(t));return a},s.prototype.winnow_results_set_highlight=function(){var e,t;return this.result_highlight||(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first(),null==e)?void 0:this.result_do_highlight(e)},s.prototype.no_results=function(t){var i;return i=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),i.find("span").first().html(t),this.search_results.append(i)},s.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},s.prototype.keydown_arrow=function(){var t,i;return this.result_highlight?this.results_showing&&(i=this.result_highlight.nextAll("li.active-result").first(),i&&this.result_do_highlight(i)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t))),this.results_showing?void 0:this.results_show()},s.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},s.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},s.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},s.prototype.keydown_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},s.prototype.search_field_scale=function(){var t,i,n,s,a,r,o,l,h,c;if(this.is_multiple){for(n=0,l=0,r="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],h=0,c=o.length;c>h;h++)a=o[h],r+=a+":"+this.search_field.css(a)+";";return i=e("<div />",{style:r}),i.text(this.search_field.val()),e("body").append(i),l=i.width()+25,i.remove(),l>this.f_width-10&&(l=this.f_width-10),this.search_field.css({width:l+"px"}),s=this.rise_up(this.container,this.dropdown),t=s?-this.container.find(".chzn-drop").height():this.container.height(),this.dropdown.css({top:t+"px"})}},s.prototype.generate_random_id=function(){var t;for(t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();e("#"+t).length>0;)t+=this.generate_random_char();return t},s.prototype.rise_up=function(t,i){var n,s,a,r;return r=t.find("a.chzn-single"),r.length>0?(a=e(window).height()+e(document).scrollTop()-t.find("a").innerHeight(),s=r.offset().top,n=i.innerHeight(),s+n>a&&s-n>0?(t.addClass("chzn-with-rise"),!0):(t.removeClass("chzn-with-rise"),!1)):!1},s}(AbstractChosen),i=function(e){var t;return t=e.outerWidth()-e.width()},n.get_side_border_padding=i}.call(window)},{}],5:[function(e,t,i){!function(e,t){"use strict";var i=e.History=e.History||{},n=e.jQuery;if("undefined"!=typeof i.Adapter)throw new Error("History.js Adapter has already been loaded...");i.Adapter={bind:function(e,t,i){n(e).bind(t,i)},trigger:function(e,t,i){n(e).trigger(t,i)},extractEventData:function(e,i,n){var s=i&&i.originalEvent&&i.originalEvent[e]||n&&n[e]||t;return s},onDomLoad:function(e){n(e)}},"undefined"!=typeof i.init&&i.init()}(window)},{}],6:[function(e,t,i){!function(e,t){"use strict";var i=e.document,n=e.setTimeout||n,s=e.clearTimeout||s,a=e.setInterval||a,r=e.History=e.History||{};if("undefined"!=typeof r.initHtml4)throw new Error("History.js HTML4 Support has already been loaded...");r.initHtml4=function(){return"undefined"!=typeof r.initHtml4.initialized?!1:(r.initHtml4.initialized=!0,r.enabled=!0,r.savedHashes=[],r.isLastHash=function(e){var t,i=r.getHashByIndex();return t=e===i},r.isHashEqual=function(e,t){return e=encodeURIComponent(e).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),e===t},r.saveHash=function(e){return r.isLastHash(e)?!1:(r.savedHashes.push(e),!0)},r.getHashByIndex=function(e){var t=null;return t="undefined"==typeof e?r.savedHashes[r.savedHashes.length-1]:0>e?r.savedHashes[r.savedHashes.length+e]:r.savedHashes[e]},r.discardedHashes={},r.discardedStates={},r.discardState=function(e,t,i){var n,s=r.getHashByState(e);return n={discardedState:e,backState:i,forwardState:t},r.discardedStates[s]=n,!0},r.discardHash=function(e,t,i){var n={discardedHash:e,backState:i,forwardState:t};return r.discardedHashes[e]=n,!0},r.discardedState=function(e){var t,i=r.getHashByState(e);return t=r.discardedStates[i]||!1},r.discardedHash=function(e){var t=r.discardedHashes[e]||!1;return t},r.recycleState=function(e){var t=r.getHashByState(e);return r.discardedState(e)&&delete r.discardedStates[t],!0},r.emulated.hashChange&&(r.hashChangeInit=function(){r.checkerFunction=null;var t,n,s,o,l="",h=Boolean(r.getHash());return r.isInternetExplorer()?(t="historyjs-iframe",n=i.createElement("iframe"),n.setAttribute("id",t),n.setAttribute("src","#"),n.style.display="none",i.body.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.close(),s="",o=!1,r.checkerFunction=function(){if(o)return!1;o=!0;var t=r.getHash(),i=r.getHash(n.contentWindow.document.location);return t!==l?(l=t,i!==t&&(s=i=t,n.contentWindow.document.open(),n.contentWindow.document.close(),n.contentWindow.document.location.hash=r.escapeHash(t)),r.Adapter.trigger(e,"hashchange")):i!==s&&(s=i,h&&""===i?r.back():r.setHash(i,!1)),o=!1,!0}):r.checkerFunction=function(){var t=r.getHash()||"";return t!==l&&(l=t,r.Adapter.trigger(e,"hashchange")),!0},r.intervalList.push(a(r.checkerFunction,r.options.hashChangeInterval)),!0},r.Adapter.onDomLoad(r.hashChangeInit)),r.emulated.pushState&&(r.onHashChange=function(t){var i,n=t&&t.newURL||r.getLocationHref(),s=r.getHashByUrl(n),a=null,o=null;return r.isLastHash(s)?(r.busy(!1),!1):(r.doubleCheckComplete(),r.saveHash(s),s&&r.isTraditionalAnchor(s)?(r.Adapter.trigger(e,"anchorchange"),r.busy(!1),!1):(a=r.extractState(r.getFullUrl(s||r.getLocationHref()),!0),r.isLastSavedState(a)?(r.busy(!1),!1):(o=r.getHashByState(a),(i=r.discardedState(a))?(r.getHashByIndex(-2)===r.getHashByState(i.forwardState)?r.back(!1):r.forward(!1),!1):(r.pushState(a.data,a.title,encodeURI(a.url),!1),!0))))},r.Adapter.bind(e,"hashchange",r.onHashChange),r.pushState=function(t,i,n,s){if(n=encodeURI(n).replace(/%25/g,"%"),r.getHashByUrl(n))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(s!==!1&&r.busy())return r.pushQueue({scope:r,callback:r.pushState,args:arguments,queue:s}),!1;r.busy(!0);var a=r.createStateObject(t,i,n),o=r.getHashByState(a),l=r.getState(!1),h=r.getHashByState(l),c=r.getHash(),d=r.expectedStateId==a.id;return r.storeState(a),r.expectedStateId=a.id,r.recycleState(a),r.setTitle(a),o===h?(r.busy(!1),!1):(r.saveState(a),d||r.Adapter.trigger(e,"statechange"),r.isHashEqual(o,c)||r.isHashEqual(o,r.getShortUrl(r.getLocationHref()))||r.setHash(o,!1),r.busy(!1),!0)},r.replaceState=function(t,i,n,s){if(n=encodeURI(n).replace(/%25/g,"%"),r.getHashByUrl(n))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(s!==!1&&r.busy())return r.pushQueue({scope:r,callback:r.replaceState,args:arguments,queue:s}),!1;r.busy(!0);var a=r.createStateObject(t,i,n),o=r.getHashByState(a),l=r.getState(!1),h=r.getHashByState(l),c=r.getStateByIndex(-2);return r.discardState(l,a,c),o===h?(r.storeState(a),r.expectedStateId=a.id,r.recycleState(a),r.setTitle(a),r.saveState(a),r.Adapter.trigger(e,"statechange"),r.busy(!1)):r.pushState(a.data,a.title,a.url,!1),!0}),void(r.emulated.pushState&&r.getHash()&&!r.emulated.hashChange&&r.Adapter.onDomLoad(function(){r.Adapter.trigger(e,"hashchange")})))},"undefined"!=typeof r.init&&r.init()}(window)},{}],7:[function(e,t,i){!function(e,t){"use strict";var i=e.console||t,n=e.document,s=e.navigator,a=e.sessionStorage||!1,r=e.setTimeout,o=e.clearTimeout,l=e.setInterval,h=e.clearInterval,c=e.JSON,d=e.alert,u=e.History=e.History||{},p=e.history;try{a.setItem("TEST","1"),a.removeItem("TEST")}catch(f){a=!1}if(c.stringify=c.stringify||c.encode,c.parse=c.parse||c.decode,"undefined"!=typeof u.init)throw new Error("History.js Core has already been loaded...");u.init=function(e){return"undefined"==typeof u.Adapter?!1:("undefined"!=typeof u.initCore&&u.initCore(),"undefined"!=typeof u.initHtml4&&u.initHtml4(),!0)},u.initCore=function(f){if("undefined"!=typeof u.initCore.initialized)return!1;if(u.initCore.initialized=!0,u.options=u.options||{},u.options.hashChangeInterval=u.options.hashChangeInterval||100,u.options.safariPollInterval=u.options.safariPollInterval||500,u.options.doubleCheckInterval=u.options.doubleCheckInterval||500,u.options.disableSuid=u.options.disableSuid||!1,u.options.storeInterval=u.options.storeInterval||1e3,u.options.busyDelay=u.options.busyDelay||250,u.options.debug=u.options.debug||!1,u.options.initialTitle=u.options.initialTitle||n.title,u.options.html4Mode=u.options.html4Mode||!1,u.options.delayInit=u.options.delayInit||!1,u.intervalList=[],u.clearAllIntervals=function(){var e,t=u.intervalList;if("undefined"!=typeof t&&null!==t){for(e=0;e<t.length;e++)h(t[e]);u.intervalList=null}},u.debug=function(){u.options.debug&&u.log.apply(u,arguments)},u.log=function(){var e,t,s,a,r,o=!("undefined"==typeof i||"undefined"==typeof i.log||"undefined"==typeof i.log.apply),l=n.getElementById("log");for(o?(a=Array.prototype.slice.call(arguments),e=a.shift(),"undefined"!=typeof i.debug?i.debug.apply(i,[e,a]):i.log.apply(i,[e,a])):e="\n"+arguments[0]+"\n",t=1,s=arguments.length;s>t;++t){if(r=arguments[t],"object"==typeof r&&"undefined"!=typeof c)try{r=c.stringify(r)}catch(h){}e+="\n"+r+"\n"}return l?(l.value+=e+"\n-----\n",l.scrollTop=l.scrollHeight-l.clientHeight):o||d(e),!0},u.getInternetExplorerMajorVersion=function(){var e=u.getInternetExplorerMajorVersion.cached="undefined"!=typeof u.getInternetExplorerMajorVersion.cached?u.getInternetExplorerMajorVersion.cached:function(){for(var e=3,t=n.createElement("div"),i=t.getElementsByTagName("i");(t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&i[0];);return e>4?e:!1}();return e},u.isInternetExplorer=function(){var e=u.isInternetExplorer.cached="undefined"!=typeof u.isInternetExplorer.cached?u.isInternetExplorer.cached:Boolean(u.getInternetExplorerMajorVersion());return e},u.options.html4Mode?u.emulated={pushState:!0,hashChange:!0}:u.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!(/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(s.userAgent)||/AppleWebKit\/5([0-2]|3[0-2])/i.test(s.userAgent))),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in n)||u.isInternetExplorer()&&u.getInternetExplorerMajorVersion()<8)},u.enabled=!u.emulated.pushState,u.bugs={setHash:Boolean(!u.emulated.pushState&&"Apple Computer, Inc."===s.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(s.userAgent)),safariPoll:Boolean(!u.emulated.pushState&&"Apple Computer, Inc."===s.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(s.userAgent)),ieDoubleCheck:Boolean(u.isInternetExplorer()&&u.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(u.isInternetExplorer()&&u.getInternetExplorerMajorVersion()<7)},u.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},u.cloneObject=function(e){var t,i;return e?(t=c.stringify(e),i=c.parse(t)):i={},i},u.getRootUrl=function(){var e=n.location.protocol+"//"+(n.location.hostname||n.location.host);return n.location.port&&(e+=":"+n.location.port),e+="/"},u.getBaseHref=function(){var e=n.getElementsByTagName("base"),t=null,i="";return 1===e.length&&(t=e[0],i=t.href.replace(/[^\/]+$/,"")),i=i.replace(/\/+$/,""),i&&(i+="/"),i},u.getBaseUrl=function(){var e=u.getBaseHref()||u.getBasePageUrl()||u.getRootUrl();return e},u.getPageUrl=function(){var e,t=u.getState(!1,!1),i=(t||{}).url||u.getLocationHref();return e=i.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,i){return/\./.test(e)?e:e+"/"})},u.getBasePageUrl=function(){var e=u.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,i){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},u.getFullUrl=function(e,t){var i=e,n=e.substring(0,1);return t="undefined"==typeof t?!0:t,/[a-z]+\:\/\//.test(e)||(i="/"===n?u.getRootUrl()+e.replace(/^\/+/,""):"#"===n?u.getPageUrl().replace(/#.*/,"")+e:"?"===n?u.getPageUrl().replace(/[\?#].*/,"")+e:t?u.getBaseUrl()+e.replace(/^(\.\/)+/,""):u.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),i.replace(/\#$/,"")},u.getShortUrl=function(e){var t=e,i=u.getBaseUrl(),n=u.getRootUrl();return u.emulated.pushState&&(t=t.replace(i,"")),t=t.replace(n,"/"),u.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},u.getLocationHref=function(e){return e=e||n,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:-1==e.URL.indexOf("#")&&-1!=e.location.href.indexOf("#")?e.location.href:e.URL||e.location.href},u.store={},u.idToState=u.idToState||{},u.stateToId=u.stateToId||{},u.urlToId=u.urlToId||{},u.storedStates=u.storedStates||[],u.savedStates=u.savedStates||[],u.normalizeStore=function(){u.store.idToState=u.store.idToState||{},u.store.urlToId=u.store.urlToId||{},u.store.stateToId=u.store.stateToId||{}},u.getState=function(e,t){"undefined"==typeof e&&(e=!0),"undefined"==typeof t&&(t=!0);var i=u.getLastSavedState();return!i&&t&&(i=u.createStateObject()),e&&(i=u.cloneObject(i),i.url=i.cleanUrl||i.url),i},u.getIdByState=function(e){var t,i=u.extractId(e.url);if(!i)if(t=u.getStateString(e),"undefined"!=typeof u.stateToId[t])i=u.stateToId[t];else if("undefined"!=typeof u.store.stateToId[t])i=u.store.stateToId[t];else{for(;;)if(i=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),"undefined"==typeof u.idToState[i]&&"undefined"==typeof u.store.idToState[i])break;u.stateToId[t]=i,u.idToState[i]=e}return i},u.normalizeState=function(e){var t,i;return e&&"object"==typeof e||(e={}),"undefined"!=typeof e.normalized?e:(e.data&&"object"==typeof e.data||(e.data={}),t={},t.normalized=!0,t.title=e.title||"",t.url=u.getFullUrl(e.url?decodeURIComponent(e.url):u.getLocationHref()),t.hash=u.getShortUrl(t.url),t.data=u.cloneObject(e.data),t.id=u.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,i=!u.isEmptyObject(t.data),(t.title||i)&&u.options.disableSuid!==!0&&(t.hash=u.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=u.getFullUrl(t.hash),(u.emulated.pushState||u.bugs.safariPoll)&&u.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t)},u.createStateObject=function(e,t,i){var n={data:e,title:t,url:i};return n=u.normalizeState(n)},u.getStateById=function(e){e=String(e);var i=u.idToState[e]||u.store.idToState[e]||t;return i},u.getStateString=function(e){var t,i,n;return t=u.normalizeState(e),i={data:t.data,title:e.title,url:e.url},n=c.stringify(i)},u.getStateId=function(e){var t,i;return t=u.normalizeState(e),i=t.id},u.getHashByState=function(e){var t,i;return t=u.normalizeState(e),i=t.hash},u.extractId=function(e){var t,i,n,s;return s=-1!=e.indexOf("#")?e.split("#")[0]:e,i=/(.*)\&_suid=([0-9]+)$/.exec(s),n=i?i[1]||e:e,t=i?String(i[2]||""):"",t||!1},u.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},u.extractState=function(e,t){var i,n,s=null;return t=t||!1,i=u.extractId(e),i&&(s=u.getStateById(i)),s||(n=u.getFullUrl(e),i=u.getIdByUrl(n)||!1,i&&(s=u.getStateById(i)),s||!t||u.isTraditionalAnchor(e)||(s=u.createStateObject(null,null,n))),s},u.getIdByUrl=function(e){var i=u.urlToId[e]||u.store.urlToId[e]||t;return i},u.getLastSavedState=function(){return u.savedStates[u.savedStates.length-1]||t},u.getLastStoredState=function(){return u.storedStates[u.storedStates.length-1]||t},u.hasUrlDuplicate=function(e){var t,i=!1;return t=u.extractState(e.url),i=t&&t.id!==e.id},u.storeState=function(e){return u.urlToId[e.url]=e.id,u.storedStates.push(u.cloneObject(e)),e},u.isLastSavedState=function(e){var t,i,n,s=!1;return u.savedStates.length&&(t=e.id,i=u.getLastSavedState(),n=i.id,s=t===n),s},u.saveState=function(e){return u.isLastSavedState(e)?!1:(u.savedStates.push(u.cloneObject(e)),!0)},u.getStateByIndex=function(e){var t=null;return t="undefined"==typeof e?u.savedStates[u.savedStates.length-1]:0>e?u.savedStates[u.savedStates.length+e]:u.savedStates[e]},u.getCurrentIndex=function(){var e=null;return e=u.savedStates.length<1?0:u.savedStates.length-1},u.getHash=function(e){var t,i=u.getLocationHref(e);return t=u.getHashByUrl(i)},u.unescapeHash=function(e){var t=u.normalizeHash(e);return t=decodeURIComponent(t)},u.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},u.setHash=function(e,t){var i,s;return t!==!1&&u.busy()?(u.pushQueue({scope:u,callback:u.setHash,args:arguments,queue:t}),!1):(u.busy(!0),i=u.extractState(e,!0),i&&!u.emulated.pushState?u.pushState(i.data,i.title,i.url,!1):u.getHash()!==e&&(u.bugs.setHash?(s=u.getPageUrl(),u.pushState(null,null,s+"#"+e,!1)):n.location.hash=e),u)},u.escapeHash=function(t){var i=u.normalizeHash(t);return i=e.encodeURIComponent(i),u.bugs.hashEscape||(i=i.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),i},u.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=u.unescapeHash(t)},u.setTitle=function(e){var t,i=e.title;i||(t=u.getStateByIndex(0),t&&t.url===e.url&&(i=t.title||u.options.initialTitle));try{n.getElementsByTagName("title")[0].innerHTML=i.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(s){}return n.title=i,u},u.queues=[],u.busy=function(e){if("undefined"!=typeof e?u.busy.flag=e:"undefined"==typeof u.busy.flag&&(u.busy.flag=!1),!u.busy.flag){o(u.busy.timeout);var t=function(){var e,i,n;if(!u.busy.flag)for(e=u.queues.length-1;e>=0;--e)i=u.queues[e],0!==i.length&&(n=i.shift(),u.fireQueueItem(n),u.busy.timeout=r(t,u.options.busyDelay))};u.busy.timeout=r(t,u.options.busyDelay)}return u.busy.flag},u.busy.flag=!1,u.fireQueueItem=function(e){return e.callback.apply(e.scope||u,e.args||[])},u.pushQueue=function(e){return u.queues[e.queue||0]=u.queues[e.queue||0]||[],u.queues[e.queue||0].push(e),u},u.queue=function(e,t){return"function"==typeof e&&(e={callback:e}),"undefined"!=typeof t&&(e.queue=t),u.busy()?u.pushQueue(e):u.fireQueueItem(e),u},u.clearQueue=function(){return u.busy.flag=!1,u.queues=[],u},u.stateChanged=!1,u.doubleChecker=!1,u.doubleCheckComplete=function(){return u.stateChanged=!0,u.doubleCheckClear(),u},u.doubleCheckClear=function(){return u.doubleChecker&&(o(u.doubleChecker),u.doubleChecker=!1),u},u.doubleCheck=function(e){return u.stateChanged=!1,u.doubleCheckClear(),u.bugs.ieDoubleCheck&&(u.doubleChecker=r(function(){return u.doubleCheckClear(),u.stateChanged||e(),!0},u.options.doubleCheckInterval)),u},u.safariStatePoll=function(){var t,i=u.extractState(u.getLocationHref());if(!u.isLastSavedState(i))return t=i,t||(t=u.createStateObject()),u.Adapter.trigger(e,"popstate"),u},u.back=function(e){return e!==!1&&u.busy()?(u.pushQueue({scope:u,callback:u.back,args:arguments,queue:e}),!1):(u.busy(!0),u.doubleCheck(function(){u.back(!1)}),p.go(-1),!0)},u.forward=function(e){return e!==!1&&u.busy()?(u.pushQueue({scope:u,callback:u.forward,args:arguments,queue:e}),!1):(u.busy(!0),u.doubleCheck(function(){u.forward(!1)}),p.go(1),!0)},u.go=function(e,t){var i;if(e>0)for(i=1;e>=i;++i)u.forward(t);else{if(!(0>e))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(i=-1;i>=e;--i)u.back(t)}return u},u.emulated.pushState){var g=function(){};u.pushState=u.pushState||g,u.replaceState=u.replaceState||g}else u.onPopState=function(t,i){var n,s,a=!1,r=!1;return u.doubleCheckComplete(),(n=u.getHash())?(s=u.extractState(n||u.getLocationHref(),!0),s?u.replaceState(s.data,s.title,s.url,!1):(u.Adapter.trigger(e,"anchorchange"),u.busy(!1)),u.expectedStateId=!1,!1):(a=u.Adapter.extractEventData("state",t,i)||!1,r=a?u.getStateById(a):u.expectedStateId?u.getStateById(u.expectedStateId):u.extractState(u.getLocationHref()),r||(r=u.createStateObject(null,null,u.getLocationHref())),u.expectedStateId=!1,u.isLastSavedState(r)?(u.busy(!1),!1):(u.storeState(r),u.saveState(r),u.setTitle(r),u.Adapter.trigger(e,"statechange"),u.busy(!1),!0))},u.Adapter.bind(e,"popstate",u.onPopState),u.pushState=function(t,i,n,s){if(u.getHashByUrl(n)&&u.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&u.busy())return u.pushQueue({scope:u,callback:u.pushState,args:arguments,queue:s}),!1;u.busy(!0);var a=u.createStateObject(t,i,n);return u.isLastSavedState(a)?u.busy(!1):(u.storeState(a),u.expectedStateId=a.id,p.pushState(a.id,a.title,a.url),u.Adapter.trigger(e,"popstate")),!0},u.replaceState=function(t,i,n,s){if(u.getHashByUrl(n)&&u.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&u.busy())return u.pushQueue({scope:u,callback:u.replaceState,args:arguments,queue:s}),!1;u.busy(!0);var a=u.createStateObject(t,i,n);return u.isLastSavedState(a)?u.busy(!1):(u.storeState(a),u.expectedStateId=a.id,p.replaceState(a.id,a.title,a.url),u.Adapter.trigger(e,"popstate")),!0};if(a){try{u.store=c.parse(a.getItem("History.store"))||{}}catch(m){u.store={}}u.normalizeStore()}else u.store={},u.normalizeStore();u.Adapter.bind(e,"unload",u.clearAllIntervals),u.saveState(u.storeState(u.extractState(u.getLocationHref(),!0))),a&&(u.onUnload=function(){var e,t,i;try{e=c.parse(a.getItem("History.store"))||{}}catch(n){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in u.idToState)u.idToState.hasOwnProperty(t)&&(e.idToState[t]=u.idToState[t]);for(t in u.urlToId)u.urlToId.hasOwnProperty(t)&&(e.urlToId[t]=u.urlToId[t]);for(t in u.stateToId)u.stateToId.hasOwnProperty(t)&&(e.stateToId[t]=u.stateToId[t]);u.store=e,u.normalizeStore(),i=c.stringify(e);try{a.setItem("History.store",i)}catch(s){if(!/QUOTA_EXCEEDED_ERR/.test(s.message))throw s;a.removeItem("History.store"),a.setItem("History.store",i)}},u.intervalList.push(l(u.onUnload,u.options.storeInterval)),u.Adapter.bind(e,"beforeunload",u.onUnload),u.Adapter.bind(e,"unload",u.onUnload)),u.emulated.pushState||(u.bugs.safariPoll&&u.intervalList.push(l(u.safariStatePoll,u.options.safariPollInterval)),"Apple Computer, Inc."!==s.vendor&&"Mozilla"!==(s.appCodeName||"")||(u.Adapter.bind(e,"hashchange",function(){u.Adapter.trigger(e,"popstate")}),u.getHash()&&u.Adapter.onDomLoad(function(){u.Adapter.trigger(e,"hashchange")})))},u.options&&u.options.delayInit||u.init()}(window)},{}],8:[function(e,t,i){!function(){window.jLayout="undefined"==typeof window.jLayout?{}:window.jLayout,jLayout.border=function(e){function t(e){return function(t){var n,h=t.insets(),c=0,d=0;return s&&s.isVisible()&&(n=s[e+"Size"](),c+=n.width+i.hgap,d=n.height),a&&a.isVisible()&&(n=a[e+"Size"](),c+=n.width+i.hgap,d=Math.max(n.height,d)),l&&l.isVisible()&&(n=l[e+"Size"](),c+=n.width,d=Math.max(n.height,d)),r&&r.isVisible()&&(n=r[e+"Size"](),c=Math.max(n.width,c),d+=n.height+i.vgap),o&&o.isVisible()&&(n=o[e+"Size"](),c=Math.max(n.width,c),d+=n.height+i.vgap),{width:c+h.left+h.right,height:d+h.top+h.bottom}}}var i={},n={},s=e.east,a=e.west,r=e.north,o=e.south,l=e.center;return i.hgap=e.hgap||0,i.vgap=e.vgap||0,n.items=function(){var e=[];return s&&e.push(s),a&&e.push(a),r&&e.push(r),o&&e.push(o),l&&e.push(l),e},n.layout=function(e){var t,n=e.bounds(),h=e.insets(),c=h.top,d=n.height-h.bottom,u=h.left,p=n.width-h.right;return r&&r.isVisible()&&(t=r.preferredSize(),r.bounds({x:u,y:c,width:p-u,height:t.height}),r.doLayout(),c+=t.height+i.vgap),o&&o.isVisible()&&(t=o.preferredSize(),o.bounds({x:u,y:d-t.height,width:p-u,height:t.height}),o.doLayout(),d-=t.height+i.vgap),s&&s.isVisible()&&(t=s.preferredSize(),s.bounds({x:p-t.width,y:c,width:t.width,height:d-c}),s.doLayout(),p-=t.width+i.hgap),a&&a.isVisible()&&(t=a.preferredSize(),a.bounds({x:u,y:c,width:t.width,height:d-c}),a.doLayout(),u+=t.width+i.hgap),l&&l.isVisible()&&(l.bounds({x:u,y:c,width:p-u,height:d-c}),l.doLayout()),e},n.preferred=t("preferred"),n.minimum=t("minimum"),n.maximum=t("maximum"),n}}()},{}],9:[function(e,t,i){var n=window.jQuery,s=window.jLayout;n&&s&&!function(e){var t=e.jLayoutWrap=function(t,i){var n={};return n.item=t,e.each(["min","max"],function(e,i){n[i+"imumSize"]=function(e){var s=t.data("jlayout");return s?s[i+"imum"](n):t[i+"Size"](e)}}),e.extend(n,{doLayout:function(){var e=t.data("jlayout");e?e.layout(n):t.is("[data-layout-type]")&&t.layout({resize:!1}),t.css({position:"absolute"})},isVisible:function(){return t.isVisible()},insets:function(){var e=t.padding(),i=t.border();return{top:e.top,bottom:e.bottom+i.bottom+i.top,left:e.left,right:e.right+i.right+i.left}},bounds:function(e){var i={};return e?("number"==typeof e.x&&(i.left=e.x),"number"==typeof e.y&&(i.top=e.y),"number"==typeof e.width&&(i.width=e.width-(t.outerWidth(!0)-t.width()),i.width=i.width>=0?i.width:0),"number"==typeof e.height&&(i.height=e.height-(t.outerHeight(!0)-t.height()),i.height=i.height>=0?i.height:0),t.css(i),t):(i=t.position(),{x:i.left,y:i.top,width:t.outerWidth(!1),height:t.outerHeight(!1)})},preferredSize:function(){var e,s,a=t.margin(),r={width:0,height:0},o=t.data("jlayout");return o&&i?(r=o.preferred(n),e=n.minimumSize(),s=n.maximumSize(),r.width+=a.left+a.right,r.height+=a.top+a.bottom,r.width<e.width||r.height<e.height?(r.width=Math.max(r.width,e.width),r.height=Math.max(r.height,e.height)):(r.width>s.width||r.height>s.height)&&(r.width=Math.min(r.width,s.width),r.height=Math.min(r.height,s.height))):(r=n.bounds(),r.width+=a.left+a.right,r.height+=a.top+a.bottom),r}}),n};e.fn.layout=function(i){var n=e.extend({},e.fn.layout.defaults,i);return e.each(this,function(){var i=e(this),a=e.metadata&&i.metadata().layout?e.extend(n,i.metadata().layout):n,a=i.data("layoutType")?e.extend(a,{type:i.data("layoutType")}):a,r=t(i,a.resize);"border"===a.type&&"undefined"!=typeof s.border?(e.each(["north","south","west","east","center"],function(e,n){i.children().hasClass(n)&&(a[n]=t(i.children("."+n+":first")))}),i.data("jlayout",s.border(a))):"grid"===a.type&&"undefined"!=typeof s.grid?(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.grid(a))):"flexGrid"===a.type&&"undefined"!=typeof s.flexGrid?(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.flexGrid(a))):"column"===a.type&&"undefined"!=typeof s.column?(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.column(a))):"flow"===a.type&&"undefined"!=typeof s.flow&&(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.flow(a))),a.resize&&r.bounds(r.preferredSize()),r.doLayout(),i.css({position:"relative"}),void 0!==e.ui&&i.addClass("ui-widget")})},e.fn.layout.defaults={resize:!0,type:"grid"}}(n)},{}],10:[function(e,t,i){!function(e){e.fn.hoverIntent=function(t,i){var n={sensitivity:7,interval:100,timeout:350};n=e.extend(n,i?{over:t,out:i}:t);var s,a,r,o,l=function(e){s=e.pageX,a=e.pageY},h=function(t,i){return i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(r-s)+Math.abs(o-a)<n.sensitivity?(e(i).unbind("mousemove",l),i.hoverIntent_s=1,n.over.apply(i,[t])):(r=s,o=a,i.hoverIntent_t=setTimeout(function(){h(t,i)},n.interval),void 0)},c=function(e,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,n.out.apply(t,[e])},d=function(t){var i=jQuery.extend({},t),s=this;s.hoverIntent_t&&(s.hoverIntent_t=clearTimeout(s.hoverIntent_t)),"mouseenter"==t.type?(r=i.pageX,o=i.pageY,e(s).bind("mousemove",l),1!=s.hoverIntent_s&&(s.hoverIntent_t=setTimeout(function(){h(i,s)},n.interval))):(e(s).unbind("mousemove",l),1==s.hoverIntent_s&&(s.hoverIntent_t=setTimeout(function(){c(i,s)},n.timeout)))};return this.bind("mouseenter",d).bind("mouseleave",d)}}(jQuery)},{}],11:[function(e,t,i){!function(e){e.extend({noticeAdd:function(t){var t,i,n,s,a,r={inEffect:{opacity:"show"},inEffectDuration:600,stayTime:3e3,text:"",stay:!1,type:"notice"},o=!1;t=e.extend({},r,t),i=e(".notice-wrap").length?e(".notice-wrap"):e("<div></div>").addClass("notice-wrap").appendTo("body"),n=e("<div></div>").addClass("notice-item-wrapper"),s=e("<div></div>").hide().addClass("notice-item "+t.type).appendTo(i).html("<p>"+t.text+"</p>").animate(t.inEffect,t.inEffectDuration).wrap(n),a=e("<div></div>").addClass("notice-item-close").prependTo(s).html("x").click(function(){e.noticeRemove(s)}),s.hover(function(){o=!0},function(){o=!1}),t.stay||setTimeout(function(){var t=setInterval(function(){o||(e.noticeRemove(s),clearInterval(t))},1e3)},t.stayTime)},noticeRemove:function(e){e.animate({opacity:"0"},600,function(){e.parent().animate({height:"0px"},300,function(){e.parent().remove()})})}})}(jQuery)},{}],12:[function(e,t,i){!function(e){"use strict";var t=function(e){return parseInt(e,10)||0};e.each(["min","max"],function(i,n){e.fn[n+"Size"]=function(e){var i,s;return e?(void 0!==e.width&&this.css(n+"-width",e.width),void 0!==e.height&&this.css(n+"-height",e.height),this):(i=this.css(n+"-width"),s=this.css(n+"-height"),{width:"max"===n&&(void 0===i||"none"===i||-1===t(i))&&Number.MAX_VALUE||t(i),height:"max"===n&&(void 0===s||"none"===s||-1===t(s))&&Number.MAX_VALUE||t(s)})}}),e.fn.isVisible=function(){return this.is(":visible")},e.each(["border","margin","padding"],function(i,n){e.fn[n]=function(e){return e?(void 0!==e.top&&this.css(n+"-top"+("border"===n?"-width":""),e.top),void 0!==e.bottom&&this.css(n+"-bottom"+("border"===n?"-width":""),e.bottom),void 0!==e.left&&this.css(n+"-left"+("border"===n?"-width":""),e.left),void 0!==e.right&&this.css(n+"-right"+("border"===n?"-width":""),e.right),this):{top:t(this.css(n+"-top"+("border"===n?"-width":""))),bottom:t(this.css(n+"-bottom"+("border"===n?"-width":""))),left:t(this.css(n+"-left"+("border"===n?"-width":""))),right:t(this.css(n+"-right"+("border"===n?"-width":"")))}}})}(jQuery)},{}],13:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s);a["default"].fn.extend({ssDatepicker:function(e){return(0,a["default"])(this).each(function(){if(!(0,a["default"])(this).data("datepicker")){(0,a["default"])(this).siblings("button").addClass("ui-icon ui-icon-calendar");var t=((0,a["default"])(this).parents(".field.date:first"),a["default"].extend(e||{},(0,a["default"])(this).data(),(0,a["default"])(this).data("jqueryuiconfig"),{}));t.showcalendar&&(t.locale&&a["default"].datepicker.regional[t.locale]&&(t=a["default"].extend(t,a["default"].datepicker.regional[t.locale],{})),
t.min&&(t.minDate=a["default"].datepicker.parseDate("yy-mm-dd",t.min)),t.max&&(t.maxDate=a["default"].datepicker.parseDate("yy-mm-dd",t.max)),t.dateFormat=t.jquerydateformat,(0,a["default"])(this).datepicker(t))}})}}),(0,a["default"])(document).on("click",".field.date input.text,input.text.date",function(){(0,a["default"])(this).ssDatepicker(),(0,a["default"])(this).data("datepicker")&&(0,a["default"])(this).datepicker("show")})},{"./jQuery":"jQuery"}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s),r=e("./i18n"),o=n(r);a["default"].entwine("ss",function(e){e(".ss-gridfield").entwine({reload:function(t,i){var n=this,s=this.closest("form"),a=this.find(":input:focus").attr("name"),r=s.find(":input").serializeArray();t||(t={}),t.data||(t.data=[]),t.data=t.data.concat(r),window.location.search&&(t.data=window.location.search.replace(/^\?/,"")+"&"+e.param(t.data)),window.history&&window.history.pushState||window.location.hash&&-1!=window.location.hash.indexOf("?")&&(t.data=window.location.hash.substring(window.location.hash.indexOf("?")+1)+"&"+e.param(t.data)),s.addClass("loading"),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(r){if(n.empty().append(e(r).children()),a&&n.find(':input[name="'+a+'"]').focus(),n.find(".filter-header").length){var o;"show"==t.data[0].filter?(o='<span class="non-sortable"></span>',n.addClass("show-filter").find(".filter-header").show()):(o='<button type="button" name="showFilter" class="ss-gridfield-button-filter trigger"></button>',n.removeClass("show-filter").find(".filter-header").hide()),n.find(".sortable-header th:last").html(o)}s.removeClass("loading"),i&&i.apply(this,arguments),n.trigger("reload",n)},error:function(e){alert(o["default"]._t("GRIDFIELD.ERRORINTRANSACTION")),s.removeClass("loading")}},t))},showDetailView:function(e){window.location.href=e},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(e,t){var i=this.getState();i[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(i))},getState:function(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())}}),e(".ss-gridfield *").entwine({getGridField:function(){return this.closest(".ss-gridfield")}}),e(".ss-gridfield :button[name=showFilter]").entwine({onclick:function(t){e(".filter-header").show("slow").find(":input:first").focus(),this.closest(".ss-gridfield").addClass("show-filter"),this.parent().html('<span class="non-sortable"></span>'),t.preventDefault()}}),e(".ss-gridfield .ss-gridfield-item").entwine({onclick:function(t){if(e(t.target).closest(".action").length)return this._super(t),!1;var i=this.find(".edit-link");i.length&&this.getGridField().showDetailView(i.prop("href"))},onmouseover:function(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".ss-gridfield .action").entwine({onclick:function(e){var t="show";return this.button("option","disabled")?void e.preventDefault():(!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(t="hidden"),this.getGridField().reload({data:[{name:this.attr("name"),value:this.val(),filter:t}]}),void e.preventDefault())},actionurl:function(){var t=this.closest(":button"),i=this.getGridField(),n=this.closest("form"),s=n.find(":input.gridstate").serialize(),a=n.find('input[name="SecurityID"]').val();s+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),a&&(s+="&SecurityID="+encodeURIComponent(a)),window.location.search&&(s=window.location.search.replace(/^\?/,"")+"&"+s);var r=-1==i.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(i.data("url")+r+s,e("base").attr("href"))}}),e(".ss-gridfield .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),i=""!==t.val(),n=e.is(":disabled");(i&&n||!i&&!n)&&e.button("option","disabled",!n)}}),e(".ss-gridfield .col-buttons .action.gridfield-button-delete, .cms-edit-form .Actions button.action.action-delete").entwine({onclick:function(e){return confirm(o["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(e):(e.preventDefault(),!1)}}),e(".ss-gridfield .action.gridfield-button-print").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var t=this.actionurl();return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus();var e=this.contentWindow||this;e.print()})},onunmatch:function(){this._super()}}),e(".ss-gridfield .action.no-ajax").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".ss-gridfield .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".ss-gridfield[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".ss-gridfield[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".ss-gridfield .filter-header :input").entwine({onmatch:function(){var e=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),t=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(e){if(!this.closest(".ss-gridfield-button-reset").length){var t=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),i=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");if("13"==e.keyCode){var n=this.closest(".filter-header").find(".ss-gridfield-button-filter"),s="show";return!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(s="hidden"),this.getGridField().reload({data:[{name:n.attr("name"),value:n.val(),filter:s}]}),!1}t.addClass("hover-alike"),i.addClass("hover-alike")}}}),e(".ss-gridfield .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,i){var n=e(this.element);e(this.element).closest("form");e.ajax({headers:{"X-Pjax":"Partial"},type:"GET",url:e(n).data("searchUrl"),data:encodeURIComponent(n.attr("name"))+"="+encodeURIComponent(n.val()),success:function(t){i(e.map(JSON.parse(t),function(e,t){return{label:e,value:e,id:t}}))},error:function(e){alert(o["default"]._t("GRIDFIELD.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,i){e(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith('<input type="hidden" name="relationID" value="'+i.item.id+'" id="relationID"/>');var n=e(this).closest(".ss-gridfield").find("#action_gridfield_relationadd");n.data("button")?n.button("enable"):n.removeAttr("disabled")}})}}),e(".ss-gridfield .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){var i=parseInt(e(this).val(),10),n=e(this).getGridField();return n.setState("GridFieldPaginator",{currentPage:i}),n.reload(),!1}}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],15:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _jQuery=require("./jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("./i18n"),_i18n2=_interopRequireDefault(_i18n),ss="undefined"!=typeof window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(e){editorID=e,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var e="#"+editorID,t=(0,_jQuery2["default"])(e).data("config"),i=this;return t.selector=e,t.setup=function(e){e.on("change",function(){i.save()})},t},save:function(){var e=this.getInstance();e.save(),(0,_jQuery2["default"])(e.getElement()).trigger("change")},create:function(){var e=this.getConfig();"undefined"!=typeof e.baseURL&&(tinymce.EditorManager.baseURL=e.baseURL),tinymce.init(e)},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().setContent(e,t)},insertContent:function(e,t){this.getInstance().insertContent(e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t){this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback;return cb&&(href=eval(cb+"(href, node, true);")),href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers["default"]=ss.editorWrappers.tinyMCE,_jQuery2["default"].entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),t.init(this.attr("id")),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save(),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openDialog:function(t){var i=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},n=this,s=e("#cms-editor-dialogs").data("url"+i(t)+"form"),a=e(".htmleditorfield-"+t+"dialog");a.length?(a.getForm().setElement(this),a.html(""),a.addClass("loading"),a.open()):(a=e('<div class="htmleditorfield-dialog htmleditorfield-'+t+'dialog loading">'),e("body").append(a)),e.ajax({url:s,complete:function(){a.removeClass("loading")},success:function(e){a.html(e),a.getForm().setElement(n),a.trigger("ssdialogopen")}})}}),e(".htmleditorfield-dialog").entwine({onadd:function(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,buttons:{insert:{text:_i18n2["default"]._t("HtmlEditorField.INSERT","Insert"),"data-icon":"accept","class":"ss-ui-action-constructive media-insert",click:function(){e(this).find("form").submit()}}}}),this._super()},getForm:function(){return this.find("form")},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(e){this.is(":visible")?this.close():this.open()},onscroll:function(){this.animate({scrollTop:this.find("form").height()},500)}}),e("form.htmleditorfield-form").entwine({Selection:null,Bookmark:null,Element:null,setSelection:function(t){return this._super(e(t))},onadd:function(){var e=this.find(":header:first");this.getDialog().attr("title",e.text()),this._super()},onremove:function(){this.setSelection(null),this.setBookmark(null),this.setElement(null),this._super()},getDialog:function(){return this.closest(".htmleditorfield-dialog")},fromDialog:{onssdialogopen:function(){var e=this.getEditor();this.setSelection(e.getSelectedNode()),this.setBookmark(e.createBookmark()),e.blur(),this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:enabled").eq(0).focus(),this.redraw(),this.updateFromEditor()},onssdialogclose:function(){var e=this.getEditor();e.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function(){return this.getElement().getEditor()},modifySelection:function(e){var t=this.getEditor();t.moveToBookmark(this.getBookmark()),e.call(this,t),this.setSelection(t.getSelectedNode()),this.setBookmark(t.createBookmark()),t.blur()},updateFromEditor:function(){},redraw:function(){},resetFields:function(){this.find(".tree-holder").empty()}}),e("form.htmleditorfield-linkform").entwine({onsubmit:function(e){return this.insertLink(),this.getDialog().close(),!1},resetFields:function(){this._super(),this[0].reset()},redraw:function(){this._super();var e=this.find(":input[name=LinkType]:checked").val();this.addAnchorSelector(),this.resetFileField(),this.find("div.content .field").hide(),this.find('.field[id$="LinkType"]').show(),this.find('.field[id$="'+e+'_Holder"]').show(),"internal"!=e&&"anchor"!=e||this.find('.field[id$="Anchor_Holder"]').show(),"email"==e?this.find('.field[id$="Subject_Holder"]').show():this.find('.field[id$="TargetBlank_Holder"]').show(),"anchor"==e&&this.find('.field[id$="AnchorSelector_Holder"]').show(),this.find('.field[id$="Description_Holder"]').show()},getLinkAttributes:function(){var e,t=null,i=this.find(":input[name=Subject]").val(),n=this.find(":input[name=Anchor]").val();switch(this.find(":input[name=TargetBlank]").is(":checked")&&(t="_blank"),this.find(":input[name=LinkType]:checked").val()){case"internal":e="[sitetree_link,id="+this.find(":input[name=internal]").val()+"]",n&&(e+="#"+n);break;case"anchor":e="#"+n;break;case"file":e="[file_link,id="+this.find(".ss-uploadfield .ss-uploadfield-item").attr("data-fileid")+"]";break;case"email":e="mailto:"+this.find(":input[name=email]").val(),i&&(e+="?subject="+encodeURIComponent(i)),t=null;break;default:e=this.find(":input[name=external]").val(),-1==e.indexOf("://")&&(e="http://"+e)}return{href:e,target:t,title:this.find(":input[name=Description]").val()}},insertLink:function(){this.modifySelection(function(e){e.insertLink(this.getLinkAttributes())})},removeLink:function(){this.modifySelection(function(e){e.removeLink()}),this.resetFileField(),this.close()},resetFileField:function(){var e=this.find('.ss-uploadfield[id$="file_Holder"]'),t=e.data("fileupload"),i=e.find(".ss-uploadfield-item[data-fileid]");i.length&&(t._trigger("destroy",null,{context:i}),e.find(".ss-uploadfield-addfile").removeClass("borderTop"))},addAnchorSelector:function(){if(!this.find(":input[name=AnchorSelector]").length){var t=this,i=e('<select id="Form_EditorToolbarLinkForm_AnchorSelector" name="AnchorSelector"></select>');this.find(":input[name=Anchor]").parent().append(i),this.updateAnchorSelector(),i.change(function(i){t.find(':input[name="Anchor"]').val(e(this).val())})}},getAnchors:function(){var t=this.find(":input[name=LinkType]:checked").val(),i=e.Deferred();switch(t){case"anchor":var n=[],s=this.getEditor();if(s){var a=s.getContent().match(/\s+(name|id)\s*=\s*(["'])([^\2\s>]*?)\2|\s+(name|id)\s*=\s*([^"']+)[\s +>]/gim);if(a&&a.length)for(var r=0;r<a.length;r++){var o=-1==a[r].indexOf("id=")?7:5;n.push(a[r].substr(o).replace(/"$/,""))}}i.resolve(n);break;case"internal":var l=this.find(":input[name=internal]").val();l?e.ajax({url:e.path.addSearchParams(this.attr("action").replace("LinkForm","getanchors"),{PageID:parseInt(l)}),success:function(t,n,s){i.resolve(e.parseJSON(t))},error:function(e,t){i.reject(e.responseText)}}):i.resolve([]);break;default:i.reject(_i18n2["default"]._t("HtmlEditorField.ANCHORSNOTSUPPORTED","Anchors are not supported for this link type."))}return i.promise()},updateAnchorSelector:function(){var t=this.find(":input[name=AnchorSelector]"),i=this.getAnchors();t.empty(),t.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.LOOKINGFORANCHORS","Looking for anchors...")+"</option>")),i.done(function(i){if(t.empty(),t.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.SelectAnchor")+"</option>")),i)for(var n=0;n<i.length;n++)t.append(e('<option value="'+i[n]+'">'+i[n]+"</option>"))}).fail(function(i){t.empty(),t.append(e('<option value="" selected="1">'+i+"</option>"))}),e.browser.msie&&t.hide().show()},updateFromEditor:function(){var e,t=/<\S[^><]*>/g,i=this.getCurrentLink();if(i)for(e in i){var n=this.find(":input[name="+e+"]"),s=i[e];"string"==typeof s&&(s=s.replace(t,"")),n.is(":checkbox")?n.prop("checked",s).change():n.is(":radio")?n.val([s]).change():"file"==e?(n=this.find(':input[name="'+e+'[Uploads][]"]'),n=n.parents(".ss-uploadfield"),function a(e,t){e.getConfig()?e.attachFiles([t]):setTimeout(function(){a(e,t)},50)}(n,s)):n.val(s).change()}},getCurrentLink:function(){var e=this.getSelection(),t="",i="",n="",s="insert",a="",r=null;return e.length&&(r=e.is("a")?e:e=e.parents("a:first")),r&&r.length&&this.modifySelection(function(e){e.selectNode(r[0])}),r.attr("href")||(r=null),r&&(t=r.attr("href"),i=r.attr("target"),n=r.attr("title"),a=r.attr("class"),t=this.getEditor().cleanLink(t,r),s="update"),t.match(/^mailto:(.*)$/)?{LinkType:"email",email:RegExp.$1,Description:n}:t.match(/^(assets\/.*)$/)||t.match(/^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/)?{LinkType:"file",file:RegExp.$1,Description:n,TargetBlank:!!i}:t.match(/^#(.*)$/)?{LinkType:"anchor",Anchor:RegExp.$1,Description:n,TargetBlank:!!i}:t.match(/^\[sitetree_link(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/i)?{LinkType:"internal",internal:RegExp.$1,Anchor:RegExp.$2?RegExp.$2.substr(1):"",Description:n,TargetBlank:!!i}:t?{LinkType:"external",external:t,Description:n,TargetBlank:!!i}:null}}),e("form.htmleditorfield-linkform input[name=LinkType]").entwine({onclick:function(e){this.parents("form:first").redraw(),this._super()},onchange:function(){this.parents("form:first").redraw();var e=this.parent().find(":checked").val();"anchor"!==e&&"internal"!==e||this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform input[name=internal]").entwine({onvalueupdated:function(){this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform :submit[name=action_remove]").entwine({onclick:function(e){return this.parents("form:first").removeLink(),this._super(),!1}}),e("form.htmleditorfield-mediaform").entwine({toggleCloseButton:function(){var e=Boolean(this.find(".ss-htmleditorfield-file").length);this.find(".overview .action-delete")[e?"hide":"show"]()},onsubmit:function(){return this.modifySelection(function(t){this.find(".ss-htmleditorfield-file").each(function(){e(this).insertHTML(t)})}),this.getDialog().close(),!1},updateFromEditor:function(){var e=this,t=this.getSelection();t.is("img")&&this.showFileView(t.data("url")||t.attr("src")).done(function(i){i.updateFromNode(t),e.toggleCloseButton(),e.redraw()}),this.redraw()},redraw:function(t){this._super();var i=this.getSelection(),n=Boolean(this.find(".ss-htmleditorfield-file").length),s=i.is("img"),a=this.hasClass("insertingURL"),r=this.find(".header-edit");r[n?"show":"hide"](),this.closest("ui-dialog").find("ui-dialog-buttonpane .media-insert").button(n?"enable":"disable").toggleClass("ui-state-disabled",!n),this.find(".htmleditorfield-default-panel")[s||a?"hide":"show"](),this.find(".htmleditorfield-web-panel")[s||!a?"hide":"show"]();var o=this.find(".htmleditorfield-mediaform-heading.insert");s?o.hide():a?(o.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTURL")).prepend('<button class="back-button font-icon-left-open no-text" title="'+_i18n2["default"]._t("HtmlEditorField.BACK")+'"></button>'),this.find(".htmleditorfield-web-panel input.remoteurl").focus()):o.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTFROM")).find(".back-button").remove(),this.find(".htmleditorfield-mediaform-heading.update")[s?"show":"hide"](),this.find(".ss-uploadfield-item-actions")[s?"hide":"show"](),this.find(".ss-uploadfield-item-name")[s?"hide":"show"](),this.find(".ss-uploadfield-item-preview")[s?"hide":"show"](),this.find(".Actions .media-update")[s?"show":"hide"](),this.find(".ss-uploadfield-item-editform").toggleEditForm(s),this.find(".htmleditorfield-from-cms .field.treedropdown").css("left",e(".htmleditorfield-mediaform-heading:visible").outerWidth()),this.closest(".ui-dialog").addClass("ss-uploadfield-dropzone"),this.closest(".ui-dialog").find(".ui-dialog-buttonpane .media-insert .ui-button-text").text([s?_i18n2["default"]._t("HtmlEditorField.UPDATE","Update"):_i18n2["default"]._t("HtmlEditorField.INSERT","Insert")])},resetFields:function(){this.find(".ss-htmleditorfield-file").remove(),this.find(".ss-gridfield-items .ui-selected").removeClass("ui-selected"),this.find("li.ss-uploadfield-item").remove(),this.redraw(),this._super()},getFileView:function(e){return this.find(".ss-htmleditorfield-file[data-id="+e+"]")},showFileView:function(t){var i=this,n=Number(t)==t?{ID:t}:{FileURL:t},s=e('<div class="ss-htmleditorfield-file loading" />');this.find(".content-edit").prepend(s);var a=e.Deferred();return e.ajax({url:e.path.addSearchParams(this.attr("action").replace(/MediaForm/,"viewfile"),n),success:function(t,n,r){var o=e(t).filter(".ss-htmleditorfield-file");s.replaceWith(o),i.redraw(),a.resolve(o)},error:function(){s.remove(),a.reject()}}),a.promise()}}),e("form.htmleditorfield-mediaform div.ss-upload .upload-url").entwine({onclick:function(){var e=this.closest("form");e.addClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .htmleditorfield-mediaform-heading .back-button").entwine({onclick:function(){var e=this.closest("form");e.removeClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .ss-gridfield-items").entwine({onselectableselected:function(t,i){var n=this.closest("form"),s=e(i.selected);s.is(".ss-gridfield-item")&&(n.closest("form").showFileView(s.data("id")),n.redraw(),n.parent().trigger("scroll"))},onselectableunselected:function(t,i){var n=this.closest("form"),s=e(i.unselected);s.is(".ss-gridfield-item")&&(n.getFileView(s.data("id")).remove(),n.redraw())}}),e("form.htmleditorfield-form.htmleditorfield-mediaform div.ss-assetuploadfield").entwine({onfileuploadstop:function(t){var i=this.closest("form"),n=[];i.find("div.content-edit").find("div.ss-htmleditorfield-file").each(function(){n.push(e(this).data("id"))});var s=e(".ss-uploadfield-files",this).children(".ss-uploadfield-item");s.each(function(){var t=e(this).data("fileid");t&&-1==e.inArray(t,n)&&(e(this).remove(),i.showFileView(t))}),i.parent().trigger("scroll"),i.redraw()}}),e("form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl").entwine({onadd:function(){this._super(),this.validate()},onkeyup:function(){this.validate()},onchange:function(){this.validate()},getAddButton:function(){return this.closest(".CompositeField").find("button.add-url")},validate:function(){var t=this.val(),i=t;return t=e.trim(t),t=t.replace(/^https?:\/\//i,""),i!==t&&this.val(t),this.getAddButton().button(t?"enable":"disable"),!!t}}),e("form.htmleditorfield-form.htmleditorfield-mediaform .add-url").entwine({getURLField:function(){return this.closest(".CompositeField").find("input.remoteurl")},onclick:function(e){var t=this.getURLField(),i=this.closest(".CompositeField"),n=this.closest("form");return t.validate()&&(i.addClass("loading"),n.showFileView("http://"+t.val()).done(function(){i.removeClass("loading"),n.parent().trigger("scroll")}),n.redraw()),!1}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file").entwine({getAttributes:function(){},getExtraData:function(){},getHTML:function(){return e("<div>").append(e("<a/>").attr({href:this.data("url")}).text(this.find(".name").text())).html()},insertHTML:function(e){e.replaceContent(this.getHTML())},updateFromNode:function(e){},updateDimensions:function(e,t,i){var n,s=this.find(":input[name=Width]"),a=this.find(":input[name=Height]"),r=s.val(),o=a.val();r&&o&&(e?(n=a.getOrigVal()/s.getOrigVal(),"Width"==e?(t&&r>t&&(r=t),o=Math.floor(r*n)):"Height"==e&&(i&&o>i&&(o=i),r=Math.ceil(o/n))):(t&&r>t&&(r=t),i&&o>i&&(o=i)),s.val(r),a.val(o))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.image").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),alt:this.find(":input[name=AltText]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,title:this.find(":input[name=Title]").val(),"class":this.find(":input[name=CSSClass]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){return{CaptionText:this.find(":input[name=CaptionText]").val()}},getHTML:function(){},insertHTML:function(t){var i=this.closest("form"),n=i.getSelection();t||(t=i.getEditor());var s=this.getAttributes(),a=this.getExtraData(),r=n&&n.is("img")?n:null;r&&r.parent().is(".captionImage")&&(r=r.parent());var o=n&&n.is("img")?n:e("<img />");o.attr(s);var l=o.parent(".captionImage"),h=l.find(".caption");a.CaptionText?(l.length||(l=e("<div></div>")),l.attr("class","captionImage "+s["class"]).css("width",s.width),h.length||(h=e('<p class="caption"></p>').appendTo(l)),h.attr("class","caption "+s["class"]).text(a.CaptionText)):l=h=null;var c=l?l:o;r&&r.not(c).length&&r.replaceWith(c),l&&l.prepend(o),r||(t.repaint(),t.insertContent(e("<div />").append(c).html(),{skip_undo:1})),t.addUndo(),t.repaint()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.attr("class")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=CaptionText]").val(e.siblings(".caption:first").text()),this.find(":input[name=FileID]").val(e.data("fileid"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.flash").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"data-fileid":this.find(":input[name=FileID]").val()}},getHTML:function(){var t=this.getAttributes(),i=tinyMCE.activeEditor.plugins.media.dataToImg({type:"flash",width:t.width,height:t.height,params:{src:t.src},video:{sources:[]}});return e("<div />").append(i).html()},updateFromNode:function(e){}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.embed").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"class":this.find(":input[name=CSSClass]").val(),alt:this.find(":input[name=AltText]").val(),title:this.find(":input[name=Title]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{CaptionText:this.find(":input[name=CaptionText]").val(),Url:this.find(":input[name=URL]").val(),thumbnail:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,cssclass:this.find(":input[name=CSSClass]").val()}},getHTML:function(){var t,i=this.getAttributes(),n=this.getExtraData(),s=e("<img />").attr(i).addClass("ss-htmleditorfield-file embed");return e.each(n,function(e,t){s.attr("data-"+e,t)}),t=n.CaptionText?e('<div style="width: '+i.width+'px;" class="captionImage '+i["class"]+'"><p class="caption">'+n.CaptionText+"</p></div>").prepend(s):s,e("<div />").append(t).html()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.data("cssclass")),this.find(":input[name=FileID]").val(e.data("fileid"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file .dimensions :input").entwine({OrigVal:null,onmatch:function(){this._super(),this.setOrigVal(parseInt(this.val(),10))},onunmatch:function(){this._super()},onfocusout:function(e){this.closest(".ss-htmleditorfield-file").updateDimensions(this.attr("name"))}}),e("form.htmleditorfield-mediaform .ss-uploadfield-item .ss-uploadfield-item-cancel").entwine({onclick:function(e){var t=this.closest("form"),i=this.closest("ss-uploadfield-item");t.find(".ss-gridfield-item[data-id="+i.data("id")+"]").removeClass("ui-selected"),this.closest(".ss-uploadfield-item").remove(),t.redraw(),e.preventDefault()}}),e("div.ss-assetuploadfield .ss-uploadfield-item-edit, div.ss-assetuploadfield .ss-uploadfield-item-name").entwine({getEditForm:function(){return this.closest(".ss-uploadfield-item").find(".ss-uploadfield-item-editform")},fromEditForm:{onchange:function(t){var i=e(t.target);i.removeClass("edited"),i.addClass("edited")}},onclick:function(e){var t=this.getEditForm();return this.closest(".ss-uploadfield-item").hasClass("ss-htmleditorfield-file")?(t.parent("ss-uploadfield-item").removeClass("ui-state-warning"),t.toggleEditForm(),e.preventDefault(),!1):void this._super(e)}}),e("div.ss-assetuploadfield .ss-uploadfield-item-editform").entwine({toggleEditForm:function(e){var t=this.prev(".ss-uploadfield-item-info"),i=t.find(".ss-uploadfield-item-status"),n="";e===!0||e!==!1&&0===this.height()?(n=_i18n2["default"]._t("UploadField.Editing","Editing ..."),this.height("auto"),t.find(".toggle-details-icon").addClass("opened"),i.removeClass("ui-state-success-text").removeClass("ui-state-warning-text")):(this.height(0),t.find(".toggle-details-icon").removeClass("opened"),this.hasClass("edited")?(n=_i18n2["default"]._t("UploadField.CHANGESSAVED","Changes Made"),this.removeClass("edited"),i.addClass("ui-state-success-text")):(n=_i18n2["default"]._t("UploadField.NOCHANGES","No Changes"),i.addClass("ui-state-success-text"))),i.attr("title",n).text(n)}}),e('form.htmleditorfield-mediaform .field[id$="ParentID_Holder"] .TreeDropdownField').entwine({onadd:function(){this._super();var e=this;this.bind("change",function(){var t=e.closest("form").find(".ss-gridfield");t.setState("ParentID",e.getValue()),t.reload()})}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],16:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s);a["default"].entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){var e=window.location.hash;this.redrawTabs(),""!==e&&this.openTabFromURL(e),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks(),this.tabs()},openTabFromURL:function(t){var i;e.each(this.find(".cms-panel-link"),function(){return-1!==this.href.indexOf(t)&&1===e(t).length?(i=e(this),!1):void 0}),void 0!==i&&e(window).one("ajaxComplete",function(){i.click()})},rewriteHashlinks:function(){e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr("href").match(/#.*/);t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}})})},{"./jQuery":"jQuery"}],17:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s),r=e("./i18n"),o=n(r);a["default"].entwine("ss",function(e){var t,i;e(window).bind("resize.treedropdownfield",function(){
t.min&&(t.minDate=a["default"].datepicker.parseDate("yy-mm-dd",t.min)),t.max&&(t.maxDate=a["default"].datepicker.parseDate("yy-mm-dd",t.max)),t.dateFormat=t.jquerydateformat,(0,a["default"])(this).datepicker(t))}})}}),(0,a["default"])(document).on("click",".field.date input.text,input.text.date",function(){(0,a["default"])(this).ssDatepicker(),(0,a["default"])(this).data("datepicker")&&(0,a["default"])(this).datepicker("show")})},{"./jQuery":"jQuery"}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s),r=e("./i18n"),o=n(r);a["default"].entwine("ss",function(e){e(".ss-gridfield").entwine({reload:function(t,i){var n=this,s=this.closest("form"),a=this.find(":input:focus").attr("name"),r=s.find(":input").serializeArray();t||(t={}),t.data||(t.data=[]),t.data=t.data.concat(r),window.location.search&&(t.data=window.location.search.replace(/^\?/,"")+"&"+e.param(t.data)),window.history&&window.history.pushState||window.location.hash&&-1!=window.location.hash.indexOf("?")&&(t.data=window.location.hash.substring(window.location.hash.indexOf("?")+1)+"&"+e.param(t.data)),s.addClass("loading"),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(r){if(n.empty().append(e(r).children()),a&&n.find(':input[name="'+a+'"]').focus(),n.find(".filter-header").length){var o;"show"==t.data[0].filter?(o='<span class="non-sortable"></span>',n.addClass("show-filter").find(".filter-header").show()):(o='<button type="button" name="showFilter" class="ss-gridfield-button-filter trigger"></button>',n.removeClass("show-filter").find(".filter-header").hide()),n.find(".sortable-header th:last").html(o)}s.removeClass("loading"),i&&i.apply(this,arguments),n.trigger("reload",n)},error:function(e){alert(o["default"]._t("GRIDFIELD.ERRORINTRANSACTION")),s.removeClass("loading")}},t))},showDetailView:function(e){window.location.href=e},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(e,t){var i=this.getState();i[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(i))},getState:function(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())}}),e(".ss-gridfield *").entwine({getGridField:function(){return this.closest(".ss-gridfield")}}),e(".ss-gridfield :button[name=showFilter]").entwine({onclick:function(t){e(".filter-header").show("slow").find(":input:first").focus(),this.closest(".ss-gridfield").addClass("show-filter"),this.parent().html('<span class="non-sortable"></span>'),t.preventDefault()}}),e(".ss-gridfield .ss-gridfield-item").entwine({onclick:function(t){if(e(t.target).closest(".action").length)return this._super(t),!1;var i=this.find(".edit-link");i.length&&this.getGridField().showDetailView(i.prop("href"))},onmouseover:function(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".ss-gridfield .action").entwine({onclick:function(e){var t="show";return this.button("option","disabled")?void e.preventDefault():(!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(t="hidden"),this.getGridField().reload({data:[{name:this.attr("name"),value:this.val(),filter:t}]}),void e.preventDefault())},actionurl:function(){var t=this.closest(":button"),i=this.getGridField(),n=this.closest("form"),s=n.find(":input.gridstate").serialize(),a=n.find('input[name="SecurityID"]').val();s+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),a&&(s+="&SecurityID="+encodeURIComponent(a)),window.location.search&&(s=window.location.search.replace(/^\?/,"")+"&"+s);var r=-1==i.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(i.data("url")+r+s,e("base").attr("href"))}}),e(".ss-gridfield .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),i=""!==t.val(),n=e.is(":disabled");(i&&n||!i&&!n)&&e.button("option","disabled",!n)}}),e(".ss-gridfield .col-buttons .action.gridfield-button-delete, .cms-edit-form .Actions button.action.action-delete").entwine({onclick:function(e){return confirm(o["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(e):(e.preventDefault(),!1)}}),e(".ss-gridfield .action.gridfield-button-print").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var t=this.actionurl();return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus();var e=this.contentWindow||this;e.print()})},onunmatch:function(){this._super()}}),e(".ss-gridfield .action.no-ajax").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".ss-gridfield .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".ss-gridfield[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".ss-gridfield[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".ss-gridfield .filter-header :input").entwine({onmatch:function(){var e=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),t=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(e){if(!this.closest(".ss-gridfield-button-reset").length){var t=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),i=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");if("13"==e.keyCode){var n=this.closest(".filter-header").find(".ss-gridfield-button-filter"),s="show";return!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(s="hidden"),this.getGridField().reload({data:[{name:n.attr("name"),value:n.val(),filter:s}]}),!1}t.addClass("hover-alike"),i.addClass("hover-alike")}}}),e(".ss-gridfield .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,i){var n=e(this.element);e(this.element).closest("form");e.ajax({headers:{"X-Pjax":"Partial"},type:"GET",url:e(n).data("searchUrl"),data:encodeURIComponent(n.attr("name"))+"="+encodeURIComponent(n.val()),success:function(t){i(e.map(JSON.parse(t),function(e,t){return{label:e,value:e,id:t}}))},error:function(e){alert(o["default"]._t("GRIDFIELD.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,i){e(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith('<input type="hidden" name="relationID" value="'+i.item.id+'" id="relationID"/>');var n=e(this).closest(".ss-gridfield").find("#action_gridfield_relationadd");n.data("button")?n.button("enable"):n.removeAttr("disabled")}})}}),e(".ss-gridfield .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){var i=parseInt(e(this).val(),10),n=e(this).getGridField();return n.setState("GridFieldPaginator",{currentPage:i}),n.reload(),!1}}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],15:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _jQuery=require("./jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("./i18n"),_i18n2=_interopRequireDefault(_i18n),ss="undefined"!=typeof window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(e){editorID=e,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var e="#"+editorID,t=(0,_jQuery2["default"])(e).data("config"),i=this;return t.selector=e,t.setup=function(e){e.on("change",function(){i.save()})},t},save:function(){var e=this.getInstance();e.save(),(0,_jQuery2["default"])(e.getElement()).trigger("change")},create:function(){var e=this.getConfig();"undefined"!=typeof e.baseURL&&(tinymce.EditorManager.baseURL=e.baseURL),tinymce.init(e)},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().setContent(e,t)},insertContent:function(e,t){this.getInstance().insertContent(e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t){this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback;return cb&&(href=eval(cb+"(href, node, true);")),href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers["default"]=ss.editorWrappers.tinyMCE,_jQuery2["default"].entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),t.init(this.attr("id")),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save(),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openDialog:function(t){var i=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},n=this,s=e("#cms-editor-dialogs").data("url"+i(t)+"form"),a=e(".htmleditorfield-"+t+"dialog");a.length?(a.getForm().setElement(this),a.html(""),a.addClass("loading"),a.open()):(a=e('<div class="htmleditorfield-dialog htmleditorfield-'+t+'dialog loading">'),e("body").append(a)),e.ajax({url:s,complete:function(){a.removeClass("loading")},success:function(e){a.html(e),a.getForm().setElement(n),a.trigger("ssdialogopen")}})}}),e(".htmleditorfield-dialog").entwine({onadd:function(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,buttons:{insert:{text:_i18n2["default"]._t("HtmlEditorField.INSERT","Insert"),"data-icon":"accept","class":"ss-ui-action-constructive media-insert",click:function(){e(this).find("form").submit()}}}}),this._super()},getForm:function(){return this.find("form")},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(e){this.is(":visible")?this.close():this.open()},onscroll:function(){this.animate({scrollTop:this.find("form").height()},500)}}),e("form.htmleditorfield-form").entwine({Selection:null,Bookmark:null,Element:null,setSelection:function(t){return this._super(e(t))},onadd:function(){var e=this.find(":header:first");this.getDialog().attr("title",e.text()),this._super()},onremove:function(){this.setSelection(null),this.setBookmark(null),this.setElement(null),this._super()},getDialog:function(){return this.closest(".htmleditorfield-dialog")},fromDialog:{onssdialogopen:function(){var e=this.getEditor();this.setSelection(e.getSelectedNode()),this.setBookmark(e.createBookmark()),e.blur(),this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:enabled").eq(0).focus(),this.redraw(),this.updateFromEditor()},onssdialogclose:function(){var e=this.getEditor();e.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function(){return this.getElement().getEditor()},modifySelection:function(e){var t=this.getEditor();t.moveToBookmark(this.getBookmark()),e.call(this,t),this.setSelection(t.getSelectedNode()),this.setBookmark(t.createBookmark()),t.blur()},updateFromEditor:function(){},redraw:function(){},resetFields:function(){this.find(".tree-holder").empty()}}),e("form.htmleditorfield-linkform").entwine({onsubmit:function(e){return this.insertLink(),this.getDialog().close(),!1},resetFields:function(){this._super(),this[0].reset()},redraw:function(){this._super();var e=this.find(":input[name=LinkType]:checked").val();this.addAnchorSelector(),this.resetFileField(),this.find("div.content .field").hide(),this.find('.field[id$="LinkType"]').show(),this.find('.field[id$="'+e+'_Holder"]').show(),"internal"!=e&&"anchor"!=e||this.find('.field[id$="Anchor_Holder"]').show(),"email"==e?this.find('.field[id$="Subject_Holder"]').show():this.find('.field[id$="TargetBlank_Holder"]').show(),"anchor"==e&&this.find('.field[id$="AnchorSelector_Holder"]').show(),this.find('.field[id$="Description_Holder"]').show()},getLinkAttributes:function(){var e,t=null,i=this.find(":input[name=Subject]").val(),n=this.find(":input[name=Anchor]").val();switch(this.find(":input[name=TargetBlank]").is(":checked")&&(t="_blank"),this.find(":input[name=LinkType]:checked").val()){case"internal":e="[sitetree_link,id="+this.find(":input[name=internal]").val()+"]",n&&(e+="#"+n);break;case"anchor":e="#"+n;break;case"file":var s=this.find(".ss-uploadfield .ss-uploadfield-item").attr("data-fileid");e=s?"[file_link,id="+s+"]":"";break;case"email":e="mailto:"+this.find(":input[name=email]").val(),i&&(e+="?subject="+encodeURIComponent(i)),t=null;break;default:e=this.find(":input[name=external]").val(),-1==e.indexOf("://")&&(e="http://"+e)}return{href:e,target:t,title:this.find(":input[name=Description]").val()}},insertLink:function(){this.modifySelection(function(e){e.insertLink(this.getLinkAttributes())})},removeLink:function(){this.modifySelection(function(e){e.removeLink()}),this.resetFileField(),this.close()},resetFileField:function(){var e=this.find('.ss-uploadfield[id$="file_Holder"]'),t=e.data("fileupload"),i=e.find(".ss-uploadfield-item[data-fileid]");i.length&&(t._trigger("destroy",null,{context:i}),e.find(".ss-uploadfield-addfile").removeClass("borderTop"))},addAnchorSelector:function(){if(!this.find(":input[name=AnchorSelector]").length){var t=this,i=e('<select id="Form_EditorToolbarLinkForm_AnchorSelector" name="AnchorSelector"></select>');this.find(":input[name=Anchor]").parent().append(i),this.updateAnchorSelector(),i.change(function(i){t.find(':input[name="Anchor"]').val(e(this).val())})}},getAnchors:function(){var t=this.find(":input[name=LinkType]:checked").val(),i=e.Deferred();switch(t){case"anchor":var n=[],s=this.getEditor();if(s){var a=s.getContent().match(/\s+(name|id)\s*=\s*(["'])([^\2\s>]*?)\2|\s+(name|id)\s*=\s*([^"']+)[\s +>]/gim);if(a&&a.length)for(var r=0;r<a.length;r++){var o=-1==a[r].indexOf("id=")?7:5;n.push(a[r].substr(o).replace(/"$/,""))}}i.resolve(n);break;case"internal":var l=this.find(":input[name=internal]").val();l?e.ajax({url:e.path.addSearchParams(this.attr("action").replace("LinkForm","getanchors"),{PageID:parseInt(l)}),success:function(t,n,s){i.resolve(e.parseJSON(t))},error:function(e,t){i.reject(e.responseText)}}):i.resolve([]);break;default:i.reject(_i18n2["default"]._t("HtmlEditorField.ANCHORSNOTSUPPORTED","Anchors are not supported for this link type."))}return i.promise()},updateAnchorSelector:function(){var t=this.find(":input[name=AnchorSelector]"),i=this.getAnchors();t.empty(),t.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.LOOKINGFORANCHORS","Looking for anchors...")+"</option>")),i.done(function(i){if(t.empty(),t.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.SelectAnchor")+"</option>")),i)for(var n=0;n<i.length;n++)t.append(e('<option value="'+i[n]+'">'+i[n]+"</option>"))}).fail(function(i){t.empty(),t.append(e('<option value="" selected="1">'+i+"</option>"))}),e.browser.msie&&t.hide().show()},updateFromEditor:function(){var e,t=/<\S[^><]*>/g,i=this.getCurrentLink();if(i)for(e in i){var n=this.find(":input[name="+e+"]"),s=i[e];"string"==typeof s&&(s=s.replace(t,"")),n.is(":checkbox")?n.prop("checked",s).change():n.is(":radio")?n.val([s]).change():"file"==e?(n=this.find(':input[name="'+e+'[Uploads][]"]'),n=n.parents(".ss-uploadfield"),function a(e,t){e.getConfig()?e.attachFiles([t]):setTimeout(function(){a(e,t)},50)}(n,s)):n.val(s).change()}},getCurrentLink:function(){var e=this.getSelection(),t="",i="",n="",s="insert",a="",r=null;return e.length&&(r=e.is("a")?e:e=e.parents("a:first")),r&&r.length&&this.modifySelection(function(e){e.selectNode(r[0])}),r.attr("href")||(r=null),r&&(t=r.attr("href"),i=r.attr("target"),n=r.attr("title"),a=r.attr("class"),t=this.getEditor().cleanLink(t,r),s="update"),t.match(/^mailto:(.*)$/)?{LinkType:"email",email:RegExp.$1,Description:n}:t.match(/^(assets\/.*)$/)||t.match(/^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/)?{LinkType:"file",file:RegExp.$1,Description:n,TargetBlank:!!i}:t.match(/^#(.*)$/)?{LinkType:"anchor",Anchor:RegExp.$1,Description:n,TargetBlank:!!i}:t.match(/^\[sitetree_link(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/i)?{LinkType:"internal",internal:RegExp.$1,Anchor:RegExp.$2?RegExp.$2.substr(1):"",Description:n,TargetBlank:!!i}:t?{LinkType:"external",external:t,Description:n,TargetBlank:!!i}:null}}),e("form.htmleditorfield-linkform input[name=LinkType]").entwine({onclick:function(e){this.parents("form:first").redraw(),this._super()},onchange:function(){this.parents("form:first").redraw();var e=this.parent().find(":checked").val();"anchor"!==e&&"internal"!==e||this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform input[name=internal]").entwine({onvalueupdated:function(){this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform :submit[name=action_remove]").entwine({onclick:function(e){return this.parents("form:first").removeLink(),this._super(),!1}}),e("form.htmleditorfield-mediaform").entwine({toggleCloseButton:function(){var e=Boolean(this.find(".ss-htmleditorfield-file").length);this.find(".overview .action-delete")[e?"hide":"show"]()},onsubmit:function(){return this.modifySelection(function(t){this.find(".ss-htmleditorfield-file").each(function(){e(this).insertHTML(t)})}),this.getDialog().close(),!1},updateFromEditor:function(){var e=this,t=this.getSelection();t.is("img")&&this.showFileView(t.data("url")||t.attr("src")).done(function(i){i.updateFromNode(t),e.toggleCloseButton(),e.redraw()}),this.redraw()},redraw:function(t){this._super();var i=this.getSelection(),n=Boolean(this.find(".ss-htmleditorfield-file").length),s=i.is("img"),a=this.hasClass("insertingURL"),r=this.find(".header-edit");r[n?"show":"hide"](),this.closest("ui-dialog").find("ui-dialog-buttonpane .media-insert").button(n?"enable":"disable").toggleClass("ui-state-disabled",!n),this.find(".htmleditorfield-default-panel")[s||a?"hide":"show"](),this.find(".htmleditorfield-web-panel")[s||!a?"hide":"show"]();var o=this.find(".htmleditorfield-mediaform-heading.insert");s?o.hide():a?(o.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTURL")).prepend('<button class="back-button font-icon-left-open no-text" title="'+_i18n2["default"]._t("HtmlEditorField.BACK")+'"></button>'),this.find(".htmleditorfield-web-panel input.remoteurl").focus()):o.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTFROM")).find(".back-button").remove(),this.find(".htmleditorfield-mediaform-heading.update")[s?"show":"hide"](),this.find(".ss-uploadfield-item-actions")[s?"hide":"show"](),this.find(".ss-uploadfield-item-name")[s?"hide":"show"](),this.find(".ss-uploadfield-item-preview")[s?"hide":"show"](),this.find(".Actions .media-update")[s?"show":"hide"](),this.find(".ss-uploadfield-item-editform").toggleEditForm(s),this.find(".htmleditorfield-from-cms .field.treedropdown").css("left",e(".htmleditorfield-mediaform-heading:visible").outerWidth()),this.closest(".ui-dialog").addClass("ss-uploadfield-dropzone"),this.closest(".ui-dialog").find(".ui-dialog-buttonpane .media-insert .ui-button-text").text([s?_i18n2["default"]._t("HtmlEditorField.UPDATE","Update"):_i18n2["default"]._t("HtmlEditorField.INSERT","Insert")])},resetFields:function(){this.find(".ss-htmleditorfield-file").remove(),this.find(".ss-gridfield-items .ui-selected").removeClass("ui-selected"),this.find("li.ss-uploadfield-item").remove(),this.redraw(),this._super()},getFileView:function(e){return this.find(".ss-htmleditorfield-file[data-id="+e+"]")},showFileView:function(t){var i=this,n=Number(t)==t?{ID:t}:{FileURL:t},s=e('<div class="ss-htmleditorfield-file loading" />');this.find(".content-edit").prepend(s);var a=e.Deferred();return e.ajax({url:e.path.addSearchParams(this.attr("action").replace(/MediaForm/,"viewfile"),n),success:function(t,n,r){var o=e(t).filter(".ss-htmleditorfield-file");s.replaceWith(o),i.redraw(),a.resolve(o)},error:function(){s.remove(),a.reject()}}),a.promise()}}),e("form.htmleditorfield-mediaform div.ss-upload .upload-url").entwine({onclick:function(){var e=this.closest("form");e.addClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .htmleditorfield-mediaform-heading .back-button").entwine({onclick:function(){var e=this.closest("form");e.removeClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .ss-gridfield-items").entwine({onselectableselected:function(t,i){var n=this.closest("form"),s=e(i.selected);s.is(".ss-gridfield-item")&&(n.closest("form").showFileView(s.data("id")),n.redraw(),n.parent().trigger("scroll"))},onselectableunselected:function(t,i){var n=this.closest("form"),s=e(i.unselected);s.is(".ss-gridfield-item")&&(n.getFileView(s.data("id")).remove(),n.redraw())}}),e("form.htmleditorfield-form.htmleditorfield-mediaform div.ss-assetuploadfield").entwine({onfileuploadstop:function(t){var i=this.closest("form"),n=[];i.find("div.content-edit").find("div.ss-htmleditorfield-file").each(function(){n.push(e(this).data("id"))});var s=e(".ss-uploadfield-files",this).children(".ss-uploadfield-item");s.each(function(){var t=e(this).data("fileid");t&&-1==e.inArray(t,n)&&(e(this).remove(),i.showFileView(t))}),i.parent().trigger("scroll"),i.redraw()}}),e("form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl").entwine({onadd:function(){this._super(),this.validate()},onkeyup:function(){this.validate()},onchange:function(){this.validate()},getAddButton:function(){return this.closest(".CompositeField").find("button.add-url")},validate:function(){var t=this.val(),i=t;return t=e.trim(t),t=t.replace(/^https?:\/\//i,""),i!==t&&this.val(t),this.getAddButton().button(t?"enable":"disable"),!!t}}),e("form.htmleditorfield-form.htmleditorfield-mediaform .add-url").entwine({getURLField:function(){return this.closest(".CompositeField").find("input.remoteurl")},onclick:function(e){var t=this.getURLField(),i=this.closest(".CompositeField"),n=this.closest("form");return t.validate()&&(i.addClass("loading"),n.showFileView("http://"+t.val()).done(function(){i.removeClass("loading"),n.parent().trigger("scroll")}),n.redraw()),!1}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file").entwine({getAttributes:function(){},getExtraData:function(){},getHTML:function(){return e("<div>").append(e("<a/>").attr({href:this.data("url")}).text(this.find(".name").text())).html()},insertHTML:function(e){e.replaceContent(this.getHTML())},updateFromNode:function(e){},updateDimensions:function(e,t,i){var n,s=this.find(":input[name=Width]"),a=this.find(":input[name=Height]"),r=s.val(),o=a.val();r&&o&&(e?(n=a.getOrigVal()/s.getOrigVal(),"Width"==e?(t&&r>t&&(r=t),o=Math.floor(r*n)):"Height"==e&&(i&&o>i&&(o=i),r=Math.ceil(o/n))):(t&&r>t&&(r=t),i&&o>i&&(o=i)),s.val(r),a.val(o))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.image").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),alt:this.find(":input[name=AltText]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,title:this.find(":input[name=Title]").val(),"class":this.find(":input[name=CSSClass]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){return{CaptionText:this.find(":input[name=CaptionText]").val()}},getHTML:function(){},insertHTML:function(t){var i=this.closest("form"),n=i.getSelection();t||(t=i.getEditor());var s=this.getAttributes(),a=this.getExtraData(),r=n&&n.is("img")?n:null;r&&r.parent().is(".captionImage")&&(r=r.parent());var o=n&&n.is("img")?n:e("<img />");o.attr(s);var l=o.parent(".captionImage"),h=l.find(".caption");a.CaptionText?(l.length||(l=e("<div></div>")),l.attr("class","captionImage "+s["class"]).css("width",s.width),h.length||(h=e('<p class="caption"></p>').appendTo(l)),h.attr("class","caption "+s["class"]).text(a.CaptionText)):l=h=null;var c=l?l:o;r&&r.not(c).length&&r.replaceWith(c),l&&l.prepend(o),r||(t.repaint(),t.insertContent(e("<div />").append(c).html(),{skip_undo:1})),t.addUndo(),t.repaint()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.attr("class")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=CaptionText]").val(e.siblings(".caption:first").text()),this.find(":input[name=FileID]").val(e.data("fileid"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.flash").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"data-fileid":this.find(":input[name=FileID]").val()}},getHTML:function(){var t=this.getAttributes(),i=tinyMCE.activeEditor.plugins.media.dataToImg({type:"flash",width:t.width,height:t.height,params:{src:t.src},video:{sources:[]}});return e("<div />").append(i).html()},updateFromNode:function(e){}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.embed").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"class":this.find(":input[name=CSSClass]").val(),alt:this.find(":input[name=AltText]").val(),title:this.find(":input[name=Title]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{CaptionText:this.find(":input[name=CaptionText]").val(),Url:this.find(":input[name=URL]").val(),thumbnail:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,cssclass:this.find(":input[name=CSSClass]").val()}},getHTML:function(){var t,i=this.getAttributes(),n=this.getExtraData(),s=e("<img />").attr(i).addClass("ss-htmleditorfield-file embed");return e.each(n,function(e,t){s.attr("data-"+e,t)}),t=n.CaptionText?e('<div style="width: '+i.width+'px;" class="captionImage '+i["class"]+'"><p class="caption">'+n.CaptionText+"</p></div>").prepend(s):s,e("<div />").append(t).html()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.data("cssclass")),this.find(":input[name=FileID]").val(e.data("fileid"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file .dimensions :input").entwine({OrigVal:null,onmatch:function(){this._super(),this.setOrigVal(parseInt(this.val(),10))},onunmatch:function(){this._super()},onfocusout:function(e){this.closest(".ss-htmleditorfield-file").updateDimensions(this.attr("name"))}}),e("form.htmleditorfield-mediaform .ss-uploadfield-item .ss-uploadfield-item-cancel").entwine({onclick:function(e){var t=this.closest("form"),i=this.closest("ss-uploadfield-item");t.find(".ss-gridfield-item[data-id="+i.data("id")+"]").removeClass("ui-selected"),this.closest(".ss-uploadfield-item").remove(),t.redraw(),e.preventDefault()}}),e("div.ss-assetuploadfield .ss-uploadfield-item-edit, div.ss-assetuploadfield .ss-uploadfield-item-name").entwine({getEditForm:function(){return this.closest(".ss-uploadfield-item").find(".ss-uploadfield-item-editform")},fromEditForm:{onchange:function(t){var i=e(t.target);i.removeClass("edited"),i.addClass("edited")}},onclick:function(e){var t=this.getEditForm();return this.closest(".ss-uploadfield-item").hasClass("ss-htmleditorfield-file")?(t.parent("ss-uploadfield-item").removeClass("ui-state-warning"),t.toggleEditForm(),e.preventDefault(),!1):void this._super(e)}}),e("div.ss-assetuploadfield .ss-uploadfield-item-editform").entwine({toggleEditForm:function(e){var t=this.prev(".ss-uploadfield-item-info"),i=t.find(".ss-uploadfield-item-status"),n="";e===!0||e!==!1&&0===this.height()?(n=_i18n2["default"]._t("UploadField.Editing","Editing ..."),this.height("auto"),t.find(".toggle-details-icon").addClass("opened"),i.removeClass("ui-state-success-text").removeClass("ui-state-warning-text")):(this.height(0),t.find(".toggle-details-icon").removeClass("opened"),this.hasClass("edited")?(n=_i18n2["default"]._t("UploadField.CHANGESSAVED","Changes Made"),this.removeClass("edited"),i.addClass("ui-state-success-text")):(n=_i18n2["default"]._t("UploadField.NOCHANGES","No Changes"),i.addClass("ui-state-success-text"))),i.attr("title",n).text(n)}}),e('form.htmleditorfield-mediaform .field[id$="ParentID_Holder"] .TreeDropdownField').entwine({onadd:function(){this._super();var e=this;this.bind("change",function(){var t=e.closest("form").find(".ss-gridfield");t.setState("ParentID",e.getValue()),t.reload()})}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],16:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s);a["default"].entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){var e=window.location.hash;this.redrawTabs(),""!==e&&this.openTabFromURL(e),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks(),this.tabs()},openTabFromURL:function(t){var i;e.each(this.find(".cms-panel-link"),function(){return-1!==this.href.indexOf(t)&&1===e(t).length?(i=e(this),!1):void 0}),void 0!==i&&e(window).one("ajaxComplete",function(){i.click()})},rewriteHashlinks:function(){e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr("href").match(/#.*/);t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}})})},{"./jQuery":"jQuery"}],17:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s),r=e("./i18n"),o=n(r);a["default"].entwine("ss",function(e){var t,i;e(window).bind("resize.treedropdownfield",function(){
var n=function(){e(".TreeDropdownField").closePanel()};if(e.browser.msie&&parseInt(e.browser.version,10)<9){var s=e(window).width(),a=e(window).height();s==t&&a==i||(t=s,i=a,n())}else n()});var n={openlink:o["default"]._t("TreeDropdownField.OpenLink"),fieldTitle:"("+o["default"]._t("TreeDropdownField.FieldTitle")+")",searchFieldTitle:"("+o["default"]._t("TreeDropdownField.SearchFieldTitle")+")"},s=function(t){e(t.target).parents(".TreeDropdownField").length||e(".TreeDropdownField").closePanel()};e(".TreeDropdownField").entwine({CurrentXhr:null,onadd:function(){this.append('<span class="treedropdownfield-title"></span><div class="treedropdownfield-toggle-panel-link"><a href="#" class="ui-icon ui-icon-triangle-1-s"></a></div><div class="treedropdownfield-panel"><div class="tree-holder"></div></div>');var e=n.openLink;e&&this.find("treedropdownfield-toggle-panel-link a").attr("title",e),this.data("title")&&this.setTitle(this.data("title")),this.getPanel().hide(),this._super()},getPanel:function(){return this.find(".treedropdownfield-panel")},openPanel:function(){e(".TreeDropdownField").closePanel(),e("body").bind("click",s);var t=this.getPanel(),i=this.find(".tree-holder");t.css("width",this.width()),t.show();var n=this.find(".treedropdownfield-toggle-panel-link");n.addClass("treedropdownfield-open-tree"),this.addClass("treedropdownfield-open-tree"),n.find("a").removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-n"),i.is(":empty")&&!t.hasClass("loading")?this.loadTree(null,this._riseUp):this._riseUp(),this.trigger("panelshow")},_riseUp:function(){var t,i,n,s=this,a=this.getPanel(),r=this.find(".treedropdownfield-toggle-panel-link"),o=r.innerHeight();r.length>0&&(n=e(window).height()+e(document).scrollTop()-r.innerHeight(),i=r.offset().top,t=a.innerHeight(),i+t>n&&i-t>0?(s.addClass("treedropdownfield-with-rise"),o=-a.outerHeight()):s.removeClass("treedropdownfield-with-rise")),a.css({top:o+"px"})},closePanel:function(){jQuery("body").unbind("click",s);var e=this.find(".treedropdownfield-toggle-panel-link");e.removeClass("treedropdownfield-open-tree"),this.removeClass("treedropdownfield-open-tree treedropdownfield-with-rise"),e.find("a").removeClass("ui-icon-triangle-1-n").addClass("ui-icon-triangle-1-s"),this.getPanel().hide(),this.trigger("panelhide")},togglePanel:function(){this[this.getPanel().is(":visible")?"closePanel":"openPanel"]()},setTitle:function(e){e=e||this.data("title")||n.fieldTitle,this.find(".treedropdownfield-title").html(e),this.data("title",e)},getTitle:function(){return this.find(".treedropdownfield-title").text()},updateTitle:function(){var e=this,t=e.find(".tree-holder"),i=this.getValue(),n=function(){var i=e.getValue();if(i){var n=t.find('*[data-id="'+i+'"]'),s=n.children("a").find("span.jstree_pageicon")?n.children("a").find("span.item").html():null;s||(s=n.length>0?t.jstree("get_text",n[0]):null),s&&(e.setTitle(s),e.data("title",s)),n&&t.jstree("select_node",n)}else e.setTitle(e.data("empty-title")),e.removeData("title")};t.is(":empty")&&i?this.loadTree({forceValue:i},n):n()},setValue:function(t){this.data("metadata",e.extend(this.data("metadata"),{id:t})),this.find(":input:hidden").val(t).trigger("valueupdated").trigger("change")},getValue:function(){return this.find(":input:hidden").val()},loadTree:function(t,i){var n,s=this,a=this.getPanel(),r=e(a).find(".tree-holder"),t=t?e.extend({},this.getRequestParams(),t):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),a.addClass("loading"),n=e.ajax({url:this.data("urlTree"),data:t,complete:function(e,t){a.removeClass("loading")},success:function(t,n,a){r.html(t);var o=!0;r.jstree("destroy").bind("loaded.jstree",function(e,t){var n=s.getValue(),a=r.find('*[data-id="'+n+'"]'),l=t.inst.get_selected();n&&a!=l&&t.inst.select_node(a),o=!1,i&&i.apply(s)}).jstree(s.getTreeConfig()).bind("select_node.jstree",function(t,i){var n=i.rslt.obj,a=e(n).data("id");o||s.getValue()!=a?(s.data("metadata",e.extend({id:a},e(n).getMetaData())),s.setTitle(i.inst.get_text(n)),s.setValue(a)):(s.data("metadata",null),s.setTitle(null),s.setValue(null),i.inst.deselect_node(n)),o||s.closePanel(),o=!1}),s.setCurrentXhr(null)}}),this.setCurrentXhr(n)},getTreeConfig:function(){var t=this;return{core:{html_titles:!0,animation:0},html_data:{data:this.getPanel().find(".tree-holder").html(),ajax:{url:function i(n){var i=e.path.parseUrl(t.data("urlTree")).hrefNoSearch;return i+"/"+(e(n).data("id")?e(n).data("id"):0)},data:function(i){var n=e.query.load(t.data("urlTree")).keys,s=t.getRequestParams();return s=e.extend({},n,s,{ajax:1})}}},ui:{select_limit:1,initially_select:[this.getPanel().find(".current").attr("id")]},themes:{theme:"apple"},types:{types:{"default":{check_node:function(e){return!e.hasClass("disabled")},uncheck_node:function(e){return!e.hasClass("disabled")},select_node:function(e){return!e.hasClass("disabled")},deselect_node:function(e){return!e.hasClass("disabled")}}}},plugins:["html_data","ui","themes","types"]}},getRequestParams:function(){return{}}}),e(".TreeDropdownField .tree-holder li").entwine({getMetaData:function(){var e=this.attr("class").match(/class-([^\s]*)/i),t=e?e[1]:"";return{ClassName:t}}}),e(".TreeDropdownField *").entwine({getField:function(){return this.parents(".TreeDropdownField:first")}}),e(".TreeDropdownField").entwine({onclick:function(e){return this.togglePanel(),!1}}),e(".TreeDropdownField .treedropdownfield-panel").entwine({onclick:function(e){return!1}}),e(".TreeDropdownField.searchable").entwine({onadd:function(){this._super();var t=o["default"]._t("TreeDropdownField.ENTERTOSEARCH");this.find(".treedropdownfield-panel").prepend(e('<input type="text" class="search treedropdownfield-search" data-skip-autofocus="true" placeholder="'+t+'" value="" />'))},search:function(e,t){this.openPanel(),this.loadTree({search:e},t)},cancelSearch:function(){this.closePanel(),this.loadTree()}}),e(".TreeDropdownField.searchable input.search").entwine({onkeydown:function(e){var t=this.getField();return 13==e.keyCode?(t.search(this.val()),!1):void(27==e.keyCode&&t.cancelSearch())}}),e(".TreeDropdownField.multiple").entwine({getTreeConfig:function(){var e=this._super();return e.checkbox={override_ui:!0,two_state:!0},e.plugins.push("checkbox"),e.ui.select_limit=-1,e},loadTree:function(t,i){var n,s=this,a=this.getPanel(),r=e(a).find(".tree-holder"),t=t?e.extend({},this.getRequestParams(),t):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),a.addClass("loading"),n=e.ajax({url:this.data("urlTree"),data:t,complete:function(e,t){a.removeClass("loading")},success:function(t,n,a){r.html(t);var o=!0;s.setCurrentXhr(null),r.jstree("destroy").bind("loaded.jstree",function(t,n){e.each(s.getValue(),function(e,t){n.inst.check_node(r.find("*[data-id="+t+"]"))}),o=!1,i&&i.apply(s)}).jstree(s.getTreeConfig()).bind("uncheck_node.jstree check_node.jstree",function(t,i){var n=i.inst.get_checked(null,!0);s.setValue(e.map(n,function(t,i){return e(t).data("id")})),s.setTitle(e.map(n,function(e,t){return i.inst.get_text(e)})),s.data("metadata",e.map(n,function(t,i){return{id:e(t).data("id"),metadata:e(t).getMetaData()}}))})}}),this.setCurrentXhr(n)},getValue:function(){var e=this._super();return e.split(/ *, */)},setValue:function(t){this._super(e.isArray(t)?t.join(","):t)},setTitle:function(t){this._super(e.isArray(t)?t.join(", "):t)},updateTitle:function(){}}),e(".TreeDropdownField input[type=hidden]").entwine({onadd:function(){this._super(),this.bind("change.TreeDropdownField",function(){e(this).getField().updateTitle()})},onremove:function(){this._super(),this.unbind(".TreeDropdownField")}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],18:[function(e,t,i){!function(e){e.fn.changetracker=function(t){var i=this;if(this.length>1)return this.each(function(e,i){this.changetracker(t)}),this;this.defaults={fieldSelector:":input:not(:submit)",ignoreFieldSelector:"",changedCssClass:"changed"};var n=e.extend({},this.defaults,t);if(this.initialize=function(){e.meta&&(n=e.extend({},n,this.data()));var t,s=!1,a=function(t){var a,r=e(t.target),o=r.data("changetracker.origVal");a=r.is(":checkbox")?r.is(":checked")?1:0:r.val(),null===o||a!=o?(r.addClass(n.changedCssClass),i.addClass(n.changedCssClass)):(r.removeClass(n.changedCssClass),r.is(":radio")&&i.find(":radio[name="+r.attr("name")+"]").removeClass(n.changedCssClass),s||i.getFields().filter("."+n.changedCssClass).length||i.removeClass(n.changedCssClass))},r=this.getFields();r.filter(":radio,:checkbox").bind("click.changetracker",a),r.not(":radio,:checkbox").bind("change.changetracker",a),r.each(function(){t=e(this).is(":radio,:checkbox")?i.find(":input[name="+e(this).attr("name")+"]:checked").val():e(this).val(),e(this).data("changetracker.origVal",t)}),i.bind("dirty.changetracker",function(){s=!0,i.addClass(n.changedCssClass)}),this.data("changetracker",!0)},this.destroy=function(){this.getFields().unbind(".changetracker").removeClass(n.changedCssClass).removeData("changetracker.origVal"),this.unbind(".changetracker").removeData("changetracker")},this.reset=function(){this.getFields().each(function(){i.resetField(this)}),this.removeClass(n.changedCssClass)},this.resetField=function(t){return e(t).removeData("changetracker.origVal").removeClass("changed")},this.getFields=function(){return this.find(n.fieldSelector).not(n.ignoreFieldSelector)},"string"==typeof arguments[0]){var s=(arguments[1],Array.prototype.slice.call(arguments));return s.splice(0,1),this[arguments[0]].apply(this,s)}return this.initialize()}}(jQuery)},{}],19:[function(e,t,i){jQuery.cookie=function(e,t,i){if("undefined"==typeof t){var n=null;if(document.cookie&&""!=document.cookie)for(var s=document.cookie.split(";"),a=0;a<s.length;a++){var r=jQuery.trim(s[a]);if(r.substring(0,e.length+1)==e+"="){n=decodeURIComponent(r.substring(e.length+1));break}}return n}i=i||{},null===t&&(t="",i=jQuery.extend({},i),i.expires=-1);var o="";if(i.expires&&("number"==typeof i.expires||i.expires.toUTCString)){var l;"number"==typeof i.expires?(l=new Date,l.setTime(l.getTime()+24*i.expires*60*60*1e3)):l=i.expires,o="; expires="+l.toUTCString()}var h=i.path?"; path="+i.path:"",c=i.domain?"; domain="+i.domain:"",d=i.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(t),o,h,c,d].join("")}},{}],20:[function(e,t,i){var n;!function(){var e={},t=/xyz/.test(function(){})?/\b_super\b/:/.*/;n=function(){},n.addMethod=function(e,i){var n=this._super&&this._super.prototype;n&&t.test(i)?this.prototype[e]=function(){var t=this._super;this._super=n[e];try{var s=i.apply(this,arguments)}finally{this._super=t}return s}:this.prototype[e]=i},n.addMethods=function(e){for(var t in e)"function"==typeof e[t]?this.addMethod(t,e[t]):this.prototype[t]=e[t]},n.subclassOf=function(e){for(var t=this;t;){if(t===e)return!0;t=t._super}},n.extend=function(t){var i=function(){if(arguments[0]!==e){if(!(this instanceof i)){var t=new i(e);return t.init&&t.init.apply(t,arguments),t}this.init&&this.init.apply(this,arguments)}};return i.constructor=i,i.extend=n.extend,i.addMethod=n.addMethod,i.addMethods=n.addMethods,i.subclassOf=n.subclassOf,i._super=this,i.prototype=new this(e),i.prototype.constructor=i,i.addMethods(t),i}}(),function(e){var t={UNICODE:/\\[0-9a-f]{1,6}(?:\r\n|[ \n\r\t\f])?/,ESCAPE:/(?:UNICODE)|\\[^\n\r\f0-9a-f]/,NONASCII:/[^\x00-\x7F]/,NMSTART:/[_a-z]|(?:NONASCII)|(?:ESCAPE)/,NMCHAR:/[_a-z0-9-]|(?:NONASCII)|(?:ESCAPE)/,IDENT:/-?(?:NMSTART)(?:NMCHAR)*/,NL:/\n|\r\n|\r|\f/,STRING:/(?:STRING1)|(?:STRING2)|(?:STRINGBARE)/,STRING1:/"(?:(?:ESCAPE)|\\(?:NL)|[^\n\r\f\"])*"/,STRING2:/'(?:(?:ESCAPE)|\\(?:NL)|[^\n\r\f\'])*'/,STRINGBARE:/(?:(?:ESCAPE)|\\(?:NL)|[^\n\r\f\]])*/,FUNCTION:/(?:IDENT)\(\)/,INTEGER:/[0-9]+/,WITHN:/([-+])?(INTEGER)?(n)\s*(?:([-+])\s*(INTEGER))?/,WITHOUTN:/([-+])?(INTEGER)/},i={not:/:not\(/,not_end:/\)/,tag:/((?:IDENT)|\*)/,id:/#(IDENT)/,cls:/\.(IDENT)/,attr:/\[\s*(IDENT)\s*(?:([^=]?=)\s*(STRING)\s*)?\]/,pseudo_el:/(?::(first-line|first-letter|before|after))|(?:::((?:FUNCTION)|(?:IDENT)))/,pseudo_cls_nth:/:nth-child\(\s*(?:(?:WITHN)|(?:WITHOUTN)|(odd|even))\s*\)/,pseudo_cls:/:(IDENT)/,comb:/\s*(\+|~|>)\s*|\s+/,comma:/\s*,\s*/,important:/\s+!important\s*$/},s=/[A-Z][A-Z0-9]+/;for(var a in i){for(var r,o=i[a].source;r=o.match(s);)o=o.replace(r[0],t[r[0]].source);i[a]=new RegExp(o,"gi")}var l=n.extend({init:function(e){this.str=e,this.pos=0},match:function(e){var t;return e.lastIndex=this.pos,(t=e.exec(this.str))&&t.index==this.pos?(this.pos=e.lastIndex?e.lastIndex:this.str.length,t):null},peek:function(e){var t;return e.lastIndex=this.pos,(t=e.exec(this.str))&&t.index==this.pos?t:null},showpos:function(){return this.str.slice(0,this.pos)+"<HERE>"+this.str.slice(this.pos)},done:function(){return this.pos==this.str.length}}),h=n.extend({}),c=h.extend({init:function(){this.tag=null,this.id=null,this.classes=[],this.attrs=[],this.nots=[],this.pseudo_classes=[],this.pseudo_els=[]},parse:function(e){var t;(t=e.match(i.tag))&&(this.tag=t[1]);do if(t=e.match(i.not)){if(this.nots[this.nots.length]=u().parse(e),!(t=e.match(i.not_end)))throw"Invalid :not term in selector"}else if(t=e.match(i.id))this.id=t[1];else if(t=e.match(i.cls))this.classes[this.classes.length]=t[1];else if(t=e.match(i.attr))this.attrs[this.attrs.length]=[t[1],t[2],t[3]];else if(t=e.match(i.pseudo_el))this.pseudo_els[this.pseudo_els.length]=t[1]||t[2];else if(t=e.match(i.pseudo_cls_nth)){if(t[3])var n=parseInt((t[1]||"")+(t[2]||"1")),s=parseInt((t[4]||"")+(t[5]||"0"));else var n=t[8]?2:0,s=t[8]?4-t[8].length:parseInt((t[6]||"")+t[7]);this.pseudo_classes[this.pseudo_classes.length]=["nth-child",[n,s]]}else(t=e.match(i.pseudo_cls))&&(this.pseudo_classes[this.pseudo_classes.length]=[t[1]]);while(t&&!e.done());return this}}),d=h.extend({init:function(){this.parts=[]},parse:function(e){for(this.parts[this.parts.length]=c().parse(e);!e.done()&&!e.peek(i.comma)&&(r=e.match(i.comb));)this.parts[this.parts.length]=r[1]||" ",this.parts[this.parts.length]=c().parse(e);return 1==this.parts.length?this.parts[0]:this}}),u=h.extend({init:function(){this.parts=[]},parse:function(e){for(this.parts[this.parts.length]=d().parse(e);!e.done()&&(r=e.match(i.comma));)this.parts[this.parts.length]=d().parse(e);return 1==this.parts.length?this.parts[0]:this}});e.selector=function(e){var t=l(e),i=u().parse(t);if(i.selector=e,t.done())return i;throw"Could not parse selector - "+t.showpos()},e.selector.SelectorBase=h,e.selector.SimpleSelector=c,e.selector.Selector=d,e.selector.SelectorsGroup=u}(jQuery),function(e){e.selector.SimpleSelector.addMethod("specifity",function(){if(this.spec)return this.spec;var t=[this.id?1:0,this.classes.length+this.attrs.length+this.pseudo_classes.length,(this.tag&&"*"!=this.tag?1:0)+this.pseudo_els.length];return e.each(this.nots,function(e,i){var n=i.specifity();t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}),this.spec=t}),e.selector.Selector.addMethod("specifity",function(){if(this.spec)return this.spec;var t=[0,0,0];return e.each(this.parts,function(e,i){if(!(e%2)){var n=i.specifity();t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}}),this.spec=t}),e.selector.SelectorsGroup.addMethod("specifity",function(){if(this.spec)return this.spec;var t=[0,0,0];return e.each(this.parts,function(e,i){var n=i.specifity();t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}),this.spec=t})}(jQuery),function(e){function t(e){return e.complex?c(["l"+ ++v+":{",e.replace(o,"break l"+v),"}"]):e.replace(o,"")}var i=document.createElement("div");i.innerHTML='<form id="test"><input name="id" type="text"/></form>';var s,a="test"!==i.firstChild.getAttribute("id"),r=i.firstElementChild&&"FORM"==i.firstElementChild.tagName,o=(i.children&&"FORM"==i.children[0].tagName,/GOOD/g),l=/BAD/g,h=/^['"]/g,c=function(e){return e.join("\n")},d=function(e){var t=new String(e.join("\n"));return t.complex=!0,t},u=function(e){return"_"+e.replace(/^[^A-Za-z]|[^A-Za-z0-9]/g,function(e){return"_0x"+e.charCodeAt(0).toString(16)+"_"})};if(a){var p={"class":"className","for":"htmlFor"};s=function(e){var t=p[e]||e;return"var "+u(e)+' = el.getAttribute("'+t+'",2) || (el.getAttributeNode("'+e+'")||{}).nodeValue;'}}else s=function(e){return"var "+u(e)+' = el.getAttribute("'+e+'");'};var f={"-":"!K","=":'K != "V"',"!=":'K == "V"',"~=":'_WS_K.indexOf(" V ") == -1',"^=":'!K || K.indexOf("V") != 0',"*=":'!K || K.indexOf("V") == -1',"$=":'!K || K.substr(K.length-"V".length) != "V"'},g=e.selector.State=n.extend({init:function(){this.reset()},reset:function(){this.attrs={},this.wsattrs={}},prev:function(){return this.reset(),r?"el = el.previousElementSibling":"while((el = el.previousSibling) && el.nodeType != 1) {}"},next:function(){return this.reset(),r?"el = el.nextElementSibling":"while((el = el.nextSibling) && el.nodeType != 1) {}"},prevLoop:function(e){return this.reset(),c(r?["while(el = el.previousElementSibling){",e]:["while(el = el.previousSibling){","if (el.nodeType != 1) continue;",e])},parent:function(){return this.reset(),"el = el.parentNode;"},parentLoop:function(e){return this.reset(),c(["while((el = el.parentNode) && el.nodeType == 1){",e,"}"])},uses_attr:function(e){return this.attrs[e]?void 0:(this.attrs[e]=!0,s(e))},uses_wsattr:function(e){return this.wsattrs[e]?void 0:(this.wsattrs[e]=!0,c([this.uses_attr(e),"var _WS_"+u(e)+' = " "+'+u(e)+'+" ";']))},uses_jqueryFilters:function(){return this.jqueryFiltersAdded?void 0:(this.jqueryFiltersAdded=!0,"var _$filters = jQuery.find.selectors.filters;")},save:function(e){return"var el"+e+" = el;"},restore:function(e){return this.reset(),"el = el"+e+";"}}),m={"first-child":c(["var cel = el;","while(cel = cel.previousSibling){ if (cel.nodeType === 1) BAD; }"]),"last-child":c(["var cel = el;","while(cel = cel.nextSibling){ if (cel.nodeType === 1) BAD; }"]),"nth-child":function(e,t){var i=c(["var i = 1, cel = el;","while(cel = cel.previousSibling){","if (cel.nodeType === 1) i++;","}"]);return c(0==e?[i,"if (i- "+t+" != 0) BAD;"]:0==t&&e>=0?[i,"if (i%"+e+" != 0 || i/"+e+" < 0) BAD;"]:0==t&&0>e?["BAD;"]:[i,"if ((i- "+t+")%"+e+" != 0 || (i- "+t+")/"+e+" < 0) BAD;"])}};m["only-child"]=c([m["first-child"],m["last-child"]]),e.selector.SimpleSelector.addMethod("compile",function(t){var i=[];return this.tag&&"*"!=this.tag&&(i[i.length]='if (el.tagName != "'+this.tag.toUpperCase()+'") BAD;'),this.id&&(i[i.length]=t.uses_attr("id"),i[i.length]='if (_id !== "'+this.id+'") BAD;'),this.classes.length&&(i[i.length]=t.uses_wsattr("class"),e.each(this.classes,function(e,t){i[i.length]='if (_WS__class.indexOf(" '+t+' ") == -1) BAD;'})),e.each(this.attrs,function(e,n){i[i.length]="~="==n[1]?t.uses_wsattr(n[0]):t.uses_attr(n[0]);var s=f[n[1]||"-"];s=s.replace(/K/g,u(n[0])).replace(/V/g,n[2]&&n[2].match(h)?n[2].slice(1,-1):n[2]),i[i.length]="if ("+s+") BAD;"}),e.each(this.nots,function(n,s){var a=++v,r=c(["l"+a+":{",s.compile(t).replace(l,"break l"+a).replace(o,"BAD"),"}"]);s instanceof e.selector.SimpleSelector||(r=c([t.save(a),r,t.restore(a)])),i[i.length]=r}),e.each(this.pseudo_classes,function(n,s){var a=m[s[0]];a?i[i.length]="function"==typeof a?a.apply(this,s[1]):a:(a=e.find.selectors.filters[s[0]])&&(i[i.length]=t.uses_jqueryFilters(),i[i.length]="if (!_$filters."+s[0]+"(el)) BAD;")}),i[i.length]="GOOD",c(i)});var v=0,_={" ":function(e,t,i){return d([i,"while(true){",e.parent(),"if (!el || el.nodeType !== 1) BAD;",t.compile(e).replace(l,"continue"),"}"])},">":function(e,t,i){return c([i,e.parent(),"if (!el || el.nodeType !== 1) BAD;",t.compile(e)])},"~":function(e,t,i){return d([i,e.prevLoop(),t.compile(e).replace(l,"continue"),"}","BAD;"])},"+":function(e,t,i){return c([i,e.prev(),"if (!el) BAD;",t.compile(e)])}};e.selector.Selector.addMethod("compile",function(e){for(var i=this.parts.length,n=this.parts[--i].compile(e);i;){var s=this.parts[--i];n=_[s](e,this.parts[--i],t(n))}return n}),e.selector.SelectorsGroup.addMethod("compile",function(e){for(var t=[],i=++v,n=0;n<this.parts.length;n++)t[t.length]=c([0==n?e.save(i):e.restore(i),"l"+i+"_"+n+":{",this.parts[n].compile(e).replace(l,"break l"+i+"_"+n),"}"]);return t[t.length]="BAD;",c(t)}),e.selector.SelectorBase.addMethod("matches",function(e){return this.matches=new Function("el",c(["if (!el) return false;",this.compile(new g).replace(l,"return false").replace(o,"return true")])),this.matches(e)})}(jQuery),function(e){var t=/DIRECT/g,i=/CONTEXT/g,n=/DIRECT|CONTEXT/g;e.selector.SelectorBase.addMethod("affectedBy",function(e){return this.affectedBy=new Function("props",["var direct_classes, context_classes, direct_attrs, context_attrs, t;",this.ABC_compile().replace(t,"direct").replace(i,"context"),"return {classes: {context: context_classes, direct: direct_classes}, attrs: {context: context_attrs, direct: direct_attrs}};"].join("\n")),this.affectedBy(e)}),e.selector.SimpleSelector.addMethod("ABC_compile",function(){var t=[];return e.each(this.classes,function(e,i){t[t.length]="if (t = props.classes['"+i+"']) (DIRECT_classes || (DIRECT_classes = {}))['"+i+"'] = t;"}),e.each(this.nots,function(e,i){t[t.length]=i.ABC_compile()}),t.join("\n")}),e.selector.Selector.addMethod("ABC_compile",function(e){var t=[],i=this.parts.length-1;for(t[t.length]=this.parts[i].ABC_compile();(i-=2)>=0;)t[t.length]=this.parts[i].ABC_compile().replace(n,"CONTEXT");return t.join("\n")}),e.selector.SelectorsGroup.addMethod("ABC_compile",function(){var t=[];return e.each(this.parts,function(e,i){t[t.length]=i.ABC_compile()}),t.join("\n")})}(jQuery),function(e){void 0===e.support.focusinBubbles&&(e.support.focusinBubbles=!!e.browser.msie),e.support.focusinBubbles||e.event.special.focusin||e.each({focus:"focusin",blur:"focusout"},function(t,i){e.event.special[i]={setup:function(){return this.addEventListener?void this.addEventListener(t,e.event.special[i].handler,!0):!1},teardown:function(){return this.removeEventListener?void this.removeEventListener(t,e.event.special[i].handler,!0):!1},handler:function(t){return arguments[0]=e.event.fix(t),arguments[0].type=i,e.event.handle.apply(this,arguments)}}}),function(){var t=null;e(document).bind("focusin",function(i){var n=i.realTarget||i.target;t&&t!==n&&(i.type="focusout",e(t).trigger(i),i.type="focusin",i.target=n),t=n}).bind("focusout",function(e){t=null})}()}(jQuery);try{console.log}catch(s){window.console=void 0}!function(e){var t=function(){function t(e,i){return new t.fn.init(e,i)}jQuery.extend(!0,t,e),t.superclass=e,t.fn=t.prototype=e(),t.fn.constructor=t,t.fn.init=function(e,n){return n&&n instanceof jQuery&&!(n instanceof t)&&(n=t(n)),jQuery.fn.init.call(this,e,n,i)},t.fn.init.prototype=t.fn;var i=t(document);return t},i={};e.entwine=function(){e.fn.entwine.apply(null,arguments)},e.extend(e.entwine,{namespaces:i,clear_all_rules:function(){for(var t in e.fn)e.fn[t].isentwinemethod&&delete e.fn[t];e(document).unbind(".entwine"),e(window).unbind(".entwine");for(var t in i)delete i[t];for(var t in e.entwine.capture_bindings)delete e.entwine.capture_bindings[t]},WARN_LEVEL_NONE:0,WARN_LEVEL_IMPORTANT:1,WARN_LEVEL_BESTPRACTISE:2,warningLevel:0,warn:function(t,i){i<=e.entwine.warningLevel&&console&&console.warn&&(console.warn(t),console.trace&&console.trace())},warn_exception:function(t,i,n){e.entwine.WARN_LEVEL_IMPORTANT<=e.entwine.warningLevel&&console&&console.warn&&(2==arguments.length&&(n=i,i=null),i?console.warn("Uncaught exception",n,"in",t,"on",i):console.warn("Uncaught exception",n,"in",t),n.stack&&console.warn("Stack Trace:\n"+n.stack))}});var s=0,a=n.extend({init:function(e,t){this.selector=e,this.specifity=e.specifity(),this.important=0,this.name=t,this.rulecount=s++}});a.compare=function(e,t){var i=e.specifity,n=t.specifity;return e.important-t.important||i[0]-n[0]||i[1]-n[1]||i[2]-n[2]||e.rulecount-t.rulecount},e.entwine.RuleList=function(){var e=[];return e.addRule=function(t,i){var n=a(t,i);return e[e.length]=n,e.sort(a.compare),n},e};var r=[];e.entwine.Namespace=n.extend({init:function(n){if(n&&!n.match(/^[A-Za-z0-9.]+$/)&&e.entwine.warn("Entwine namespace "+n+" is not formatted as period seperated identifiers",e.entwine.WARN_LEVEL_BESTPRACTISE),n=n||"__base",this.name=n,this.store={},i[n]=this,"__base"==n)this.injectee=e.fn,this.$=e;else{this.$=e.sub?e.sub():t(),this.$.cache=e.cache,this.injectee=this.$.prototype;var s=this.injectee.entwine=function(t){var i=arguments;return t&&"string"==typeof t?"."!=t.charAt(0)&&(i[0]=n+"."+t):(i=e.makeArray(i),i.unshift(n)),e.fn.entwine.apply(this,i)};this.$.entwine=function(){s.apply(null,arguments)};for(var a=0;a<r.length;a++){var o,l=r[a];if(o=l.namespaceMethodOverrides){var h=o(this);for(var c in h)this.injectee[c]=h[c]}if(o=l.namespaceStaticOverrides){var h=o(this);for(var c in h)this.$.entwine[c]=h[c]}}}},one:function(e,t,i){var n=this,s=this.store[e],a=function(e,r,o){for(void 0===o&&(o=s.length);o--;)if(s[o].selector.matches(e)){var l,h=e.i,c=e.f;e.i=o,e.f=a;try{l=s[o][t].apply(n.$(e),r)}finally{e.i=h,e.f=c}return l}return i?i.apply(n.$(e),r):void 0};return a},build_proxy:function(t,i){var n=this.one(t,"func",i),s=function(){for(var t,i=e(this),s=i.length;s--;)t=n(i[s],arguments);return t};return s},bind_proxy:function(t,i,n){var s=this.store[i]||(this.store[i]=e.entwine.RuleList()),a=s.addRule(t,i);a.func=n,this.injectee.hasOwnProperty(i)&&this.injectee[i].isentwinemethod||(this.injectee[i]=this.build_proxy(i,this.injectee.hasOwnProperty(i)?this.injectee[i]:null),this.injectee[i].isentwinemethod=!0),this.injectee[i].isentwinemethod||e.entwine.warn("Warning: Entwine function "+i+" clashes with regular jQuery function - entwine function will not be callable directly on jQuery object",e.entwine.WARN_LEVEL_IMPORTANT)},add:function(e,t){for(var i in t)for(var n=t[i],s=0;s<r.length&&(!r[s].bind||!r[s].bind.call(this,e,i,n));s++);},has:function(e,t){var i=this.store[t];if(!i)return!1;for(var n=0;n<i.length;n++)if(e=e.not(i[n].selector),!e.length)return!0;return!1}}),e.entwine.Namespace.addHandler=function(e){for(var t=0;t<r.length&&r[t].order<e.order;t++);r.splice(t,0,e)},e.entwine.Namespace.addHandler({order:50,bind:function(t,i,n){return e.isFunction(n)?(this.bind_proxy(t,i,n),!0):void 0}}),e.extend(e.fn,{entwine:function(t){var n=0,s=null,a=i.__base||e.entwine.Namespace();for("string"==typeof t&&("."==t.charAt("0")&&(t=t.substr(1)),t&&(a=i[t]||e.entwine.Namespace(t)),n=1);n<arguments.length;){var r=arguments[n++];e.isFunction(r)&&(1!=r.length&&e.entwine.warn("Function block inside entwine definition does not take $ argument properly",e.entwine.WARN_LEVEL_IMPORTANT),r=r.call(a.$(this),a.$)),r&&(null===s&&(s=this.selector?e.selector(this.selector):!1),s?a.add(s,r):e.entwine.warn("Entwine block given to entwine call without selector. Make sure you call $(selector).entwine when defining blocks",e.entwine.WARN_LEVEL_IMPORTANT))}return a.$(this)},_super:function(){for(var e,t=this.length;t--;){var i=this[0];e=i.f(i,arguments,i.i)}return e}})}(jQuery),function(e){function t(e,t){for(var i,n=e.length,s=t.firstChild;i=s;)for(1===i.nodeType&&(e[n++]=i),s=i.firstChild||i.nextSibling;!s&&(i=i.parentNode)&&i!==t;)s=i.nextSibling}var i=!1,n=function(n){var s=function(s){var a=[];i||(1==s.nodeType&&(a[a.length]=s),t(a,s));var r=n.apply(this,arguments);if(!i&&a.length){var o=e.Event("EntwineElementsAdded");o.targets=a,e(document).triggerHandler(o)}return r};return s.patched=!0,s},s=e.prototype.jquery.split("."),a=s[0]>1||s[1]>=10?1:2,r=e.prototype.domManip;e.prototype.domManip=function(){return arguments[a].patched||(arguments[a]=n(arguments[a])),r.apply(this,arguments)};var o=e.prototype.html;e.prototype.html=function(n){if(void 0===n)return o.apply(this,arguments);i=!0;var s=o.apply(this,arguments);i=!1;for(var a=[],r=0,l=this.length;l>r;r++)t(a,this[r]);var h=e.Event("EntwineElementsAdded");return h.targets=a,e(document).triggerHandler(h),s};var l=!1,h=e.cleanData;e.cleanData=function(t){var i=t;if(l)for(var n=0,s=t.length,i=[],a=0;s>n;n++)for(var r=t[n],o=r;o=o.parentNode;)if(9==o.nodeType){i[a++]=r;break}if(i.length){var c=e.Event("EntwineElementsRemoved");c.targets=i,e(document).triggerHandler(c)}l||h.apply(this,arguments)};var c=e.prototype.remove;e.prototype.remove=function(e,t){l=t;var i=c.call(this,e);return l=!1,i},e(function(){var i=[];t(i,document);var n=e.Event("EntwineElementsAdded");n.targets=i,e(document).triggerHandler(n)})}(jQuery),function(e){var t=function(){var t=e.makeArray(arguments),i=t.pop();e.each(t,function(t,n){var s=e.fn[n];e.fn[n]=function(){var t=this,n=e.makeArray(arguments),a=s.apply(t,n);return i.apply(t,n),a}})},i=window.setTimeout,s=n.extend({init:function(){this.global=!1,this.attrs={},this.classes={}},triggerEvent:function(){a==this&&(this.check_id&&clearTimeout(this.check_id),a=new s,e(document).triggerHandler("EntwineSubtreeMaybeChanged",[this]))},changed:function(){if(!this.check_id){var e=this;this.check_id=i(function(){e.check_id=null,e.triggerEvent()},10)}},addAll:function(){return this.global?this:(this.global=!0,this.changed(),this)},addSubtree:function(e){return this.addAll()},addSubtreeFuture:function(t){return this.global?this:(this.subtree=this.subtree?this.subtree.add(t):e(t),this.changed(),this)},addAttr:function(t,i){return this.global?this:(this.attrs[t]=t in this.attrs?this.attrs[t].add(i):e(i),this.changed(),this)},addClass:function(t,i){return this.global?this:(this.classes[t]=t in this.classes?this.classes[t].add(i):e(i),this.changed(),this)}}),a=new s;e(document).bind("EntwineElementsAdded",function(e){a.addSubtree(e.targets)});var r=null;e(document).bind("EntwineElementsRemoved",function(e){r=e.targets}),t("remove","html","empty",function(){var e=r;r=null,e&&a.addSubtree(e)}),t("removeAttr",function(e){a.addAttr(e,this)}),t("addClass","removeClass","toggleClass",function(e){"string"==typeof e&&a.addClass(e,this)}),t("attr",function(e,t){if(void 0!==t&&"string"==typeof e)a.addAttr(e,this);else if("string"!=typeof e)for(var i in e)a.addAttr(i,this)}),e.extend(e.entwine,{synchronous_mode:function(){a&&a.check_id&&clearTimeout(a.check_id),a=new s,i=function(e,t){return e.call(this),null}},triggerMatching:function(){a.addAll()}})}(jQuery),function(e){if(void 0==e.support.changeBubbles){e.support.changeBubbles=!0;var t=document.createElement("div");if(eventName="onchange",t.attachEvent){var i=eventName in t;i||(t.setAttribute(eventName,"return;"),i="function"==typeof t[eventName]),e.support.changeBubbles=i}}if(document.compareDocumentPosition)var n=function(e,t){return e&&t&&(e==t||!!(16&e.compareDocumentPosition(t)))};else var n=function(e,t){return e&&t&&(e==t||(e.contains?e.contains(t):!0))};e.entwine.Namespace.addMethods({build_event_proxy:function(e){var t=this.one(e,"func"),i=function(e,i){e=e.delegatedEvent||e;for(var n=e.target;n&&1==n.nodeType&&!e.isPropagationStopped();){var s=t(n,arguments);void 0!==s&&(e.result=s),s===!1&&(e.preventDefault(),e.stopPropagation()),n=n.parentNode}};return i},build_mouseenterleave_proxy:function(e){var t=this.one(e,"func"),i=function(e){for(var i=e.target,s=e.relatedTarget;i&&1==i.nodeType&&!e.isPropagationStopped()&&!n(i,s);){var a=t(i,arguments);void 0!==a&&(e.result=a),a===!1&&(e.preventDefault(),e.stopPropagation()),i=i.parentNode}};return i},build_change_proxy:function(e){var t=this.one(e,"func"),i=function(e){var t=e.type,i=e.value;return"radio"===t||"checkbox"===t?i=e.checked:"select-multiple"===t?(i="",e.selectedIndex>-1&&(i=jQuery.map(e.options,function(e){return e.selected}).join("-"))):jQuery.nodeName(e,"select")&&(i=e.selectedIndex),i},n=/^(?:textarea|input|select)$/i,s=function(e){var s,a,r=e.target;if(n.test(r.nodeName)&&!r.readOnly&&(s=jQuery.data(r,"_entwine_change_data"),a=i(r),"focusout"===e.type&&"radio"===r.type||jQuery.data(r,"_entwine_change_data",a),void 0!==s&&a!==s&&(null!=s||a)))for(e.type="change";r&&1==r.nodeType&&!e.isPropagationStopped();){var o=t(r,arguments);void 0!==o&&(e.result=o),o===!1&&(e.preventDefault(),e.stopPropagation()),r=r.parentNode}},a=function(e){var t=e.type,n=e.target,a=jQuery.nodeName(n,"input")?n.type:"";switch(t){case"focusout":case"beforedeactivate":s.apply(this,arguments);break;case"click":("radio"===a||"checkbox"===a||jQuery.nodeName(n,"select"))&&s.apply(this,arguments);
break;case"keydown":(13===e.keyCode&&!jQuery.nodeName(n,"textarea")||32===e.keyCode&&("checkbox"===a||"radio"===a)||"select-multiple"===a)&&s.apply(this,arguments);break;case"focusin":case"beforeactivate":jQuery.data(n,"_entwine_change_data",i(n))}};return a},bind_event:function(t,i,n,s){var a=this.store[i]||(this.store[i]=e.entwine.RuleList()),r=a.proxies||(a.proxies={}),o=a.addRule(t,i);if(o.func=n,!r[i]){switch(i){case"onmouseenter":r[i]=this.build_mouseenterleave_proxy(i),s="mouseover";break;case"onmouseleave":r[i]=this.build_mouseenterleave_proxy(i),s="mouseout";break;case"onchange":e.support.changeBubbles||(r[i]=this.build_change_proxy(i),s="click keydown focusin focusout beforeactivate beforedeactivate");break;case"onsubmit":s="delegatedSubmit";break;case"onfocus":case"onblur":e.entwine.warn("Event "+s+" not supported - using focusin / focusout instead",e.entwine.WARN_LEVEL_IMPORTANT)}r[i]||(r[i]=this.build_event_proxy(i)),e(document).bind(s.replace(/(\s+|$)/g,".entwine$1"),r[i])}}}),e.entwine.Namespace.addHandler({order:40,bind:function(t,i,n){var s,a;return e.isFunction(n)&&(s=i.match(/^on(.*)/))?(a=s[1],this.bind_event(t,i,n,a),!0):void 0}});var s=function(t,i){var n=e.Event("delegatedSubmit");return n.delegatedEvent=t,e(document).trigger(n,i)};e(document).bind("EntwineElementsAdded",function(t){var i=e(t.targets).filter("form");i.length&&i.bind("submit.entwine_delegate_submit",s)})}(jQuery),function(e){e.entwine.Namespace.addMethods({bind_capture:function(t,i,n,s){var a=this.captures||(this.captures={}),r=a[i]||(a[i]={}),o=r[n]||(r[n]=e.entwine.RuleList()),l=o.addRule(t,i);l.handler=n,this.bind_proxy(t,n,s)}});var t=e.entwine.capture_bindings={},i=function(t){return function(i){var n,s,a,r,o,l,h;for(var c in e.entwine.namespaces)if(n=e.entwine.namespaces[c],s=n.captures,s&&(a=s[t]))for(var c in a)for(var r=a[c],d=n.$([]),u=r.length;u--;){o=r[u],l=o.handler,h=o.selector.selector;var p=n.$(h).not(d);p[l].apply(p,arguments),d=d.add(p)}}},n=function(t,i,n){var s=e.selector(t);return function(e){return s.matches(e.target)?i.apply(this,arguments):void 0}},s=function(e,t,i){return function(e){return e.target===document?t.apply(this,arguments):void 0}},a=function(e,t,i){return function(e){return e.target===window?t.apply(this,arguments):void 0}},r=function(t,i,n){return function(n){var s=this["get"+t]();if("string"==typeof s){var a=a&&s==a.selector?a:e.selector(s);if(a.matches(n.target))return i.apply(this,arguments)}else if(-1!==e.inArray(n.target,s))return i.apply(this,arguments)}};e.entwine.Namespace.addHandler({order:10,bind:function(o,l,h){var c;if(e.isPlainObject(h)&&(c=l.match(/^from\s*(.*)/))){var d,u=c[1];d=u.match(/[^\w]/)?n:"Window"==u||"window"==u?a:"Document"==u||"document"==u?s:r;for(var p in h){var f=h[p];c=p.match(/^on(.*)/);var g=c[1];if(this.bind_capture(o,g,l+"_"+g,d(u,f)),!t[g]){var m=g.replace(/(\s+|$)/g,".entwine$1");t[g]=i(g),e(d==a?window:document).bind(m,t[g])}}return!0}}})}(jQuery),function(e){e.entwine.Namespace.addMethods({bind_condesc:function(t,i,n){for(var s,a=this.store.ctors||(this.store.ctors=e.entwine.RuleList()),r=0;r<a.length;r++)if(a[r].selector.selector==t.selector){s=a[r];break}if(s||(s=a.addRule(t,"ctors")),s[i]=n,!a[i+"proxy"]){var o=this.one("ctors",i),l=this,h=function(t,n,s){for(var a=t.length;a--;){var r=t[a],h=r.i,c=r.f;r.i=n,r.f=o;try{s.call(l.$(r))}catch(d){e.entwine.warn_exception(i,r,d)}finally{r.i=h,r.f=c}}};a[i+"proxy"]=h}}}),e.entwine.Namespace.addHandler({order:30,bind:function(t,i,n){return!e.isFunction(n)||"onmatch"!=i&&"onunmatch"!=i?void 0:(this.matchersDirty=!0,this.bind_condesc(t,i,n),!0)}}),e(document).bind("EntwineSubtreeMaybeChanged",function(t,i){for(var n in e.entwine.namespaces){var s=e.entwine.namespaces[n],a=s.store.ctors;if(a){for(var r,o,l,h,c,d,u,p,f=null,g=e([]),m=e([]),v=function(t){if(null===f){f=e([]);for(var i,n=a.length;--n>t;)(i=a[n].cache)&&(f=f.add(i))}},_=a.length;_--;){if(h=a[_],c=h.selector.selector,d=h.onmatch,u=h.onunmatch,l=null,p=!1,s.matchersDirty||i.global)p=!0;else{for(var n in i.attrs){p=!0;break}var y=h.selector.affectedBy(i);if(y.classes.context)p=!0;else for(var n in y.classes.direct){v(_);var b=i.classes[n].not(f);null===l&&(l=h.cache?h.cache.not(g).add(m.filter(c)):e([])),l=l.not(b).add(b.filter(c))}}p?(v(_),l=e(c).not(f)):l||(r=m.length&&m.filter(c),r&&r.length?l=h.cache?h.cache.not(g).add(r):r:(o=g.length&&h.cache&&h.cache.filter(g),o&&o.length&&(l=h.cache.not(o)))),null===l?f&&h.cache&&(f=f.add(h.cache)):(h.cache?(r=l.not(h.cache),o=h.cache.not(l)):(r=l,o=null),(r&&r.length||o&&o.length)&&(o&&o.length&&(m=m.add(o),u&&!h.onunmatchRunning&&(h.onunmatchRunning=!0,a.onunmatchproxy(o,_,u),h.onunmatchRunning=!1)),r&&r.length&&(g=g.add(r),m=m.not(r),d&&!h.onmatchRunning&&(h.onmatchRunning=!0,a.onmatchproxy(r,_,d),h.onmatchRunning=!1))),f&&(f=f.add(l)),h.cache=l)}s.matchersDirty=!1}}})}(jQuery),function(e){e.entwine.Namespace.addMethods({build_addrem_proxy:function(e){var t=this.one(e,"func");return function(){if(0!==this.length){if(this.length){for(var e,i=this.length;i--;)e=t(this[i],arguments);return e}return t(this,arguments)}}},bind_addrem_proxy:function(t,i,n){var s=this.store[i]||(this.store[i]=e.entwine.RuleList()),a=s.addRule(t,i);a.func=n,this.injectee.hasOwnProperty(i)||(this.injectee[i]=this.build_addrem_proxy(i),this.injectee[i].isentwinemethod=!0)}}),e.entwine.Namespace.addHandler({order:30,bind:function(t,i,n){return!e.isFunction(n)||"onadd"!=i&&"onremove"!=i?void 0:(this.bind_addrem_proxy(t,i,n),!0)}}),e(document).bind("EntwineElementsAdded",function(t){for(var i in e.entwine.namespaces){var n=e.entwine.namespaces[i];n.injectee.onadd&&n.injectee.onadd.call(t.targets)}}),e(document).bind("EntwineElementsRemoved",function(t){for(var i in e.entwine.namespaces){var n=e.entwine.namespaces[i];n.injectee.onremove&&n.injectee.onremove.call(t.targets)}})}(jQuery),function(e){var t="__entwine!",i=function(e,i,n){return e.data(t+i+"!"+n)},n=function(e,i,n,s){return e.data(t+i+"!"+n,s)},s=function(e,i){var n={},s=jQuery.data(e[0]),a=t+i+"!",r=a.length,o=jQuery.cache[s];for(var l in o)l.substr(0,r)==a&&(n[l.substr(r)]=o[l]);return n},a=function(e,t,i){for(var s in i)n(t,s,i[s])},r=function(e,t,r){switch(r.length){case 0:return s(e,t);case 1:return"string"==typeof r[0]?i(e,t,r[0]):a(e,t,r[0]);default:return n(e,t,r[0],r[1])}};e.extend(e.fn,{entwineData:function(){return r(this,"__base",arguments)}}),e.entwine.Namespace.addHandler({order:60,bind:function(t,i,n){i.charAt(0)!=i.charAt(0).toUpperCase()&&e.entwine.warn("Entwine property "+i+" does not start with a capital letter",e.entwine.WARN_LEVEL_BESTPRACTISE);var s="get"+i,a="set"+i;this.bind_proxy(t,s,function(){var e=this.entwineData(i);return void 0===e?n:e}),this.bind_proxy(t,a,function(e){return this.entwineData(i,e)});var r=this.injectee[s],o=this.injectee[a];return this.bind_proxy(t,i,function(e){return(1==arguments.length?o:r).call(this,e)}),!0},namespaceMethodOverrides:function(e){return{entwineData:function(){return r(this,e.name,arguments)}}}})}(jQuery),function(e){e.concrete=e.entwine,e.fn.concrete=e.fn.entwine,e.fn.concreteData=e.fn.entwineData,e.entwine.Namespace.addHandler({order:100,bind:function(e,t,i){return!1},namespaceMethodOverrides:function(e){return e.$.concrete=e.$.entwine,e.injectee.concrete=e.injectee.entwine,e.injectee.concreteData=e.injectee.entwineData,{}}})}(jQuery)},{}],21:[function(e,t,i){!function(e){function t(t){var i=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(this).ajaxSubmit(i))}function i(t){var i=t.target,n=e(i);if(!n.is(":submit,input:image")){var s=n.closest(":submit");if(0==s.length)return;i=s[0]}var a=this;if(a.clk=i,"image"==i.type)if(void 0!=t.offsetX)a.clk_x=t.offsetX,a.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var r=n.offset();a.clk_x=t.pageX-r.left,a.clk_y=t.pageY-r.top}else a.clk_x=t.pageX-i.offsetLeft,a.clk_y=t.pageY-i.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function n(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}e.fn.ajaxSubmit=function(t){function i(i){for(var n=new FormData,s=0;s<i.length;s++)"file"!=i[s].type&&n.append(i[s].name,i[s].value);if(l.find("input:file:enabled").each(function(){var t=e(this).attr("name"),i=this.files;if(t)for(var s=0;s<i.length;s++)n.append(t,i[s])}),t.extraData)for(var a in t.extraData)n.append(a,t.extraData[a]);t.data=null;var r=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:"POST"});r.data=null;var o=r.beforeSend;r.beforeSend=function(e,i){i.data=n,e.upload&&(e.upload.onprogress=function(e){i.progress(e.position,e.total)}),o&&o.call(i,e,t)},e.ajax(r)}function s(i){function s(e){var t=e.contentWindow?e.contentWindow.document:e.contentDocument?e.contentDocument:e.document;return t}function r(){function t(){try{var e=s(g).readyState;n("state = "+e),"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(i){n("Server abort: ",i," (",i.name,")"),o(j),b&&clearTimeout(b),b=void 0}}var i=l.attr("target"),r=l.attr("action");x.setAttribute("target",p),a||x.setAttribute("method","POST"),r!=d.url&&x.setAttribute("action",d.url),d.skipEncodingOverride||a&&!/post/i.test(a)||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),d.timeout&&(b=setTimeout(function(){y=!0,o(k)},d.timeout));var h=[];try{if(d.extraData)for(var c in d.extraData)h.push(e('<input type="hidden" name="'+c+'">').attr("value",d.extraData[c]).appendTo(x)[0]);d.iframeTarget||(f.appendTo("body"),g.attachEvent?g.attachEvent("onload",o):g.addEventListener("load",o,!1)),setTimeout(t,15),x.submit()}finally{x.setAttribute("action",r),i?x.setAttribute("target",i):l.removeAttr("target"),e(h).remove()}}function o(t){if(!m.aborted&&!I){try{D=s(g)}catch(i){n("cannot access response document: ",i),t=j}if(t===k&&m)return void m.abort("timeout");if(t==j&&m)return void m.abort("server abort");if(D&&D.location.href!=d.iframeSrc||y){g.detachEvent?g.detachEvent("onload",o):g.removeEventListener("load",o,!1);var a,r="success";try{if(y)throw"timeout";var l="xml"==d.dataType||D.XMLDocument||e.isXMLDoc(D);if(n("isXml="+l),!l&&window.opera&&(null==D.body||""==D.body.innerHTML)&&--A)return n("requeing onLoad callback, DOM not available"),void setTimeout(o,250);var h=D.body?D.body:D.documentElement;m.responseText=h?h.innerHTML:null,m.responseXML=D.XMLDocument?D.XMLDocument:D,l&&(d.dataType="xml"),m.getResponseHeader=function(e){var t={"content-type":d.dataType};return t[e]},h&&(m.status=Number(h.getAttribute("status"))||m.status,m.statusText=h.getAttribute("statusText")||m.statusText);var c=(d.dataType||"").toLowerCase(),p=/(json|script|text)/.test(c);if(p||d.textarea){var v=D.getElementsByTagName("textarea")[0];if(v)m.responseText=v.value,m.status=Number(v.getAttribute("status"))||m.status,m.statusText=v.getAttribute("statusText")||m.statusText;else if(p){var _=D.getElementsByTagName("pre")[0],x=D.getElementsByTagName("body")[0];_?m.responseText=_.textContent?_.textContent:_.innerText:x&&(m.responseText=x.textContent?x.textContent:x.innerText)}}else"xml"!=c||m.responseXML||null==m.responseText||(m.responseXML=E(m.responseText));try{S=M(m,c,d)}catch(t){r="parsererror",m.error=a=t||r}}catch(t){n("error caught: ",t),r="error",m.error=a=t||r}m.aborted&&(n("upload aborted"),r=null),m.status&&(r=m.status>=200&&m.status<300||304===m.status?"success":"error"),"success"===r?(d.success&&d.success.call(d.context,S,"success",m),u&&e.event.trigger("ajaxSuccess",[m,d])):r&&(void 0==a&&(a=m.statusText),d.error&&d.error.call(d.context,m,r,a),u&&e.event.trigger("ajaxError",[m,d,a])),u&&e.event.trigger("ajaxComplete",[m,d]),u&&!--e.active&&e.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,m,r),I=!0,d.timeout&&clearTimeout(b),setTimeout(function(){d.iframeTarget||f.remove(),m.responseXML=null},100)}}}var h,c,d,u,p,f,g,m,v,_,y,b,x=l[0],w=!!e.fn.prop;if(i)if(w)for(c=0;c<i.length;c++)h=e(x[i[c].name]),h.prop("disabled",!1);else for(c=0;c<i.length;c++)h=e(x[i[c].name]),h.removeAttr("disabled");if(e(":input[name=submit],:input[id=submit]",x).length)return void alert('Error: Form elements must not have name or id of "submit".');if(d=e.extend(!0,{},e.ajaxSettings,t),d.context=d.context||d,p="jqFormIO"+(new Date).getTime(),d.iframeTarget?(f=e(d.iframeTarget),_=f.attr("name"),null==_?f.attr("name",p):p=_):(f=e('<iframe name="'+p+'" src="'+d.iframeSrc+'" />'),f.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=f[0],m={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var i="timeout"===t?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1,f.attr("src",d.iframeSrc),m.error=i,d.error&&d.error.call(d.context,m,i,t),u&&e.event.trigger("ajaxError",[m,d,i]),d.complete&&d.complete.call(d.context,m,i)}},u=d.global,u&&!e.active++&&e.event.trigger("ajaxStart"),u&&e.event.trigger("ajaxSend",[m,d]),d.beforeSend&&d.beforeSend.call(d.context,m,d)===!1)return void(d.global&&e.active--);if(!m.aborted){v=x.clk,v&&(_=v.name,_&&!v.disabled&&(d.extraData=d.extraData||{},d.extraData[_]=v.value,"image"==v.type&&(d.extraData[_+".x"]=x.clk_x,d.extraData[_+".y"]=x.clk_y)));var k=1,j=2,C=e("meta[name=csrf-token]").attr("content"),T=e("meta[name=csrf-param]").attr("content");T&&C&&(d.extraData=d.extraData||{},d.extraData[T]=C),d.forceSync?r():setTimeout(r,10);var S,D,I,A=50,E=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},N=e.parseJSON||function(e){return window.eval("("+e+")")},M=function(t,i,n){var s=t.getResponseHeader("content-type")||"",a="xml"===i||!i&&s.indexOf("xml")>=0,r=a?t.responseXML:t.responseText;return a&&"parsererror"===r.documentElement.nodeName&&e.error&&e.error("parsererror"),n&&n.dataFilter&&(r=n.dataFilter(r,i)),"string"==typeof r&&("json"===i||!i&&s.indexOf("json")>=0?r=N(r):("script"===i||!i&&s.indexOf("javascript")>=0)&&e.globalEval(r)),r}}}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var a,r,o,l=this;"function"==typeof t&&(t={success:t}),a=this.attr("method"),r=this.attr("action"),o="string"==typeof r?e.trim(r):"",o=o||window.location.href||"",o&&(o=(o.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:o,success:e.ajaxSettings.success,type:a||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var h={};if(this.trigger("form-pre-serialize",[this,t,h]),h.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var c=t.traditional;void 0===c&&(c=e.ajaxSettings.traditional);var d,u=this.formToArray(t.semantic);if(t.data&&(t.extraData=t.data,d=e.param(t.data,c)),t.beforeSubmit&&t.beforeSubmit(u,this,t)===!1)return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[u,this,t,h]),h.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var p=e.param(u,c);d&&(p=p?p+"&"+d:d),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+p,t.data=null):t.data=p;var f=[];if(t.resetForm&&f.push(function(){l.resetForm()}),t.clearForm&&f.push(function(){l.clearForm(t.includeHidden)}),!t.dataType&&t.target){var g=t.success||function(){};f.push(function(i){var n=t.replaceTarget?"replaceWith":"html";e(t.target)[n](i).each(g,arguments)})}else t.success&&f.push(t.success);t.success=function(e,i,n){for(var s=t.context||t,a=0,r=f.length;r>a;a++)f[a].apply(s,[e,i,n||l,l])};var m=e("input:file:enabled[value]",this),v=m.length>0,_="multipart/form-data",y=l.attr("enctype")==_||l.attr("encoding")==_,b=!!(v&&m.get(0).files&&window.FormData);n("fileAPI :"+b);var x=(v||y)&&!b;return t.iframe!==!1&&(t.iframe||x)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){s(u)}):s(u):(v||y)&&b?(t.progress=t.progress||e.noop,i(u)):e.ajax(t),this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(s){if(s=s||{},s.delegation=s.delegation&&e.isFunction(e.fn.on),!s.delegation&&0===this.length){var a={s:this.selector,c:this.context};return!e.isReady&&a.s?(n("DOM not ready, queuing ajaxForm"),e(function(){e(a.s,a.c).ajaxForm(s)}),this):(n("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return s.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,s,t).on("click.form-plugin",this.selector,s,i),this):this.ajaxFormUnbind().bind("submit.form-plugin",s,t).bind("click.form-plugin",s,i)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t){var i=[];if(0===this.length)return i;var n=this[0],s=t?n.getElementsByTagName("*"):n.elements;if(!s)return i;var a,r,o,l,h,c,d;for(a=0,c=s.length;c>a;a++)if(h=s[a],o=h.name)if(t&&n.clk&&"image"==h.type)h.disabled||n.clk!=h||(i.push({name:o,value:e(h).val(),type:h.type}),i.push({name:o+".x",value:n.clk_x},{name:o+".y",value:n.clk_y}));else if(l=e.fieldValue(h,!0),l&&l.constructor==Array)for(r=0,d=l.length;d>r;r++)i.push({name:o,value:l[r]});else null!==l&&"undefined"!=typeof l&&i.push({name:o,value:l,type:h.type});if(!t&&n.clk){var u=e(n.clk),p=u[0];o=p.name,o&&!p.disabled&&"image"==p.type&&(i.push({name:o,value:u.val()}),i.push({name:o+".x",value:n.clk_x},{name:o+".y",value:n.clk_y}))}return i},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var i=[];return this.each(function(){var n=this.name;if(n){var s=e.fieldValue(this,t);if(s&&s.constructor==Array)for(var a=0,r=s.length;r>a;a++)i.push({name:n,value:s[a]});else null!==s&&"undefined"!=typeof s&&i.push({name:this.name,value:s})}}),e.param(i)},e.fn.fieldValue=function(t){for(var i=[],n=0,s=this.length;s>n;n++){var a=this[n],r=e.fieldValue(a,t);null===r||"undefined"==typeof r||r.constructor==Array&&!r.length||(r.constructor==Array?e.merge(i,r):i.push(r))}return i},e.fieldValue=function(t,i){var n=t.name,s=t.type,a=t.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!n||t.disabled||"reset"==s||"button"==s||("checkbox"==s||"radio"==s)&&!t.checked||("submit"==s||"image"==s)&&t.form&&t.form.clk!=t||"select"==a&&-1==t.selectedIndex))return null;if("select"==a){var r=t.selectedIndex;if(0>r)return null;for(var o=[],l=t.options,h="select-one"==s,c=h?r+1:l.length,d=h?r:0;c>d;d++){var u=l[d];if(u.selected){var p=u.value;if(p||(p=u.attributes&&u.attributes.value&&!u.attributes.value.specified?u.text:u.value),h)return p;o.push(p)}}return o}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(e){var t=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var i=this.type,n=this.tagName.toLowerCase();t.test(i)||"textarea"==n||e&&/hidden/.test(i)?this.value="":"checkbox"==i||"radio"==i?this.checked=!1:"select"==n&&(this.selectedIndex=-1)})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var i=this.type;if("checkbox"==i||"radio"==i)this.checked=t;else if("option"==this.tagName.toLowerCase()){var n=e(this).parent("select");t&&n[0]&&"select-one"==n[0].type&&n.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}(jQuery)},{}],22:[function(e,t,i){!function(e){var t=function(e){return e.replace(/%2C/g,",").replace(/\&amp;/g,"&").replace(/^\s+|\s+$/g,"")};e.extend({_ondemand_loaded_list:null,isItemLoaded:function(i){var n,s=this;return null===this._ondemand_loaded_list&&(this._ondemand_loaded_list={},e("script").each(function(){n=e(this).attr("src"),n&&(s._ondemand_loaded_list[n]=1)}),e('link[rel="stylesheet"]').each(function(){n=e(this).attr("href"),n&&(s._ondemand_loaded_list[n]=1)})),void 0!==this._ondemand_loaded_list[t(i)]},requireCss:function(t,i){if(i||(i="all"),!e.isItemLoaded(t)){if(document.createStyleSheet){var n=document.createStyleSheet(t);n.media=i}else{var s=document.createElement("link");e(s).attr({href:t,type:"text/css",media:i,rel:"stylesheet"}).appendTo(e("head").get(0))}this._ondemand_loaded_list[t]=1}},processOnDemandHeaders:function(i,n,s){var a=this,r=new e.Deferred;if(s.getResponseHeader&&s.getResponseHeader("X-Include-CSS"))for(var o=s.getResponseHeader("X-Include-CSS").split(","),l=0;l<o.length;l++)o[l].match(/^(.*):##:(.*)$/)?e.requireCss(t(RegExp.$1),RegExp.$2):e.requireCss(t(o[l]));var h=[];if(s.getResponseHeader&&s.getResponseHeader("X-Include-JS"))for(var c=s.getResponseHeader("X-Include-JS").split(","),l=0;l<c.length;l++){var d=t(c[l]);e.isItemLoaded(d)||h.push(d)}var u=function(){if(h.length){var t=h.shift();e.ajax({dataType:"script",url:t,success:function(){a._ondemand_loaded_list[t]=1,u()},cache:!1,async:!1})}else r.resolve(i,n,s)};return h.length?u():r.resolve(i,n,s),r.promise()}}),e.ajaxSetup({beforeSend:function(t,i){if("script"!=i.dataType){var n=new e.Deferred;t.success(function(t,s,a){e.processOnDemandHeaders(t,s,a).done(function(){n.resolveWith(i.context||this,[t,s,a])})}),t.success=function(e){n.done(e)}}}})}(jQuery)},{}],23:[function(e,t,i){!new function(e){var t=e.separator||"&",i=e.spaces!==!1,n=(e.suffix===!1?"":"[]",e.prefix!==!1),s=n?e.hash===!0?"#":"?":"",a=e.numbers!==!1;jQuery.query=new function(){var e=function(e,t){return void 0!=e&&null!==e&&(t?e.constructor==t:!0)},n=function(e){for(var t,i=/\[([^[]*)\]/g,n=/^([^[]+)(\[.*\])?$/.exec(e),s=n[1],a=[];t=i.exec(n[2]);)a.push(t[1]);return[s,a]},r=function(t,i,n){var s=i.shift();if("object"!=typeof t&&(t=null),""===s)if(t||(t=[]),e(t,Array))t.push(0==i.length?n:r(null,i.slice(0),n));else if(e(t,Object)){for(var a=0;null!=t[a++];);t[--a]=0==i.length?n:r(t[a],i.slice(0),n)}else t=[],t.push(0==i.length?n:r(null,i.slice(0),n));else if(s&&s.match(/^\s*[0-9]+\s*$/)){var o=parseInt(s,10);t||(t=[]),t[o]=0==i.length?n:r(t[o],i.slice(0),n)}else{if(!s)return n;var o=s.replace(/^\s*|\s*$/g,"");if(t||(t={}),e(t,Array)){for(var l={},a=0;a<t.length;++a)l[a]=t[a];t=l}t[o]=0==i.length?n:r(t[o],i.slice(0),n)}return t},o=function(e){var t=this;return t.keys={},e.queryObject?jQuery.each(e.get(),function(e,i){t.SET(e,i)}):jQuery.each(arguments,function(){var e=""+this;e=e.replace(/^[?#]/,""),e=e.replace(/[;&]$/,""),i&&(e=e.replace(/[+]/g," ")),jQuery.each(e.split(/[&;]/),function(){var e=decodeURIComponent(this.split("=")[0]||""),i=decodeURIComponent(this.split("=")[1]||"");e&&(a&&(/^[+-]?[0-9]+\.[0-9]*$/.test(i)?i=parseFloat(i):/^[+-]?[0-9]+$/.test(i)&&(i=parseInt(i,10))),i=i||0===i?i:!0,i!==!1&&i!==!0&&"number"!=typeof i&&(i=i),t.SET(e,i))})}),t};return o.prototype={queryObject:!0,has:function(t,i){var n=this.get(t);return e(n,i)},GET:function(t){if(!e(t))return this.keys;for(var i=n(t),s=i[0],a=i[1],r=this.keys[s];null!=r&&0!=a.length;)r=r[a.shift()];return"number"==typeof r?r:r||""},get:function(t){var i=this.GET(t);return e(i,Object)?jQuery.extend(!0,{},i):e(i,Array)?i.slice(0):i},SET:function(t,i){var s=e(i)?i:null,a=n(t),o=a[0],l=a[1],h=this.keys[o];return this.keys[o]=r(h,l.slice(0),s),this},set:function(e,t){return this.copy().SET(e,t)},REMOVE:function(e){return this.SET(e,null).COMPACT()},remove:function(e){return this.copy().REMOVE(e)},EMPTY:function(){var e=this;return jQuery.each(e.keys,function(t,i){delete e.keys[t]}),e},load:function(e){var t=e.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1"),i=e.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");return new o(e.length==i.length?"":i,e.length==t.length?"":t)},empty:function(){return this.copy().EMPTY()},copy:function(){return new o(this)},COMPACT:function(){function t(i){function n(t,i,n){e(t,Array)?t.push(n):t[i]=n}var s="object"==typeof i?e(i,Array)?[]:{}:i;return"object"==typeof i&&jQuery.each(i,function(i,a){return e(a)?void n(s,i,t(a)):!0}),s}return this.keys=t(this.keys),this},compact:function(){return this.copy().COMPACT()},toString:function(){var n=[],a=[],r=function(e){return e+="",i&&(e=e.replace(/ /g,"+")),encodeURIComponent(e)},o=function(t,i,n){if(e(n)&&n!==!1){var s=[r(i)];n!==!0&&(s.push("="),s.push(r(n))),t.push(s.join(""))}},l=function(e,t){var i=function(e){return t&&""!=t?[t,"[",e,"]"].join(""):[e].join("")};jQuery.each(e,function(e,t){"object"==typeof t?l(t,i(e)):o(a,i(e),t)})};return l(this.keys),a.length>0&&n.push(s),n.push(a.join(t)),n.join("")}},new o(location.search,location.hash)}}(jQuery.query||{})},{}],24:[function(require,module,exports){!function(e,t){function i(t,i){var s,a,r,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+a+"]")[0],!!r&&n(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.ui.version||(e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,i){return"number"==typeof t?this.each(function(){var n=this;setTimeout(function(){e(n).focus(),i&&i.call(n)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e(function(){var t=document.body,i=t.appendChild(i=document.createElement("div"));i.offsetHeight,e.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=100===i.offsetHeight,e.support.selectstart="onselectstart"in i,t.removeChild(i).style.display="none"}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?o["inner"+n].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?o["outer"+n].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=!!t.length,e.ui.ie6=6===parseFloat(t[1],10)}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;n<s.length;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},contains:e.contains,hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)},isOverAxis:function(e,t,i){return e>t&&t+i>e},isOver:function(t,i,n,s,a,r){return e.ui.isOverAxis(t,n,a)&&e.ui.isOverAxis(i,s,r)}}))}(jQuery),function(e,t){var i=0,n=Array.prototype.slice,s=e.cleanData;e.cleanData=function(t){for(var i,n=0;null!=(i=t[n]);n++)try{e(i).triggerHandler("remove")}catch(a){}s(t)},e.widget=function(t,i,n){var s,a,r,o,l=t.split(".")[0];t=t.split(".")[1],s=l+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[l]=e[l]||{},a=e[l][t],r=e[l][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new r(e,t)},e.extend(r,a,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),o=new i,o.options=e.widget.extend({},o.options),e.each(n,function(t,s){e.isFunction(s)&&(n[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}())}),r.prototype=e.widget.extend(o,{widgetEventPrefix:a?o.widgetEventPrefix:t},n,{constructor:r,namespace:l,widgetName:t,widgetBaseClass:s,widgetFullName:s}),a?(e.each(a._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete a._childConstructors):i._childConstructors.push(r),e.widget.bridge(t,r)},e.widget.extend=function(i){for(var s,a,r=n.call(arguments,1),o=0,l=r.length;l>o;o++)for(s in r[o])a=r[o][s],r[o].hasOwnProperty(s)&&a!==t&&(e.isPlainObject(a)?i[s]=e.isPlainObject(i[s])?e.widget.extend({},i[s],a):e.widget.extend({},a):i[s]=a);return i},e.widget.bridge=function(i,s){var a=s.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,l=n.call(arguments,1),h=this;return r=!o&&l.length?e.widget.extend.apply(null,[r].concat(l)):r,o?this.each(function(){var n,s=e.data(this,a);return s?e.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,l),n!==s&&n!==t?(h=n&&n.jquery?h.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new s(r,this))}),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,
this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetName,this),e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var s,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},s=i.split("."),i=s.shift(),s.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;r<s.length-1;r++)a[s[r]]=a[s[r]]||{},a=a[s[r]];if(i=s.pop(),n===t)return a[i]===t?null:a[i];a[i]=n}else{if(n===t)return this.options[i]===t?null:this.options[i];o[i]=n}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,i,n){var s,a=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,r){function o(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):void 0}"string"!=typeof r&&(o.guid=r.guid=r.guid||o.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),h=l[1]+a.eventNamespace,c=l[2];c?s.delegate(c,h,o):i.bind(h,o)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var s,a,r=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(s in a)s in i||(i[s]=a[s]);return this.element.trigger(i,n),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,a){"string"==typeof s&&(s={effect:s});var r,o=s?s===!0||"number"==typeof s?i:s.effect||i:t;s=s||{},"number"==typeof s&&(s={duration:s}),r=!e.isEmptyObject(s),s.complete=a,s.delay&&n.delay(s.delay),r&&e.effects&&(e.effects.effect[o]||e.uiBackCompat!==!1&&e.effects[o])?n[t](s):o!==t&&n[o]?n[o](s.duration,s.easing,a):n.queue(function(i){e(this)[t](),a&&a.call(n[0]),i()})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]})}(jQuery),function(e,t){var i=!1;e(document).mouseup(function(e){i=!1}),e.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!i){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,s=1===t.which,a="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!a&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),i=!0,!0)):!0}},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})}(jQuery),function(e,t){function i(e,t,i){return[parseInt(e[0],10)*(u.test(e[0])?t/100:1),parseInt(e[1],10)*(u.test(e[1])?i/100:1)]}function n(t,i){return parseInt(e.css(t,i),10)||0}e.ui=e.ui||{};var s,a=Math.max,r=Math.abs,o=Math.round,l=/left|center|right/,h=/top|center|bottom/,c=/[\+\-]\d+%?/,d=/^\w+/,u=/%$/,p=e.fn.position;e.position={scrollbarWidth:function(){if(s!==t)return s;var i,n,a=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=a.children()[0];return e("body").append(a),i=r.offsetWidth,a.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=a[0].clientWidth),a.remove(),s=i-n},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),n=t.isWindow?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight;return{width:s?e.position.scrollbarWidth():0,height:a?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return p.apply(this,arguments);t=e.extend({},t);var s,u,f,g,m,v=e(t.of),_=e.position.getWithinInfo(t.within),y=e.position.getScrollInfo(_),b=v[0],x=(t.collision||"flip").split(" "),w={};return 9===b.nodeType?(u=v.width(),f=v.height(),g={top:0,left:0}):e.isWindow(b)?(u=v.width(),f=v.height(),g={top:v.scrollTop(),left:v.scrollLeft()}):b.preventDefault?(t.at="left top",u=f=0,g={top:b.pageY,left:b.pageX}):(u=v.outerWidth(),f=v.outerHeight(),g=v.offset()),m=e.extend({},g),e.each(["my","at"],function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=l.test(n[0])?n.concat(["center"]):h.test(n[0])?["center"].concat(n):["center","center"]),n[0]=l.test(n[0])?n[0]:"center",n[1]=h.test(n[1])?n[1]:"center",e=c.exec(n[0]),i=c.exec(n[1]),w[this]=[e?e[0]:0,i?i[0]:0],t[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===t.at[0]?m.left+=u:"center"===t.at[0]&&(m.left+=u/2),"bottom"===t.at[1]?m.top+=f:"center"===t.at[1]&&(m.top+=f/2),s=i(w.at,u,f),m.left+=s[0],m.top+=s[1],this.each(function(){var l,h,c=e(this),d=c.outerWidth(),p=c.outerHeight(),b=n(this,"marginLeft"),k=n(this,"marginTop"),j=d+b+n(this,"marginRight")+y.width,C=p+k+n(this,"marginBottom")+y.height,T=e.extend({},m),S=i(w.my,c.outerWidth(),c.outerHeight());"right"===t.my[0]?T.left-=d:"center"===t.my[0]&&(T.left-=d/2),"bottom"===t.my[1]?T.top-=p:"center"===t.my[1]&&(T.top-=p/2),T.left+=S[0],T.top+=S[1],e.support.offsetFractions||(T.left=o(T.left),T.top=o(T.top)),l={marginLeft:b,marginTop:k},e.each(["left","top"],function(i,n){e.ui.position[x[i]]&&e.ui.position[x[i]][n](T,{targetWidth:u,targetHeight:f,elemWidth:d,elemHeight:p,collisionPosition:l,collisionWidth:j,collisionHeight:C,offset:[s[0]+S[0],s[1]+S[1]],my:t.my,at:t.at,within:_,elem:c})}),e.fn.bgiframe&&c.bgiframe(),t.using&&(h=function(e){var i=g.left-T.left,n=i+u-d,s=g.top-T.top,o=s+f-p,l={target:{element:v,left:g.left,top:g.top,width:u,height:f},element:{element:c,left:T.left,top:T.top,width:d,height:p},horizontal:0>n?"left":i>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};d>u&&r(i+n)<u&&(l.horizontal="center"),p>f&&r(s+o)<f&&(l.vertical="middle"),a(r(i),r(n))>a(r(s),r(o))?l.important="horizontal":l.important="vertical",t.using.call(this,e,l)}),c.offset(e.extend(T,{using:h}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,o=e.left-t.collisionPosition.marginLeft,l=s-o,h=o+t.collisionWidth-r-s;t.collisionWidth>r?l>0&&0>=h?(i=e.left+l+t.collisionWidth-r-s,e.left+=l-i):h>0&&0>=l?e.left=s:l>h?e.left=s+r-t.collisionWidth:e.left=s:l>0?e.left+=l:h>0?e.left-=h:e.left=a(e.left-o,e.left)},top:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollTop:n.offset.top,r=t.within.height,o=e.top-t.collisionPosition.marginTop,l=s-o,h=o+t.collisionHeight-r-s;t.collisionHeight>r?l>0&&0>=h?(i=e.top+l+t.collisionHeight-r-s,e.top+=l-i):h>0&&0>=l?e.top=s:l>h?e.top=s+r-t.collisionHeight:e.top=s:l>0?e.top+=l:h>0?e.top-=h:e.top=a(e.top-o,e.top)}},flip:{left:function(e,t){var i,n,s=t.within,a=s.offset.left+s.scrollLeft,o=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,h=e.left-t.collisionPosition.marginLeft,c=h-l,d=h+t.collisionWidth-o-l,u="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>c?(i=e.left+u+p+f+t.collisionWidth-o-a,(0>i||i<r(c))&&(e.left+=u+p+f)):d>0&&(n=e.left-t.collisionPosition.marginLeft+u+p+f-l,(n>0||r(n)<d)&&(e.left+=u+p+f))},top:function(e,t){var i,n,s=t.within,a=s.offset.top+s.scrollTop,o=s.height,l=s.isWindow?s.scrollTop:s.offset.top,h=e.top-t.collisionPosition.marginTop,c=h-l,d=h+t.collisionHeight-o-l,u="top"===t.my[1],p=u?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];0>c?(n=e.top+p+f+g+t.collisionHeight-o-a,e.top+p+f+g>c&&(0>n||n<r(c))&&(e.top+=p+f+g)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+g-l,e.top+p+f+g>d&&(i>0||r(i)<d)&&(e.top+=p+f+g))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,s,a,r=document.getElementsByTagName("body")[0],o=document.createElement("div");t=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in n)t.style[a]=n[a];t.appendChild(o),i=r||document.documentElement,i.insertBefore(t,i.firstChild),o.style.cssText="position: absolute; left: 10.7432222px;",s=e(o).offset().left,e.support.offsetFractions=s>10&&11>s,t.innerHTML="",i.removeChild(t)}(),e.uiBackCompat!==!1&&!function(e){var i=e.fn.position;e.fn.position=function(n){if(!n||!n.offset)return i.call(this,n);var s=n.offset.split(" "),a=n.at.split(" ");return 1===s.length&&(s[1]=s[0]),/^\d/.test(s[0])&&(s[0]="+"+s[0]),/^\d/.test(s[1])&&(s[1]="+"+s[1]),1===a.length&&(/left|center|right/.test(a[0])?a[1]="center":(a[1]=a[0],a[0]="center")),i.call(this,e.extend(n,{at:a[0]+s[0]+" "+a[1]+s[1],offset:t}))}}(jQuery)}(jQuery),function(e,t){var i=0,n={},s={};n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.9.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.accordionId="ui-accordion-"+(this.element.attr("id")||++i),n=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(n.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),n.collapsible||n.active!==!1&&null!=n.active||(n.active=0),n.active<0&&(n.active+=this.headers.length),this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(i){var n=e(this),s=n.attr("id"),a=n.next(),r=a.attr("id");s||(s=t+"-header-"+i,n.attr("id",s)),r||(r=t+"-panel-"+i,a.attr("id",r)),n.attr("aria-controls",r),a.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(n.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?void this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),void("disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)))},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,n=this.headers.length,s=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:a=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[n-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,i,n=this.options.heightStyle,s=this.element.parent();"fill"===n?(e.support.minHeight||(i=s.css("overflow"),s.css("overflow","hidden")),t=s.height(),this.element.siblings(":visible").each(function(){var i=e(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(t-=i.outerHeight(!0))}),i&&s.css("overflow",i),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===n&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={};t&&(e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._on(this.headers,i))},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),a=s[0]===n[0],r=a&&i.collapsible,o=r?e():s.next(),l=n.next(),h={oldHeader:n,oldPanel:l,newHeader:r?e():s,newPanel:o};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,h)===!1||(i.active=r?!1:this.headers.index(s),this.active=a?e():s,this._toggle(h),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,t):(n.hide(),i.show(),this._toggleComplete(t)),n.attr({"aria-expanded":"false","aria-hidden":"true"}),n.prev().attr("aria-selected","false"),i.length&&n.length?n.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,i){var a,r,o,l=this,h=0,c=e.length&&(!t.length||e.index()<t.index()),d=this.options.animate||{},u=c&&d.down||d,p=function(){l._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(r=u),r=r||u.easing||d.easing,o=o||u.duration||d.duration,t.length?e.length?(a=e.show().outerHeight(),t.animate(n,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(s,{duration:o,easing:r,complete:p,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?h+=i.now:"content"!==l.options.heightStyle&&(i.now=Math.round(a-t.outerHeight()-h),h=0)}})):t.animate(n,o,r,p):e.animate(s,o,r,p)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.uiBackCompat!==!1&&(!function(e,t){e.extend(t.options,{navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}});var i=t._create;t._create=function(){if(this.options.navigation){var t=this,n=this.element.find(this.options.header),s=n.next(),a=n.add(s).find("a").filter(this.options.navigationFilter)[0];a&&n.add(s).each(function(i){return e.contains(this,a)?(t.options.active=Math.floor(i/2),!1):void 0})}i.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{heightStyle:null,autoHeight:!0,clearStyle:!1,fillSpace:!1});var i=t._create,n=t._setOption;e.extend(t,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle(),i.call(this)},_setOption:function(e){"autoHeight"!==e&&"clearStyle"!==e&&"fillSpace"!==e||(this.options.heightStyle=this._mergeHeightStyle()),n.apply(this,arguments)},_mergeHeightStyle:function(){var e=this.options;return e.fillSpace?"fill":e.clearStyle?"content":e.autoHeight?"auto":void 0}})}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options.icons,{activeHeader:null,headerSelected:"ui-icon-triangle-1-s"});var i=t._createIcons;t._createIcons=function(){this.options.icons&&(this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected),i.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){t.activate=t._activate;var i=t._findActive;t._findActive=function(e){return-1===e&&(e=!1),e&&"number"!=typeof e&&(e=this.headers.index(this.headers.filter(e)),-1===e&&(e=!1)),i.call(this,e)}}(jQuery,jQuery.ui.accordion.prototype),jQuery.ui.accordion.prototype.resize=jQuery.ui.accordion.prototype.refresh,function(e,t){e.extend(t.options,{change:null,changestart:null});var i=t._trigger;t._trigger=function(e,t,n){var s=i.apply(this,arguments);return s?("beforeActivate"===e?s=i.call(this,"changestart",t,{oldHeader:n.oldHeader,oldContent:n.oldPanel,newHeader:n.newHeader,newContent:n.newPanel}):"activate"===e&&(s=i.call(this,"change",t,{oldHeader:n.oldHeader,oldContent:n.oldPanel,newHeader:n.newHeader,newContent:n.newPanel})),s):!1}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{animate:null,animated:"slide"});var i=t._create;t._create=function(){var e=this.options;null===e.animate&&(e.animated?"slide"===e.animated?e.animate=300:"bounceslide"===e.animated?e.animate={duration:200,down:{easing:"easeOutBounce",duration:1e3}}:e.animate=e.animated:e.animate=!1),i.call(this)}}(jQuery,jQuery.ui.accordion.prototype))}(jQuery),function(e,t){var i=0;e.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,n;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var a=e.ui.keyCode;switch(s.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",s);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case a.UP:t=!0,this._keyEvent("previous",s);break;case a.DOWN:t=!0,this._keyEvent("next",s);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case a.TAB:this.menu.active&&this.menu.select(s);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(t)return t=!1,void n.preventDefault();if(!i){var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(e){return n?(n=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});var n=i.item.data("ui-autocomplete-item")||i.item.data("item.autocomplete");!1!==this._trigger("focus",t,{item:n})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item")||t.item.data("item.autocomplete"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this.document.find(t||"body")[0]),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,t=++i;return function(n){t===i&&e.__response(n),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(i,t),this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(jQuery),function(e,t){var i,n,s,a,r="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",l="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},c=function(t){var i=t.name,n=t.form,s=e([]);return i&&(s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");
@ -16,4 +16,4 @@ o.splice(a--,1);break}return o},has:function(e){var t=H(e);return this.filter(fu
});var i=this[0],n=i&&i.ownerDocument;return n?i===n.body?H.offset.bodyOffset(i):wt(i,n,n.documentElement):null},H.offset={bodyOffset:function(e){var t=e.offsetTop,i=e.offsetLeft;return H.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(H.css(e,"marginTop"))||0,i+=parseFloat(H.css(e,"marginLeft"))||0),{top:t,left:i}},setOffset:function(e,t,i){var n=H.css(e,"position");"static"===n&&(e.style.position="relative");var s,a,r=H(e),o=r.offset(),l=H.css(e,"top"),h=H.css(e,"left"),c=("absolute"===n||"fixed"===n)&&H.inArray("auto",[l,h])>-1,d={},u={};c?(u=r.position(),s=u.top,a=u.left):(s=parseFloat(l)||0,a=parseFloat(h)||0),H.isFunction(t)&&(t=t.call(e,i,o)),null!=t.top&&(d.top=t.top-o.top+s),null!=t.left&&(d.left=t.left-o.left+a),"using"in t?t.using.call(e,d):r.css(d)}},H.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),i=this.offset(),n=jt.test(t[0].nodeName)?{top:0,left:0}:t.offset();return i.top-=parseFloat(H.css(e,"marginTop"))||0,i.left-=parseFloat(H.css(e,"marginLeft"))||0,n.top+=parseFloat(H.css(t[0],"borderTopWidth"))||0,n.left+=parseFloat(H.css(t[0],"borderLeftWidth"))||0,{top:i.top-n.top,left:i.left-n.left}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||N.body;e&&!jt.test(e.nodeName)&&"static"===H.css(e,"position");)e=e.offsetParent;return e})}}),H.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,i){var n=/Y/.test(i);H.fn[e]=function(s){return H.access(this,function(e,s,a){var r=E(e);return a===t?r?i in r?r[i]:H.support.boxModel&&r.document.documentElement[s]||r.document.body[s]:e[s]:void(r?r.scrollTo(n?H(r).scrollLeft():a,n?a:H(r).scrollTop()):e[s]=a)},e,s,arguments.length,null)}}),H.each({Height:"height",Width:"width"},function(e,i){var n="client"+e,s="scroll"+e,a="offset"+e;H.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(H.css(e,i,"padding")):this[i]():null},H.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(H.css(t,i,e?"margin":"border")):this[i]():null},H.fn[i]=function(e){return H.access(this,function(e,i,r){var o,l,h,c;return H.isWindow(e)?(o=e.document,l=o.documentElement[n],H.support.boxModel&&l||o.body&&o.body[n]||l):9===e.nodeType?(o=e.documentElement,o[n]>=o[s]?o[n]:Math.max(e.body[s],o[s],e.body[a],o[a])):r===t?(h=H.css(e,i),c=parseFloat(h),H.isNumeric(c)?c:h):void H(e).css(i,r)},i,e,arguments.length,null)}}),e.jQuery=e.$=H,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return H})}(window)},{}],26:[function(require,module,exports){var JSON=JSON||{};!function(){function f(e){return 10>e?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var i,n,s,a,r,o=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,r=[],"[object Array]"===Object.prototype.toString.apply(l)){for(a=l.length,i=0;a>i;i+=1)r[i]=str(i,l)||"null";return s=0===r.length?"[]":gap?"[\n"+gap+r.join(",\n"+gap)+"\n"+o+"]":"["+r.join(",")+"]",gap=o,s}if(rep&&"object"==typeof rep)for(a=rep.length,i=0;a>i;i+=1)n=rep[i],"string"==typeof n&&(s=str(n,l),s&&r.push(quote(n)+(gap?": ":":")+s));else for(n in l)Object.hasOwnProperty.call(l,n)&&(s=str(n,l),s&&r.push(quote(n)+(gap?": ":":")+s));return s=0===r.length?"{}":gap?"{\n"+gap+r.join(",\n"+gap)+"\n"+o+"}":"{"+r.join(",")+"}",gap=o,s}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,i){var n;if(gap="",indent="","number"==typeof i)for(n=0;i>n;n+=1)indent+=" ";else"string"==typeof i&&(indent=i);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var i,n,s=e[t];if(s&&"object"==typeof s)for(i in s)Object.hasOwnProperty.call(s,i)&&(n=walk(s,i),void 0!==n?s[i]=n:delete s[i]);return reviver.call(e,t,s)}var j;if(cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],27:[function(e,t,i){"use strict";!function(){if(!jQuery||!jQuery.jstree){var e=!1,t=!1,i=!1;!function(n){n.vakata={},n.vakata.css={get_css:function(e,t,i){e=e.toLowerCase();var n=i.cssRules||i.rules,s=0;do{if(n.length&&s>n.length+5)return!1;if(n[s].selectorText&&n[s].selectorText.toLowerCase()==e)return t===!0?(i.removeRule&&i.removeRule(s),i.deleteRule&&i.deleteRule(s),!0):n[s]}while(n[++s]);return!1},add_css:function(e,t){return n.jstree.css.get_css(e,!1,t)?!1:(t.insertRule?t.insertRule(e+" { }",0):t.addRule(e,null,0),n.vakata.css.get_css(e))},remove_css:function(e,t){return n.vakata.css.get_css(e,!0,t)},add_sheet:function(e){}};var s=[],a=-1,r={},o={};n.fn.jstree=function(e){var t="string"==typeof e,i=Array.prototype.slice.call(arguments,1),a=this;if(t){if("_"==e.substring(0,1))return a;this.each(function(){var t=s[n.data(this,"jstree_instance_id")],r=t&&n.isFunction(t[e])?t[e].apply(t,i):t;return"undefined"!=typeof r&&(0===e.indexOf("is_")||r!==!0&&r!==!1)?(a=r,!1):void 0})}else this.each(function(){var t=n.data(this,"jstree_instance_id"),a=[],o=e?n.extend({},!0,e):{},l=n(this),h=!1,c=[];a=a.concat(i),l.data("jstree")&&a.push(l.data("jstree")),o=a.length?n.extend.apply(null,[!0,o].concat(a)):o,"undefined"!=typeof t&&s[t]&&s[t].destroy(),t=parseInt(s.push({}),10)-1,n.data(this,"jstree_instance_id",t),o.plugins=n.isArray(o.plugins)?o.plugins:n.jstree.defaults.plugins.slice(),o.plugins.unshift("core"),o.plugins=o.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(","),h=n.extend(!0,{},n.jstree.defaults,o),h.plugins=o.plugins,n.each(r,function(e,t){-1===n.inArray(e,h.plugins)?(h[e]=null,delete h[e]):c.push(e)}),h.plugins=c,s[t]=new n.jstree._instance(t,n(this).addClass("jstree jstree-"+t),h),n.each(s[t]._get_settings().plugins,function(e,i){s[t].data[i]={}}),n.each(s[t]._get_settings().plugins,function(e,i){r[i]&&r[i].__init.apply(s[t])}),setTimeout(function(){s[t]&&s[t].init()},0)});return a},n.jstree={defaults:{plugins:[]},_focused:function(){return s[a]||null},_reference:function(e){if(s[e])return s[e];var t=n(e);return t.length||"string"!=typeof e||(t=n("#"+e)),t.length?s[t.closest(".jstree").data("jstree_instance_id")]||null:null},_instance:function(e,t,i){this.data={core:{}},this.get_settings=function(){return n.extend(!0,{},i)},this._get_settings=function(){return i},this.get_index=function(){return e},this.get_container=function(){return t},this.get_container_ul=function(){return t.children("ul:eq(0)")},this._set_settings=function(e){i=n.extend(!0,{},i,e)}},_fn:{},plugin:function(e,t){t=n.extend({},{__init:n.noop,__destroy:n.noop,_fn:{},defaults:!1},t),r[e]=t,n.jstree.defaults[e]=t.defaults,n.each(t._fn,function(t,i){i.plugin=e,i.old=n.jstree._fn[t],n.jstree._fn[t]=function(){var e,s=i,a=Array.prototype.slice.call(arguments),r=new n.Event("before.jstree"),o=!1;if(this.data.core.locked!==!0||"unlock"===t||"is_locked"===t){do{if(s&&s.plugin&&-1!==n.inArray(s.plugin,this._get_settings().plugins))break;s=s.old}while(s);if(s){if(0===t.indexOf("_"))e=s.apply(this,a);else{if(e=this.get_container().triggerHandler(r,{func:t,inst:this,args:a,plugin:s.plugin}),e===!1)return;"undefined"!=typeof e&&(a=e),e=s.apply(n.extend({},this,{__callback:function(e){this.get_container().triggerHandler(t+".jstree",{inst:this,args:a,rslt:e,rlbk:o})},__rollback:function(){return o=this.get_rollback()},__call_old:function(e){return s.old.apply(this,e?Array.prototype.slice.call(arguments,1):a)}}),a)}return e}}},n.jstree._fn[t].old=i.old,n.jstree._fn[t].plugin=e})},rollback:function(e){e&&(n.isArray(e)||(e=[e]),n.each(e,function(e,t){s[t.i].set_rollback(t.h,t.d)}))}},n.jstree._fn=n.jstree._instance.prototype={},n(function(){var s=navigator.userAgent.toLowerCase(),a=(s.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],r=".jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } .jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } .jstree-rtl li { margin-left:0; margin-right:18px; } .jstree > ul > li { margin-left:0px; } .jstree-rtl > ul > li { margin-right:0px; } .jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } .jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } .jstree a:focus { outline: none; } .jstree a > ins { height:16px; width:16px; } .jstree a > .jstree-icon { margin-right:3px; } .jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } li.jstree-open > ul { display:block; } li.jstree-closed > ul { display:none; } ";if(/msie/.test(s)&&6==parseInt(a,10)){e=!0;try{document.execCommand("BackgroundImageCache",!1,!0)}catch(o){}r+=".jstree li { height:18px; margin-left:0; margin-right:0; } .jstree li li { margin-left:18px; } .jstree-rtl li li { margin-left:0px; margin-right:18px; } li.jstree-open ul { display:block; } li.jstree-closed ul { display:none !important; } .jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } .jstree li a ins { height:16px; width:16px; margin-right:3px; } .jstree-rtl li a ins { margin-right:0px; margin-left:3px; } "}/msie/.test(s)&&7==parseInt(a,10)&&(t=!0,r+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } "),!/compatible/.test(s)&&/mozilla/.test(s)&&parseFloat(a,10)<1.9&&(i=!0,r+=".jstree ins { display:-moz-inline-box; } .jstree li { line-height:12px; } .jstree a { display:-moz-inline-box; } .jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } "),n.vakata.css.add_sheet({str:r,title:"jstree"})}),n.jstree.plugin("core",{__init:function(){this.data.core.locked=!1,this.data.core.to_open=this.get_settings().core.initially_open,this.data.core.to_load=this.get_settings().core.initially_load},defaults:{html_titles:!1,animation:500,initially_open:[],initially_load:[],open_parents:!0,notify_plugins:!0,rtl:!1,load_open:!1,strings:{loading:"Loading ...",new_node:"New node",multiple_selection:"Multiple selection"}},_fn:{init:function(){this.set_focus(),this._get_settings().core.rtl&&this.get_container().addClass("jstree-rtl").css("direction","rtl"),this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins>&#160;</ins><a class='jstree-loading' href='#'><ins class='jstree-icon'>&#160;</ins>"+this._get_string("loading")+"</a></li></ul>"),this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18,this.get_container().delegate("li > ins","click.jstree",n.proxy(function(e){var t=n(e.target);this.toggle_node(t)},this)).bind("mousedown.jstree",n.proxy(function(){this.set_focus()},this)).bind("dblclick.jstree",function(e){var t;if(document.selection&&document.selection.empty)document.selection.empty();else if(window.getSelection){t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(i){}}}),this._get_settings().core.notify_plugins&&this.get_container().bind("load_node.jstree",n.proxy(function(e,t){var i=this._get_node(t.rslt.obj),s=this;-1===i&&(i=this.get_container_ul()),i.length&&i.find("li").each(function(){var e=n(this);e.data("jstree")&&n.each(e.data("jstree"),function(t,i){s.data[t]&&n.isFunction(s["_"+t+"_notify"])&&s["_"+t+"_notify"].call(s,e,i)})})},this)),this._get_settings().core.load_open&&this.get_container().bind("load_node.jstree",n.proxy(function(e,t){var i=this._get_node(t.rslt.obj),s=this;-1===i&&(i=this.get_container_ul()),i.length&&i.find("li.jstree-open:not(:has(ul))").each(function(){s.load_node(this,n.noop,n.noop)})},this)),this.__callback(),this.load_node(-1,function(){this.loaded(),this.reload_nodes()})},destroy:function(){var e,t=this.get_index(),i=this._get_settings(),o=this;if(n.each(i.plugins,function(e,t){try{r[t].__destroy.apply(o)}catch(i){}}),this.__callback(),this.is_focused())for(e in s)if(s.hasOwnProperty(e)&&e!=t){s[e].set_focus();break}t===a&&(a=-1),this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree_instance_id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),n(document).unbind(".jstree-"+t).undelegate(".jstree-"+t),s[t]=null,delete s[t]},_core_notify:function(e,t){t.opened&&this.open_node(e,!1,!0)},lock:function(){this.data.core.locked=!0,this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7"),this.__callback({})},unlock:function(){this.data.core.locked=!1,this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1"),this.__callback({})},is_locked:function(){return this.data.core.locked},save_opened:function(){var e=this;this.data.core.to_open=[],this.get_container_ul().find("li.jstree-open").each(function(){this.id&&e.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}),this.__callback(e.data.core.to_open)},save_loaded:function(){},reload_nodes:function(e){var t=this,i=!0,s=[],a=[];e||(this.data.core.reopen=!1,this.data.core.refreshing=!0,this.data.core.to_open=n.map(n.makeArray(this.data.core.to_open),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.data.core.to_load=n.map(n.makeArray(this.data.core.to_load),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.data.core.to_open.length&&(this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open))),this.data.core.to_load.length&&(n.each(this.data.core.to_load,function(e,t){return"#"==t?!0:void(n(t).length?s.push(t):a.push(t))}),s.length&&(this.data.core.to_load=a,n.each(s,function(e,n){t._is_loaded(n)||(t.load_node(n,function(){t.reload_nodes(!0)},function(){t.reload_nodes(!0)}),i=!1)}))),this.data.core.to_open.length&&n.each(this.data.core.to_open,function(e,i){t.open_node(i,!1,!0)}),i&&(this.data.core.reopen&&clearTimeout(this.data.core.reopen),this.data.core.reopen=setTimeout(function(){t.__callback({},t)},50),this.data.core.refreshing=!1,this.reopen())},reopen:function(){var e=this;this.data.core.to_open.length&&n.each(this.data.core.to_open,function(t,i){e.open_node(i,!1,!0)}),this.__callback({})},refresh:function(e,t,i){var n=this;this.save_opened(),e||(e=-1),e=this._get_node(e),e||(e=-1),-1!==e?e.children("UL").remove():this.get_container_ul().empty(),this.load_node(e,function(){n.__callback({obj:e}),n.reload_nodes(),t&&t.call(this)},i)},loaded:function(){this.__callback()},set_focus:function(){if(!this.is_focused()){var e=n.jstree._focused();e&&e.unset_focus(),this.get_container().addClass("jstree-focused"),a=this.get_index(),this.__callback()}},is_focused:function(){return a==this.get_index()},unset_focus:function(){this.is_focused()&&(this.get_container().removeClass("jstree-focused"),a=-1),this.__callback()},_get_node:function(e){var t=n(e,this.get_container());return t.is(".jstree")||-1==e?-1:(t=t.closest("li",this.get_container()),t.length?t:!1)},_get_next:function(e,t){return e=this._get_node(e),-1===e?this.get_container().find("> ul > li:first-child"):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.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 i=e.parentsUntil(".jstree","li:eq(0)");return i.length?i:!1},_get_parent:function(e){if(e=this._get_node(e),-1==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().children("ul:eq(0)").children("li"):e.length?e.children("ul:eq(0)").children("li"):!1},get_path:function(e,t){var i=[],n=this;return e=this._get_node(e),-1!==e&&e&&e.length?(e.parentsUntil(".jstree","li").each(function(){i.push(t?this.id:n.get_text(this))}),i.reverse(),i.push(t?e.attr("id"):this.get_text(e)),i):!1},_get_string:function(e){return this._get_settings().core.strings[e]||e},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")},correct_state:function(e){return e=this._get_node(e),e&&-1!==e?(e.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove(),void this.__callback({obj:e})):!1},open_node:function(t,i,n){if(t=this._get_node(t),!t.length)return!1;if(!t.hasClass("jstree-closed"))return i&&i.call(),!1;var s=n||e?0:this._get_settings().core.animation,a=this;this._is_loaded(t)?(this._get_settings().core.open_parents&&t.parentsUntil(".jstree",".jstree-closed").each(function(){a.open_node(this,!1,!0)}),s&&t.children("ul").css("display","none"),t.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading"),s?t.children("ul").stop(!0,!0).slideDown(s,function(){this.style.display="",a.after_open(t)}):a.after_open(t),this.__callback({obj:t}),i&&i.call()):(t.children("a").addClass("jstree-loading"),this.load_node(t,function(){a.open_node(t,i,n)},i))},after_open:function(e){this.__callback({obj:e})},close_node:function(t,i){t=this._get_node(t);var n=i||e?0:this._get_settings().core.animation,s=this;return t.length&&t.hasClass("jstree-open")?(n&&t.children("ul").attr("style","display:block !important"),t.removeClass("jstree-open").addClass("jstree-closed"),n?t.children("ul").stop(!0,!0).slideUp(n,function(){this.style.display="",s.after_close(t)}):s.after_close(t),void this.__callback({obj:t})):!1},after_close:function(e){this.__callback({obj:e})},toggle_node:function(e){return e=this._get_node(e),e.hasClass("jstree-closed")?this.open_node(e):e.hasClass("jstree-open")?this.close_node(e):void 0},open_all:function(e,t,i){e=e?this._get_node(e):-1,e&&-1!==e||(e=this.get_container_ul()),i?e=e.find("li.jstree-closed"):(i=e,e=e.is(".jstree-closed")?e.find("li.jstree-closed").andSelf():e.find("li.jstree-closed"));var n=this;e.each(function(){var e=this;n._is_loaded(this)?n.open_node(this,!1,!t):n.open_node(this,function(){n.open_all(e,t,i)},!t)}),0===i.find("li.jstree-closed").length&&this.__callback({obj:i})},close_all:function(e,t){var i=this;e=e?this._get_node(e):this.get_container(),e&&-1!==e||(e=this.get_container_ul()),e.find("li.jstree-open").andSelf().each(function(){i.close_node(this,!t)}),this.__callback({obj:e})},clean_node:function(e){e=e&&-1!=e?n(e):this.get_container_ul(),e=e.is("li")?e.find("li").andSelf():e.find("li"),e.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed"),e.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove(),this.__callback({obj:e})},get_rollback:function(){return this.__callback(),{i:this.get_index(),h:this.get_container().children("ul").clone(!0),d:this.data}},set_rollback:function(e,t){this.get_container().empty().append(e),this.data=t,this.__callback()},load_node:function(e,t,i){this.__callback({obj:e})},_is_loaded:function(e){return!0},create_node:function(e,t,i,s,a){e=this._get_node(e),t="undefined"==typeof t?"last":t;var r,o=n("<li />"),l=this._get_settings().core;if(-1!==e&&!e.length)return!1;if(!a&&!this._is_loaded(e))return this.load_node(e,function(){this.create_node(e,t,i,s,!0)}),!1;switch(this.__rollback(),"string"==typeof i&&(i={data:i}),i||(i={}),i.attr&&o.attr(i.attr),i.metadata&&o.data(i.metadata),i.state&&o.addClass("jstree-"+i.state),i.data||(i.data=this._get_string("new_node")),n.isArray(i.data)||(r=i.data,i.data=[],i.data.push(r)),n.each(i.data,function(e,t){r=n("<a />"),n.isFunction(t)&&(t=t.call(this,i)),"string"==typeof t?r.attr("href","#")[l.html_titles?"html":"text"](t):(t.attr||(t.attr={}),t.attr.href||(t.attr.href="#"),r.attr(t.attr)[l.html_titles?"html":"text"](t.title),t.language&&r.addClass(t.language)),r.prepend("<ins class='jstree-icon'>&#160;</ins>"),!t.icon&&i.icon&&(t.icon=i.icon),t.icon&&(-1===t.icon.indexOf("/")?r.children("ins").addClass(t.icon):r.children("ins").css("background","url('"+t.icon+"') center center no-repeat")),o.append(r)}),o.prepend("<ins class='jstree-icon'>&#160;</ins>"),-1===e&&(e=this.get_container(),"before"===t&&(t="first"),"after"===t&&(t="last")),t){case"before":e.before(o),r=this._get_parent(e);break;case"after":e.after(o),r=this._get_parent(e);break;case"inside":case"first":e.children("ul").length||e.append("<ul />"),e.children("ul").prepend(o),r=e;break;case"last":e.children("ul").length||e.append("<ul />"),e.children("ul").append(o),r=e;break;default:e.children("ul").length||e.append("<ul />"),t||(t=0),r=e.children("ul").children("li").eq(t),r.length?r.before(o):e.children("ul").append(o),r=e}return-1!==r&&r.get(0)!==this.get_container().get(0)||(r=-1),this.clean_node(r),this.__callback({obj:o,parent:r}),s&&s.call(this,o),o},get_text:function(e){if(e=this._get_node(e),!e.length)return!1;var t=this._get_settings().core.html_titles;return e=e.children("a:eq(0)"),t?(e=e.clone(),e.children("INS").remove(),e.html()):(e=e.contents().filter(function(){return 3==this.nodeType})[0],e?e.nodeValue:"")},set_text:function(e,t){if(e=this._get_node(e),!e.length)return!1;if(e=e.children("a:eq(0)"),this._get_settings().core.html_titles){var i=e.children("INS").clone();return e.html(t).prepend(i),this.__callback({obj:e,name:t}),!0}return e=e.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:e,name:t}),e.nodeValue=t},rename_node:function(e,t){e=this._get_node(e),this.__rollback(),e&&e.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))&&this.__callback({obj:e,name:t})},delete_node:function(e){if(e=this._get_node(e),!e.length)return!1;this.__rollback();var t=this._get_parent(e),i=n([]),s=this;return e.each(function(){i=i.add(s._get_prev(this))}),e=e.detach(),-1!==t&&0===t.find("> ul > li").length&&t.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"),this.clean_node(t),this.__callback({obj:e,prev:i,parent:t}),e},prepare_move:function(e,t,i,s,a){var r={};if(r.ot=n.jstree._reference(e)||this,r.o=r.ot._get_node(e),r.r=-1===t?-1:this._get_node(t),r.p="undefined"==typeof i||i===!1?"last":i,!a&&o.o&&o.o[0]===r.o[0]&&o.r[0]===r.r[0]&&o.p===r.p)return this.__callback(o),void(s&&s.call(this,o));if(r.ot=n.jstree._reference(r.o)||this,r.rt=n.jstree._reference(r.r)||this,-1!==r.r&&r.r){if(!/^(before|after)$/.test(r.p)&&!this._is_loaded(r.r))return this.load_node(r.r,function(){this.prepare_move(e,t,i,s,!0)});switch(r.p){case"before":r.cp=r.r.index(),r.cr=r.rt._get_parent(r.r);break;case"after":r.cp=r.r.index()+1,r.cr=r.rt._get_parent(r.r);break;case"inside":case"first":r.cp=0,r.cr=r.r;break;case"last":r.cp=r.r.find(" > ul > li").length,r.cr=r.r;break;default:r.cp=r.p,r.cr=r.r}}else switch(r.cr=-1,r.p){case"first":case"before":case"inside":r.cp=0;break;case"after":case"last":r.cp=r.rt.get_container().find(" > ul > li").length;break;default:r.cp=r.p}r.np=-1==r.cr?r.rt.get_container():r.cr,r.op=r.ot._get_parent(r.o),r.cop=r.o.index(),-1===r.op&&(r.op=r.ot?r.ot.get_container():this.get_container()),!/^(before|after)$/.test(r.p)&&r.op&&r.np&&r.op[0]===r.np[0]&&r.o.index()<r.cp&&r.cp++,r.or=r.np.find(" > ul > li:nth-child("+(r.cp+1)+")"),o=r,this.__callback(o),s&&s.call(this,o)},check_move:function(){var e=o,t=!0,i=-1===e.r?this.get_container():e.r;if(!e||!e.o||e.or[0]===e.o[0])return!1;if(!e.cy){if(e.op&&e.np&&e.op[0]===e.np[0]&&e.cp-1===e.o.index())return!1;e.o.each(function(){return-1!==i.parentsUntil(".jstree","li").andSelf().index(this)?(t=!1,!1):void 0})}return t},move_node:function(e,t,i,s,a,r){if(!a)return this.prepare_move(e,t,i,function(e){this.move_node(e,!1,!1,s,!0,r)});if(s&&(o.cy=!0),!r&&!this.check_move())return!1;this.__rollback();var l=!1;s?(l=e.o.clone(!0),l.find("*[id]").andSelf().each(function(){this.id&&(this.id="copy_"+this.id)})):l=e.o,e.or.length?e.or.before(l):(e.np.children("ul").length||n("<ul />").appendTo(e.np),e.np.children("ul:eq(0)").append(l));try{e.ot.clean_node(e.op),e.rt.clean_node(e.np),e.op.find("> ul > li").length||e.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}catch(h){}return s&&(o.cy=!0,o.oc=l),this.__callback(o),o},_get_move:function(){return o}}})}(jQuery),function(e){var t,i,n;e(function(){/msie/.test(navigator.userAgent.toLowerCase())?(i=e('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),n=e('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),t=i.width()-n.width(),i.add(n).remove()):(i=e("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:0}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200}),t=100-i.width(),i.parent().remove())}),e.jstree.plugin("ui",{__init:function(){this.data.ui.selected=e(),this.data.ui.last_selected=!1,this.data.ui.hovered=null,this.data.ui.to_select=this.get_settings().ui.initially_select,this.get_container().delegate("a","click.jstree",e.proxy(function(t){t.preventDefault(),t.currentTarget.blur(),e(t.currentTarget).hasClass("jstree-loading")||this.select_node(t.currentTarget,!0,t)},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.hover_node(t.target)},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.dehover_node(t.target)},this)).bind("reopen.jstree",e.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",e.proxy(function(){this.dehover_node(),this.save_selected()},this)).bind("set_rollback.jstree",e.proxy(function(){this.reselect()},this)).bind("close_node.jstree",e.proxy(function(t,i){var n=this._get_settings().ui,s=this._get_node(i.rslt.obj),a=s&&s.length?s.children("ul").find("a.jstree-clicked"):e(),r=this;n.selected_parent_close!==!1&&a.length&&a.each(function(){r.deselect_node(this),"select_parent"===n.selected_parent_close&&r.select_node(s)})},this)).bind("delete_node.jstree",e.proxy(function(e,t){var i=this._get_settings().ui.select_prev_on_delete,n=this._get_node(t.rslt.obj),s=n&&n.length?n.find("a.jstree-clicked"):[],a=this;s.each(function(){a.deselect_node(this)}),i&&s.length&&t.rslt.prev.each(function(){return this.parentNode?(a.select_node(this),!1):void 0})},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_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:!0,select_prev_on_delete:!0,disable_selecting_children:!1,initially_select:[]},_fn:{_get_node:function(t,i){if("undefined"==typeof t||null===t)return i?this.data.ui.selected:this.data.ui.last_selected;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)},_ui_notify:function(e,t){t.selected&&this.select_node(e,!1)},save_selected:function(){var e=this;this.data.ui.to_select=[],this.data.ui.selected.each(function(){this.id&&e.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}),this.__callback(this.data.ui.to_select)},reselect:function(){var t=this,i=this.data.ui.to_select;i=e.map(e.makeArray(i),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),e.each(i,function(e,i){i&&"#"!==i&&t.select_node(i)}),this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode}),this.__callback()},refresh:function(e){return this.save_selected(),this.__call_old()},hover_node:function(e){return e=this._get_node(e),e.length?(e.hasClass("jstree-hovered")||this.dehover_node(),this.data.ui.hovered=e.children("a").addClass("jstree-hovered").parent(),this._fix_scroll(e),void this.__callback({obj:e})):!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),void this.__callback({obj:t})):!1},select_node:function(e,t,i){if(e=this._get_node(e),-1==e||!e||!e.length)return!1;var n=this._get_settings().ui,s="on"==n.select_multiple_modifier||n.select_multiple_modifier!==!1&&i&&i[n.select_multiple_modifier+"Key"],a=n.select_range_modifier!==!1&&i&&i[n.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==e[0]&&this.data.ui.last_selected.parent()[0]===e.parent()[0],r=this.is_selected(e),o=!0,l=this;if(t){if(n.disable_selecting_children&&s&&(e.parentsUntil(".jstree","li").children("a.jstree-clicked").length||e.children("ul").find("a.jstree-clicked:eq(0)").length))return!1;switch(o=!1,!0){case a:this.data.ui.last_selected.addClass("jstree-last-selected"),e=e[e.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").andSelf(),-1==n.select_limit||e.length<n.select_limit?(this.data.ui.last_selected.removeClass("jstree-last-selected"),this.data.ui.selected.each(function(){this!==l.data.ui.last_selected[0]&&l.deselect_node(this)}),r=!1,o=!0):o=!1;break;case r&&!s:this.deselect_all(),r=!1,o=!0;break;case!r&&!s:(-1==n.select_limit||n.select_limit>0)&&(this.deselect_all(),o=!0);break;case r&&s:this.deselect_node(e);break;case!r&&s:(-1==n.select_limit||this.data.ui.selected.length+1<=n.select_limit)&&(o=!0)}}o&&!r&&(a||(this.data.ui.last_selected=e),e.children("a").addClass("jstree-clicked"),n.selected_parent_open&&e.parents(".jstree-closed").each(function(){l.open_node(this,!1,!0)}),this.data.ui.selected=this.data.ui.selected.add(e),this._fix_scroll(e.eq(0)),this.__callback({obj:e,e:i}))},_fix_scroll:function(e){
var i,n=this.get_container()[0];if(n.scrollHeight>n.offsetHeight){if(e=this._get_node(e),!e||-1===e||!e.length||!e.is(":visible"))return;i=e.offset().top-this.get_container().offset().top,0>i&&(n.scrollTop=n.scrollTop+i-1),i+this.data.core.li_height+(n.scrollWidth>n.offsetWidth?t:0)>n.offsetHeight&&(n.scrollTop=n.scrollTop+(i-n.offsetHeight+this.data.core.li_height+1+(n.scrollWidth>n.offsetWidth?t:0)))}},deselect_node:function(e){return e=this._get_node(e),e.length?void(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}))):!1},toggle_select:function(e){return e=this._get_node(e),e.length?void(this.is_selected(e)?this.deselect_node(e):this.select_node(e)):!1},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},deselect_all:function(t){var i=t?e(t).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();i.children("a.jstree-clicked").removeClass("jstree-clicked"),this.data.ui.selected=e([]),this.data.ui.last_selected=!1,this.__callback({obj:i})}}}),e.jstree.defaults.plugins.push("ui")}(jQuery),function(e){e.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",e.proxy(function(e,t){if(this._get_settings().crrm.move.open_onmove){var i=this;t.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function(){i.open_node(this,!1,!0)})}},this))},defaults:{input_width_limit:200,move:{always_copy:!1,open_onmove:!0,default_position:"last",check_move:function(e){return!0}}},_fn:{_show_input:function(t,i){t=this._get_node(t);var n=this._get_settings().core.rtl,s=this._get_settings().crrm.input_width_limit,a=t.children("ins").width(),r=t.find("> a:visible > ins").width()*t.find("> a:visible > ins").length,o=this.get_text(t),l=e("<div />",{css:{position:"absolute",top:"-200px",left:n?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),h=t.css("position","relative").append(e("<input />",{value:o,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver",position:"absolute",left:n?"auto":a+r+4+"px",right:n?a+r+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=o),l.remove(),e.remove(),this.set_text(t,o),this.rename_node(t,n),i.call(this,t,n,o),t.css("position","")},this),keyup:function(e){var t=e.keyCode||e.which;return 27==t?(this.value=o,void this.blur()):13==t?void this.blur():void h.width(Math.min(l.text("pW"+this.value).width(),s))},keypress:function(e){var t=e.keyCode||e.which;return 13==t?!1:void 0}})).children(".jstree-rename-input");this.set_text(t,""),l.css({fontFamily:h.css("fontFamily")||"",fontSize:h.css("fontSize")||"",fontWeight:h.css("fontWeight")||"",fontStyle:h.css("fontStyle")||"",fontStretch:h.css("fontStretch")||"",fontVariant:h.css("fontVariant")||"",letterSpacing:h.css("letterSpacing")||"",wordSpacing:h.css("wordSpacing")||""}),h.width(Math.min(l.text("pW"+h[0].value).width(),s))[0].select()},rename:function(e){e=this._get_node(e),this.__rollback();var t=this.__callback;this._show_input(e,function(e,i,n){t.call(this,{obj:e,new_name:i,old_name:n})})},create:function(t,i,n,s,a){var r,o=this;return t=this._get_node(t),t||(t=-1),this.__rollback(),r=this.create_node(t,i,n,function(t){var i=this._get_parent(t),n=e(t).index();s&&s.call(this,t),i.length&&i.hasClass("jstree-closed")&&this.open_node(i,!1,!0),a?o.__callback({obj:t,name:this.get_text(t),parent:i,position:n}):this._show_input(t,function(e,t,s){o.__callback({obj:e,name:t,parent:i,position:n})})})},remove:function(e){e=this._get_node(e,!0);var t=this._get_parent(e),i=this._get_prev(e);this.__rollback(),e=this.delete_node(e),e!==!1&&this.__callback({obj:e,prev:i,parent:t})},check_move:function(){if(!this.__call_old())return!1;var e=this._get_settings().crrm.move;return!!e.check_move.call(this,this._get_move())},move_node:function(e,t,i,n,s,a){var r=this._get_settings().crrm.move;return s?((r.always_copy===!0||"multitree"===r.always_copy&&e.rt.get_index()!==e.ot.get_index())&&(n=!0),void this.__call_old(!0,e,t,i,n,!0,a)):("undefined"==typeof i&&(i=r.default_position),"inside"!==i||r.default_position.match(/^(before|after)$/)||(i=r.default_position),this.__call_old(!0,e,t,i,n,!1,a))},cut:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.cp_nodes=!1,this.data.crrm.ct_nodes=e,void this.__callback({obj:e})):!1},copy:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.ct_nodes=!1,this.data.crrm.cp_nodes=e,void this.__callback({obj:e})):!1},paste:function(e){if(e=this._get_node(e),!e||!e.length)return!1;var t=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;return this.data.crrm.ct_nodes||this.data.crrm.cp_nodes?(this.data.crrm.ct_nodes&&(this.move_node(this.data.crrm.ct_nodes,e),this.data.crrm.ct_nodes=!1),this.data.crrm.cp_nodes&&this.move_node(this.data.crrm.cp_nodes,e,!1,!0),void this.__callback({obj:e,nodes:t})):!1}}})}(jQuery),function(e){var t=[];e.jstree._themes=!1,e.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",e.proxy(function(){var e=this._get_settings().themes;this.data.themes.dots=e.dots,this.data.themes.icons=e.icons,this.set_theme(e.theme,e.url)},this)).bind("loaded.jstree",e.proxy(function(){this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons()},this))},defaults:{theme:"default",url:!1,dots:!0,icons:!0},_fn:{set_theme:function(i,n){return i?(n||(n=e.jstree._themes+i+"/style.css"),-1==e.inArray(n,t)&&(e.vakata.css.add_sheet({url:n}),t.push(n)),this.data.themes.theme!=i&&(this.get_container().removeClass("jstree-"+this.data.themes.theme),this.data.themes.theme=i),this.get_container().addClass("jstree-"+i),this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons(),void this.__callback()):!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()}}}),e(function(){e.jstree._themes===!1&&e("script").each(function(){return this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)?(e.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/",!1):void 0}),e.jstree._themes===!1&&(e.jstree._themes="themes/")}),e.jstree.defaults.plugins.push("themes")}(jQuery),function(e){function t(t,i){var n,s=e.jstree._focused();return s&&s.data&&s.data.hotkeys&&s.data.hotkeys.enabled&&(n=s._get_settings().hotkeys[t])?n.call(s,i):void 0}var i=[];e.jstree.plugin("hotkeys",{__init:function(){if("undefined"==typeof e.hotkeys)throw"jsTree hotkeys: jQuery hotkeys plugin not included.";if(!this.data.ui)throw"jsTree hotkeys: jsTree UI plugin not included.";e.each(this._get_settings().hotkeys,function(n,s){s!==!1&&-1==e.inArray(n,i)&&(e(document).bind("keydown",n,function(e){return t(n,e)}),i.push(n))}),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(),!1},"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},f2:function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected)},del:function(){this.remove(this.data.ui.hovered||this._get_node(null))}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=!0},disable_hotkeys:function(){this.data.hotkeys.enabled=!1}}})}(jQuery),function(e){e.jstree.plugin("json_data",{__init:function(){var e=this._get_settings().json_data;e.progressive_unload&&this.get_container().bind("after_close.jstree",function(e,t){t.rslt.obj.children("ul").remove()})},defaults:{data:!1,ajax:!1,correct_state:!0,progressive_render:!1,progressive_unload:!1},_fn:{load_node:function(e,t,i){var n=this;this.load_node_json(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){var i=this._get_settings().json_data;return t=this._get_node(t),-1==t||!t||!i.ajax&&!i.progressive_render&&!e.isFunction(i.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").length>0},refresh:function(t){t=this._get_node(t);var i=this._get_settings().json_data;return t&&-1!==t&&i.progressive_unload&&(e.isFunction(i.data)||i.ajax)&&t.removeData("jstree_children"),this.__call_old()},load_node_json:function(t,i,n){var s,a=this.get_settings().json_data,r=function(){},o=function(){};if(t=this._get_node(t),t&&-1!==t&&(a.progressive_render||a.progressive_unload)&&!t.is(".jstree-open, .jstree-leaf")&&0===t.children("ul").children("li").length&&t.data("jstree_children"))return s=this._parse_json(t.data("jstree_children"),t),s&&(t.append(s),a.progressive_unload||t.removeData("jstree_children")),this.clean_node(t),void(i&&i.call(this));if(t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!a.data&&!a.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(a.data):a.data.call(this,t,e.proxy(function(e){e=this._parse_json(e,t),e?(-1!==t&&t?(t.append(e).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(e.children()),this.clean_node(t),i&&i.call(this)):(-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&this.correct_state(t)):a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this))},this));break;case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&(!t||-1===t):t&&-1!=t||(s=this._parse_json(a.data,t),s?(this.get_container().children("ul").empty().append(s.children()),this.clean_node()):a.correct_state&&this.get_container().children("ul").empty()),i&&i.call(this);break;case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&t&&-1!==t:r=function(e,i,s){var r=this.get_settings().json_data.ajax.error;r&&r.call(this,e,i,s),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&a.correct_state&&this.correct_state(t)):"success"===i&&a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},o=function(n,s,o){var l=this.get_settings().json_data.ajax.success;return l&&(n=l.call(this,n,s,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")||!e.isArray(n)&&!e.isPlainObject(n)?r.call(this,o,s,""):(n=this._parse_json(n,t),void(n?(-1!==t&&t?(t.append(n).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()),this.clean_node(t),i&&i.call(this)):-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))))},a.ajax.context=this,a.ajax.error=r,a.ajax.success=o,a.ajax.dataType||(a.ajax.dataType="json"),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)}},_parse_json:function(t,i,n){var s,a,r,o,l,h=!1,c=this._get_settings(),d=c.json_data,u=c.core.html_titles;if(!t)return h;if(d.progressive_unload&&i&&-1!==i&&i.data("jstree_children",h),e.isArray(t)){if(h=e(),!t.length)return!1;for(a=0,r=t.length;r>a;a++)s=this._parse_json(t[a],i,!0),s.length&&(h=h.add(s))}else{if("string"==typeof t&&(t={data:t}),!t.data&&""!==t.data)return h;h=e("<li />"),t.attr&&h.attr(t.attr),t.metadata&&h.data(t.metadata),t.state&&h.addClass("jstree-"+t.state),e.isArray(t.data)||(s=t.data,t.data=[],t.data.push(s)),e.each(t.data,function(i,n){s=e("<a />"),e.isFunction(n)&&(n=n.call(this,t)),"string"==typeof n?s.attr("href","#")[u?"html":"text"](n):(n.attr||(n.attr={}),n.attr.href||(n.attr.href="#"),s.attr(n.attr)[u?"html":"text"](n.title),n.language&&s.addClass(n.language)),s.prepend("<ins class='jstree-icon'>&#160;</ins>"),!n.icon&&t.icon&&(n.icon=t.icon),n.icon&&(-1===n.icon.indexOf("/")?s.children("ins").addClass(n.icon):s.children("ins").css("background","url('"+n.icon+"') center center no-repeat")),h.append(s)}),h.prepend("<ins class='jstree-icon'>&#160;</ins>"),t.children&&(d.progressive_render&&"open"!==t.state?h.addClass("jstree-closed").data("jstree_children",t.children):(d.progressive_unload&&h.data("jstree_children",t.children),e.isArray(t.children)&&t.children.length&&(s=this._parse_json(t.children,i,!0),s.length&&(l=e("<ul />"),l.append(s),h.append(l)))))}return n||(o=e("<ul />"),o.append(h),h=o),h},get_json:function(t,i,n,s){var a,r,o,l,h,c,d=[],u=this._get_settings(),p=this;return t=this._get_node(t),t&&-1!==t||(t=this.get_container().find("> ul > li")),i=e.isArray(i)?i:["id","class"],!s&&this.data.types&&i.push(u.types.type_attr),n=e.isArray(n)?n:[],t.each(function(){o=e(this),a={data:[]},i.length&&(a.attr={}),e.each(i,function(e,t){r=o.attr(t),r&&r.length&&r.replace(/jstree[^ ]*/gi,"").length&&(a.attr[t]=(" "+r).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))}),o.hasClass("jstree-open")&&(a.state="open"),o.hasClass("jstree-closed")&&(a.state="closed"),o.data()&&(a.metadata=o.data()),l=o.children("a"),l.each(function(){h=e(this),n.length||-1!==e.inArray("languages",u.plugins)||h.children("ins").get(0).style.backgroundImage.length||h.children("ins").get(0).className&&h.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").length?(c=!1,-1!==e.inArray("languages",u.plugins)&&e.isArray(u.languages)&&u.languages.length&&e.each(u.languages,function(e,t){return h.hasClass(t)?(c=t,!1):void 0}),r={attr:{},title:p.get_text(h,c)},e.each(n,function(e,t){r.attr[t]=(" "+(h.attr(t)||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")}),-1!==e.inArray("languages",u.plugins)&&e.isArray(u.languages)&&u.languages.length&&e.each(u.languages,function(e,t){return h.hasClass(t)?(r.language=t,!0):void 0}),h.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(r.icon=h.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")),h.children("ins").get(0).style.backgroundImage.length&&(r.icon=h.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")",""))):r=p.get_text(h),l.length>1?a.data.push(r):a.data=r}),o=o.find("> ul > li"),o.length&&(a.children=p.get_json(o,i,n,!0)),d.push(a)}),d}}})}(jQuery),function(e){var t=!1;e.jstree.plugin("languages",{__init:function(){this._load_css()},defaults:[],_fn:{set_lang:function(i){var n=this._get_settings().languages,s=!1,a=".jstree-"+this.get_index()+" a";if(!e.isArray(n)||0===n.length)return!1;if(-1==e.inArray(i,n)){if(!n[i])return!1;i=n[i]}return i==this.data.languages.current_language?!0:(s=e.vakata.css.get_css(a+"."+this.data.languages.current_language,!1,t),s!==!1&&(s.style.display="none"),s=e.vakata.css.get_css(a+"."+i,!1,t),s!==!1&&(s.style.display=""),this.data.languages.current_language=i,this.__callback(i),!0)},get_lang:function(){return this.data.languages.current_language},_get_string:function(t,i){var n=this._get_settings().languages,s=this._get_settings().core.strings;return e.isArray(n)&&n.length&&(i=i&&-1!=e.inArray(i,n)?i:this.data.languages.current_language),s[i]&&s[i][t]?s[i][t]:s[t]?s[t]:t},get_text:function(t,i){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var n=this._get_settings().languages,s=this._get_settings().core.html_titles;return e.isArray(n)&&n.length?(i=i&&-1!=e.inArray(i,n)?i:this.data.languages.current_language,t=t.children("a."+i)):t=t.children("a:eq(0)"),s?(t=t.clone(),t.children("INS").remove(),t.html()):(t=t.contents().filter(function(){return 3==this.nodeType})[0],t.nodeValue)},set_text:function(t,i,n){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var s,a=this._get_settings().languages,r=this._get_settings().core.html_titles;return e.isArray(a)&&a.length?(n=n&&-1!=e.inArray(n,a)?n:this.data.languages.current_language,t=t.children("a."+n)):t=t.children("a:eq(0)"),r?(s=t.children("INS").clone(),t.html(i).prepend(s),this.__callback({obj:t,name:i,lang:n}),!0):(t=t.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:t,name:i,lang:n}),t.nodeValue=i)},_load_css:function(){var i,n=this._get_settings().languages,s="/* languages css */",a=".jstree-"+this.get_index()+" a";if(e.isArray(n)&&n.length){for(this.data.languages.current_language=n[0],i=0;i<n.length;i++)s+=a+"."+n[i]+" {",n[i]!=this.data.languages.current_language&&(s+=" display:none; "),s+=" } ";t=e.vakata.css.add_sheet({str:s,title:"jstree-languages"})}},create_node:function(t,i,n,s){var a=this.__call_old(!0,t,i,n,function(t){var i,n=this._get_settings().languages,a=t.children("a");if(e.isArray(n)&&n.length){for(i=0;i<n.length;i++)a.is("."+n[i])||t.append(a.eq(0).clone().removeClass(n.join(" ")).addClass(n[i]));a.not("."+n.join(", .")).remove()}s&&s.call(this,t)});return a}}})}(jQuery),function(e){e.jstree.plugin("cookies",{__init:function(){if("undefined"==typeof e.cookie)throw"jsTree cookie: jQuery cookie plugin not included.";var t,i=this._get_settings().cookies;i.save_loaded&&(t=e.cookie(i.save_loaded),t&&t.length&&(this.data.core.to_load=t.split(","))),i.save_opened&&(t=e.cookie(i.save_opened),t&&t.length&&(this.data.core.to_open=t.split(","))),i.save_selected&&(t=e.cookie(i.save_selected),t&&t.length&&this.data.ui&&(this.data.ui.to_select=t.split(","))),this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",e.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",e.proxy(function(e){this._get_settings().cookies.auto_save&&this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""))},this))},this))},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:!0,cookie_options:{}},_fn:{save_cookie:function(t){if(!this.data.core.refreshing){var i=this._get_settings().cookies;if(!t)return i.save_loaded&&(this.save_loaded(),e.cookie(i.save_loaded,this.data.core.to_load.join(","),i.cookie_options)),i.save_opened&&(this.save_opened(),e.cookie(i.save_opened,this.data.core.to_open.join(","),i.cookie_options)),void(i.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(i.save_selected,this.data.ui.to_select.join(","),i.cookie_options)));switch(t){case"open_node":case"close_node":i.save_opened&&(this.save_opened(),e.cookie(i.save_opened,this.data.core.to_open.join(","),i.cookie_options)),i.save_loaded&&(this.save_loaded(),e.cookie(i.save_loaded,this.data.core.to_load.join(","),i.cookie_options));break;case"select_node":case"deselect_node":i.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(i.save_selected,this.data.ui.to_select.join(","),i.cookie_options))}}}}})}(jQuery),function(e){e.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",e.proxy(function(e,t){var i=this._get_node(t.rslt.obj);i=-1===i?this.get_container().children("ul"):i.children("ul"),this.sort(i)},this)).bind("rename_node.jstree create_node.jstree create.jstree",e.proxy(function(e,t){this.sort(t.rslt.obj.parent())},this)).bind("move_node.jstree",e.proxy(function(e,t){var i=-1==t.rslt.np?this.get_container():t.rslt.np;this.sort(i.children("ul"))},this))},defaults:function(e,t){return this.get_text(e)>this.get_text(t)?1:-1},_fn:{sort:function(t){var i=this._get_settings().sort,n=this;t.append(e.makeArray(t.children("li")).sort(e.proxy(i,n))),t.find("> li > ul").each(function(){n.sort(e(this))}),this.clean_node(t)}}})}(jQuery),function(e){var t=!1,i=!1,n=!1,s=!1,a=!1,r=!1,o=!1,l=!1,h=!1;e.vakata.dnd={is_down:!1,is_drag:!1,helper:!1,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(t,i,n){e.vakata.dnd.is_drag&&e.vakata.drag_stop({});try{t.currentTarget.unselectable="on",t.currentTarget.onselectstart=function(){return!1},t.currentTarget.style&&(t.currentTarget.style.MozUserSelect="none")}catch(s){}return e.vakata.dnd.init_x=t.pageX,e.vakata.dnd.init_y=t.pageY,e.vakata.dnd.user_data=i,e.vakata.dnd.is_down=!0,e.vakata.dnd.helper=e("<div id='vakata-dragged' />").html(n),e(document).bind("mousemove",e.vakata.dnd.drag),e(document).bind("mouseup",e.vakata.dnd.drag_stop),!1},drag:function(t){if(e.vakata.dnd.is_down){if(!e.vakata.dnd.is_drag){if(!(Math.abs(t.pageX-e.vakata.dnd.init_x)>5||Math.abs(t.pageY-e.vakata.dnd.init_y)>5))return;e.vakata.dnd.helper.appendTo("body"),e.vakata.dnd.is_drag=!0,e(document).triggerHandler("drag_start.vakata",{event:t,data:e.vakata.dnd.user_data})}if("mousemove"===t.type){var i=e(document),n=i.scrollTop(),s=i.scrollLeft();t.pageY-n<20?(r&&"down"===o&&(clearInterval(r),r=!1),r||(o="up",r=setInterval(function(){e(document).scrollTop(e(document).scrollTop()-e.vakata.dnd.scroll_spd)},150))):r&&"up"===o&&(clearInterval(r),r=!1),e(window).height()-(t.pageY-n)<20?(r&&"up"===o&&(clearInterval(r),r=!1),r||(o="down",r=setInterval(function(){e(document).scrollTop(e(document).scrollTop()+e.vakata.dnd.scroll_spd)},150))):r&&"down"===o&&(clearInterval(r),r=!1),t.pageX-s<20?(a&&"right"===l&&(clearInterval(a),a=!1),a||(l="left",a=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()-e.vakata.dnd.scroll_spd)},150))):a&&"left"===l&&(clearInterval(a),a=!1),e(window).width()-(t.pageX-s)<20?(a&&"left"===l&&(clearInterval(a),a=!1),a||(l="right",a=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()+e.vakata.dnd.scroll_spd)},150))):a&&"right"===l&&(clearInterval(a),a=!1)}e.vakata.dnd.helper.css({left:t.pageX+e.vakata.dnd.helper_left+"px",top:t.pageY+e.vakata.dnd.helper_top+"px"}),e(document).triggerHandler("drag.vakata",{event:t,data:e.vakata.dnd.user_data})}},drag_stop:function(t){a&&clearInterval(a),r&&clearInterval(r),e(document).unbind("mousemove",e.vakata.dnd.drag),e(document).unbind("mouseup",e.vakata.dnd.drag_stop),e(document).triggerHandler("drag_stop.vakata",{event:t,data:e.vakata.dnd.user_data}),e.vakata.dnd.helper.remove(),e.vakata.dnd.init_x=0,e.vakata.dnd.init_y=0,e.vakata.dnd.user_data={},e.vakata.dnd.is_down=!1,e.vakata.dnd.is_drag=!1}},e(function(){var t="#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ";e.vakata.css.add_sheet({str:t,title:"vakata"})}),e.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:!1,after:!1,inside:!1,before:!1,off:!1,prepared:!1,w:0,to1:!1,to2:!1,cof:!1,cw:!1,ch:!1,i1:!1,i2:!1,mto:!1},this.get_container().bind("mouseenter.jstree",e.proxy(function(i){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.themes&&(n.attr("class","jstree-"+this.data.themes.theme),s&&s.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),i.currentTarget===i.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==i.target)){var a,r=e.jstree._reference(i.target);r.data.dnd.foreign?(a=r._get_settings().dnd.drag_check.call(this,{o:t,r:r.get_container(),is_root:!0}),a!==!0&&a.inside!==!0&&a.before!==!0&&a.after!==!0||e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")):(r.prepare_move(t,r.get_container(),"last"),r.check_move()&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"))}},this)).bind("mouseup.jstree",e.proxy(function(i){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&i.currentTarget===i.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==i.target){var n,s=e.jstree._reference(i.currentTarget);s.data.dnd.foreign?(n=s._get_settings().dnd.drag_check.call(this,{o:t,r:s.get_container(),is_root:!0}),n!==!0&&n.inside!==!0&&n.before!==!0&&n.after!==!0||s._get_settings().dnd.drag_finish.call(this,{o:t,r:s.get_container(),is_root:!0})):s.move_node(t,s.get_container(),"last",i[s._get_settings().dnd.copy_modifier+"Key"])}},this)).bind("mouseleave.jstree",e.proxy(function(t){return t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id?!1:void(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")))},this)).bind("mousemove.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){var i=this.get_container()[0];t.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft+=e.vakata.dnd.scroll_spd},i),100)):t.pageX-24<this.data.dnd.cof.left?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft-=e.vakata.dnd.scroll_spd},i),100)):this.data.dnd.i1&&clearInterval(this.data.dnd.i1),t.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop+=e.vakata.dnd.scroll_spd},i),100)):t.pageY-24<this.data.dnd.cof.top?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop-=e.vakata.dnd.scroll_spd},i),100)):this.data.dnd.i2&&clearInterval(this.data.dnd.i2)}},this)).bind("scroll.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&n&&s&&(n.hide(),s.hide())},this)).delegate("a","mousedown.jstree",e.proxy(function(e){return 1===e.which?(this.start_drag(e.currentTarget,e),!1):void 0},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_enter(t.currentTarget)},this)).delegate("a","mousemove.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(i&&i.length&&i.children("a")[0]===t.currentTarget||this.dnd_enter(t.currentTarget),"undefined"==typeof this.data.dnd.off.top&&(this.data.dnd.off=e(t.target).offset()),this.data.dnd.w=(t.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height,this.data.dnd.w<0&&(this.data.dnd.w+=this.data.core.li_height),this.dnd_show())},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){if(t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id)return!1;n&&n.hide(),s&&s.hide(),this.data.dnd.mto=setTimeout(function(e){return function(){e.dnd_leave(t)}}(this),0)}},this)).delegate("a, #jstree-marker-line","mouseup.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_finish(t)},this)),e(document).bind("drag_stop.vakata",e.proxy(function(){this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,this.data.dnd.off=!1,this.data.dnd.prepared=!1,this.data.dnd.w=!1,this.data.dnd.to1=!1,this.data.dnd.to2=!1,this.data.dnd.i1=!1,this.data.dnd.i2=!1,this.data.dnd.active=!1,this.data.dnd.foreign=!1,n&&n.css({top:"-2000px"}),s&&s.css({top:"-2000px"})},this)).bind("drag_start.vakata",e.proxy(function(t,i){if(i.data.jstree){var n=e(i.event.target);n.closest(".jstree").hasClass("jstree-"+this.get_index())&&this.dnd_enter(n)}},this));var a=this._get_settings().dnd;a.drag_target&&e(document).delegate(a.drag_target,"mousedown.jstree-"+this.get_index(),e.proxy(function(i){t=i.target,e.vakata.dnd.drag_start(i,{jstree:!0,obj:i.target},"<ins class='jstree-icon'></ins>"+e(i.target).text()),this.data.themes&&(n&&n.attr("class","jstree-"+this.data.themes.theme),s&&s.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var a=this.get_container();this.data.dnd.cof=a.offset(),this.data.dnd.cw=parseInt(a.width(),10),this.data.dnd.ch=parseInt(a.height(),10),this.data.dnd.foreign=!0,i.preventDefault()},this)),a.drop_target&&e(document).delegate(a.drop_target,"mouseenter.jstree-"+this.get_index(),e.proxy(function(i){this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{o:t,r:e(i.target),e:i})&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")},this)).delegate(a.drop_target,"mouseleave.jstree-"+this.get_index(),e.proxy(function(t){this.data.dnd.active&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")},this)).delegate(a.drop_target+", #jstree-marker-line","mouseup.jstree-"+this.get_index(),e.proxy(function(i){
this.data.dnd.active&&e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&this._get_settings().dnd.drop_finish.call(this,{o:t,r:e(i.target),e:i})},this))},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(e){return!0},drop_finish:e.noop,drag_target:".jstree-draggable",drag_finish:e.noop,drag_check:function(e){return{after:!1,before:!1,inside:!0}}},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("drag_start.vakata").unbind("drag_stop.vakata"),t=!1},_fn:{dnd_prepare:function(){if(i&&i.length){if(this.data.dnd.off=i.offset(),this._get_settings().core.rtl&&(this.data.dnd.off.right=this.data.dnd.off.left+i.width()),this.data.dnd.foreign){var e=this._get_settings().dnd.drag_check.call(this,{o:t,r:i});return this.data.dnd.after=e.after,this.data.dnd.before=e.before,this.data.dnd.inside=e.inside,this.data.dnd.prepared=!0,this.dnd_show()}return this.prepare_move(t,i,"before"),this.data.dnd.before=this.check_move(),this.prepare_move(t,i,"after"),this.data.dnd.after=this.check_move(),this._is_loaded(i)?(this.prepare_move(t,i,"inside"),this.data.dnd.inside=this.check_move()):this.data.dnd.inside=!1,this.data.dnd.prepared=!0,this.dnd_show()}},dnd_show:function(){if(this.data.dnd.prepared){var t,i=["before","inside","after"],a=!1,r=this._get_settings().core.rtl;switch(i=this.data.dnd.w<this.data.core.li_height/3?["before","inside","after"]:this.data.dnd.w<=2*this.data.core.li_height/3?this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"]:["after","inside","before"],e.each(i,e.proxy(function(t,i){return this.data.dnd[i]?(e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"),a=i,!1):void 0},this)),a===!1&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),t=r?this.data.dnd.off.right-18:this.data.dnd.off.left+10,a){case"before":n.css({left:t+"px",top:this.data.dnd.off.top-6+"px"}).show(),s&&s.css({left:t+8+"px",top:this.data.dnd.off.top-1+"px"}).show();break;case"after":n.css({left:t+"px",top:this.data.dnd.off.top+this.data.core.li_height-6+"px"}).show(),s&&s.css({left:t+8+"px",top:this.data.dnd.off.top+this.data.core.li_height-1+"px"}).show();break;case"inside":n.css({left:t+(r?-4:4)+"px",top:this.data.dnd.off.top+this.data.core.li_height/2-5+"px"}).show(),s&&s.hide();break;default:n.hide(),s&&s.hide()}return h=a,a}},dnd_open:function(){this.data.dnd.to2=!1,this.open_node(i,e.proxy(this.dnd_prepare,this),!0)},dnd_finish:function(e){this.data.dnd.foreign?(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside)&&this._get_settings().dnd.drag_finish.call(this,{o:t,r:i,p:h}):(this.dnd_prepare(),this.move_node(t,i,h,e[this._get_settings().dnd.copy_modifier+"Key"])),t=!1,i=!1,n.hide(),s&&s.hide()},dnd_enter:function(t){this.data.dnd.mto&&(clearTimeout(this.data.dnd.mto),this.data.dnd.mto=!1);var n=this._get_settings().dnd;this.data.dnd.prepared=!1,i=this._get_node(t),n.check_timeout?(this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to1=setTimeout(e.proxy(this.dnd_prepare,this),n.check_timeout)):this.dnd_prepare(),n.open_timeout?(this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),i&&i.length&&i.hasClass("jstree-closed")&&(this.data.dnd.to2=setTimeout(e.proxy(this.dnd_open,this),n.open_timeout))):i&&i.length&&i.hasClass("jstree-closed")&&this.dnd_open()},dnd_leave:function(t){this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),n.hide(),s&&s.hide(),i&&i[0]===t.target.parentNode&&(this.data.dnd.to1&&(clearTimeout(this.data.dnd.to1),this.data.dnd.to1=!1),this.data.dnd.to2&&(clearTimeout(this.data.dnd.to2),this.data.dnd.to2=!1))},start_drag:function(i,a){t=this._get_node(i),this.data.ui&&this.is_selected(t)&&(t=this._get_node(null,!0));var r=t.length>1?this._get_string("multiple_selection"):this.get_text(t),o=this.get_container();this._get_settings().core.html_titles||(r=r.replace(/</gi,"&lt;").replace(/>/gi,"&gt;")),e.vakata.dnd.drag_start(a,{jstree:!0,obj:t},"<ins class='jstree-icon'></ins>"+r),this.data.themes&&(n&&n.attr("class","jstree-"+this.data.themes.theme),s&&s.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),this.data.dnd.cof=o.offset(),this.data.dnd.cw=parseInt(o.width(),10),this.data.dnd.ch=parseInt(o.height(),10),this.data.dnd.active=!0}}}),e(function(){var t="#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } #jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; }";e.vakata.css.add_sheet({str:t,title:"jstree"}),n=e("<div />").attr({id:"jstree-marker"}).hide().html("&raquo;").bind("mouseleave mouseenter",function(e){return n.hide(),s.hide(),e.preventDefault(),e.stopImmediatePropagation(),!1}).appendTo("body"),s=e("<div />").attr({id:"jstree-marker-line"}).hide().bind("mouseup",function(e){return i&&i.length?(i.children("a").trigger(e),e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}).bind("mouseleave",function(t){var a=e(t.relatedTarget);return(a.is(".jstree")||0===a.closest(".jstree").length)&&i&&i.length?(i.children("a").trigger(t),n.hide(),s.hide(),t.preventDefault(),t.stopImmediatePropagation(),!1):void 0}).appendTo("body"),e(document).bind("drag_start.vakata",function(e,t){t.data.jstree&&(n.show(),s&&s.show())}),e(document).bind("drag_stop.vakata",function(e,t){t.data.jstree&&(n.hide(),s&&s.hide())})})}(jQuery),function(e){e.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui,this.data.ui&&this.data.checkbox.noui&&(this.select_node=this.deselect_node=this.deselect_all=e.noop,this.get_selected=this.get_checked),this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",e.proxy(function(e,t){this._prepare_checkboxes(t.rslt.obj)},this)).bind("loaded.jstree",e.proxy(function(e){this._prepare_checkboxes()},this)).delegate(this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox","click.jstree",e.proxy(function(e){return e.preventDefault(),this._get_node(e.target).hasClass("jstree-checked")?this.uncheck_node(e.target):this.check_node(e.target),this.data.ui&&this.data.checkbox.noui?(this.save_selected(),void(this.data.cookies&&this.save_cookie("select_node"))):(e.stopImmediatePropagation(),!1)},this))},defaults:{override_ui:!1,two_state:!1,real_checkboxes:!1,checked_parent_open:!0,real_checkboxes_names:function(e){return["check_"+(e[0].id||Math.ceil(1e4*Math.random())),1]}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove()},_fn:{_checkbox_notify:function(e,t){t.checked&&this.check_node(e,!1)},_prepare_checkboxes:function(t){if(t=t&&-1!=t?this._get_node(t):this.get_container().find("> ul > li"),t!==!1){var i,n,s=this,a=this._get_settings().checkbox.two_state,r=this._get_settings().checkbox.real_checkboxes,o=this._get_settings().checkbox.real_checkboxes_names;t.each(function(){n=e(this),i=n.is("li")&&(n.hasClass("jstree-checked")||r&&n.children(":checked").length)?"jstree-checked":"jstree-unchecked",n.find("li").andSelf().each(function(){var t,n=e(this);n.children("a"+(s.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(a?"jstree-unchecked":i),r&&(n.children(":checkbox").length?n.children(":checkbox").addClass("jstree-real-checkbox"):(t=o.call(s,n),n.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+t[0]+"' name='"+t[0]+"' value='"+t[1]+"' />"))),a?(n.hasClass("jstree-checked")||n.children(":checked").length)&&n.addClass("jstree-checked").children(":checkbox").prop("checked",!0):("jstree-checked"===i||n.hasClass("jstree-checked")||n.children(":checked").length)&&n.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",!0)})}),a||t.find(".jstree-checked").parent().parent().each(function(){s._repair_state(this)})}},change_state:function(t,i){t=this._get_node(t);var n=!1,s=this._get_settings().checkbox.real_checkboxes;if(!t||-1===t)return!1;if(i=i===!1||i===!0?i:t.hasClass("jstree-checked"),this._get_settings().checkbox.two_state)i?(t.removeClass("jstree-checked").addClass("jstree-unchecked"),s&&t.children(":checkbox").prop("checked",!1)):(t.removeClass("jstree-unchecked").addClass("jstree-checked"),s&&t.children(":checkbox").prop("checked",!0));else{if(i){if(n=t.find("li").andSelf(),!n.filter(".jstree-checked, .jstree-undetermined").length)return!1;n.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),s&&n.children(":checkbox").prop("checked",!1)}else{if(n=t.find("li").andSelf(),!n.filter(".jstree-unchecked, .jstree-undetermined").length)return!1;n.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),s&&n.children(":checkbox").prop("checked",!0),this.data.ui&&(this.data.ui.last_selected=t),this.data.checkbox.last_selected=t}t.parentsUntil(".jstree","li").each(function(){var t=e(this);if(i){if(t.children("ul").children("li.jstree-checked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),s&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),s&&t.children(":checkbox").prop("checked",!1)}else{if(t.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),s&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),s&&t.children(":checkbox").prop("checked",!0)}})}return this.data.ui&&this.data.checkbox.noui&&(this.data.ui.selected=this.get_checked()),this.__callback(t),!0},check_node:function(e){if(this.change_state(e,!1)){if(e=this._get_node(e),this._get_settings().checkbox.checked_parent_open){var t=this;e.parents(".jstree-closed").each(function(){t.open_node(this,!1,!0)})}this.__callback({obj:e})}},uncheck_node:function(e){this.change_state(e,!0)&&this.__callback({obj:this._get_node(e)})},check_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!1)}),this.__callback()},uncheck_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!0)}),this.__callback()},is_checked:function(e){return e=this._get_node(e),e.length?e.is(".jstree-checked"):!1},get_checked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-checked"):e.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-unchecked"):e.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(e){if(e=this._get_node(e),e.length){if(this._get_settings().checkbox.two_state)return void e.find("li").andSelf().not(".jstree-checked").removeClass("jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",!0);var t=this._get_settings().checkbox.real_checkboxes,i=e.find("> ul > .jstree-checked").length,n=e.find("> ul > .jstree-undetermined").length,s=e.find("> ul > li").length;0===s?e.hasClass("jstree-undetermined")&&this.change_state(e,!1):0===i&&0===n?this.change_state(e,!0):i===s?this.change_state(e,!1):(e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),t&&e.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1))}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var t=this,i=this.data.ui.to_select;i=e.map(e.makeArray(i),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.deselect_all(),e.each(i,function(e,i){t.check_node(i)}),this.__callback()}else this.__call_old()},save_loaded:function(){var e=this;this.data.core.to_load=[],this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){this.id&&e.data.core.to_load.push("#"+this.id)})}}}),e(function(){var t=".jstree .jstree-real-checkbox { display:none; } ";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.vakata.xslt=function(t,i,n){var s,a,r,o,l="";return document.recalc?(s=document.createElement("xml"),a=document.createElement("xml"),s.innerHTML=t,a.innerHTML=i,e("body").append(s).append(a),setTimeout(function(t,i,n){return function(){n.call(null,t.transformNode(i.XMLDocument)),setTimeout(function(t,i){return function(){e(t).remove(),e(i).remove()}}(t,i),200)}}(s,a,n),100),!0):("undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"==typeof window.XSLTProcessor&&(t=(new DOMParser).parseFromString(t,"text/xml"),i=(new DOMParser).parseFromString(i,"text/xml")),"undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"!=typeof window.XSLTProcessor?(r=new XSLTProcessor,(o=e.isFunction(r.transformDocument)?"undefined"!=typeof window.XMLSerializer:!0)?(t=(new DOMParser).parseFromString(t,"text/xml"),i=(new DOMParser).parseFromString(i,"text/xml"),e.isFunction(r.transformDocument)?(l=document.implementation.createDocument("","",null),r.transformDocument(t,i,l,null),n.call(null,(new XMLSerializer).serializeToString(l)),!0):(r.importStylesheet(i),l=r.transformToFragment(t,document),n.call(null,e("<div />").append(l).html()),!0)):!1):!1)};var t={nest:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" /><xsl:template match="/"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="/root" /> </xsl:call-template></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <ul> <xsl:for-each select="$node/item"> <xsl:variable name="children" select="count(./item) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="position() = last()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if> </li> </xsl:for-each> </ul></xsl:template></xsl:stylesheet>',flat:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" /><xsl:template match="/"> <ul> <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <xsl:param name="is_last" /> <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="$is_last = true()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children"> <ul> <xsl:for-each select="//item[@parent_id=$node/attribute::id]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul> </xsl:if> </li></xsl:template></xsl:stylesheet>'},i=function(e){return e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")};e.jstree.plugin("xml_data",{defaults:{data:!1,ajax:!1,xsl:"flat",clean_node:!1,correct_state:!0,get_skip_empty:!1,get_include_preamble:!0},_fn:{load_node:function(e,t,i){var n=this;this.load_node_xml(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){var i=this._get_settings().xml_data;return t=this._get_node(t),-1==t||!t||!i.ajax&&!e.isFunction(i.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_xml:function(t,i,n){var s=this.get_settings().xml_data,a=function(){},r=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!s.data&&!s.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(s.data):s.data.call(this,t,e.proxy(function(n){this.parse_xml(n,e.proxy(function(n){n&&(n=n.replace(/ ?xmlns="[^"]*"/gi,""),n.length>10?(n=e(n),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()),s.clean_node&&this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(t),i&&i.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},this))},this));break;case!!s.data&&!s.ajax||!!s.data&&!!s.ajax&&(!t||-1===t):t&&-1!=t||this.parse_xml(s.data,e.proxy(function(n){n?(n=n.replace(/ ?xmlns="[^"]*"/gi,""),n.length>10&&(n=e(n),this.get_container().children("ul").empty().append(n.children()),s.clean_node&&this.clean_node(t),i&&i.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!s.data&&!!s.ajax||!!s.data&&!!s.ajax&&t&&-1!==t:a=function(e,i,a){var r=this.get_settings().xml_data.ajax.error;r&&r.call(this,e,i,a),-1!==t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&s.correct_state&&this.correct_state(t)):"success"===i&&s.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},r=function(n,r,o){n=o.responseText;var l=this.get_settings().xml_data.ajax.success;return l&&(n=l.call(this,n,r,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")?a.call(this,o,r,""):void this.parse_xml(n,e.proxy(function(n){n&&(n=n.replace(/ ?xmlns="[^"]*"/gi,""),n.length>10?(n=e(n),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()),s.clean_node&&this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(t),i&&i.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},this))},s.ajax.context=this,s.ajax.error=a,s.ajax.success=r,s.ajax.dataType||(s.ajax.dataType="xml"),e.isFunction(s.ajax.url)&&(s.ajax.url=s.ajax.url.call(this,t)),e.isFunction(s.ajax.data)&&(s.ajax.data=s.ajax.data.call(this,t)),e.ajax(s.ajax)}},parse_xml:function(i,n){var s=this._get_settings().xml_data;e.vakata.xslt(i,t[s.xsl],n)},get_xml:function(t,n,s,a,r){var o,l,h,c,d,u="",p=this._get_settings(),f=this;return t||(t="flat"),r||(r=0),n=this._get_node(n),n&&-1!==n||(n=this.get_container().find("> ul > li")),s=e.isArray(s)?s:["id","class"],!r&&this.data.types&&-1===e.inArray(p.types.type_attr,s)&&s.push(p.types.type_attr),a=e.isArray(a)?a:[],r||(p.xml_data.get_include_preamble&&(u+='<?xml version="1.0" encoding="UTF-8"?>'),u+="<root>"),n.each(function(){u+="<item",h=e(this),e.each(s,function(e,t){var n=h.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof n||(u+=" "+t+'="'+i((" "+(n||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),h.hasClass("jstree-open")&&(u+=' state="open"'),h.hasClass("jstree-closed")&&(u+=' state="closed"'),"flat"===t&&(u+=' parent_id="'+i(r)+'"'),u+=">",u+="<content>",c=h.children("a"),c.each(function(){o=e(this),d=!1,u+="<name",-1!==e.inArray("languages",p.plugins)&&e.each(p.languages,function(e,t){return o.hasClass(t)?(u+=' lang="'+i(t)+'"',d=t,!1):void 0}),a.length&&e.each(a,function(e,t){var n=o.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof n||(u+=" "+t+'="'+i((" "+n||"").replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),o.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(u+=' icon="'+i(o.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"'),o.children("ins").get(0).style.backgroundImage.length&&(u+=' icon="'+i(o.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/gi,"").replace(/"/gi,""))+'"'),u+=">",u+="<![CDATA["+f.get_text(o,d)+"]]>",u+="</name>"}),u+="</content>",l=h[0].id||!0,h=h.find("> ul > li"),l=h.length?f.get_xml(t,h,s,a,l):"","nest"==t&&(u+=l),u+="</item>","flat"==t&&(u+=l)}),r||(u+="</root>"),u}}})}(jQuery),function(e){e.expr[":"].jstree_contains=function(e,t,i){return(e.textContent||e.innerText||"").toLowerCase().indexOf(i[3].toLowerCase())>=0},e.expr[":"].jstree_title_contains=function(e,t,i){return(e.getAttribute("title")||"").toLowerCase().indexOf(i[3].toLowerCase())>=0},e.jstree.plugin("search",{__init:function(){this.data.search.str="",this.data.search.result=e(),this._get_settings().search.show_only_matches&&this.get_container().bind("search.jstree",function(t,i){e(this).children("ul").find("li").hide().removeClass("jstree-last"),i.rslt.nodes.parentsUntil(".jstree").andSelf().show().filter("ul").each(function(){e(this).children("li:visible").eq(-1).addClass("jstree-last")})}).bind("clear_search.jstree",function(){e(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1)})},defaults:{ajax:!1,search_method:"jstree_contains",show_only_matches:!1},_fn:{search:function(t,i){if(""===e.trim(t))return void this.clear_search();var n=this.get_settings().search,s=this,a=function(){},r=function(){};return this.data.search.str=t,!i&&n.ajax!==!1&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0?(this.search.supress_callback=!0,a=function(){},r=function(e,t,i){var n=this.get_settings().search.ajax.success;n&&(e=n.call(this,e,t,i)||e),this.data.search.to_open=e,this._search_open()},n.ajax.context=this,n.ajax.error=a,n.ajax.success=r,e.isFunction(n.ajax.url)&&(n.ajax.url=n.ajax.url.call(this,t)),e.isFunction(n.ajax.data)&&(n.ajax.data=n.ajax.data.call(this,t)),n.ajax.data||(n.ajax.data={search_string:t}),n.ajax.dataType&&!/^json/.exec(n.ajax.dataType)||(n.ajax.dataType="json"),void e.ajax(n.ajax)):(this.data.search.result.length&&this.clear_search(),this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+n.search_method+"("+this.data.search.str+")"),this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){s.open_node(this,!1,!0)}),void this.__callback({nodes:this.data.search.result,str:t}))},clear_search:function(t){this.data.search.result.removeClass("jstree-search"),this.__callback(this.data.search.result),this.data.search.result=e()},_search_open:function(t){var i=this,n=!0,s=[],a=[];this.data.search.to_open.length&&(e.each(this.data.search.to_open,function(t,i){return"#"==i?!0:void(e(i).length&&e(i).is(".jstree-closed")?s.push(i):a.push(i))}),s.length&&(this.data.search.to_open=a,e.each(s,function(e,t){i.open_node(t,function(){i._search_open(!0)})}),n=!1)),n&&this.search(this.data.search.str,!0)}}})}(jQuery),function(e){e.vakata.context={hide_on_mouseleave:!1,cnt:e("<div id='vakata-contextmenu' />"),vis:!1,tgt:!1,par:!1,func:!1,data:!1,rtl:!1,show:function(t,i,n,s,a,r,o){e.vakata.context.rtl=!!o;var l,h,c=e.vakata.context.parse(t);c&&(e.vakata.context.vis=!0,e.vakata.context.tgt=i,e.vakata.context.par=r||i||null,e.vakata.context.data=a||null,e.vakata.context.cnt.html(c).css({visibility:"hidden",display:"block",left:0,top:0}),e.vakata.context.hide_on_mouseleave&&e.vakata.context.cnt.one("mouseleave",function(t){e.vakata.context.hide()}),l=e.vakata.context.cnt.height(),h=e.vakata.context.cnt.width(),n+h>e(document).width()&&(n=e(document).width()-(h+5),e.vakata.context.cnt.find("li > ul").addClass("right")),s+l>e(document).height()&&(s-=l+i[0].offsetHeight,e.vakata.context.cnt.find("li > ul").addClass("bottom")),e.vakata.context.cnt.css({left:n,top:s}).find("li:has(ul)").bind("mouseenter",function(t){var i=e(document).width(),n=e(document).height(),s=e(this).children("ul").show();i!==e(document).width()&&s.toggleClass("right"),n!==e(document).height()&&s.toggleClass("bottom")}).bind("mouseleave",function(t){e(this).children("ul").hide()}).end().css({visibility:"visible"}).show(),e(document).triggerHandler("context_show.vakata"))},hide:function(){e.vakata.context.vis=!1,e.vakata.context.cnt.attr("class","").css({visibility:"hidden"}),e(document).triggerHandler("context_hide.vakata")},parse:function(t,i){if(!t)return!1;var n="",s=!1,a=!0;return i||(e.vakata.context.func={}),n+="<ul>",e.each(t,function(t,i){return i?(e.vakata.context.func[t]=i.action,!a&&i.separator_before&&(n+="<li class='vakata-separator vakata-separator-before'></li>"),a=!1,n+="<li class='"+(i._class||"")+(i._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ",i.icon&&-1===i.icon.indexOf("/")&&(n+=" class='"+i.icon+"' "),i.icon&&-1!==i.icon.indexOf("/")&&(n+=" style='background:url("+i.icon+") center center no-repeat;' "),n+=">&#160;</ins><a href='#' rel='"+t+"'>",i.submenu&&(n+="<span style='float:"+(e.vakata.context.rtl?"left":"right")+";'>&raquo;</span>"),n+=i.label+"</a>",i.submenu&&(s=e.vakata.context.parse(i.submenu,!0),s&&(n+=s)),n+="</li>",void(i.separator_after&&(n+="<li class='vakata-separator vakata-separator-after'></li>",a=!0))):!0}),n=n.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,""),n+="</ul>",e(document).triggerHandler("context_parse.vakata"),n.length>10?n:!1},exec:function(t){return e.isFunction(e.vakata.context.func[t])?(e.vakata.context.func[t].call(e.vakata.context.data,e.vakata.context.par),!0):!1}},e(function(){var t="#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } #vakata-contextmenu ul { min-width:180px; *width:180px; } #vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } #vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } #vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } #vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } #vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } #vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } #vakata-contextmenu .right { right:100%; left:auto; } #vakata-contextmenu .bottom { bottom:-1px; top:auto; } #vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ";
e.vakata.css.add_sheet({str:t,title:"vakata"}),e.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(t){!e(this).parent().hasClass("jstree-contextmenu-disabled")&&e.vakata.context.exec(e(this).attr("rel"))?e.vakata.context.hide():e(this).blur()}).delegate("a","mouseover",function(){e.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body"),e(document).bind("mousedown",function(t){e.vakata.context.vis&&!e.contains(e.vakata.context.cnt[0],t.target)&&e.vakata.context.hide()}),"undefined"!=typeof e.hotkeys&&e(document).bind("keydown","up",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","down",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","right",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","left",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","esc",function(t){e.vakata.context.hide(),t.preventDefault()}).bind("keydown","space",function(t){e.vakata.context.cnt.find(".vakata-hover").last().children("a").click(),t.preventDefault()})}),e.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",e.proxy(function(t){t.preventDefault(),e(t.currentTarget).hasClass("jstree-loading")||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY)},this)).delegate("a","click.jstree",e.proxy(function(t){this.data.contextmenu&&e.vakata.context.hide()},this)).bind("destroy.jstree",e.proxy(function(){this.data.contextmenu&&e.vakata.context.hide()},this)),e(document).bind("context_hide.vakata",e.proxy(function(){this.data.contextmenu=!1},this))},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("context_hide.vakata")},defaults:{select_node:!1,show_at_node:!0,items:{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(e){this.create(e)}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(e){this.rename(e)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(e){this.is_selected(e)?this.remove():this.remove(e)}},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(e){this.cut(e)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){this.copy(e)}},paste:{separator_before:!1,icon:!1,separator_after:!1,label:"Paste",action:function(e){this.paste(e)}}}}}},_fn:{show_contextmenu:function(t,i,n){t=this._get_node(t);var s=this.get_settings().contextmenu,a=t.children("a:visible:eq(0)"),r=!1,o=!1;s.select_node&&this.data.ui&&!this.is_selected(t)&&(this.deselect_all(),this.select_node(t,!0)),(s.show_at_node||"undefined"==typeof i||"undefined"==typeof n)&&(r=a.offset(),i=r.left,n=r.top+this.data.core.li_height),o=t.data("jstree")&&t.data("jstree").contextmenu?t.data("jstree").contextmenu:s.items,e.isFunction(o)&&(o=o.call(this,t)),this.data.contextmenu=!0,e.vakata.context.show(o,a,i,n,this,t,this._get_settings().core.rtl),this.data.themes&&e.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})}(jQuery),function(t){t.jstree.plugin("types",{__init:function(){var i=this._get_settings().types;this.data.types.attach_to=[],this.get_container().bind("init.jstree",t.proxy(function(){var e=i.types,n=i.type_attr,s="",a=this;t.each(e,function(e,i){return t.each(i,function(e,t){/^(max_depth|max_children|icon|valid_children)$/.test(e)||a.data.types.attach_to.push(e)}),i.icon?void((i.icon.image||i.icon.position)&&(s+="default"==e?".jstree-"+a.get_index()+" a > .jstree-icon { ":".jstree-"+a.get_index()+" li["+n+'="'+e+'"] > a > .jstree-icon { ',i.icon.image&&(s+=" background-image:url("+i.icon.image+"); "),s+=i.icon.position?" background-position:"+i.icon.position+"; ":" background-position:0 0; ",s+="} ")):!0}),""!==s&&t.vakata.css.add_sheet({str:s,title:"jstree-types"})},this)).bind("before.jstree",t.proxy(function(e,i){var n,s,a=this._get_settings().types.use_data?this._get_node(i.args[0]):!1,r=a&&-1!==a&&a.length?a.data("jstree"):!1;if(r&&r.types&&r.types[i.func]===!1)return e.stopImmediatePropagation(),!1;if(-1!==t.inArray(i.func,this.data.types.attach_to)){if(!i.args[0]||!i.args[0].tagName&&!i.args[0].jquery)return;if(n=this._get_settings().types.types,s=this._get_type(i.args[0]),(n[s]&&"undefined"!=typeof n[s][i.func]||n["default"]&&"undefined"!=typeof n["default"][i.func])&&this._check(i.func,i.args[0])===!1)return e.stopImmediatePropagation(),!1}},this)),e&&this.get_container().bind("load_node.jstree set_type.jstree",t.proxy(function(e,i){var n=i&&i.rslt&&i.rslt.obj&&-1!==i.rslt.obj?this._get_node(i.rslt.obj).parent():this.get_container_ul(),s=!1,a=this._get_settings().types;t.each(a.types,function(e,t){t.icon&&(t.icon.image||t.icon.position)&&(s="default"===e?n.find("li > a > .jstree-icon"):n.find("li["+a.type_attr+"='"+e+"'] > a > .jstree-icon"),t.icon.image&&s.css("backgroundImage","url("+t.icon.image+")"),s.css("backgroundPosition",t.icon.position||"0 0"))})},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:!1,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(e,t){t.type&&this._get_settings().types.use_data&&this.set_type(t.type,e)},_get_type:function(e){return e=this._get_node(e),e&&e.length?e.attr(this._get_settings().types.type_attr)||"default":!1},set_type:function(e,t){t=this._get_node(t);var i=t.length&&e?t.attr(this._get_settings().types.type_attr,e):!1;return i&&this.__callback({obj:t,type:e}),i},_check:function(e,i,n){i=this._get_node(i);var s=!1,a=this._get_type(i),r=0,o=this,l=this._get_settings().types,h=!1;if(-1===i){if(!l[e])return;s=l[e]}else{if(a===!1)return;h=l.use_data?i.data("jstree"):!1,h&&h.types&&"undefined"!=typeof h.types[e]?s=h.types[e]:l.types[a]&&"undefined"!=typeof l.types[a][e]?s=l.types[a][e]:l.types["default"]&&"undefined"!=typeof l.types["default"][e]&&(s=l.types["default"][e])}return t.isFunction(s)&&(s=s.call(this,i)),"max_depth"===e&&-1!==i&&n!==!1&&-2!==l.max_depth&&0!==s&&i.children("a:eq(0)").parentsUntil(".jstree","li").each(function(t){return-1!==l.max_depth&&l.max_depth-(t+1)<=0?(s=0,!1):(r=0===t?s:o._check(e,this,!1),-1!==r&&0>=r-(t+1)?(s=0,!1):(r>=0&&(s>r-(t+1)||0>s)&&(s=r-(t+1)),void(l.max_depth>=0&&(l.max_depth-(t+1)<s||0>s)&&(s=l.max_depth-(t+1)))))}),s},check_move:function(){if(!this.__call_old())return!1;var e,i=this._get_move(),n=i.rt._get_settings().types,s=i.rt._check("max_children",i.cr),a=i.rt._check("max_depth",i.cr),r=i.rt._check("valid_children",i.cr),o=0,l=1;if("none"===r)return!1;if(t.isArray(r)&&i.ot&&i.ot._get_type&&(i.o.each(function(){return-1===t.inArray(i.ot._get_type(this),r)?(l=!1,!1):void 0}),l===!1))return!1;if(-2!==n.max_children&&-1!==s&&(o=-1===i.cr?this.get_container().find("> ul > li").not(i.o).length:i.cr.find("> ul > li").not(i.o).length,o+i.o.length>s))return!1;if(-2!==n.max_depth&&-1!==a){if(l=0,0===a)return!1;if("undefined"==typeof i.o.d){for(e=i.o;e.length>0;)e=e.find("> ul > li"),l++;i.o.d=l}if(a-i.o.d<0)return!1}return!0},create_node:function(e,i,n,s,a,r){if(!r&&(a||this._is_loaded(e))){var o,l="string"==typeof i&&i.match(/^before|after$/i)&&-1!==e?this._get_parent(e):this._get_node(e),h=this._get_settings().types,c=this._check("max_children",l),d=this._check("max_depth",l),u=this._check("valid_children",l);if("string"==typeof n&&(n={data:n}),n||(n={}),"none"===u)return!1;if(t.isArray(u))if(n.attr&&n.attr[h.type_attr]){if(-1===t.inArray(n.attr[h.type_attr],u))return!1}else n.attr||(n.attr={}),n.attr[h.type_attr]=u[0];if(-2!==h.max_children&&-1!==c&&(o=-1===l?this.get_container().find("> ul > li").length:l.find("> ul > li").length,o+1>c))return!1;if(-2!==h.max_depth&&-1!==d&&0>d-1)return!1}return this.__call_old(!0,e,i,n,s,a,r)}}})}(jQuery),function(e){e.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return 3==this.nodeType}).remove()},defaults:{data:!1,ajax:!1,correct_state:!0},_fn:{load_node:function(e,t,i){var n=this;this.load_node_html(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){return t=this._get_node(t),-1==t||!t||!this._get_settings().html_data.ajax&&!e.isFunction(this._get_settings().html_data.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_html:function(t,i,n){var s,a=this.get_settings().html_data,r=function(){},o=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case e.isFunction(a.data):a.data.call(this,t,e.proxy(function(n){n&&""!==n&&n.toString&&""!==n.toString().replace(/^[\s\n]+$/,"")?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!a.data&&!a.ajax:t&&-1!=t||(this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&(!t||-1===t):t&&-1!=t||(s=e(a.data),s.is("ul")||(s=e("<ul />").append(s)),this.get_container().children("ul").empty().append(s.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&t&&-1!==t:t=this._get_node(t),r=function(e,i,s){var r=this.get_settings().html_data.ajax.error;r&&r.call(this,e,i,s),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&a.correct_state&&this.correct_state(t)):"success"===i&&a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},o=function(n,s,o){var l=this.get_settings().html_data.ajax.success;return l&&(n=l.call(this,n,s,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")?r.call(this,o,s,""):void(n?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},a.ajax.context=this,a.ajax.error=r,a.ajax.success=o,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_data")}(jQuery),function(e){e.jstree.plugin("themeroller",{__init:function(){var t=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(i){e(i.currentTarget).hasClass("jstree-loading")||e(this).addClass(t.item_h)}).delegate("a","mouseleave.jstree",function(){e(this).removeClass(t.item_h)}).bind("init.jstree",e.proxy(function(e,t){t.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(t.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",e.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("delete_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.parent)},this)).bind("correct_state.jstree",e.proxy(function(e,i){i.rslt.obj.children("ins.jstree-icon").removeClass(t.opened+" "+t.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_open+" "+t.item_clsd).addClass(t.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").addClass(t.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_a).removeClass(t.item_a).end().find("a.jstree-clicked").addClass(t.item_a)},this)).bind("dehover_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").removeClass(t.item_h)},this)).bind("hover_node.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_h).not(i.rslt.obj).removeClass(t.item_h),i.rslt.obj.children("a").addClass(t.item_h)},this)).bind("move_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.o),this._themeroller(t.rslt.op)},this))},__destroy:function(){var t=this._get_settings().themeroller,i=["ui-icon"];e.each(t,function(e,t){t=t.split(" "),t.length&&(i=i.concat(t))}),this.get_container().removeClass("ui-widget-content").find("."+i.join(", .")).removeClass(i.join(" "))},_fn:{_themeroller:function(e){var t=this._get_settings().themeroller;e=e&&-1!=e?this._get_node(e):this.get_container_ul(),e=e&&-1!=e?e.parent():this.get_container_ul(),e.find("li.jstree-closed").children("ins.jstree-icon").removeClass(t.opened).addClass("ui-icon "+t.closed).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_open).addClass(t.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(t.closed).addClass("ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_clsd).addClass(t.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(t.closed+" ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_clsd+" "+t.item_open).addClass(t.item_leaf||"jstree-no-icon")}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),e(function(){var t=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",e.proxy(function(t,i){var n,s,a=[],r=!0;return"move_node"==i.func&&i.args[4]===!0&&i.args[0].o&&i.args[0].o.length&&(i.args[0].o.children("a").each(function(){a.push(e(this).text().replace(/^\s+/g,""))}),r=this._check_unique(a,i.args[0].np.find("> ul > li").not(i.args[0].o),"move_node")),"create_node"==i.func&&(i.args[4]||this._is_loaded(i.args[0]))&&(n=this._get_node(i.args[0]),!i.args[1]||"before"!==i.args[1]&&"after"!==i.args[1]||(n=this._get_parent(i.args[0]),n&&-1!==n||(n=this.get_container())),"string"==typeof i.args[2]?a.push(i.args[2]):i.args[2]&&i.args[2].data?a.push(i.args[2].data):a.push(this._get_string("new_node")),r=this._check_unique(a,n.find("> ul > li"),"create_node")),"rename_node"==i.func&&(a.push(i.args[1]),s=this._get_node(i.args[0]),n=this._get_parent(s),n&&-1!==n||(n=this.get_container()),r=this._check_unique(a,n.find("> ul > li").not(s),"rename_node")),r?void 0:(t.stopPropagation(),!1)},this))},defaults:{error_callback:e.noop},_fn:{_check_unique:function(t,i,n){var s=[],a=!0;return i.children("a").each(function(){s.push(e(this).text().replace(/^\s+/g,""))}),s.length&&t.length?(e.each(t,function(t,i){return-1!==e.inArray(i,s)?(a=!1,!1):void 0}),a||this._get_settings().unique.error_callback.call(null,t,i,n),a):!0},check_move:function(){if(!this.__call_old())return!1;var t=this._get_move(),i=[];return t.o&&t.o.length?(t.o.children("a").each(function(){i.push(e(this).text().replace(/^\s+/g,""))}),this._check_unique(i,t.np.find("> ul > li").not(t.o),"check_move")):!0}}})}(jQuery),function(n){n.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",n.proxy(function(e,t){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",n.proxy(function(e,t){this._prepare_wholerow_span(t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",n.proxy(function(e,t){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(e,t){return function(){e._prepare_wholerow_ul(t)}}(this,t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",n.proxy(function(e,t){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",n.proxy(function(e,t){t.rslt.obj.each(function(){var e=t.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((n(this).offset().top-t.inst.get_container().offset().top+t.inst.get_container()[0].scrollTop)/t.inst.data.core.li_height,10)+")");e.children("a").attr("class",t.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",n.proxy(function(e,t){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var i=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((t.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");i.children("a").attr("class",t.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var t=n(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&t.closest("li").is(".jstree-open, .jstree-closed")||(t.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",n.proxy(function(e){return e.stopImmediatePropagation(),n(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",n.proxy(function(e){n(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(t||e)&&n.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(e){e=e&&-1!=e?this._get_node(e):this.get_container().find("> ul > li"),e!==!1&&e.each(function(){n(this).find("li").andSelf().each(function(){var e=n(this);return e.children(".jstree-wholerow-span").length?!0:void e.prepend("<span class='jstree-wholerow-span' style='width:"+18*e.parentsUntil(".jstree","li").length+"px;'>&#160;</span>")})})},_prepare_wholerow_ul:function(){var e=this.get_container().children("ul").eq(0),i=e.html();e.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==i&&(this.data.wholerow.last_html=i,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(e.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(e.parent()[0].scrollWidth).css("top",-1*(e.height()+(t?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),n(function(){var s=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";i&&(s+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(t||e)&&(s+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),n.vakata.css.add_sheet({str:s,title:"jstree"})})}(jQuery),function(e){var t=["getChildren","getChildrenCount","getAttr","getName","getProps"],i=function(t,i){var n=!0;return t=t||{},i=[].concat(i),e.each(i,function(i,s){return e.isFunction(t[s])?void 0:(n=!1,!1)}),n};e.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(n,s){var a=-1==n?this._get_settings().model.object:n.data("jstree_model");return i(a,t)?void(this._get_settings().model.async?a.getChildren(e.proxy(function(e){this.model_done(e,s)},this)):this.model_done(a.getChildren(),s)):s.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(t,i){var n=[],s=this._get_settings(),a=this;e.isArray(t)||(t=[t]),e.each(t,function(t,i){var r=i.getProps()||{};r.attr=i.getAttr()||{},i.getChildrenCount()&&(r.state="closed"),r.data=i.getName(),e.isArray(r.data)||(r.data=[r.data]),a.data.types&&e.isFunction(i.getType)&&(r.attr[s.types.type_attr]=i.getType()),r.attr.id&&s.model.id_prefix&&(r.attr.id=s.model.id_prefix+r.attr.id),r.metadata||(r.metadata={}),r.metadata.jstree_model=i,n.push(r)}),i.call(null,n)}}})}(jQuery)}}()},{}],i18n:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a=function(){function e(){n(this,e),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return s(e,[{key:"setLocale",value:function(e){this.currentLocale=e}},{key:"getLocale",value:function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale}},{key:"_t",value:function(e,t,i,n){var s=this.getLocale().replace(/_[\w]+/i,""),a=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?this.lang[this.getLocale()][e]:this.lang&&this.lang[s]&&this.lang[s][e]?this.lang[s][e]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][e]?this.lang[this.defaultLocale][e]:this.lang&&this.lang[a]&&this.lang[a][e]?this.lang[a][e]:t?t:""}},{key:"addDictionary",value:function(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={});for(var i in t)this.lang[e][i]=t[i]}},{key:"getDictionary",value:function(e){return this.lang[e]}},{key:"stripStr",value:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},{key:"stripStrML",value:function(e){for(var t=e.split("\n"),i=0;i<t.length;i+=1)t[i]=stripStr(t[i]);return stripStr(t.join(" "))}},{key:"sprintf",value:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;t>n;n++)i[n-1]=arguments[n];if(0===i.length)return e;var s=new RegExp("(.?)(%s)","g"),a=0;return e.replace(s,function(e,t,n,s,r){return"%"===t?e:t+i[a+=1]})}},{key:"inject",value:function(e,t){var i=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(i,function(e,i,n,s){return t[i]?t[i]:e})}},{key:"detectLocale",value:function(){var t,i;if(t=jQuery("body").attr("lang"),!t)for(var n=document.getElementsByTagName("meta"),s=0;s<n.length;s++)n[s].attributes["http-equiv"]&&"content-language"==n[s].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=n[s].attributes.content.nodeValue);t||(t=this.defaultLocale);var a=t.match(/([^-|_]*)[-|_](.*)/);if(2==t.length){for(var r in e.lang)if(r.substr(0,2).toLowerCase()==t.toLowerCase()){i=r;break}}else a&&(i=a[1].toLowerCase()+"_"+a[2].toUpperCase());return i}},{key:"addEvent",value:function(e,t,i,n){return e.addEventListener?(e.addEventListener(t,i,n),!0):e.attachEvent?e.attachEvent("on"+t,i):void console.log("Handler could not be attached")}}]),e}(),r=new a;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=r,i["default"]=r},{}],jQuery:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window.jQuery?window.jQuery:null;i["default"]=n},{}]},{},[1]);
e.vakata.css.add_sheet({str:t,title:"vakata"}),e.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(t){!e(this).parent().hasClass("jstree-contextmenu-disabled")&&e.vakata.context.exec(e(this).attr("rel"))?e.vakata.context.hide():e(this).blur()}).delegate("a","mouseover",function(){e.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body"),e(document).bind("mousedown",function(t){e.vakata.context.vis&&!e.contains(e.vakata.context.cnt[0],t.target)&&e.vakata.context.hide()}),"undefined"!=typeof e.hotkeys&&e(document).bind("keydown","up",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","down",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","right",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","left",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","esc",function(t){e.vakata.context.hide(),t.preventDefault()}).bind("keydown","space",function(t){e.vakata.context.cnt.find(".vakata-hover").last().children("a").click(),t.preventDefault()})}),e.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",e.proxy(function(t){t.preventDefault(),e(t.currentTarget).hasClass("jstree-loading")||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY)},this)).delegate("a","click.jstree",e.proxy(function(t){this.data.contextmenu&&e.vakata.context.hide()},this)).bind("destroy.jstree",e.proxy(function(){this.data.contextmenu&&e.vakata.context.hide()},this)),e(document).bind("context_hide.vakata",e.proxy(function(){this.data.contextmenu=!1},this))},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("context_hide.vakata")},defaults:{select_node:!1,show_at_node:!0,items:{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(e){this.create(e)}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(e){this.rename(e)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(e){this.is_selected(e)?this.remove():this.remove(e)}},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(e){this.cut(e)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){this.copy(e)}},paste:{separator_before:!1,icon:!1,separator_after:!1,label:"Paste",action:function(e){this.paste(e)}}}}}},_fn:{show_contextmenu:function(t,i,n){t=this._get_node(t);var s=this.get_settings().contextmenu,a=t.children("a:visible:eq(0)"),r=!1,o=!1;s.select_node&&this.data.ui&&!this.is_selected(t)&&(this.deselect_all(),this.select_node(t,!0)),(s.show_at_node||"undefined"==typeof i||"undefined"==typeof n)&&(r=a.offset(),i=r.left,n=r.top+this.data.core.li_height),o=t.data("jstree")&&t.data("jstree").contextmenu?t.data("jstree").contextmenu:s.items,e.isFunction(o)&&(o=o.call(this,t)),this.data.contextmenu=!0,e.vakata.context.show(o,a,i,n,this,t,this._get_settings().core.rtl),this.data.themes&&e.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})}(jQuery),function(t){t.jstree.plugin("types",{__init:function(){var i=this._get_settings().types;this.data.types.attach_to=[],this.get_container().bind("init.jstree",t.proxy(function(){var e=i.types,n=i.type_attr,s="",a=this;t.each(e,function(e,i){return t.each(i,function(e,t){/^(max_depth|max_children|icon|valid_children)$/.test(e)||a.data.types.attach_to.push(e)}),i.icon?void((i.icon.image||i.icon.position)&&(s+="default"==e?".jstree-"+a.get_index()+" a > .jstree-icon { ":".jstree-"+a.get_index()+" li["+n+'="'+e+'"] > a > .jstree-icon { ',i.icon.image&&(s+=" background-image:url("+i.icon.image+"); "),s+=i.icon.position?" background-position:"+i.icon.position+"; ":" background-position:0 0; ",s+="} ")):!0}),""!==s&&t.vakata.css.add_sheet({str:s,title:"jstree-types"})},this)).bind("before.jstree",t.proxy(function(e,i){var n,s,a=this._get_settings().types.use_data?this._get_node(i.args[0]):!1,r=a&&-1!==a&&a.length?a.data("jstree"):!1;if(r&&r.types&&r.types[i.func]===!1)return e.stopImmediatePropagation(),!1;if(-1!==t.inArray(i.func,this.data.types.attach_to)){if(!i.args[0]||!i.args[0].tagName&&!i.args[0].jquery)return;if(n=this._get_settings().types.types,s=this._get_type(i.args[0]),(n[s]&&"undefined"!=typeof n[s][i.func]||n["default"]&&"undefined"!=typeof n["default"][i.func])&&this._check(i.func,i.args[0])===!1)return e.stopImmediatePropagation(),!1}},this)),e&&this.get_container().bind("load_node.jstree set_type.jstree",t.proxy(function(e,i){var n=i&&i.rslt&&i.rslt.obj&&-1!==i.rslt.obj?this._get_node(i.rslt.obj).parent():this.get_container_ul(),s=!1,a=this._get_settings().types;t.each(a.types,function(e,t){t.icon&&(t.icon.image||t.icon.position)&&(s="default"===e?n.find("li > a > .jstree-icon"):n.find("li["+a.type_attr+"='"+e+"'] > a > .jstree-icon"),t.icon.image&&s.css("backgroundImage","url("+t.icon.image+")"),s.css("backgroundPosition",t.icon.position||"0 0"))})},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:!1,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(e,t){t.type&&this._get_settings().types.use_data&&this.set_type(t.type,e)},_get_type:function(e){return e=this._get_node(e),e&&e.length?e.attr(this._get_settings().types.type_attr)||"default":!1},set_type:function(e,t){t=this._get_node(t);var i=t.length&&e?t.attr(this._get_settings().types.type_attr,e):!1;return i&&this.__callback({obj:t,type:e}),i},_check:function(e,i,n){i=this._get_node(i);var s=!1,a=this._get_type(i),r=0,o=this,l=this._get_settings().types,h=!1;if(-1===i){if(!l[e])return;s=l[e]}else{if(a===!1)return;h=l.use_data?i.data("jstree"):!1,h&&h.types&&"undefined"!=typeof h.types[e]?s=h.types[e]:l.types[a]&&"undefined"!=typeof l.types[a][e]?s=l.types[a][e]:l.types["default"]&&"undefined"!=typeof l.types["default"][e]&&(s=l.types["default"][e])}return t.isFunction(s)&&(s=s.call(this,i)),"max_depth"===e&&-1!==i&&n!==!1&&-2!==l.max_depth&&0!==s&&i.children("a:eq(0)").parentsUntil(".jstree","li").each(function(t){return-1!==l.max_depth&&l.max_depth-(t+1)<=0?(s=0,!1):(r=0===t?s:o._check(e,this,!1),-1!==r&&0>=r-(t+1)?(s=0,!1):(r>=0&&(s>r-(t+1)||0>s)&&(s=r-(t+1)),void(l.max_depth>=0&&(l.max_depth-(t+1)<s||0>s)&&(s=l.max_depth-(t+1)))))}),s},check_move:function(){if(!this.__call_old())return!1;var e,i=this._get_move(),n=i.rt._get_settings().types,s=i.rt._check("max_children",i.cr),a=i.rt._check("max_depth",i.cr),r=i.rt._check("valid_children",i.cr),o=0,l=1;if("none"===r)return!1;if(t.isArray(r)&&i.ot&&i.ot._get_type&&(i.o.each(function(){return-1===t.inArray(i.ot._get_type(this),r)?(l=!1,!1):void 0}),l===!1))return!1;if(-2!==n.max_children&&-1!==s&&(o=-1===i.cr?this.get_container().find("> ul > li").not(i.o).length:i.cr.find("> ul > li").not(i.o).length,o+i.o.length>s))return!1;if(-2!==n.max_depth&&-1!==a){if(l=0,0===a)return!1;if("undefined"==typeof i.o.d){for(e=i.o;e.length>0;)e=e.find("> ul > li"),l++;i.o.d=l}if(a-i.o.d<0)return!1}return!0},create_node:function(e,i,n,s,a,r){if(!r&&(a||this._is_loaded(e))){var o,l="string"==typeof i&&i.match(/^before|after$/i)&&-1!==e?this._get_parent(e):this._get_node(e),h=this._get_settings().types,c=this._check("max_children",l),d=this._check("max_depth",l),u=this._check("valid_children",l);if("string"==typeof n&&(n={data:n}),n||(n={}),"none"===u)return!1;if(t.isArray(u))if(n.attr&&n.attr[h.type_attr]){if(-1===t.inArray(n.attr[h.type_attr],u))return!1}else n.attr||(n.attr={}),n.attr[h.type_attr]=u[0];if(-2!==h.max_children&&-1!==c&&(o=-1===l?this.get_container().find("> ul > li").length:l.find("> ul > li").length,o+1>c))return!1;if(-2!==h.max_depth&&-1!==d&&0>d-1)return!1}return this.__call_old(!0,e,i,n,s,a,r)}}})}(jQuery),function(e){e.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return 3==this.nodeType}).remove()},defaults:{data:!1,ajax:!1,correct_state:!0},_fn:{load_node:function(e,t,i){var n=this;this.load_node_html(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){return t=this._get_node(t),-1==t||!t||!this._get_settings().html_data.ajax&&!e.isFunction(this._get_settings().html_data.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_html:function(t,i,n){var s,a=this.get_settings().html_data,r=function(){},o=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case e.isFunction(a.data):a.data.call(this,t,e.proxy(function(n){n&&""!==n&&n.toString&&""!==n.toString().replace(/^[\s\n]+$/,"")?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!a.data&&!a.ajax:t&&-1!=t||(this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&(!t||-1===t):t&&-1!=t||(s=e(a.data),s.is("ul")||(s=e("<ul />").append(s)),this.get_container().children("ul").empty().append(s.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&t&&-1!==t:t=this._get_node(t),r=function(e,i,s){var r=this.get_settings().html_data.ajax.error;r&&r.call(this,e,i,s),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&a.correct_state&&this.correct_state(t)):"success"===i&&a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},o=function(n,s,o){var l=this.get_settings().html_data.ajax.success;return l&&(n=l.call(this,n,s,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")?r.call(this,o,s,""):void(n?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},a.ajax.context=this,a.ajax.error=r,a.ajax.success=o,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_data")}(jQuery),function(e){e.jstree.plugin("themeroller",{__init:function(){var t=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(i){e(i.currentTarget).hasClass("jstree-loading")||e(this).addClass(t.item_h)}).delegate("a","mouseleave.jstree",function(){e(this).removeClass(t.item_h)}).bind("init.jstree",e.proxy(function(e,t){t.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(t.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",e.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("delete_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.parent)},this)).bind("correct_state.jstree",e.proxy(function(e,i){i.rslt.obj.children("ins.jstree-icon").removeClass(t.opened+" "+t.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_open+" "+t.item_clsd).addClass(t.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").addClass(t.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_a).removeClass(t.item_a).end().find("a.jstree-clicked").addClass(t.item_a)},this)).bind("dehover_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").removeClass(t.item_h)},this)).bind("hover_node.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_h).not(i.rslt.obj).removeClass(t.item_h),i.rslt.obj.children("a").addClass(t.item_h)},this)).bind("move_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.o),this._themeroller(t.rslt.op)},this))},__destroy:function(){var t=this._get_settings().themeroller,i=["ui-icon"];e.each(t,function(e,t){t=t.split(" "),t.length&&(i=i.concat(t))}),this.get_container().removeClass("ui-widget-content").find("."+i.join(", .")).removeClass(i.join(" "))},_fn:{_themeroller:function(e){var t=this._get_settings().themeroller;e=e&&-1!=e?this._get_node(e):this.get_container_ul(),e=e&&-1!=e?e.parent():this.get_container_ul(),e.find("li.jstree-closed").children("ins.jstree-icon").removeClass(t.opened).addClass("ui-icon "+t.closed).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_open).addClass(t.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(t.closed).addClass("ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_clsd).addClass(t.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(t.closed+" ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_clsd+" "+t.item_open).addClass(t.item_leaf||"jstree-no-icon")}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),e(function(){var t=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",e.proxy(function(t,i){var n,s,a=[],r=!0;return"move_node"==i.func&&i.args[4]===!0&&i.args[0].o&&i.args[0].o.length&&(i.args[0].o.children("a").each(function(){a.push(e(this).text().replace(/^\s+/g,""))}),r=this._check_unique(a,i.args[0].np.find("> ul > li").not(i.args[0].o),"move_node")),"create_node"==i.func&&(i.args[4]||this._is_loaded(i.args[0]))&&(n=this._get_node(i.args[0]),!i.args[1]||"before"!==i.args[1]&&"after"!==i.args[1]||(n=this._get_parent(i.args[0]),n&&-1!==n||(n=this.get_container())),"string"==typeof i.args[2]?a.push(i.args[2]):i.args[2]&&i.args[2].data?a.push(i.args[2].data):a.push(this._get_string("new_node")),r=this._check_unique(a,n.find("> ul > li"),"create_node")),"rename_node"==i.func&&(a.push(i.args[1]),s=this._get_node(i.args[0]),n=this._get_parent(s),n&&-1!==n||(n=this.get_container()),r=this._check_unique(a,n.find("> ul > li").not(s),"rename_node")),r?void 0:(t.stopPropagation(),!1)},this))},defaults:{error_callback:e.noop},_fn:{_check_unique:function(t,i,n){var s=[],a=!0;return i.children("a").each(function(){s.push(e(this).text().replace(/^\s+/g,""))}),s.length&&t.length?(e.each(t,function(t,i){return-1!==e.inArray(i,s)?(a=!1,!1):void 0}),a||this._get_settings().unique.error_callback.call(null,t,i,n),a):!0},check_move:function(){if(!this.__call_old())return!1;var t=this._get_move(),i=[];return t.o&&t.o.length?(t.o.children("a").each(function(){i.push(e(this).text().replace(/^\s+/g,""))}),this._check_unique(i,t.np.find("> ul > li").not(t.o),"check_move")):!0}}})}(jQuery),function(n){n.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",n.proxy(function(e,t){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",n.proxy(function(e,t){this._prepare_wholerow_span(t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",n.proxy(function(e,t){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(e,t){return function(){e._prepare_wholerow_ul(t)}}(this,t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",n.proxy(function(e,t){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",n.proxy(function(e,t){t.rslt.obj.each(function(){var e=t.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((n(this).offset().top-t.inst.get_container().offset().top+t.inst.get_container()[0].scrollTop)/t.inst.data.core.li_height,10)+")");e.children("a").attr("class",t.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",n.proxy(function(e,t){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var i=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((t.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");i.children("a").attr("class",t.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var t=n(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&t.closest("li").is(".jstree-open, .jstree-closed")||(t.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",n.proxy(function(e){return e.stopImmediatePropagation(),n(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",n.proxy(function(e){n(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(t||e)&&n.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(e){e=e&&-1!=e?this._get_node(e):this.get_container().find("> ul > li"),e!==!1&&e.each(function(){n(this).find("li").andSelf().each(function(){var e=n(this);return e.children(".jstree-wholerow-span").length?!0:void e.prepend("<span class='jstree-wholerow-span' style='width:"+18*e.parentsUntil(".jstree","li").length+"px;'>&#160;</span>")})})},_prepare_wholerow_ul:function(){var e=this.get_container().children("ul").eq(0),i=e.html();e.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==i&&(this.data.wholerow.last_html=i,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(e.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(e.parent()[0].scrollWidth).css("top",-1*(e.height()+(t?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),n(function(){var s=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";i&&(s+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(t||e)&&(s+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),n.vakata.css.add_sheet({str:s,title:"jstree"})})}(jQuery),function(e){var t=["getChildren","getChildrenCount","getAttr","getName","getProps"],i=function(t,i){var n=!0;return t=t||{},i=[].concat(i),e.each(i,function(i,s){return e.isFunction(t[s])?void 0:(n=!1,!1)}),n};e.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(n,s){var a=-1==n?this._get_settings().model.object:n.data("jstree_model");return i(a,t)?void(this._get_settings().model.async?a.getChildren(e.proxy(function(e){this.model_done(e,s)},this)):this.model_done(a.getChildren(),s)):s.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(t,i){var n=[],s=this._get_settings(),a=this;e.isArray(t)||(t=[t]),e.each(t,function(t,i){var r=i.getProps()||{};r.attr=i.getAttr()||{},i.getChildrenCount()&&(r.state="closed"),r.data=i.getName(),e.isArray(r.data)||(r.data=[r.data]),a.data.types&&e.isFunction(i.getType)&&(r.attr[s.types.type_attr]=i.getType()),r.attr.id&&s.model.id_prefix&&(r.attr.id=s.model.id_prefix+r.attr.id),r.metadata||(r.metadata={}),r.metadata.jstree_model=i,n.push(r)}),i.call(null,n)}}})}(jQuery)}}()},{}],i18n:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a=function(){function e(){n(this,e),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return s(e,[{key:"setLocale",value:function(e){this.currentLocale=e}},{key:"getLocale",value:function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale}},{key:"_t",value:function(e,t,i,n){var s=this.getLocale().replace(/_[\w]+/i,""),a=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?this.lang[this.getLocale()][e]:this.lang&&this.lang[s]&&this.lang[s][e]?this.lang[s][e]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][e]?this.lang[this.defaultLocale][e]:this.lang&&this.lang[a]&&this.lang[a][e]?this.lang[a][e]:t?t:""}},{key:"addDictionary",value:function(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={});for(var i in t)this.lang[e][i]=t[i]}},{key:"getDictionary",value:function(e){return this.lang[e]}},{key:"stripStr",value:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},{key:"stripStrML",value:function(e){for(var t=e.split("\n"),i=0;i<t.length;i+=1)t[i]=stripStr(t[i]);return stripStr(t.join(" "))}},{key:"sprintf",value:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;t>n;n++)i[n-1]=arguments[n];if(0===i.length)return e;var s=new RegExp("(.?)(%s)","g"),a=0;return e.replace(s,function(e,t,n,s,r){return"%"===t?e:t+i[a++]})}},{key:"inject",value:function(e,t){var i=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(i,function(e,i,n,s){return t[i]?t[i]:e})}},{key:"detectLocale",value:function(){var t,i;if(t=jQuery("body").attr("lang"),!t)for(var n=document.getElementsByTagName("meta"),s=0;s<n.length;s++)n[s].attributes["http-equiv"]&&"content-language"==n[s].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=n[s].attributes.content.nodeValue);t||(t=this.defaultLocale);var a=t.match(/([^-|_]*)[-|_](.*)/);if(2==t.length){for(var r in e.lang)if(r.substr(0,2).toLowerCase()==t.toLowerCase()){i=r;break}}else a&&(i=a[1].toLowerCase()+"_"+a[2].toUpperCase());return i}},{key:"addEvent",value:function(e,t,i,n){return e.addEventListener?(e.addEventListener(t,i,n),!0):e.attachEvent?e.attachEvent("on"+t,i):void console.log("Handler could not be attached")}}]),e}(),r=new a;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=r,i["default"]=r},{}],jQuery:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window.jQuery?window.jQuery:null;i["default"]=n},{}]},{},[1]);

View File

@ -412,7 +412,8 @@
break;
case 'file':
href = '[file_link,id=' + this.find('.ss-uploadfield .ss-uploadfield-item').attr('data-fileid') + ']';
var fileid = this.find('.ss-uploadfield .ss-uploadfield-item').attr('data-fileid');
href = fileid ? '[file_link,id=' + fileid + ']' : '';
break;
case 'email':

View File

@ -132,7 +132,7 @@
return match;
}
return subMatch1 + params[i += 1];
return subMatch1 + params[i++];
});
}
}, {

View File

@ -581,7 +581,8 @@ $.entwine('ss', function($) {
break;
case 'file':
href = '[file_link,id=' + this.find('.ss-uploadfield .ss-uploadfield-item').attr('data-fileid') + ']';
var fileid = this.find('.ss-uploadfield .ss-uploadfield-item').attr('data-fileid');
href = fileid ? '[file_link,id=' + fileid + ']' : '';
break;
case 'email':