function DisciplineSelect(n){$.extend(!0,n,sumoExtensionMethods);n.createDisc($("#UserDisciplines").val())}function attrExists(n,t){var i=n.attr(t);return typeof i!=typeof undefined&&i!==!1}function ClearSumo(n){$("#"+n+".sumo option").each(function(t,i){$(i).is(":selected")&&$("#"+n)[0].sumo.unSelectItem(t)})}function LoadSumo(n){var t=n?n+" select.sumo":"select.sumo";$(t).each(function(){var n={placeholder:"Click here to select",floatWidth:0};if(attrExists($(this),"multiple")&&(n.csvDispCount=2),attrExists($(this),"placeholder")&&(n.placeholder=$(this).attr("placeholder")),$(this).data("selectall")&&(n.selectAll=!0),$(this).data("searchable")&&(n.search=!0),$(this).SumoSelect(n),$(this).data("showtags")){UpdateSumoLabel(this.id);$(this).on("change",function(){UpdateSumoLabel(this.id)})}})}function MakeTag(n,t,i){return"<span class='sumo-tag'>"+t+"<a class='icon-remove-circle' onclick='RemoveTag(\""+n+'", '+i+")'><\/a><\/span>"}function ReloadSumo(n){var t=n?n+" select.sumo":"select.sumo";$(t).each(function(){$(this)[0].sumo.reload()})}function RemoveTag(n,t){$("#"+n)[0].sumo.unSelectItem(t);UpdateSumoLabel(n)}function UnloadSumo(n){var t=n?n+" select.sumo":"select.sumo";$(t).each(function(){$(this)[0].sumo.unload()})}function UpdateSumoLabel(n){var t=[];$("#"+n).children(":selected").each(function(){t.push(MakeTag(n,this.text,this.index))});$("#"+n+"SumoSelections").remove();$("#"+n).parent().after('<label id="'+n+'SumoSelections"><strong>Selections:<\/strong> '+(t.length===0?"None":t.join(", "))+"<\/label>")}function clearAdvancedOptions(){clearSelections("Disciplines");clearSelections("Categories");clearSelections("ArticleType");$("#OrderBy").val("1");$("#CurrentOrderBy").val("Most Recent");ReloadSumo("#panel-advanced-options")}function clearSelections(n){$("#"+n).val([])}function loadSaved(n){$("#LoadSearchModal").modal("hide");spinner.spin(document.getElementById("searchSpinner"));$("#searching-please-wait").modal("show");setTimeout(function(){document.location=n},250)}function setSearchTerm(n,t){$("#"+t).val($(n).html())}function sort(n){$("#OrderBy").val(n);$("#SearchForm").submit()}function submitSearch(n){$("#"+n).valid()&&(spinner.spin($("#"+n).find("#searchSpinner")[0]),$("#"+n).find("#searching-please-wait").modal("show"));setTimeout(function(){$("#"+n).submit()},250)}function toggleAdvancedOptions(){$("#panel-advanced-options").collapse("toggle")}function RemoveSearch(n,t){confirm("Are you sure you want to remove this saved search?")&&$.ajax({type:"POST",url:$("#RemoveSavedSearchUrl").data("url"),traditional:!0,data:{id:n,x:t},success:function(n){$("#SavedSearches").each(function(t,i){$(i).replaceWith(n)})},error:function(n){console.log(n);$("#RemoveSearchError").each.show()}})}function SaveSearch(n,t){$.ajax({type:"POST",url:$("#SaveSearchSubmit").data("url"),traditional:!0,contentType:"application/json; charset=utf-8",data:JSON.stringify(queryStringToJson(location.search+"&Name="+encodeURIComponent(n)+"&x="+t)),success:function(n){$("#SavedSearches").each(function(t,i){$(i).replaceWith(n)});$("#SaveSearchText").val("");$("#UpdateViaAlerts").prop("checked",!1);$("#SaveSearchModal").modal("hide");$("#cmdSaveSearch").html('<span class="icon-check"><\/span> Search saved');$("#cmdSaveSearch").prop("disabled",!0);$("#cmdSaveSearch").addClass("disabled")},error:function(n){console.log(n);$("#SaveSearchError").show()}})}var sumoExtensionMethods,spinner,sortSpinner;(function(n,t){"use strict";typeof module!="undefined"&&module.exports?module.exports=t(require("jquery")):typeof define=="function"&&define.amd?define(["jquery"],function(n){return t(n)}):t(n.jQuery)})(this,function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.typeahead.defaults,i);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.select=this.options.select||this.select;this.autoSelect=typeof this.options.autoSelect=="boolean"?this.options.autoSelect:!0;this.highlighter=this.options.highlighter||this.highlighter;this.render=this.options.render||this.render;this.updater=this.options.updater||this.updater;this.displayText=this.options.displayText||this.displayText;this.source=this.options.source;this.delay=this.options.delay;this.$menu=n(this.options.menu);this.$appendTo=this.options.appendTo?n(this.options.appendTo):null;this.shown=!1;this.listen();this.showHintOnFocus=typeof this.options.showHintOnFocus=="boolean"?this.options.showHintOnFocus:!1;this.afterSelect=this.options.afterSelect;this.addItem=!1},i;t.prototype={constructor:t,select:function(){var t=this.$menu.find(".active").data("value"),n;return this.$element.data("active",t),(this.autoSelect||t)&&(n=this.updater(t),n||(n=""),this.$element.val(this.displayText(n)||n).change(),this.afterSelect(n)),this.hide()},updater:function(n){return n},setSource:function(n){this.source=n},show:function(){var t=n.extend({},this.$element.position(),{height:this.$element[0].offsetHeight}),i,r;return i=typeof this.options.scrollHeight=="function"?this.options.scrollHeight.call():this.options.scrollHeight,r=this.shown?this.$menu:this.$appendTo?this.$menu.appendTo(this.$appendTo):this.$menu.insertAfter(this.$element),r.css({top:t.top+t.height+i,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var i;if(this.query=typeof t!="undefined"&&t!==null?t:this.$element.val()||"",this.query.length<this.options.minLength)return this.shown?this.hide():this;i=n.proxy(function(){n.isFunction(this.source)?this.source(this.query,n.proxy(this.process,this)):this.source&&this.process(this.source)},this);clearTimeout(this.lookupWorker);this.lookupWorker=setTimeout(i,this.delay)},process:function(t){var i=this;return(t=n.grep(t,function(n){return i.matcher(n)}),t=this.sorter(t),!t.length&&!this.options.addItem)?this.shown?this.hide():this:(t.length>0?this.$element.data("active",t[0]):this.$element.data("active",null),this.options.addItem&&t.push(this.options.addItem),this.options.items=="all"?this.render(t).show():this.render(t.slice(0,this.options.items)).show())},matcher:function(n){var t=this.displayText(n);return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(n){for(var r=[],u=[],f=[],t,i;t=n.shift();)i=this.displayText(t),i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?u.push(t):f.push(t):r.push(t);return r.concat(u,f)},highlighter:function(t){var u=n("<div><\/div>"),f=this.query,i=t.toLowerCase().indexOf(f.toLowerCase()),r,e,o,s,h;if(r=f.length,r===0)return u.text(t).html();while(i>-1)e=t.substr(0,i),o=t.substr(i,r),s=t.substr(i+r),h=n("<strong><\/strong>").text(o),u.append(document.createTextNode(e)).append(h),t=s,i=t.toLowerCase().indexOf(f.toLowerCase());return u.append(document.createTextNode(t)).html()},render:function(t){var r=this,i=this,u=!1;return t=n(t).map(function(t,f){var e=i.displayText(f);return t=n(r.options.item).data("value",f),t.find("a").html(r.highlighter(e)),e==i.$element.val()&&(t.addClass("active"),i.$element.data("active",f),u=!0),t[0]}),this.autoSelect&&!u&&(t.first().addClass("active"),this.$element.data("active",t.first().data("value"))),this.$menu.html(t),this},displayText:function(n){return typeof n!="undefined"&&typeof n.name!="undefined"&&n.name||n},next:function(){var i=this.$menu.find(".active").removeClass("active"),t=i.next();t.length||(t=n(this.$menu.find("li")[0]));t.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last());n.addClass("active")},listen:function(){this.$element.on("focus",n.proxy(this.focus,this)).on("blur",n.proxy(this.blur,this)).on("keypress",n.proxy(this.keypress,this)).on("keyup",n.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",n.proxy(this.keydown,this));this.$menu.on("click",n.proxy(this.click,this)).on("mouseenter","li",n.proxy(this.mouseenter,this)).on("mouseleave","li",n.proxy(this.mouseleave,this))},destroy:function(){this.$element.data("typeahead",null);this.$element.data("active",null);this.$element.off("focus").off("blur").off("keypress").off("keyup");this.eventSupported("keydown")&&this.$element.off("keydown");this.$menu.remove()},eventSupported:function(n){var t=n in this.$element;return t||(this.$element.setAttribute(n,"return;"),t=typeof this.$element[n]=="function"),t},move:function(n){if(this.shown)switch(n.keyCode){case 9:case 13:case 27:n.preventDefault();break;case 38:if(n.shiftKey)return;n.preventDefault();this.prev();break;case 40:if(n.shiftKey)return;n.preventDefault();this.next()}},keydown:function(t){this.suppressKeyPressRepeat=~n.inArray(t.keyCode,[40,38,9,13,27]);this.shown||t.keyCode!=40?this.move(t):this.lookup()},keypress:function(n){this.suppressKeyPressRepeat||this.move(n)},keyup:function(n){switch(n.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}n.preventDefault()},focus:function(){this.focused||(this.focused=!0,this.options.showHintOnFocus&&this.lookup(""))},blur:function(){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(n){n.preventDefault();this.select();this.$element.focus()},mouseenter:function(t){this.mousedover=!0;this.$menu.find(".active").removeClass("active");n(t.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};i=n.fn.typeahead;n.fn.typeahead=function(i){var r=arguments;return typeof i=="string"&&i=="getActive"?this.data("active"):this.each(function(){var f=n(this),u=f.data("typeahead"),e=typeof i=="object"&&i;u||f.data("typeahead",u=new t(this,e));typeof i=="string"&&(r.length>1?u[i].apply(u,Array.prototype.slice.call(r,1)):u[i]())})};n.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu" role="listbox"><\/ul>',item:'<li><a class="dropdown-item" href="#" role="option"><\/a><\/li>',minLength:1,scrollHeight:0,autoSelect:!0,afterSelect:n.noop,addItem:!1,delay:0};n.fn.typeahead.Constructor=t;n.fn.typeahead.noConflict=function(){return n.fn.typeahead=i,this};n(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var t=n(this);t.data("typeahead")||t.typeahead(t.data())})}),function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports!="undefined"?module.exports=n(require("jquery")):n(jQuery)}(function(n){"namespace sumo";n.fn.SumoSelect=function(t){var r=n.extend({placeholder:"Select Here",csvDispCount:3,captionFormat:"{0} Selected",captionFormatAllSelected:"{0} all selected!",floatWidth:400,forceCustomRendering:!1,nativeOnDevice:["Android","BlackBerry","iPhone","iPad","iPod","Opera Mini","IEMobile","Silk"],outputAsCSV:!1,csvSepChar:",",okCancelInMulti:!1,triggerChangeCombined:!0,selectAll:!1,search:!1,searchText:"Search...",noMatch:'No matches for "{0}"',prefix:"",locale:["OK","Cancel","Select All"],up:!1,showTitle:!0},t),u=this.each(function(){var t=this;!this.sumo&&n(this).is("select")&&(this.sumo={E:n(t),is_multi:n(t).attr("multiple"),select:"",caption:"",placeholder:"",optDiv:"",CaptionCont:"",ul:"",is_floating:!1,is_opened:!1,mob:!1,Pstate:[],createElems:function(){var t=this;if(t.E.wrap('<div class="SumoSelect" tabindex="0" role="button" aria-expanded="false">'),t.select=t.E.parent(),t.caption=n("<span>"),t.CaptionCont=n('<p class="CaptionCont SelectBox" ><label><i><\/i><\/label><\/p>').attr("style",t.E.attr("style")).prepend(t.caption),t.select.append(t.CaptionCont),t.is_multi||(r.okCancelInMulti=!1),t.E.attr("disabled")&&t.select.addClass("disabled").removeAttr("tabindex"),r.outputAsCSV&&t.is_multi&&t.E.attr("name")&&(t.select.append(n('<input class="HEMANT123" type="hidden" />').attr("name",t.E.attr("name")).val(t.getSelStr())),t.E.removeAttr("name")),t.isMobile()&&!r.forceCustomRendering){t.setNativeMobile();return}t.E.attr("name")&&t.select.addClass("sumo_"+t.E.attr("name").replace(/\[\]/,""));t.E.addClass("SumoUnder").attr("tabindex","-1");t.optDiv=n('<div class="optWrapper '+(r.up?"up":"")+'">');t.floatingList();t.ul=n('<ul class="options">');t.optDiv.append(t.ul);r.selectAll&&t.is_multi&&t.SelAll();r.search&&t.Search();t.ul.append(t.prepItems(t.E.children()));t.is_multi&&t.multiSelelect();t.select.append(t.optDiv);t.basicEvents();t.selAllState()},prepItems:function(t,i){var r=[],u=this;return n(t).each(function(t,f){f=n(f);r.push(f.is("optgroup")?n('<li class="group '+(f[0].disabled?"disabled":"")+'"><label>'+f.attr("label")+"<\/label><ul><\/ul><\/li>").find("ul").append(u.prepItems(f.children(),f[0].disabled)).end():u.createLi(f,i))}),r},createLi:function(t,i){var u=this,r;t.attr("value")||t.attr("value",t.val());r=n('<li class="opt"><label>'+t.text()+"<\/label><\/li>");r.data("opt",t);t.data("li",r);u.is_multi&&r.prepend("<span><i><\/i><\/span>");(t[0].disabled||i)&&(r=r.addClass("disabled"));u.onOptClick(r);return t[0].selected&&r.addClass("selected"),t.attr("class")&&r.addClass(t.attr("class")),t.attr("title")&&r.attr("title",t.attr("title")),r},getSelStr:function(){return sopt=[],this.E.find("option:selected").each(function(){sopt.push(n(this).val())}),sopt.join(r.csvSepChar)},multiSelelect:function(){var t=this,i;t.optDiv.addClass("multiple");t.okbtn=n('<p tabindex="0" class="btnOk">'+r.locale[0]+"<\/p>").click(function(){r.triggerChangeCombined&&(changed=!1,t.E.find("option:selected").length!=t.Pstate.length?changed=!0:t.E.find("option").each(function(n,i){i.selected&&t.Pstate.indexOf(n)<0&&(changed=!0)}),changed&&(t.callChange(),t.setText()));t.hideOpts()});t.cancelBtn=n('<p tabindex="0" class="btnCancel">'+r.locale[1]+"<\/p>").click(function(){t._cnbtn();t.hideOpts()});i=t.okbtn.add(t.cancelBtn);t.optDiv.append(n('<div class="MultiControls">').append(i));i.on("keydown.sumo",function(i){var r=n(this);switch(i.which){case 32:case 13:r.trigger("click");break;case 9:if(r.hasClass("btnOk"))return;case 27:t._cnbtn();t.hideOpts();return}i.stopPropagation();i.preventDefault()})},_cnbtn:function(){var n=this,t;for(n.E.find("option:selected").each(function(){this.selected=!1}),n.optDiv.find("li.selected").removeClass("selected"),t=0;t<n.Pstate.length;t++)n.E.find("option")[n.Pstate[t]].selected=!0,n.ul.find("li.opt").eq(n.Pstate[t]).addClass("selected");n.selAllState()},SelAll:function(){var t=this;if(t.is_multi){t.selAll=n('<p class="select-all"><span><i><\/i><\/span><label>'+r.locale[2]+"<\/label><\/p>");t.optDiv.addClass("selall");t.selAll.on("click",function(){t.selAll.toggleClass("selected");t.toggSelAll(t.selAll.hasClass("selected"),1)});t.optDiv.prepend(t.selAll)}},Search:function(){var t=this,u=t.CaptionCont.addClass("search"),i=n('<p class="no-match">');t.ftxt=n('<input type="text" class="search-txt" value="" placeholder="'+r.searchText+'">').on("click",function(n){n.stopPropagation()});u.append(t.ftxt);t.optDiv.children("ul").after(i);t.ftxt.on("keyup.sumo",function(){var u=t.optDiv.find("ul.options li.opt").each(function(i,r){r=n(r);r.text().toLowerCase().indexOf(t.ftxt.val().toLowerCase())>-1?r.removeClass("hidden"):r.addClass("hidden")}).not(".hidden");i.html(r.noMatch.replace(/\{0\}/g,"<em><\/em>")).toggle(!u.length);i.find("em").text(t.ftxt.val());t.selAllState()})},selAllState:function(){var t=this,i,u;r.selectAll&&t.is_multi&&(i=0,u=0,t.optDiv.find("li.opt").not(".hidden").each(function(t,r){n(r).hasClass("selected")&&i++;n(r).hasClass("disabled")||u++}),i==u?t.selAll.removeClass("partial").addClass("selected"):i==0?t.selAll.removeClass("selected partial"):t.selAll.addClass("partial"))},showOpts:function(){var t=this;if(!t.E.attr("disabled")){t.E.trigger("sumo:opening",t);t.is_opened=!0;t.select.addClass("open").attr("aria-expanded","true");t.E.trigger("sumo:opened",t);t.ftxt?t.ftxt.focus():t.select.focus();n(document).on("click.sumo",function(n){if(!t.select.is(n.target)&&t.select.has(n.target).length===0){if(!t.is_opened)return;t.hideOpts();r.okCancelInMulti&&t._cnbtn()}});t.is_floating&&(H=t.optDiv.children("ul").outerHeight()+2,t.is_multi&&(H=H+parseInt(t.optDiv.css("padding-bottom"))),t.optDiv.css("height",H),n("body").addClass("sumoStopScroll"));t.setPstate()}},setPstate:function(){var n=this;n.is_multi&&(n.is_floating||r.okCancelInMulti)&&(n.Pstate=[],n.E.find("option").each(function(t,i){i.selected&&n.Pstate.push(t)}))},callChange:function(){this.E.trigger("change").trigger("click")},hideOpts:function(){var t=this;t.is_opened&&(t.E.trigger("sumo:closing",t),t.is_opened=!1,t.select.removeClass("open").attr("aria-expanded","true").find("ul li.sel").removeClass("sel"),t.E.trigger("sumo:closed",t),n(document).off("click.sumo"),t.select.focus(),n("body").removeClass("sumoStopScroll"),r.search&&(t.ftxt.val(""),t.optDiv.find("ul.options li").removeClass("hidden"),t.optDiv.find(".no-match").toggle(!1)))},setOnOpen:function(){var t=this,n=t.optDiv.find("li.opt:not(.hidden)").eq(r.search?0:t.E[0].selectedIndex);(!n.hasClass("disabled")||(n=n.next(":not(disabled)"),n.length))&&(t.optDiv.find("li.sel").removeClass("sel"),n.addClass("sel"),t.showOpts())},nav:function(n){var i=this,o,f=i.ul.find("li.opt:not(.disabled, .hidden)"),t=i.ul.find("li.opt.sel:not(.hidden)"),r=f.index(t);if(i.is_opened&&t.length){if(n&&r>0)o=f.eq(r-1);else if(!n&&r<f.length-1&&r>-1)o=f.eq(r+1);else return;t.removeClass("sel");t=o.addClass("sel");var u=i.ul,s=u.scrollTop(),e=t.position().top+s;e>=s+u.height()-t.outerHeight()&&u.scrollTop(e-u.height()+t.outerHeight());e<s&&u.scrollTop(e)}else i.setOnOpen()},basicEvents:function(){var t=this;t.CaptionCont.click(function(n){t.E.trigger("click");t.is_opened?t.hideOpts():t.showOpts();n.stopPropagation()});t.select.on("keydown.sumo",function(n){switch(n.which){case 38:t.nav(!0);break;case 40:t.nav(!1);break;case 65:if(t.is_multi&&n.ctrlKey){t.toggSelAll(!n.shiftKey,1);break}else return;case 32:if(r.search&&t.ftxt.is(n.target))return;case 13:t.is_opened?t.optDiv.find("ul li.sel").trigger("click"):t.setOnOpen();break;case 9:r.okCancelInMulti||t.hideOpts();return;case 27:r.okCancelInMulti&&t._cnbtn();t.hideOpts();return;default:return}n.preventDefault()});n(window).on("resize.sumo",function(){t.floatingList()})},onOptClick:function(t){var i=this;t.click(function(){var t=n(this),u;t.hasClass("disabled")||(u="",i.is_multi?(t.toggleClass("selected"),t.data("opt")[0].selected=t.hasClass("selected"),i.selAllState()):(t.parent().find("li.selected").removeClass("selected"),t.toggleClass("selected"),t.data("opt")[0].selected=!0),i.is_multi&&r.triggerChangeCombined&&(i.is_floating||r.okCancelInMulti)||(i.setText(),i.callChange()),i.is_multi||i.hideOpts())})},setText:function(){var t=this,u,f;if(t.placeholder="",t.is_multi){for(sels=t.E.find(":selected").not(":disabled"),i=0;i<sels.length;i++)if(i+1>=r.csvDispCount&&r.csvDispCount){t.placeholder=sels.length==t.E.find("option").length&&r.captionFormatAllSelected?r.captionFormatAllSelected.replace(/\{0\}/g,sels.length)+",":r.captionFormat.replace(/\{0\}/g,sels.length)+",";break}else t.placeholder+=n(sels[i]).text()+", ";t.placeholder=t.placeholder.replace(/,([^,]*)$/,"$1")}else t.placeholder=t.E.find(":selected").not(":disabled").text();return u=!1,t.placeholder||(u=!0,t.placeholder=t.E.attr("placeholder"),t.placeholder||(t.placeholder=t.E.find("option:disabled:selected").text())),t.placeholder=t.placeholder?r.prefix+" "+t.placeholder:r.placeholder,t.caption.html(t.placeholder),r.showTitle&&t.CaptionCont.attr("title",t.placeholder),f=t.select.find("input.HEMANT123"),f.length&&f.val(t.getSelStr()),u?t.caption.addClass("placeholder"):t.caption.removeClass("placeholder"),t.placeholder},isMobile:function(){for(var t=navigator.userAgent||navigator.vendor||window.opera,n=0;n<r.nativeOnDevice.length;n++)if(t.toString().toLowerCase().indexOf(r.nativeOnDevice[n].toLowerCase())>0)return r.nativeOnDevice[n];return!1},setNativeMobile:function(){var n=this;n.E.addClass("SelectClass");n.mob=!0;n.E.change(function(){n.setText()})},floatingList:function(){var t=this;t.is_floating=n(window).width()<=r.floatWidth;t.optDiv.toggleClass("isFloating",t.is_floating);t.is_floating||t.optDiv.css("height","");t.optDiv.toggleClass("okCancelInMulti",r.okCancelInMulti&&!t.is_floating)},vRange:function(n){var t=this,i=t.E.find("option");if(i.length<=n||n<0)throw"index out of bounds";return t},toggSel:function(t,i){var r=this,u;(typeof i=="number"?(r.vRange(i),u=r.E.find("option")[i]):u=r.E.find('option[value="'+i+'"]')[0]||0,u&&!u.disabled)&&u.selected!=t&&(u.selected=t,r.mob||n(u).data("li").toggleClass("selected",t),r.callChange(),r.setPstate(),r.setText(),r.selAllState())},toggDis:function(n,t){var i=this.vRange(t);i.E.find("option")[t].disabled=n;n&&(i.E.find("option")[t].selected=!1);i.mob||i.optDiv.find("ul.options li").eq(t).toggleClass("disabled",n).removeClass("selected");i.setText()},toggSumo:function(n){var t=this;return t.enabled=n,t.select.toggleClass("disabled",n),n?(t.E.attr("disabled","disabled"),t.select.removeAttr("tabindex")):(t.E.removeAttr("disabled"),t.select.attr("tabindex","0")),t},toggSelAll:function(t,i){var r=this;r.optDiv.find("li.opt:not(.hidden,.disabled)").each(function(i,r){var r=n(r),u=r.hasClass("selected");t?u||r.trigger("click"):u&&r.trigger("click")});i||(!r.mob&&r.selAll&&r.selAll.removeClass("partial").toggleClass("selected",!!t),r.callChange(),r.setText(),r.setPstate())},reload:function(){var t=this.unload();return n(t).SumoSelect(r)},unload:function(){var n=this;return n.select.before(n.E),n.E.show(),r.outputAsCSV&&n.is_multi&&n.select.find("input.HEMANT123").length&&n.E.attr("name",n.select.find("input.HEMANT123").attr("name")),n.select.remove(),delete t.sumo,t},add:function(i,r,u){if(typeof i=="undefined")throw"No value to add";var f=this;if(opts=f.E.find("option"),typeof r=="number"&&(u=r,r=i),typeof r=="undefined"&&(r=i),opt=n("<option><\/option>").val(i).html(r),opts.length<u)throw"index out of bounds";return typeof u=="undefined"||opts.length==u?(f.E.append(opt),f.mob||f.ul.append(f.createLi(opt))):(opts.eq(u).before(opt),f.mob||f.ul.find("li.opt").eq(u).before(f.createLi(opt))),t},remove:function(n){var t=this.vRange(n);t.E.find("option").eq(n).remove();t.mob||t.optDiv.find("ul.options li").eq(n).remove();t.setText()},selectItem:function(n){this.toggSel(!0,n)},unSelectItem:function(n){this.toggSel(!1,n)},selectAll:function(){this.toggSelAll(!0)},unSelectAll:function(){this.toggSelAll(!1)},disableItem:function(n){this.toggDis(!0,n)},enableItem:function(n){this.toggDis(!1,n)},enabled:!0,enable:function(){return this.toggSumo(!1)},disable:function(){return this.toggSumo(!0)},init:function(){var n=this;return n.createElems(),n.setText(),n}},t.sumo.init())});return u.length==1?u[0]:u}});sumoExtensionMethods={D:null,selDisc:null,selAllStateOrig:null,createDisc:function(n){var t=this;t.D=[n.split(",")][0];t.createElement();t.selAllStateOrig=t.selAllState;t.selAllState=t.selAllStateOverride},createElement:function(){var n=this;if(n.is_multi){n.selDisc=$('<p class="select-disciplines"><span><i><\/i><\/span><label>Select My Disciplines<\/label><\/p>');n.selAll.after(n.selDisc);n.selDisc.on("click",function(){n.selDisc.toggleClass("selected");n.toggSelDisc(n.selDisc.hasClass("selected"),1)});n.selDiscState()}},selAllStateOverride:function(){var n=this;n.selAllStateOrig();n.selDiscState()},selDiscState:function(){var n=this,t,i;n.is_multi&&(t=0,i=n.D.length,n.optDiv.find("li.opt").not(".hidden").filter(function(t,i){return n.D.indexOf($(i).data("opt")[0].value)>=0}).each(function(n,i){$(i).hasClass("selected")&&t++}),i==t?n.selDisc.removeClass("partial").addClass("selected"):t==0?n.selDisc.removeClass("selected partial"):n.selDisc.addClass("partial").removeClass("selected"))},toggSelDisc:function(n,t){var i=this;i.E.find("option:not(:disabled,:hidden)").filter(function(n,t){return i.D.indexOf(t.value)>=0}).each(function(t,i){var r=i.selected,i=$(i).data("li");i.hasClass("hidden")||(n?r||i.trigger("click"):r&&i.trigger("click"))});!t||(!0&&i.selDisc.removeClass("partial").toggleClass("selected",!!n),i.callChange(),i.setText(),i.setPstate())}};$(document).ready(function(){LoadSumo()});!function(n,t){"object"==typeof module&&module.exports?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Spinner=t()}(this,function(){"use strict";function i(n,t){var i,r=document.createElement(n||"div");for(i in t)r[i]=t[i];return r}function t(n){for(var t=1,i=arguments.length;i>t;t++)n.appendChild(arguments[t]);return n}function a(n,t,i,r){var e=["opacity",t,~~(100*n),i,r].join("-"),o=.01+i/r*100,s=Math.max(1-(1-n)/t*(100-o),n),h=u.substring(0,u.indexOf("Animation")).toLowerCase(),c=h&&"-"+h+"-"||"";return l[e]||(f.insertRule("@"+c+"keyframes "+e+"{0%{opacity:"+s+"}"+o+"%{opacity:"+n+"}"+(o+.01)+"%{opacity:1}"+(o+t)%100+"%{opacity:"+n+"}100%{opacity:"+s+"}}",f.cssRules.length),l[e]=1),e}function o(n,t){var r,i,u=n.style;if(t=t.charAt(0).toUpperCase()+t.slice(1),void 0!==u[t])return t;for(i=0;i<c.length;i++)if(r=c[i]+t,void 0!==u[r])return r}function n(n,t){for(var i in t)n.style[o(n,i)||i]=t[i];return n}function s(n){for(var r,i,t=1;t<arguments.length;t++){r=arguments[t];for(i in r)void 0===n[i]&&(n[i]=r[i])}return n}function h(n,t){return"string"==typeof n?n:n[t%n.length]}function r(n){this.opts=s(n||{},r.defaults,y)}function v(){function u(n,t){return i("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',t)}f.addRule(".spin-vml","behavior:url(#default#VML)");r.prototype.lines=function(i,r){function s(){return n(u("group",{coordsize:o+" "+o,coordorigin:-e+" "+-e}),{width:o,height:o})}function c(i,f,o){t(a,t(n(s(),{rotation:360/r.lines*i+"deg",left:~~f}),t(n(u("roundrect",{arcsize:r.corners}),{width:e,height:r.scale*r.width,left:r.scale*r.radius,top:-r.scale*r.width>>1,filter:o}),u("fill",{color:h(r.color,i),opacity:r.opacity}),u("stroke",{opacity:0}))))}var f,e=r.scale*(r.length+r.width),o=2*r.scale*e,l=-(r.width+r.length)*r.scale*2+"px",a=n(s(),{position:"absolute",top:l,left:l});if(r.shadow)for(f=1;f<=r.lines;f++)c(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=r.lines;f++)c(f);return t(i,a)};r.prototype.opacity=function(n,t,i,r){var u=n.firstChild;r=r.shadow&&r.lines||0;u&&t+r<u.childNodes.length&&(u=u.childNodes[t+r],u=u&&u.firstChild,u=u&&u.firstChild,u&&(u.opacity=i))}}var u,f,c=["webkit","Moz","ms","O"],l={},y={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"},e;return(r.defaults={},s(r.prototype,{spin:function(t){this.stop();var f=this,r=f.opts,e=f.el=i(null,{className:r.className});if(n(e,{position:r.position,width:0,zIndex:r.zIndex,left:r.left,top:r.top}),t&&t.insertBefore(e,t.firstChild||null),e.setAttribute("role","progressbar"),f.lines(e,f.opts),!u){var s,h=0,l=(r.lines-1)*(1-r.direction)/2,c=r.fps,o=c/r.speed,a=(1-r.opacity)/(o*r.trail/100),v=o/r.lines;!function y(){h++;for(var n=0;n<r.lines;n++)s=Math.max(1-(h+(r.lines-n)*v)%o*a,r.opacity),f.opacity(e,n*r.direction+l,s,r);f.timeout=f.el&&setTimeout(y,~~(1e3/c))}()}return f},stop:function(){var n=this.el;return n&&(clearTimeout(this.timeout),n.parentNode&&n.parentNode.removeChild(n),this.el=void 0),this},lines:function(r,f){function s(t,r){return n(i(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:t,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*e+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var o,e=0,c=(f.lines-1)*(1-f.direction)/2;e<f.lines;e++)o=n(i(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:u&&a(f.opacity,f.trail,c+e*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&t(o,n(s("#000","0 0 4px #000"),{top:"2px"})),t(r,t(o,s(h(f.color,e),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(n,t,i){t<n.childNodes.length&&(n.childNodes[t].style.opacity=i)}}),"undefined"!=typeof document)&&(f=function(){var n=i("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),e=n(i("group"),{behavior:"url(#default#VML)"}),!o(e,"transform")&&e.adj?v():u=o(e,"animation")),r});$(document).ready(function(){spinner=new Spinner({lines:13,length:5,width:10,radius:26,scale:.5,corners:.7,color:"#AAA",opacity:.25,rotate:0,direction:1,speed:1,trail:75,fps:20,zIndex:2e9,className:"spinner",top:"51%",left:"51%",shadow:!1,hwaccel:!0,position:"absolute"});$("#panel-advanced-options").on("show.bs.collapse",function(){$("#advanced-options-toggle").find("i").removeClass("icon-caret-right").addClass("icon-caret-down")});$("#panel-advanced-options").on("hide.bs.collapse",function(){$("#advanced-options-toggle").find("i").addClass("icon-caret-right").removeClass("icon-caret-down")})})