(function($){var cache={};function tmpl(str,data){var fn=!/\W/.test(str)?cache[str]=cache[str]||tmpl(document.getElementById(str).innerHTML):new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};"+
"with(obj){p.push('"+
str.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")
+"');}return p.join('');");return data?fn(data):fn;};function closer(message,o){function slideComplete(){$(this).remove();}
function fadeComplete(){$(this).slideUp(100,slideComplete);}
$(message).animate({opacity:0},{duration:250,queue:false,complete:fadeComplete});}
function scanMessages(container,o){function helper(){var selector='.'+o.newClass+'.'+o.messageClass,$msg;if($.cookie&&$.cookie(o.persistentCookie)){$msg=$(selector,container).not(o.persistentClass);}else{$msg=$(selector,container);}
if($msg.length){$msg.prepend(o.closeIcon);$msg.click(function(e){if($.cookie&&$msg.hasClass(o.persistentClass)){$.cookie(o.persistentCookie,1,{path:'/'});}
closer(this,o);});$msg.removeClass(o.newClass).addClass(o.activeClass);$msg.each(function(){var self=this;if(!$(self).hasClass(o.stickyClass)&&!$(self).hasClass(o.persistentClass)){var timer=$(self).attr('data-timer')||o.timer;setTimeout(function(){closer($(self),o);},timer);}
$(self).fadeIn(500);});}
setTimeout(helper,o.interval);}
helper();}
function sanitize(str){return str.replace(/</g,'&lt;').replace(/>/g,'&gt;');}
$.fn.notifier=function(options){var opts=$.extend({},$.fn.notify.defaults,options);return $(this).each(function(){var self=this,o=$.metadata?$.extend(opts,$(this).metadata()):opts;if(o.scrollcss){$(window).scroll(function(){$(self).css(o.scrollcss);});}
$('.'+o.messageClass,self).addClass(o.newClass);scanMessages(self,o);});};$.fn.notify=function(msg_or_opts,options){var opts;if(typeof msg_or_opts==='string'){opts=$.extend({message:msg_or_opts},$.fn.notify.defaults,options);}else{opts=$.extend({},$.fn.notify.defaults,msg_or_opts);}
if(opts.status==='success'){opts.status='confirm';}
if(opts.status==='ok'){opts.status='info';}
return $(this).each(function(){if(opts.message){var o=$.metadata?$.extend(opts,$(this).metadata()):opts;if(o.sanitize){o.message=sanitize(o.message);o.title=sanitize(o.title);}
var html=tmpl(o.tmpl,o);$(this).append(html);}else{if(window.console){window.console.warn("No message was set in notify's config: ",o);}}});};$.fn.notify.defaults={status:'info',interval:500,timer:15000,sticky:false,title:'',sanitize:true,tmpl:'<div class="message <%=newClass%> <%=status%> <% if (sticky) { %><%=stickyClass %><% } %>" data-timer="<%=timer%>"><% if (title) { %><h6><%=title%></h6><% } %><div class="content"><%=message%></div></div>',stickyClass:'notify-sticky',persistentClass:'notify-persistent',persistentCookie:'notify-persistent-closed',newClass:'notify-new',activeClass:'notify-active',inactiveClass:'notify-inactive',messageClass:'message',closeIcon:'<b title="Close" class="fa fa-close" style="float:right;"></b>'};}(jQuery));;;(function($,window,document){var pluginName="tooltipster",defaults={animation:'fade',arrow:true,arrowColor:'',autoClose:true,content:null,contentAsHTML:false,contentCloning:true,debug:true,delay:200,minWidth:0,maxWidth:null,functionInit:function(origin,content){},functionBefore:function(origin,continueTooltip){continueTooltip();},functionReady:function(origin,tooltip){},functionAfter:function(origin){},hideOnClick:false,icon:'(?)',iconCloning:true,iconDesktop:false,iconTouch:false,iconTheme:'tooltipster-icon',interactive:false,interactiveTolerance:350,multiple:false,offsetX:0,offsetY:0,onlyOne:false,position:'top',positionTracker:false,positionTrackerCallback:function(origin){if(this.option('trigger')=='hover'&&this.option('autoClose')){this.hide();}},restoration:'current',speed:350,timer:0,theme:'tooltipster-default',touchDevices:true,trigger:'hover',updateAnimation:true};function Plugin(element,options){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=$(element);this.$elProxy;this.elProxyPosition;this.enabled=true;this.options=$.extend({},defaults,options);this.mouseIsOverProxy=false;this.namespace='tooltipster-'+Math.round(Math.random()*100000);this.Status='hidden';this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace('.','');this.options.theme=this.options.theme.replace('.','');this._init();}
Plugin.prototype={_init:function(){var self=this;if(document.querySelector){var initialTitle=null;if(self.$el.data('tooltipster-initialTitle')===undefined){initialTitle=self.$el.attr('title');if(initialTitle===undefined)initialTitle=null;self.$el.data('tooltipster-initialTitle',initialTitle);}
if(self.options.content!==null){self._content_set(self.options.content);}
else{self._content_set(initialTitle);}
var c=self.options.functionInit.call(self.$el,self.$el,self.Content);if(typeof c!=='undefined')self._content_set(c);self.$el.removeAttr('title').addClass('tooltipstered');if((!deviceHasTouchCapability&&self.options.iconDesktop)||(deviceHasTouchCapability&&self.options.iconTouch)){if(typeof self.options.icon==='string'){self.$elProxy=$('<span class="'+self.options.iconTheme+'"></span>');self.$elProxy.text(self.options.icon);}
else{if(self.options.iconCloning)self.$elProxy=self.options.icon.clone(true);else self.$elProxy=self.options.icon;}
self.$elProxy.insertAfter(self.$el);}
else{self.$elProxy=self.$el;}
if(self.options.trigger=='hover'){self.$elProxy.on('mouseenter.'+self.namespace,function(){if(!deviceIsPureTouch()||self.options.touchDevices){self.mouseIsOverProxy=true;self._show();}}).on('mouseleave.'+self.namespace,function(){if(!deviceIsPureTouch()||self.options.touchDevices){self.mouseIsOverProxy=false;}});if(deviceHasTouchCapability&&self.options.touchDevices){self.$elProxy.on('touchstart.'+self.namespace,function(){self._showNow();});}}
else if(self.options.trigger=='click'){self.$elProxy.on('click.'+self.namespace,function(){if(!deviceIsPureTouch()||self.options.touchDevices){self._show();}});}}},_show:function(){var self=this;if(self.Status!='shown'&&self.Status!='appearing'){if(self.options.delay){self.timerShow=setTimeout(function(){if(self.options.trigger=='click'||(self.options.trigger=='hover'&&self.mouseIsOverProxy)){self._showNow();}},self.options.delay);}
else self._showNow();}},_showNow:function(callback){var self=this;self.options.functionBefore.call(self.$el,self.$el,function(){if(self.enabled&&self.Content!==null){if(callback)self.callbacks.show.push(callback);self.callbacks.hide=[];clearTimeout(self.timerShow);self.timerShow=null;clearTimeout(self.timerHide);self.timerHide=null;if(self.options.onlyOne){$('.tooltipstered').not(self.$el).each(function(i,el){var $el=$(el),nss=$el.data('tooltipster-ns');$.each(nss,function(i,ns){var instance=$el.data(ns),s=instance.status(),ac=instance.option('autoClose');if(s!=='hidden'&&s!=='disappearing'&&ac){instance.hide();}});});}
var finish=function(){self.Status='shown';$.each(self.callbacks.show,function(i,c){c.call(self.$el);});self.callbacks.show=[];};if(self.Status!=='hidden'){var extraTime=0;if(self.Status==='disappearing'){self.Status='appearing';if(supportsTransitions()){self.$tooltip.clearQueue().removeClass('tooltipster-dying').addClass('tooltipster-'+self.options.animation+'-show');if(self.options.speed>0)self.$tooltip.delay(self.options.speed);self.$tooltip.queue(finish);}
else{self.$tooltip.stop().fadeIn(finish);}}
else if(self.Status==='shown'){finish();}}
else{self.Status='appearing';var extraTime=self.options.speed;self.bodyOverflowX=$('body').css('overflow-x');$('body').css('overflow-x','hidden');var animation='tooltipster-'+self.options.animation,animationSpeed='-webkit-transition-duration: '+self.options.speed+'ms; -webkit-animation-duration: '+self.options.speed+'ms; -moz-transition-duration: '+self.options.speed+'ms; -moz-animation-duration: '+self.options.speed+'ms; -o-transition-duration: '+self.options.speed+'ms; -o-animation-duration: '+self.options.speed+'ms; -ms-transition-duration: '+self.options.speed+'ms; -ms-animation-duration: '+self.options.speed+'ms; transition-duration: '+self.options.speed+'ms; animation-duration: '+self.options.speed+'ms;',minWidth=self.options.minWidth?'min-width:'+Math.round(self.options.minWidth)+'px;':'',maxWidth=self.options.maxWidth?'max-width:'+Math.round(self.options.maxWidth)+'px;':'',pointerEvents=self.options.interactive?'pointer-events: auto;':'';self.$tooltip=$('<div class="tooltipster-base '+self.options.theme+'" style="'+minWidth+' '+maxWidth+' '+pointerEvents+' '+animationSpeed+'"><div class="tooltipster-content"></div></div>');if(supportsTransitions())self.$tooltip.addClass(animation);self._content_insert();self.$tooltip.appendTo('body');self.reposition();self.options.functionReady.call(self.$el,self.$el,self.$tooltip);if(supportsTransitions()){self.$tooltip.addClass(animation+'-show');if(self.options.speed>0)self.$tooltip.delay(self.options.speed);self.$tooltip.queue(finish);}
else{self.$tooltip.css('display','none').fadeIn(self.options.speed,finish);}
self._interval_set();$(window).on('scroll.'+self.namespace+' resize.'+self.namespace,function(){self.reposition();});if(self.options.autoClose){$('body').off('.'+self.namespace);if(self.options.trigger=='hover'){if(deviceHasTouchCapability){setTimeout(function(){$('body').on('touchstart.'+self.namespace,function(){self.hide();});},0);}
if(self.options.interactive){if(deviceHasTouchCapability){self.$tooltip.on('touchstart.'+self.namespace,function(event){event.stopPropagation();});}
var tolerance=null;self.$elProxy.add(self.$tooltip).on('mouseleave.'+self.namespace+'-autoClose',function(){clearTimeout(tolerance);tolerance=setTimeout(function(){self.hide();},self.options.interactiveTolerance);}).on('mouseenter.'+self.namespace+'-autoClose',function(){clearTimeout(tolerance);});}
else{self.$elProxy.on('mouseleave.'+self.namespace+'-autoClose',function(){self.hide();});}
if(self.options.hideOnClick){self.$elProxy.on('click.'+self.namespace+'-autoClose',function(){self.hide();});}}
else if(self.options.trigger=='click'){setTimeout(function(){$('body').on('click.'+self.namespace+' touchstart.'+self.namespace,function(){self.hide();});},0);if(self.options.interactive){self.$tooltip.on('click.'+self.namespace+' touchstart.'+self.namespace,function(event){event.stopPropagation();});}}}}
if(self.options.timer>0){self.timerHide=setTimeout(function(){self.timerHide=null;self.hide();},self.options.timer+extraTime);}}});},_interval_set:function(){var self=this;self.checkInterval=setInterval(function(){if($('body').find(self.$el).length===0||$('body').find(self.$elProxy).length===0||self.Status=='hidden'||$('body').find(self.$tooltip).length===0){if(self.Status=='shown'||self.Status=='appearing')self.hide();self._interval_cancel();}
else{if(self.options.positionTracker){var p=self._repositionInfo(self.$elProxy),identical=false;if(areEqual(p.dimension,self.elProxyPosition.dimension)){if(self.$elProxy.css('position')==='fixed'){if(areEqual(p.position,self.elProxyPosition.position))identical=true;}
else{if(areEqual(p.offset,self.elProxyPosition.offset))identical=true;}}
if(!identical){self.reposition();self.options.positionTrackerCallback.call(self,self.$el);}}}},200);},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null;},_content_set:function(content){if(typeof content==='object'&&content!==null&&this.options.contentCloning){content=content.clone(true);}
this.Content=content;},_content_insert:function(){var self=this,$d=this.$tooltip.find('.tooltipster-content');if(typeof self.Content==='string'&&!self.options.contentAsHTML){$d.text(self.Content);}
else{$d.empty().append(self.Content);}},_update:function(content){var self=this;self._content_set(content);if(self.Content!==null){if(self.Status!=='hidden'){self._content_insert();self.reposition();if(self.options.updateAnimation){if(supportsTransitions()){self.$tooltip.css({'width':'','-webkit-transition':'all '+self.options.speed+'ms, width 0ms, height 0ms, left 0ms, top 0ms','-moz-transition':'all '+self.options.speed+'ms, width 0ms, height 0ms, left 0ms, top 0ms','-o-transition':'all '+self.options.speed+'ms, width 0ms, height 0ms, left 0ms, top 0ms','-ms-transition':'all '+self.options.speed+'ms, width 0ms, height 0ms, left 0ms, top 0ms','transition':'all '+self.options.speed+'ms, width 0ms, height 0ms, left 0ms, top 0ms'}).addClass('tooltipster-content-changing');setTimeout(function(){if(self.Status!='hidden'){self.$tooltip.removeClass('tooltipster-content-changing');setTimeout(function(){if(self.Status!=='hidden'){self.$tooltip.css({'-webkit-transition':self.options.speed+'ms','-moz-transition':self.options.speed+'ms','-o-transition':self.options.speed+'ms','-ms-transition':self.options.speed+'ms','transition':self.options.speed+'ms'});}},self.options.speed);}},self.options.speed);}
else{self.$tooltip.fadeTo(self.options.speed,0.5,function(){if(self.Status!='hidden'){self.$tooltip.fadeTo(self.options.speed,1);}});}}}}
else{self.hide();}},_repositionInfo:function($el){return{dimension:{height:$el.outerHeight(false),width:$el.outerWidth(false)},offset:$el.offset(),position:{left:parseInt($el.css('left')),top:parseInt($el.css('top'))}};},hide:function(callback){var self=this;if(callback)self.callbacks.hide.push(callback);self.callbacks.show=[];clearTimeout(self.timerShow);self.timerShow=null;clearTimeout(self.timerHide);self.timerHide=null;var finishCallbacks=function(){$.each(self.callbacks.hide,function(i,c){c.call(self.$el);});self.callbacks.hide=[];};if(self.Status=='shown'||self.Status=='appearing'){self.Status='disappearing';var finish=function(){self.Status='hidden';if(typeof self.Content=='object'&&self.Content!==null){self.Content.detach();}
self.$tooltip.remove();self.$tooltip=null;$(window).off('.'+self.namespace);$('body').off('.'+self.namespace).css('overflow-x',self.bodyOverflowX);$('body').off('.'+self.namespace);self.$elProxy.off('.'+self.namespace+'-autoClose');self.options.functionAfter.call(self.$el,self.$el);finishCallbacks();};if(supportsTransitions()){self.$tooltip.clearQueue().removeClass('tooltipster-'+self.options.animation+'-show').addClass('tooltipster-dying');if(self.options.speed>0)self.$tooltip.delay(self.options.speed);self.$tooltip.queue(finish);}
else{self.$tooltip.stop().fadeOut(self.options.speed,finish);}}
else if(self.Status=='hidden'){finishCallbacks();}
return self;},show:function(callback){this._showNow(callback);return this;},update:function(c){return this.content(c);},content:function(c){if(typeof c==='undefined'){return this.Content;}
else{this._update(c);return this;}},reposition:function(){var self=this;if($('body').find(self.$tooltip).length!==0){self.$tooltip.css('width','');self.elProxyPosition=self._repositionInfo(self.$elProxy);var arrowReposition=null,windowWidth=$(window).width(),proxy=self.elProxyPosition,tooltipWidth=self.$tooltip.outerWidth(false),tooltipInnerWidth=self.$tooltip.innerWidth()+1,tooltipHeight=self.$tooltip.outerHeight(false);if(self.$elProxy.is('area')){var areaShape=self.$elProxy.attr('shape'),mapName=self.$elProxy.parent().attr('name'),map=$('img[usemap="#'+mapName+'"]'),mapOffsetLeft=map.offset().left,mapOffsetTop=map.offset().top,areaMeasurements=self.$elProxy.attr('coords')!==undefined?self.$elProxy.attr('coords').split(','):undefined;if(areaShape=='circle'){var areaLeft=parseInt(areaMeasurements[0]),areaTop=parseInt(areaMeasurements[1]),areaWidth=parseInt(areaMeasurements[2]);proxy.dimension.height=areaWidth*2;proxy.dimension.width=areaWidth*2;proxy.offset.top=mapOffsetTop+areaTop-areaWidth;proxy.offset.left=mapOffsetLeft+areaLeft-areaWidth;}
else if(areaShape=='rect'){var areaLeft=parseInt(areaMeasurements[0]),areaTop=parseInt(areaMeasurements[1]),areaRight=parseInt(areaMeasurements[2]),areaBottom=parseInt(areaMeasurements[3]);proxy.dimension.height=areaBottom-areaTop;proxy.dimension.width=areaRight-areaLeft;proxy.offset.top=mapOffsetTop+areaTop;proxy.offset.left=mapOffsetLeft+areaLeft;}
else if(areaShape=='poly'){var areaXs=[],areaYs=[],areaSmallestX=0,areaSmallestY=0,areaGreatestX=0,areaGreatestY=0,arrayAlternate='even';for(var i=0;i<areaMeasurements.length;i++){var areaNumber=parseInt(areaMeasurements[i]);if(arrayAlternate=='even'){if(areaNumber>areaGreatestX){areaGreatestX=areaNumber;if(i===0){areaSmallestX=areaGreatestX;}}
if(areaNumber<areaSmallestX){areaSmallestX=areaNumber;}
arrayAlternate='odd';}
else{if(areaNumber>areaGreatestY){areaGreatestY=areaNumber;if(i==1){areaSmallestY=areaGreatestY;}}
if(areaNumber<areaSmallestY){areaSmallestY=areaNumber;}
arrayAlternate='even';}}
proxy.dimension.height=areaGreatestY-areaSmallestY;proxy.dimension.width=areaGreatestX-areaSmallestX;proxy.offset.top=mapOffsetTop+areaSmallestY;proxy.offset.left=mapOffsetLeft+areaSmallestX;}
else{proxy.dimension.height=map.outerHeight(false);proxy.dimension.width=map.outerWidth(false);proxy.offset.top=mapOffsetTop;proxy.offset.left=mapOffsetLeft;}}
var myLeft=0,myLeftMirror=0,myTop=0,offsetY=parseInt(self.options.offsetY),offsetX=parseInt(self.options.offsetX),practicalPosition=self.options.position;function dontGoOffScreenX(){var windowLeft=$(window).scrollLeft();if((myLeft-windowLeft)<0){arrowReposition=myLeft-windowLeft;myLeft=windowLeft;}
if(((myLeft+tooltipWidth)-windowLeft)>windowWidth){arrowReposition=myLeft-((windowWidth+windowLeft)-tooltipWidth);myLeft=(windowWidth+windowLeft)-tooltipWidth;}}
function dontGoOffScreenY(switchTo,switchFrom){if(((proxy.offset.top-$(window).scrollTop()-tooltipHeight-offsetY-12)<0)&&(switchFrom.indexOf('top')>-1)){practicalPosition=switchTo;}
if(((proxy.offset.top+proxy.dimension.height+tooltipHeight+12+offsetY)>($(window).scrollTop()+$(window).height()))&&(switchFrom.indexOf('bottom')>-1)){practicalPosition=switchTo;myTop=(proxy.offset.top-tooltipHeight)-offsetY-12;}}
if(practicalPosition=='top'){var leftDifference=(proxy.offset.left+tooltipWidth)-(proxy.offset.left+proxy.dimension.width);myLeft=(proxy.offset.left+offsetX)-(leftDifference/2);myTop=(proxy.offset.top-tooltipHeight)-offsetY-12;dontGoOffScreenX();dontGoOffScreenY('bottom','top');}
if(practicalPosition=='top-left'){myLeft=proxy.offset.left+offsetX;myTop=(proxy.offset.top-tooltipHeight)-offsetY-12;dontGoOffScreenX();dontGoOffScreenY('bottom-left','top-left');}
if(practicalPosition=='top-right'){myLeft=(proxy.offset.left+proxy.dimension.width+offsetX)-tooltipWidth;myTop=(proxy.offset.top-tooltipHeight)-offsetY-12;dontGoOffScreenX();dontGoOffScreenY('bottom-right','top-right');}
if(practicalPosition=='bottom'){var leftDifference=(proxy.offset.left+tooltipWidth)-(proxy.offset.left+proxy.dimension.width);myLeft=proxy.offset.left-(leftDifference/2)+offsetX;myTop=(proxy.offset.top+proxy.dimension.height)+offsetY+12;dontGoOffScreenX();dontGoOffScreenY('top','bottom');}
if(practicalPosition=='bottom-left'){myLeft=proxy.offset.left+offsetX;myTop=(proxy.offset.top+proxy.dimension.height)+offsetY+12;dontGoOffScreenX();dontGoOffScreenY('top-left','bottom-left');}
if(practicalPosition=='bottom-right'){myLeft=(proxy.offset.left+proxy.dimension.width+offsetX)-tooltipWidth;myTop=(proxy.offset.top+proxy.dimension.height)+offsetY+12;dontGoOffScreenX();dontGoOffScreenY('top-right','bottom-right');}
if(practicalPosition=='left'){myLeft=proxy.offset.left-offsetX-tooltipWidth-12;myLeftMirror=proxy.offset.left+offsetX+proxy.dimension.width+12;var topDifference=(proxy.offset.top+tooltipHeight)-(proxy.offset.top+proxy.dimension.height);myTop=proxy.offset.top-(topDifference/2)-offsetY;if((myLeft<0)&&((myLeftMirror+tooltipWidth)>windowWidth)){var borderWidth=parseFloat(self.$tooltip.css('border-width'))*2,newWidth=(tooltipWidth+myLeft)-borderWidth;self.$tooltip.css('width',newWidth+'px');tooltipHeight=self.$tooltip.outerHeight(false);myLeft=proxy.offset.left-offsetX-newWidth-12-borderWidth;topDifference=(proxy.offset.top+tooltipHeight)-(proxy.offset.top+proxy.dimension.height);myTop=proxy.offset.top-(topDifference/2)-offsetY;}
else if(myLeft<0){myLeft=proxy.offset.left+offsetX+proxy.dimension.width+12;arrowReposition='left';}}
if(practicalPosition=='right'){myLeft=proxy.offset.left+offsetX+proxy.dimension.width+12;myLeftMirror=proxy.offset.left-offsetX-tooltipWidth-12;var topDifference=(proxy.offset.top+tooltipHeight)-(proxy.offset.top+proxy.dimension.height);myTop=proxy.offset.top-(topDifference/2)-offsetY;if(((myLeft+tooltipWidth)>windowWidth)&&(myLeftMirror<0)){var borderWidth=parseFloat(self.$tooltip.css('border-width'))*2,newWidth=(windowWidth-myLeft)-borderWidth;self.$tooltip.css('width',newWidth+'px');tooltipHeight=self.$tooltip.outerHeight(false);topDifference=(proxy.offset.top+tooltipHeight)-(proxy.offset.top+proxy.dimension.height);myTop=proxy.offset.top-(topDifference/2)-offsetY;}
else if((myLeft+tooltipWidth)>windowWidth){myLeft=proxy.offset.left-offsetX-tooltipWidth-12;arrowReposition='right';}}
if(self.options.arrow){var arrowClass='tooltipster-arrow-'+practicalPosition;if(self.options.arrowColor.length<1){var arrowColor=self.$tooltip.css('background-color');}
else{var arrowColor=self.options.arrowColor;}
if(!arrowReposition){arrowReposition='';}
else if(arrowReposition=='left'){arrowClass='tooltipster-arrow-right';arrowReposition='';}
else if(arrowReposition=='right'){arrowClass='tooltipster-arrow-left';arrowReposition='';}
else{arrowReposition='left:'+Math.round(arrowReposition)+'px;';}
if((practicalPosition=='top')||(practicalPosition=='top-left')||(practicalPosition=='top-right')){var tooltipBorderWidth=parseFloat(self.$tooltip.css('border-bottom-width')),tooltipBorderColor=self.$tooltip.css('border-bottom-color');}
else if((practicalPosition=='bottom')||(practicalPosition=='bottom-left')||(practicalPosition=='bottom-right')){var tooltipBorderWidth=parseFloat(self.$tooltip.css('border-top-width')),tooltipBorderColor=self.$tooltip.css('border-top-color');}
else if(practicalPosition=='left'){var tooltipBorderWidth=parseFloat(self.$tooltip.css('border-right-width')),tooltipBorderColor=self.$tooltip.css('border-right-color');}
else if(practicalPosition=='right'){var tooltipBorderWidth=parseFloat(self.$tooltip.css('border-left-width')),tooltipBorderColor=self.$tooltip.css('border-left-color');}
else{var tooltipBorderWidth=parseFloat(self.$tooltip.css('border-bottom-width')),tooltipBorderColor=self.$tooltip.css('border-bottom-color');}
if(tooltipBorderWidth>1){tooltipBorderWidth++;}
var arrowBorder='';if(tooltipBorderWidth!==0){var arrowBorderSize='',arrowBorderColor='border-color: '+tooltipBorderColor+';';if(arrowClass.indexOf('bottom')!==-1){arrowBorderSize='margin-top: -'+Math.round(tooltipBorderWidth)+'px;';}
else if(arrowClass.indexOf('top')!==-1){arrowBorderSize='margin-bottom: -'+Math.round(tooltipBorderWidth)+'px;';}
else if(arrowClass.indexOf('left')!==-1){arrowBorderSize='margin-right: -'+Math.round(tooltipBorderWidth)+'px;';}
else if(arrowClass.indexOf('right')!==-1){arrowBorderSize='margin-left: -'+Math.round(tooltipBorderWidth)+'px;';}
arrowBorder='<span class="tooltipster-arrow-border" style="'+arrowBorderSize+' '+arrowBorderColor+';"></span>';}
self.$tooltip.find('.tooltipster-arrow').remove();var arrowConstruct='<div class="'+arrowClass+' tooltipster-arrow" style="'+arrowReposition+'">'+arrowBorder+'<span style="border-color:'+arrowColor+';"></span></div>';self.$tooltip.append(arrowConstruct);}
self.$tooltip.css({'top':Math.round(myTop)+'px','left':Math.round(myLeft)+'px'});}
return self;},enable:function(){this.enabled=true;return this;},disable:function(){this.hide();this.enabled=false;return this;},destroy:function(){var self=this;self.hide();if(self.$el[0]!==self.$elProxy[0]){self.$elProxy.remove();}
self.$el.removeData(self.namespace).off('.'+self.namespace);var ns=self.$el.data('tooltipster-ns');if(ns.length===1){var title=null;if(self.options.restoration==='previous'){title=self.$el.data('tooltipster-initialTitle');}
else if(self.options.restoration==='current'){title=(typeof self.Content==='string')?self.Content:$('<div></div>').append(self.Content).html();}
if(title){self.$el.attr('title',title);}
self.$el.removeClass('tooltipstered').removeData('tooltipster-ns').removeData('tooltipster-initialTitle');}
else{ns=$.grep(ns,function(el,i){return el!==self.namespace;});self.$el.data('tooltipster-ns',ns);}
return self;},elementIcon:function(){return(this.$el[0]!==this.$elProxy[0])?this.$elProxy[0]:undefined;},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined;},option:function(o,val){if(typeof val=='undefined')return this.options[o];else{this.options[o]=val;return this;}},status:function(){return this.Status;}};$.fn[pluginName]=function(){var args=arguments;if(this.length===0){if(typeof args[0]==='string'){var methodIsStatic=true;switch(args[0]){case 'setDefaults':$.extend(defaults,args[1]);break;default:methodIsStatic=false;break;}
if(methodIsStatic)return true;else return this;}
else{return this;}}
else{if(typeof args[0]==='string'){var v='#*$~&';this.each(function(){var ns=$(this).data('tooltipster-ns'),self=ns?$(this).data(ns[0]):null;if(self){if(typeof self[args[0]]==='function'){var resp=self[args[0]](args[1],args[2]);}
else{throw new Error('Unknown method .tooltipster("'+args[0]+'")');}
if(resp!==self){v=resp;return false;}}
else{throw new Error('You called Tooltipster\'s "'+args[0]+'" method on an uninitialized element');}});return(v!=='#*$~&')?v:this;}
else{var instances=[],multipleIsSet=args[0]&&typeof args[0].multiple!=='undefined',multiple=(multipleIsSet&&args[0].multiple)||(!multipleIsSet&&defaults.multiple),debugIsSet=args[0]&&typeof args[0].debug!=='undefined',debug=(debugIsSet&&args[0].debug)||(!debugIsSet&&defaults.debug);this.each(function(){var go=false,ns=$(this).data('tooltipster-ns'),instance=null;if(!ns){go=true;}
else if(multiple){go=true;}
else if(debug){console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.');}
if(go){instance=new Plugin(this,args[0]);if(!ns)ns=[];ns.push(instance.namespace);$(this).data('tooltipster-ns',ns)
$(this).data(instance.namespace,instance);}
instances.push(instance);});if(multiple)return instances;else return this;}}};function areEqual(a,b){var same=true;$.each(a,function(i,el){if(typeof b[i]==='undefined'||a[i]!==b[i]){same=false;return false;}});return same;}
var deviceHasTouchCapability=!!('ontouchstart'in window);var deviceHasMouse=false;$('body').one('mousemove',function(){deviceHasMouse=true;});function deviceIsPureTouch(){return(!deviceHasMouse&&deviceHasTouchCapability);}
function supportsTransitions(){var b=document.body||document.documentElement,s=b.style,p='transition';if(typeof s[p]=='string'){return true;}
v=['Moz','Webkit','Khtml','O','ms'],p=p.charAt(0).toUpperCase()+p.substr(1);for(var i=0;i<v.length;i++){if(typeof s[v[i]+p]=='string'){return true;}}
return false;}})(jQuery,window,document);;(function($){$('div.editable, span.editable, h1.editable').find('.viewer').append('<a class="edit_btn btn"><b class="fa fa-edit"></b></a>').end().click(function(e){var editable=$(this).closest('.editable');var editor=editable.find('.editor');var viewer=editable.find('.viewer');if(editor.hasClass('overlap')){editor.width(viewer.width());}
editable.addClass('editing').removeClass('viewing');editor.find('textarea').change();e.stopPropagation();}).find('a').click(function(event){if(!$(this).hasClass('edit_btn')){event.stopPropagation();}}).end().end().find('.editor').find('input, select, textarea').each(function(i){var $this=$(this);var editor=$this.closest('.editor');if($this.attr('type')==='checkbox'){$this.attr('original_val',this.checked);}else{$this.attr('original_val',this.value);}
if(!$('a.cancel_btn',editor).length){var save_btns=$('<div class="save_holder"><input type="submit" value="Save"/><a href="#" class="cancel_btn">Cancel</a></div>');if(editor.hasClass('multiline')){var save_holder=editor.find('.save_holder');if(save_holder.length){save_holder.append(save_btns);}
else{editor.append(save_btns);}}
else{editor.append($('<table class="holder_table"><tr/></table>').append($('<td/>').append($this)).append($('<td class="save_controls"/>').append($(save_btns))));}}}).end().find('.cancel_btn').click(function(e){var $editable=$(this).closest('.editable');$editable.addClass('viewing').removeClass('editing');$editable.find('input:text, select, textarea').each(function(){$(this).val($(this).attr('original_val'));});$editable.find('input[type=checkbox]').each(function(){this.checked=($(this).attr('original_val')==='true');});return false;});})(jQuery);$(function(){$('.defaultText').focus(function(){var $this=$(this);if($this.val()==$this[0].title){$this.removeClass('defaultTextActive').val('');}}).blur(function(){var $this=$(this);if(!$this.val()){$this.addClass('defaultTextActive').val($this[0].title);}}).blur();$('.selectText').focus(function(){var field=$(this);window.setTimeout(function(){field.select();},10);});});function auto_close(o,timeout){var $o=$(o);setTimeout(function(){$o.fadeOut('slow');},timeout);return $o;}
function flash(html,kind,timeout){var status=kind||'info';var title='Notice:';if(status=='error'){title='Error:';}
$('#messages').notify(html,{title:title,status:status});}
function attach_form_retry(form){$(form).submit(function(){$form=$(this);$messages=$('#messages')
$messages.notify('Saving...',{title:'Form save in progress',status:'info'});setTimeout(function(){$messages.notify('The server is taking too long to respond.<br/>Retrying in 30 seconds.',{title:'Form save in progress',status:'error'});setTimeout(function(){$messages.notify('Retrying...',{title:'Form save in progress',status:'warning'});$form.submit();},23000)},7000);});}
function addCommas(num){return String(num).replace(new RegExp('(\\d)(?=(\\d\\d\\d)+(?!\\d))','g'),"$1,");}
function get_cm($elem){return $('.CodeMirror',$elem)[0].CodeMirror;}
function escape_html(str){return $('<i></i>').text(str).html();}
$(function(){$('html').removeClass('no-js').addClass('js');attach_form_retry('form.can-retry');$('#messages').notifier();$('#flash > div').each(function(){var status=this.className||'info';var title='Notice:';if(status=='error'){title='Error:';}
$('#messages').notify(this.innerHTML,{title:title,status:status});});var i=0;$('input,textarea,select,button').each(function(){$(this).attr('tabindex',++i);});var ws=/^\s*$/;$('[data-prompt]').each(function(){var $this=$(this);if(ws.test($this.text())){$this.css('color','gray').text($this.attr('data-prompt'))}});$('#site-notification .btn-close').click(function(e){var $note=$(this).parent();$note.hide();var note_id=$note.attr('data-notification-id');var cookie=$.cookie('site-notification');cookie=cookie.replace(new RegExp(note_id+'-([0-9]+)-False'),note_id+'-$1-True');$.cookie('site-notification',cookie,{expires:365,path:'/',secure:top.location.protocol==='https:'?true:false});e.preventDefault();return false;});$('.lightbox').click(function(e){var image_source=$(this).data("src")||$(this).attr('href');if($('#lightbox').length===0){$('body').append('<div id="lightbox" style="display:none; height: 90%"><img style="display: block; max-height: 100%; max-width: 100%; margin-left: auto; margin-right: auto;"></div>');}
var image=$('#lightbox').find('img:first');image.attr("src",image_source);$('#lightbox').lightbox_me({centered:true});e.preventDefault();});});$(function(){$('.active-md').each(function(){var $active_md=$(this);new Checklists($active_md,function(checkbox,callback){var uri=$active_md.data('markdownlink');$.get(uri+'get_markdown',callback);},function(markdown,checkbox,callback){var uri=$active_md.data('markdownlink');$.ajax({type:'post',url:uri+'update_markdown',data:{'text':markdown,'_session_id':$.cookie('_session_id')},success:callback});});});});var umProfileStore={};var displayUserCard=function(instance,data){$(instance).tooltipster('content',data);}
$(function(){$(".user-mention").tooltipster({animation:'fade',delay:200,theme:'tooltipster-default',trigger:'hover',position:'top',iconCloning:false,maxWidth:400,contentAsHTML:true,interactive:true,content:'Loading...',functionReady:function(instance,helper){var userUrl=$(this).attr('href');if($(this).data('user-url')){userUrl=$(this).data('user-url');}
if(umProfileStore.hasOwnProperty(userUrl)){displayUserCard(instance,umProfileStore[userUrl]);}
else{$.get(userUrl+'user_card',function(data){displayUserCard(instance,data);umProfileStore[userUrl]=data;});}}});});;var Checklists=(function($){"use strict";function Checklists(container,retriever,storer){this.container=container.jquery?container:$(container);this.retriever=retriever;this.storer=storer;var checklists=$(".checklist",container);checklists.find(this.checkboxSelector).prop("disabled",false);var self=this;checklists.on("change",this.checkboxSelector,function(){var args=Array.prototype.slice.call(arguments);args.push(self);self.onChange.apply(this,args);});}
Checklists.prototype.checkboxSelector="> li > input:checkbox";Checklists.prototype.onChange=function(ev,self){var checkbox=$(this).prop("disabled",true);var index=$("ul"+self.checkboxSelector,self.container).index(this);var reactivate=function(){checkbox.prop("disabled",false);};self.retriever(checkbox,function(markdown){markdown=self.toggleCheckbox(index,markdown);self.storer(markdown,checkbox,reactivate);});};Checklists.prototype.toggleCheckbox=function(index,markdown){var pattern=/^([*-]) \[([ Xx])\]/mg;var count=0;return markdown.replace(pattern,function(match,prefix,marker){if(count===index){marker=marker===" "?"x":" ";}
count++;return prefix+" ["+marker+"]";});};return Checklists;}(jQuery));;function startLightbox($lightbox){$lightbox.lightbox_me();$lightbox.on('click','.close',function(e){e.preventDefault();$lightbox.trigger('close');});return $lightbox;}
$(function(){$('body').on('click','a.admin_modal',function(e){e.preventDefault();$('#lightbox_admin_modal').remove();$('body').append('<div id="lightbox_admin_modal" class="modal" style="display:none">  \
            <a class="icon close" href="#" title="Close"><i class="fa fa-close"></i></a>  \
            <h1 id="admin_modal_title"></h1><div id="admin_modal_contents">Loading...</div>  \
        </div>');startLightbox($('#lightbox_admin_modal'));var link=this;$.get(link.href,function(data){var $popup_title=$('#admin_modal_title');var $popup_contents=$('#admin_modal_contents');$popup_title.html($(link).html());$popup_contents.html(data);var csrf_exists=$popup_contents.find('form > input[name="_session_id"]').length;if(!csrf_exists){var cval=$.cookie('_session_id');var csrf_input=$('<input name="_session_id" type="hidden" value="'+cval+'">');$popup_contents.find('form').append(csrf_input);}});});});;(function($){$.fn.lightbox_me=function(options){return this.each(function(){var
opts=$.extend({},$.fn.lightbox_me.defaults,options),$overlay=$(),$self=$(this),$iframe=$('<iframe id="foo" style="z-index: '+(opts.zIndex+1)+';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();"/>');if(opts.showOverlay){var $currentOverlays=$(".js_lb_overlay:visible");if($currentOverlays.length>0){$overlay=$('<div class="lb_overlay_clear js_lb_overlay"/>');}else{$overlay=$('<div class="'+opts.classPrefix+'_overlay js_lb_overlay"/>');}}
$('body').append($self.hide()).append($overlay);if(opts.showOverlay){setOverlayHeight();$overlay.css({position:'absolute',width:'100%',top:0,left:0,right:0,bottom:0,zIndex:(opts.zIndex+2),display:'none'});if(!$overlay.hasClass('lb_overlay_clear')){$overlay.css(opts.overlayCSS);}}
if(opts.showOverlay){$overlay.fadeIn(opts.overlaySpeed,function(){setSelfPosition();$self[opts.appearEffect](opts.lightboxSpeed,function(){setOverlayHeight();setSelfPosition();opts.onLoad()});});}else{setSelfPosition();$self[opts.appearEffect](opts.lightboxSpeed,function(){opts.onLoad()});}
if(opts.parentLightbox){opts.parentLightbox.fadeOut(200);}
$(window).resize(setOverlayHeight).resize(setSelfPosition).scroll(setSelfPosition);$(window).bind('keyup.lightbox_me',observeKeyPress);if(opts.closeClick){$overlay.click(function(e){closeLightbox();e.preventDefault;});}
$self.delegate(opts.closeSelector,"click",function(e){closeLightbox();e.preventDefault();});$self.bind('close',closeLightbox);$self.bind('reposition',setSelfPosition);function closeLightbox(){var s=$self[0].style;if(opts.destroyOnClose){$self.add($overlay).remove();}else{$self.add($overlay).hide();}
if(opts.parentLightbox){opts.parentLightbox.fadeIn(200);}
if(opts.preventScroll){$('body').css('overflow','');}
$iframe.remove();$self.undelegate(opts.closeSelector,"click");$self.unbind('close',closeLightbox);$self.unbind('repositon',setSelfPosition);$(window).unbind('resize',setOverlayHeight);$(window).unbind('resize',setSelfPosition);$(window).unbind('scroll',setSelfPosition);$(window).unbind('keyup.lightbox_me');opts.onClose();}
function observeKeyPress(e){if((e.keyCode==27||(e.DOM_VK_ESCAPE==27&&e.which==0))&&opts.closeEsc)closeLightbox();}
function setOverlayHeight(){if($(window).height()<$(document).height()){$overlay.css({height:$(document).height()+'px'});$iframe.css({height:$(document).height()+'px'});}else{$overlay.css({height:'100%'});}}
function setSelfPosition(){var s=$self[0].style;$self.css({left:'50%',marginLeft:($self.outerWidth()/2)*-1,zIndex:(opts.zIndex+3)});if(($self.height()+80>=$(window).height())&&($self.css('position')!='absolute')){var topOffset=$(document).scrollTop()+40;$self.css({position:'absolute',top:topOffset+'px',marginTop:0})}else if($self.height()+80<$(window).height()){if(opts.centered){$self.css({position:'fixed',top:'50%',marginTop:($self.outerHeight()/2)*-1})}else{$self.css({position:'fixed'}).css(opts.modalCSS);}
if(opts.preventScroll){$('body').css('overflow','hidden');}}}});};$.fn.lightbox_me.defaults={appearEffect:"fadeIn",appearEase:"",overlaySpeed:250,lightboxSpeed:300,closeSelector:".close",closeClick:true,closeEsc:true,destroyOnClose:false,showOverlay:true,parentLightbox:false,preventScroll:false,onLoad:function(){},onClose:function(){},classPrefix:'lb',zIndex:999,centered:false,modalCSS:{top:'40px'},overlayCSS:{background:'black',opacity:.3}}})(jQuery);;window.Memorable={};Memorable.InputManager=(function(){var defaults={invalidInputName:/([A-Za-z0-9\-_]{28})/,cancelSelectors:'.cancel_edit_post, .cancel_form, input[value=Cancel]'};function InputManager(inputObj,options){this.options=$.extend({},defaults,options);this.inputObj=inputObj;this.$form=this.inputObj.getForm();this.inputObj.watchObj.on(this.inputObj.watchEvent,this.handleSave.bind(this));$(this.options.cancelSelectors,this.$form).on('click',this.handleCancel.bind(this));this.$form.on('replyRevealed',this.inputObj.refresh.bind(this.inputObj));this.restore();}
InputManager.prototype.getStorageKey=function(){var self=this;function isUsableName($el){var name=$el.attr('name');if(name&&!name.match(self.options.invalidInputName)){return true;}}
function getRelativeAction($f){var action=$f[0].action;var list=action.split('/');var relativeAction="/"+list.slice(3).join('/');return relativeAction;}
var key='';var $f=this.$form;var keySeparator='__';if($f.attr('action')){var relativeAction=getRelativeAction($f);key+=relativeAction;}
if(isUsableName(this.inputObj.$el)){key+=keySeparator+this.inputObj.$el.attr('name');}else if(this.inputObj.$el.attr('class')){var klass=this.inputObj.$el.attr('class');if($('.'+klass,$f).length==1){key+=keySeparator+klass;}else{throw "Element isn't memorable, it has no unique class";}}else{throw "Element isn't memorable, it has no identifiable traits";}
return key;};InputManager.prototype.getValue=function(){return this.inputObj.getValue();};InputManager.prototype.save=function(){localStorage[this.getStorageKey()]=this.getValue();};InputManager.prototype.handleSave=function(e){if(e.preventDefault){e.preventDefault();}
this.save();return false;};InputManager.prototype.handleCancel=function(e){Memorable.forget(this.getStorageKey());return true;};InputManager.prototype.storedValue=function(){return localStorage[this.getStorageKey()];};InputManager.prototype.restore=function(){if(!this.storedValue()){return;}
this.inputObj.setValue(this.storedValue());};return InputManager;})();Memorable.InputBasic=(function(){function InputBasic(obj){this.obj=$(obj);this.watchEvent='change';this.watchObj=this.obj;this.$el=this.obj;}
InputBasic.prototype.getValue=function(){return this.obj.val();};InputBasic.prototype.setValue=function(val){this.$el.val(val);};InputBasic.prototype.getForm=function(){return this.$el.parents('form').eq(0);};InputBasic.prototype.refresh=function(){return null;};return InputBasic;})();Memorable.InputMDE=(function(){function InputMDE(obj){this.obj=obj;this.watchEvent='change';this.watchObj=this.obj.codemirror;this.$el=$(this.obj.element);}
InputMDE.prototype.getValue=function(){return this.obj.value();};InputMDE.prototype.setValue=function(val){this.obj.value(val);};InputMDE.prototype.getForm=function(){return this.$el.parents('form').eq(0);};InputMDE.prototype.refresh=function(){this.watchObj.refresh();};return InputMDE;})();Memorable.inputFactory=function(obj){if(obj.codemirror){return Memorable.InputMDE;}else{return Memorable.InputBasic;}};Memorable.initialize=function(selector){var s=selector||'.memorable';$(s).each(function(){Memorable.add(this);});};Memorable.forget=function(key_prefix){key_prefix=key_prefix||$.cookie('memorable_forget');if(key_prefix){for(var i=localStorage.length-1;i>=0;i--){if(localStorage.key(i).indexOf(key_prefix)==0){localStorage.removeItem(localStorage.key(i));}}
$.removeCookie('memorable_forget',{path:'/',secure:top.location.protocol==='https:'?true:false});}};Memorable.add=function(obj){var cls=Memorable.inputFactory(obj);Memorable.items.push(new Memorable.InputManager(new cls(obj)));};Memorable.items=[];Memorable.forget();$(function(){Memorable.initialize();});;if(!window.SF){window.SF={};}
SF.Widgets=SF.Widgets||{};SF.SDChromePopover=function($popover){$popover.addClass('is-dropdown-submenu-parent opens-right');var trigger=$popover.find('a').first();var submenu=trigger.siblings('ul').first();submenu.addClass('submenu is-dropdown-submenu first-sub vertical');submenu.parent().addClass('is-dropdown-submenu-parent opens-right');trigger.on("mouseenter",function(){$popover.addClass('is-active');submenu.addClass('js-dropdown-active');});trigger.on("mouseleave",function(){trigger.parent().on("mouseleave",function(){$popover.removeClass('is-active');submenu.removeClass('js-dropdown-active');});});};jQuery(function($){var $updater=$('#updater-tooltip-sd').length?$('#updater-tooltip-sd'):$('#updater-tooltip');if($updater.length){if($updater.hasClass('fetch')){$.ajax({url:'/user/updates/find'+location.search,global:false,success:function(data){if(data.length){$updater.hide().html(data).show();if(SF.sandiego_chrome){SF.SDChromePopover($updater);}}}});}
else if(SF.sandiego_chrome){SF.SDChromePopover($updater);}}
var $account_tip=$('#account-tooltip');if($account_tip.length){if(SF.sandiego_chrome){SF.SDChromePopover($account_tip);}}
$(window).on('load',function(){SF.floatingNewsletter=new SF.FloatingNewsletterSubscribe();});$('.newsletter-subscribe-form').each(SF.wire_up_subscribe_form);SF.blockThis=new SF.BlockThis({positionSticky:true});SF.myProjects=new SF.MyProjects();});SF.FloatingNewsletterSubscribe=(function($){var _defaults={element:'#newsletter-floating',delay:5,cookieName:'suppressNewsletter',basementEl:'footer .l-nav-bottom',transition:'bottom 1s'};function FloatingNewsletterSubscribe(options){var _self=this;this.settings=$.extend(this.settings,_defaults,options);setTimeout(this.init.bind(this),this.settings.delay*1000);}
FloatingNewsletterSubscribe.prototype.init=function(){this.$el=$(this.settings.element);if(!this.$el.length){return;}
this.height=this.$el.outerHeight();this.$el.css('bottom',this.height*(-1));this.suppressCookie=$.cookie(this.settings.cookieName);this.isHidden=true;this.$basementEl=$(this.settings.basementEl);this.basementHeight=this.$basementEl.height();this.boundScrollDelegate=this.scrollRelocate.bind(this);if(this.$el&&!this.suppressCookie){window.addEventListener('scroll',this.boundScrollDelegate,isPassiveEventListenerSupported()?{passive:true}:false);this.show();$('.btn-closer',this.$el).on("click",this.hide.bind(this));}};FloatingNewsletterSubscribe.prototype.scrollRelocate=function(){if(!this.isHidden){this.$el.css('transition','none');this.$el.css('bottom',this.calcBottom());}};FloatingNewsletterSubscribe.prototype.calcBottom=function(){var windowHeight="innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight;var windowScrollTop=$(window).scrollTop();var scrollBottomLocation=windowHeight+windowScrollTop;var basement=this.$basementEl.offset().top;if(scrollBottomLocation<basement){return 0;}else{return scrollBottomLocation-basement;}};FloatingNewsletterSubscribe.prototype.show=function(){this.$el.css('transition',this.settings.transition);this.$el.css('bottom',this.calcBottom());this.isHidden=false;};FloatingNewsletterSubscribe.prototype.hide=function(){this.$el.css('transition',this.settings.transition);this.$el.css('bottom',this.height*(-1));this.suppress();this.isHidden=true;};FloatingNewsletterSubscribe.prototype.suppress=function(){$.cookie(this.settings.cookieName,true,{expires:365,path:'/',secure:true});return true;};return FloatingNewsletterSubscribe;})(jQuery);function getIndicesOf(searchStr,str,caseSensitive){var startIndex=0,searchStrLen=searchStr.length;var index,indices=[];if(!caseSensitive){str=str.toLowerCase();searchStr=searchStr.toLowerCase();}
while((index=str.indexOf(searchStr,startIndex))>-1){indices.push(index);startIndex=index+searchStrLen;}
return indices;}
SF.BlockThis=(function($){var _defaults={element:'#overlay-blockthis-wrapper',btnActivateSelector:'.btn-blockthis',btnCloseSelector:'#btn-blockthis-close',inputGptInfoSelector:'#gpt-info',positionSticky:false};function BlockThis(options){var _self=this;this.settings=$.extend(this.settings,_defaults,options);function handleActivate(e){var $t=$(e.target),$p=$t.parents('.draper'),ad_unit=$p.attr('id').replace('_wrapped',''),ad_id=$p.attr('data-id');_self.$element.show();_self.dropzone=enableDropzone();if(!_self.settings.positionSticky){repositionOverlay();$(window).resize(repositionOverlay);}
_self.capture(ad_unit,ad_id);return false;}
function handleSubmit(e){return _self.submit();}
function handleClose(e){_self.close();return false;}
function enableDropzone(){if(_self.dropzone){_self.dropzone.enable();return _self.dropzone;}
var myDropzone=new Dropzone('#blockthisForm',{paramName:'screenshot',autoProcessQueue:false,maxFiles:1,maxFilesize:2,clickable:'#upload-it',thumbnailWidth:null,thumbnailHeight:35,acceptedFiles:'image/*,.png,.jpg,.jpeg,.gif',addRemoveLinks:true,renameFilename:function(name){var parts=name.split('.'),ext=parts[parts.length-1];return 'screenshot.'+ext;},previewsContainer:$('.dropzone-previews')[0],previewTemplate:document.getElementById('dropzone-preview-template').innerHTML,dictMaxFilesExceeded:'You may only upload 1 screenshot.',dictFallbackText:'Screenshot (required):',init:function(){this.on('success',function(){$('#messages').notify({message:'Report submitted successfully.  Thanks!',status:'success'});$('#btn-blockthis-close').trigger('click');});this.on('error',function(file,errorMessage,xhr){var message=errorMessage.error||errorMessage;$('#messages').notify({message:message,status:'error'});this.removeAllFiles(true);$('#btn-blockthis-submit').attr('disabled',false).attr('value','Submit Report');});this.on("addedfile",function(file){$('#upload-it').hide();$('.dropzone-previews').show();_self.$form.trigger('dragster:leave');});this.on("removedfile",function(file){$('#upload-it').show();$('.dropzone-previews').hide();});},});var dragster=new Dragster(_self.$form[0]);_self.$form.on('dragster:enter',function(){_self.$form.addClass('dragging-active');});_self.$form.on('dragster:leave',function(){_self.$form.removeClass('dragging-active');});return myDropzone;}
function repositionOverlay(e){var footerHeight=_self.$element.outerHeight();var footerTop=($(window).height()-footerHeight)+"px";_self.$element.css({top:footerTop});}
(function init(){this.$element=$(this.settings.element);if(!this.$element.length){return false;}
this.$btnClose=$(this.settings.btnCloseSelector);this.$gptInfo=$(this.settings.inputGptInfoSelector);this.$form=$('form',this.$element);$('body').on('click',this.settings.btnActivateSelector,handleActivate);this.$form.on("submit",handleSubmit);this.$btnClose.on("click",handleClose);}).apply(this);}
BlockThis.prototype.getSanitizeAdInfo=function(ad_unit,ad_id){var ad=null,ad_info={};for(var x=0;x<SF.Ads.renderedAds.length;x++){ad=SF.Ads.renderedAds[x];if(ad.slot.getAdUnitPath().indexOf(ad_unit)!==-1){break;}}
if(!ad){return null;}
ad_info.contentUrl=ad.slot.getContentUrl();var render_data=SF.Ads.Helpers.getAdRenderData(ad);if(render_data){ad_info.position=ad_unit;ad_info.third_party=render_data._is_3pas_;ad_info.adsense_for_content=render_data._is_afc_;ad_info.height=render_data._height_;ad_info.width=render_data._width_;ad_info.expandable=render_data._expandable_;ad_info.html=render_data._html_;var prebid_winner=window.bizxPrebid&&bizxPrebid.Ads.prebidWinners&&bizxPrebid.Ads.prebidWinners[ad_id];if(prebid_winner){ad_info.ad_network=prebid_winner.bidder;if(prebid_winner.ad){ad_info.html=prebid_winner.ad;}else if(prebid_winner.adUrl){ad_info.html='';}else{if(window.console&&window.console.log){window.console.log('No ad attributes on prebid response',prebid_winner);}
ad_info.html='';}}
ad_info.click_urls=[];var $html=$(ad_info.html);var $links=$.merge($html.find('a'),$html.filter('a'));$links.each(function(i,obj){var querystring=obj.search.replace(/^\?/,'').split('&'),queryparams={},split;for(i=0;i<querystring.length;i++){split=querystring[i].split('=');queryparams[split[0]]=split[1];}
if(queryparams.adurl){ad_info.click_urls.push(queryparams.adurl);}});ad_info.adurl_strings=[];var adurl_idxs=getIndicesOf('adurl',render_data._html_);var i;for(i=0;i<adurl_idxs.length;i++){ad_info.adurl_strings.push(render_data._html_.substr(adurl_idxs[i],200));}
ad_info.destination_strings=[];var destination_idxs=getIndicesOf('destinationUrl',render_data._html_);for(i=0;i<destination_idxs.length;i++){ad_info.destination_strings.push(render_data._html_.substr(destination_idxs[i],200));}
ad_info.imgs=[];var noscript_text=$.merge($html.find('noscript'),$html.filter('noscript')).html();var $noscript;try{$noscript=$(noscript_text);}catch(err){noscript_text=$('<div/>').html(noscript_text).text();$noscript=$(noscript_text);}
if(!$noscript.length){var noscript_match=render_data._html_.match(/<NOSCRIPT>([\s\S]+)<\/NOSCRIPT>/i);if(noscript_match){$noscript=$(noscript_match[1]);}}
var $imgs=$.merge($html.find('img'),$.merge($html.filter('img'),$.merge($noscript.find('img'),$noscript.filter('img'))));$imgs.each(function(i,obj){var src=$(obj).attr('src');if(src&&src.indexOf('google.com/ads/measurement')===-1&&src.indexOf('/branding/googlelogo/')===-1&&src.indexOf('/adchoices/img/')===-1&&!(obj.height===1&&obj.width===1)){ad_info.imgs.push(src);}});var sadbundle_match=render_data._html_.match(/https:\/\/tpc\.googlesyndication\.com\/sadbundle\/[0-9]+\//);if(sadbundle_match){ad_info.imgs.push(sadbundle_match[0]+'backup.jpg');}
var backup_match=render_data._html_.match(/http.*backup\.[a-z]{3,4}/);if(backup_match){ad_info.imgs.push(backup_match[0]);}
ad_info.text='';$html.filter('#adunit').find(':not(:has(*))').not('script').not('style').each(function(i,obj){var $elem=$(obj);if($elem.text()){ad_info.text+=$elem.text()+'\n';}});}
if(window.console&&window.console.log){window.console.log('Ad info is:',ad_info);}
return ad_info;};BlockThis.prototype.persistCapturedInfo=function(){this.$gptInfo.val(JSON.stringify(this.capturedAdInfo));};BlockThis.prototype.capture=function(ad_unit,ad_id){if(!SF.Ads.renderedAds){throw "Attempted to capture ad info, but feature is not enabled";}
this.capturedAdInfo=this.getSanitizeAdInfo(ad_unit,ad_id);this.persistCapturedInfo();return this.capturedAdInfo;};BlockThis.prototype.submit=function(){var form=this.$form[0];if(form&&form.checkValidity&&!form.checkValidity()){return true;}
if(this.dropzone.getQueuedFiles&&!this.dropzone.getQueuedFiles().length){$('#messages').notify({message:'You must provide a screenshot file.',status:'error'});return false;}
$('input[type=submit]',this.$form).attr('disabled',true).attr('value','Submitting...');if(this.dropzone.processQueue){this.dropzone.processQueue();return false;}else{return true;}};BlockThis.prototype.close=function(){this.$element.hide();this.dropzone.removeAllFiles(true);this.dropzone.disable();$('#btn-blockthis-submit').attr('disabled',false).attr('value','Submit Report');this.$form.find('input').each(function(i,elem){if(elem.name!=="_visit_cookie"&&elem.name!=="timestamp"&&elem.name!=="spinner"&&elem.name!==""){$(elem).val('');}});return false;};return BlockThis;}(window.jQuery));SF.MyProjects=(function($){function MyProjects(){this.init();}
MyProjects.prototype.init=function(){if(!$('#account-tooltip').length){return;}
this.loaded=false;this.$logout_li=$('.tooltip-container .account b[title="Log Out"]').parents('li:first');this.pending();$(window).on('load',this.load.bind(this));$('#account-tooltip').on("click",this.load.bind(this));};MyProjects.prototype.pending=function(){this.$logout_li.before('<li class="projects-loading">loading your projects...</li>');};MyProjects.prototype.load=function(){if(this.loaded){return;}
this.loaded=true;var user_profile_url=$('div#account-tooltip').length?$('#account-tooltip > a').attr('href'):$('#account-tooltip > li > a').attr('href');var rest_api_url='/rest'+user_profile_url;$.ajax({url:rest_api_url,context:this,global:false,success:function(data){$('.projects-loading').remove();var my_projects_html=[];for(var i=0;i<data.projects.length;i++){var proj=data.projects[i];var escaped_proj_name=$('<i></i>').text(proj.name).html();my_projects_html.push('<li><a href="'+proj.url+'">'+escaped_proj_name+'</a></li>');}
this.$logout_li.before(my_projects_html.join(''));},error:function(){this.loaded=false;}});};return MyProjects;})(jQuery);SF.captchaSuccessCallbacks={};SF.doRecaptcha=function(event,$recap_elem,success_callback){if($recap_elem.length===0){if(window.console&&window.console.log){window.console.log('No recaptcha element found');}
success_callback();return;}
var gcaptcha_id=$recap_elem.data('sf-recaptcha-id');if(gcaptcha_id===undefined){window.alert('reCAPTCHA did not get loaded.');}else{event.preventDefault();event.stopPropagation();event.stopImmediatePropagation();grecaptcha.reset(gcaptcha_id);SF.captchaSuccessCallbacks[gcaptcha_id]=success_callback;grecaptcha.execute(gcaptcha_id);}};function recaptchaLoad(){if(!SF.recaptchaInUse){return;}
if(!window.grecaptcha){bizx.cmp.embedScript('https://www.recaptcha.net/recaptcha/api.js?onload=recaptchaConfigure&render=explicit');}else{recaptchaConfigure();}}
function recaptchaConfigure(){if(!window.grecaptcha){return;}
$('.g-recaptcha').each(function(){var $recap_elem=$(this);if(!$recap_elem.parent().is(':visible')){return;}
if($recap_elem.data('sf-recaptcha-id')!==undefined){return;}
var gcaptcha_id=grecaptcha.render(this,{'callback':function(token){gcaptcha_id=$recap_elem.data('sf-recaptcha-id');SF.captchaSuccessCallbacks[gcaptcha_id]();},},true);$recap_elem.data('sf-recaptcha-id',gcaptcha_id);if($recap_elem.data('run-automatically')!==undefined){var $form=$recap_elem.parents('form');$form.on('submit.checkCaptcha',function(e){SF.doRecaptcha(e,$recap_elem,function(){$form.off('submit.checkCaptcha');$form.submit();});});}});}
$(function(){$('.g-recaptcha').each(function(){var $form=$(this).parents('form');$form.one('click mouseover',recaptchaLoad);$form.find(':input').one('focus',recaptchaLoad);});});function openSaveFileDialog(data,filename,mimetype){if(!data){return;}
var blob=data.constructor!==Blob?new Blob([data],{type:mimetype||'application/octet-stream'}):data;if(navigator.msSaveBlob){navigator.msSaveBlob(blob,filename);return;}
var lnk=document.createElement('a'),url=window.URL,objectURL;if(mimetype){lnk.type=mimetype;}
lnk.download=filename||'untitled';lnk.href=objectURL=url.createObjectURL(blob);lnk.dispatchEvent(new MouseEvent('click'));setTimeout(url.revokeObjectURL.bind(url,objectURL));}
function saveCSV(data,name){data[0].push('Downloaded '+(new Date()).toLocaleString()+' from https://sourceforge.net');var csv=CSV.arrayToCsv(data);var csv_win=csv.replace(/\n/g,'\r\n');openSaveFileDialog(csv_win,name+".csv","text/csv");};if(!Function.prototype.bind){Function.prototype.bind=function(oThis){if(typeof this!=='function'){throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');}
var aArgs=Array.prototype.slice.call(arguments,1),fToBind=this,fNOP=function(){},fBound=function(){return fToBind.apply(this instanceof fNOP?this:oThis,aArgs.concat(Array.prototype.slice.call(arguments)));};if(this.prototype){fNOP.prototype=this.prototype;}
fBound.prototype=new fNOP();return fBound;};}
function isPassiveEventListenerSupported(){var isSupported=false;try{var options=Object.defineProperty({},"passive",{get:function(){isSupported=true;}});window.addEventListener("",null,options);}catch(ex){}
return isSupported;}
SF.FancyStickify=(function(){var defaults={};function FancyStickify($els,options){if(!$els||$els.length===0||!$('body.sandiego, body.sandiego_chrome').length){return;}
this.o=$.extend({},defaults,options);this.$els=$els;this.$header=this.$els.filter('.l-header-nav');this.$viewabilityRequirementAd=$('.draper',this.$header);this.viewabilityReached=false;}
FancyStickify.prototype.init=function(){if(!this.$els){return;}
this.$window=$(window);this.sticky_$elems_limits=[];var self=this;this.$els.each(function(){self.recordStickyElem($(this));});if(this.o.waitForGoneEls){this.waitForGoneEls=$(this.o.waitForGoneEls);this.paidSticky=$('.l-header-nav-paid-sticky, .l-header-nav-unpaid-sticky');this.paidStickyOn=false;if($('.m-popular-projects').length){this.$unpaidCards=$('.project-masthead .m-popular-projects');this.$unpaidCardStuckContainer=$('.l-row-cards');this.$unpaidCardsUnstuckContainer=$('.projects-inner');this.$unpaidCards.clone().appendTo(this.$unpaidCardStuckContainer);}}
var boundHandler=this.checkSticky.bind(this);window.addEventListener('load',boundHandler);window.addEventListener('scroll',boundHandler,isPassiveEventListenerSupported()?{passive:true}:false);window.addEventListener('resize',boundHandler);this.checkSticky();this._scrollCount=0;this._scrollWatcherBound=this.scrollWatcherForHeader.bind(this);window.addEventListener('scroll',this._scrollWatcherBound,isPassiveEventListenerSupported()?{passive:true}:false);this.checkViewabilityReached();};FancyStickify.prototype.recordStickyElem=function($elem){var top_limit=parseInt($elem.css('top'),10);this.sticky_$elems_limits.push([$elem,top_limit]);};FancyStickify.prototype.triggerPaidSticky=function(){if(!this.paidSticky.length){return;}
var el=this.waitForGoneEls.get(0);var n=window.getComputedStyle(el).marginBottom;n=Number(n.replace('px',''));var stickyHeight=this.paidSticky.get(0).clientHeight;var manualAdjust=10;var staticButtonsPosition=el.offsetTop+el.clientHeight+stickyHeight+n;var windowScroll=window.scrollY+stickyHeight+manualAdjust;var doShow=windowScroll>staticButtonsPosition;if(!this.paidStickyOn&&doShow){this.paidSticky.show();this.paidStickyOn=true;}else if(this.paidStickyOn&&!doShow){this.paidSticky.hide();this.paidStickyOn=false;}};FancyStickify.prototype.checkSticky=function(){var scrollTop=this.$window.scrollTop();for(var i=0;i<this.sticky_$elems_limits.length;i++){var $elem=this.sticky_$elems_limits[i][0];var top_limit=this.sticky_$elems_limits[i][1];if($elem.offset().top-scrollTop<=top_limit){if(!$elem.hasClass('stuck')){$elem.addClass('stuck');}}else{$elem.removeClass('stuck');if($elem.is(this.$header)&&this.viewabilityReached){this.unstickLeaderAd();}}}
this.triggerPaidSticky();};FancyStickify.prototype.checkViewabilityReached=function(){if(this.$viewabilityRequirementAd.hasClass('viewableImpression')||this.$viewabilityRequirementAd.hasClass('blank')){this.reachedViewability(this.$viewabilityRequirementAd);}};FancyStickify.prototype.reachedViewability=function($ad){if($ad.is(this.$viewabilityRequirementAd)){this.viewabilityReached=true;if(!this.$header.hasClass('stuck')){this.unstickLeaderAd();}}};FancyStickify.prototype.scrollWatcherForHeader=function(e){this._scrollCount++;if(this.viewabilityReached&&this._scrollCount>2){this.unstickLeaderAd();}};FancyStickify.prototype.unstickLeaderAd=function(){if(!this.unstuckLeaderAlready){var $headNav=$('.l-header-nav');$headNav.css('position','static');$headNav.removeClass('sticky');var $headNavRowKeep=$('.l-header-nav-bottom:visible, .l-header-nav-top.hide-for-large:visible');$headNavRowKeep.insertBefore(this.$header);$headNavRowKeep.addClass('sticky');if(SF.Ads.scrollFixable){SF.Ads.scrollFixable.scrollRelocate();}
$headNav.removeClass('stuck');for(var i=0;i<this.sticky_$elems_limits.length;i++){var $elem=this.sticky_$elems_limits[i][0];if($elem.is($headNav)){this.sticky_$elems_limits.splice(i,1);break;}}
this.recordStickyElem($headNavRowKeep);window.removeEventListener('scroll',this._scrollWatcherBound,isPassiveEventListenerSupported()?{passive:true}:false);this.unstuckLeaderAlready=true;}};return FancyStickify;})();SF.ScrollFixable=(function(){var defaults={avoidElement:'#banner-sterling .sticky',adjustHorizontal:true,maintainParentWidth:true,watchAvoidStickiness:true,enforceFloor:true,};function ScrollFixable($el,options){if(!$el||$el.length===0){return;}
this.o=$.extend({},defaults,options);this.$el=$el;this.$parent=$el.parent();this.$avoid=$(this.o.avoidElement);this.leftPositionContext=window.innerWidth;this.originalTop=null;this.enabled=true;this.freezePoint=null;this.is_pinned=false;this.floorCompensate=this.$el.attr('data-floor-compensate')||0;this.boundScrollDelegate=this.scrollRelocate.bind(this);this.init();this.scrollRelocate();}
ScrollFixable.prototype.avoidHeight=function(){var outerHeight=0;this.$avoid.filter(':visible').each(function(){outerHeight+=$(this).outerHeight();});return outerHeight;};ScrollFixable.prototype.stuckHeight=function(){var outerHeight=0;$('.stuck').each(function(){outerHeight+=$(this).outerHeight();});return outerHeight;};ScrollFixable.prototype.baseTop=function(){var result=0;var watchAvoidStickiness=this.o.watchAvoidStickiness;this.$avoid.filter(':visible').each(function(){var $t=$(this);if(watchAvoidStickiness&&!$t.hasClass('stick')&&!$t.hasClass('stuck')){return result;}
result+=$t.outerHeight();});return result;};ScrollFixable.prototype.disabling=function(){return this.freezePoint!==null;};ScrollFixable.prototype.parentHeight=function(){this._nav=this._nav||this.$el.siblings('nav');function calc(){var result=this.$parent.height();if(this._nav){result+=(this._nav.outerHeight(true)*2);}
return result;}
return calc.apply(this);};ScrollFixable.prototype.enforceFloor=function(baseTop){if(this.enabled&&this.o.enforceFloor){var limitHeight;limitHeight=this.parentHeight()+this.$el.parent().offset().top-this.$el.offset().top;this.$el.height(limitHeight+parseInt(this.floorCompensate));}};ScrollFixable.prototype.scrollRelocate=function(){if(!this.enabled){return;}
this.recalculateTop();var windowScrollTop=$(window).scrollTop();var baseTop=this.baseTop();if(this.disabling()){if(windowScrollTop>this.freezePoint){var newTop=windowScrollTop-this.freezePoint;var adjustedNewTop=-newTop+baseTop;this.$el.css('top',adjustedNewTop);}
else{if(windowScrollTop<=this.originalTop-baseTop){this.disable();}else{this.$el.css('top',baseTop);this.freezePoint=windowScrollTop;}}
this.enforceFloor(baseTop);return;}
this.checkViewabilityRequirement();this.nativeTop=this.$el.offset().top;this.scrollPositionY=windowScrollTop;if(this.pinnable(baseTop)){if(!this.is_pinned&&this.enabled){if(this.o.adjustHorizontal){this.leftPosition=this.$el.offset().left;this.horizontalRelocate();}
this.$el.addClass('scroll-fixable-enabled');this.$el.css('top',baseTop);}
this.is_pinned=true;}else{this.$el.removeClass('scroll-fixable-enabled');this.is_pinned=false;}
if(this.is_pinned){this.enforceFloor(baseTop);this.$el.css('top',baseTop);}};ScrollFixable.prototype.pinnable=function(baseTop){if(this.scrollPositionY>=this.nativeTop-baseTop&&this.scrollPositionY>=this.originalTop-baseTop){return true;}else{return false;}};ScrollFixable.prototype.recalculateTop=function(){this.originalTop=this.$parent.offset().top;};ScrollFixable.prototype.horizontalRelocate=function(newLeft){if(this.o.maintainParentWidth){var parentInnerWidth=this.$el.parent().innerWidth();this.$el.css('left',this.$el.parent().offset().left+this.horizontalMarginOffset);this.$el.width(parentInnerWidth-this.horizontalOffset-40);}else{if(this.o.adjustHorizontal){this.$el.css('left',newLeft||this.leftPosition);}}};ScrollFixable.prototype.calculateHorizontalPosition=function(){var delta=this.leftPositionContext-window.innerWidth;this.leftPosition=this.leftPosition-(delta/2);this.leftPositionContext=window.innerWidth;this.horizontalRelocate();};ScrollFixable.prototype.disableGracefully=function($el){this.freezePoint=$(window).scrollTop();this.scrollRelocate();};ScrollFixable.prototype.disable=function(){this.enabled=false;this.$el.removeClass('scroll-fixable-enabled');this.is_pinned=false;$(window).off('scroll',this.boundScrollDelegate);$('body').off('widthChanged');this.$el.removeAttr('style');};ScrollFixable.prototype.checkViewabilityRequirement=function(){if(this.enabled&&!this.disabling()&&(this.viewabilityRequirementAd.hasClass('viewableImpression')||this.viewabilityRequirementAd.hasClass('blank'))){this.disableGracefully();}};ScrollFixable.prototype.init=function($el){SF.Breakpoints=SF.Breakpoints||{small:0,medium:640,leaderboard:743,billboard:985,large:1053,xlarge:1295,xxlarge:1366};window.addEventListener('scroll',this.boundScrollDelegate,isPassiveEventListenerSupported()?{passive:true}:false);if(this.o.adjustHorizontal){$('body').on('widthChanged',this.calculateHorizontalPosition.bind(this));}
this.viewabilityRequirementAd=$('.draper',this.$el).eq(0);if(!SF.viewportWidth){SF.viewportWidth=window.innerWidth;var self=this;window.addEventListener('resize',function(event){if(SF.viewportWidth===event.target.innerWidth){return;}else{SF.viewportWidth=event.target.innerWidth;if(SF.viewportWidth<SF.Breakpoints.large){self.disable();}
$('body').trigger('widthChanged');}});}
if(this.o.maintainParentWidth){this.horizontalPaddingOffset=Number(this.$el.css('padding-left').replace('px',''));this.horizontalMarginOffset=Number(this.$el.css('margin-left').replace('px',''));this.horizontalBorderOffset=Number(this.$el.css('border-left-width').replace('px',''));this.horizontalOffset=this.horizontalPaddingOffset+this.horizontalMarginOffset+this.horizontalBorderOffset;}};return ScrollFixable;})();;function initFancyStickify(){$(function(){SF.Ads.fancyStickify=new SF.FancyStickify($('.sticky'),{waitForGoneEls:'.project-masthead .buttons, .popular-cards .projects-inner '});SF.Ads.fancyStickify.init();if(SF.Ads.acceptable_ads_active){SF.Ads.fancyStickify.unstickLeaderAd();}});}
bizx.cmp.ifConsent('',['all','google-ads'],function(){initFancyStickify();});document.addEventListener("touchstart",function(){},false);$('.search-toggle').on("click",function(){$('.search').toggleClass('sticky-search-open');$('.search-toggle-when-stuck').toggleClass('sticky-search-open');$('.search input').trigger("focus");});$('select.use-placeholder-color').on('change',function(){$(this).toggleClass('first-option-selected',this.value==='');}).trigger('change');function escape_html(str){return $('<i></i>').text(str).html();}
$(function(){var fixed_suggestions_endpoint='directory_fixed_suggestions'+(SF.variant==='sd'?'_slash':'');var categories_url=SF.cdn+'/app/'+fixed_suggestions_endpoint+'/?v2&'+(new Date()).toISOString().slice(0,10);var $typeaheads=$('.typeahead__container input[name=q]');if(!$typeaheads.length){return;}
var cached_bus_cats=localStorage.getItem("TYPEAHEAD_input:Business Categories");if(cached_bus_cats){var bad_cache=false;try{if(JSON.parse(cached_bus_cats).data.length<10){bad_cache=true;}}catch(e){bad_cache=true;}
if(bad_cache){localStorage.removeItem("TYPEAHEAD_input:Business Categories");localStorage.removeItem("TYPEAHEAD_input:Open Source Categories");}}
function addFullSearchLink($resultHtmlList,group,query,search_url,text){var $last_result=$('.typeahead__group-'+group+':last',$resultHtmlList);var link=search_url+query;var $html=$('<li>',{'class':"typeahead__item full-search-row"}).append($('<a>',{href:link}).append($('<span>',{'class':'typeahead__display'}).text(text))).append($('<a>',{href:link}).append('<svg data-name="search" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"></path></svg></label>'));if($last_result.text().indexOf('full-search-placeholder')>=0){$last_result.replaceWith($html);}else{$last_result.after($html);}}
function forceInResults(q,r,$resultHtmlList){var cont=true;var idx=0;var forcedMatches={'captcha':{slug:'MTCaptcha',name:'MTCaptcha',icon_url:'https://a.fsdn.com/allura/s/mtcaptcha/icon?6a65976aae81e674c6386f85c67bee68ca4ca5c72de8e367529f437149b33d80?&w=180'},'dmarc':{slug:'EasyDMARC',name:'EasyDMARC',icon_url:'https://a.fsdn.com/allura/s/easydmarc/icon?d8cdea5566b3224406d2fd22c2184173772b5d90fe04572ec3932a1ae328844a?&w=90'},};var match=forcedMatches[q.toLowerCase()];if(!match){return;}
var lis=$resultHtmlList.find('li');while(cont){var group=lis.eq(idx).text();if(idx>=lis.length||(group&&group.indexOf('Business Software')===0)){cont=false;}
idx++;}
var welded=templateWithIcon.replace('{{icon_url}}',match.icon_url).replace('{{name}}',match.name);var fullLink=$('<li>',{'class':'typeahead__item typeahead__group-business-software-services'}).append($('<a>',{href:'/software/product/'+match.slug}).append(welded));$resultHtmlList.find("li:nth-child("+(idx)+")").after(fullLink);}
var templateProject='<div class="summary-tile"><div class="autocomplete-sf-icon"></div>{{name}}<br> <div class="m-stars"></div></div>';var templateWithIcon='<div class="summary-tile"><img src="{{icon_url}}">{{name}}<br> <div class="m-stars"></div></div>';var templateBuilderFn=function(item,item_data){return item_data.icon_url?templateWithIcon:templateProject;};$typeaheads.each(function(){var $typeahead=$(this);$typeahead.on('input',function(ev){$typeahead.data('q',ev.target.value);});var config={ttl:24*60*60*1000,group:true,maxItem:0,mustSelectItem:$typeahead.data('prevent-submit')?true:false,maxItemPerGroup:4,cancelButton:false,emptyTemplate:"<p><p>No quick results found.<p>Press ENTER to do a full search.",href:"{{url}}",callback:{onLayoutBuiltBefore:function(node,query,result,$resultHtmlList){addFullSearchLink($resultHtmlList,'open-source-projects',query,'/directory/?q=','Search Open Source for "'+query+'" ...');addFullSearchLink($resultHtmlList,'business-software-services',query,'/software/?q=','Search Business Software & Services for "'+query+'" ...');addFullSearchLink($resultHtmlList,'games',query,'/software/games/?q=','Search Games for "'+query+'" ...');forceInResults(query,result,$resultHtmlList);return $resultHtmlList;},onPopulateSource:function(node,data,group,path){if(path==='response.docs'){for(var i=0;i<data.length;i++){data[i].name=escape_html(data[i].name);}}
return data;},onClickBefore:function($typeahead,a,item,event){var q=$typeahead.data('q');$typeahead.trigger('typeahead-item-clicked',[$typeahead,q,item]);},onHideLayout:function($typeahead,a,item,event){$('.search-results-backdrop').removeClass('active');},onShowLayout:function($typeahead,a,item,event){if($typeahead.data('scroll-to')){var top=$typeahead.offset().top;if($('.sandiego.sticky').length){top-=$('.sandiego.sticky').outerHeight();}
$('html').scrollTop(top);}
$('.search-results-backdrop').addClass('active');if($('.typeahead-arrow-hint').length){$('.typeahead-arrow-hint').remove();}
var html='<svg class="svgico typeahead-arrow-hint"><use xlink:href="#download"></use></svg>';$('.typeahead__item.full-search-row').each(function(){var $arrow=$(html);$(this).prepend($arrow);});}},};var $container=$typeahead.closest('.typeahead__container');var sources_groups={'Open Source Categories':{dynamic:false,cache:true,ajax:{url:categories_url,path:"opensource_categories",},},'Open Source Projects':{dynamic:true,cache:false,filter:false,ajax:{url:'/proxy-api/search/suggest-project?q={{query}}',path:"response.docs",},data:[{name:'full-search-placeholder'}],href:"{{project_url}}",display:['name'],template:templateBuilderFn},'Business Categories':{dynamic:false,cache:true,ajax:{url:categories_url,path:"commercial_categories",},filter:function(item,displayKey){if((new RegExp(this.rawQuery,'i')).test(displayKey)){return true;}else if(this.rawQuery.indexOf(' ')>0&&new RegExp(this.rawQuery.replace(' ','-'),'i').test(displayKey)){return true;}}},'Business Software & Services':{dynamic:true,cache:false,filter:false,ajax:{url:'/proxy-api/search/suggest-commercial?q={{query}}'+($container.data('commercial-hidden')?'&hidden=true':''),path:"response.docs",},data:[{name:'full-search-placeholder'}],href:"{{project_url}}",display:['name'],template:templateBuilderFn},'Game Categories':{dynamic:false,cache:true,ajax:{url:categories_url,path:"commercial_games_categories",}},'Games':{dynamic:true,cache:false,filter:false,ajax:{url:'/proxy-api/search/suggest-comm-games?q={{query}}'+($container.data('commercial-hidden')?'&hidden=true':''),path:"response.docs",},data:[{name:'full-search-placeholder'}],href:"{{project_url}}",display:['name'],},};var sources_groups_keys=Object.keys(sources_groups);$typeahead.data('groups',sources_groups_keys);if($('body').hasClass('v-sd')||$container.data('commercial-only')){delete sources_groups['Open Source Categories'];delete sources_groups['Open Source Projects'];delete sources_groups['Game Categories'];delete sources_groups['Games'];}else if($container.data('oss-only')){delete sources_groups['Business Categories'];delete sources_groups['Business Software & Services'];delete sources_groups['Game Categories'];delete sources_groups['Games'];}else if($container.data('games-only')){delete sources_groups['Open Source Categories'];delete sources_groups['Open Source Projects'];delete sources_groups['Business Categories'];delete sources_groups['Business Software & Services'];}
config.source=sources_groups;if($container.data('commercial-only')){config.groupOrder=['Business Categories','Business Software & Services'];}else if($container.data('oss-only')){config.groupOrder=['Open Source Categories','Open Source Projects'];}else if($container.data('games-only')){config.groupOrder=['Game Categories','Games'];}else if($container.data('commercial-default')){config.groupOrder=['Business Categories','Business Software & Services','Open Source Categories','Open Source Projects'];}else{config.groupOrder=['Open Source Categories','Open Source Projects','Business Categories','Business Software & Services'];}
$typeahead.typeahead(config);});});var $stickyHeader=$('.l-header-nav.sticky');if($stickyHeader.length){SF._scroll_listener_for_hash=function(e){document.removeEventListener('scroll',SF._scroll_listener_for_hash);if(SF.anchorOffsetActive){$(window).trigger('hashchange');}};document.addEventListener('scroll',SF._scroll_listener_for_hash);(function(document,history,location){var HISTORY_SUPPORT=!!(history&&history.pushState);var anchorScrolls={ANCHOR_REGEX:/^#(?!md_)[^ ]+$/,init:function(){this.scrollToCurrent();$(window).on('hashchange',$.proxy(this,'scrollToCurrent'));$('body').on('click','a',$.proxy(this,'delegateAnchors'));},getFixedOffset:function(){return $stickyHeader.height();},scrollIfAnchor:function(href,pushToHistory){var match,anchorOffset;if(!this.ANCHOR_REGEX.test(href)){return false;}
var target=href.slice(1);match=document.getElementById(target)||document.getElementsByName(target)[0];if(match){anchorOffset=$(match).offset().top-this.getFixedOffset();SF.anchorOffsetActive=true;$('html, body').scrollTop(anchorOffset);if(HISTORY_SUPPORT&&pushToHistory){history.pushState({},document.title,location.pathname+href);}}
return!!match;},scrollToCurrent:function(e){if(this.scrollIfAnchor(window.location.hash)&&e){e.preventDefault();}},delegateAnchors:function(e){var elem=e.target;if(this.scrollIfAnchor(elem.getAttribute('href'),true)){e.preventDefault();}}};$(document).ready($.proxy(anchorScrolls,'init'));})(window.document,window.history,window.location);}
$('[data-href]').each(function(i,el){var $el=$(el);if($el.prop('tagName')==='A'){el.setAttribute('href',el.getAttribute('data-href'));}else{$(el).on('click',function(){if($(this).data('target')&&$(this).data('newtab')){Object.assign(document.createElement('a'),{target:$(this).data('target'),href:$(this).data('href'),}).click();}else{top.location=$(this).data('href');}});}});if($('.js-required').length){$('.js-required').hide();}
$('#github-link').on('click',function(e){window._paq.push(['trackEvent','Nav Menu','GitHub Sync Tool']);});$('#privacy-choices').on('click',function(e){e.preventDefault();bizx.cmp.promptConsent();});;$(function(){$('#share-project-button').on("click",function(e){e.preventDefault();$(this).remove();$('.social-sharing-buttons').removeClass('hide');$('.social-sharing-buttons').removeClass('invisible');});$('.social-sharing-buttons a').on('click',function(e){e.preventDefault();var url=this.href;var height=this.className==='google'?520:444,width=this.className==='google'?390:680;window.open(url,'sourceforge_social_share','resizeable, height='+height+',width='+width);});var modLink=function(){$(this).attr('target','_blank');$(this).addClass('ext-link');$(this).append('<span class="sf-linkout-icon">'+SF.linkout_icon+'</span>');};$('a[data-external], #top_nav a[rel*=nofollow], .features a, a#homepage, .description a').not('[href^="/"]').not('[href^="#"]').not('[href^="."]').not('[href*="sourceforge.net"]').not('[href*=".sourceforge.io"]').not('[href*="sb.sf.net"]').not('[href*="xb.sf.net"]').not('[href*="slashdot.org"]').each(modLink);$('.get-updates.button').on("click",function(e){e.preventDefault();});var getUrlHash=function(){var el_id='#'+window.location.hash.replace(/[^\w-]/g,"");var location_hash;try{location_hash=$(window.document).find(el_id);}catch(error){location_hash=$();}
return location_hash;};if(!$('.ember-application').length&&!$('[id*="svelte-"]').length){var target;target=getUrlHash();if(target.length>0&&typeof target.attr('data-reveal')!==typeof undefined&&target.attr('data-reveal')!==false){target.foundation('open');}
var uncollapse_section=function(){target=getUrlHash();target.filter('.psp-section').addClass('is-active');};uncollapse_section();$(window).on('hashchange',uncollapse_section);}
$(document).on('open.zf.reveal','[data-reveal]',function(){var modal=$(this);modal.find('[autofocus]').focus();});if($('#psp-newsletter-modal').length){$(document).on('open.zf.reveal',"#psp-newsletter-modal",function(e){var $modal=$(this);var ajax_url=$modal.data("ajax-url");if(ajax_url){$.ajax(ajax_url+document.location.search).done(function(response){$modal.html(response);if($('.js-required').length){$('.js-required').hide();}
$('.newsletter-subscribe-form').each(SF.wire_up_subscribe_form);recaptchaLoad();});}});}});if($('body#forge').length&&!$('body.legacy_chrome').length){var $sidebarActivate=$('#sidebar-activate');var toolName=$('#top_nav_admin li.selected').text().trim();$('.btn-label',$sidebarActivate).text(toolName+' Menu');$('.btn-arrow-up').toggle();$sidebarActivate.on('click',function(){$('#sidebar').toggle(500,function(){var $sb=$('#sidebar');if(!$sb.is(':visible')){$sb.removeAttr('style');}});$('.btn-arrow-down',$sidebarActivate).toggle();$('.btn-arrow-up',$sidebarActivate).toggle();return false;});}
SF.tablesorter_svg_update=function(){$('th.usersortable div use').each(function(idx){var $use=$(this);var $th=$use.closest('th.usersortable');if($th.hasClass('tablesorter-headerDesc')){$use.attr("xlink:href","#sort_down");}else if($th.hasClass('tablesorter-headerAsc')){$use.attr("xlink:href","#sort_up");}else{$use.attr("xlink:href","#sort");}});};SF.LogJS=function(){function log(level,message){$.ajax({url:'/logjs',type:'post',data:{level:level,message:message},global:false});}
function debug(message){log('debug',message);}
function info(message){log('info',message);}
function warning(message){log('warning',message);}
function error(message){log('error',message);}
function critical(message){log('critical',message);}
return{log:log,debug:debug,info:info,warning:warning,error:error,critical:critical};};SF.logjs=SF.LogJS();;!function(t){function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var e={};n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=6)}([function(t,n){t.exports=jQuery},function(t,n,e){"use strict";function i(){return"rtl"===u()("html").attr("dir")}function r(t,n){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(n?"-"+n:"")}function o(t){var n,e={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},i=document.createElement("div");for(var r in e)void 0!==i.style[r]&&(n=e[r]);return n||(n=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}e.d(n,"a",function(){return i}),e.d(n,"b",function(){return r}),e.d(n,"c",function(){return o});var a=e(0),u=e.n(a)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=e(0),r=e.n(i),o=e(3),a=e(1),u=e(4);o.a.addToJquery(r.a),o.a.rtl=a.a,o.a.GetYoDigits=a.b,o.a.transitionend=a.c,o.a.Plugin=u.a,window.Foundation=o.a},function(t,n,e){"use strict";function i(t){if(void 0===Function.prototype.name){var n=/function\s([^(]{1,})\(/,e=n.exec(t.toString());return e&&e.length>1?e[1].trim():""}return void 0===t.prototype?t.constructor.name:t.prototype.constructor.name}function r(t){return"true"===t||"false"!==t&&(isNaN(1*t)?t:parseFloat(t))}function o(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}e.d(n,"a",function(){return l});var a=e(0),u=e.n(a),s=e(1),c=e(5),l={version:"6.4.3",_plugins:{},_uuids:[],plugin:function(t,n){var e=n||i(t),r=o(e);this._plugins[r]=this[e]=t},registerPlugin:function(t,n){var r=n?o(n):i(t.constructor).toLowerCase();t.uuid=e.i(s.b)(6,r),t.$element.attr("data-"+r)||t.$element.attr("data-"+r,t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf."+r),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var n=o(i(t.$element.data("zfPlugin").constructor));this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-"+n).removeData("zfPlugin").trigger("destroyed.zf."+n);for(var e in t)t[e]=null},reInit:function(t){var n=t instanceof u.a;try{if(n)t.each(function(){u()(this).data("zfPlugin")._init()});else{var e=typeof t,i=this;({object:function(t){t.forEach(function(t){t=o(t),u()("[data-"+t+"]").foundation("_init")})},string:function(){t=o(t),u()("[data-"+t+"]").foundation("_init")},undefined:function(){this.object(Object.keys(i._plugins))}})[e](t)}}catch(t){console.error(t)}finally{return t}},reflow:function(t,n){void 0===n?n=Object.keys(this._plugins):"string"==typeof n&&(n=[n]);var e=this;u.a.each(n,function(n,i){var o=e._plugins[i];u()(t).find("[data-"+i+"]").addBack("[data-"+i+"]").each(function(){var t=u()(this),n={};if(t.data("zfPlugin"))return void console.warn("Tried to initialize "+i+" on an element that already has a Foundation plugin.");t.attr("data-options")&&t.attr("data-options").split(";").forEach(function(t,e){var i=t.split(":").map(function(t){return t.trim()});i[0]&&(n[i[0]]=r(i[1]))});try{t.data("zfPlugin",new o(u()(this),n))}catch(t){console.error(t)}finally{return}})})},getFnName:i,addToJquery:function(t){var n=function(n){var e=typeof n,r=t(".no-js");if(r.length&&r.removeClass("no-js"),"undefined"===e)c.a._init(),l.reflow(this);else{if("string"!==e)throw new TypeError("We're sorry, "+e+" is not a valid parameter. You must use a string representing the method you wish to invoke.");var o=Array.prototype.slice.call(arguments,1),a=this.data("zfPlugin");if(void 0===a||void 0===a[n])throw new ReferenceError("We're sorry, '"+n+"' is not an available method for "+(a?i(a):"this element")+".");1===this.length?a[n].apply(a,o):this.each(function(e,i){a[n].apply(t(i).data("zfPlugin"),o)})}return this};return t.fn.foundation=n,t}};l.util={throttle:function(t,n){var e=null;return function(){var i=this,r=arguments;null===e&&(e=setTimeout(function(){t.apply(i,r),e=null},n))}}},window.Foundation=l,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var t=["webkit","moz"],n=0;n<t.length&&!window.requestAnimationFrame;++n){var e=t[n];window.requestAnimationFrame=window[e+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var i=0;window.requestAnimationFrame=function(t){var n=Date.now(),e=Math.max(i+16,n);return setTimeout(function(){t(i=e)},e-n)},window.cancelAnimationFrame=clearTimeout}window.performance&&window.performance.now||(window.performance={start:Date.now(),now:function(){return Date.now()-this.start}})}(),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var n=Array.prototype.slice.call(arguments,1),e=this,i=function(){},r=function(){return e.apply(this instanceof i?this:t,n.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),r.prototype=new i,r})},function(t,n,e){"use strict";function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(t){return r(void 0!==t.constructor.name?t.constructor.name:t.className)}e.d(n,"a",function(){return c});var a=e(0),u=(e.n(a),e(1)),s=function(){function t(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(n,e,i){return e&&t(n.prototype,e),i&&t(n,i),n}}(),c=function(){function t(n,r){i(this,t),this._setup(n,r);var a=o(this);this.uuid=e.i(u.b)(6,a),this.$element.attr("data-"+a)||this.$element.attr("data-"+a,this.uuid),this.$element.data("zfPlugin")||this.$element.data("zfPlugin",this),this.$element.trigger("init.zf."+a)}return s(t,[{key:"destroy",value:function(){this._destroy();var t=o(this);this.$element.removeAttr("data-"+t).removeData("zfPlugin").trigger("destroyed.zf."+t);for(var n in this)this[n]=null}}]),t}()},function(t,n,e){"use strict";function i(t){var n={};return"string"!=typeof t?n:(t=t.trim().slice(1,-1))?n=t.split("&").reduce(function(t,n){var e=n.replace(/\+/g," ").split("="),i=e[0],r=e[1];return i=decodeURIComponent(i),r=void 0===r?null:decodeURIComponent(r),t.hasOwnProperty(i)?Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]:t[i]=r,t},{}):n}e.d(n,"a",function(){return u});var r=e(0),o=e.n(r),a=window.matchMedia||function(){var t=window.styleMedia||window.media;if(!t){var n=document.createElement("style"),e=document.getElementsByTagName("script")[0],i=null;n.type="text/css",n.id="matchmediajs-test",e&&e.parentNode&&e.parentNode.insertBefore(n,e),i="getComputedStyle"in window&&window.getComputedStyle(n,null)||n.currentStyle,t={matchMedium:function(t){var e="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return n.styleSheet?n.styleSheet.cssText=e:n.textContent=e,"1px"===i.width}}}return function(n){return{matches:t.matchMedium(n||"all"),media:n||"all"}}}(),u={queries:[],current:"",_init:function(){var t=this;o()("meta.foundation-mq").length||o()('<meta class="foundation-mq">').appendTo(document.head);var n,e=o()(".foundation-mq").css("font-family");n=i(e);for(var r in n)n.hasOwnProperty(r)&&t.queries.push({name:r,value:"only screen and (min-width: "+n[r]+")"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var n=this.get(t);return!!n&&a(n).matches},is:function(t){return t=t.trim().split(" "),t.length>1&&"only"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var n in this.queries)if(this.queries.hasOwnProperty(n)){var e=this.queries[n];if(t===e.name)return e.value}return null},_getCurrentSize:function(){for(var t,n=0;n<this.queries.length;n++){var e=this.queries[n];a(e.value).matches&&(t=e)}return"object"==typeof t?t.name:t},_watcher:function(){var t=this;o()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery",function(){var n=t._getCurrentSize(),e=t.current;n!==e&&(t.current=n,o()(window).trigger("changed.zf.mediaquery",[n,e]))})}}},function(t,n,e){t.exports=e(2)}]);;!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=103)}({0:function(e,t){e.exports=jQuery},1:function(e,t){e.exports={Foundation:window.Foundation}},103:function(e,t,n){e.exports=n(37)},37:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=(n.n(r),n(67));r.Foundation.MediaQuery=i.a,r.Foundation.MediaQuery._init()},67:function(e,t,n){"use strict";function r(e){var t={};return"string"!=typeof e?t:(e=e.trim().slice(1,-1))?t=e.split("&").reduce(function(e,t){var n=t.replace(/\+/g," ").split("="),r=n[0],i=n[1];return r=decodeURIComponent(r),i=void 0===i?null:decodeURIComponent(i),e.hasOwnProperty(r)?Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i,e},{}):t}n.d(t,"a",function(){return a});var i=n(0),u=n.n(i),o=window.matchMedia||function(){var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),n=document.getElementsByTagName("script")[0],r=null;t.type="text/css",t.id="matchmediajs-test",n&&n.parentNode&&n.parentNode.insertBefore(t,n),r="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var n="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=n:t.textContent=n,"1px"===r.width}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}(),a={queries:[],current:"",_init:function(){var e=this;u()("meta.foundation-mq").length||u()('<meta class="foundation-mq">').appendTo(document.head);var t,n=u()(".foundation-mq").css("font-family");t=r(n);for(var i in t)t.hasOwnProperty(i)&&e.queries.push({name:i,value:"only screen and (min-width: "+t[i]+")"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(e){var t=this.get(e);return!!t&&o(t).matches},is:function(e){return e=e.trim().split(" "),e.length>1&&"only"===e[1]?e[0]===this._getCurrentSize():this.atLeast(e[0])},get:function(e){for(var t in this.queries)if(this.queries.hasOwnProperty(t)){var n=this.queries[t];if(e===n.name)return n.value}return null},_getCurrentSize:function(){for(var e,t=0;t<this.queries.length;t++){var n=this.queries[t];o(n.value).matches&&(e=n)}return"object"==typeof e?e.name:e},_watcher:function(){var e=this;u()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery",function(){var t=e._getCurrentSize(),n=e.current;t!==n&&(e.current=t,u()(window).trigger("changed.zf.mediaquery",[t,n]))})}}}});;!function(n){function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};t.m=n,t.c=e,t.i=function(n){return n},t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:o})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=102)}({0:function(n,t){n.exports=jQuery},1:function(n,t){n.exports={Foundation:window.Foundation}},102:function(n,t,e){n.exports=e(36)},3:function(n,t){n.exports={rtl:window.Foundation.rtl,GetYoDigits:window.Foundation.GetYoDigits,transitionend:window.Foundation.transitionend}},36:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e(1),r=(e.n(o),e(66));o.Foundation.Keyboard=r.a},66:function(n,t,e){"use strict";function o(n){return!!n&&n.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!a()(this).is(":visible")||a()(this).attr("tabindex")<0)})}function r(n){var t=d[n.which||n.keyCode]||String.fromCharCode(n.which).toUpperCase();return t=t.replace(/\W+/,""),n.shiftKey&&(t="SHIFT_"+t),n.ctrlKey&&(t="CTRL_"+t),n.altKey&&(t="ALT_"+t),t=t.replace(/_$/,"")}e.d(t,"a",function(){return c});var i=e(0),a=e.n(i),u=e(3),d=(e.n(u),{9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",35:"END",36:"HOME",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"}),f={},c={keys:function(n){var t={};for(var e in n)t[n[e]]=n[e];return t}(d),parseKey:r,handleKey:function(n,t,o){var r,i,d,c=f[t],s=this.parseKey(n);if(!c)return console.warn("Component not defined!");if(r=void 0===c.ltr?c:e.i(u.rtl)()?a.a.extend({},c.ltr,c.rtl):a.a.extend({},c.rtl,c.ltr),i=r[s],(d=o[i])&&"function"==typeof d){var l=d.apply();(o.handled||"function"==typeof o.handled)&&o.handled(l)}else(o.unhandled||"function"==typeof o.unhandled)&&o.unhandled()},findFocusable:o,register:function(n,t){f[n]=t},trapFocus:function(n){var t=o(n),e=t.eq(0),i=t.eq(-1);n.on("keydown.zf.trapfocus",function(n){n.target===i[0]&&"TAB"===r(n)?(n.preventDefault(),e.focus()):n.target===e[0]&&"SHIFT_TAB"===r(n)&&(n.preventDefault(),i.focus())})},releaseFocus:function(n){n.off("keydown.zf.trapfocus")}}}});;!function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var o={};e.m=t,e.c=o,e.i=function(t){return t},e.d=function(t,o,i){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=100)}({1:function(t,e){t.exports={Foundation:window.Foundation}},100:function(t,e,o){t.exports=o(34)},3:function(t,e){t.exports={rtl:window.Foundation.rtl,GetYoDigits:window.Foundation.GetYoDigits,transitionend:window.Foundation.transitionend}},34:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1),n=(o.n(i),o(64));i.Foundation.Box=n.a},64:function(t,e,o){"use strict";function i(t,e,o,i,f){return 0===n(t,e,o,i,f)}function n(t,e,o,i,n){var s,r,h,a,c=f(t);if(e){var l=f(e);r=l.height+l.offset.top-(c.offset.top+c.height),s=c.offset.top-l.offset.top,h=c.offset.left-l.offset.left,a=l.width+l.offset.left-(c.offset.left+c.width)}else r=c.windowDims.height+c.windowDims.offset.top-(c.offset.top+c.height),s=c.offset.top-c.windowDims.offset.top,h=c.offset.left-c.windowDims.offset.left,a=c.windowDims.width-(c.offset.left+c.width);return r=n?0:Math.min(r,0),s=Math.min(s,0),h=Math.min(h,0),a=Math.min(a,0),o?h+a:i?s+r:Math.sqrt(s*s+r*r+h*h+a*a)}function f(t){if((t=t.length?t[0]:t)===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var e=t.getBoundingClientRect(),o=t.parentNode.getBoundingClientRect(),i=document.body.getBoundingClientRect(),n=window.pageYOffset,f=window.pageXOffset;return{width:e.width,height:e.height,offset:{top:e.top+n,left:e.left+f},parentDims:{width:o.width,height:o.height,offset:{top:o.top+n,left:o.left+f}},windowDims:{width:i.width,height:i.height,offset:{top:n,left:f}}}}function s(t,e,i,n,f,s){switch(console.log("NOTE: GetOffsets is deprecated in favor of GetExplicitOffsets and will be removed in 6.5"),i){case"top":return o.i(h.rtl)()?r(t,e,"top","left",n,f,s):r(t,e,"top","right",n,f,s);case"bottom":return o.i(h.rtl)()?r(t,e,"bottom","left",n,f,s):r(t,e,"bottom","right",n,f,s);case"center top":return r(t,e,"top","center",n,f,s);case"center bottom":return r(t,e,"bottom","center",n,f,s);case"center left":return r(t,e,"left","center",n,f,s);case"center right":return r(t,e,"right","center",n,f,s);case"left bottom":return r(t,e,"bottom","left",n,f,s);case"right bottom":return r(t,e,"bottom","right",n,f,s);case"center":return{left:$eleDims.windowDims.offset.left+$eleDims.windowDims.width/2-$eleDims.width/2+f,top:$eleDims.windowDims.offset.top+$eleDims.windowDims.height/2-($eleDims.height/2+n)};case"reveal":return{left:($eleDims.windowDims.width-$eleDims.width)/2+f,top:$eleDims.windowDims.offset.top+n};case"reveal full":return{left:$eleDims.windowDims.offset.left,top:$eleDims.windowDims.offset.top};default:return{left:o.i(h.rtl)()?$anchorDims.offset.left-$eleDims.width+$anchorDims.width-f:$anchorDims.offset.left+f,top:$anchorDims.offset.top+$anchorDims.height+n}}}function r(t,e,o,i,n,s,r){var h,a,c=f(t),l=e?f(e):null;switch(o){case"top":h=l.offset.top-(c.height+n);break;case"bottom":h=l.offset.top+l.height+n;break;case"left":a=l.offset.left-(c.width+s);break;case"right":a=l.offset.left+l.width+s}switch(o){case"top":case"bottom":switch(i){case"left":a=l.offset.left+s;break;case"right":a=l.offset.left-c.width+l.width-s;break;case"center":a=r?s:l.offset.left+l.width/2-c.width/2+s}break;case"right":case"left":switch(i){case"bottom":h=l.offset.top-n+l.height-c.height;break;case"top":h=l.offset.top+n;break;case"center":h=l.offset.top+n+l.height/2-c.height/2}}return{top:h,left:a}}o.d(e,"a",function(){return a});var h=o(3),a=(o.n(h),{ImNotTouchingYou:i,OverlapArea:n,GetDimensions:f,GetOffsets:s,GetExplicitOffsets:r})}});;!function(n){function e(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,e),u.l=!0,u.exports}var t={};e.m=n,e.c=t,e.i=function(n){return n},e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:r})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="",e(e.s=105)}({0:function(n,e){n.exports=jQuery},1:function(n,e){n.exports={Foundation:window.Foundation}},105:function(n,e,t){n.exports=t(39)},39:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=t(1),u=(t.n(r),t(69));r.Foundation.Nest=u.a},69:function(n,e,t){"use strict";t.d(e,"a",function(){return a});var r=t(0),u=t.n(r),a={Feather:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zf";n.attr("role","menubar");var t=n.find("li").attr({role:"menuitem"}),r="is-"+e+"-submenu",a=r+"-item",i="is-"+e+"-submenu-parent",o="accordion"!==e;t.each(function(){var n=u()(this),t=n.children("ul");t.length&&(n.addClass(i),t.addClass("submenu "+r).attr({"data-submenu":""}),o&&(n.attr({"aria-haspopup":!0,"aria-label":n.children("a:first").text()}),"drilldown"===e&&n.attr({"aria-expanded":!1})),t.addClass("submenu "+r).attr({"data-submenu":"",role:"menu"}),"drilldown"===e&&t.attr({"aria-hidden":!0})),n.parent("[data-submenu]").length&&n.addClass("is-submenu-item "+a)})},Burn:function(n,e){var t="is-"+e+"-submenu",r=t+"-item",u="is-"+e+"-submenu-parent";n.find(">li, .menu, .menu > li").removeClass(t+" "+r+" "+u+" is-submenu-item submenu is-active").removeAttr("data-submenu").css("display","")}}}});;!function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=84)}({0:function(e,n){e.exports=jQuery},1:function(e,n){e.exports={Foundation:window.Foundation}},18:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(1),i=(t.n(o),t(48));o.Foundation.plugin(i.a,"DropdownMenu")},2:function(e,n){e.exports={Plugin:window.Foundation.Plugin}},3:function(e,n){e.exports={rtl:window.Foundation.rtl,GetYoDigits:window.Foundation.GetYoDigits,transitionend:window.Foundation.transitionend}},48:function(e,n,t){"use strict";function o(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function i(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function s(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}t.d(n,"a",function(){return h});var r=t(0),a=t.n(r),u=t(5),d=(t.n(u),t(9)),l=(t.n(d),t(8)),p=(t.n(l),t(3)),c=(t.n(p),t(2)),f=(t.n(c),function(){function e(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(n,t,o){return t&&e(n.prototype,t),o&&e(n,o),n}}()),h=function(e){function n(){return o(this,n),i(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return s(n,e),f(n,[{key:"_setup",value:function(e,t){this.$element=e,this.options=a.a.extend({},n.defaults,this.$element.data(),t),this.className="DropdownMenu",this._init(),u.Keyboard.register("DropdownMenu",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"previous",ESCAPE:"close"})}},{key:"_init",value:function(){d.Nest.Feather(this.$element,"dropdown");var e=this.$element.find("li.is-dropdown-submenu-parent");this.$element.children(".is-dropdown-submenu-parent").children(".is-dropdown-submenu").addClass("first-sub"),this.$menuItems=this.$element.find('[role="menuitem"]'),this.$tabs=this.$element.children('[role="menuitem"]'),this.$tabs.find("ul.is-dropdown-submenu").addClass(this.options.verticalClass),"auto"===this.options.alignment?this.$element.hasClass(this.options.rightClass)||t.i(p.rtl)()||this.$element.parents(".top-bar-right").is("*")?(this.options.alignment="right",e.addClass("opens-left")):(this.options.alignment="left",e.addClass("opens-right")):"right"===this.options.alignment?e.addClass("opens-left"):e.addClass("opens-right"),this.changed=!1,this._events()}},{key:"_isVertical",value:function(){return"block"===this.$tabs.css("display")||"column"===this.$element.css("flex-direction")}},{key:"_isRtl",value:function(){return this.$element.hasClass("align-right")||t.i(p.rtl)()&&!this.$element.hasClass("align-left")}},{key:"_events",value:function(){var e=this,n="ontouchstart"in window||void 0!==window.ontouchstart,t="is-dropdown-submenu-parent",o=function(o){var i=a()(o.target).parentsUntil("ul","."+t),s=i.hasClass(t),r="true"===i.attr("data-is-click"),u=i.children(".is-dropdown-submenu");if(s)if(r){if(!e.options.closeOnClick||!e.options.clickOpen&&!n||e.options.forceFollow&&n)return;o.stopImmediatePropagation(),o.preventDefault(),e._hide(i)}else o.preventDefault(),o.stopImmediatePropagation(),e._show(u),i.add(i.parentsUntil(e.$element,"."+t)).attr("data-is-click",!0)};(this.options.clickOpen||n)&&this.$menuItems.on("click.zf.dropdownmenu touchstart.zf.dropdownmenu",o),e.options.closeOnClickInside&&this.$menuItems.on("click.zf.dropdownmenu",function(n){a()(this).hasClass(t)||e._hide()}),this.options.disableHover||this.$menuItems.on("mouseenter.zf.dropdownmenu",function(n){var o=a()(this);o.hasClass(t)&&(clearTimeout(o.data("_delay")),o.data("_delay",setTimeout(function(){e._show(o.children(".is-dropdown-submenu"))},e.options.hoverDelay)))}).on("mouseleave.zf.dropdownmenu",function(n){var o=a()(this);if(o.hasClass(t)&&e.options.autoclose){if("true"===o.attr("data-is-click")&&e.options.clickOpen)return!1;clearTimeout(o.data("_delay")),o.data("_delay",setTimeout(function(){e._hide(o)},e.options.closingTime))}}),this.$menuItems.on("keydown.zf.dropdownmenu",function(n){var t,o,i=a()(n.target).parentsUntil("ul",'[role="menuitem"]'),s=e.$tabs.index(i)>-1,r=s?e.$tabs:i.siblings("li").add(i);r.each(function(e){if(a()(this).is(i))return t=r.eq(e-1),void(o=r.eq(e+1))});var d=function(){o.children("a:first").focus(),n.preventDefault()},l=function(){t.children("a:first").focus(),n.preventDefault()},p=function(){var t=i.children("ul.is-dropdown-submenu");t.length&&(e._show(t),i.find("li > a:first").focus(),n.preventDefault())},c=function(){var t=i.parent("ul").parent("li");t.children("a:first").focus(),e._hide(t),n.preventDefault()},f={open:p,close:function(){e._hide(e.$element),e.$menuItems.eq(0).children("a").focus(),n.preventDefault()},handled:function(){n.stopImmediatePropagation()}};s?e._isVertical()?e._isRtl()?a.a.extend(f,{down:d,up:l,next:c,previous:p}):a.a.extend(f,{down:d,up:l,next:p,previous:c}):e._isRtl()?a.a.extend(f,{next:l,previous:d,down:p,up:c}):a.a.extend(f,{next:d,previous:l,down:p,up:c}):e._isRtl()?a.a.extend(f,{next:c,previous:p,down:d,up:l}):a.a.extend(f,{next:p,previous:c,down:d,up:l}),u.Keyboard.handleKey(n,"DropdownMenu",f)})}},{key:"_addBodyHandler",value:function(){var e=a()(document.body),n=this;e.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu").on("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu",function(t){n.$element.find(t.target).length||(n._hide(),e.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu"))})}},{key:"_show",value:function(e){var n=this.$tabs.index(this.$tabs.filter(function(n,t){return a()(t).find(e).length>0})),t=e.parent("li.is-dropdown-submenu-parent").siblings("li.is-dropdown-submenu-parent");this._hide(t,n),e.css("visibility","hidden").addClass("js-dropdown-active").parent("li.is-dropdown-submenu-parent").addClass("is-active");var o=l.Box.ImNotTouchingYou(e,null,!0);if(!o){var i="left"===this.options.alignment?"-right":"-left",s=e.parent(".is-dropdown-submenu-parent");s.removeClass("opens"+i).addClass("opens-"+this.options.alignment),o=l.Box.ImNotTouchingYou(e,null,!0),o||s.removeClass("opens-"+this.options.alignment).addClass("opens-inner"),this.changed=!0}e.css("visibility",""),this.options.closeOnClick&&this._addBodyHandler(),this.$element.trigger("show.zf.dropdownmenu",[e])}},{key:"_hide",value:function(e,n){var t;if(t=e&&e.length?e:void 0!==n?this.$tabs.not(function(e,t){return e===n}):this.$element,t.hasClass("is-active")||t.find(".is-active").length>0){if(t.find("li.is-active").add(t).attr({"data-is-click":!1}).removeClass("is-active"),t.find("ul.js-dropdown-active").removeClass("js-dropdown-active"),this.changed||t.find("opens-inner").length){var o="left"===this.options.alignment?"right":"left";t.find("li.is-dropdown-submenu-parent").add(t).removeClass("opens-inner opens-"+this.options.alignment).addClass("opens-"+o),this.changed=!1}this.$element.trigger("hide.zf.dropdownmenu",[t])}}},{key:"_destroy",value:function(){this.$menuItems.off(".zf.dropdownmenu").removeAttr("data-is-click").removeClass("is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner"),a()(document.body).off(".zf.dropdownmenu"),d.Nest.Burn(this.$element,"dropdown")}}]),n}(c.Plugin);h.defaults={disableHover:!1,autoclose:!0,hoverDelay:50,clickOpen:!1,closingTime:500,alignment:"auto",closeOnClick:!0,closeOnClickInside:!0,verticalClass:"vertical",rightClass:"align-right",forceFollow:!0}},5:function(e,n){e.exports={Keyboard:window.Foundation.Keyboard}},8:function(e,n){e.exports={Box:window.Foundation.Box}},84:function(e,n,t){e.exports=t(18)},9:function(e,n){e.exports={Nest:window.Foundation.Nest}}});;!function(t){function e(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=88)}({0:function(t,e){t.exports=jQuery},1:function(t,e){t.exports={Foundation:window.Foundation}},2:function(t,e){t.exports={Plugin:window.Foundation.Plugin}},22:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),s=(i.n(n),i(52));n.Foundation.plugin(s.a,"OffCanvas")},3:function(t,e){t.exports={rtl:window.Foundation.rtl,GetYoDigits:window.Foundation.GetYoDigits,transitionend:window.Foundation.transitionend}},4:function(t,e){t.exports={Motion:window.Foundation.Motion,Move:window.Foundation.Move}},5:function(t,e){t.exports={Keyboard:window.Foundation.Keyboard}},52:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return g});var a=i(0),r=i.n(a),l=i(5),c=(i.n(l),i(6)),d=(i.n(c),i(3)),f=(i.n(d),i(2)),u=(i.n(f),i(7)),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),g=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){var n=this;this.className="OffCanvas",this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.contentClasses={base:[],reveal:[]},this.$lastTrigger=r()(),this.$triggers=r()(),this.position="left",this.$content=r()(),this.nested=!!this.options.nested,r()(["push","overlap"]).each(function(t,e){n.contentClasses.base.push("has-transition-"+e)}),r()(["left","right","top","bottom"]).each(function(t,e){n.contentClasses.base.push("has-position-"+e),n.contentClasses.reveal.push("has-reveal-"+e)}),u.a.init(r.a),c.MediaQuery._init(),this._init(),this._events(),l.Keyboard.register("OffCanvas",{ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.attr("id");if(this.$element.attr("aria-hidden","true"),this.options.contentId?this.$content=r()("#"+this.options.contentId):this.$element.siblings("[data-off-canvas-content]").length?this.$content=this.$element.siblings("[data-off-canvas-content]").first():this.$content=this.$element.closest("[data-off-canvas-content]").first(),this.options.contentId?this.options.contentId&&null===this.options.nested&&console.warn("Remember to use the nested option if using the content ID option!"):this.nested=0===this.$element.siblings("[data-off-canvas-content]").length,!0===this.nested&&(this.options.transition="overlap",this.$element.removeClass("is-transition-push")),this.$element.addClass("is-transition-"+this.options.transition+" is-closed"),this.$triggers=r()(document).find('[data-open="'+t+'"], [data-close="'+t+'"], [data-toggle="'+t+'"]').attr("aria-expanded","false").attr("aria-controls",t),this.position=this.$element.is(".position-left, .position-top, .position-right, .position-bottom")?this.$element.attr("class").match(/position\-(left|top|right|bottom)/)[1]:this.position,!0===this.options.contentOverlay){var e=document.createElement("div"),i="fixed"===r()(this.$element).css("position")?"is-overlay-fixed":"is-overlay-absolute";e.setAttribute("class","js-off-canvas-overlay "+i),this.$overlay=r()(e),"is-overlay-fixed"===i?r()(this.$overlay).insertAfter(this.$element):this.$content.append(this.$overlay)}this.options.isRevealed=this.options.isRevealed||new RegExp(this.options.revealClass,"g").test(this.$element[0].className),!0===this.options.isRevealed&&(this.options.revealOn=this.options.revealOn||this.$element[0].className.match(/(reveal-for-medium|reveal-for-large)/g)[0].split("-")[2],this._setMQChecker()),this.options.transitionTime&&this.$element.css("transition-duration",this.options.transitionTime),this._removeContentClasses()}},{key:"_events",value:function(){if(this.$element.off(".zf.trigger .zf.offcanvas").on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"keydown.zf.offcanvas":this._handleKeyboard.bind(this)}),!0===this.options.closeOnClick){(this.options.contentOverlay?this.$overlay:this.$content).on({"click.zf.offcanvas":this.close.bind(this)})}}},{key:"_setMQChecker",value:function(){var t=this;r()(window).on("changed.zf.mediaquery",function(){c.MediaQuery.atLeast(t.options.revealOn)?t.reveal(!0):t.reveal(!1)}).one("load.zf.offcanvas",function(){c.MediaQuery.atLeast(t.options.revealOn)&&t.reveal(!0)})}},{key:"_removeContentClasses",value:function(t){"boolean"!=typeof t?this.$content.removeClass(this.contentClasses.base.join(" ")):!1===t&&this.$content.removeClass("has-reveal-"+this.position)}},{key:"_addContentClasses",value:function(t){this._removeContentClasses(t),"boolean"!=typeof t?this.$content.addClass("has-transition-"+this.options.transition+" has-position-"+this.position):!0===t&&this.$content.addClass("has-reveal-"+this.position)}},{key:"reveal",value:function(t){t?(this.close(),this.isRevealed=!0,this.$element.attr("aria-hidden","false"),this.$element.off("open.zf.trigger toggle.zf.trigger"),this.$element.removeClass("is-closed")):(this.isRevealed=!1,this.$element.attr("aria-hidden","true"),this.$element.off("open.zf.trigger toggle.zf.trigger").on({"open.zf.trigger":this.open.bind(this),"toggle.zf.trigger":this.toggle.bind(this)}),this.$element.addClass("is-closed")),this._addContentClasses(t)}},{key:"_stopScrolling",value:function(t){return!1}},{key:"_recordScrollable",value:function(t){var e=this;e.scrollHeight!==e.clientHeight&&(0===e.scrollTop&&(e.scrollTop=1),e.scrollTop===e.scrollHeight-e.clientHeight&&(e.scrollTop=e.scrollHeight-e.clientHeight-1)),e.allowUp=e.scrollTop>0,e.allowDown=e.scrollTop<e.scrollHeight-e.clientHeight,e.lastY=t.originalEvent.pageY}},{key:"_stopScrollPropagation",value:function(t){var e=this,i=t.pageY<e.lastY,n=!i;e.lastY=t.pageY,i&&e.allowUp||n&&e.allowDown?t.stopPropagation():t.preventDefault()}},{key:"open",value:function(t,e){if(!this.$element.hasClass("is-open")&&!this.isRevealed){var n=this;e&&(this.$lastTrigger=e),"top"===this.options.forceTo?window.scrollTo(0,0):"bottom"===this.options.forceTo&&window.scrollTo(0,document.body.scrollHeight),this.options.transitionTime&&"overlap"!==this.options.transition?this.$element.siblings("[data-off-canvas-content]").css("transition-duration",this.options.transitionTime):this.$element.siblings("[data-off-canvas-content]").css("transition-duration",""),this.$element.addClass("is-open").removeClass("is-closed"),this.$triggers.attr("aria-expanded","true"),this.$element.attr("aria-hidden","false").trigger("opened.zf.offcanvas"),this.$content.addClass("is-open-"+this.position),!1===this.options.contentScroll&&(r()("body").addClass("is-off-canvas-open").on("touchmove",this._stopScrolling),this.$element.on("touchstart",this._recordScrollable),this.$element.on("touchmove",this._stopScrollPropagation)),!0===this.options.contentOverlay&&this.$overlay.addClass("is-visible"),!0===this.options.closeOnClick&&!0===this.options.contentOverlay&&this.$overlay.addClass("is-closable"),!0===this.options.autoFocus&&this.$element.one(i.i(d.transitionend)(this.$element),function(){if(n.$element.hasClass("is-open")){var t=n.$element.find("[data-autofocus]");t.length?t.eq(0).focus():n.$element.find("a, button").eq(0).focus()}}),!0===this.options.trapFocus&&(this.$content.attr("tabindex","-1"),l.Keyboard.trapFocus(this.$element)),this._addContentClasses()}}},{key:"close",value:function(t){if(this.$element.hasClass("is-open")&&!this.isRevealed){var e=this;this.$element.removeClass("is-open"),this.$element.attr("aria-hidden","true").trigger("closed.zf.offcanvas"),this.$content.removeClass("is-open-left is-open-top is-open-right is-open-bottom"),!1===this.options.contentScroll&&(r()("body").removeClass("is-off-canvas-open").off("touchmove",this._stopScrolling),this.$element.off("touchstart",this._recordScrollable),this.$element.off("touchmove",this._stopScrollPropagation)),!0===this.options.contentOverlay&&this.$overlay.removeClass("is-visible"),!0===this.options.closeOnClick&&!0===this.options.contentOverlay&&this.$overlay.removeClass("is-closable"),this.$triggers.attr("aria-expanded","false"),!0===this.options.trapFocus&&(this.$content.removeAttr("tabindex"),l.Keyboard.releaseFocus(this.$element)),this.$element.one(i.i(d.transitionend)(this.$element),function(t){e.$element.addClass("is-closed"),e._removeContentClasses()})}}},{key:"toggle",value:function(t,e){this.$element.hasClass("is-open")?this.close(t,e):this.open(t,e)}},{key:"_handleKeyboard",value:function(t){var e=this;l.Keyboard.handleKey(t,"OffCanvas",{close:function(){return e.close(),e.$lastTrigger.focus(),!0},handled:function(){t.stopPropagation(),t.preventDefault()}})}},{key:"_destroy",value:function(){this.close(),this.$element.off(".zf.trigger .zf.offcanvas"),this.$overlay.off(".zf.offcanvas")}}]),e}(f.Plugin);g.defaults={closeOnClick:!0,contentOverlay:!0,contentId:null,nested:null,contentScroll:!0,transitionTime:null,transition:"push",forceTo:null,isRevealed:!1,revealOn:null,autoFocus:!0,revealClass:"reveal-for-",trapFocus:!1}},6:function(t,e){t.exports={MediaQuery:window.Foundation.MediaQuery}},7:function(t,e,i){"use strict";function n(t,e,i){var n=void 0,s=Array.prototype.slice.call(arguments,3);o()(window).off(e).on(e,function(e){n&&clearTimeout(n),n=setTimeout(function(){i.apply(null,s)},t||10)})}i.d(e,"a",function(){return c});var s=i(0),o=i.n(s),a=i(4),r=(i.n(a),function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if(t[e]+"MutationObserver"in window)return window[t[e]+"MutationObserver"];return!1}()),l=function(t,e){t.data(e).split(" ").forEach(function(i){o()("#"+i)["close"===e?"trigger":"triggerHandler"](e+".zf.trigger",[t])})},c={Listeners:{Basic:{},Global:{}},Initializers:{}};c.Listeners.Basic={openListener:function(){l(o()(this),"open")},closeListener:function(){o()(this).data("close")?l(o()(this),"close"):o()(this).trigger("close.zf.trigger")},toggleListener:function(){o()(this).data("toggle")?l(o()(this),"toggle"):o()(this).trigger("toggle.zf.trigger")},closeableListener:function(t){t.stopPropagation();var e=o()(this).data("closable");""!==e?a.Motion.animateOut(o()(this),e,function(){o()(this).trigger("closed.zf")}):o()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var t=o()(this).data("toggle-focus");o()("#"+t).triggerHandler("toggle.zf.trigger",[o()(this)])}},c.Initializers.addOpenListener=function(t){t.off("click.zf.trigger",c.Listeners.Basic.openListener),t.on("click.zf.trigger","[data-open]",c.Listeners.Basic.openListener)},c.Initializers.addCloseListener=function(t){t.off("click.zf.trigger",c.Listeners.Basic.closeListener),t.on("click.zf.trigger","[data-close]",c.Listeners.Basic.closeListener)},c.Initializers.addToggleListener=function(t){t.off("click.zf.trigger",c.Listeners.Basic.toggleListener),t.on("click.zf.trigger","[data-toggle]",c.Listeners.Basic.toggleListener)},c.Initializers.addCloseableListener=function(t){t.off("close.zf.trigger",c.Listeners.Basic.closeableListener),t.on("close.zf.trigger","[data-closeable], [data-closable]",c.Listeners.Basic.closeableListener)},c.Initializers.addToggleFocusListener=function(t){t.off("focus.zf.trigger blur.zf.trigger",c.Listeners.Basic.toggleFocusListener),t.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",c.Listeners.Basic.toggleFocusListener)},c.Listeners.Global={resizeListener:function(t){r||t.each(function(){o()(this).triggerHandler("resizeme.zf.trigger")}),t.attr("data-events","resize")},scrollListener:function(t){r||t.each(function(){o()(this).triggerHandler("scrollme.zf.trigger")}),t.attr("data-events","scroll")},closeMeListener:function(t,e){var i=t.namespace.split(".")[0];o()("[data-"+i+"]").not('[data-yeti-box="'+e+'"]').each(function(){var t=o()(this);t.triggerHandler("close.zf.trigger",[t])})}},c.Initializers.addClosemeListener=function(t){var e=o()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];if(t&&("string"==typeof t?i.push(t):"object"==typeof t&&"string"==typeof t[0]?i.concat(t):console.error("Plugin names must be strings")),e.length){var n=i.map(function(t){return"closeme.zf."+t}).join(" ");o()(window).off(n).on(n,c.Listeners.Global.closeMeListener)}},c.Initializers.addResizeListener=function(t){var e=o()("[data-resize]");e.length&&n(t,"resize.zf.trigger",c.Listeners.Global.resizeListener,e)},c.Initializers.addScrollListener=function(t){var e=o()("[data-scroll]");e.length&&n(t,"scroll.zf.trigger",c.Listeners.Global.scrollListener,e)},c.Initializers.addMutationEventsListener=function(t){if(!r)return!1;var e=t.find("[data-resize], [data-scroll], [data-mutate]"),i=function(t){var e=o()(t[0].target);switch(t[0].type){case"attributes":"scroll"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("scrollme.zf.trigger",[e,window.pageYOffset]),"resize"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("resizeme.zf.trigger",[e]),"style"===t[0].attributeName&&(e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]));break;case"childList":e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var n=0;n<=e.length-1;n++){var s=new r(i);s.observe(e[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}},c.Initializers.addSimpleListeners=function(){var t=o()(document);c.Initializers.addOpenListener(t),c.Initializers.addCloseListener(t),c.Initializers.addToggleListener(t),c.Initializers.addCloseableListener(t),c.Initializers.addToggleFocusListener(t)},c.Initializers.addGlobalListeners=function(){var t=o()(document);c.Initializers.addMutationEventsListener(t),c.Initializers.addResizeListener(),c.Initializers.addScrollListener(),c.Initializers.addClosemeListener()},c.init=function(t,e){if(void 0===t.triggersInitialized){t(document);"complete"===document.readyState?(c.Initializers.addSimpleListeners(),c.Initializers.addGlobalListeners()):t(window).on("load",function(){c.Initializers.addSimpleListeners(),c.Initializers.addGlobalListeners()}),t.triggersInitialized=!0}e&&(e.Triggers=c,e.IHearYou=c.Initializers.addGlobalListeners)}},88:function(t,e,i){t.exports=i(22)}});;!function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=98)}({0:function(e,t){e.exports=jQuery},1:function(e,t){e.exports={Foundation:window.Foundation}},2:function(e,t){e.exports={Plugin:window.Foundation.Plugin}},32:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),r=(i.n(n),i(62));n.Foundation.plugin(r.a,"Toggler")},4:function(e,t){e.exports={Motion:window.Foundation.Motion,Move:window.Foundation.Move}},62:function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}i.d(t,"a",function(){return f});var s=i(0),o=i.n(s),l=i(4),c=(i.n(l),i(2)),g=(i.n(c),i(7)),u=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}}(),f=function(e){function t(){return n(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"_setup",value:function(e,i){this.$element=e,this.options=o.a.extend({},t.defaults,e.data(),i),this.className="",this.className="Toggler",g.a.init(o.a),this._init(),this._events()}},{key:"_init",value:function(){var e;this.options.animate?(e=this.options.animate.split(" "),this.animationIn=e[0],this.animationOut=e[1]||null):(e=this.$element.data("toggler"),this.className="."===e[0]?e.slice(1):e);var t=this.$element[0].id;o()('[data-open="'+t+'"], [data-close="'+t+'"], [data-toggle="'+t+'"]').attr("aria-controls",t),this.$element.attr("aria-expanded",!this.$element.is(":hidden"))}},{key:"_events",value:function(){this.$element.off("toggle.zf.trigger").on("toggle.zf.trigger",this.toggle.bind(this))}},{key:"toggle",value:function(){this[this.options.animate?"_toggleAnimate":"_toggleClass"]()}},{key:"_toggleClass",value:function(){this.$element.toggleClass(this.className);var e=this.$element.hasClass(this.className);e?this.$element.trigger("on.zf.toggler"):this.$element.trigger("off.zf.toggler"),this._updateARIA(e),this.$element.find("[data-mutate]").trigger("mutateme.zf.trigger")}},{key:"_toggleAnimate",value:function(){var e=this;this.$element.is(":hidden")?l.Motion.animateIn(this.$element,this.animationIn,function(){e._updateARIA(!0),this.trigger("on.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")}):l.Motion.animateOut(this.$element,this.animationOut,function(){e._updateARIA(!1),this.trigger("off.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")})}},{key:"_updateARIA",value:function(e){this.$element.attr("aria-expanded",!!e)}},{key:"_destroy",value:function(){this.$element.off(".zf.toggler")}}]),t}(c.Plugin);f.defaults={animate:!1}},7:function(e,t,i){"use strict";function n(e,t,i){var n=void 0,r=Array.prototype.slice.call(arguments,3);a()(window).off(t).on(t,function(t){n&&clearTimeout(n),n=setTimeout(function(){i.apply(null,r)},e||10)})}i.d(t,"a",function(){return c});var r=i(0),a=i.n(r),s=i(4),o=(i.n(s),function(){for(var e=["WebKit","Moz","O","Ms",""],t=0;t<e.length;t++)if(e[t]+"MutationObserver"in window)return window[e[t]+"MutationObserver"];return!1}()),l=function(e,t){e.data(t).split(" ").forEach(function(i){a()("#"+i)["close"===t?"trigger":"triggerHandler"](t+".zf.trigger",[e])})},c={Listeners:{Basic:{},Global:{}},Initializers:{}};c.Listeners.Basic={openListener:function(){l(a()(this),"open")},closeListener:function(){a()(this).data("close")?l(a()(this),"close"):a()(this).trigger("close.zf.trigger")},toggleListener:function(){a()(this).data("toggle")?l(a()(this),"toggle"):a()(this).trigger("toggle.zf.trigger")},closeableListener:function(e){e.stopPropagation();var t=a()(this).data("closable");""!==t?s.Motion.animateOut(a()(this),t,function(){a()(this).trigger("closed.zf")}):a()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var e=a()(this).data("toggle-focus");a()("#"+e).triggerHandler("toggle.zf.trigger",[a()(this)])}},c.Initializers.addOpenListener=function(e){e.off("click.zf.trigger",c.Listeners.Basic.openListener),e.on("click.zf.trigger","[data-open]",c.Listeners.Basic.openListener)},c.Initializers.addCloseListener=function(e){e.off("click.zf.trigger",c.Listeners.Basic.closeListener),e.on("click.zf.trigger","[data-close]",c.Listeners.Basic.closeListener)},c.Initializers.addToggleListener=function(e){e.off("click.zf.trigger",c.Listeners.Basic.toggleListener),e.on("click.zf.trigger","[data-toggle]",c.Listeners.Basic.toggleListener)},c.Initializers.addCloseableListener=function(e){e.off("close.zf.trigger",c.Listeners.Basic.closeableListener),e.on("close.zf.trigger","[data-closeable], [data-closable]",c.Listeners.Basic.closeableListener)},c.Initializers.addToggleFocusListener=function(e){e.off("focus.zf.trigger blur.zf.trigger",c.Listeners.Basic.toggleFocusListener),e.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",c.Listeners.Basic.toggleFocusListener)},c.Listeners.Global={resizeListener:function(e){o||e.each(function(){a()(this).triggerHandler("resizeme.zf.trigger")}),e.attr("data-events","resize")},scrollListener:function(e){o||e.each(function(){a()(this).triggerHandler("scrollme.zf.trigger")}),e.attr("data-events","scroll")},closeMeListener:function(e,t){var i=e.namespace.split(".")[0];a()("[data-"+i+"]").not('[data-yeti-box="'+t+'"]').each(function(){var e=a()(this);e.triggerHandler("close.zf.trigger",[e])})}},c.Initializers.addClosemeListener=function(e){var t=a()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];if(e&&("string"==typeof e?i.push(e):"object"==typeof e&&"string"==typeof e[0]?i.concat(e):console.error("Plugin names must be strings")),t.length){var n=i.map(function(e){return"closeme.zf."+e}).join(" ");a()(window).off(n).on(n,c.Listeners.Global.closeMeListener)}},c.Initializers.addResizeListener=function(e){var t=a()("[data-resize]");t.length&&n(e,"resize.zf.trigger",c.Listeners.Global.resizeListener,t)},c.Initializers.addScrollListener=function(e){var t=a()("[data-scroll]");t.length&&n(e,"scroll.zf.trigger",c.Listeners.Global.scrollListener,t)},c.Initializers.addMutationEventsListener=function(e){if(!o)return!1;var t=e.find("[data-resize], [data-scroll], [data-mutate]"),i=function(e){var t=a()(e[0].target);switch(e[0].type){case"attributes":"scroll"===t.attr("data-events")&&"data-events"===e[0].attributeName&&t.triggerHandler("scrollme.zf.trigger",[t,window.pageYOffset]),"resize"===t.attr("data-events")&&"data-events"===e[0].attributeName&&t.triggerHandler("resizeme.zf.trigger",[t]),"style"===e[0].attributeName&&(t.closest("[data-mutate]").attr("data-events","mutate"),t.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[t.closest("[data-mutate]")]));break;case"childList":t.closest("[data-mutate]").attr("data-events","mutate"),t.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[t.closest("[data-mutate]")]);break;default:return!1}};if(t.length)for(var n=0;n<=t.length-1;n++){var r=new o(i);r.observe(t[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}},c.Initializers.addSimpleListeners=function(){var e=a()(document);c.Initializers.addOpenListener(e),c.Initializers.addCloseListener(e),c.Initializers.addToggleListener(e),c.Initializers.addCloseableListener(e),c.Initializers.addToggleFocusListener(e)},c.Initializers.addGlobalListeners=function(){var e=a()(document);c.Initializers.addMutationEventsListener(e),c.Initializers.addResizeListener(),c.Initializers.addScrollListener(),c.Initializers.addClosemeListener()},c.init=function(e,t){if(void 0===e.triggersInitialized){e(document);"complete"===document.readyState?(c.Initializers.addSimpleListeners(),c.Initializers.addGlobalListeners()):e(window).on("load",function(){c.Initializers.addSimpleListeners(),c.Initializers.addGlobalListeners()}),e.triggersInitialized=!0}t&&(t.Triggers=c,t.IHearYou=c.Initializers.addGlobalListeners)}},98:function(e,t,i){e.exports=i(32)}});;function truncateUserReviews(){if($('.review-txt').length){truncateDescrWithExpandLink('.review-txt-outer','Read More &#187;');}}
(function reviewsEnabledToggle(){$('#chk-reviews-enabled').on("change",function(){var $form=$(this).parents('form');$('input[name=disabled]',$form).val($(this).get(0).checked?"0":"1");$form.trigger("submit");});})();function displayVideo(){var selector='.m-screenshots-display-full iframe, .featherlight-content iframe';var vid=$(selector);if(vid.length){if(vid.data('src')){vid.attr('src',vid.data('src'));}}}
if($('form.rate-this-project').length>0){var $rate_form=$('form.rate-this-project');$rate_form.find('.star-rating').on("click",function(){$(this).parents('form').trigger("submit");});$rate_form.find('input.star').on("change",function(){$(this).parents('form').trigger("submit");});}
truncateUserReviews();$('.psp-section').on('click',function(e){if(Foundation.MediaQuery.current==='small'){var $section=$(this);if($section.is('.is-active')){var clicked_h3=$('h3:first',$section).is(e.target);var clicked_section_itself=$section.is(e.target);if(clicked_h3||clicked_section_itself){$(this).toggleClass('is-active');}}else{$(this).toggleClass('is-active');}}});$(document).ready(function(){if($().owlCarousel){$(".owl-carousel").owlCarousel({nav:true,margin:11,navText:['',''],responsive:{0:{items:2},490:{items:3},735:{items:4},}});}
if($().featherlightGallery){$('.m-screenshots, .thumbnail-single').each(function(){$('.gallery',this).featherlightGallery({nextIcon:'',previousIcon:'',loading:'<div class="loading">loading...</div>',afterContent:function(event){var caption=this.$currentTarget.attr('title');$('.featherlight-content .caption').remove();var alt=this.$currentTarget.attr('data-alt');$('.featherlight-content > img').attr('alt',alt);if(caption){var captionContainer=$('<div class="caption"></div>').text(caption);$('.featherlight-content').append(captionContainer);}
displayVideo();}});});$('.btn-nearest-gallery').on("click",function(e){e.preventDefault();$(this).siblings(".gallery").eq(0).click();return false;});}});$('.thumbnail','.m-screenshots[data-mode="inline"]').on("click",function(e){var $full=$('.m-screenshots-display-full');$full.text('loading...');var $t=$(e.currentTarget);if($t.hasClass('video-screenshot')){$full.html($t.data('featherlight'));displayVideo();}else{var img=new Image();if($t.attr('title')){img.setAttribute('alt',$t.attr('title'));}else{img.setAttribute('alt',$t.data('alt'));}
img.onload=function(){var markup='<img src="'+img.src+'" alt="'+img.alt+'">';var caption='';if($t.attr('title')){caption=$('<div/>').text($t.attr('title')).html();markup+='<p class="screenshot-caption">'+caption+'</p>';}
$full.html(markup);handleOverflownCaptions($full);};img.src=$t.attr('href');}
return false;});displayVideo();function handleOverflownCaptions($el){if(!$el){$el=$('.m-screenshots-display-full');}
var caption=$('p',$el);if(caption.length&&isOverflown(caption.get(0))){var tooltip=new Foundation.Tooltip(caption,{'tipText':caption.text(),triggerClass:'',maxWidth:'20rem',clickOpen:true,templateClasses:'tooltip-billboard'});}}
handleOverflownCaptions();$(function(){var trusted=$('.download-container .tip.trusted-file');if(trusted.length){var tooltip=new Foundation.Tooltip(trusted,{'tipText':'This download has been scanned for malware. All downloads on SourceForge are scanned for malware.'});}});function reflowProjectMenu(){function getOverflowedItems(){if(Foundation.MediaQuery.current==='small'){return[];}
return $('#top_nav_admin ul.dropdown > li').map(function(){if($(this).position().top!==0){return this;}}).get();}
var overflowedMenuItems=getOverflowedItems();var $menu=$('#top_nav_admin ul.dropdown');var menu_margins=$menu.outerWidth(true)-$menu.outerWidth();if(overflowedMenuItems.length){if(!$('#top_nav_admin ul.dropdown #ddd').length){$menu.append("<li id='ddd'><a>\u2022\u2022\u2022</a><ul></ul></li>");}
var ddd_width=$('#ddd').outerWidth(true);$('#add-tool-container').css({'position':'absolute','right':ddd_width+menu_margins,'top':0,});var new_width=$menu.parent().width()-menu_margins-ddd_width-($('#add-tool-container').outerWidth(true)||0);$menu.width(new_width);overflowedMenuItems=getOverflowedItems();var ddd_contents=overflowedMenuItems.map(function(elem,i){var react_attr=/data-reactid=".*?"/g;return elem.outerHTML.replace(/\u25BE/g,'').replace(react_attr,'');}).join('');$('#top_nav_admin ul.dropdown #ddd ul').html(ddd_contents);}else{$('#top_nav_admin ul.dropdown #ddd').remove();$menu.width("auto");$('#add-tool-container').css({'position':'relative','right':0,});}}
if($('#top_nav_admin').length){var $dropdowns=$('.dropdown > li ul').parent().find('> a');var usingTouch=false;$dropdowns.on('touchstart',function(){usingTouch=true;});$dropdowns.on('click',function(e){if(usingTouch){e.preventDefault();}});if(window.MutationObserver){new MutationObserver(function(){if(!$('ul.dropdown').length){var top_of_react_dom=$('#top_nav_admin > div').get(0);new MutationObserver(reflowProjectMenu).observe(top_of_react_dom,{childList:true});}}).observe(document.getElementById('top_nav_admin'),{childList:true});}
window.addEventListener('resize',reflowProjectMenu);if(!SF.initial_breakpoints_visible||SF.initial_breakpoints_visible.medium){$(reflowProjectMenu);}}
$(function(){if(window.fitty){var selector='.v-sf h1.long-title';fitty(selector,{minSize:24,maxSize:48,observeMutations:{subtree:true,childList:true,characterData:true}});}});;/*!
* jQuery Typeahead
* Copyright (C) 2018 RunningCoder.org
* Licensed under the MIT license
*
* @author Tom Bertrand
* @version 2.10.6 (2018-7-30)
* @link http://www.runningcoder.org/jquerytypeahead/
*/!function(e){var t;"function"==typeof define&&define.amd?define("jquery-typeahead",["jquery"],function(t){return e(t)}):"object"==typeof module&&module.exports?module.exports=(void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(void 0)),e(t)):e(jQuery)}(function(j){"use strict";var i,s={input:null,minLength:2,maxLength:!(window.Typeahead={version:"2.10.6"}),maxItem:8,dynamic:!1,delay:300,order:null,offset:!1,hint:!1,accent:!1,highlight:!0,multiselect:null,group:!1,groupOrder:null,maxItemPerGroup:null,dropdownFilter:!1,dynamicFilter:null,backdrop:!1,backdropOnFocus:!1,cache:!1,ttl:36e5,compression:!1,searchOnFocus:!1,blurOnTab:!0,resultContainer:null,generateOnLoad:null,mustSelectItem:!1,href:null,display:["display"],template:null,templateValue:null,groupTemplate:null,correlativeTemplate:!1,emptyTemplate:!1,cancelButton:!0,loadingAnimation:!0,filter:!0,matcher:null,source:null,callback:{onInit:null,onReady:null,onShowLayout:null,onHideLayout:null,onSearch:null,onResult:null,onLayoutBuiltBefore:null,onLayoutBuiltAfter:null,onNavigateBefore:null,onNavigateAfter:null,onEnter:null,onLeave:null,onClickBefore:null,onClickAfter:null,onDropdownFilter:null,onSendRequest:null,onReceiveRequest:null,onPopulateSource:null,onCacheSave:null,onSubmit:null,onCancel:null},selector:{container:"typeahead__container",result:"typeahead__result",list:"typeahead__list",group:"typeahead__group",item:"typeahead__item",empty:"typeahead__empty",display:"typeahead__display",query:"typeahead__query",filter:"typeahead__filter",filterButton:"typeahead__filter-button",dropdown:"typeahead__dropdown",dropdownItem:"typeahead__dropdown-item",labelContainer:"typeahead__label-container",label:"typeahead__label",button:"typeahead__button",backdrop:"typeahead__backdrop",hint:"typeahead__hint",cancelButton:"typeahead__cancel-button"},debug:!1},o={from:"ãàáäâẽèéëêìíïîõòóöôùúüûñç",to:"aaaaaeeeeeiiiiooooouuuunc"},n=~window.navigator.appVersion.indexOf("MSIE 9."),r=~window.navigator.appVersion.indexOf("MSIE 10"),a=!!~window.navigator.userAgent.indexOf("Trident")&&~window.navigator.userAgent.indexOf("rv:11"),l=function(t,e){this.rawQuery=t.val()||"",this.query=t.val()||"",this.selector=t[0].selector,this.deferred=null,this.tmpSource={},this.source={},this.dynamicGroups=[],this.hasDynamicGroups=!1,this.generatedGroupCount=0,this.groupBy="group",this.groups=[],this.searchGroups=[],this.generateGroups=[],this.requestGroups=[],this.result=[],this.tmpResult={},this.groupTemplate="",this.resultHtml=null,this.resultCount=0,this.resultCountPerGroup={},this.options=e,this.node=t,this.namespace="."+this.helper.slugify.call(this,this.selector)+".typeahead",this.isContentEditable=void 0!==this.node.attr("contenteditable")&&"false"!==this.node.attr("contenteditable"),this.container=null,this.resultContainer=null,this.item=null,this.items=null,this.comparedItems=null,this.xhr={},this.hintIndex=null,this.filters={dropdown:{},dynamic:{}},this.dropdownFilter={static:[],dynamic:[]},this.dropdownFilterAll=null,this.isDropdownEvent=!1,this.requests={},this.backdrop={},this.hint={},this.label={},this.hasDragged=!1,this.focusOnly=!1,this.displayEmptyTemplate,this.__construct()};l.prototype={_validateCacheMethod:function(t){var e;if(!0===t)t="localStorage";else if("string"==typeof t&&!~["localStorage","sessionStorage"].indexOf(t))return!1;e=void 0!==window[t];try{window[t].setItem("typeahead","typeahead"),window[t].removeItem("typeahead")}catch(t){e=!1}return e&&t||!1},extendOptions:function(){if(this.options.cache=this._validateCacheMethod(this.options.cache),this.options.compression&&("object"==typeof LZString&&this.options.cache||(this.options.compression=!1)),this.options.maxLength&&!isNaN(this.options.maxLength)||(this.options.maxLength=1/0),void 0!==this.options.maxItem&&~[0,!1].indexOf(this.options.maxItem)&&(this.options.maxItem=1/0),this.options.maxItemPerGroup&&!/^\d+$/.test(this.options.maxItemPerGroup)&&(this.options.maxItemPerGroup=null),this.options.display&&!Array.isArray(this.options.display)&&(this.options.display=[this.options.display]),this.options.multiselect&&(this.items=[],this.comparedItems=[],"string"==typeof this.options.multiselect.matchOn&&(this.options.multiselect.matchOn=[this.options.multiselect.matchOn])),this.options.group&&(Array.isArray(this.options.group)||("string"==typeof this.options.group?this.options.group={key:this.options.group}:"boolean"==typeof this.options.group&&(this.options.group={key:"group"}),this.options.group.key=this.options.group.key||"group")),this.options.highlight&&!~["any",!0].indexOf(this.options.highlight)&&(this.options.highlight=!1),this.options.dropdownFilter&&this.options.dropdownFilter instanceof Object){Array.isArray(this.options.dropdownFilter)||(this.options.dropdownFilter=[this.options.dropdownFilter]);for(var t=0,e=this.options.dropdownFilter.length;t<e;++t)this.dropdownFilter[this.options.dropdownFilter[t].value?"static":"dynamic"].push(this.options.dropdownFilter[t])}this.options.dynamicFilter&&!Array.isArray(this.options.dynamicFilter)&&(this.options.dynamicFilter=[this.options.dynamicFilter]),this.options.accent&&("object"==typeof this.options.accent?this.options.accent.from&&this.options.accent.to&&(this.options.accent.from.length,this.options.accent.to.length):this.options.accent=o),this.options.groupTemplate&&(this.groupTemplate=this.options.groupTemplate),this.options.resultContainer&&("string"==typeof this.options.resultContainer&&(this.options.resultContainer=j(this.options.resultContainer)),this.options.resultContainer instanceof j&&this.options.resultContainer[0]&&(this.resultContainer=this.options.resultContainer)),this.options.group&&this.options.group.key&&(this.groupBy=this.options.group.key),this.options.callback&&this.options.callback.onClick&&(this.options.callback.onClickBefore=this.options.callback.onClick,delete this.options.callback.onClick),this.options.callback&&this.options.callback.onNavigate&&(this.options.callback.onNavigateBefore=this.options.callback.onNavigate,delete this.options.callback.onNavigate),this.options=j.extend(!0,{},s,this.options)},unifySourceFormat:function(){var t,e,i;for(t in this.dynamicGroups=[],Array.isArray(this.options.source)&&(this.options.source={group:{data:this.options.source}}),"string"==typeof this.options.source&&(this.options.source={group:{ajax:{url:this.options.source}}}),this.options.source.ajax&&(this.options.source={group:{ajax:this.options.source.ajax}}),(this.options.source.url||this.options.source.data)&&(this.options.source={group:this.options.source}),this.options.source)if(this.options.source.hasOwnProperty(t)){if("string"==typeof(e=this.options.source[t])&&(e={ajax:{url:e}}),i=e.url||e.ajax,Array.isArray(i)?(e.ajax="string"==typeof i[0]?{url:i[0]}:i[0],e.ajax.path=e.ajax.path||i[1]||null):"object"==typeof e.url?e.ajax=e.url:"string"==typeof e.url&&(e.ajax={url:e.url}),delete e.url,!e.data&&!e.ajax)return!1;e.display&&!Array.isArray(e.display)&&(e.display=[e.display]),e.minLength="number"==typeof e.minLength?e.minLength:this.options.minLength,e.maxLength="number"==typeof e.maxLength?e.maxLength:this.options.maxLength,e.dynamic="boolean"==typeof e.dynamic||this.options.dynamic,e.minLength>e.maxLength&&(e.minLength=e.maxLength),this.options.source[t]=e,this.options.source[t].dynamic&&this.dynamicGroups.push(t),e.cache=void 0!==e.cache?this._validateCacheMethod(e.cache):this.options.cache,e.compression&&("object"==typeof LZString&&e.cache||(e.compression=!1))}return this.hasDynamicGroups=this.options.dynamic||!!this.dynamicGroups.length,!0},init:function(){this.helper.executeCallback.call(this,this.options.callback.onInit,[this.node]),this.container=this.node.closest("."+this.options.selector.container)},delegateEvents:function(){var i=this,t=["focus"+this.namespace,"input"+this.namespace,"propertychange"+this.namespace,"keydown"+this.namespace,"keyup"+this.namespace,"search"+this.namespace,"generate"+this.namespace];j("html").on("touchmove",function(){i.hasDragged=!0}).on("touchstart",function(){i.hasDragged=!1}),this.node.closest("form").on("submit",function(t){if(!i.options.mustSelectItem||!i.helper.isEmpty(i.item))return i.options.backdropOnFocus||i.hideLayout(),i.options.callback.onSubmit?i.helper.executeCallback.call(i,i.options.callback.onSubmit,[i.node,this,i.item||i.items,t]):void 0;t.preventDefault()}).on("reset",function(){setTimeout(function(){i.node.trigger("input"+i.namespace),i.hideLayout()})});var s=!1;if(this.node.attr("placeholder")&&(r||a)){var e=!0;this.node.on("focusin focusout",function(){e=!(this.value||!this.placeholder)}),this.node.on("input",function(t){e&&(t.stopImmediatePropagation(),e=!1)})}this.node.off(this.namespace).on(t.join(" "),function(t,e){switch(t.type){case"generate":i.generateSource(Object.keys(i.options.source));break;case"focus":if(i.focusOnly){i.focusOnly=!1;break}i.options.backdropOnFocus&&(i.buildBackdropLayout(),i.showLayout()),i.options.searchOnFocus&&!i.item&&(i.deferred=j.Deferred(),i.assignQuery(),i.generateSource());break;case"keydown":8===t.keyCode&&i.options.multiselect&&i.options.multiselect.cancelOnBackspace&&""===i.query&&i.items.length?i.cancelMultiselectItem(i.items.length-1,null,t):t.keyCode&&~[9,13,27,38,39,40].indexOf(t.keyCode)&&(s=!0,i.navigate(t));break;case"keyup":n&&i.node[0].value.replace(/^\s+/,"").toString().length<i.query.length&&i.node.trigger("input"+i.namespace);break;case"propertychange":if(s){s=!1;break}case"input":i.deferred=j.Deferred(),i.assignQuery(),""===i.rawQuery&&""===i.query&&(t.originalEvent=e||{},i.helper.executeCallback.call(i,i.options.callback.onCancel,[i.node,i.item,t]),i.item=null),i.options.cancelButton&&i.toggleCancelButtonVisibility(),i.options.hint&&i.hint.container&&""!==i.hint.container.val()&&0!==i.hint.container.val().indexOf(i.rawQuery)&&(i.hint.container.val(""),i.isContentEditable&&i.hint.container.text("")),i.hasDynamicGroups?i.helper.typeWatch(function(){i.generateSource()},i.options.delay):i.generateSource();break;case"search":i.searchResult(),i.buildLayout(),i.result.length||i.searchGroups.length&&i.displayEmptyTemplate?i.showLayout():i.hideLayout(),i.deferred&&i.deferred.resolve()}return i.deferred&&i.deferred.promise()}),this.options.generateOnLoad&&this.node.trigger("generate"+this.namespace)},assignQuery:function(){this.isContentEditable?this.rawQuery=this.node.text():this.rawQuery=this.node.val().toString(),this.rawQuery=this.rawQuery.replace(/^\s+/,""),this.rawQuery!==this.query&&(this.query=this.rawQuery)},filterGenerateSource:function(){if(this.searchGroups=[],this.generateGroups=[],!this.focusOnly||this.options.multiselect)for(var t in this.options.source)if(this.options.source.hasOwnProperty(t)&&this.query.length>=this.options.source[t].minLength&&this.query.length<=this.options.source[t].maxLength){if(this.filters.dropdown&&"group"===this.filters.dropdown.key&&this.filters.dropdown.value!==t)continue;if(this.searchGroups.push(t),!this.options.source[t].dynamic&&this.source[t])continue;this.generateGroups.push(t)}},generateSource:function(t){if(this.filterGenerateSource(),Array.isArray(t)&&t.length)this.generateGroups=t;else if(!this.generateGroups.length)return void this.node.trigger("search"+this.namespace);if(this.requestGroups=[],this.generatedGroupCount=0,this.options.loadingAnimation&&this.container.addClass("loading"),!this.helper.isEmpty(this.xhr)){for(var e in this.xhr)this.xhr.hasOwnProperty(e)&&this.xhr[e].abort();this.xhr={}}for(var i,s,o,n,r,a,l,h=this,c=(e=0,this.generateGroups.length);e<c;++e){if(i=this.generateGroups[e],n=(o=this.options.source[i]).cache,r=o.compression,n&&(a=window[n].getItem("TYPEAHEAD_"+this.selector+":"+i))){r&&(a=LZString.decompressFromUTF16(a)),l=!1;try{(a=JSON.parse(a+"")).data&&a.ttl>(new Date).getTime()?(this.populateSource(a.data,i),l=!0):window[n].removeItem("TYPEAHEAD_"+this.selector+":"+i)}catch(t){}if(l)continue}!o.data||o.ajax?o.ajax&&(this.requests[i]||(this.requests[i]=this.generateRequestObject(i)),this.requestGroups.push(i)):"function"==typeof o.data?(s=o.data.call(this),Array.isArray(s)?h.populateSource(s,i):"function"==typeof s.promise&&function(e){j.when(s).then(function(t){t&&Array.isArray(t)&&h.populateSource(t,e)})}(i)):this.populateSource(j.extend(!0,[],o.data),i)}return this.requestGroups.length&&this.handleRequests(),!!this.generateGroups.length},generateRequestObject:function(s){var o=this,n=this.options.source[s],t={request:{url:n.ajax.url||null,dataType:"json",beforeSend:function(t,e){o.xhr[s]=t;var i=o.requests[s].callback.beforeSend||n.ajax.beforeSend;"function"==typeof i&&i.apply(null,arguments)}},callback:{beforeSend:null,done:null,fail:null,then:null,always:null},extra:{path:n.ajax.path||null,group:s},validForGroup:[s]};if("function"!=typeof n.ajax&&(n.ajax instanceof Object&&(t=this.extendXhrObject(t,n.ajax)),1<Object.keys(this.options.source).length))for(var e in this.requests)this.requests.hasOwnProperty(e)&&(this.requests[e].isDuplicated||t.request.url&&t.request.url===this.requests[e].request.url&&(this.requests[e].validForGroup.push(s),t.isDuplicated=!0,delete t.validForGroup));return t},extendXhrObject:function(t,e){return"object"==typeof e.callback&&(t.callback=e.callback,delete e.callback),"function"==typeof e.beforeSend&&(t.callback.beforeSend=e.beforeSend,delete e.beforeSend),t.request=j.extend(!0,t.request,e),"jsonp"!==t.request.dataType.toLowerCase()||t.request.jsonpCallback||(t.request.jsonpCallback="callback_"+t.extra.group),t},handleRequests:function(){var t,h=this,c=this.requestGroups.length;if(!1!==this.helper.executeCallback.call(this,this.options.callback.onSendRequest,[this.node,this.query]))for(var e=0,i=this.requestGroups.length;e<i;++e)t=this.requestGroups[e],this.requests[t].isDuplicated||function(t,r){if("function"==typeof h.options.source[t].ajax){var e=h.options.source[t].ajax.call(h,h.query);if("object"!=typeof(r=h.extendXhrObject(h.generateRequestObject(t),"object"==typeof e?e:{})).request||!r.request.url)return h.populateSource([],t);h.requests[t]=r}var a,i=!1,l={};if(~r.request.url.indexOf("{{query}}")&&(i||(r=j.extend(!0,{},r),i=!0),r.request.url=r.request.url.replace("{{query}}",encodeURIComponent(h.query))),r.request.data)for(var s in r.request.data)if(r.request.data.hasOwnProperty(s)&&~String(r.request.data[s]).indexOf("{{query}}")){i||(r=j.extend(!0,{},r),i=!0),r.request.data[s]=r.request.data[s].replace("{{query}}",h.query);break}j.ajax(r.request).done(function(t,e,i){for(var s,o=0,n=r.validForGroup.length;o<n;o++)s=r.validForGroup[o],"function"==typeof(a=h.requests[s]).callback.done&&(l[s]=a.callback.done.call(h,t,e,i))}).fail(function(t,e,i){for(var s=0,o=r.validForGroup.length;s<o;s++)(a=h.requests[r.validForGroup[s]]).callback.fail instanceof Function&&a.callback.fail.call(h,t,e,i)}).always(function(t,e,i){for(var s,o=0,n=r.validForGroup.length;o<n;o++){if(s=r.validForGroup[o],(a=h.requests[s]).callback.always instanceof Function&&a.callback.always.call(h,t,e,i),"abort"===e)return;h.populateSource(null!==t&&"function"==typeof t.promise&&[]||l[s]||t,a.extra.group,a.extra.path||a.request.path),0===(c-=1)&&h.helper.executeCallback.call(h,h.options.callback.onReceiveRequest,[h.node,h.query])}}).then(function(t,e){for(var i=0,s=r.validForGroup.length;i<s;i++)(a=h.requests[r.validForGroup[i]]).callback.then instanceof Function&&a.callback.then.call(h,t,e)})}(t,this.requests[t])},populateSource:function(i,t,e){var s=this,o=this.options.source[t],n=o.ajax&&o.data;e&&"string"==typeof e&&(i=this.helper.namespace.call(this,e,i)),Array.isArray(i)||(i=[]),n&&("function"==typeof n&&(n=n()),Array.isArray(n)&&(i=i.concat(n)));for(var r,a=o.display?"compiled"===o.display[0]?o.display[1]:o.display[0]:"compiled"===this.options.display[0]?this.options.display[1]:this.options.display[0],l=0,h=i.length;l<h;l++)null!==i[l]&&"boolean"!=typeof i[l]&&("string"==typeof i[l]&&((r={})[a]=i[l],i[l]=r),i[l].group=t);if(!this.hasDynamicGroups&&this.dropdownFilter.dynamic.length){var c,p,u={};for(l=0,h=i.length;l<h;l++)for(var d=0,f=this.dropdownFilter.dynamic.length;d<f;d++)c=this.dropdownFilter.dynamic[d].key,(p=i[l][c])&&(this.dropdownFilter.dynamic[d].value||(this.dropdownFilter.dynamic[d].value=[]),u[c]||(u[c]=[]),~u[c].indexOf(p.toLowerCase())||(u[c].push(p.toLowerCase()),this.dropdownFilter.dynamic[d].value.push(p)))}if(this.options.correlativeTemplate){var m=o.template||this.options.template,g="";if("function"==typeof m&&(m=m.call(this,"",{})),m){if(Array.isArray(this.options.correlativeTemplate))for(l=0,h=this.options.correlativeTemplate.length;l<h;l++)g+="{{"+this.options.correlativeTemplate[l]+"}} ";else g=m.replace(/<.+?>/g," ").replace(/\s{2,}/," ").trim();for(l=0,h=i.length;l<h;l++)i[l].compiled=j("<textarea />").html(g.replace(/\{\{([\w\-\.]+)(?:\|(\w+))?}}/g,function(t,e){return s.helper.namespace.call(s,e,i[l],"get","")}).trim()).text();o.display?~o.display.indexOf("compiled")||o.display.unshift("compiled"):~this.options.display.indexOf("compiled")||this.options.display.unshift("compiled")}else;}this.options.callback.onPopulateSource&&(i=this.helper.executeCallback.call(this,this.options.callback.onPopulateSource,[this.node,i,t,e])),this.tmpSource[t]=Array.isArray(i)&&i||[];var y=this.options.source[t].cache,v=this.options.source[t].compression,b=this.options.source[t].ttl||this.options.ttl;if(y&&!window[y].getItem("TYPEAHEAD_"+this.selector+":"+t)){this.options.callback.onCacheSave&&(i=this.helper.executeCallback.call(this,this.options.callback.onCacheSave,[this.node,i,t,e]));var k=JSON.stringify({data:i,ttl:(new Date).getTime()+b});v&&(k=LZString.compressToUTF16(k)),window[y].setItem("TYPEAHEAD_"+this.selector+":"+t,k)}this.incrementGeneratedGroup()},incrementGeneratedGroup:function(){if(this.generatedGroupCount++,this.generatedGroupCount===this.generateGroups.length){this.xhr={};for(var t=0,e=this.generateGroups.length;t<e;t++)this.source[this.generateGroups[t]]=this.tmpSource[this.generateGroups[t]];this.hasDynamicGroups||this.buildDropdownItemLayout("dynamic"),this.options.loadingAnimation&&this.container.removeClass("loading"),this.node.trigger("search"+this.namespace)}},navigate:function(t){if(this.helper.executeCallback.call(this,this.options.callback.onNavigateBefore,[this.node,this.query,t]),27===t.keyCode)return t.preventDefault(),void(this.query.length?(this.resetInput(),this.node.trigger("input"+this.namespace,[t])):(this.node.blur(),this.hideLayout()));if(this.result.length){var e,i=this.resultContainer.find("."+this.options.selector.item).not("[disabled]"),s=i.filter(".active"),o=s[0]?i.index(s):null,n=s[0]?s.attr("data-index"):null,r=null;if(this.clearActiveItem(),this.helper.executeCallback.call(this,this.options.callback.onLeave,[this.node,null!==o&&i.eq(o)||void 0,null!==n&&this.result[n]||void 0,t]),13===t.keyCode)return t.preventDefault(),void(0<s.length?"javascript:;"===s.find("a:first")[0].href?s.find("a:first").trigger("click",t):s.find("a:first")[0].click():this.node.closest("form").trigger("submit"));if(39!==t.keyCode){9===t.keyCode?this.options.blurOnTab?this.hideLayout():0<s.length?o+1<i.length?(t.preventDefault(),r=o+1,this.addActiveItem(i.eq(r))):this.hideLayout():i.length?(t.preventDefault(),r=0,this.addActiveItem(i.first())):this.hideLayout():38===t.keyCode?(t.preventDefault(),0<s.length?0<=o-1&&(r=o-1,this.addActiveItem(i.eq(r))):i.length&&(r=i.length-1,this.addActiveItem(i.last()))):40===t.keyCode&&(t.preventDefault(),0<s.length?o+1<i.length&&(r=o+1,this.addActiveItem(i.eq(r))):i.length&&(r=0,this.addActiveItem(i.first()))),e=null!==r?i.eq(r).attr("data-index"):null,this.helper.executeCallback.call(this,this.options.callback.onEnter,[this.node,null!==r&&i.eq(r)||void 0,null!==e&&this.result[e]||void 0,t]),t.preventInputChange&&~[38,40].indexOf(t.keyCode)&&this.buildHintLayout(null!==e&&e<this.result.length?[this.result[e]]:null),this.options.hint&&this.hint.container&&this.hint.container.css("color",t.preventInputChange?this.hint.css.color:null===e&&this.hint.css.color||this.hint.container.css("background-color")||"fff");var a=null===e||t.preventInputChange?this.rawQuery:this.getTemplateValue.call(this,this.result[e]);this.node.val(a),this.isContentEditable&&this.node.text(a),this.helper.executeCallback.call(this,this.options.callback.onNavigateAfter,[this.node,i,null!==r&&i.eq(r).find("a:first")||void 0,null!==e&&this.result[e]||void 0,this.query,t])}else null!==o?i.eq(o).find("a:first")[0].click():this.options.hint&&""!==this.hint.container.val()&&this.helper.getCaret(this.node[0])>=this.query.length&&i.filter('[data-index="'+this.hintIndex+'"]').find("a:first")[0].click()}},getTemplateValue:function(i){if(i){var t=i.group&&this.options.source[i.group].templateValue||this.options.templateValue;if("function"==typeof t&&(t=t.call(this)),!t)return this.helper.namespace.call(this,i.matchedKey,i).toString();var s=this;return t.replace(/\{\{([\w\-.]+)}}/gi,function(t,e){return s.helper.namespace.call(s,e,i,"get","")})}},clearActiveItem:function(){this.resultContainer.find("."+this.options.selector.item).removeClass("active")},addActiveItem:function(t){t.addClass("active")},searchResult:function(){this.resetLayout(),!1!==this.helper.executeCallback.call(this,this.options.callback.onSearch,[this.node,this.query])&&(!this.searchGroups.length||this.options.multiselect&&this.options.multiselect.limit&&this.items.length>=this.options.multiselect.limit||this.searchResultData(),this.helper.executeCallback.call(this,this.options.callback.onResult,[this.node,this.query,this.result,this.resultCount,this.resultCountPerGroup]),this.isDropdownEvent&&(this.helper.executeCallback.call(this,this.options.callback.onDropdownFilter,[this.node,this.query,this.filters.dropdown,this.result]),this.isDropdownEvent=!1))},searchResultData:function(){var t,e,i,s,o,n,r,a,l,h,c,p=this.groupBy,u=null,d=this.query.toLowerCase(),f=this.options.maxItem,m=this.options.maxItemPerGroup,g=this.filters.dynamic&&!this.helper.isEmpty(this.filters.dynamic),y="function"==typeof this.options.matcher&&this.options.matcher;this.options.accent&&(d=this.helper.removeAccent.call(this,d));for(var v=0,b=this.searchGroups.length;v<b;++v)if(F=this.searchGroups[v],!this.filters.dropdown||"group"!==this.filters.dropdown.key||this.filters.dropdown.value===F){o=void 0!==this.options.source[F].filter?this.options.source[F].filter:this.options.filter,r="function"==typeof this.options.source[F].matcher&&this.options.source[F].matcher||y;for(var k=0,w=this.source[F].length;k<w&&(!(this.resultItemCount>=f)||this.options.callback.onResult);k++)if((!g||this.dynamicFilter.validate.apply(this,[this.source[F][k]]))&&null!==(t=this.source[F][k])&&"boolean"!=typeof t&&(!this.options.multiselect||this.isMultiselectUniqueData(t))&&(!this.filters.dropdown||(t[this.filters.dropdown.key]||"").toLowerCase()===(this.filters.dropdown.value||"").toLowerCase())){if((u="group"===p?F:t[p]?t[p]:t.group)&&!this.tmpResult[u]&&(this.tmpResult[u]=[],this.resultCountPerGroup[u]=0),m&&"group"===p&&this.tmpResult[u].length>=m&&!this.options.callback.onResult)break;for(var x=0,C=(S=this.options.source[F].display||this.options.display).length;x<C;++x){if(!1!==o){if(void 0===(s=/\./.test(S[x])?this.helper.namespace.call(this,S[x],t):t[S[x]])||""===s)continue;s=this.helper.cleanStringFromScript(s)}if("function"==typeof o){if(void 0===(n=o.call(this,t,s)))break;if(!n)continue;"object"==typeof n&&(t=n)}if(~[void 0,!0].indexOf(o)){if(null===s)continue;if(i=(i=s).toString().toLowerCase(),this.options.accent&&(i=this.helper.removeAccent.call(this,i)),e=i.indexOf(d),this.options.correlativeTemplate&&"compiled"===S[x]&&e<0&&/\s/.test(d)){l=!0,c=i;for(var q=0,A=(h=d.split(" ")).length;q<A;q++)if(""!==h[q]){if(!~c.indexOf(h[q])){l=!1;break}c=c.replace(h[q],"")}}if(e<0&&!l)continue;if(this.options.offset&&0!==e)continue;if(r){if(void 0===(a=r.call(this,t,s)))break;if(!a)continue;"object"==typeof a&&(t=a)}}if(this.resultCount++,this.resultCountPerGroup[u]++,this.resultItemCount<f){if(m&&this.tmpResult[u].length>=m)break;this.tmpResult[u].push(j.extend(!0,{matchedKey:S[x]},t)),this.resultItemCount++}break}if(!this.options.callback.onResult){if(this.resultItemCount>=f)break;if(m&&this.tmpResult[u].length>=m&&"group"===p)break}}}if(this.options.order){var O,S=[];for(var F in this.tmpResult)if(this.tmpResult.hasOwnProperty(F)){for(v=0,b=this.tmpResult[F].length;v<b;v++)O=this.options.source[this.tmpResult[F][v].group].display||this.options.display,~S.indexOf(O[0])||S.push(O[0]);this.tmpResult[F].sort(this.helper.sort(S,"asc"===this.options.order,function(t){return t.toString().toUpperCase()}))}}var L=[],I=[];for(v=0,b=(I="function"==typeof this.options.groupOrder?this.options.groupOrder.apply(this,[this.node,this.query,this.tmpResult,this.resultCount,this.resultCountPerGroup]):Array.isArray(this.options.groupOrder)?this.options.groupOrder:"string"==typeof this.options.groupOrder&&~["asc","desc"].indexOf(this.options.groupOrder)?Object.keys(this.tmpResult).sort(this.helper.sort([],"asc"===this.options.groupOrder,function(t){return t.toString().toUpperCase()})):Object.keys(this.tmpResult)).length;v<b;v++)L=L.concat(this.tmpResult[I[v]]||[]);this.groups=JSON.parse(JSON.stringify(I)),this.result=L},buildLayout:function(){this.buildHtmlLayout(),this.buildBackdropLayout(),this.buildHintLayout(),this.options.callback.onLayoutBuiltBefore&&(this.tmpResultHtml=this.helper.executeCallback.call(this,this.options.callback.onLayoutBuiltBefore,[this.node,this.query,this.result,this.resultHtml])),this.tmpResultHtml instanceof j?this.resultContainer.html(this.tmpResultHtml):this.resultHtml instanceof j&&this.resultContainer.html(this.resultHtml),this.options.callback.onLayoutBuiltAfter&&this.helper.executeCallback.call(this,this.options.callback.onLayoutBuiltAfter,[this.node,this.query,this.result])},buildHtmlLayout:function(){if(!1!==this.options.resultContainer){var h;if(this.resultContainer||(this.resultContainer=j("<div/>",{class:this.options.selector.result}),this.container.append(this.resultContainer)),!this.result.length)if(this.options.multiselect&&this.options.multiselect.limit&&this.items.length>=this.options.multiselect.limit)h=this.options.multiselect.limitTemplate?"function"==typeof this.options.multiselect.limitTemplate?this.options.multiselect.limitTemplate.call(this,this.query):this.options.multiselect.limitTemplate.replace(/\{\{query}}/gi,j("<div>").text(this.helper.cleanStringFromScript(this.query)).html()):"Can't select more than "+this.items.length+" items.";else{if(!this.options.emptyTemplate||""===this.query)return;h="function"==typeof this.options.emptyTemplate?this.options.emptyTemplate.call(this,this.query):this.options.emptyTemplate.replace(/\{\{query}}/gi,j("<div>").text(this.helper.cleanStringFromScript(this.query)).html())}this.displayEmptyTemplate=!!h;var o=this.query.toLowerCase();this.options.accent&&(o=this.helper.removeAccent.call(this,o));var c=this,t=this.groupTemplate||"<ul></ul>",p=!1;this.groupTemplate?t=j(t.replace(/<([^>]+)>\{\{(.+?)}}<\/[^>]+>/g,function(t,e,i,s,o){var n="",r="group"===i?c.groups:[i];if(!c.result.length)return!0===p?"":(p=!0,"<"+e+' class="'+c.options.selector.empty+'">'+h+"</"+e+">");for(var a=0,l=r.length;a<l;++a)n+="<"+e+' data-group-template="'+r[a]+'"><ul></ul></'+e+">";return n})):(t=j(t),this.result.length||t.append(h instanceof j?h:'<li class="'+c.options.selector.empty+'">'+h+"</li>")),t.addClass(this.options.selector.list+(this.helper.isEmpty(this.result)?" empty":""));for(var e,i,n,s,r,a,l,u,d,f,m,g,y,v=this.groupTemplate&&this.result.length&&c.groups||[],b=0,k=this.result.length;b<k;++b)e=(n=this.result[b]).group,s=!this.options.multiselect&&this.options.source[n.group].href||this.options.href,u=[],d=this.options.source[n.group].display||this.options.display,this.options.group&&(e=n[this.options.group.key],this.options.group.template&&("function"==typeof this.options.group.template?i=this.options.group.template.call(this,n):"string"==typeof this.options.group.template&&(i=this.options.group.template.replace(/\{\{([\w\-\.]+)}}/gi,function(t,e){return c.helper.namespace.call(c,e,n,"get","")}))),t.find('[data-search-group="'+e+'"]')[0]||(this.groupTemplate?t.find('[data-group-template="'+e+'"] ul'):t).append(j("<li/>",{class:c.options.selector.group,html:j("<a/>",{href:"javascript:;",html:i||e,tabindex:-1}),"data-search-group":e}))),this.groupTemplate&&v.length&&~(m=v.indexOf(e||n.group))&&v.splice(m,1),r=j("<li/>",{class:c.options.selector.item+" "+c.options.selector.group+"-"+this.helper.slugify.call(this,e),disabled:!!n.disabled,"data-group":e,"data-index":b,html:j("<a/>",{href:s&&!n.disabled?(g=s,y=n,y.href=c.generateHref.call(c,g,y)):"javascript:;",html:function(){if(a=n.group&&c.options.source[n.group].template||c.options.template)"function"==typeof a&&(a=a.call(c,c.query,n)),l=a.replace(/\{\{([^\|}]+)(?:\|([^}]+))*}}/gi,function(t,e,i){var s=c.helper.cleanStringFromScript(String(c.helper.namespace.call(c,e,n,"get","")));return~(i=i&&i.split("|")||[]).indexOf("slugify")&&(s=c.helper.slugify.call(c,s)),~i.indexOf("raw")||!0===c.options.highlight&&o&&~d.indexOf(e)&&(s=c.helper.highlight.call(c,s,o.split(" "),c.options.accent)),s});else{for(var t=0,e=d.length;t<e;t++)void 0!==(f=/\./.test(d[t])?c.helper.namespace.call(c,d[t],n,"get",""):n[d[t]])&&""!==f&&u.push(f);l='<span class="'+c.options.selector.display+'">'+c.helper.cleanStringFromScript(String(u.join(" ")))+"</span>"}(!0===c.options.highlight&&o&&!a||"any"===c.options.highlight)&&(l=c.helper.highlight.call(c,l,o.split(" "),c.options.accent)),j(this).append(l)}})}),function(t,i,e){e.on("click",function(t,e){i.disabled?t.preventDefault():(e&&"object"==typeof e&&(t.originalEvent=e),c.options.mustSelectItem&&c.helper.isEmpty(i)?t.preventDefault():(c.options.multiselect||(c.item=i),!1!==c.helper.executeCallback.call(c,c.options.callback.onClickBefore,[c.node,j(this),i,t])&&(t.originalEvent&&t.originalEvent.defaultPrevented||t.isDefaultPrevented()||(c.options.multiselect?(c.query=c.rawQuery="",c.addMultiselectItemLayout(i)):(c.focusOnly=!0,c.query=c.rawQuery=c.getTemplateValue.call(c,i),c.isContentEditable&&(c.node.text(c.query),c.helper.setCaretAtEnd(c.node[0]))),c.hideLayout(),c.node.val(c.query).focus(),c.options.cancelButton&&c.toggleCancelButtonVisibility(),c.helper.executeCallback.call(c,c.options.callback.onClickAfter,[c.node,j(this),i,t])))))}),e.on("mouseenter",function(t){i.disabled||(c.clearActiveItem(),c.addActiveItem(j(this))),c.helper.executeCallback.call(c,c.options.callback.onEnter,[c.node,j(this),i,t])}),e.on("mouseleave",function(t){i.disabled||c.clearActiveItem(),c.helper.executeCallback.call(c,c.options.callback.onLeave,[c.node,j(this),i,t])})}(0,n,r),(this.groupTemplate?t.find('[data-group-template="'+e+'"] ul'):t).append(r);if(this.result.length&&v.length)for(b=0,k=v.length;b<k;++b)t.find('[data-group-template="'+v[b]+'"]').remove();this.resultHtml=t}},generateHref:function(t,o){var n=this;return"string"==typeof t?t=t.replace(/\{\{([^\|}]+)(?:\|([^}]+))*}}/gi,function(t,e,i){var s=n.helper.namespace.call(n,e,o,"get","");return~(i=i&&i.split("|")||[]).indexOf("slugify")&&(s=n.helper.slugify.call(n,s)),s}):"function"==typeof t&&(t=t.call(this,o)),t},getMultiselectComparedData:function(t){var e="";if(Array.isArray(this.options.multiselect.matchOn))for(var i=0,s=this.options.multiselect.matchOn.length;i<s;++i)e+=void 0!==t[this.options.multiselect.matchOn[i]]?t[this.options.multiselect.matchOn[i]]:"";else{var o=JSON.parse(JSON.stringify(t)),n=["group","matchedKey","compiled","href"];for(i=0,s=n.length;i<s;++i)delete o[n[i]];e=JSON.stringify(o)}return e},buildBackdropLayout:function(){this.options.backdrop&&(this.backdrop.container||(this.backdrop.css=j.extend({opacity:.6,filter:"alpha(opacity=60)",position:"fixed",top:0,right:0,bottom:0,left:0,"z-index":1040,"background-color":"#000"},this.options.backdrop),this.backdrop.container=j("<div/>",{class:this.options.selector.backdrop,css:this.backdrop.css}).insertAfter(this.container)),this.container.addClass("backdrop").css({"z-index":this.backdrop.css["z-index"]+1,position:"relative"}))},buildHintLayout:function(t){if(this.options.hint)if(this.node[0].scrollWidth>Math.ceil(this.node.innerWidth()))this.hint.container&&this.hint.container.val("");else{var e=this,i="",s=(t=t||this.result,this.query.toLowerCase());if(this.options.accent&&(s=this.helper.removeAccent.call(this,s)),this.hintIndex=null,this.searchGroups.length){if(this.hint.container||(this.hint.css=j.extend({"border-color":"transparent",position:"absolute",top:0,display:"inline","z-index":-1,float:"none",color:"silver","box-shadow":"none",cursor:"default","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},this.options.hint),this.hint.container=j("<"+this.node[0].nodeName+"/>",{type:this.node.attr("type"),class:this.node.attr("class"),readonly:!0,unselectable:"on","aria-hidden":"true",tabindex:-1,click:function(){e.node.focus()}}).addClass(this.options.selector.hint).css(this.hint.css).insertAfter(this.node),this.node.parent().css({position:"relative"})),this.hint.container.css("color",this.hint.css.color),s)for(var o,n,r,a=0,l=t.length;a<l;a++)if(!t[a].disabled){n=t[a].group;for(var h=0,c=(o=this.options.source[n].display||this.options.display).length;h<c;h++)if(r=String(t[a][o[h]]).toLowerCase(),this.options.accent&&(r=this.helper.removeAccent.call(this,r)),0===r.indexOf(s)){i=String(t[a][o[h]]),this.hintIndex=a;break}if(null!==this.hintIndex)break}var p=0<i.length&&this.rawQuery+i.substring(this.query.length)||"";this.hint.container.val(p),this.isContentEditable&&this.hint.container.text(p)}}},buildDropdownLayout:function(){if(this.options.dropdownFilter){var i=this;j("<span/>",{class:this.options.selector.filter,html:function(){j(this).append(j("<button/>",{type:"button",class:i.options.selector.filterButton,style:"display: none;",click:function(){i.container.toggleClass("filter");var e=i.namespace+"-dropdown-filter";j("html").off(e),i.container.hasClass("filter")&&j("html").on("click"+e+" touchend"+e,function(t){j(t.target).closest("."+i.options.selector.filter)[0]&&j(t.target).closest(i.container)[0]||i.hasDragged||(i.container.removeClass("filter"),j("html").off(e))})}})),j(this).append(j("<ul/>",{class:i.options.selector.dropdown}))}}).insertAfter(i.container.find("."+i.options.selector.query))}},buildDropdownItemLayout:function(t){if(this.options.dropdownFilter){var e,i,o=this,n="string"==typeof this.options.dropdownFilter&&this.options.dropdownFilter||"All",r=this.container.find("."+this.options.selector.dropdown);"static"!==t||!0!==this.options.dropdownFilter&&"string"!=typeof this.options.dropdownFilter||this.dropdownFilter.static.push({key:"group",template:"{{group}}",all:n,value:Object.keys(this.options.source)});for(var s=0,a=this.dropdownFilter[t].length;s<a;s++){i=this.dropdownFilter[t][s],Array.isArray(i.value)||(i.value=[i.value]),i.all&&(this.dropdownFilterAll=i.all);for(var l=0,h=i.value.length;l<=h;l++)l===h&&s!==a-1||l===h&&s===a-1&&"static"===t&&this.dropdownFilter.dynamic.length||(e=this.dropdownFilterAll||n,i.value[l]?e=i.template?i.template.replace(new RegExp("{{"+i.key+"}}","gi"),i.value[l]):i.value[l]:this.container.find("."+o.options.selector.filterButton).html(e),function(e,i,s){r.append(j("<li/>",{class:o.options.selector.dropdownItem+" "+o.helper.slugify.call(o,i.key+"-"+(i.value[e]||n)),html:j("<a/>",{href:"javascript:;",html:s,click:function(t){t.preventDefault(),c.call(o,{key:i.key,value:i.value[e]||"*",template:s})}})}))}(l,i,e))}this.dropdownFilter[t].length&&this.container.find("."+o.options.selector.filterButton).removeAttr("style")}function c(t){"*"===t.value?delete this.filters.dropdown:this.filters.dropdown=t,this.container.removeClass("filter").find("."+this.options.selector.filterButton).html(t.template),this.isDropdownEvent=!0,this.node.trigger("input"+this.namespace),this.options.multiselect&&this.adjustInputSize(),this.node.focus()}},dynamicFilter:{isEnabled:!1,init:function(){this.options.dynamicFilter&&(this.dynamicFilter.bind.call(this),this.dynamicFilter.isEnabled=!0)},validate:function(t){var e,i,s=null,o=null;for(var n in this.filters.dynamic)if(this.filters.dynamic.hasOwnProperty(n)&&(i=~n.indexOf(".")?this.helper.namespace.call(this,n,t,"get"):t[n],"|"!==this.filters.dynamic[n].modifier||s||(s=i==this.filters.dynamic[n].value||!1),"&"===this.filters.dynamic[n].modifier)){if(i!=this.filters.dynamic[n].value){o=!1;break}o=!0}return e=s,null!==o&&!0===(e=o)&&null!==s&&(e=s),!!e},set:function(t,e){var i=t.match(/^([|&])?(.+)/);e?this.filters.dynamic[i[2]]={modifier:i[1]||"|",value:e}:delete this.filters.dynamic[i[2]],this.dynamicFilter.isEnabled&&this.generateSource()},bind:function(){for(var t,e=this,i=0,s=this.options.dynamicFilter.length;i<s;i++)"string"==typeof(t=this.options.dynamicFilter[i]).selector&&(t.selector=j(t.selector)),t.selector instanceof j&&t.selector[0]&&t.key&&function(t){t.selector.off(e.namespace).on("change"+e.namespace,function(){e.dynamicFilter.set.apply(e,[t.key,e.dynamicFilter.getValue(this)])}).trigger("change"+e.namespace)}(t)},getValue:function(t){var e;return"SELECT"===t.tagName?e=t.value:"INPUT"===t.tagName&&("checkbox"===t.type?e=t.checked&&t.getAttribute("value")||t.checked||null:"radio"===t.type&&t.checked&&(e=t.value)),e}},buildMultiselectLayout:function(){if(this.options.multiselect){var t,e=this;this.label.container=j("<span/>",{class:this.options.selector.labelContainer,"data-padding-left":parseFloat(this.node.css("padding-left"))||0,"data-padding-right":parseFloat(this.node.css("padding-right"))||0,"data-padding-top":parseFloat(this.node.css("padding-top"))||0,click:function(t){j(t.target).hasClass(e.options.selector.labelContainer)&&e.node.focus()}}),this.node.closest("."+this.options.selector.query).prepend(this.label.container),this.options.multiselect.data&&(Array.isArray(this.options.multiselect.data)?this.populateMultiselectData(this.options.multiselect.data):"function"==typeof this.options.multiselect.data&&(t=this.options.multiselect.data.call(this),Array.isArray(t)?this.populateMultiselectData(t):"function"==typeof t.promise&&j.when(t).then(function(t){t&&Array.isArray(t)&&e.populateMultiselectData(t)})))}},isMultiselectUniqueData:function(t){for(var e=!0,i=0,s=this.comparedItems.length;i<s;++i)if(this.comparedItems[i]===this.getMultiselectComparedData(t)){e=!1;break}return e},populateMultiselectData:function(t){for(var e=0,i=t.length;e<i;++e)this.addMultiselectItemLayout(t[e]);this.node.trigger("search"+this.namespace,{origin:"populateMultiselectData"})},addMultiselectItemLayout:function(t){if(this.isMultiselectUniqueData(t)){this.items.push(t),this.comparedItems.push(this.getMultiselectComparedData(t));var e,i=this.getTemplateValue(t),s=this,o=this.options.multiselect.href?"a":"span",n=j("<span/>",{class:this.options.selector.label,html:j("<"+o+"/>",{text:i,click:function(t){var e=j(this).closest("."+s.options.selector.label),i=s.label.container.find("."+s.options.selector.label).index(e);s.options.multiselect.callback&&s.helper.executeCallback.call(s,s.options.multiselect.callback.onClick,[s.node,s.items[i],t])},href:this.options.multiselect.href?(e=s.items[s.items.length-1],s.generateHref.call(s,s.options.multiselect.href,e)):null})});return n.append(j("<span/>",{class:this.options.selector.cancelButton,html:"×",click:function(t){var e=j(this).closest("."+s.options.selector.label),i=s.label.container.find("."+s.options.selector.label).index(e);s.cancelMultiselectItem(i,e,t)}})),this.label.container.append(n),this.adjustInputSize(),!0}},cancelMultiselectItem:function(t,e,i){var s=this.items[t];(e=e||this.label.container.find("."+this.options.selector.label).eq(t)).remove(),this.items.splice(t,1),this.comparedItems.splice(t,1),this.options.multiselect.callback&&this.helper.executeCallback.call(this,this.options.multiselect.callback.onCancel,[this.node,s,i]),this.adjustInputSize(),this.focusOnly=!0,this.node.focus().trigger("input"+this.namespace,{origin:"cancelMultiselectItem"})},adjustInputSize:function(){var i=this.node[0].getBoundingClientRect().width-(parseFloat(this.label.container.data("padding-right"))||0)-(parseFloat(this.label.container.css("padding-left"))||0),s=0,o=0,n=0,r=!1,a=0;this.label.container.find("."+this.options.selector.label).filter(function(t,e){0===t&&(a=j(e)[0].getBoundingClientRect().height+parseFloat(j(e).css("margin-bottom")||0)),s=j(e)[0].getBoundingClientRect().width+parseFloat(j(e).css("margin-right")||0),.7*i<n+s&&!r&&(o++,r=!0),n+s<i?n+=s:(r=!1,n=s)});var t=parseFloat(this.label.container.data("padding-left")||0)+(r?0:n),e=o*a+parseFloat(this.label.container.data("padding-top")||0);this.container.find("."+this.options.selector.query).find("input, textarea, [contenteditable], .typeahead__hint").css({paddingLeft:t,paddingTop:e})},showLayout:function(){!this.container.hasClass("result")&&(this.result.length||this.displayEmptyTemplate||this.options.backdropOnFocus)&&(function(){var e=this;j("html").off("keydown"+this.namespace).on("keydown"+this.namespace,function(t){t.keyCode&&9===t.keyCode&&setTimeout(function(){j(":focus").closest(e.container).find(e.node)[0]||e.hideLayout()},0)}),j("html").off("click"+this.namespace+" touchend"+this.namespace).on("click"+this.namespace+" touchend"+this.namespace,function(t){j(t.target).closest(e.container)[0]||j(t.target).closest("."+e.options.selector.item)[0]||t.target.className===e.options.selector.cancelButton||e.hasDragged||e.hideLayout()})}.call(this),this.container.addClass([this.result.length||this.searchGroups.length&&this.displayEmptyTemplate?"result ":"",this.options.hint&&this.searchGroups.length?"hint":"",this.options.backdrop||this.options.backdropOnFocus?"backdrop":""].join(" ")),this.helper.executeCallback.call(this,this.options.callback.onShowLayout,[this.node,this.query]))},hideLayout:function(){(this.container.hasClass("result")||this.container.hasClass("backdrop"))&&(this.container.removeClass("result hint filter"+(this.options.backdropOnFocus&&j(this.node).is(":focus")?"":" backdrop")),this.options.backdropOnFocus&&this.container.hasClass("backdrop")||(j("html").off(this.namespace),this.helper.executeCallback.call(this,this.options.callback.onHideLayout,[this.node,this.query])))},resetLayout:function(){this.result=[],this.tmpResult={},this.groups=[],this.resultCount=0,this.resultCountPerGroup={},this.resultItemCount=0,this.resultHtml=null,this.options.hint&&this.hint.container&&(this.hint.container.val(""),this.isContentEditable&&this.hint.container.text(""))},resetInput:function(){this.node.val(""),this.isContentEditable&&this.node.text(""),this.query="",this.rawQuery=""},buildCancelButtonLayout:function(){if(this.options.cancelButton){var e=this;j("<span/>",{class:this.options.selector.cancelButton,html:"×",mousedown:function(t){t.stopImmediatePropagation(),t.preventDefault(),e.resetInput(),e.node.trigger("input"+e.namespace,[t])}}).insertBefore(this.node)}},toggleCancelButtonVisibility:function(){this.container.toggleClass("cancel",!!this.query.length)},__construct:function(){this.extendOptions(),this.unifySourceFormat()&&(this.dynamicFilter.init.apply(this),this.init(),this.buildDropdownLayout(),this.buildDropdownItemLayout("static"),this.buildMultiselectLayout(),this.delegateEvents(),this.buildCancelButtonLayout(),this.helper.executeCallback.call(this,this.options.callback.onReady,[this.node]))},helper:{isEmpty:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},removeAccent:function(t){if("string"==typeof t){var e=o;return"object"==typeof this.options.accent&&(e=this.options.accent),t=t.toLowerCase().replace(new RegExp("["+e.from+"]","g"),function(t){return e.to[e.from.indexOf(t)]})}},slugify:function(t){return""!==(t=String(t))&&(t=(t=this.helper.removeAccent.call(this,t)).replace(/[^-a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")),t},sort:function(s,i,o){var n=function(t){for(var e=0,i=s.length;e<i;e++)if(void 0!==t[s[e]])return o(t[s[e]]);return t};return i=[-1,1][+!!i],function(t,e){return t=n(t),e=n(e),i*((e<t)-(t<e))}},replaceAt:function(t,e,i,s){return t.substring(0,e)+s+t.substring(e+i)},highlight:function(t,e,i){t=String(t);var s=i&&this.helper.removeAccent.call(this,t)||t,o=[];Array.isArray(e)||(e=[e]),e.sort(function(t,e){return e.length-t.length});for(var n=e.length-1;0<=n;n--)""!==e[n].trim()?e[n]=e[n].replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e.splice(n,1);s.replace(new RegExp("(?:"+e.join("|")+")(?!([^<]+)?>)","gi"),function(t,e,i){o.push({offset:i,length:t.length})});for(n=o.length-1;0<=n;n--)t=this.helper.replaceAt(t,o[n].offset,o[n].length,"<strong>"+t.substr(o[n].offset,o[n].length)+"</strong>");return t},getCaret:function(t){var e=0;if(t.selectionStart)return t.selectionStart;if(document.selection){var i=document.selection.createRange();if(null===i)return e;var s=t.createTextRange(),o=s.duplicate();s.moveToBookmark(i.getBookmark()),o.setEndPoint("EndToStart",s),e=o.text.length}else if(window.getSelection){var n=window.getSelection();if(n.rangeCount){var r=n.getRangeAt(0);r.commonAncestorContainer.parentNode==t&&(e=r.endOffset)}}return e},setCaretAtEnd:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(e)}else if(void 0!==document.body.createTextRange){var s=document.body.createTextRange();s.moveToElementText(t),s.collapse(!1),s.select()}},cleanStringFromScript:function(t){return"string"==typeof t&&t.replace(/<\/?(?:script|iframe)\b[^>]*>/gm,"")||t},executeCallback:function(t,e){if(t){var i;if("function"==typeof t)i=t;else if(("string"==typeof t||Array.isArray(t))&&("string"==typeof t&&(t=[t,[]]),"function"!=typeof(i=this.helper.namespace.call(this,t[0],window))))return;return i.apply(this,(t[1]||[]).concat(e||[]))}},namespace:function(t,e,i,s){if("string"!=typeof t||""===t)return!1;var o=void 0!==s?s:void 0;if(!~t.indexOf("."))return e[t]||o;for(var n=t.split("."),r=e||window,a=(i=i||"get",""),l=0,h=n.length;l<h;l++){if(void 0===r[a=n[l]]){if(~["get","delete"].indexOf(i))return void 0!==s?s:void 0;r[a]={}}if(~["set","create","delete"].indexOf(i)&&l===h-1){if("set"!==i&&"create"!==i)return delete r[a],!0;r[a]=o}r=r[a]}return r},typeWatch:(i=0,function(t,e){clearTimeout(i),i=setTimeout(t,e)})}},j.fn.typeahead=j.typeahead=function(t){return e.typeahead(this,t)};var e={typeahead:function(t,e){if(e&&e.source&&"object"==typeof e.source){if("function"==typeof t){if(!e.input)return;t=j(e.input)}if(void 0===t[0].value&&(t[0].value=t.text()),t.length){if(1===t.length)return t[0].selector=t.selector||e.input||t[0].nodeName.toLowerCase(),window.Typeahead[t[0].selector]=new l(t,e);for(var i,s={},o=0,n=t.length;o<n;++o)void 0!==s[i=t[o].nodeName.toLowerCase()]&&(i+=o),t[o].selector=i,window.Typeahead[i]=s[i]=new l(t.eq(o),e);return s}}}};return window.console=window.console||{log:function(){}},Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,e){void 0===e&&(e=0),e<0&&(e+=this.length),e<0&&(e=0);for(var i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1}),Object.keys||(Object.keys=function(t){var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i}),l});;/*! jQuery UI - v1.12.1 - 2022-08-19
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, keycode.js, scroll-parent.js, unique-id.js, widgets/draggable.js, widgets/sortable.js, widgets/autocomplete.js, widgets/datepicker.js, widgets/menu.js, widgets/mouse.js, effect.js, effects/effect-fade.js, effects/effect-highlight.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(w){w.ui=w.ui||{};w.ui.version="1.12.1";var n,i=0,a=Array.prototype.slice;w.cleanData=(n=w.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)try{(e=w._data(i,"events"))&&e.remove&&w(i).triggerHandler("remove")}catch(t){}n(t)}),w.widget=function(t,i,e){var s,n,o,r={},a=t.split(".")[0],l=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=w.Widget),w.isArray(e)&&(e=w.extend.apply(null,[{}].concat(e))),w.expr[":"][l.toLowerCase()]=function(t){return!!w.data(t,l)},w[a]=w[a]||{},s=w[a][t],n=w[a][t]=function(t,e){if(!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},w.extend(n,s,{version:e.version,_proto:w.extend({},e),_childConstructors:[]}),(o=new i).options=w.widget.extend({},o.options),w.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}w.isFunction(s)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=s}),n.prototype=w.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},r,{constructor:n,namespace:a,widgetName:t,widgetFullName:l}),s?(w.each(s._childConstructors,function(t,e){var i=e.prototype;w.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),w.widget.bridge(t,n),n},w.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],s[n].hasOwnProperty(e)&&void 0!==i&&(w.isPlainObject(i)?t[e]=w.isPlainObject(t[e])?w.widget.extend({},t[e],i):w.widget.extend({},i):t[e]=i);return t},w.widget.bridge=function(o,e){var r=e.prototype.widgetFullName||o;w.fn[o]=function(i){var t="string"==typeof i,s=a.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=w.data(this,r);return"instance"===i?(n=e,!1):e?w.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:w.error("no such method '"+i+"' for "+o+" widget instance"):w.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=w.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=w.data(this,r);t?(t.option(i||{}),t._init&&t._init()):w.data(this,r,new e(i,this))})),n}},w.Widget=function(){},w.Widget._childConstructors=[],w.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=w(e||this.defaultElement||this)[0],this.element=w(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=w(),this.hoverable=w(),this.focusable=w(),this.classesElementLookup={},e!==this&&(w.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=w(e.style?e.ownerDocument:e.document||e),this.window=w(this.document[0].defaultView||this.document[0].parentWindow)),this.options=w.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:w.noop,_create:w.noop,_init:w.noop,destroy:function(){var i=this;this._destroy(),w.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:w.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return w.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=w.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=w(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],r=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=r.classesElementLookup[t[s]]||w(),i=n.add?w(w.unique(i.get().concat(n.element.get()))):w(i.not(n.element).get()),r.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return n=w.extend({element:this.element,classes:this.options.classes||{}},n),this._on(n.element,{remove:"_untrackClassesElement"}),n.keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;w.each(s.classesElementLookup,function(t,e){-1!==w.inArray(i.target,e)&&(s.classesElementLookup[t]=w(e.not(i.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var r,a=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=r=w(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,r=this.widget()),w.each(t,function(t,e){function i(){if(n||!0!==a.options.disabled&&!w(this).hasClass("ui-state-disabled"))return("string"==typeof e?a[e]:e).apply(a,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||w.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+a.eventNamespace,s=s[2];s?r.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=w(this.bindings.not(t).get()),this.focusable=w(this.focusable.not(t).get()),this.hoverable=w(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(w(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(w(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(w(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(w(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=w.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!(w.isFunction(o)&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},w.each({show:"fadeIn",hide:"fadeOut"},function(o,r){w.Widget.prototype["_"+o]=function(e,t,i){var s=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:o,n=!w.isEmptyObject(t="number"==typeof(t=t||{})?{duration:t}:t);t.complete=i,t.delay&&e.delay(t.delay),n&&w.effects&&w.effects.effect[s]?e[o](t):s!==o&&e[s]?e[s](t.duration,t.easing,i):e.queue(function(t){w(this)[o](),i&&i.call(e[0]),t()})}});var s,D,x,o,r,l,h,c,C;w.widget;function I(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function M(t,e){return parseInt(w.css(t,e),10)||0}D=Math.max,x=Math.abs,o=/left|center|right/,r=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,c=/%$/,C=w.fn.position,w.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,e=w("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),i=e.children()[0];return w("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?w.position.scrollbarWidth():0,height:e?w.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=w(t||window),i=w.isWindow(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?w(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},w.fn.position=function(u){if(!u||!u.of)return C.apply(this,arguments);u=w.extend({},u);var d,p,f,g,m,t,_=w(u.of),v=w.position.getWithinInfo(u.within),y=w.position.getScrollInfo(v),b=(u.collision||"flip").split(" "),k={},e=9===(t=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:w.isWindow(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return _[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=w.extend({},g=e.offset),w.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],u[this]=[h.exec(i[0])[0],h.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=I(k.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,r=w(this),a=r.outerWidth(),l=r.outerHeight(),e=M(this,"marginLeft"),s=M(this,"marginTop"),n=a+e+M(this,"marginRight")+y.width,o=l+s+M(this,"marginBottom")+y.height,h=w.extend({},m),c=I(k.my,r.outerWidth(),r.outerHeight());"right"===u.my[0]?h.left-=a:"center"===u.my[0]&&(h.left-=a/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},w.each(["left","top"],function(t,e){w.ui.position[b[t]]&&w.ui.position[b[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:a,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:r})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-a,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:r,left:h.left,top:h.top,width:a,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<a&&x(e+i)<p&&(o.horizontal="center"),f<l&&x(s+n)<f&&(o.vertical="middle"),D(x(e),x(i))>D(x(s),x(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),r.offset(w.extend(h,{using:t}))})},w.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,r=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0<r&&a<=0?(i=t.left+r+e.collisionWidth-n-s,t.left+=r-i):t.left=!(0<a&&r<=0)&&a<r?s+n-e.collisionWidth:s:0<r?t.left+=r:0<a?t.left-=a:t.left=D(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,r=s-o,a=o+e.collisionHeight-n-s;e.collisionHeight>n?0<r&&a<=0?(i=t.top+r+e.collisionHeight-n-s,t.top+=r-i):t.top=!(0<a&&r<=0)&&a<r?s+n-e.collisionHeight:s:0<r?t.top+=r:0<a?t.top-=a:t.top=D(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,o=i.isWindow?i.scrollLeft:i.offset.left,r=t.left-e.collisionPosition.marginLeft,a=r-o,l=r+e.collisionWidth-n-o,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,r=-2*e.offset[0];a<0?((s=t.left+h+i+r+e.collisionWidth-n-s)<0||s<x(a))&&(t.left+=h+i+r):0<l&&(0<(o=t.left-e.collisionPosition.marginLeft+h+i+r-o)||x(o)<l)&&(t.left+=h+i+r)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,o=i.isWindow?i.scrollTop:i.offset.top,r=t.top-e.collisionPosition.marginTop,a=r-o,l=r+e.collisionHeight-n-o,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,r=-2*e.offset[1];a<0?((s=t.top+h+i+r+e.collisionHeight-n-s)<0||s<x(a))&&(t.top+=h+i+r):0<l&&(0<(o=t.top-e.collisionPosition.marginTop+h+i+r-o)||x(o)<l)&&(t.top+=h+i+r)}},flipfit:{left:function(){w.ui.position.flip.left.apply(this,arguments),w.ui.position.fit.left.apply(this,arguments)},top:function(){w.ui.position.flip.top.apply(this,arguments),w.ui.position.fit.top.apply(this,arguments)}}};w.ui.position,w.extend(w.expr[":"],{data:w.expr.createPseudo?w.expr.createPseudo(function(e){return function(t){return!!w.data(t,e)}}):function(t,e,i){return!!w.data(t,i[3])}}),w.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},w.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=w(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:w(this[0].ownerDocument||document)},w.fn.extend({uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&w(this).removeAttr("id")})}}),w.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var t,u=!1;w(document).on("mouseup",function(){u=!1});w.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===w.data(t.target,e.widgetName+".preventClickEvent"))return w.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!u){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&w(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===w.data(t.target,this.widgetName+".preventClickEvent")&&w.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),u=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(w.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&w.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,u=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),w.ui.plugin={add:function(t,e,i){var s,n=w.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},w.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=!(i=i||e.body).nodeName?e.body:i},w.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&w(t).trigger("blur")};w.widget("ui.draggable",w.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<w(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=w(this);return w("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=w.ui.safeActiveElement(this.document[0]);w(t.target).closest(e).length||w.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),w.ui.ddmanager&&(w.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===w(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),w.ui.ddmanager&&!e.dropBehaviour&&w.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),w.ui.ddmanager&&w.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new w.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",w.ui.ddmanager&&w.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return w.ui.ddmanager&&!this.options.dropBehaviour&&(i=w.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||w.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?w(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),w.ui.ddmanager&&w.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),w.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new w.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!w(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i=w.isFunction(e.helper),t=i?w(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=w.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&w.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,n=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=w(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,w(n).width()-this.helperProportions.width-this.margins.left,(w(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[w(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,w(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,w(window).scrollLeft()+w(window).width()-this.helperProportions.width-this.margins.left,w(window).scrollTop()+(w(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,t=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:t?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:t?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,r=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(i=this.relativeContainer.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(r=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(r=i[3]+this.offset.click.top)),s.grid&&(t=s.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,r=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-s.grid[1]:t+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis&&(r=this.originalPageY)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),w.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),w.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),w.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=w.extend({},t,{item:i.element});i.sortables=[],w(i.options.connectToSortable).each(function(){var t=w(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=w.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,w.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){w.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,w.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&w.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,w.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,w.each(n.sortables,function(){this.refreshPositions()}))})}}),w.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=w("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&w("body").css("cursor",i._cursor)}}),w.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=w(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&w(e.helper).css("opacity",i._opacity)}}),w.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],r=i.document[0];o!==r&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-w(r).scrollTop()<s.scrollSensitivity?n=w(r).scrollTop(w(r).scrollTop()-s.scrollSpeed):w(window).height()-(t.pageY-w(r).scrollTop())<s.scrollSensitivity&&(n=w(r).scrollTop(w(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-w(r).scrollLeft()<s.scrollSensitivity?n=w(r).scrollLeft(w(r).scrollLeft()-s.scrollSpeed):w(window).width()-(t.pageX-w(r).scrollLeft())<s.scrollSensitivity&&(n=w(r).scrollLeft(w(r).scrollLeft()+s.scrollSpeed)))),!1!==n&&w.ui.ddmanager&&!s.dropBehaviour&&w.ui.ddmanager.prepareOffsets(i,t)}}),w.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],w(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=w(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,r,a,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(a=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<a-p||l+p<f||_<h-p||c+p<m||!w.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,w.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(a-g)<=p,r=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),u=s||n||o||r,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(a-f)<=p,r=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[v].snapping&&(s||n||o||r||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,w.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||r||u)}}),w.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=w.makeArray(w(i.stack)).sort(function(t,e){return(parseInt(w(t).css("zIndex"),10)||0)-(parseInt(w(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(w(i[0]).css("zIndex"),10)||0,w(i).each(function(t){w(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),w.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=w(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&w(e.helper).css("zIndex",i._zIndex)}});w.ui.draggable,w.widget("ui.sortable",w.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),w.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),w(t.target).parents().each(function(){if(w.data(this,n.widgetName+"-item")===n)return i=w(this),!1}),!!(i=w.data(t.target,n.widgetName+"-item")===n?w(t.target):i)&&(!(this.options.handle&&!e&&(w(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},w.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=w("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return w.ui.ddmanager&&(w.ui.ddmanager.current=this),w.ui.ddmanager&&!o.dropBehaviour&&w.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,n,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-this.document.scrollTop()<o.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<o.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),t.pageX-this.document.scrollLeft()<o.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),!1!==r&&w.ui.ddmanager&&!o.dropBehaviour&&w.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||w.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&w.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),w.ui.ddmanager&&w.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return w.ui.ddmanager&&!this.options.dropBehaviour&&w.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,w(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new w.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),w.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?w(this.domPosition.prev).after(this.currentItem):w(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},w(t).each(function(){var t=(w(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(w(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,r=o+t.width,a=t.top,l=a+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||a<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<r;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this._getDragVerticalDirection(),t=this._getDragHorizontalDirection(),this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),t=this._getDragHorizontalDirection();return this.floating&&t?"right"===t&&i||"left"===t&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],r=[],a=this._connectWith();if(a&&t)for(e=a.length-1;0<=e;e--)for(i=(s=w(a[e],this.document[0])).length-1;0<=i;i--)(n=w.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&r.push([w.isFunction(n.options.items)?n.options.items.call(n.element):w(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(r.push([w.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):w(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=r.length-1;0<=e;e--)r[e][0].each(l);return w(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=w.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,r,a,l,h=this.items,c=[[w.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):w(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=w(u[e],this.document[0])).length-1;0<=i;i--)(n=w.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push([w.isFunction(n.options.items)?n.options.items.call(n.element[0],t,{item:this.currentItem}):w(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(r=c[e][i=0]).length;i<l;i++)(a=w(r[i])).data(this.widgetName+"-item",o),h.push({item:a,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,i,s,n;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(i=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?w(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),n=s.offset(),i.left=n.left,i.top=n.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)n=this.containers[e].element.offset(),this.containers[e].containerCache.left=n.left,this.containers[e].containerCache.top=n.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n=(i=i||this).options;n.placeholder&&n.placeholder.constructor!==String||(s=n.placeholder,n.placeholder={element:function(){var t=i.currentItem[0].nodeName.toLowerCase(),e=w("<"+t+">",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),w("<tr>",i.document[0]).appendTo(e)):"tr"===t?i._createTrPlaceholder(i.currentItem,e):"img"===t&&e.attr("src",i.currentItem.attr("src")),s||e.css("visibility","hidden"),e},update:function(t,e){s&&!n.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=w(n.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),n.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){w("<td>&#160;</td>",i.document[0]).attr("colspan",w(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,r,a,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)w.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&w.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)w.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(r=this.items[e].item.offset()[n],a=!1,t[h]-r>this.items[e][o]/2&&(a=!0),Math.abs(t[h]-r)<i&&(i=Math.abs(t[h]-r),s=this.items[e],this.direction=a?"up":"down"));(s||this.options.dropOnEmpty)&&(this.currentContainer!==this.containers[u]?(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1):this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1))}},_createHelper:function(t){var e=this.options,t=w.isFunction(e.helper)?w(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||w("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=w.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&w.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&w.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=w(i.containment)[0],e=w(i.containment).offset(),i="hidden"!==w(t).css("overflow"),this.containment=[e.left+(parseInt(w(t).css("borderLeftWidth"),10)||0)+(parseInt(w(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(w(t).css("borderTopWidth"),10)||0)+(parseInt(w(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(w(t).css("borderLeftWidth"),10)||0)-(parseInt(w(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(w(t).css("borderTopWidth"),10)||0)-(parseInt(w(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&w.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,t=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():t?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():t?0:s.scrollLeft())*i}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&w.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===w.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||w([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}}),w.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(t){var e=w(t.target),i=w(w.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var e,i;this.previousFilter||(e=w(t.target).closest(".ui-menu-item"),i=w(t.currentTarget),e[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i)))},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(t){this._delay(function(){w.contains(this.element[0],w.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=w(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case w.ui.keyCode.PAGE_UP:this.previousPage(t);break;case w.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case w.ui.keyCode.HOME:this._move("first","first",t);break;case w.ui.keyCode.END:this._move("last","last",t);break;case w.ui.keyCode.UP:this.previous(t);break;case w.ui.keyCode.DOWN:this.next(t);break;case w.ui.keyCode.LEFT:this.collapse(t);break;case w.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case w.ui.keyCode.ENTER:case w.ui.keyCode.SPACE:this._activate(t);break;case w.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=w(this),e=t.prev(),i=w("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=w(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!w.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(w.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(w.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=w.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:w(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!w(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0):s)&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(e=w(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=w(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||w(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(w.trim(w(this).children(".ui-menu-item-wrapper").text()))})}});w.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,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},requestIndex:0,pending:0,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=w.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=w.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=w("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==w.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(t,e){var i;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){w(t.target).trigger(t.originalEvent)});i=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:i})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(i.value),(i=e.item.attr("aria-label")||i.value)&&w.trim(i).length&&(this.liveRegion.children().hide(),w("<div>").text(i).appendTo(this.liveRegion))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==w.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=w("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||w.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?w(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;w.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(w.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=w.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return w.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:w.map(t,function(t){return"string"==typeof t?{label:t,value:t}:w.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(w.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;w.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return w("<li>").append(w("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),w.extend(w.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(w.ui.autocomplete.escapeRegex(e),"i");return w.grep(t,function(t){return i.test(t.label||t.value||t)})}}),w.widget("ui.autocomplete",w.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),w("<div>").text(e).appendTo(this.liveRegion))}});var d;w.ui.autocomplete;function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},w.extend(this._defaults,this.regional[""]),this.regional.en=w.extend(!0,{},this.regional[""]),this.regional["en-US"]=w.extend(!0,{},this.regional.en),this.dpDiv=p(w("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function p(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){w(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&w(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&w(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,f)}function f(){w.datepicker._isDisabledDatepicker((d.inline?d.dpDiv.parent():d.input)[0])||(w(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),w(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&w(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&w(this).addClass("ui-datepicker-next-hover"))}function g(t,e){for(var i in w.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}w.extend(w.ui,{datepicker:{version:"1.12.1"}}),w.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return g(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(w(t),n)).settings=w.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?p(w("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=w(t);e.append=w([]),e.trigger=w([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),w.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=w("<span class='"+this._appendClass+"'>"+s+"</span>"),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),e.trigger=w(this._get(e,"buttonImageOnly")?w("<img/>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):w("<button type='button'></button>").addClass(this._triggerClass).html(i?w("<img/>").attr({src:i,alt:s,title:s}):s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return w.datepicker._datepickerShowing&&w.datepicker._lastInput===t[0]?w.datepicker._hideDatepicker():(w.datepicker._datepickerShowing&&w.datepicker._lastInput!==t[0]&&w.datepicker._hideDatepicker(),w.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,r;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(r=this._get(t,"dateFormat")).match(/[DM]/)&&(e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=w(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),w.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,r=this._dialogInst;return r||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=w("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),w("body").append(this._dialogInput),(r=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},w.data(this._dialogInput[0],"datepicker",r)),g(r.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(r,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),w.blockUI&&w.blockUI(this.dpDiv),w.data(this._dialogInput[0],"datepicker",r),this},_destroyDatepicker:function(t){var e,i=w(t),s=w.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),w.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),d===s&&(d=null))},_enableDatepicker:function(e){var t,i=w(e),s=w.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=w.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=w(e),s=w.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=w.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return w.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o,r,a=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?w.extend({},w.datepicker._defaults):a?"all"===e?w.extend({},a.settings):this._get(a,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),a&&(this._curInst===a&&this._hideDatepicker(),n=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(a,"min"),r=this._getMinMaxDate(a,"max"),g(a.settings,s),null!==o&&void 0!==s.dateFormat&&void 0===s.minDate&&(a.settings.minDate=this._formatDate(a,o)),null!==r&&void 0!==s.dateFormat&&void 0===s.maxDate&&(a.settings.maxDate=this._formatDate(a,r)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(w(t),a),this._autoSize(a),this._setDate(a,n),this._updateAlternate(a),this._updateDatepicker(a))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=w.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,w.datepicker._datepickerShowing)switch(t.keyCode){case 9:w.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=w("td."+w.datepicker._dayOverClass+":not(."+w.datepicker._currentClass+")",s.dpDiv))[0]&&w.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(e=w.datepicker._get(s,"onSelect"))?(i=w.datepicker._formatDate(s),e.apply(s.input?s.input[0]:null,[i,s])):w.datepicker._hideDatepicker(),!1;case 27:w.datepicker._hideDatepicker();break;case 33:w.datepicker._adjustDate(t.target,t.ctrlKey?-w.datepicker._get(s,"stepBigMonths"):-w.datepicker._get(s,"stepMonths"),"M");break;case 34:w.datepicker._adjustDate(t.target,t.ctrlKey?+w.datepicker._get(s,"stepBigMonths"):+w.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&w.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&w.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&w.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&w.datepicker._adjustDate(t.target,t.ctrlKey?-w.datepicker._get(s,"stepBigMonths"):-w.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&w.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&w.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&w.datepicker._adjustDate(t.target,t.ctrlKey?+w.datepicker._get(s,"stepBigMonths"):+w.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&w.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?w.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=w.datepicker._getInst(t.target);if(w.datepicker._get(i,"constrainInput"))return e=w.datepicker._possibleChars(w.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){t=w.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{w.datepicker.parseDate(w.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,w.datepicker._getFormatConfig(t))&&(w.datepicker._setDateFromField(t),w.datepicker._updateAlternate(t),w.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=w("input",t.parentNode)[0]),w.datepicker._isDisabledDatepicker(t)||w.datepicker._lastInput===t||(n=w.datepicker._getInst(t),w.datepicker._curInst&&w.datepicker._curInst!==n&&(w.datepicker._curInst.dpDiv.stop(!0,!0),n&&w.datepicker._datepickerShowing&&w.datepicker._hideDatepicker(w.datepicker._curInst.input[0])),!1!==(i=(s=w.datepicker._get(n,"beforeShow"))?s.apply(t,[t,n]):{})&&(g(n.settings,i),n.lastVal=null,w.datepicker._lastInput=t,w.datepicker._setDateFromField(n),w.datepicker._inDialog&&(t.value=""),w.datepicker._pos||(w.datepicker._pos=w.datepicker._findPos(t),w.datepicker._pos[1]+=t.offsetHeight),e=!1,w(t).parents().each(function(){return!(e|="fixed"===w(this).css("position"))}),s={left:w.datepicker._pos[0],top:w.datepicker._pos[1]},w.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),w.datepicker._updateDatepicker(n),s=w.datepicker._checkOffset(n,s,e),n.dpDiv.css({position:w.datepicker._inDialog&&w.blockUI?"static":e?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),n.inline||(i=w.datepicker._get(n,"showAnim"),s=w.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(w(t))+1),w.datepicker._datepickerShowing=!0,w.effects&&w.effects.effect[i]?n.dpDiv.show(i,w.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),w.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),w.datepicker._curInst=n)))},_updateDatepicker:function(t){this.maxRows=4,(d=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a");0<n.length&&f.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===w.datepicker._curInst&&w.datepicker._datepickerShowing&&w.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),e=t.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,a=document.documentElement.clientWidth+(i?0:w(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:w(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?w(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+r?w(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>a&&s<a?Math.abs(e.left+s-a):0),e.top-=Math.min(e.top,e.top+n>l&&n<l?Math.abs(n+r):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||w.expr.filters.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=w(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==w.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(s,"showAnim"),i=this._get(s,"duration"),t=function(){w.datepicker._tidyDialog(s)},w.effects&&(w.effects.effect[e]||w.effects[e])?s.dpDiv.hide(e,w.datepicker._get(s,"showOptions"),i,t):s.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(t=this._get(s,"onClose"))&&t.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),w.blockUI&&(w.unblockUI(),w("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;w.datepicker._curInst&&(e=w(t.target),t=w.datepicker._getInst(e[0]),(e[0].id===w.datepicker._mainDivId||0!==e.parents("#"+w.datepicker._mainDivId).length||e.hasClass(w.datepicker.markerClassName)||e.closest("."+w.datepicker._triggerClass).length||!w.datepicker._datepickerShowing||w.datepicker._inDialog&&w.blockUI)&&(!e.hasClass(w.datepicker.markerClassName)||w.datepicker._curInst===t)||w.datepicker._hideDatepicker())},_adjustDate:function(t,e,i){var s=w(t),t=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(t,e+("M"===i?this._get(t,"showCurrentAtPos"):0),i),this._updateDatepicker(t))},_gotoToday:function(t){var e=w(t),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(t,e,i){var s=w(t),t=this._getInst(s[0]);t["selected"+("M"===i?"Month":"Year")]=t["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(t),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n=w(t);w(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=w("a",s).html(),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=w(t);this._selectDate(t,"")},_selectDate:function(t,e){var i=w(t),t=this._getInst(i[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),t=this.formatDate(e,i,this._getFormatConfig(t)),w(s).val(t))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;function i(t){var e=b(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,e=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}");if(!(e=n.substring(h).match(e)))throw"Missing number at position "+h;return h+=e[0].length,parseInt(e[0],10)}function s(t,e,i){var s=-1,e=w.map(b(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(w.each(e,function(t,e){var i=e[1];if(n.substr(h,i.length).toLowerCase()===i.toLowerCase())return s=e[0],h+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+h}function o(){if(n.charAt(h)!==e.charAt(k))throw"Unexpected literal at position "+h;h++}for(var r,a,l,h=0,c=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),u=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,d=(t?t.dayNames:null)||this._defaults.dayNames,p=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,f=(t?t.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,y=!1,b=function(t){t=k+1<e.length&&e.charAt(k+1)===t;return t&&k++,t},k=0;k<e.length;k++)if(y)"'"!==e.charAt(k)||b("'")?o():y=!1;else switch(e.charAt(k)){case"d":_=i("d");break;case"D":s("D",u,d);break;case"o":v=i("o");break;case"m":m=i("m");break;case"M":m=s("M",p,f);break;case"y":g=i("y");break;case"@":g=(l=new Date(i("@"))).getFullYear(),m=l.getMonth()+1,_=l.getDate();break;case"!":g=(l=new Date((i("!")-this._ticksTo1970)/1e4)).getFullYear(),m=l.getMonth()+1,_=l.getDate();break;case"'":b("'")?o():y=!0;break;default:o()}if(h<n.length&&(a=n.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=c?0:-100)),-1<v)for(m=1,_=v;;){if(_<=(r=this._getDaysInMonth(g,m-1)))break;m++,_-=r}if((l=this._daylightSavingAdjust(new Date(g,m-1,_))).getFullYear()!==g||l.getMonth()+1!==m||l.getDate()!==_)throw"Invalid date";return l},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),r,a);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){function t(t){return(t=n+1<e.length&&e.charAt(n+1)===t)&&n++,t}for(var i="",s=!1,n=0;n<e.length;n++)if(s)"'"!==e.charAt(n)||t("'")?i+=e.charAt(n):s=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":t("'")?i+="'":s=!0;break;default:i+=e.charAt(n)}return i},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,r=this._getFormatConfig(t);try{o=this.parseDate(i,s,r)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(a,t,e){var i,s,t=null==t||""===t?e:"string"==typeof t?function(t){try{return w.datepicker.parseDate(w.datepicker._get(a,"dateFormat"),t,w.datepicker._getFormatConfig(a))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?w.datepicker._getDate(a):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=o.exec(t);r;){switch(r[2]||"d"){case"d":case"D":n+=parseInt(r[1],10);break;case"w":case"W":n+=7*parseInt(r[1],10);break;case"m":case"M":s+=parseInt(r[1],10),n=Math.min(n,w.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(r[1],10),n=Math.min(n,w.datepicker._getDaysInMonth(i,s))}r=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(s=new Date).setDate(s.getDate()+i),s):new Date(t.getTime());return(t=t&&"Invalid Date"===t.toString()?e:t)&&(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)),this._daylightSavingAdjust(t)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){w.datepicker._adjustDate(i,-e,"M")},next:function(){w.datepicker._adjustDate(i,+e,"M")},hide:function(){w.datepicker._hideDatepicker()},today:function(){w.datepicker._gotoToday(i)},selectDay:function(){return w.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return w.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return w.datepicker._selectMonthYear(i,this,"Y"),!1}};w(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,r,a,l,h,c,u,d,p,f,g,m,_,v,y,b,k,w,D,x,C,I,M,P,T,S,N,A,H=new Date,F=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),E=this._get(t,"isRTL"),O=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),Y=this._get(t,"navigationAsDateFormat"),L=this._getNumberOfMonths(t),R=this._get(t,"showCurrentAtPos"),H=this._get(t,"stepMonths"),j=1!==L[0]||1!==L[1],z=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),K=this._getMinMaxDate(t,"min"),B=this._getMinMaxDate(t,"max"),U=t.drawMonth-R,q=t.drawYear;if(U<0&&(U+=12,q--),B)for(e=this._daylightSavingAdjust(new Date(B.getFullYear(),B.getMonth()-L[0]*L[1]+1,B.getDate())),e=K&&e<K?K:e;this._daylightSavingAdjust(new Date(q,U,1))>e;)--U<0&&(U=11,q--);for(t.drawMonth=U,t.drawYear=q,R=this._get(t,"prevText"),R=Y?this.formatDate(R,this._daylightSavingAdjust(new Date(q,U-H,1)),this._getFormatConfig(t)):R,i=this._canAdjustMonth(t,-1,q,U)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+R+"'><span class='ui-icon ui-icon-circle-triangle-"+(E?"e":"w")+"'>"+R+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+R+"'><span class='ui-icon ui-icon-circle-triangle-"+(E?"e":"w")+"'>"+R+"</span></a>",R=this._get(t,"nextText"),R=Y?this.formatDate(R,this._daylightSavingAdjust(new Date(q,U+H,1)),this._getFormatConfig(t)):R,s=this._canAdjustMonth(t,1,q,U)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+R+"'><span class='ui-icon ui-icon-circle-triangle-"+(E?"w":"e")+"'>"+R+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+R+"'><span class='ui-icon ui-icon-circle-triangle-"+(E?"w":"e")+"'>"+R+"</span></a>",W=this._get(t,"currentText"),R=this._get(t,"gotoCurrent")&&t.currentDay?z:F,W=Y?this.formatDate(W,R,this._getFormatConfig(t)):W,Y=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",Y=O?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(E?Y:"")+(this._isInRange(t,R)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+W+"</button>":"")+(E?"":Y)+"</div>":"",n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),r=this._get(t,"dayNames"),a=this._get(t,"dayNamesMin"),l=this._get(t,"monthNames"),h=this._get(t,"monthNamesShort"),c=this._get(t,"beforeShowDay"),u=this._get(t,"showOtherMonths"),d=this._get(t,"selectOtherMonths"),p=this._getDefaultDate(t),f="",m=0;m<L[0];m++){for(_="",this.maxRows=4,v=0;v<L[1];v++){if(y=this._daylightSavingAdjust(new Date(q,U,t.selectedDay)),b=" ui-corner-all",k="",j){if(k+="<div class='ui-datepicker-group",1<L[1])switch(v){case 0:k+=" ui-datepicker-group-first",b=" ui-corner-"+(E?"right":"left");break;case L[1]-1:k+=" ui-datepicker-group-last",b=" ui-corner-"+(E?"left":"right");break;default:k+=" ui-datepicker-group-middle",b=""}k+="'>"}for(k+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+b+"'>"+(/all|left/.test(b)&&0===m?E?s:i:"")+(/all|right/.test(b)&&0===m?E?i:s:"")+this._generateMonthYearHeader(t,U,q,K,B,0<m||0<v,l,h)+"</div><table class='ui-datepicker-calendar'><thead><tr>",w=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",g=0;g<7;g++)w+="<th scope='col'"+(5<=(g+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+r[D=(g+n)%7]+"'>"+a[D]+"</span></th>";for(k+=w+"</tr></thead><tbody>",C=this._getDaysInMonth(q,U),q===t.selectedYear&&U===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,C)),x=(this._getFirstDayOfMonth(q,U)-n+7)%7,C=Math.ceil((x+C)/7),I=j&&this.maxRows>C?this.maxRows:C,this.maxRows=I,M=this._daylightSavingAdjust(new Date(q,U,1-x)),P=0;P<I;P++){for(k+="<tr>",T=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(M)+"</td>":"",g=0;g<7;g++)S=c?c.apply(t.input?t.input[0]:null,[M]):[!0,""],A=(N=M.getMonth()!==U)&&!d||!S[0]||K&&M<K||B&&B<M,T+="<td class='"+(5<=(g+n+6)%7?" ui-datepicker-week-end":"")+(N?" ui-datepicker-other-month":"")+(M.getTime()===y.getTime()&&U===t.selectedMonth&&t._keyEvent||p.getTime()===M.getTime()&&p.getTime()===y.getTime()?" "+this._dayOverClass:"")+(A?" "+this._unselectableClass+" ui-state-disabled":"")+(N&&!u?"":" "+S[1]+(M.getTime()===z.getTime()?" "+this._currentClass:"")+(M.getTime()===F.getTime()?" ui-datepicker-today":""))+"'"+(N&&!u||!S[2]?"":" title='"+S[2].replace(/'/g,"&#39;")+"'")+(A?"":" data-handler='selectDay' data-event='click' data-month='"+M.getMonth()+"' data-year='"+M.getFullYear()+"'")+">"+(N&&!u?"&#xa0;":A?"<span class='ui-state-default'>"+M.getDate()+"</span>":"<a class='ui-state-default"+(M.getTime()===F.getTime()?" ui-state-highlight":"")+(M.getTime()===z.getTime()?" ui-state-active":"")+(N?" ui-priority-secondary":"")+"' href='#'>"+M.getDate()+"</a>")+"</td>",M.setDate(M.getDate()+1),M=this._daylightSavingAdjust(M);k+=T+"</tr>"}11<++U&&(U=0,q++),_+=k+="</tbody></table>"+(j?"</div>"+(0<L[0]&&v===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}f+=_}return f+=Y,t._keyEvent=!1,f},_generateMonthYearHeader:function(t,e,i,s,n,o,r,a){var l,h,c,u,d,p,f,g=this._get(t,"changeMonth"),m=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),v="<div class='ui-datepicker-title'>",y="";if(o||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+a[c]+"</option>");y+="</select>"}if(_||(v+=y+(!o&&g&&m?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!m)v+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=(r=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(t)?d:t})(u[0]),f=Math.max(p,r(u[1]||"")),p=s?Math.max(p,s.getFullYear()):p,f=n?Math.min(f,n.getFullYear()):f,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=f;p++)t.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",v+=t.yearshtml,t.yearshtml=null}return v+=this._get(t,"yearSuffix"),_&&(v+=(!o&&g&&m?"":"&#xa0;")+y),v+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),e=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=e.getDate(),t.drawMonth=t.selectedMonth=e.getMonth(),t.drawYear=t.selectedYear=e.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),e=i&&e<i?i:e;return t&&t<e?t:e},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),n=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(t,n)},_isInRange:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=null,o=null,r=this._get(t,"yearRange");return r&&(t=r.split(":"),r=(new Date).getFullYear(),n=parseInt(t[0],10),o=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(n+=r),t[1].match(/[+\-].*/)&&(o+=r)),(!i||e.getTime()>=i.getTime())&&(!s||e.getTime()<=s.getTime())&&(!n||e.getFullYear()>=n)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);e=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),e,this._getFormatConfig(t))}}),w.fn.datepicker=function(t){if(!this.length)return this;w.datepicker.initialized||(w(document).on("mousedown",w.datepicker._checkExternalClick),w.datepicker.initialized=!0),0===w("#"+w.datepicker._mainDivId).length&&w("body").append(w.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?w.datepicker["_"+t+"Datepicker"].apply(w.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?w.datepicker["_"+t+"Datepicker"].apply(w.datepicker,[this].concat(e)):w.datepicker._attachDatepicker(this,t)})},w.datepicker=new e,w.datepicker.initialized=!1,w.datepicker.uuid=(new Date).getTime(),w.datepicker.version="1.12.1";w.datepicker;var m,_,v,y,b,k,P,T,S,N,A,H,F,E,O,W,Y,L,R,j,z,K="ui-effects-",B="ui-effects-style",U="ui-effects-animated",q=w;function X(t,e,i){var s=T[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:t<0?0:s.max<t?s.max:t)}function V(s){var n=k(),o=n._rgba=[];return s=s.toLowerCase(),A(b,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[P[e].cache]=i[P[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&m.extend(o,v.transparent),n):v[s]}function G(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function $(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(n[w.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function Q(t,e,i,s){return t={effect:t=w.isPlainObject(t)?(e=t).effect:t},w.isFunction(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!w.fx.speeds[e]||(s=i,i=e,e={}),w.isFunction(i)&&(s=i,i=null),e&&w.extend(t,e),i=i||e.duration,t.duration=w.fx.off?0:"number"==typeof i?i:i in w.fx.speeds?w.fx.speeds[i]:w.fx.speeds._default,t.complete=s||e.complete,t}function J(t){return!t||"number"==typeof t||w.fx.speeds[t]||("string"==typeof t&&!w.effects.effect[t]||(w.isFunction(t)||"object"==typeof t&&!t.effect))}function Z(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}w.effects={effect:{}},y=/^([\-+])=\s*(\d+\.?\d*)/,b=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],k=(m=q).Color=function(t,e,i,s){return new m.Color.fn.parse(t,e,i,s)},P={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},T={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},S=k.support={},N=m("<p>")[0],A=m.each,N.style.cssText="background-color:rgba(1,1,1,.5)",S.rgba=-1<N.style.backgroundColor.indexOf("rgba"),A(P,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),(k.fn=m.extend(k.prototype,{parse:function(n,t,e,i){if(n===_)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=m(n).css(t),t=_);var o=this,s=m.type(n),r=this._rgba=[];return t!==_&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(V(n)||v._default):"array"===s?(A(P.rgba.props,function(t,e){r[e.idx]=X(n[e.idx],e)}),this):"object"===s?(A(P,n instanceof k?function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}:function(t,i){var s=i.cache;A(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=X(n[t],e,!0)}),o[s]&&m.inArray(null,o[s].slice(0,3))<0&&(o[s][3]=1,i.from&&(o._rgba=i.from(o[s])))}),this):void 0},is:function(t){var n=k(t),o=!0,r=this;return A(P,function(t,e){var i,s=n[e.cache];return s&&(i=r[e.cache]||e.to&&e.to(r._rgba)||[],A(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return A(P,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,r){var e=(h=k(t))._space(),i=P[e],t=0===this.alpha()?k("transparent"):this,a=t[i.cache]||i.to(t._rgba),l=a.slice(),h=h[i.cache];return A(i.props,function(t,e){var i=e.idx,s=a[i],n=h[i],o=T[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=X((n-s)*r+s,e)))}),this[e](l)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=k(t)._rgba;return k(m.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=m.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=m.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+m.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=k.fn,P.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,n=t[3],o=Math.max(e,i,s),r=Math.min(e,i,s),a=o-r,l=o+r,t=.5*l,i=r===o?0:e===o?60*(i-s)/a+360:i===o?60*(s-e)/a+120:60*(e-i)/a+240,l=0==a?0:t<=.5?a/l:a/(2-l);return[Math.round(i)%360,l,t,null==n?1:n]},P.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],t=t[3],i=s<=.5?s*(1+i):s+i-s*i,s=2*s-i;return[Math.round(255*G(s,i,e+1/3)),Math.round(255*G(s,i,e)),Math.round(255*G(s,i,e-1/3)),t]},A(P,function(l,t){var o=t.props,r=t.cache,a=t.to,h=t.from;k.fn[l]=function(t){if(a&&!this[r]&&(this[r]=a(this._rgba)),t===_)return this[r].slice();var e,i=m.type(t),s="array"===i||"object"===i?t:arguments,n=this[r].slice();return A(o,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=X(t,e)}),h?((e=k(h(n)))[r]=n,e):k(n)},A(o,function(r,a){k.fn[r]||(k.fn[r]=function(t){var e,i=m.type(t),s="alpha"===r?this._hsla?"hsla":"rgba":l,n=this[s](),o=n[a.idx];return"undefined"===i?o:("function"===i&&(t=t.call(this,o),i=m.type(t)),null==t&&a.empty?this:("string"===i&&(e=y.exec(t))&&(t=o+parseFloat(e[2])*("+"===e[1]?1:-1)),n[a.idx]=t,this[s](n)))})})}),(k.hook=function(t){t=t.split(" ");A(t,function(t,o){m.cssHooks[o]={set:function(t,e){var i,s,n="";if("transparent"!==e&&("string"!==m.type(e)||(i=V(e)))){if(e=k(i||e),!S.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===o?t.parentNode:t;(""===n||"transparent"===n)&&s&&s.style;)try{n=m.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(n&&"transparent"!==n?n:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},m.fx.step[o]=function(t){t.colorInit||(t.start=k(t.elem,o),t.end=k(t.end),t.colorInit=!0),m.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),m.cssHooks.borderColor={expand:function(i){var s={};return A(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}},v=m.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},O=["add","remove","toggle"],W={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},w.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){w.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(q.style(t.elem,e,t.end),t.setAttr=!0)}}),w.fn.addBack||(w.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),w.effects.animateClass=function(n,t,e,i){var o=w.speed(t,e,i);return this.queue(function(){var i=w(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:w(this),start:$(this)}}),s=function(){w.each(O,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=$(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]!==s&&(W[i]||!w.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s));return n}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=w.Deferred(),i=w.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),w.when.apply(w,e.get()).done(function(){s(),w.each(arguments,function(){var e=this.el;w.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},w.fn.extend({addClass:(E=w.fn.addClass,function(t,e,i,s){return e?w.effects.animateClass.call(this,{add:t},e,i,s):E.apply(this,arguments)}),removeClass:(F=w.fn.removeClass,function(t,e,i,s){return 1<arguments.length?w.effects.animateClass.call(this,{remove:t},e,i,s):F.apply(this,arguments)}),toggleClass:(H=w.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?w.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):H.apply(this,arguments):w.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return w.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),w.expr&&w.expr.filters&&w.expr.filters.animated&&(w.expr.filters.animated=(Y=w.expr.filters.animated,function(t){return!!w(t).data(U)||Y(t)})),!1!==w.uiBackCompat&&w.extend(w.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(K+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(K+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=w("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!w.contains(i[0],n)||w(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(w.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),w.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!w.contains(t[0],e)||w(e).trigger("focus")),t}}),w.extend(w.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),w.effects.effect[t]=i,w.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,e="vertical"!==i?(e||100)/100:1;return{height:t.height()*e,width:t.width()*s,outerHeight:t.outerHeight()*e,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(B,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(B)||"",t.removeData(B)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=w("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(K+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=K+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){w.effects.restoreStyle(t),w.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},w.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),w.fn.extend({effect:function(){function t(t){var e=w(this),i=w.effects.mode(e,a)||o;e.data(U,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||w.effects.saveStyle(e),w.isFunction(t)&&t()}var s=Q.apply(this,arguments),n=w.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",r=s.complete,a=s.mode,l=[];return w.fx.off||!n?a?this[a](s.duration,r):this.each(function(){r&&r.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=w(this);function i(){w.isFunction(r)&&r.call(e[0]),w.isFunction(t)&&t()}s.mode=l.shift(),!1===w.uiBackCompat||o?"none"===s.mode?(e[a](),i()):n.call(e[0],s,function(){e.removeData(U),w.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===a:"show"===a)?(e[a](),i()):n.call(e[0],s,i)}},show:(j=w.fn.show,function(t){if(J(t))return j.apply(this,arguments);var e=Q.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(R=w.fn.hide,function(t){if(J(t))return R.apply(this,arguments);var e=Q.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(L=w.fn.toggle,function(t){if(J(t)||"boolean"==typeof t)return L.apply(this,arguments);var e=Q.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var i=this.css(t),s=[];return w.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Z(this.css("clip"),this)},transfer:function(t,e){var i=w(this),s=w(t.to),n="fixed"===s.css("position"),o=w("body"),r=n?o.scrollTop():0,a=n?o.scrollLeft():0,o=s.offset(),o={top:o.top-r,left:o.left-a,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=w("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:s.top-r,left:s.left-a,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(o,t.duration,t.easing,function(){l.remove(),w.isFunction(e)&&e()})}}),w.fx.step.clip=function(t){t.clipInit||(t.start=w(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Z(t.end,t.elem)),t.clipInit=!0),w(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},z={},w.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){z[t]=function(t){return Math.pow(t,e+2)}}),w.extend(z,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),w.each(z,function(t,e){w.easing["easeIn"+t]=e,w.easing["easeOut"+t]=function(t){return 1-e(1-t)},w.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});w.effects,w.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;w(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),w.effects.define("highlight","show",function(t,e){var i=w(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),w.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})})});;jQuery(function($){$('#login_overlay').draggable().lightbox_me({closeClick:false,closeEsc:false,centered:true});});