text: /*!
   * jQuery JavaScript Library v1.11.0
   * http://jquery.com/
   *
   * Includes Sizzle.js
   * http://sizzlejs.com/
   *
   * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2014-01-23T21:02Z
   */
  function updateDemoContent(){updateToolTips()}function moveOutDemoTransactionSection(){$(document).ready(function(){1==$("#transactionDemo").children().size()&&$("#transactionDemoPlaceholder").append($("#transference-demo"))})}function moveInDemoTransactionSection(){$(document).ready(function(){1==$("#transactionDemoPlaceholder").children().size()&&$("#transactionDemo").append($("#transference-demo"))})}function loadDemoContent(){($("#demo-content").hasClass("empty-content")||$("#demo-content").hasClass("normal-content"))&&isSmallScreen()?($("#demo-content").addClass("small-content").removeClass("empty-content").removeClass("normal-content"),moveOutDemoTransactionSection(),$("#demo-content").load("/demo-small",function(){updateDemoContent()})):!$("#demo-content").hasClass("empty-content")&&!$("#demo-content").hasClass("small-content")||isSmallScreen()||($("#demo-content").addClass("normal-content").removeClass("empty-content").removeClass("small-content"),$("#demo-content").load("/demo",function(){moveInDemoTransactionSection(),updateDemoContent()}))}function showDemoTransaction(){$("#transference-demo").hasClass("available")&&$("#transference-demo").isBottomScrolledIntoView()&&setTimeout(function(){$("#demo-shopping-cart-info").fadeIn(3e3,function(){setTimeout(function(){$("#demo-shopping-cart-content").fadeIn("slow",function(){$("#demo-wallet-send-info").fadeIn(3e3,function(){setTimeout(function(){$("#demo-wallet-send-content").fadeIn("slow",function(){setTimeout(function(){$("#show-blockchain-section").fadeIn("slow")},4e3)})},1500)})})},1500)})},500)}function setupActiveJavaScript(){$("#welcome-content").css({position:"fixed",margin:"0 0 0 -37.5%"})}function isSmallScreen(){return $(window).width()<=SMALL_WIDTH?!0:!1}function isMediumScreen(){var window_width=$(window).width();return window_width>SMALL_WIDTH&&MEDIUM_WIDTH>=window_width?!0:!1}function moveTo(id,speed){speed="undefined"==typeof speed?1e3:speed;var offset=20,target=$(id).offset().top-offset;$("html, body").animate({scrollTop:target},speed,"easeInOutCubic")}function setupNavigationMenu(){$("div.navigation-menu").on({mouseenter:function(){window["mouse-over-navigation-menu"]=!0,$("#navigation-menu-icon").slideUp(200),setTimeout(function(){window["mouse-over-navigation-menu"]&&$("div.navigation-menu").find("div.navigation-content").slideDown(200).removeClass("hidden")},200)},mouseleave:function(){window["mouse-over-navigation-menu"]=!1,setTimeout(function(){window["mouse-over-navigation-menu"]||($("div.navigation-menu").find("div.navigation-content").slideUp(200).addClass("hidden",400),setTimeout(function(){window["mouse-over-navigation-menu"]||$("#navigation-menu-icon").slideDown(200)},200))},200)}}),$('a[href^="#"]').click(function(event){var id=$(this).attr("href");moveTo(id),event.preventDefault()})}function setupAutoScroll(){0!=$("div.alert-box").size()||isSmallScreen()||setTimeout(function(){$(window).scrollTop()+$(window).height()<=parseInt($("#welcome").css("height"))+100&&moveTo("#what",3e3)},4e3)}function setupScrollHintAnimation(){$(window).scrollTop()+$(window).height()<=parseInt($("#welcome").css("height"))+100&&$("#scroll-arrow").animate({top:"+=40"},4e3,"easeInOutQuart")}function getScrolledItems(elem){var docViewTop=$(window).scrollTop(),docViewBottom=docViewTop+$(window).height(),elemTop=$(elem).offset().top,elemBottom=elemTop+$(elem).height();return[docViewTop,docViewBottom,elemTop,elemBottom]}function scrollFading(){showDemoTransaction();var sizeWelcome=parseInt($("#welcome").css("height")),scrolled=1.5*$(window).scrollTop(),percentage=1-scrolled/sizeWelcome;0>=percentage?(percentage=0,$("#welcome-content").addClass("hidden")):($("#welcome-content").removeClass("hidden"),$("#welcome-content").css("opacity",percentage),$("#welcome-content").find("div#scroll-message").css("opacity",percentage-scrolled/sizeWelcome),.6>percentage?$("#welcome-content").find("h1").addClass("de_extruded").removeClass("extruded"):$("#welcome-content").find("h1").addClass("extruded").removeClass("de_extruded"),.83>percentage?$("#welcome-content").find("h2").addClass("de_extruded-subtitle").removeClass("extruded-subtitle"):$("#welcome-content").find("h2").addClass("extruded-subtitle").removeClass("de_extruded-subtitle"));var sizeWelcomeAndWhat=parseInt($("#welcome").css("height"))+parseInt($("#what").css("height"))/2,footsteps_opacity=scrolled/sizeWelcomeAndWhat;$("#footsteps-image").css("opacity",footsteps_opacity/2)}function setupScrollFadingAndResize(){$("body,html").bind("scroll mousedown DOMMouseScroll mousewheel keyup",function(e){(e.which>0||"mousedown"===e.type||"mousewheel"===e.type)&&$("html,body").stop()})}function resizeWindow(){$(document).ready(function(){loadDemoContent(),updateSizes()})}function updateSizes(){$(document).ready(function(){var space_side_video=($(window).width()-$(".video-container").find("iframe").width())/2,video_half_height=$(".video-container").find("iframe").height()/2,ratio=space_side_video/178;if($("#footsteps-image").width(parseInt(174*ratio)),$("#footsteps-image").height(parseInt(444*ratio)),$("#footsteps-image").css("top","-"+video_half_height+"px"),$("div#what").height(parseInt($(".video-container").find("iframe").height()+$("div#what").find("h1").height()+$("div#what").find("h3").height())+100),isMediumScreen()){var element=$("div.right-border");element.removeClass("right-border"),element.addClass("bottom-border")}else if(!isSmallScreen()){var element=$("div.bottom-border");element.removeClass("bottom-border"),element.addClass("right-border")}})}function updateToolTips(){$(".qtip").remove(),$(document).ready(function(){$(".has-tooltip[title]").qtip({style:{classes:"tooltip-text qtip-youtube qtip-shadow qtip-rounded"},position:{my:"bottom center",at:"top center",target:this},hide:{fixed:!0,delay:200}}),$(".has-external-tooltip").each(function(){$(this).qtip({content:{text:$("#"+$(this).attr("tooltip-id"))},style:{classes:"tooltip-text qtip-youtube qtip-shadow qtip-rounded"},position:{my:"bottom center",at:"top center",target:this},hide:{fixed:!0,delay:200}})})})}!function(global,factory){"object"==typeof module&&"object"==typeof module.exports?module.exports=global.document?factory(global,!0):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)}:factory(global)}("undefined"!=typeof window?window:this,function(window,noGlobal){function isArraylike(obj){var length=obj.length,type=jQuery.type(obj);return"function"===type||jQuery.isWindow(obj)?!1:1===obj.nodeType&&length?!0:"array"===type||0===length||"number"==typeof length&&length>0&&length-1 in obj}function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not});if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier!==not});if("string"==typeof qualifier){if(risSimple.test(qualifier))return jQuery.filter(qualifier,elements,not);qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return jQuery.inArray(elem,qualifier)>=0!==not})}function sibling(cur,dir){do cur=cur[dir];while(cur&&1!==cur.nodeType);return cur}function createOptions(options){var object=optionsCache[options]={};return jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=!0}),object}function detach(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1)):(document.detachEvent("onreadystatechange",completed),window.detachEvent("onload",completed))}function completed(){(document.addEventListener||"load"===event.type||"complete"===document.readyState)&&(detach(),jQuery.ready())}function dataAttr(elem,key,data){if(void 0===data&&1===elem.nodeType){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();if(data=elem.getAttribute(name),"string"==typeof data){try{data="true"===data?!0:"false"===data?!1:"null"===data?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}jQuery.data(elem,key,data)}else data=void 0}return data}function isEmptyDataObject(obj){var name;for(name in obj)if(("data"!==name||!jQuery.isEmptyObject(obj[name]))&&"toJSON"!==name)return!1;return!0}function internalData(elem,name,data,pvt){if(jQuery.acceptData(elem)){var ret,thisCache,internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if(id&&cache[id]&&(pvt||cache[id].data)||void 0!==data||"string"!=typeof name)return id||(id=isNode?elem[internalKey]=deletedIds.pop()||jQuery.guid++:internalKey),cache[id]||(cache[id]=isNode?{}:{toJSON:jQuery.noop}),("object"==typeof name||"function"==typeof name)&&(pvt?cache[id]=jQuery.extend(cache[id],name):cache[id].data=jQuery.extend(cache[id].data,name)),thisCache=cache[id],pvt||(thisCache.data||(thisCache.data={}),thisCache=thisCache.data),void 0!==data&&(thisCache[jQuery.camelCase(name)]=data),"string"==typeof name?(ret=thisCache[name],null==ret&&(ret=thisCache[jQuery.camelCase(name)])):ret=thisCache,ret}}function internalRemoveData(elem,name,pvt){if(jQuery.acceptData(elem)){var thisCache,i,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(cache[id]){if(name&&(thisCache=pvt?cache[id]:cache[id].data)){jQuery.isArray(name)?name=name.concat(jQuery.map(name,jQuery.camelCase)):name in thisCache?name=[name]:(name=jQuery.camelCase(name),name=name in thisCache?[name]:name.split(" ")),i=name.length;for(;i--;)delete thisCache[name[i]];if(pvt?!isEmptyDataObject(thisCache):!jQuery.isEmptyObject(thisCache))return}(pvt||(delete cache[id].data,isEmptyDataObject(cache[id])))&&(isNode?jQuery.cleanData([elem],!0):support.deleteExpando||cache!=cache.window?delete cache[id]:cache[id]=null)}}}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(err){}}function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement)for(;list.length;)safeFrag.createElement(list.pop());return safeFrag}function getAll(context,tag){var elems,elem,i=0,found=typeof context.getElementsByTagName!==strundefined?context.getElementsByTagName(tag||"*"):typeof context.querySelectorAll!==strundefined?context.querySelectorAll(tag||"*"):void 0;if(!found)for(found=[],elems=context.childNodes||context;null!=(elem=elems[i]);i++)!tag||jQuery.nodeName(elem,tag)?found.push(elem):jQuery.merge(found,getAll(elem,tag));return void 0===tag||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],found):found}function fixDefaultChecked(elem){rcheckableType.test(elem.type)&&(elem.defaultChecked=elem.checked)}function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(11!==content.nodeType?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){return elem.type=(null!==jQuery.find.attr(elem,"type"))+"/"+elem.type,elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);return match?elem.type=match[1]:elem.removeAttribute("type"),elem}function setGlobalEval(elems,refElements){for(var elem,i=0;null!=(elem=elems[i]);i++)jQuery._data(elem,"globalEval",!refElements||jQuery._data(refElements[i],"globalEval"))}function cloneCopyEvent(src,dest){if(1===dest.nodeType&&jQuery.hasData(src)){var type,i,l,oldData=jQuery._data(src),curData=jQuery._data(dest,oldData),events=oldData.events;if(events){delete curData.handle,curData.events={};for(type in events)for(i=0,l=events[type].length;l>i;i++)jQuery.event.add(dest,type,events[type][i])}curData.data&&(curData.data=jQuery.extend({},curData.data))}}function fixCloneNodeIssues(src,dest){var nodeName,e,data;if(1===dest.nodeType){if(nodeName=dest.nodeName.toLowerCase(),!support.noCloneEvent&&dest[jQuery.expando]){data=jQuery._data(dest);for(e in data.events)jQuery.removeEvent(dest,e,data.handle);dest.removeAttribute(jQuery.expando)}"script"===nodeName&&dest.text!==src.text?(disableScript(dest).text=src.text,restoreScript(dest)):"object"===nodeName?(dest.parentNode&&(dest.outerHTML=src.outerHTML),support.html5Clone&&src.innerHTML&&!jQuery.trim(dest.innerHTML)&&(dest.innerHTML=src.innerHTML)):"input"===nodeName&&rcheckableType.test(src.type)?(dest.defaultChecked=dest.checked=src.checked,dest.value!==src.value&&(dest.value=src.value)):"option"===nodeName?dest.defaultSelected=dest.selected=src.defaultSelected:("input"===nodeName||"textarea"===nodeName)&&(dest.defaultValue=src.defaultValue)}}function actualDisplay(name,doc){var elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=window.getDefaultComputedStyle?window.getDefaultComputedStyle(elem[0]).display:jQuery.css(elem[0],"display");return elem.detach(),display}function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];return display||(display=actualDisplay(nodeName,doc),"none"!==display&&display||(iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement),doc=(iframe[0].contentWindow||iframe[0].contentDocument).document,doc.write(),doc.close(),display=actualDisplay(nodeName,doc),iframe.detach()),elemdisplay[nodeName]=display),display}function addGetHookIf(conditionFn,hookFn){return{get:function(){var condition=conditionFn();if(null!=condition)return condition?void delete this.get:(this.get=hookFn).apply(this,arguments)}}}function vendorPropName(style,name){if(name in style)return name;for(var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;i--;)if(name=cssPrefixes[i]+capName,name in style)return name;return origName}function showHide(elements,show){for(var display,elem,hidden,values=[],index=0,length=elements.length;length>index;index++)elem=elements[index],elem.style&&(values[index]=jQuery._data(elem,"olddisplay"),display=elem.style.display,show?(values[index]||"none"!==display||(elem.style.display=""),""===elem.style.display&&isHidden(elem)&&(values[index]=jQuery._data(elem,"olddisplay",defaultDisplay(elem.nodeName)))):values[index]||(hidden=isHidden(elem),(display&&"none"!==display||!hidden)&&jQuery._data(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))));for(index=0;length>index;index++)elem=elements[index],elem.style&&(show&&"none"!==elem.style.display&&""!==elem.style.display||(elem.style.display=show?values[index]||"":"none"));return elements}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){for(var i=extra===(isBorderBox?"border":"content")?4:"width"===name?1:0,val=0;4>i;i+=2)"margin"===extra&&(val+=jQuery.css(elem,extra+cssExpand[i],!0,styles)),isBorderBox?("content"===extra&&(val-=jQuery.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==extra&&(val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(val+=jQuery.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==extra&&(val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles)));return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=!0,val="width"===name?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=support.boxSizing()&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles);if(0>=val||null==val){if(val=curCSS(elem,name,styles),(0>val||null==val)&&(val=elem.style[name]),rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]),val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}function createFxNow(){return setTimeout(function(){fxNow=void 0}),fxNow=jQuery.now()}function genFx(type,includeWidth){var which,attrs={height:type},i=0;for(includeWidth=includeWidth?1:0;4>i;i+=2-includeWidth)which=cssExpand[i],attrs["margin"+which]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function createTween(value,prop,animation){for(var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;length>index;index++)if(tween=collection[index].call(animation,prop,value))return tween}function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,dDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=jQuery._data(elem,"fxshow");opts.queue||(hooks=jQuery._queueHooks(elem,"fx"),null==hooks.unqueued&&(hooks.unqueued=0,oldfire=hooks.empty.fire,hooks.empty.fire=function(){hooks.unqueued||oldfire()}),hooks.unqueued++,anim.always(function(){anim.always(function(){hooks.unqueued--,jQuery.queue(elem,"fx").length||hooks.empty.fire()})})),1===elem.nodeType&&("height"in props||"width"in props)&&(opts.overflow=[style.overflow,style.overflowX,style.overflowY],display=jQuery.css(elem,"display"),dDisplay=defaultDisplay(elem.nodeName),"none"===display&&(display=dDisplay),"inline"===display&&"none"===jQuery.css(elem,"float")&&(support.inlineBlockNeedsLayout&&"inline"!==dDisplay?style.zoom=1:style.display="inline-block")),opts.overflow&&(style.overflow="hidden",support.shrinkWrapBlocks()||anim.always(function(){style.overflow=opts.overflow[0],style.overflowX=opts.overflow[1],style.overflowY=opts.overflow[2]}));for(prop in props)if(value=props[prop],rfxtypes.exec(value)){if(delete props[prop],toggle=toggle||"toggle"===value,value===(hidden?"hide":"show")){if("show"!==value||!dataShow||void 0===dataShow[prop])continue;hidden=!0}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}if(!jQuery.isEmptyObject(orig)){dataShow?"hidden"in dataShow&&(hidden=dataShow.hidden):dataShow=jQuery._data(elem,"fxshow",{}),toggle&&(dataShow.hidden=!hidden),hidden?jQuery(elem).show():anim.done(function(){jQuery(elem).hide()}),anim.done(function(){var prop;jQuery._removeData(elem,"fxshow");for(prop in orig)jQuery.style(elem,prop,orig[prop])});for(prop in orig)tween=createTween(hidden?dataShow[prop]:0,prop,anim),prop in dataShow||(dataShow[prop]=tween.start,hidden&&(tween.end=tween.start,tween.start="width"===prop||"height"===prop?1:0))}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props)if(name=jQuery.camelCase(index),easing=specialEasing[name],value=props[index],jQuery.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),hooks=jQuery.cssHooks[name],hooks&&"expand"in hooks){value=hooks.expand(value),delete props[name];for(index in value)index in props||(props[index]=value[index],specialEasing[index]=easing)}else specialEasing[name]=easing}function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped)return!1;for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;length>index;index++)animation.tweens[index].run(percent);return deferred.notifyWith(elem,[animation,percent,remaining]),1>percent&&length?remaining:(deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);return animation.tweens.push(tween),tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=!0;length>index;index++)animation.tweens[index].run(1);return gotoEnd?deferred.resolveWith(elem,[animation,gotoEnd]):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(propFilter(props,animation.opts.specialEasing);length>index;index++)if(result=animationPrefilters[index].call(animation,elem,props,animation.opts))return result;return jQuery.map(props,createTween,animation),jQuery.isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){"string"!=typeof dataTypeExpression&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func))for(;dataType=dataTypes[i++];)"+"===dataType.charAt(0)?(dataType=dataType.slice(1)||"*",(structure[dataType]=structure[dataType]||[]).unshift(func)):(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){function inspect(dataType){var selected;return inspected[dataType]=!0,jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);return"string"!=typeof dataTypeOrTransport||seekingTransport||inspected[dataTypeOrTransport]?seekingTransport?!(selected=dataTypeOrTransport):void 0:(options.dataTypes.unshift(dataTypeOrTransport),inspect(dataTypeOrTransport),!1)}),selected}var inspected={},seekingTransport=structure===transports;return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)void 0!==src[key]&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);return deep&&jQuery.extend(!0,target,deep),target}function ajaxHandleResponses(s,jqXHR,responses){for(var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;"*"===dataTypes[0];)dataTypes.shift(),void 0===ct&&(ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"));if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}return finalDataType?(finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]):void 0}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(current=dataTypes.shift();current;)if(s.responseFields[current]&&(jqXHR[s.responseFields[current]]=response),!prev&&isSuccess&&s.dataFilter&&(response=s.dataFilter(response,s.dataType)),prev=current,current=dataTypes.shift())if("*"===current)current=prev;else if("*"!==prev&&prev!==current){if(conv=converters[prev+" "+current]||converters["* "+current],!conv)for(conv2 in converters)if(tmp=conv2.split(" "),tmp[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]])){conv===!0?conv=converters[conv2]:converters[conv2]!==!0&&(current=tmp[0],dataTypes.unshift(tmp[1]));break}if(conv!==!0)if(conv&&s["throws"])response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}return{state:"success",data:response}}function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj))jQuery.each(obj,function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+("object"==typeof v?i:"")+"]",v,traditional,add)});else if(traditional||"object"!==jQuery.type(obj))add(prefix,obj);else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}function createStandardXHR(){try{return new window.XMLHttpRequest}catch(e){}}function createActiveXHR(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function getWindow(elem){return jQuery.isWindow(elem)?elem:9===elem.nodeType?elem.defaultView||elem.parentWindow:!1}var deletedIds=[],slice=deletedIds.slice,concat=deletedIds.concat,push=deletedIds.push,indexOf=deletedIds.indexOf,class2type={},toString=class2type.toString,hasOwn=class2type.hasOwnProperty,trim="".trim,support={},version="1.11.0",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return null!=num?0>num?this[num+this.length]:this[num]:slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);return ret.prevObject=this,ret.context=this.context,ret},each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(0>i?len:0);return this.pushStack(j>=0&&len>j?[this[j]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push,sort:deletedIds.sort,splice:deletedIds.splice},jQuery.extend=jQuery.fn.extend=function(){var src,copyIsArray,copy,name,options,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=!1;for("boolean"==typeof target&&(deep=target,target=arguments[i]||{},i++),"object"==typeof target||jQuery.isFunction(target)||(target={}),i===length&&(target=this,i--);length>i;i++)if(null!=(options=arguments[i]))for(name in options)src=target[name],copy=options[name],target!==copy&&(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))?(copyIsArray?(copyIsArray=!1,clone=src&&jQuery.isArray(src)?src:[]):clone=src&&jQuery.isPlainObject(src)?src:{},target[name]=jQuery.extend(deep,clone,copy)):void 0!==copy&&(target[name]=copy));return target},jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:!0,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return"function"===jQuery.type(obj)},isArray:Array.isArray||function(obj){return"array"===jQuery.type(obj)},isWindow:function(obj){return null!=obj&&obj==obj.window},isNumeric:function(obj){return obj-parseFloat(obj)>=0},isEmptyObject:function(obj){var name;for(name in obj)return!1;return!0},isPlainObject:function(obj){var key;if(!obj||"object"!==jQuery.type(obj)||obj.nodeType||jQuery.isWindow(obj))return!1;try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(support.ownLast)for(key in obj)return hasOwn.call(obj,key);for(key in obj);return void 0===key||hasOwn.call(obj,key)},type:function(obj){return null==obj?obj+"":"object"==typeof obj||"function"==typeof obj?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(data){data&&jQuery.trim(data)&&(window.execScript||function(data){window.eval.call(window,data)})(data)},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray)for(;length>i&&(value=callback.apply(obj[i],args),value!==!1);i++);else for(i in obj)if(value=callback.apply(obj[i],args),value===!1)break}else if(isArray)for(;length>i&&(value=callback.call(obj[i],i,obj[i]),value!==!1);i++);else for(i in obj)if(value=callback.call(obj[i],i,obj[i]),value===!1)break;return obj},trim:trim&&!trim.call("\ufeff\xa0")?function(text){return null==text?"":trim.call(text)}:function(text){return null==text?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];return null!=arr&&(isArraylike(Object(arr))?jQuery.merge(ret,"string"==typeof arr?[arr]:arr):push.call(ret,arr)),ret},inArray:function(elem,arr,i){var len;if(arr){if(indexOf)return indexOf.call(arr,elem,i);for(len=arr.length,i=i?0>i?Math.max(0,len+i):i:0;len>i;i++)if(i in arr&&arr[i]===elem)return i}return-1},merge:function(first,second){for(var len=+second.length,j=0,i=first.length;len>j;)first[i++]=second[j++];if(len!==len)for(;void 0!==second[j];)first[i++]=second[j++];return first.length=i,first},grep:function(elems,callback,invert){for(var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;length>i;i++)callbackInverse=!callback(elems[i],i),callbackInverse!==callbackExpect&&matches.push(elems[i]);return matches},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];if(isArray)for(;length>i;i++)value=callback(elems[i],i,arg),null!=value&&ret.push(value);else for(i in elems)value=callback(elems[i],i,arg),null!=value&&ret.push(value);return concat.apply([],ret)},guid:1,proxy:function(fn,context){var args,proxy,tmp;return"string"==typeof context&&(tmp=fn[context],context=fn,fn=tmp),jQuery.isFunction(fn)?(args=slice.call(arguments,2),proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))},proxy.guid=fn.guid=fn.guid||jQuery.guid++,proxy):void 0},now:function(){return+new Date},support:support}),jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});var Sizzle=/*!
   * Sizzle CSS Selector Engine v1.10.16
   * http://sizzlejs.com/
   *
   * Copyright 2013 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2014-01-13
   */
  function(window){function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document&&setDocument(context),context=context||document,results=results||[],!selector||"string"!=typeof selector)return results;if(1!==(nodeType=context.nodeType)&&9!==nodeType)return[];if(documentIsHTML&&!seed){if(match=rquickExpr.exec(selector))if(m=match[1]){if(9===nodeType){if(elem=context.getElementById(m),!elem||!elem.parentNode)return results;if(elem.id===m)return results.push(elem),results}else if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,context.getElementsByTagName(selector)),results;if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName)return push.apply(results,context.getElementsByClassName(m)),results}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nid=old=expando,newContext=context,newSelector=9===nodeType&&selector,1===nodeType&&"object"!==context.nodeName.toLowerCase()){for(groups=tokenize(selector),(old=context.getAttribute("id"))?nid=old.replace(rescape,"\\$&"):context.setAttribute("id",nid),nid="[id='"+nid+"'] ",i=groups.length;i--;)groups[i]=nid+toSelector(groups[i]);newContext=rsibling.test(selector)&&testContext(context.parentNode)||context,newSelector=groups.join(",")}if(newSelector)try{return push.apply(results,newContext.querySelectorAll(newSelector)),results}catch(qsaError){}finally{old||context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){function cache(key,value){return keys.push(key+" ")>Expr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}var keys=[];return cache}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return!1}finally{div.parentNode&&div.parentNode.removeChild(div),div=null}}function addHandle(attrs,handler){for(var arr=attrs.split("|"),i=attrs.length;i--;)Expr.attrHandle[arr[i]]=handler}function siblingCheck(a,b){var cur=b&&a,diff=cur&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff)return diff;if(cur)for(;cur=cur.nextSibling;)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function testContext(context){return context&&typeof context.getElementsByTagName!==strundefined&&context}function setFilters(){}function tokenize(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached)return parseOnly?0:cached.slice(0);for(soFar=selector,groups=[],preFilters=Expr.preFilter;soFar;){(!matched||(match=rcomma.exec(soFar)))&&(match&&(soFar=soFar.slice(match[0].length)||soFar),groups.push(tokens=[])),matched=!1,(match=rcombinators.exec(soFar))&&(matched=match.shift(),tokens.push({value:matched,type:match[0].replace(rtrim," ")}),soFar=soFar.slice(matched.length));for(type in Expr.filter)!(match=matchExpr[type].exec(soFar))||preFilters[type]&&!(match=preFilters[type](match))||(matched=match.shift(),tokens.push({value:matched,type:type,matches:match}),soFar=soFar.slice(matched.length));if(!matched)break}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";len>i;i++)selector+=tokens[i].value;return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&"parentNode"===dir,doneName=done++;return combinator.first?function(elem,context,xml){for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)return matcher(elem,context,xml)}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];if(xml){for(;elem=elem[dir];)if((1===elem.nodeType||checkNonElements)&&matcher(elem,context,xml))return!0}else for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements){if(outerCache=elem[expando]||(elem[expando]={}),(oldCache=outerCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName)return newCache[2]=oldCache[2];if(outerCache[dir]=newCache,newCache[2]=matcher(elem,context,xml))return!0}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=null!=map;len>i;i++)(elem=unmatched[i])&&(!filter||filter(elem,context,xml))&&(newUnmatched.push(elem),mapped&&map.push(i));return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){return postFilter&&!postFilter[expando]&&(postFilter=setMatcher(postFilter)),postFinder&&!postFinder[expando]&&(postFinder=setMatcher(postFinder,postSelector)),markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=!preFilter||!seed&&selector?elems:condense(elems,preMap,preFilter,context,xml),matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(temp=condense(matcherOut,postMap),postFilter(temp,[],context,xml),i=temp.length;i--;)(elem=temp[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed){if(postFinder||preFilter){if(postFinder){for(temp=[],i=matcherOut.length;i--;)(elem=matcherOut[i])&&temp.push(matcherIn[i]=elem);postFinder(null,matcherOut=[],temp,xml)}for(i=matcherOut.length;i--;)(elem=matcherOut[i])&&(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){return!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];len>i;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if(matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches),matcher[expando]){for(j=++i;len>j&&!Expr.relative[tokens[j].type];j++);return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:" "===tokens[i-2].type?"*":""})).replace(rtrim,"$1"),matcher,j>i&&matcherFromTokens(tokens.slice(i,j)),len>j&&matcherFromTokens(tokens=tokens.slice(j)),len>j&&toSelector(tokens))}matchers.push(matcher)}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context!==document&&context);i!==len&&null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0;matcher=elementMatchers[j++];)if(matcher(elem,context,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}function multipleContexts(selector,contexts,results){for(var i=0,len=contexts.length;len>i;i++)Sizzle(selector,contexts[i],results);return results}function select(selector,context,results,seed){var i,tokens,token,type,find,match=tokenize(selector);if(!seed&&1===match.length){if(tokens=match[0]=match[0].slice(0),tokens.length>2&&"ID"===(token=tokens[0]).type&&support.getById&&9===context.nodeType&&documentIsHTML&&Expr.relative[tokens[1].type]){if(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0],!context)return results;selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),selector=seed.length&&toSelector(tokens),!selector)return push.apply(results,seed),results;break}}return compile(selector,match)(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context),results}var i,support,Expr,getText,isXML,compile,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+-new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){return a===b&&(hasDuplicate=!0),0},strundefined="undefined",MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){for(var i=0,len=this.length;len>i;i++)if(this[i]===elem)return i;return-1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")"+whitespace+"*(?:([*^$|!~]?=)"+whitespace+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+identifier+")|)|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+attributes.replace(3,8)+")*)|.*)\\)|)",rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:0>high?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320)};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes),arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){for(var j=target.length,i=0;target[j++]=els[i++];);target.length=j-1}}}support=Sizzle.support={},isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?"HTML"!==documentElement.nodeName:!1},setDocument=Sizzle.setDocument=function(node){var hasCompare,doc=node?node.ownerDocument||node:preferredDoc,parent=doc.defaultView;return doc!==document&&9===doc.nodeType&&doc.documentElement?(document=doc,docElem=doc.documentElement,documentIsHTML=!isXML(doc),parent&&parent!==parent.top&&(parent.addEventListener?parent.addEventListener("unload",function(){setDocument()},!1):parent.attachEvent&&parent.attachEvent("onunload",function(){setDocument()})),support.attributes=assert(function(div){return div.className="i",!div.getAttribute("className")}),support.getElementsByTagName=assert(function(div){return div.appendChild(doc.createComment("")),!div.getElementsByTagName("*").length}),support.getElementsByClassName=rnative.test(doc.getElementsByClassName)&&assert(function(div){return div.innerHTML="<div class='a'></div><div class='a i'></div>",div.firstChild.className="i",2===div.getElementsByClassName("i").length}),support.getById=assert(function(div){return docElem.appendChild(div).id=expando,!doc.getElementsByName||!doc.getElementsByName(expando).length}),support.getById?(Expr.find.ID=function(id,context){if(typeof context.getElementById!==strundefined&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}},Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}):(delete Expr.find.ID,Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");return node&&node.value===attrId}}),Expr.find.TAG=support.getElementsByTagName?function(tag,context){return typeof context.getElementsByTagName!==strundefined?context.getElementsByTagName(tag):void 0}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if("*"===tag){for(;elem=results[i++];)1===elem.nodeType&&tmp.push(elem);return tmp}return results},Expr.find.CLASS=support.getElementsByClassName&&function(className,context){return typeof context.getElementsByClassName!==strundefined&&documentIsHTML?context.getElementsByClassName(className):void 0},rbuggyMatches=[],rbuggyQSA=[],(support.qsa=rnative.test(doc.querySelectorAll))&&(assert(function(div){div.innerHTML="<select t=''><option selected=''></option></select>",div.querySelectorAll("[t^='']").length&&rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")"),div.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")"),div.querySelectorAll(":checked").length||rbuggyQSA.push(":checked")}),assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden"),div.appendChild(input).setAttribute("name","D"),div.querySelectorAll("[name=d]").length&&rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?="),div.querySelectorAll(":enabled").length||rbuggyQSA.push(":enabled",":disabled"),div.querySelectorAll("*,:x"),rbuggyQSA.push(",.*:")})),(support.matchesSelector=rnative.test(matches=docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))&&assert(function(div){support.disconnectedMatch=matches.call(div,"div"),matches.call(div,"[s!='']:x"),rbuggyMatches.push("!=",pseudos)}),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|")),hasCompare=rnative.test(docElem.compareDocumentPosition),contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=9===a.nodeType?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!(!bup||1!==bup.nodeType||!(adown.contains?adown.contains(bup):a.compareDocumentPosition&&16&a.compareDocumentPosition(bup)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},sortOrder=hasCompare?function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare?compare:(compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&compare||!support.sortDetached&&b.compareDocumentPosition(a)===compare?a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)?-1:b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)?1:sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0:4&compare?-1:1)}:function(a,b){if(a===b)return hasDuplicate=!0,0;var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup)return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0;if(aup===bup)return siblingCheck(a,b);for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);for(;ap[i]===bp[i];)i++;return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0},doc):document},Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)},Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document&&setDocument(elem),expr=expr.replace(rattributeQuotes,"='$1']"),!(!support.matchesSelector||!documentIsHTML||rbuggyMatches&&rbuggyMatches.test(expr)||rbuggyQSA&&rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&11!==elem.document.nodeType)return ret}catch(e){}return Sizzle(expr,document,null,[elem]).length>0},Sizzle.contains=function(context,elem){return(context.ownerDocument||context)!==document&&setDocument(context),contains(context,elem)},Sizzle.attr=function(elem,name){(elem.ownerDocument||elem)!==document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):void 0;return void 0!==val?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null},Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)},Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;if(hasDuplicate=!support.detectDuplicates,sortInput=!support.sortStable&&results.slice(0),results.sort(sortOrder),hasDuplicate){for(;elem=results[i++];)elem===results[i]&&(j=duplicates.push(i));for(;j--;)results.splice(duplicates[j],1)}return sortInput=null,results},getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(1===nodeType||9===nodeType||11===nodeType){if("string"==typeof elem.textContent)return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(3===nodeType||4===nodeType)return elem.nodeValue}else for(;node=elem[i++];)ret+=getText(node);return ret},Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[4]||match[5]||"").replace(runescape,funescape),"~="===match[2]&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),"nth"===match[1].slice(0,3)?(match[3]||Sizzle.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*("even"===match[3]||"odd"===match[3])),match[5]=+(match[7]+match[8]||"odd"===match[3])):match[3]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[5]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]&&void 0!==match[4]?match[2]=match[4]:unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return"*"===nodeNameSelector?function(){return!0}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test("string"==typeof elem.className&&elem.className||typeof elem.getAttribute!==strundefined&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return null==result?"!="===operator:operator?(result+="","="===operator?result===check:"!="===operator?result!==check:"^="===operator?check&&0===result.indexOf(check):"*="===operator?check&&result.indexOf(check)>-1:"$="===operator?check&&result.slice(-check.length)===check:"~="===operator?(" "+result+" ").indexOf(check)>-1:"|="===operator?result===check||result.slice(0,check.length+1)===check+"-":!1):!0}},CHILD:function(type,what,argument,first,last){var simple="nth"!==type.slice(0,3),forward="last"!==type.slice(-4),ofType="of-type"===what;return 1===first&&0===last?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:1===node.nodeType)return!1;start=dir="only"===type&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(outerCache=parent[expando]||(parent[expando]={}),cache=outerCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=cache[0]===dirruns&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(1===node.nodeType&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns)diff=cache[1];else for(;(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())&&((ofType?node.nodeName.toLowerCase()!==name:1!==node.nodeType)||!++diff||(useCache&&((node[expando]||(node[expando]={}))[type]=[dirruns,diff]),node!==elem)););return diff-=last,diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)idx=indexOf.call(seed,matched[i]),seed[idx]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))}):function(elem,context,xml){return input[0]=elem,matcher(input,null,xml,results),!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){return ridentifier.test(lang||"")||Sizzle.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;do if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return elemLang=elemLang.toLowerCase(),elemLang===lang||0===elemLang.indexOf(lang+"-");while((elem=elem.parentNode)&&1===elem.nodeType);return!1}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===!1},disabled:function(elem){return elem.disabled===!0},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return"input"===nodeName&&!!elem.checked||"option"===nodeName&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&"button"===elem.type||"button"===name},text:function(elem){var attr;return"input"===elem.nodeName.toLowerCase()&&"text"===elem.type&&(null==(attr=elem.getAttribute("type"))||"text"===attr.toLowerCase())},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[0>argument?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;length>i;i+=2)matchIndexes.push(i);return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){for(var i=1;length>i;i+=2)matchIndexes.push(i);return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=0>argument?argument+length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=0>argument?argument+length:argument;++i<length;)matchIndexes.push(i);return matchIndexes})}},Expr.pseudos.nth=Expr.pseudos.eq;for(i in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Expr.pseudos[i]=createInputPseudo(i);for(i in{submit:!0,reset:!0})Expr.pseudos[i]=createButtonPseudo(i);return setFilters.prototype=Expr.filters=Expr.pseudos,Expr.setFilters=new setFilters,compile=Sizzle.compile=function(selector,group){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){for(group||(group=tokenize(selector)),i=group.length;i--;)cached=matcherFromTokens(group[i]),cached[expando]?setMatchers.push(cached):elementMatchers.push(cached);cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers))}return cached},support.sortStable=expando.split("").sort(sortOrder).join("")===expando,support.detectDuplicates=!!hasDuplicate,setDocument(),support.sortDetached=assert(function(div1){return 1&div1.compareDocumentPosition(document.createElement("div"))}),assert(function(div){return div.innerHTML="<a href='#'></a>","#"===div.firstChild.getAttribute("href")})||addHandle("type|href|height|width",function(elem,name,isXML){return isXML?void 0:elem.getAttribute(name,"type"===name.toLowerCase()?1:2)}),support.attributes&&assert(function(div){return div.innerHTML="<input/>",div.firstChild.setAttribute("value",""),""===div.firstChild.getAttribute("value")})||addHandle("value",function(elem,name,isXML){return isXML||"input"!==elem.nodeName.toLowerCase()?void 0:elem.defaultValue}),assert(function(div){return null==div.getAttribute("disabled")})||addHandle(booleans,function(elem,name,isXML){var val;return isXML?void 0:elem[name]===!0?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}),Sizzle}(window);jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return 1===elem.nodeType}))},jQuery.fn.extend({find:function(selector){var i,ret=[],self=this,len=self.length;if("string"!=typeof selector)return this.pushStack(jQuery(selector).filter(function(){for(i=0;len>i;i++)if(jQuery.contains(self[i],this))return!0}));for(i=0;len>i;i++)jQuery.find(selector,self[i],ret);return ret=this.pushStack(len>1?jQuery.unique(ret):ret),ret.selector=this.selector?this.selector+" "+selector:selector,ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,document=window.document,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector)return this;if("string"==typeof selector){if(match="<"===selector.charAt(0)&&">"===selector.charAt(selector.length-1)&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),!match||!match[1]&&context)return!context||context.jquery?(context||rootjQuery).find(selector):this.constructor(context).find(selector);if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)jQuery.isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}if(elem=document.getElementById(match[2]),elem&&elem.parentNode){if(elem.id!==match[2])return rootjQuery.find(selector);this.length=1,this[0]=elem}return this.context=document,this.selector=selector,this}return selector.nodeType?(this.context=this[0]=selector,this.length=1,this):jQuery.isFunction(selector)?"undefined"!=typeof rootjQuery.ready?rootjQuery.ready(selector):selector(jQuery):(void 0!==selector.selector&&(this.selector=selector.selector,this.context=selector.context),jQuery.makeArray(selector,this))};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(elem,dir,until){for(var matched=[],cur=elem[dir];cur&&9!==cur.nodeType&&(void 0===until||1!==cur.nodeType||!jQuery(cur).is(until));)1===cur.nodeType&&matched.push(cur),cur=cur[dir];return matched},sibling:function(n,elem){for(var r=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&r.push(n);return r}}),jQuery.fn.extend({has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;len>i;i++)if(jQuery.contains(this,targets[i]))return!0})},closest:function(selectors,context){for(var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||"string"!=typeof selectors?jQuery(selectors,context||this.context):0;l>i;i++)for(cur=this[i];cur&&cur!==context;cur=cur.parentNode)if(cur.nodeType<11&&(pos?pos.index(cur)>-1:1===cur.nodeType&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)
  },index:function(elem){return elem?"string"==typeof elem?jQuery.inArray(this[0],jQuery(elem)):jQuery.inArray(elem.jquery?elem[0]:elem,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);return"Until"!==name.slice(-5)&&(selector=until),selector&&"string"==typeof selector&&(ret=jQuery.filter(selector,ret)),this.length>1&&(guaranteedUnique[name]||(ret=jQuery.unique(ret)),rparentsprev.test(name)&&(ret=ret.reverse())),this.pushStack(ret)}});var rnotwhite=/\S+/g,optionsCache={};jQuery.Callbacks=function(options){options="string"==typeof options?optionsCache[options]||createOptions(options):jQuery.extend({},options);var firing,memory,fired,firingLength,firingIndex,firingStart,list=[],stack=!options.once&&[],fire=function(data){for(memory=options.memory&&data,fired=!0,firingIndex=firingStart||0,firingStart=0,firingLength=list.length,firing=!0;list&&firingLength>firingIndex;firingIndex++)if(list[firingIndex].apply(data[0],data[1])===!1&&options.stopOnFalse){memory=!1;break}firing=!1,list&&(stack?stack.length&&fire(stack.shift()):memory?list=[]:self.disable())},self={add:function(){if(list){var start=list.length;!function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);"function"===type?options.unique&&self.has(arg)||list.push(arg):arg&&arg.length&&"string"!==type&&add(arg)})}(arguments),firing?firingLength=list.length:memory&&(firingStart=start,fire(memory))}return this},remove:function(){return list&&jQuery.each(arguments,function(_,arg){for(var index;(index=jQuery.inArray(arg,list,index))>-1;)list.splice(index,1),firing&&(firingLength>=index&&firingLength--,firingIndex>=index&&firingIndex--)}),this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!(!list||!list.length)},empty:function(){return list=[],firingLength=0,this},disable:function(){return list=stack=memory=void 0,this},disabled:function(){return!list},lock:function(){return stack=void 0,memory||self.disable(),this},locked:function(){return!stack},fireWith:function(context,args){return!list||fired&&!stack||(args=args||[],args=[context,args.slice?args.slice():args],firing?stack.push(args):fire(args)),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!fired}};return self},jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);returned&&jQuery.isFunction(returned.promise)?returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify):newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)})}),fns=null}).promise()},promise:function(obj){return null!=obj?jQuery.extend(obj,promise):promise}},deferred={};return promise.pipe=promise.then,jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add,stateString&&list.add(function(){state=stateString},tuples[1^i][2].disable,tuples[2][2].lock),deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?promise:this,arguments),this},deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(subordinate){var progressValues,progressContexts,resolveContexts,i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=1!==length||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=1===remaining?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this,values[i]=arguments.length>1?slice.call(arguments):value,values===progressValues?deferred.notifyWith(contexts,values):--remaining||deferred.resolveWith(contexts,values)}};if(length>1)for(progressValues=new Array(length),progressContexts=new Array(length),resolveContexts=new Array(length);length>i;i++)resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)?resolveValues[i].promise().done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i,progressContexts,progressValues)):--remaining;return remaining||deferred.resolveWith(resolveContexts,resolveValues),deferred.promise()}});var readyList;jQuery.fn.ready=function(fn){return jQuery.ready.promise().done(fn),this},jQuery.extend({isReady:!1,readyWait:1,holdReady:function(hold){hold?jQuery.readyWait++:jQuery.ready(!0)},ready:function(wait){if(wait===!0?!--jQuery.readyWait:!jQuery.isReady){if(!document.body)return setTimeout(jQuery.ready);jQuery.isReady=!0,wait!==!0&&--jQuery.readyWait>0||(readyList.resolveWith(document,[jQuery]),jQuery.fn.trigger&&jQuery(document).trigger("ready").off("ready"))}}}),jQuery.ready.promise=function(obj){if(!readyList)if(readyList=jQuery.Deferred(),"complete"===document.readyState)setTimeout(jQuery.ready);else if(document.addEventListener)document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1);else{document.attachEvent("onreadystatechange",completed),window.attachEvent("onload",completed);var top=!1;try{top=null==window.frameElement&&document.documentElement}catch(e){}top&&top.doScroll&&!function doScrollCheck(){if(!jQuery.isReady){try{top.doScroll("left")}catch(e){return setTimeout(doScrollCheck,50)}detach(),jQuery.ready()}}()}return readyList.promise(obj)};var i,strundefined="undefined";for(i in jQuery(support))break;support.ownLast="0"!==i,support.inlineBlockNeedsLayout=!1,jQuery(function(){var container,div,body=document.getElementsByTagName("body")[0];body&&(container=document.createElement("div"),container.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",div=document.createElement("div"),body.appendChild(container).appendChild(div),typeof div.style.zoom!==strundefined&&(div.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(support.inlineBlockNeedsLayout=3===div.offsetWidth)&&(body.style.zoom=1)),body.removeChild(container),container=div=null)}),function(){var div=document.createElement("div");if(null==support.deleteExpando){support.deleteExpando=!0;try{delete div.test}catch(e){support.deleteExpando=!1}}div=null}(),jQuery.acceptData=function(elem){var noData=jQuery.noData[(elem.nodeName+" ").toLowerCase()],nodeType=+elem.nodeType||1;return 1!==nodeType&&9!==nodeType?!1:!noData||noData!==!0&&elem.getAttribute("classid")===noData};var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;jQuery.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(elem){return elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando],!!elem&&!isEmptyDataObject(elem)},data:function(elem,name,data){return internalData(elem,name,data)},removeData:function(elem,name){return internalRemoveData(elem,name)},_data:function(elem,name,data){return internalData(elem,name,data,!0)},_removeData:function(elem,name){return internalRemoveData(elem,name,!0)}}),jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(void 0===key){if(this.length&&(data=jQuery.data(elem),1===elem.nodeType&&!jQuery._data(elem,"parsedAttrs"))){for(i=attrs.length;i--;)name=attrs[i].name,0===name.indexOf("data-")&&(name=jQuery.camelCase(name.slice(5)),dataAttr(elem,name,data[name]));jQuery._data(elem,"parsedAttrs",!0)}return data}return"object"==typeof key?this.each(function(){jQuery.data(this,key)}):arguments.length>1?this.each(function(){jQuery.data(this,key,value)}):elem?dataAttr(elem,key,jQuery.data(elem,key)):void 0},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})}}),jQuery.extend({queue:function(elem,type,data){var queue;return elem?(type=(type||"fx")+"queue",queue=jQuery._data(elem,type),data&&(!queue||jQuery.isArray(data)?queue=jQuery._data(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]):void 0},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};"inprogress"===fn&&(fn=queue.shift(),startLength--),fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem,type+"queue"),jQuery._removeData(elem,key)})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length<setter?jQuery.queue(this[0],type):void 0===data?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type),"fx"===type&&"inprogress"!==queue[0]&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])};for("string"!=typeof type&&(obj=type,type=void 0),type=type||"fx";i--;)tmp=jQuery._data(elements[i],type+"queueHooks"),tmp&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,cssExpand=["Top","Right","Bottom","Left"],isHidden=function(elem,el){return elem=el||elem,"none"===jQuery.css(elem,"display")||!jQuery.contains(elem.ownerDocument,elem)},access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,length=elems.length,bulk=null==key;if("object"===jQuery.type(key)){chainable=!0;for(i in key)jQuery.access(elems,fn,i,key[i],!0,emptyGet,raw)}else if(void 0!==value&&(chainable=!0,jQuery.isFunction(value)||(raw=!0),bulk&&(raw?(fn.call(elems,value),fn=null):(bulk=fn,fn=function(elem,key,value){return bulk.call(jQuery(elem),value)})),fn))for(;length>i;i++)fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));return chainable?elems:bulk?fn.call(elems):length?fn(elems[0],key):emptyGet},rcheckableType=/^(?:checkbox|radio)$/i;!function(){var fragment=document.createDocumentFragment(),div=document.createElement("div"),input=document.createElement("input");if(div.setAttribute("className","t"),div.innerHTML="  <link/><table></table><a href='/a'>a</a>",support.leadingWhitespace=3===div.firstChild.nodeType,support.tbody=!div.getElementsByTagName("tbody").length,support.htmlSerialize=!!div.getElementsByTagName("link").length,support.html5Clone="<:nav></:nav>"!==document.createElement("nav").cloneNode(!0).outerHTML,input.type="checkbox",input.checked=!0,fragment.appendChild(input),support.appendChecked=input.checked,div.innerHTML="<textarea>x</textarea>",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue,fragment.appendChild(div),div.innerHTML="<input type='radio' checked='checked' name='t'/>",support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,support.noCloneEvent=!0,div.attachEvent&&(div.attachEvent("onclick",function(){support.noCloneEvent=!1}),div.cloneNode(!0).click()),null==support.deleteExpando){support.deleteExpando=!0;try{delete div.test}catch(e){support.deleteExpando=!1}}fragment=div=input=null}(),function(){var i,eventName,div=document.createElement("div");for(i in{submit:!0,change:!0,focusin:!0})eventName="on"+i,(support[i+"Bubbles"]=eventName in window)||(div.setAttribute(eventName,"t"),support[i+"Bubbles"]=div.attributes[eventName].expando===!1);div=null}();var rformElems=/^(?:input|select|textarea)$/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{},add:function(elem,types,handler,data,selector){var tmp,events,t,handleObjIn,special,eventHandle,handleObj,handlers,type,namespaces,origType,elemData=jQuery._data(elem);if(elemData){for(handler.handler&&(handleObjIn=handler,handler=handleObjIn.handler,selector=handleObjIn.selector),handler.guid||(handler.guid=jQuery.guid++),(events=elemData.events)||(events=elemData.events={}),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return typeof jQuery===strundefined||e&&jQuery.event.triggered===e.type?void 0:jQuery.event.dispatch.apply(eventHandle.elem,arguments)},eventHandle.elem=elem),types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type&&(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||(handlers=events[type]=[],handlers.delegateCount=0,special.setup&&special.setup.call(elem,data,namespaces,eventHandle)!==!1||(elem.addEventListener?elem.addEventListener(type,eventHandle,!1):elem.attachEvent&&elem.attachEvent("on"+type,eventHandle))),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0);elem=null}},remove:function(elem,types,handler,selector,mappedTypes){var j,handleObj,tmp,origCount,t,events,special,handlers,type,namespaces,origType,elemData=jQuery.hasData(elem)&&jQuery._data(elem);if(elemData&&(events=elemData.events)){for(types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)if(tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type){for(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,handlers=events[type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],!mappedTypes&&origType!==handleObj.origType||handler&&handler.guid!==handleObj.guid||tmp&&!tmp.test(handleObj.namespace)||selector&&selector!==handleObj.selector&&("**"!==selector||!handleObj.selector)||(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));origCount&&!handlers.length&&(special.teardown&&special.teardown.call(elem,namespaces,elemData.handle)!==!1||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}else for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);jQuery.isEmptyObject(events)&&(delete elemData.handle,jQuery._removeData(elem,"events"))}},trigger:function(event,data,elem,onlyHandlers){var handle,ontype,cur,bubbleType,special,tmp,i,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];if(cur=tmp=elem=elem||document,3!==elem.nodeType&&8!==elem.nodeType&&!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf(".")>=0&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,event=event[jQuery.expando]?event:new jQuery.Event(type,"object"==typeof event&&event),event.isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=void 0,event.target||(event.target=elem),data=null==data?[event]:jQuery.makeArray(data,[event]),special=jQuery.event.special[type]||{},onlyHandlers||!special.trigger||special.trigger.apply(elem,data)!==!1)){if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)event.type=i>1?bubbleType:special.bindType||type,handle=(jQuery._data(cur,"events")||{})[event.type]&&jQuery._data(cur,"handle"),handle&&handle.apply(cur,data),handle=ontype&&cur[ontype],handle&&handle.apply&&jQuery.acceptData(cur)&&(event.result=handle.apply(cur,data),event.result===!1&&event.preventDefault());if(event.type=type,!onlyHandlers&&!event.isDefaultPrevented()&&(!special._default||special._default.apply(eventPath.pop(),data)===!1)&&jQuery.acceptData(elem)&&ontype&&elem[type]&&!jQuery.isWindow(elem)){tmp=elem[ontype],tmp&&(elem[ontype]=null),jQuery.event.triggered=type;try{elem[type]()}catch(e){}jQuery.event.triggered=void 0,tmp&&(elem[ontype]=tmp)}return event.result}},dispatch:function(event){event=jQuery.event.fix(event);var i,ret,handleObj,matched,j,handlerQueue=[],args=slice.call(arguments),handlers=(jQuery._data(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};if(args[0]=event,event.delegateTarget=this,!special.preDispatch||special.preDispatch.call(this,event)!==!1){for(handlerQueue=jQuery.event.handlers.call(this,event,handlers),i=0;(matched=handlerQueue[i++])&&!event.isPropagationStopped();)for(event.currentTarget=matched.elem,j=0;(handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped();)(!event.namespace_re||event.namespace_re.test(handleObj.namespace))&&(event.handleObj=handleObj,event.data=handleObj.data,ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args),void 0!==ret&&(event.result=ret)===!1&&(event.preventDefault(),event.stopPropagation()));return special.postDispatch&&special.postDispatch.call(this,event),event.result}},handlers:function(event,handlers){var sel,handleObj,matches,i,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||"click"!==event.type))for(;cur!=this;cur=cur.parentNode||this)if(1===cur.nodeType&&(cur.disabled!==!0||"click"!==event.type)){for(matches=[],i=0;delegateCount>i;i++)handleObj=handlers[i],sel=handleObj.selector+" ",void 0===matches[sel]&&(matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length),matches[sel]&&matches.push(handleObj);matches.length&&handlerQueue.push({elem:cur,handlers:matches})}return delegateCount<handlers.length&&handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)}),handlerQueue},fix:function(event){if(event[jQuery.expando])return event;var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];for(fixHook||(this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}),copy=fixHook.props?this.props.concat(fixHook.props):this.props,event=new jQuery.Event(originalEvent),i=copy.length;i--;)prop=copy[i],event[prop]=originalEvent[prop];return event.target||(event.target=originalEvent.srcElement||document),3===event.target.nodeType&&(event.target=event.target.parentNode),event.metaKey=!!event.metaKey,fixHook.filter?fixHook.filter(event,originalEvent):event},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){return null==event.which&&(event.which=null!=original.charCode?original.charCode:original.keyCode),event}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var body,eventDoc,doc,button=original.button,fromElement=original.fromElement;return null==event.pageX&&null!=original.clientX&&(eventDoc=event.target.ownerDocument||document,doc=eventDoc.documentElement,body=eventDoc.body,event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)),!event.relatedTarget&&fromElement&&(event.relatedTarget=fromElement===event.target?original.toElement:fromElement),event.which||void 0===button||(event.which=1&button?1:2&button?3:4&button?2:0),event}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===safeActiveElement()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return jQuery.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){void 0!==event.result&&(event.originalEvent.returnValue=event.result)}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0,originalEvent:{}});bubble?jQuery.event.trigger(e,null,elem):jQuery.event.dispatch.call(elem,e),e.isDefaultPrevented()&&event.preventDefault()}},jQuery.removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle,!1)}:function(elem,type,handle){var name="on"+type;elem.detachEvent&&(typeof elem[name]===strundefined&&(elem[name]=null),elem.detachEvent(name,handle))},jQuery.Event=function(src,props){return this instanceof jQuery.Event?(src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||void 0===src.defaultPrevented&&(src.returnValue===!1||src.getPreventDefault&&src.getPreventDefault())?returnTrue:returnFalse):this.type=src,props&&jQuery.extend(this,props),this.timeStamp=src&&src.timeStamp||jQuery.now(),void(this[jQuery.expando]=!0)):new jQuery.Event(src,props)},jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue,this.stopPropagation()}},jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;return(!related||related!==target&&!jQuery.contains(target,related))&&(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}}),support.submitBubbles||(jQuery.event.special.submit={setup:function(){return jQuery.nodeName(this,"form")?!1:void jQuery.event.add(this,"click._submit keypress._submit",function(e){var elem=e.target,form=jQuery.nodeName(elem,"input")||jQuery.nodeName(elem,"button")?elem.form:void 0;form&&!jQuery._data(form,"submitBubbles")&&(jQuery.event.add(form,"submit._submit",function(event){event._submit_bubble=!0}),jQuery._data(form,"submitBubbles",!0))})},postDispatch:function(event){event._submit_bubble&&(delete event._submit_bubble,this.parentNode&&!event.isTrigger&&jQuery.event.simulate("submit",this.parentNode,event,!0))},teardown:function(){return jQuery.nodeName(this,"form")?!1:void jQuery.event.remove(this,"._submit")}}),support.changeBubbles||(jQuery.event.special.change={setup:function(){return rformElems.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(jQuery.event.add(this,"propertychange._change",function(event){"checked"===event.originalEvent.propertyName&&(this._just_changed=!0)}),jQuery.event.add(this,"click._change",function(event){this._just_changed&&!event.isTrigger&&(this._just_changed=!1),jQuery.event.simulate("change",this,event,!0)})),!1):void jQuery.event.add(this,"beforeactivate._change",function(e){var elem=e.target;rformElems.test(elem.nodeName)&&!jQuery._data(elem,"changeBubbles")&&(jQuery.event.add(elem,"change._change",function(event){!this.parentNode||event.isSimulated||event.isTrigger||jQuery.event.simulate("change",this.parentNode,event,!0)}),jQuery._data(elem,"changeBubbles",!0))})},handle:function(event){var elem=event.target;return this!==elem||event.isSimulated||event.isTrigger||"radio"!==elem.type&&"checkbox"!==elem.type?event.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return jQuery.event.remove(this,"._change"),!rformElems.test(this.nodeName)}}),support.focusinBubbles||jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),!0)};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix);attaches||doc.addEventListener(orig,handler,!0),jQuery._data(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix)-1;attaches?jQuery._data(doc,fix,attaches):(doc.removeEventListener(orig,handler,!0),jQuery._removeData(doc,fix))}}}),jQuery.fn.extend({on:function(types,selector,data,fn,one){var type,origFn;if("object"==typeof types){"string"!=typeof selector&&(data=data||selector,selector=void 0);for(type in types)this.on(type,selector,data,types[type],one);return this}if(null==data&&null==fn?(fn=selector,data=selector=void 0):null==fn&&("string"==typeof selector?(fn=data,data=void 0):(fn=data,data=selector,selector=void 0)),fn===!1)fn=returnFalse;else if(!fn)return this;return 1===one&&(origFn=fn,fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)),this.each(function(){jQuery.event.add(this,types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if("object"==typeof types){for(type in types)this.off(type,selector,types[type]);return this}return(selector===!1||"function"==typeof selector)&&(fn=selector,selector=void 0),fn===!1&&(fn=returnFalse),this.each(function(){jQuery.event.remove(this,types,fn,selector)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];return elem?jQuery.event.trigger(type,data,elem,!0):void 0}});var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:null|\d+)"/g,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},safeFragment=createSafeFragment(document),fragmentDiv=safeFragment.appendChild(document.createElement("div"));wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var destElements,node,clone,i,srcElements,inPage=jQuery.contains(elem.ownerDocument,elem);if(support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?clone=elem.cloneNode(!0):(fragmentDiv.innerHTML=elem.outerHTML,fragmentDiv.removeChild(clone=fragmentDiv.firstChild)),!(support.noCloneEvent&&support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0;null!=(node=srcElements[i]);++i)destElements[i]&&fixCloneNodeIssues(node,destElements[i]);if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0;null!=(node=srcElements[i]);i++)cloneCopyEvent(node,destElements[i]);else cloneCopyEvent(elem,clone);return destElements=getAll(clone,"script"),destElements.length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),destElements=srcElements=node=null,clone},buildFragment:function(elems,context,scripts,selection){for(var j,elem,contains,tmp,tag,tbody,wrap,l=elems.length,safe=createSafeFragment(context),nodes=[],i=0;l>i;i++)if(elem=elems[i],elem||0===elem)if("object"===jQuery.type(elem))jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(rhtml.test(elem)){for(tmp=tmp||safe.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;if(!support.leadingWhitespace&&rleadingWhitespace.test(elem)&&nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0])),!support.tbody)for(elem="table"!==tag||rtbody.test(elem)?"<table>"!==wrap[1]||rtbody.test(elem)?0:tmp:tmp.firstChild,j=elem&&elem.childNodes.length;j--;)jQuery.nodeName(tbody=elem.childNodes[j],"tbody")&&!tbody.childNodes.length&&elem.removeChild(tbody);for(jQuery.merge(nodes,tmp.childNodes),tmp.textContent="";tmp.firstChild;)tmp.removeChild(tmp.firstChild);tmp=safe.lastChild}else nodes.push(context.createTextNode(elem));for(tmp&&safe.removeChild(tmp),support.appendChecked||jQuery.grep(getAll(nodes,"input"),fixDefaultChecked),i=0;elem=nodes[i++];)if((!selection||-1===jQuery.inArray(elem,selection))&&(contains=jQuery.contains(elem.ownerDocument,elem),tmp=getAll(safe.appendChild(elem),"script"),contains&&setGlobalEval(tmp),scripts))for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return tmp=null,safe},cleanData:function(elems,acceptData){for(var elem,type,id,data,i=0,internalKey=jQuery.expando,cache=jQuery.cache,deleteExpando=support.deleteExpando,special=jQuery.event.special;null!=(elem=elems[i]);i++)if((acceptData||jQuery.acceptData(elem))&&(id=elem[internalKey],data=id&&cache[id])){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);
  cache[id]&&(delete cache[id],deleteExpando?delete elem[internalKey]:typeof elem.removeAttribute!==strundefined?elem.removeAttribute(internalKey):elem[internalKey]=null,deletedIds.push(id))}}}),jQuery.fn.extend({text:function(value){return access(this,function(value){return void 0===value?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value))},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)})},remove:function(selector,keepData){for(var elem,elems=selector?jQuery.filter(selector,this):this,i=0;null!=(elem=elems[i]);i++)keepData||1!==elem.nodeType||jQuery.cleanData(getAll(elem)),elem.parentNode&&(keepData&&jQuery.contains(elem.ownerDocument,elem)&&setGlobalEval(getAll(elem,"script")),elem.parentNode.removeChild(elem));return this},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++){for(1===elem.nodeType&&jQuery.cleanData(getAll(elem,!1));elem.firstChild;)elem.removeChild(elem.firstChild);elem.options&&jQuery.nodeName(elem,"select")&&(elem.options.length=0)}return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null==dataAndEvents?!1:dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(void 0===value)return 1===elem.nodeType?elem.innerHTML.replace(rinlinejQuery,""):void 0;if(!("string"!=typeof value||rnoInnerhtml.test(value)||!support.htmlSerialize&&rnoshimcache.test(value)||!support.leadingWhitespace&&rleadingWhitespace.test(value)||wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()])){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;l>i;i++)elem=this[i]||{},1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.innerHTML=value);elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(){var arg=arguments[0];return this.domManip(arguments,function(elem){arg=this.parentNode,jQuery.cleanData(getAll(this)),arg&&arg.replaceChild(elem,this)}),arg&&(arg.length||arg.nodeType)?this:this.remove()},detach:function(selector){return this.remove(selector,!0)},domManip:function(args,callback){args=concat.apply([],args);var first,node,hasScripts,scripts,doc,fragment,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&"string"==typeof value&&!support.checkClone&&rchecked.test(value))return this.each(function(index){var self=set.eq(index);isFunction&&(args[0]=value.call(this,index,self.html())),self.domManip(args,callback)});if(l&&(fragment=jQuery.buildFragment(args,this[0].ownerDocument,!1,this),first=fragment.firstChild,1===fragment.childNodes.length&&(fragment=first),first)){for(scripts=jQuery.map(getAll(fragment,"script"),disableScript),hasScripts=scripts.length;l>i;i++)node=fragment,i!==iNoClone&&(node=jQuery.clone(node,!0,!0),hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(this[i],node,i);if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;hasScripts>i;i++)node=scripts[i],rscriptType.test(node.type||"")&&!jQuery._data(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src?jQuery._evalUrl&&jQuery._evalUrl(node.src):jQuery.globalEval((node.text||node.textContent||node.innerHTML||"").replace(rcleanScript,"")));fragment=first=null}return this}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,i=0,ret=[],insert=jQuery(selector),last=insert.length-1;last>=i;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),push.apply(ret,elems.get());return this.pushStack(ret)}});var iframe,elemdisplay={};!function(){var a,shrinkWrapBlocksVal,div=document.createElement("div"),divReset="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=div.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",support.opacity=/^0.5/.test(a.style.opacity),support.cssFloat=!!a.style.cssFloat,div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle="content-box"===div.style.backgroundClip,a=div=null,support.shrinkWrapBlocks=function(){var body,container,div,containerStyles;if(null==shrinkWrapBlocksVal){if(body=document.getElementsByTagName("body")[0],!body)return;containerStyles="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",container=document.createElement("div"),div=document.createElement("div"),body.appendChild(container).appendChild(div),shrinkWrapBlocksVal=!1,typeof div.style.zoom!==strundefined&&(div.style.cssText=divReset+";width:1px;padding:1px;zoom:1",div.innerHTML="<div></div>",div.firstChild.style.width="5px",shrinkWrapBlocksVal=3!==div.offsetWidth),body.removeChild(container),body=container=div=null}return shrinkWrapBlocksVal}}();var getStyles,curCSS,rmargin=/^margin/,rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"),rposition=/^(top|right|bottom|left)$/;window.getComputedStyle?(getStyles=function(elem){return elem.ownerDocument.defaultView.getComputedStyle(elem,null)},curCSS=function(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;return computed=computed||getStyles(elem),ret=computed?computed.getPropertyValue(name)||computed[name]:void 0,computed&&(""!==ret||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),void 0===ret?ret:ret+""}):document.documentElement.currentStyle&&(getStyles=function(elem){return elem.currentStyle},curCSS=function(elem,name,computed){var left,rs,rsLeft,ret,style=elem.style;return computed=computed||getStyles(elem),ret=computed?computed[name]:void 0,null==ret&&style&&style[name]&&(ret=style[name]),rnumnonpx.test(ret)&&!rposition.test(name)&&(left=style.left,rs=elem.runtimeStyle,rsLeft=rs&&rs.left,rsLeft&&(rs.left=elem.currentStyle.left),style.left="fontSize"===name?"1em":ret,ret=style.pixelLeft+"px",style.left=left,rsLeft&&(rs.left=rsLeft)),void 0===ret?ret:ret+""||"auto"}),function(){function computeStyleTests(){var container,div,body=document.getElementsByTagName("body")[0];body&&(container=document.createElement("div"),div=document.createElement("div"),container.style.cssText=containerStyles,body.appendChild(container).appendChild(div),div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",jQuery.swap(body,null!=body.style.zoom?{zoom:1}:{},function(){boxSizingVal=4===div.offsetWidth}),boxSizingReliableVal=!0,pixelPositionVal=!1,reliableMarginRightVal=!0,window.getComputedStyle&&(pixelPositionVal="1%"!==(window.getComputedStyle(div,null)||{}).top,boxSizingReliableVal="4px"===(window.getComputedStyle(div,null)||{width:"4px"}).width),body.removeChild(container),div=body=null)}var a,reliableHiddenOffsetsVal,boxSizingVal,boxSizingReliableVal,pixelPositionVal,reliableMarginRightVal,div=document.createElement("div"),containerStyles="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",divReset="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=div.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",support.opacity=/^0.5/.test(a.style.opacity),support.cssFloat=!!a.style.cssFloat,div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle="content-box"===div.style.backgroundClip,a=div=null,jQuery.extend(support,{reliableHiddenOffsets:function(){if(null!=reliableHiddenOffsetsVal)return reliableHiddenOffsetsVal;var container,tds,isSupported,div=document.createElement("div"),body=document.getElementsByTagName("body")[0];if(body)return div.setAttribute("className","t"),div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",container=document.createElement("div"),container.style.cssText=containerStyles,body.appendChild(container).appendChild(div),div.innerHTML="<table><tr><td></td><td>t</td></tr></table>",tds=div.getElementsByTagName("td"),tds[0].style.cssText="padding:0;margin:0;border:0;display:none",isSupported=0===tds[0].offsetHeight,tds[0].style.display="",tds[1].style.display="none",reliableHiddenOffsetsVal=isSupported&&0===tds[0].offsetHeight,body.removeChild(container),div=body=null,reliableHiddenOffsetsVal},boxSizing:function(){return null==boxSizingVal&&computeStyleTests(),boxSizingVal},boxSizingReliable:function(){return null==boxSizingReliableVal&&computeStyleTests(),boxSizingReliableVal},pixelPosition:function(){return null==pixelPositionVal&&computeStyleTests(),pixelPositionVal},reliableMarginRight:function(){var body,container,div,marginDiv;if(null==reliableMarginRightVal&&window.getComputedStyle){if(body=document.getElementsByTagName("body")[0],!body)return;container=document.createElement("div"),div=document.createElement("div"),container.style.cssText=containerStyles,body.appendChild(container).appendChild(div),marginDiv=div.appendChild(document.createElement("div")),marginDiv.style.cssText=div.style.cssText=divReset,marginDiv.style.marginRight=marginDiv.style.width="0",div.style.width="1px",reliableMarginRightVal=!parseFloat((window.getComputedStyle(marginDiv,null)||{}).marginRight),body.removeChild(container)}return reliableMarginRightVal}})}(),jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret};var ralpha=/alpha\([^)]*\)/i,ropacity=/opacity\s*=\s*([^)]*)/,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:0,fontWeight:400},cssPrefixes=["Webkit","O","Moz","ms"];jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return""===ret?"1":ret}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;if(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],void 0===value)return hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,!1,extra))?ret:style[name];if(type=typeof value,"string"===type&&(ret=rrelNum.exec(value))&&(value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name)),type="number"),null!=value&&value===value&&("number"!==type||jQuery.cssNumber[origName]||(value+="px"),support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),!(hooks&&"set"in hooks&&void 0===(value=hooks.set(elem,value,extra)))))try{style[name]="",style[name]=value}catch(e){}}},css:function(elem,name,extra,styles){var num,val,hooks,origName=jQuery.camelCase(name);return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),void 0===val&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),extra===!0||jQuery.isNumeric(num)?num||0:val):val}}),jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){return computed?0===elem.offsetWidth&&rdisplayswap.test(jQuery.css(elem,"display"))?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra):void 0},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,support.boxSizing()&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles),styles):0)}}}),support.opacity||(jQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":computed?"1":""},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=jQuery.isNumeric(value)?"alpha(opacity="+100*value+")":"",filter=currentStyle&&currentStyle.filter||style.filter||"";style.zoom=1,(value>=1||""===value)&&""===jQuery.trim(filter.replace(ralpha,""))&&style.removeAttribute&&(style.removeAttribute("filter"),""===value||currentStyle&&!currentStyle.filter)||(style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity)}}),jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){return computed?jQuery.swap(elem,{display:"inline-block"},curCSS,[elem,"marginRight"]):void 0}),jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){for(var i=0,expanded={},parts="string"==typeof value?value.split(" "):[value];4>i;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}},rmargin.test(prefix)||(jQuery.cssHooks[prefix+suffix].set=setPositiveNumber)}),jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){for(styles=getStyles(elem),len=name.length;len>i;i++)map[name[i]]=jQuery.css(elem,name[i],!1,styles);return map}return void 0!==value?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(state){return"boolean"==typeof state?state?this.show():this.hide():this.each(function(){isHidden(this)?jQuery(this).show():jQuery(this).hide()})}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem,this.prop=prop,this.easing=easing||"swing",this.options=options,this.start=this.now=this.cur(),this.end=end,this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.pos=eased=this.options.duration?jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(tween){var result;return null==tween.elem[tween.prop]||tween.elem.style&&null!=tween.elem.style[tween.prop]?(result=jQuery.css(tween.elem,tween.prop,""),result&&"auto"!==result?result:0):tween.elem[tween.prop]},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):tween.elem.style&&(null!=tween.elem.style[jQuery.cssProps[tween.prop]]||jQuery.cssHooks[tween.prop])?jQuery.style(tween.elem,tween.prop,tween.now+tween.unit):tween.elem[tween.prop]=tween.now}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}},jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||"px"!==unit&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3],parts=parts||[],start=+target||1;do scale=scale||".5",start/=scale,jQuery.style(tween.elem,prop,start+unit);while(scale!==(scale=tween.cur()/target)&&1!==scale&&--maxIterations)}return parts&&(start=tween.start=+start||+target||0,tween.unit=unit,tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]),tween}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){jQuery.isFunction(props)?(callback=props,props=["*"]):props=props.split(" ");for(var prop,index=0,length=props.length;length>index;index++)prop=props[index],tweeners[prop]=tweeners[prop]||[],tweeners[prop].unshift(callback)},prefilter:function(callback,prepend){prepend?animationPrefilters.unshift(callback):animationPrefilters.push(callback)}}),jQuery.speed=function(speed,easing,fn){var opt=speed&&"object"==typeof speed?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};return opt.duration=jQuery.fx.off?0:"number"==typeof opt.duration?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default,(null==opt.queue||opt.queue===!0)&&(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){jQuery.isFunction(opt.old)&&opt.old.call(this),opt.queue&&jQuery.dequeue(this,opt.queue)},opt},jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);(empty||jQuery._data(this,"finish"))&&anim.stop(!0)};return doAnimation.finish=doAnimation,empty||optall.queue===!1?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop,stop(gotoEnd)};return"string"!=typeof type&&(gotoEnd=clearQueue,clearQueue=type,type=void 0),clearQueue&&type!==!1&&this.queue(type||"fx",[]),this.each(function(){var dequeue=!0,index=null!=type&&type+"queueHooks",timers=jQuery.timers,data=jQuery._data(this);if(index)data[index]&&data[index].stop&&stopQueue(data[index]);else for(index in data)data[index]&&data[index].stop&&rrun.test(index)&&stopQueue(data[index]);for(index=timers.length;index--;)timers[index].elem!==this||null!=type&&timers[index].queue!==type||(timers[index].anim.stop(gotoEnd),dequeue=!1,timers.splice(index,1));(dequeue||!gotoEnd)&&jQuery.dequeue(this,type)})},finish:function(type){return type!==!1&&(type=type||"fx"),this.each(function(){var index,data=jQuery._data(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;for(data.finish=!0,jQuery.queue(this,type,[]),hooks&&hooks.stop&&hooks.stop.call(this,!0),index=timers.length;index--;)timers[index].elem===this&&timers[index].queue===type&&(timers[index].anim.stop(!0),timers.splice(index,1));for(index=0;length>index;index++)queue[index]&&queue[index].finish&&queue[index].finish.call(this);delete data.finish})}}),jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return null==speed||"boolean"==typeof speed?cssFn.apply(this,arguments):this.animate(genFx(name,!0),speed,easing,callback)}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}}),jQuery.timers=[],jQuery.fx.tick=function(){var timer,timers=jQuery.timers,i=0;for(fxNow=jQuery.now();i<timers.length;i++)timer=timers[i],timer()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop(),fxNow=void 0},jQuery.fx.timer=function(timer){jQuery.timers.push(timer),timer()?jQuery.fx.start():jQuery.timers.pop()},jQuery.fx.interval=13,jQuery.fx.start=function(){timerId||(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))},jQuery.fx.stop=function(){clearInterval(timerId),timerId=null},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fn.delay=function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})},function(){var a,input,select,opt,div=document.createElement("div");div.setAttribute("className","t"),div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=div.getElementsByTagName("a")[0],select=document.createElement("select"),opt=select.appendChild(document.createElement("option")),input=div.getElementsByTagName("input")[0],a.style.cssText="top:1px",support.getSetAttribute="t"!==div.className,support.style=/top/.test(a.getAttribute("style")),support.hrefNormalized="/a"===a.getAttribute("href"),support.checkOn=!!input.value,support.optSelected=opt.selected,support.enctype=!!document.createElement("form").enctype,select.disabled=!0,support.optDisabled=!opt.disabled,input=document.createElement("input"),input.setAttribute("value",""),support.input=""===input.getAttribute("value"),input.value="t",input.setAttribute("type","radio"),support.radioValue="t"===input.value,a=input=select=opt=div=null}();var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];{if(arguments.length)return isFunction=jQuery.isFunction(value),this.each(function(i){var val;1===this.nodeType&&(val=isFunction?value.call(this,i,jQuery(this).val()):value,null==val?val="":"number"==typeof val?val+="":jQuery.isArray(val)&&(val=jQuery.map(val,function(value){return null==value?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&void 0!==hooks.set(this,val,"value")||(this.value=val))});if(elem)return hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,"value"))?ret:(ret=elem.value,"string"==typeof ret?ret.replace(rreturn,""):null==ret?"":ret)}}}),jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return null!=val?val:jQuery.text(elem)}},select:{get:function(elem){for(var value,option,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type||0>index,values=one?null:[],max=one?index+1:options.length,i=0>index?max:one?index:0;max>i;i++)if(option=options[i],!(!option.selected&&i!==index||(support.optDisabled?option.disabled:null!==option.getAttribute("disabled"))||option.parentNode.disabled&&jQuery.nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;values.push(value)}return values},set:function(elem,value){for(var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;i--;)if(option=options[i],jQuery.inArray(jQuery.valHooks.option.get(option),values)>=0)try{option.selected=optionSet=!0}catch(_){option.scrollHeight}else option.selected=!1;return optionSet||(elem.selectedIndex=-1),options}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){return jQuery.isArray(value)?elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0:void 0}},support.checkOn||(jQuery.valHooks[this].get=function(elem){return null===elem.getAttribute("value")?"on":elem.value})});var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle,ruseDefault=/^(?:checked|selected)$/i,getSetAttribute=support.getSetAttribute,getSetInput=support.input;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}}),jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return typeof elem.getAttribute===strundefined?jQuery.prop(elem,name,value):(1===nType&&jQuery.isXMLDoc(elem)||(name=name.toLowerCase(),hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)),void 0===value?hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:(ret=jQuery.find.attr(elem,name),null==ret?void 0:ret):null!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:(elem.setAttribute(name,value+""),value):void jQuery.removeAttr(elem,name))},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)propName=jQuery.propFix[name]||name,jQuery.expr.match.bool.test(name)?getSetInput&&getSetAttribute||!ruseDefault.test(name)?elem[propName]=!1:elem[jQuery.camelCase("default-"+name)]=elem[propName]=!1:jQuery.attr(elem,name,""),elem.removeAttribute(getSetAttribute?name:propName)},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&"radio"===value&&jQuery.nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}}}),boolHook={set:function(elem,value,name){return value===!1?jQuery.removeAttr(elem,name):getSetInput&&getSetAttribute||!ruseDefault.test(name)?elem.setAttribute(!getSetAttribute&&jQuery.propFix[name]||name,name):elem[jQuery.camelCase("default-"+name)]=elem[name]=!0,name}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=getSetInput&&getSetAttribute||!ruseDefault.test(name)?function(elem,name,isXML){var ret,handle;return isXML||(handle=attrHandle[name],attrHandle[name]=ret,ret=null!=getter(elem,name,isXML)?name.toLowerCase():null,attrHandle[name]=handle),ret}:function(elem,name,isXML){return isXML?void 0:elem[jQuery.camelCase("default-"+name)]?name.toLowerCase():null}}),getSetInput&&getSetAttribute||(jQuery.attrHooks.value={set:function(elem,value,name){return jQuery.nodeName(elem,"input")?void(elem.defaultValue=value):nodeHook&&nodeHook.set(elem,value,name)}}),getSetAttribute||(nodeHook={set:function(elem,value,name){var ret=elem.getAttributeNode(name);return ret||elem.setAttributeNode(ret=elem.ownerDocument.createAttribute(name)),ret.value=value+="","value"===name||value===elem.getAttribute(name)?value:void 0}},attrHandle.id=attrHandle.name=attrHandle.coords=function(elem,name,isXML){var ret;return isXML?void 0:(ret=elem.getAttributeNode(name))&&""!==ret.value?ret.value:null},jQuery.valHooks.button={get:function(elem,name){var ret=elem.getAttributeNode(name);return ret&&ret.specified?ret.value:void 0},set:nodeHook.set},jQuery.attrHooks.contenteditable={set:function(elem,value,name){nodeHook.set(elem,""===value?!1:value,name)}},jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]={set:function(elem,value){return""===value?(elem.setAttribute(name,"auto"),value):void 0}}})),support.style||(jQuery.attrHooks.style={get:function(elem){return elem.style.cssText||void 0},set:function(elem,value){return elem.style.cssText=value+""}});var rfocusable=/^(?:input|select|textarea|button|object)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return name=jQuery.propFix[name]||name,this.each(function(){try{this[name]=void 0,delete this[name]}catch(e){}})}}),jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}}}),support.hrefNormalized||jQuery.each(["href","src"],function(i,name){jQuery.propHooks[name]={get:function(elem){return elem.getAttribute(name,4)}}}),support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex),null}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this}),support.enctype||(jQuery.propFix.enctype="encoding");var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed="string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ")){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");finalValue=jQuery.trim(cur),elem.className!==finalValue&&(elem.className=finalValue)}return this},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed=0===arguments.length||"string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"")){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>=0;)cur=cur.replace(" "+clazz+" "," ");finalValue=value?jQuery.trim(cur):"",elem.className!==finalValue&&(elem.className=finalValue)}return this},toggleClass:function(value,stateVal){var type=typeof value;return"boolean"==typeof stateVal&&"string"===type?stateVal?this.addClass(value):this.removeClass(value):this.each(jQuery.isFunction(value)?function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)}:function(){if("string"===type)for(var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else(type===strundefined||"boolean"===type)&&(this.className&&jQuery._data(this,"__className__",this.className),this.className=this.className||value===!1?"":jQuery._data(this,"__className__")||"")})},hasClass:function(selector){for(var className=" "+selector+" ",i=0,l=this.length;l>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0)return!0;return!1}}),jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}}),jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)
  },bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return 1===arguments.length?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now(),rquery=/\?/,rvalidtokens=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;jQuery.parseJSON=function(data){if(window.JSON&&window.JSON.parse)return window.JSON.parse(data+"");var requireNonComma,depth=null,str=jQuery.trim(data+"");return str&&!jQuery.trim(str.replace(rvalidtokens,function(token,comma,open,close){return requireNonComma&&comma&&(depth=0),0===depth?token:(requireNonComma=open||comma,depth+=!close-!open,"")}))?Function("return "+str)():jQuery.error("Invalid JSON: "+data)},jQuery.parseXML=function(data){var xml,tmp;if(!data||"string"!=typeof data)return null;try{window.DOMParser?(tmp=new DOMParser,xml=tmp.parseFromString(data,"text/xml")):(xml=new ActiveXObject("Microsoft.XMLDOM"),xml.async="false",xml.loadXML(data))}catch(e){xml=void 0}return xml&&xml.documentElement&&!xml.getElementsByTagName("parsererror").length||jQuery.error("Invalid XML: "+data),xml};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a"),ajaxLocation.href="",ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[],jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;2!==state&&(state=2,timeoutTimer&&clearTimeout(timeoutTimer),transport=void 0,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&300>status||304===status,responses&&(response=ajaxHandleResponses(s,jqXHR,responses)),response=ajaxConvert(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&(modified=jqXHR.getResponseHeader("Last-Modified"),modified&&(jQuery.lastModified[cacheURL]=modified),modified=jqXHR.getResponseHeader("etag"),modified&&(jQuery.etag[cacheURL]=modified)),204===status||"HEAD"===s.type?statusText="nocontent":304===status?statusText="notmodified":(statusText=response.state,success=response.data,error=response.error,isSuccess=!error)):(error=statusText,(status||!statusText)&&(statusText="error",0>status&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=void 0,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}"object"==typeof url&&(options=url,url=void 0),options=options||{};var parts,i,cacheURL,responseHeadersString,timeoutTimer,fireGlobals,transport,responseHeaders,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(2===state){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()]=match[2];match=responseHeaders[key.toLowerCase()]}return null==match?null:match},getAllResponseHeaders:function(){return 2===state?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();return state||(name=requestHeadersNames[lname]=requestHeadersNames[lname]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return state||(s.mimeType=type),this},statusCode:function(map){var code;if(map)if(2>state)for(code in map)statusCode[code]=[statusCode[code],map[code]];else jqXHR.always(map[jqXHR.status]);return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR).complete=completeDeferred.add,jqXHR.success=jqXHR.done,jqXHR.error=jqXHR.fail,s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""],null==s.crossDomain&&(parts=rurl.exec(s.url.toLowerCase()),s.crossDomain=!(!parts||parts[1]===ajaxLocParts[1]&&parts[2]===ajaxLocParts[2]&&(parts[3]||("http:"===parts[1]?"80":"443"))===(ajaxLocParts[3]||("http:"===ajaxLocParts[1]?"80":"443")))),s.data&&s.processData&&"string"!=typeof s.data&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),2===state)return jqXHR;fireGlobals=s.global,fireGlobals&&0===jQuery.active++&&jQuery.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!rnoContent.test(s.type),cacheURL=s.url,s.hasContent||(s.data&&(cacheURL=s.url+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),s.cache===!1&&(s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++)),s.ifModified&&(jQuery.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]),jQuery.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])),(s.data&&s.hasContent&&s.contentType!==!1||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType),jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===!1||2===state))return jqXHR.abort();strAbort="abort";for(i in{success:1,error:1,complete:1})jqXHR[i](s[i]);if(transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR)){jqXHR.readyState=1,fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]),s.async&&s.timeout>0&&(timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{state=1,transport.send(requestHeaders,done)}catch(e){if(!(2>state))throw e;done(-1,e)}}else done(-1,"No Transport");return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,void 0,callback,"script")}}),jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){return jQuery.isFunction(data)&&(type=type||callback,callback=data,data=void 0),jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}}),jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}}),jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},jQuery.fn.extend({wrapAll:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))});if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&wrap.insertBefore(this[0]),wrap.map(function(){for(var elem=this;elem.firstChild&&1===elem.firstChild.nodeType;)elem=elem.firstChild;return elem}).append(this)}return this},wrapInner:function(html){return this.each(jQuery.isFunction(html)?function(i){jQuery(this).wrapInner(html.call(this,i))}:function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()}}),jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0||!support.reliableHiddenOffsets()&&"none"===(elem.style&&elem.style.display||jQuery.css(elem,"display"))},jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():null==value?"":value,s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(void 0===traditional&&(traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional),jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&").replace(r20,"+")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return null==val?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}}),jQuery.ajaxSettings.xhr=void 0!==window.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&createStandardXHR()||createActiveXHR()}:createStandardXHR;var xhrId=0,xhrCallbacks={},xhrSupported=jQuery.ajaxSettings.xhr();window.ActiveXObject&&jQuery(window).on("unload",function(){for(var key in xhrCallbacks)xhrCallbacks[key](void 0,!0)}),support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,xhrSupported=support.ajax=!!xhrSupported,xhrSupported&&jQuery.ajaxTransport(function(options){if(!options.crossDomain||support.cors){var callback;return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType),options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest");for(i in headers)void 0!==headers[i]&&xhr.setRequestHeader(i,headers[i]+"");xhr.send(options.hasContent&&options.data||null),callback=function(_,isAbort){var status,statusText,responses;if(callback&&(isAbort||4===xhr.readyState))if(delete xhrCallbacks[id],callback=void 0,xhr.onreadystatechange=jQuery.noop,isAbort)4!==xhr.readyState&&xhr.abort();else{responses={},status=xhr.status,"string"==typeof xhr.responseText&&(responses.text=xhr.responseText);try{statusText=xhr.statusText}catch(e){statusText=""}status||!options.isLocal||options.crossDomain?1223===status&&(status=204):status=responses.text?200:404}responses&&complete(status,statusText,responses,xhr.getAllResponseHeaders())},options.async?4===xhr.readyState?setTimeout(callback):xhr.onreadystatechange=xhrCallbacks[id]=callback:callback()},abort:function(){callback&&callback(void 0,!0)}}}}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){return jQuery.globalEval(text),text}}}),jQuery.ajaxPrefilter("script",function(s){void 0===s.cache&&(s.cache=!1),s.crossDomain&&(s.type="GET",s.global=!1)}),jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,head=document.head||jQuery("head")[0]||document.documentElement;return{send:function(_,callback){script=document.createElement("script"),script.async=!0,s.scriptCharset&&(script.charset=s.scriptCharset),script.src=s.url,script.onload=script.onreadystatechange=function(_,isAbort){(isAbort||!script.readyState||/loaded|complete/.test(script.readyState))&&(script.onload=script.onreadystatechange=null,script.parentNode&&script.parentNode.removeChild(script),script=null,isAbort||callback(200,"success"))},head.insertBefore(script,head.firstChild)},abort:function(){script&&script.onload(void 0,!0)}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;return this[callback]=!0,callback}}),jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==!1&&(rjsonp.test(s.url)?"url":"string"==typeof s.data&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");return jsonProp||"jsonp"===s.dataTypes[0]?(callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,jsonProp?s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName):s.jsonp!==!1&&(s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName),s.converters["script json"]=function(){return responseContainer||jQuery.error(callbackName+" was not called"),responseContainer[0]},s.dataTypes[0]="json",overwritten=window[callbackName],window[callbackName]=function(){responseContainer=arguments},jqXHR.always(function(){window[callbackName]=overwritten,s[callbackName]&&(s.jsonpCallback=originalSettings.jsonpCallback,oldCallbacks.push(callbackName)),responseContainer&&jQuery.isFunction(overwritten)&&overwritten(responseContainer[0]),responseContainer=overwritten=void 0}),"script"):void 0}),jQuery.parseHTML=function(data,context,keepScripts){if(!data||"string"!=typeof data)return null;"boolean"==typeof context&&(keepScripts=context,context=!1),context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];return parsed?[context.createElement(parsed[1])]:(parsed=jQuery.buildFragment([data],context,scripts),scripts&&scripts.length&&jQuery(scripts).remove(),jQuery.merge([],parsed.childNodes))};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if("string"!=typeof url&&_load)return _load.apply(this,arguments);var selector,response,type,self=this,off=url.indexOf(" ");return off>=0&&(selector=url.slice(off,url.length),url=url.slice(0,off)),jQuery.isFunction(params)?(callback=params,params=void 0):params&&"object"==typeof params&&(type="POST"),self.length>0&&jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments,self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR])}),this},jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};var docElem=window.document.documentElement;jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};"static"===position&&(elem.style.position="relative"),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=("absolute"===position||"fixed"===position)&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),jQuery.isFunction(options)&&(options=options.call(elem,i,curOffset)),null!=options.top&&(props.top=options.top-curOffset.top+curTop),null!=options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(elem,props):curElem.css(props)}},jQuery.fn.extend({offset:function(options){if(arguments.length)return void 0===options?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var docElem,win,box={top:0,left:0},elem=this[0],doc=elem&&elem.ownerDocument;if(doc)return docElem=doc.documentElement,jQuery.contains(docElem,elem)?(typeof elem.getBoundingClientRect!==strundefined&&(box=elem.getBoundingClientRect()),win=getWindow(doc),{top:box.top+(win.pageYOffset||docElem.scrollTop)-(docElem.clientTop||0),left:box.left+(win.pageXOffset||docElem.scrollLeft)-(docElem.clientLeft||0)}):box},position:function(){if(this[0]){var offsetParent,offset,parentOffset={top:0,left:0},elem=this[0];return"fixed"===jQuery.css(elem,"position")?offset=elem.getBoundingClientRect():(offsetParent=this.offsetParent(),offset=this.offset(),jQuery.nodeName(offsetParent[0],"html")||(parentOffset=offsetParent.offset()),parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",!0),parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",!0)),{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent||docElem;offsetParent&&!jQuery.nodeName(offsetParent,"html")&&"static"===jQuery.css(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||docElem})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);return void 0===val?win?prop in win?win[prop]:win.document.documentElement[method]:elem[method]:void(win?win.scrollTo(top?jQuery(win).scrollLeft():val,top?val:jQuery(win).scrollTop()):elem[method]=val)},method,val,arguments.length,null)}}),jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){return computed?(computed=curCSS(elem,prop),rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed):void 0})}),jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||"boolean"!=typeof margin),extra=defaultExtra||(margin===!0||value===!0?"margin":"border");return access(this,function(elem,type,value){var doc;return jQuery.isWindow(elem)?elem.document.documentElement["client"+name]:9===elem.nodeType?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):void 0===value?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:void 0,chainable,null)}})}),jQuery.fn.size=function(){return this.length},jQuery.fn.andSelf=jQuery.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return jQuery});var _jQuery=window.jQuery,_$=window.$;return jQuery.noConflict=function(deep){return window.$===jQuery&&(window.$=_$),deep&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},typeof noGlobal===strundefined&&(window.jQuery=window.$=jQuery),jQuery}),function($,undefined){$.rails!==undefined&&$.error("jquery-ujs has already been loaded!");var rails,$document=$(document);$.rails=rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",buttonClickSelector:"button[data-remote]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(xhr){var token=$('meta[name="csrf-token"]').attr("content");token&&xhr.setRequestHeader("X-CSRF-Token",token)},refreshCSRFTokens:function(){var csrfToken=$("meta[name=csrf-token]").attr("content"),csrfParam=$("meta[name=csrf-param]").attr("content");$('form input[name="'+csrfParam+'"]').val(csrfToken)},fire:function(obj,name,data){var event=$.Event(name);return obj.trigger(event,data),event.result!==!1},confirm:function(message){return confirm(message)},ajax:function(options){return $.ajax(options)},href:function(element){return element.attr("href")},handleRemote:function(element){var method,url,data,elCrossDomain,crossDomain,withCredentials,dataType,options;if(rails.fire(element,"ajax:before")){if(elCrossDomain=element.data("cross-domain"),crossDomain=elCrossDomain===undefined?null:elCrossDomain,withCredentials=element.data("with-credentials")||null,dataType=element.data("type")||$.ajaxSettings&&$.ajaxSettings.dataType,element.is("form")){method=element.attr("method"),url=element.attr("action"),data=element.serializeArray();var button=element.data("ujs:submit-button");button&&(data.push(button),element.data("ujs:submit-button",null))}else element.is(rails.inputChangeSelector)?(method=element.data("method"),url=element.data("url"),data=element.serialize(),element.data("params")&&(data=data+"&"+element.data("params"))):element.is(rails.buttonClickSelector)?(method=element.data("method")||"get",url=element.data("url"),data=element.serialize(),element.data("params")&&(data=data+"&"+element.data("params"))):(method=element.data("method"),url=rails.href(element),data=element.data("params")||null);options={type:method||"GET",data:data,dataType:dataType,beforeSend:function(xhr,settings){return settings.dataType===undefined&&xhr.setRequestHeader("accept","*/*;q=0.5, "+settings.accepts.script),rails.fire(element,"ajax:beforeSend",[xhr,settings])},success:function(data,status,xhr){element.trigger("ajax:success",[data,status,xhr])},complete:function(xhr,status){element.trigger("ajax:complete",[xhr,status])},error:function(xhr,status,error){element.trigger("ajax:error",[xhr,status,error])},crossDomain:crossDomain},withCredentials&&(options.xhrFields={withCredentials:withCredentials}),url&&(options.url=url);var jqxhr=rails.ajax(options);return element.trigger("ajax:send",jqxhr),jqxhr}return!1},handleMethod:function(link){var href=rails.href(link),method=link.data("method"),target=link.attr("target"),csrfToken=$("meta[name=csrf-token]").attr("content"),csrfParam=$("meta[name=csrf-param]").attr("content"),form=$('<form method="post" action="'+href+'"></form>'),metadataInput='<input name="_method" value="'+method+'" type="hidden" />';csrfParam!==undefined&&csrfToken!==undefined&&(metadataInput+='<input name="'+csrfParam+'" value="'+csrfToken+'" type="hidden" />'),target&&form.attr("target",target),form.hide().append(metadataInput).appendTo("body"),form.submit()},disableFormElements:function(form){form.find(rails.disableSelector).each(function(){var element=$(this),method=element.is("button")?"html":"val";element.data("ujs:enable-with",element[method]()),element[method](element.data("disable-with")),element.prop("disabled",!0)})},enableFormElements:function(form){form.find(rails.enableSelector).each(function(){var element=$(this),method=element.is("button")?"html":"val";element.data("ujs:enable-with")&&element[method](element.data("ujs:enable-with")),element.prop("disabled",!1)})},allowAction:function(element){var callback,message=element.data("confirm"),answer=!1;return message?(rails.fire(element,"confirm")&&(answer=rails.confirm(message),callback=rails.fire(element,"confirm:complete",[answer])),answer&&callback):!0},blankInputs:function(form,specifiedSelector,nonBlank){var input,valueToCheck,inputs=$(),selector=specifiedSelector||"input,textarea",allInputs=form.find(selector);return allInputs.each(function(){if(input=$(this),valueToCheck=input.is("input[type=checkbox],input[type=radio]")?input.is(":checked"):input.val(),!valueToCheck==!nonBlank){if(input.is("input[type=radio]")&&allInputs.filter('input[type=radio]:checked[name="'+input.attr("name")+'"]').length)return!0;inputs=inputs.add(input)}}),inputs.length?inputs:!1},nonBlankInputs:function(form,specifiedSelector){return rails.blankInputs(form,specifiedSelector,!0)},stopEverything:function(e){return $(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(element){element.data("ujs:enable-with",element.html()),element.html(element.data("disable-with")),element.bind("click.railsDisable",function(e){return rails.stopEverything(e)})},enableElement:function(element){element.data("ujs:enable-with")!==undefined&&(element.html(element.data("ujs:enable-with")),element.removeData("ujs:enable-with")),element.unbind("click.railsDisable")}},rails.fire($document,"rails:attachBindings")&&($.ajaxPrefilter(function(options,originalOptions,xhr){options.crossDomain||rails.CSRFProtection(xhr)}),$document.delegate(rails.linkDisableSelector,"ajax:complete",function(){rails.enableElement($(this))}),$document.delegate(rails.linkClickSelector,"click.rails",function(e){var link=$(this),method=link.data("method"),data=link.data("params"),metaClick=e.metaKey||e.ctrlKey;if(!rails.allowAction(link))return rails.stopEverything(e);if(!metaClick&&link.is(rails.linkDisableSelector)&&rails.disableElement(link),link.data("remote")!==undefined){if(metaClick&&(!method||"GET"===method)&&!data)return!0;var handleRemote=rails.handleRemote(link);return handleRemote===!1?rails.enableElement(link):handleRemote.error(function(){rails.enableElement(link)}),!1}return link.data("method")?(rails.handleMethod(link),!1):void 0}),$document.delegate(rails.buttonClickSelector,"click.rails",function(e){var button=$(this);return rails.allowAction(button)?(rails.handleRemote(button),!1):rails.stopEverything(e)}),$document.delegate(rails.inputChangeSelector,"change.rails",function(e){var link=$(this);return rails.allowAction(link)?(rails.handleRemote(link),!1):rails.stopEverything(e)}),$document.delegate(rails.formSubmitSelector,"submit.rails",function(e){var form=$(this),remote=form.data("remote")!==undefined,blankRequiredInputs=rails.blankInputs(form,rails.requiredInputSelector),nonBlankFileInputs=rails.nonBlankInputs(form,rails.fileInputSelector);if(!rails.allowAction(form))return rails.stopEverything(e);if(blankRequiredInputs&&form.attr("novalidate")==undefined&&rails.fire(form,"ajax:aborted:required",[blankRequiredInputs]))return rails.stopEverything(e);if(remote){if(nonBlankFileInputs){setTimeout(function(){rails.disableFormElements(form)},13);var aborted=rails.fire(form,"ajax:aborted:file",[nonBlankFileInputs]);return aborted||setTimeout(function(){rails.enableFormElements(form)},13),aborted}return rails.handleRemote(form),!1}setTimeout(function(){rails.disableFormElements(form)},13)}),$document.delegate(rails.formInputClickSelector,"click.rails",function(event){var button=$(this);if(!rails.allowAction(button))return rails.stopEverything(event);var name=button.attr("name"),data=name?{name:name,value:button.val()}:null;button.closest("form").data("ujs:submit-button",data)}),$document.delegate(rails.formSubmitSelector,"ajax:beforeSend.rails",function(event){this==event.target&&rails.disableFormElements($(this))}),$document.delegate(rails.formSubmitSelector,"ajax:complete.rails",function(event){this==event.target&&rails.enableFormElements($(this))}),$(function(){rails.refreshCSRFTokens()}))}(jQuery),function(){var CSRFToken,allowLinkExtensions,anchoredLink,browserCompatibleDocumentParser,browserIsntBuggy,browserSupportsCustomEvents,browserSupportsPushState,browserSupportsTurbolinks,bypassOnLoadPopstate,cacheCurrentPage,cacheSize,changePage,constrainPageCacheTo,createDocument,crossOriginLink,currentState,enableTransitionCache,executeScriptTags,extractLink,extractTitleAndBody,fetch,fetchHistory,fetchReplacement,handleClick,historyStateIsDefined,htmlExtensions,ignoreClick,initializeTurbolinks,installClickHandlerLast,installDocumentReadyPageEventTriggers,installHistoryChangeHandler,installJqueryAjaxSuccessPageUpdateTrigger,loadedAssets,noTurbolink,nonHtmlLink,nonStandardClick,pageCache,pageChangePrevented,pagesCached,popCookie,processResponse,recallScrollPosition,referer,reflectNewUrl,reflectRedirectedUrl,rememberCurrentState,rememberCurrentUrl,rememberReferer,removeHash,removeHashForIE10compatiblity,removeNoscriptTags,requestMethodIsSafe,resetScrollPosition,targetLink,transitionCacheEnabled,transitionCacheFor,triggerEvent,visit,xhr,_ref,__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;l>i;i++)if(i in this&&this[i]===item)return i;return-1},__slice=[].slice;pageCache={},cacheSize=10,transitionCacheEnabled=!1,currentState=null,loadedAssets=null,htmlExtensions=["html"],referer=null,createDocument=null,xhr=null,fetch=function(url){var cachedPage;return rememberReferer(),cacheCurrentPage(),reflectNewUrl(url),transitionCacheEnabled&&(cachedPage=transitionCacheFor(url))?(fetchHistory(cachedPage),fetchReplacement(url)):fetchReplacement(url,resetScrollPosition)},transitionCacheFor=function(url){var cachedPage;return cachedPage=pageCache[url],cachedPage&&!cachedPage.transitionCacheDisabled?cachedPage:void 0},enableTransitionCache=function(enable){return null==enable&&(enable=!0),transitionCacheEnabled=enable},fetchReplacement=function(url,onLoadFunction){return null==onLoadFunction&&(onLoadFunction=function(){return function(){}}(this)),triggerEvent("page:fetch",{url:url}),null!=xhr&&xhr.abort(),xhr=new XMLHttpRequest,xhr.open("GET",removeHashForIE10compatiblity(url),!0),xhr.setRequestHeader("Accept","text/html, application/xhtml+xml, application/xml"),xhr.setRequestHeader("X-XHR-Referer",referer),xhr.onload=function(){var doc;return triggerEvent("page:receive"),(doc=processResponse())?(changePage.apply(null,extractTitleAndBody(doc)),reflectRedirectedUrl(),onLoadFunction(),triggerEvent("page:load")):document.location.href=url},xhr.onloadend=function(){return xhr=null},xhr.onerror=function(){return document.location.href=url},xhr.send()},fetchHistory=function(cachedPage){return null!=xhr&&xhr.abort(),changePage(cachedPage.title,cachedPage.body),recallScrollPosition(cachedPage),triggerEvent("page:restore")},cacheCurrentPage=function(){return pageCache[currentState.url]={url:document.location.href,body:document.body,title:document.title,positionY:window.pageYOffset,positionX:window.pageXOffset,cachedAt:(new Date).getTime(),transitionCacheDisabled:null!=document.querySelector("[data-no-transition-cache]")},constrainPageCacheTo(cacheSize)},pagesCached=function(size){return null==size&&(size=cacheSize),/^[\d]+$/.test(size)?cacheSize=parseInt(size):void 0},constrainPageCacheTo=function(limit){var cacheTimesRecentFirst,key,pageCacheKeys,_i,_len,_results;for(pageCacheKeys=Object.keys(pageCache),cacheTimesRecentFirst=pageCacheKeys.map(function(url){return pageCache[url].cachedAt}).sort(function(a,b){return b-a}),_results=[],_i=0,_len=pageCacheKeys.length;_len>_i;_i++)key=pageCacheKeys[_i],pageCache[key].cachedAt<=cacheTimesRecentFirst[limit]&&(triggerEvent("page:expire",pageCache[key]),_results.push(delete pageCache[key]));
  return _results},changePage=function(title,body,csrfToken,runScripts){return document.title=title,document.documentElement.replaceChild(body,document.body),null!=csrfToken&&CSRFToken.update(csrfToken),runScripts&&executeScriptTags(),currentState=window.history.state,triggerEvent("page:change"),triggerEvent("page:update")},executeScriptTags=function(){var attr,copy,nextSibling,parentNode,script,scripts,_i,_j,_len,_len1,_ref,_ref1;for(scripts=Array.prototype.slice.call(document.body.querySelectorAll('script:not([data-turbolinks-eval="false"])')),_i=0,_len=scripts.length;_len>_i;_i++)if(script=scripts[_i],""===(_ref=script.type)||"text/javascript"===_ref){for(copy=document.createElement("script"),_ref1=script.attributes,_j=0,_len1=_ref1.length;_len1>_j;_j++)attr=_ref1[_j],copy.setAttribute(attr.name,attr.value);copy.appendChild(document.createTextNode(script.innerHTML)),parentNode=script.parentNode,nextSibling=script.nextSibling,parentNode.removeChild(script),parentNode.insertBefore(copy,nextSibling)}},removeNoscriptTags=function(node){return node.innerHTML=node.innerHTML.replace(/<noscript[\S\s]*?<\/noscript>/gi,""),node},reflectNewUrl=function(url){return url!==referer?window.history.pushState({turbolinks:!0,url:url},"",url):void 0},reflectRedirectedUrl=function(){var location,preservedHash;return(location=xhr.getResponseHeader("X-XHR-Redirected-To"))?(preservedHash=removeHash(location)===location?document.location.hash:"",window.history.replaceState(currentState,"",location+preservedHash)):void 0},rememberReferer=function(){return referer=document.location.href},rememberCurrentUrl=function(){return window.history.replaceState({turbolinks:!0,url:document.location.href},"",document.location.href)},rememberCurrentState=function(){return currentState=window.history.state},recallScrollPosition=function(page){return window.scrollTo(page.positionX,page.positionY)},resetScrollPosition=function(){return document.location.hash?document.location.href=document.location.href:window.scrollTo(0,0)},removeHashForIE10compatiblity=function(url){return removeHash(url)},removeHash=function(url){var link;return link=url,null==url.href&&(link=document.createElement("A"),link.href=url),link.href.replace(link.hash,"")},popCookie=function(name){var value,_ref;return value=(null!=(_ref=document.cookie.match(new RegExp(name+"=(\\w+)")))?_ref[1].toUpperCase():void 0)||"",document.cookie=name+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",value},triggerEvent=function(name,data){var event;return event=document.createEvent("Events"),data&&(event.data=data),event.initEvent(name,!0,!0),document.dispatchEvent(event)},pageChangePrevented=function(){return!triggerEvent("page:before-change")},processResponse=function(){var assetsChanged,clientOrServerError,doc,extractTrackAssets,intersection,validContent;return clientOrServerError=function(){var _ref;return 400<=(_ref=xhr.status)&&600>_ref},validContent=function(){return xhr.getResponseHeader("Content-Type").match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/)},extractTrackAssets=function(doc){var node,_i,_len,_ref,_results;for(_ref=doc.head.childNodes,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)node=_ref[_i],null!=("function"==typeof node.getAttribute?node.getAttribute("data-turbolinks-track"):void 0)&&_results.push(node.getAttribute("src")||node.getAttribute("href"));return _results},assetsChanged=function(doc){var fetchedAssets;return loadedAssets||(loadedAssets=extractTrackAssets(document)),fetchedAssets=extractTrackAssets(doc),fetchedAssets.length!==loadedAssets.length||intersection(fetchedAssets,loadedAssets).length!==loadedAssets.length},intersection=function(a,b){var value,_i,_len,_ref,_results;for(a.length>b.length&&(_ref=[b,a],a=_ref[0],b=_ref[1]),_results=[],_i=0,_len=a.length;_len>_i;_i++)value=a[_i],__indexOf.call(b,value)>=0&&_results.push(value);return _results},!clientOrServerError()&&validContent()&&(doc=createDocument(xhr.responseText),doc&&!assetsChanged(doc))?doc:void 0},extractTitleAndBody=function(doc){var title;return title=doc.querySelector("title"),[null!=title?title.textContent:void 0,removeNoscriptTags(doc.body),CSRFToken.get(doc).token,"runScripts"]},CSRFToken={get:function(doc){var tag;return null==doc&&(doc=document),{node:tag=doc.querySelector('meta[name="csrf-token"]'),token:null!=tag&&"function"==typeof tag.getAttribute?tag.getAttribute("content"):void 0}},update:function(latest){var current;return current=this.get(),null!=current.token&&null!=latest&&current.token!==latest?current.node.setAttribute("content",latest):void 0}},browserCompatibleDocumentParser=function(){var createDocumentUsingDOM,createDocumentUsingParser,createDocumentUsingWrite,e,testDoc,_ref;createDocumentUsingParser=function(html){return(new DOMParser).parseFromString(html,"text/html")},createDocumentUsingDOM=function(html){var doc;return doc=document.implementation.createHTMLDocument(""),doc.documentElement.innerHTML=html,doc},createDocumentUsingWrite=function(html){var doc;return doc=document.implementation.createHTMLDocument(""),doc.open("replace"),doc.write(html),doc.close(),doc};try{if(window.DOMParser)return testDoc=createDocumentUsingParser("<html><body><p>test"),createDocumentUsingParser}catch(_error){return e=_error,testDoc=createDocumentUsingDOM("<html><body><p>test"),createDocumentUsingDOM}finally{if(1!==(null!=testDoc&&null!=(_ref=testDoc.body)?_ref.childNodes.length:void 0))return createDocumentUsingWrite}},installClickHandlerLast=function(event){return event.defaultPrevented?void 0:(document.removeEventListener("click",handleClick,!1),document.addEventListener("click",handleClick,!1))},handleClick=function(event){var link;return event.defaultPrevented||(link=extractLink(event),"A"!==link.nodeName||ignoreClick(event,link))?void 0:(pageChangePrevented()||visit(link.href),event.preventDefault())},extractLink=function(event){var link;for(link=event.target;link.parentNode&&"A"!==link.nodeName;)link=link.parentNode;return link},crossOriginLink=function(link){return location.protocol!==link.protocol||location.host!==link.host},anchoredLink=function(link){return(link.hash&&removeHash(link))===removeHash(location)||link.href===location.href+"#"},nonHtmlLink=function(link){var url;return url=removeHash(link),url.match(/\.[a-z]+(\?.*)?$/g)&&!url.match(new RegExp("\\.(?:"+htmlExtensions.join("|")+")?(\\?.*)?$","g"))},noTurbolink=function(link){for(var ignore;!ignore&&link!==document;)ignore=null!=link.getAttribute("data-no-turbolink"),link=link.parentNode;return ignore},targetLink=function(link){return 0!==link.target.length},nonStandardClick=function(event){return event.which>1||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey},ignoreClick=function(event,link){return crossOriginLink(link)||anchoredLink(link)||nonHtmlLink(link)||noTurbolink(link)||targetLink(link)||nonStandardClick(event)},allowLinkExtensions=function(){var extension,extensions,_i,_len;for(extensions=1<=arguments.length?__slice.call(arguments,0):[],_i=0,_len=extensions.length;_len>_i;_i++)extension=extensions[_i],htmlExtensions.push(extension);return htmlExtensions},bypassOnLoadPopstate=function(fn){return setTimeout(fn,500)},installDocumentReadyPageEventTriggers=function(){return document.addEventListener("DOMContentLoaded",function(){return triggerEvent("page:change"),triggerEvent("page:update")},!0)},installJqueryAjaxSuccessPageUpdateTrigger=function(){return"undefined"!=typeof jQuery?jQuery(document).on("ajaxSuccess",function(event,xhr){return jQuery.trim(xhr.responseText)?triggerEvent("page:update"):void 0}):void 0},installHistoryChangeHandler=function(event){var cachedPage,_ref;return(null!=(_ref=event.state)?_ref.turbolinks:void 0)?(cachedPage=pageCache[event.state.url])?(cacheCurrentPage(),fetchHistory(cachedPage)):visit(event.target.location.href):void 0},initializeTurbolinks=function(){return rememberCurrentUrl(),rememberCurrentState(),createDocument=browserCompatibleDocumentParser(),document.addEventListener("click",installClickHandlerLast,!0),bypassOnLoadPopstate(function(){return window.addEventListener("popstate",installHistoryChangeHandler,!1)})},historyStateIsDefined=void 0!==window.history.state||navigator.userAgent.match(/Firefox\/2[6|7]/),browserSupportsPushState=window.history&&window.history.pushState&&window.history.replaceState&&historyStateIsDefined,browserIsntBuggy=!navigator.userAgent.match(/CriOS\//),requestMethodIsSafe="GET"===(_ref=popCookie("request_method"))||""===_ref,browserSupportsTurbolinks=browserSupportsPushState&&browserIsntBuggy&&requestMethodIsSafe,browserSupportsCustomEvents=document.addEventListener&&document.createEvent,browserSupportsCustomEvents&&(installDocumentReadyPageEventTriggers(),installJqueryAjaxSuccessPageUpdateTrigger()),browserSupportsTurbolinks?(visit=fetch,initializeTurbolinks()):visit=function(url){return document.location.href=url},this.Turbolinks={visit:visit,pagesCached:pagesCached,enableTransitionCache:enableTransitionCache,allowLinkExtensions:allowLinkExtensions,supported:browserSupportsTurbolinks}}.call(this),/*
   * Foundation Responsive Library
   * http://foundation.zurb.com
   * Copyright 2014, ZURB
   * Free to use under the MIT license.
   * http://www.opensource.org/licenses/mit-license.php
  */
  function($,window,document,undefined){"use strict";function removeQuotes(string){return("string"==typeof string||string instanceof String)&&(string=string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,"")),string}var header_helpers=function(class_array){var i=class_array.length;for($("head");i--;)0===$("head").has("."+class_array[i]).length&&$("head").append('<meta class="'+class_array[i]+'" />')};header_helpers(["foundation-mq-small","foundation-mq-medium","foundation-mq-large","foundation-mq-xlarge","foundation-mq-xxlarge","foundation-data-attribute-namespace"]),$(function(){"undefined"!=typeof FastClick&&"undefined"!=typeof document.body&&FastClick.attach(document.body)});var S=function(selector,context){if("string"==typeof selector){if(context){var cont;if(context.jquery){if(cont=context[0],!cont)return context}else cont=context;return $(cont.querySelectorAll(selector))}return $(document.querySelectorAll(selector))}return $(selector,context)},attr_name=function(init){var arr=[];return init||arr.push("data"),this.namespace.length>0&&arr.push(this.namespace),arr.push(this.name),arr.join("-")},add_namespace=function(str){for(var parts=str.split("-"),i=parts.length,arr=[];i--;)0!==i?arr.push(parts[i]):this.namespace.length>0?arr.push(this.namespace,parts[i]):arr.push(parts[i]);return arr.reverse().join("-")},bindings=function(method,options){var self=this,should_bind_events=!S(this).data(this.attr_name(!0));return"string"==typeof method?this[method].call(this,options):void(S(this.scope).is("["+this.attr_name()+"]")?(S(this.scope).data(this.attr_name(!0)+"-init",$.extend({},this.settings,options||method,this.data_options(S(this.scope)))),should_bind_events&&this.events(this.scope)):S("["+this.attr_name()+"]",this.scope).each(function(){var should_bind_events=!S(this).data(self.attr_name(!0)+"-init");S(this).data(self.attr_name(!0)+"-init",$.extend({},self.settings,options||method,self.data_options(S(this)))),should_bind_events&&self.events(this)}))},single_image_loaded=function(image,callback){function loaded(){callback(image[0])}function bindLoad(){if(this.one("load",loaded),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var src=this.attr("src"),param=src.match(/\?/)?"&":"?";param+="random="+(new Date).getTime(),this.attr("src",src+param)}}return image.attr("src")?void(image[0].complete||4===image[0].readyState?loaded():bindLoad.call(image)):void loaded()};window.matchMedia=window.matchMedia||function(doc){var bool,docElem=doc.documentElement,refNode=docElem.firstElementChild||docElem.firstChild,fakeBody=doc.createElement("body"),div=doc.createElement("div");return div.id="mq-test-1",div.style.cssText="position:absolute;top:-100em",fakeBody.style.background="none",fakeBody.appendChild(div),function(q){return div.innerHTML='&shy;<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>',docElem.insertBefore(fakeBody,refNode),bool=42===div.offsetWidth,docElem.removeChild(fakeBody),{matches:bool,media:q}}}(document),/*
     * jquery.requestAnimationFrame
     * https://github.com/gnarf37/jquery-requestAnimationFrame
     * Requires jQuery 1.8+
     *
     * Copyright (c) 2012 Corey Frang
     * Licensed under the MIT license.
     */
  function(){function raf(){animating&&(requestAnimationFrame(raf),jqueryFxAvailable&&jQuery.fx.tick())}for(var animating,lastTime=0,vendors=["webkit","moz"],requestAnimationFrame=window.requestAnimationFrame,cancelAnimationFrame=window.cancelAnimationFrame,jqueryFxAvailable="undefined"!=typeof jQuery.fx;lastTime<vendors.length&&!requestAnimationFrame;lastTime++)requestAnimationFrame=window[vendors[lastTime]+"RequestAnimationFrame"],cancelAnimationFrame=cancelAnimationFrame||window[vendors[lastTime]+"CancelAnimationFrame"]||window[vendors[lastTime]+"CancelRequestAnimationFrame"];requestAnimationFrame?(window.requestAnimationFrame=requestAnimationFrame,window.cancelAnimationFrame=cancelAnimationFrame,jqueryFxAvailable&&(jQuery.fx.timer=function(timer){timer()&&jQuery.timers.push(timer)&&!animating&&(animating=!0,raf())},jQuery.fx.stop=function(){animating=!1})):(window.requestAnimationFrame=function(callback){var currTime=(new Date).getTime(),timeToCall=Math.max(0,16-(currTime-lastTime)),id=window.setTimeout(function(){callback(currTime+timeToCall)},timeToCall);return lastTime=currTime+timeToCall,id},window.cancelAnimationFrame=function(id){clearTimeout(id)})}(jQuery),window.Foundation={name:"Foundation",version:"5.2.1",media_queries:{small:S(".foundation-mq-small").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),medium:S(".foundation-mq-medium").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),large:S(".foundation-mq-large").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xlarge:S(".foundation-mq-xlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xxlarge:S(".foundation-mq-xxlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,"")},stylesheet:$("<style></style>").appendTo("head")[0].sheet,global:{namespace:""},init:function(scope,libraries,method,options,response){var args=[scope,method,options,response],responses=[];if(this.rtl=/rtl/i.test(S("html").attr("dir")),this.scope=scope||this.scope,this.set_namespace(),libraries&&"string"==typeof libraries&&!/reflow/i.test(libraries))this.libs.hasOwnProperty(libraries)&&responses.push(this.init_lib(libraries,args));else for(var lib in this.libs)responses.push(this.init_lib(lib,libraries));return scope},init_lib:function(lib,args){return this.libs.hasOwnProperty(lib)?(this.patch(this.libs[lib]),args&&args.hasOwnProperty(lib)?("undefined"!=typeof this.libs[lib].settings?$.extend(!0,this.libs[lib].settings,args[lib]):"undefined"!=typeof this.libs[lib].defaults&&$.extend(!0,this.libs[lib].defaults,args[lib]),this.libs[lib].init.apply(this.libs[lib],[this.scope,args[lib]])):(args=args instanceof Array?args:Array(args),this.libs[lib].init.apply(this.libs[lib],args))):function(){}},patch:function(lib){lib.scope=this.scope,lib.namespace=this.global.namespace,lib.rtl=this.rtl,lib.data_options=this.utils.data_options,lib.attr_name=attr_name,lib.add_namespace=add_namespace,lib.bindings=bindings,lib.S=this.utils.S},inherit:function(scope,methods){for(var methods_arr=methods.split(" "),i=methods_arr.length;i--;)this.utils.hasOwnProperty(methods_arr[i])&&(scope[methods_arr[i]]=this.utils[methods_arr[i]])},set_namespace:function(){var namespace=this.global.namespace||$(".foundation-data-attribute-namespace").css("font-family");/false/i.test(namespace)||(this.global.namespace=namespace)},libs:{},utils:{S:S,throttle:function(func,delay){var timer=null;return function(){var context=this,args=arguments;clearTimeout(timer),timer=setTimeout(function(){func.apply(context,args)},delay)}},debounce:function(func,delay,immediate){var timeout,result;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||(result=func.apply(context,args))},callNow=immediate&&!timeout;return clearTimeout(timeout),timeout=setTimeout(later,delay),callNow&&(result=func.apply(context,args)),result}},data_options:function(el){function isNumber(o){return!isNaN(o-0)&&null!==o&&""!==o&&o!==!1&&o!==!0}function trim(str){return"string"==typeof str?$.trim(str):str}var ii,p,opts_arr,opts={},data_options=function(el){var namespace=Foundation.global.namespace;return el.data(namespace.length>0?namespace+"-options":"options")},cached_options=data_options(el);if("object"==typeof cached_options)return cached_options;for(opts_arr=(cached_options||":").split(";"),ii=opts_arr.length;ii--;)p=opts_arr[ii].split(":"),/true/i.test(p[1])&&(p[1]=!0),/false/i.test(p[1])&&(p[1]=!1),isNumber(p[1])&&(p[1]=-1===p[1].indexOf(".")?parseInt(p[1],10):parseFloat(p[1],10)),2===p.length&&p[0].length>0&&(opts[trim(p[0])]=trim(p[1]));return opts},register_media:function(media,media_class){Foundation.media_queries[media]===undefined&&($("head").append('<meta class="'+media_class+'">'),Foundation.media_queries[media]=removeQuotes($("."+media_class).css("font-family")))},add_custom_rule:function(rule,media){if(media===undefined)Foundation.stylesheet.insertRule(rule,Foundation.stylesheet.cssRules.length);else{var query=Foundation.media_queries[media];query!==undefined&&Foundation.stylesheet.insertRule("@media "+Foundation.media_queries[media]+"{ "+rule+" }")}},image_loaded:function(images,callback){var self=this,unloaded=images.length;0===unloaded&&callback(images),images.each(function(){single_image_loaded(self.S(this),function(){unloaded-=1,0===unloaded&&callback(images)})})},random_str:function(){return this.fidx||(this.fidx=0),this.prefix=this.prefix||[this.name||"F",(+new Date).toString(36)].join("-"),this.prefix+(this.fidx++).toString(36)}}},$.fn.foundation=function(){var args=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(args)),this})}}(jQuery,this,this.document),function($,window,document){"use strict";Foundation.libs.abide={name:"abide",version:"5.2.1",settings:{live_validate:!0,focus_on_invalid:!0,error_labels:!0,timeout:1e3,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^\d+$/,number:/-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,url:/(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/,datetime:/([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))/,time:/(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}/,dateISO:/\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,month_day_year:/(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(el){var from=document.getElementById(el.getAttribute(this.add_namespace("data-equalto"))).value,to=el.value,valid=from===to;return valid}}},timer:null,init:function(scope,method,options){this.bindings(method,options)},events:function(scope){{var self=this,form=self.S(scope).attr("novalidate","novalidate");form.data(this.attr_name(!0)+"-init")}this.invalid_attr=this.add_namespace("data-invalid"),form.off(".abide").on("submit.fndtn.abide validate.fndtn.abide",function(e){var is_ajax=/ajax/i.test(self.S(this).attr(self.attr_name()));return self.validate(self.S(this).find("input, textarea, select").get(),e,is_ajax)}).on("reset",function(){return self.reset($(this))}).find("input, textarea, select").off(".abide").on("blur.fndtn.abide change.fndtn.abide",function(e){self.validate([this],e)}).on("keydown.fndtn.abide",function(e){var settings=$(this).closest("form").data(self.attr_name(!0)+"-init");settings.live_validate===!0&&(clearTimeout(self.timer),self.timer=setTimeout(function(){self.validate([this],e)}.bind(this),settings.timeout))})},reset:function(form){form.removeAttr(this.invalid_attr),$(this.invalid_attr,form).removeAttr(this.invalid_attr),$(".error",form).not("small").removeClass("error")},validate:function(els,e,is_ajax){for(var validations=this.parse_patterns(els),validation_count=validations.length,form=this.S(els[0]).closest("form"),submit_event=/submit/.test(e.type),i=0;validation_count>i;i++)if(!validations[i]&&(submit_event||is_ajax))return this.settings.focus_on_invalid&&els[i].focus(),form.trigger("invalid"),this.S(els[i]).closest("form").attr(this.invalid_attr,""),!1;return(submit_event||is_ajax)&&form.trigger("valid"),form.removeAttr(this.invalid_attr),is_ajax?!1:!0},parse_patterns:function(els){for(var i=els.length,el_patterns=[];i--;)el_patterns.push(this.pattern(els[i]));return this.check_validation_and_apply_styles(el_patterns)},pattern:function(el){var type=el.getAttribute("type"),required="string"==typeof el.getAttribute("required"),pattern=el.getAttribute("pattern")||"";return this.settings.patterns.hasOwnProperty(pattern)&&pattern.length>0?[el,this.settings.patterns[pattern],required]:pattern.length>0?[el,new RegExp(pattern),required]:this.settings.patterns.hasOwnProperty(type)?[el,this.settings.patterns[type],required]:(pattern=/.*/,[el,pattern,required])},check_validation_and_apply_styles:function(el_patterns){for(var i=el_patterns.length,validations=[];i--;){var parent,valid,el=el_patterns[i][0],required=el_patterns[i][2],value=el.value,direct_parent=this.S(el).parent(),validator=el.getAttribute(this.add_namespace("data-abide-validator")),is_radio="radio"===el.type,is_checkbox="checkbox"===el.type,label=this.S('label[for="'+el.getAttribute("id")+'"]'),valid_length=required?el.value.length>0:!0;el.getAttribute(this.add_namespace("data-equalto"))&&(validator="equalTo"),parent=direct_parent.is("label")?direct_parent.parent():direct_parent,is_radio&&required?validations.push(this.valid_radio(el,required)):is_checkbox&&required?validations.push(this.valid_checkbox(el,required)):validator?(valid=this.settings.validators[validator].apply(this,[el,required,parent]),validations.push(valid),valid?(this.S(el).removeAttr(this.invalid_attr),parent.removeClass("error")):(this.S(el).attr(this.invalid_attr,""),parent.addClass("error"))):el_patterns[i][1].test(value)&&valid_length||!required&&el.value.length<1||$(el).attr("disabled")?(this.S(el).removeAttr(this.invalid_attr),parent.removeClass("error"),label.length>0&&this.settings.error_labels&&label.removeClass("error"),validations.push(!0),$(el).triggerHandler("valid")):(this.S(el).attr(this.invalid_attr,""),parent.addClass("error"),label.length>0&&this.settings.error_labels&&label.addClass("error"),validations.push(!1),$(el).triggerHandler("invalid"))}return validations},valid_checkbox:function(el,required){var el=this.S(el),valid=el.is(":checked")||!required;return valid?el.removeAttr(this.invalid_attr).parent().removeClass("error"):el.attr(this.invalid_attr,"").parent().addClass("error"),valid},valid_radio:function(el){for(var name=el.getAttribute("name"),group=document.getElementsByName(name),count=group.length,valid=!1,i=0;count>i;i++)group[i].checked&&(valid=!0);for(var i=0;count>i;i++)valid?this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass("error"):this.S(group[i]).attr(this.invalid_attr,"").parent().addClass("error");return valid}}}(jQuery,this,this.document),function($){"use strict";Foundation.libs.accordion={name:"accordion",version:"5.2.1",settings:{active_class:"active",toggleable:!0},init:function(scope,method,options){this.bindings(method,options)},events:function(){var self=this,S=this.S;S(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] dd > a",function(e){var accordion=S(this).closest("["+self.attr_name()+"]"),target=S("#"+this.href.split("#")[1]),siblings=S("dd > .content",accordion),aunts=$("> dd",accordion),settings=accordion.data(self.attr_name(!0)+"-init"),active_content=S("dd > .content."+settings.active_class,accordion),active_parent=S("dd."+settings.active_class,accordion);if(e.preventDefault(),S(this).closest("dl").is(accordion)){if(active_content[0]==target[0]&&settings.toggleable)return active_parent.toggleClass(settings.active_class,!1),target.toggleClass(settings.active_class,!1);siblings.removeClass(settings.active_class),aunts.removeClass(settings.active_class),target.addClass(settings.active_class).parent().addClass(settings.active_class)}})},off:function(){},reflow:function(){}}}(jQuery,this,this.document),function($){"use strict";Foundation.libs.alert={name:"alert",version:"5.2.1",settings:{animation:"fadeOut",speed:300,callback:function(){}},init:function(scope,method,options){this.bindings(method,options)},events:function(){var self=this,S=this.S;$(this.scope).off(".alert").on("click.fndtn.alert","["+this.attr_name()+"] a.close",function(e){var alertBox=S(this).closest("["+self.attr_name()+"]"),settings=alertBox.data(self.attr_name(!0)+"-init")||self.settings;e.preventDefault(),alertBox[settings.animation](settings.speed,function(){S(this).trigger("close").remove(),settings.callback()})})},reflow:function(){}}}(jQuery,this,this.document),function($,window,document,undefined){"use strict";Foundation.libs.clearing={name:"clearing",version:"5.2.1",settings:{templates:{viewing:'<a href="#" class="clearing-close">&times;</a><div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" /><p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a><a href="#" class="clearing-main-next"><span></span></a></div>'},close_selectors:".clearing-close",touch_label:"&larr;&nbsp;Swipe to Advance&nbsp;&rarr;",init:!1,locked:!1},init:function(scope,method,options){var self=this;Foundation.inherit(this,"throttle image_loaded"),this.bindings(method,options),self.S(this.scope).is("["+this.attr_name()+"]")?this.assemble(self.S("li",this.scope)):self.S("["+this.attr_name()+"]",this.scope).each(function(){self.assemble(self.S("li",this))})},events:function(scope){var self=this,S=self.S;$(".scroll-container").length>0&&(this.scope=$(".scroll-container")),S(this.scope).off(".clearing").on("click.fndtn.clearing","ul["+this.attr_name()+"] li",function(e,current,target){var current=current||S(this),target=target||current,next=current.next("li"),settings=current.closest("["+self.attr_name()+"]").data(self.attr_name(!0)+"-init"),image=S(e.target);e.preventDefault(),settings||(self.init(),settings=current.closest("["+self.attr_name()+"]").data(self.attr_name(!0)+"-init")),target.hasClass("visible")&&current[0]===target[0]&&next.length>0&&self.is_open(current)&&(target=next,image=S("img",target)),self.open(image,current,target),self.update_paddles(target)}).on("click.fndtn.clearing",".clearing-main-next",function(e){self.nav(e,"next")}).on("click.fndtn.clearing",".clearing-main-prev",function(e){self.nav(e,"prev")}).on("click.fndtn.clearing",this.settings.close_selectors,function(e){Foundation.libs.clearing.close(e,this)}),$(document).on("keydown.fndtn.clearing",function(e){self.keydown(e)}),S(window).off(".clearing").on("resize.fndtn.clearing",function(){self.resize()}),this.swipe_events(scope)},swipe_events:function(){var self=this,S=self.S;S(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(e){e.touches||(e=e.originalEvent);var data={start_page_x:e.touches[0].pageX,start_page_y:e.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:undefined};S(this).data("swipe-transition",data),e.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(e){if(e.touches||(e=e.originalEvent),!(e.touches.length>1||e.scale&&1!==e.scale)){var data=S(this).data("swipe-transition");if("undefined"==typeof data&&(data={}),data.delta_x=e.touches[0].pageX-data.start_page_x,"undefined"==typeof data.is_scrolling&&(data.is_scrolling=!!(data.is_scrolling||Math.abs(data.delta_x)<Math.abs(e.touches[0].pageY-data.start_page_y))),!data.is_scrolling&&!data.active){e.preventDefault();var direction=data.delta_x<0?"next":"prev";data.active=!0,self.nav(e,direction)}}}).on("touchend.fndtn.clearing",".visible-img",function(e){S(this).data("swipe-transition",{}),e.stopPropagation()})},assemble:function($li){var $el=$li.parent();if(!$el.parent().hasClass("carousel")){$el.after('<div id="foundationClearingHolder"></div>');var holder=this.S("#foundationClearingHolder"),settings=$el.data(this.attr_name(!0)+"-init"),grid=$el.detach(),data={grid:'<div class="carousel">'+grid[0].outerHTML+"</div>",viewing:settings.templates.viewing},wrapper='<div class="clearing-assembled"><div>'+data.viewing+data.grid+"</div></div>",touch_label=this.settings.touch_label;Modernizr.touch&&(wrapper=$(wrapper).find(".clearing-touch-label").html(touch_label).end()),holder.after(wrapper).remove()}},open:function($image,current,target){function startLoad(){setTimeout(function(){this.image_loaded(image,function(){1!==image.outerWidth()||error?cb.call(this,image):startLoad.call(this)}.bind(this))}.bind(this),50)}function cb(image){$(image);image.css("visibility","visible"),body.css("overflow","hidden"),root.addClass("clearing-blackout"),container.addClass("clearing-container"),visible_image.show(),this.fix_height(target).caption(self.S(".clearing-caption",visible_image),self.S("img",target)).center_and_label(image,label).shift(current,target,function(){target.siblings().removeClass("visible"),target.addClass("visible")})}var self=this,body=$(document.body),root=target.closest(".clearing-assembled"),container=$("div",root).first(),visible_image=$(".visible-img",container),image=$("img",visible_image).not($image),label=$(".clearing-touch-label",".clearing-blackout"),error=!1;image.error(function(){error=!0}),this.locked()||(image.attr("src",this.load($image)).css("visibility","hidden"),startLoad.call(this))},close:function(e,el){e.preventDefault();var container,visible_image,root=function(target){return/blackout/.test(target.selector)?target:target.closest(".clearing-blackout")}($(el)),body=$(document.body);return el===e.target&&root&&(body.css("overflow",""),container=$("div",root).first(),visible_image=$(".visible-img",container),this.settings.prev_index=0,$("ul["+this.attr_name()+"]",root).attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),container.removeClass("clearing-container"),visible_image.hide()),!1},is_open:function(current){return current.parent().prop("style").length>0},keydown:function(e){var clearing=$(".clearing-blackout ul["+this.attr_name()+"]"),NEXT_KEY=this.rtl?37:39,PREV_KEY=this.rtl?39:37,ESC_KEY=27;e.which===NEXT_KEY&&this.go(clearing,"next"),e.which===PREV_KEY&&this.go(clearing,"prev"),e.which===ESC_KEY&&this.S("a.clearing-close").trigger("click")},nav:function(e,direction){var clearing=$("ul["+this.attr_name()+"]",".clearing-blackout");e.preventDefault(),this.go(clearing,direction)},resize:function(){var image=$("img",".clearing-blackout .visible-img"),label=$(".clearing-touch-label",".clearing-blackout");image.length&&this.center_and_label(image,label)},fix_height:function(target){var lis=target.parent().children(),self=this;return lis.each(function(){var li=self.S(this),image=li.find("img");li.height()>image.outerHeight()&&li.addClass("fix-height")}).closest("ul").width(100*lis.length+"%"),this},update_paddles:function(target){var visible_image=target.closest(".carousel").siblings(".visible-img");target.next().length>0?this.S(".clearing-main-next",visible_image).removeClass("disabled"):this.S(".clearing-main-next",visible_image).addClass("disabled"),target.prev().length>0?this.S(".clearing-main-prev",visible_image).removeClass("disabled"):this.S(".clearing-main-prev",visible_image).addClass("disabled")},center_and_label:function(target,label){return this.rtl?(target.css({marginRight:-(target.outerWidth()/2),marginTop:-(target.outerHeight()/2),left:"auto",right:"50%"}),label.length>0&&label.css({marginRight:-(label.outerWidth()/2),marginTop:-(target.outerHeight()/2)-label.outerHeight()-10,left:"auto",right:"50%"})):(target.css({marginLeft:-(target.outerWidth()/2),marginTop:-(target.outerHeight()/2)}),label.length>0&&label.css({marginLeft:-(label.outerWidth()/2),marginTop:-(target.outerHeight()/2)-label.outerHeight()-10})),this},load:function($image){if("A"===$image[0].nodeName)var href=$image.attr("href");else var href=$image.parent().attr("href");return this.preload($image),href?href:$image.attr("src")},preload:function($image){this.img($image.closest("li").next()).img($image.closest("li").prev())},img:function(img){if(img.length){var new_img=new Image,new_a=this.S("a",img);new_img.src=new_a.length?new_a.attr("href"):this.S("img",img).attr("src")}return this},caption:function(container,$image){var caption=$image.attr("data-caption");return caption?container.html(caption).show():container.text("").hide(),this},go:function($ul,direction){var current=this.S(".visible",$ul),target=current[direction]();target.length&&this.S("img",target).trigger("click",[current,target])},shift:function(current,target,callback){var skip_shift,clearing=target.parent(),old_index=this.settings.prev_index||target.index(),direction=this.direction(clearing,current,target),dir=this.rtl?"right":"left",left=parseInt(clearing.css("left"),10),width=target.outerWidth(),dir_obj={};target.index()===old_index||/skip/.test(direction)?/skip/.test(direction)&&(skip_shift=target.index()-this.settings.up_count,this.lock(),skip_shift>0?(dir_obj[dir]=-(skip_shift*width),clearing.animate(dir_obj,300,this.unlock())):(dir_obj[dir]=0,clearing.animate(dir_obj,300,this.unlock()))):/left/.test(direction)?(this.lock(),dir_obj[dir]=left+width,clearing.animate(dir_obj,300,this.unlock())):/right/.test(direction)&&(this.lock(),dir_obj[dir]=left-width,clearing.animate(dir_obj,300,this.unlock())),callback()},direction:function($el,current,target){var response,lis=this.S("li",$el),li_width=lis.outerWidth()+lis.outerWidth()/4,up_count=Math.floor(this.S(".clearing-container").outerWidth()/li_width)-1,target_index=lis.index(target);return this.settings.up_count=up_count,response=this.adjacent(this.settings.prev_index,target_index)?target_index>up_count&&target_index>this.settings.prev_index?"right":target_index>up_count-1&&target_index<=this.settings.prev_index?"left":!1:"skip",this.settings.prev_index=target_index,response},adjacent:function(current_index,target_index){for(var i=target_index+1;i>=target_index-1;i--)if(i===current_index)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},off:function(){this.S(this.scope).off(".fndtn.clearing"),this.S(window).off(".fndtn.clearing")},reflow:function(){this.init()}}}(jQuery,this,this.document),function($,window){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.2.1",settings:{active_class:"open",align:"bottom",is_hover:!1,opened:function(){},closed:function(){}},init:function(scope,method,options){Foundation.inherit(this,"throttle"),this.bindings(method,options)},events:function(){var self=this,S=self.S;S(this.scope).off(".dropdown").on("click.fndtn.dropdown","["+this.attr_name()+"]",function(e){var settings=S(this).data(self.attr_name(!0)+"-init")||self.settings;e.preventDefault(),(!settings.is_hover||Modernizr.touch)&&self.toggle(S(this))}).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(e){var $this=S(this);if(clearTimeout(self.timeout),$this.data(self.data_attr()))var dropdown=S("#"+$this.data(self.data_attr())),target=$this;else{var dropdown=$this;target=S("["+self.attr_name()+"='"+dropdown.attr("id")+"']")}var settings=target.data(self.attr_name(!0)+"-init")||self.settings;S(e.target).data(self.data_attr())&&settings.is_hover&&self.closeall.call(self),settings.is_hover&&self.open.apply(self,[dropdown,target])}).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(){var $this=S(this);self.timeout=setTimeout(function(){if($this.data(self.data_attr())){var settings=$this.data(self.data_attr(!0)+"-init")||self.settings;settings.is_hover&&self.close.call(self,S("#"+$this.data(self.data_attr())))}else{var target=S("["+self.attr_name()+'="'+S(this).attr("id")+'"]'),settings=target.data(self.attr_name(!0)+"-init")||self.settings;settings.is_hover&&self.close.call(self,$this)}}.bind(this),150)}).on("click.fndtn.dropdown",function(e){var parent=S(e.target).closest("["+self.attr_name()+"-content]");if(!S(e.target).data(self.data_attr())&&!S(e.target).parent().data(self.data_attr()))return!S(e.target).data("revealId")&&parent.length>0&&(S(e.target).is("["+self.attr_name()+"-content]")||$.contains(parent.first()[0],e.target))?void e.stopPropagation():void self.close.call(self,S("["+self.attr_name()+"-content]"))}).on("opened.fndtn.dropdown","["+self.attr_name()+"-content]",function(){self.settings.opened.call(this)}).on("closed.fndtn.dropdown","["+self.attr_name()+"-content]",function(){self.settings.closed.call(this)}),S(window).off(".dropdown").on("resize.fndtn.dropdown",self.throttle(function(){self.resize.call(self)},50)),this.resize()},close:function(dropdown){var self=this;dropdown.each(function(){self.S(this).hasClass(self.settings.active_class)&&(self.S(this).css(Foundation.rtl?"right":"left","-99999px").removeClass(self.settings.active_class),self.S(this).trigger("closed",[dropdown]))})},closeall:function(){var self=this;$.each(self.S("["+this.attr_name()+"-content]"),function(){self.close.call(self,self.S(this))})},open:function(dropdown,target){this.css(dropdown.addClass(this.settings.active_class),target),dropdown.trigger("opened",[dropdown,target])},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(target){var dropdown=this.S("#"+target.data(this.data_attr()));0!==dropdown.length&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(dropdown)),dropdown.hasClass(this.settings.active_class)?this.close.call(this,dropdown):(this.close.call(this,this.S("["+this.attr_name()+"-content]")),this.open.call(this,dropdown,target)))},resize:function(){var dropdown=this.S("["+this.attr_name()+"-content].open"),target=this.S("["+this.attr_name()+"='"+dropdown.attr("id")+"']");dropdown.length&&target.length&&this.css(dropdown,target)},css:function(dropdown,target){if(this.clear_idx(),this.small()){var p=this.dirs.bottom.call(dropdown,target);dropdown.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:p.top}),dropdown.css(Foundation.rtl?"right":"left","2.5%")}else{var settings=target.data(this.attr_name(!0)+"-init")||this.settings;this.style(dropdown,target,settings)}return dropdown},style:function(dropdown,target,settings){var css=$.extend({position:"absolute"},this.dirs[settings.align].call(dropdown,target,settings));dropdown.attr("style","").css(css)},dirs:{_base:function(t){var o_p=this.offsetParent(),o=o_p.offset(),p=t.offset();return p.top-=o.top,p.left-=o.left,p},top:function(t){var self=Foundation.libs.dropdown,p=self.dirs._base.call(this,t),pip_offset_base=t.outerWidth()/2-8;return this.addClass("drop-top"),(t.outerWidth()<this.outerWidth()||self.small())&&self.adjust_pip(pip_offset_base,p),Foundation.rtl?{left:p.left-this.outerWidth()+t.outerWidth(),top:p.top-this.outerHeight()}:{left:p.left,top:p.top-this.outerHeight()}},bottom:function(t){var self=Foundation.libs.dropdown,p=self.dirs._base.call(this,t),pip_offset_base=t.outerWidth()/2-8;return(t.outerWidth()<this.outerWidth()||self.small())&&self.adjust_pip(pip_offset_base,p),self.rtl?{left:p.left-this.outerWidth()+t.outerWidth(),top:p.top+t.outerHeight()}:{left:p.left,top:p.top+t.outerHeight()}},left:function(t){var p=Foundation.libs.dropdown.dirs._base.call(this,t);return this.addClass("drop-left"),{left:p.left-this.outerWidth(),top:p.top}},right:function(t){var p=Foundation.libs.dropdown.dirs._base.call(this,t);return this.addClass("drop-right"),{left:p.left+t.outerWidth(),top:p.top}}},adjust_pip:function(pip_offset_base,p){var sheet=Foundation.stylesheet;this.small()&&(pip_offset_base+=p.left-8),this.rule_idx=sheet.cssRules.length;var sel_before=".f-dropdown.open:before",sel_after=".f-dropdown.open:after",css_before="left: "+pip_offset_base+"px;",css_after="left: "+(pip_offset_base-1)+"px;";sheet.insertRule?(sheet.insertRule([sel_before,"{",css_before,"}"].join(" "),this.rule_idx),sheet.insertRule([sel_after,"{",css_after,"}"].join(" "),this.rule_idx+1)):(sheet.addRule(sel_before,css_before,this.rule_idx),sheet.addRule(sel_after,css_after,this.rule_idx+1))},clear_idx:function(){var sheet=Foundation.stylesheet;this.rule_idx&&(sheet.deleteRule(this.rule_idx),sheet.deleteRule(this.rule_idx),delete this.rule_idx)},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},off:function(){this.S(this.scope).off(".fndtn.dropdown"),this.S("html, body").off(".fndtn.dropdown"),this.S(window).off(".fndtn.dropdown"),this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(jQuery,this,this.document),function($,window){"use strict";Foundation.libs.interchange={name:"interchange",version:"5.2.1",cache:{},images_loaded:!1,nodes_loaded:!1,settings:{load_attr:"interchange",named_queries:{"default":"only screen",small:Foundation.media_queries.small,medium:Foundation.media_queries.medium,large:Foundation.media_queries.large,xlarge:Foundation.media_queries.xlarge,xxlarge:Foundation.media_queries.xxlarge,landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"},directives:{replace:function(el,path,trigger){if(/IMG/.test(el[0].nodeName)){var orig_path=el[0].src;if(new RegExp(path,"i").test(orig_path))return;return el[0].src=path,trigger(el[0].src)}var last_path=el.data(this.data_attr+"-last-path");if(last_path!=path){var regex="/^.(.jpg|.jpeg|.png|.gif|.tiff|.bmp)??|#?./";return new RegExp(regex,"i").test(path)?($(el).css("background-image","url("+path+")"),el.data("interchange-last-path",path),trigger(path)):$.get(path,function(response){el.html(response),el.data(this.data_attr+"-last-path",path),trigger()})}}}},init:function(scope,method,options){Foundation.inherit(this,"throttle random_str"),this.data_attr=this.set_data_attr(),$.extend(!0,this.settings,method,options),this.bindings(method,options),this.load("images"),this.load("nodes")},get_media_hash:function(){var mediaHash="";for(var queryName in this.settings.named_queries)mediaHash+=matchMedia(this.settings.named_queries[queryName]).matches.toString();return mediaHash},events:function(){var prevMediaHash,self=this;return $(window).off(".interchange").on("resize.fndtn.interchange",self.throttle(function(){var currMediaHash=self.get_media_hash();currMediaHash!==prevMediaHash&&self.resize(),prevMediaHash=currMediaHash},50)),this},resize:function(){var cache=this.cache;if(!this.images_loaded||!this.nodes_loaded)return void setTimeout($.proxy(this.resize,this),50);for(var uuid in cache)if(cache.hasOwnProperty(uuid)){var passed=this.results(uuid,cache[uuid]);passed&&this.settings.directives[passed.scenario[1]].call(this,passed.el,passed.scenario[0],function(){if(arguments[0]instanceof Array)var args=arguments[0];
  else var args=Array.prototype.slice.call(arguments,0);passed.el.trigger(passed.scenario[1],args)})}},results:function(uuid,scenarios){var count=scenarios.length;if(count>0)for(var el=this.S("["+this.add_namespace("data-uuid")+'="'+uuid+'"]');count--;){var mq,rule=scenarios[count][2];if(mq=matchMedia(this.settings.named_queries.hasOwnProperty(rule)?this.settings.named_queries[rule]:rule),mq.matches)return{el:el,scenario:scenarios[count]}}return!1},load:function(type,force_update){return("undefined"==typeof this["cached_"+type]||force_update)&&this["update_"+type](),this["cached_"+type]},update_images:function(){var images=this.S("img["+this.data_attr+"]"),count=images.length,i=count,loaded_count=0,data_attr=this.data_attr;for(this.cache={},this.cached_images=[],this.images_loaded=0===count;i--;){if(loaded_count++,images[i]){var str=images[i].getAttribute(data_attr)||"";str.length>0&&this.cached_images.push(images[i])}loaded_count===count&&(this.images_loaded=!0,this.enhance("images"))}return this},update_nodes:function(){var nodes=this.S("["+this.data_attr+"]").not("img"),count=nodes.length,i=count,loaded_count=0,data_attr=this.data_attr;for(this.cached_nodes=[],this.nodes_loaded=0===count;i--;){loaded_count++;var str=nodes[i].getAttribute(data_attr)||"";str.length>0&&this.cached_nodes.push(nodes[i]),loaded_count===count&&(this.nodes_loaded=!0,this.enhance("nodes"))}return this},enhance:function(type){for(var i=this["cached_"+type].length;i--;)this.object($(this["cached_"+type][i]));return $(window).trigger("resize")},parse_params:function(path,directive,mq){return[this.trim(path),this.convert_directive(directive),this.trim(mq)]},convert_directive:function(directive){var trimmed=this.trim(directive);return trimmed.length>0?trimmed:"replace"},object:function(el){var raw_arr=this.parse_data_attr(el),scenarios=[],i=raw_arr.length;if(i>0)for(;i--;){var split=raw_arr[i].split(/\((.*?)(\))$/);if(split.length>1){var cached_split=split[0].split(","),params=this.parse_params(cached_split[0],cached_split[1],split[1]);scenarios.push(params)}}return this.store(el,scenarios)},store:function(el,scenarios){var uuid=this.random_str(),current_uuid=el.data(this.add_namespace("uuid",!0));return this.cache[current_uuid]?this.cache[current_uuid]:(el.attr(this.add_namespace("data-uuid"),uuid),this.cache[uuid]=scenarios)},trim:function(str){return"string"==typeof str?$.trim(str):str},set_data_attr:function(init){return init?this.namespace.length>0?this.namespace+"-"+this.settings.load_attr:this.settings.load_attr:this.namespace.length>0?"data-"+this.namespace+"-"+this.settings.load_attr:"data-"+this.settings.load_attr},parse_data_attr:function(el){for(var raw=el.attr(this.attr_name()).split(/\[(.*?)\]/),i=raw.length,output=[];i--;)raw[i].replace(/[\W\d]+/,"").length>4&&output.push(raw[i]);return output},reflow:function(){this.load("images",!0),this.load("nodes",!0)}}}(jQuery,this,this.document),function($,window,document,undefined){"use strict";Foundation.libs.joyride={name:"joyride",version:"5.2.1",defaults:{expose:!1,modal:!0,tip_location:"bottom",nub_position:"auto",scroll_speed:1500,scroll_animation:"linear",timer:0,start_timer_on_click:!0,start_offset:0,next_button:!0,tip_animation:"fade",pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:!1,cookie_name:"joyride",cookie_domain:!1,cookie_expires:365,tip_container:"body",tip_location_patterns:{top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">&times;</a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',wrapper:'<div class="joyride-content-wrapper"></div>',button:'<a href="#" class="small button joyride-next-tip"></a>',modal:'<div class="joyride-modal-bg"></div>',expose:'<div class="joyride-expose-wrapper"></div>',expose_cover:'<div class="joyride-expose-cover"></div>'},expose_add_class:""},init:function(scope,method,options){Foundation.inherit(this,"throttle random_str"),this.settings=this.settings||$.extend({},this.defaults,options||method),this.bindings(method,options)},events:function(){var self=this;$(this.scope).off(".joyride").on("click.fndtn.joyride",".joyride-next-tip, .joyride-modal-bg",function(e){e.preventDefault(),this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())}.bind(this)).on("click.fndtn.joyride",".joyride-close-tip",function(e){e.preventDefault(),this.end()}.bind(this)),$(window).off(".joyride").on("resize.fndtn.joyride",self.throttle(function(){if($("["+self.attr_name()+"]").length>0&&self.settings.$next_tip){if(self.settings.exposed.length>0){var $els=$(self.settings.exposed);$els.each(function(){var $this=$(this);self.un_expose($this),self.expose($this)})}self.is_phone()?self.pos_phone():self.pos_default(!1,!0)}},100))},start:function(){var self=this,$this=$("["+this.attr_name()+"]",this.scope),integer_settings=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],int_settings_count=integer_settings.length;!$this.length>0||(this.settings.init||this.events(),this.settings=$this.data(this.attr_name(!0)+"-init"),this.settings.$content_el=$this,this.settings.$body=$(this.settings.tip_container),this.settings.body_offset=$(this.settings.tip_container).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,"function"!=typeof $.cookie&&(this.settings.cookie_monster=!1),(!this.settings.cookie_monster||this.settings.cookie_monster&&!$.cookie(this.settings.cookie_name))&&(this.settings.$tip_content.each(function(index){var $this=$(this);this.settings=$.extend({},self.defaults,self.data_options($this));for(var i=int_settings_count;i--;)self.settings[integer_settings[i]]=parseInt(self.settings[integer_settings[i]],10);self.create({$li:$this,index:index})}),!this.settings.start_timer_on_click&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")))},resume:function(){this.set_li(),this.show()},tip_template:function(opts){var $blank,content;return opts.tip_class=opts.tip_class||"",$blank=$(this.settings.template.tip).addClass(opts.tip_class),content=$.trim($(opts.li).html())+this.button_text(opts.button_text)+this.settings.template.link+this.timer_instance(opts.index),$blank.append($(this.settings.template.wrapper)),$blank.first().attr(this.add_namespace("data-index"),opts.index),$(".joyride-content-wrapper",$blank).append(content),$blank[0]},timer_instance:function(index){var txt;return txt=0===index&&this.settings.start_timer_on_click&&this.settings.timer>0||0===this.settings.timer?"":$(this.settings.template.timer)[0].outerHTML},button_text:function(txt){return this.settings.next_button?(txt=$.trim(txt)||"Next",txt=$(this.settings.template.button).append(txt)[0].outerHTML):txt="",txt},create:function(opts){var buttonText=opts.$li.attr(this.add_namespace("data-button"))||opts.$li.attr(this.add_namespace("data-text")),tipClass=opts.$li.attr("class"),$tip_content=$(this.tip_template({tip_class:tipClass,index:opts.index,button_text:buttonText,li:opts.$li}));$(this.settings.tip_container).append($tip_content)},show:function(init){var $timer=null;this.settings.$li===undefined||-1===$.inArray(this.settings.$li.index(),this.settings.pause_after)?(this.settings.paused?this.settings.paused=!1:this.set_li(init),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0?(init&&(this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tip_settings=$.extend({},this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location],/body/i.test(this.settings.$target.selector)||this.scroll_to(),this.is_phone()?this.pos_phone(!0):this.pos_default(!0),$timer=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tip_animation)?($timer.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),setTimeout(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tip_animation)&&($timer.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show(),setTimeout(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fadeSpeed)):this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed)),this.settings.$current_tip=this.settings.$next_tip):this.settings.$li&&this.settings.$target.length<1?this.show():this.end()):this.settings.paused=!0},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.modal||$(".joyride-modal-bg").hide(),this.settings.$current_tip.css("visibility","hidden"),setTimeout($.proxy(function(){this.hide(),this.css("visibility","visible")},this.settings.$current_tip),0),this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(init){init?(this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(this.settings.$li=this.settings.$li.next(),this.set_next_tip()),this.set_target()},set_next_tip:function(){this.settings.$next_tip=$(".joyride-tip-guide").eq(this.settings.$li.index()),this.settings.$next_tip.data("closed","")},set_target:function(){var cl=this.settings.$li.attr(this.add_namespace("data-class")),id=this.settings.$li.attr(this.add_namespace("data-id")),$sel=function(){return id?$(document.getElementById(id)):cl?$("."+cl).first():$("body")};this.settings.$target=$sel()},scroll_to:function(){var window_half,tipOffset;window_half=$(window).height()/2,tipOffset=Math.ceil(this.settings.$target.offset().top-window_half+this.settings.$next_tip.outerHeight()),0!=tipOffset&&$("html, body").animate({scrollTop:tipOffset},this.settings.scroll_speed,"swing")},paused:function(){return-1===$.inArray(this.settings.$li.index()+1,this.settings.pause_after)},restart:function(){this.hide(),this.settings.$li=undefined,this.show("init")},pos_default:function(init,resizing){var $nub=(Math.ceil($(window).height()/2),this.settings.$next_tip.offset(),this.settings.$next_tip.find(".joyride-nub")),nub_width=Math.ceil($nub.outerWidth()/2),nub_height=Math.ceil($nub.outerHeight()/2),toggle=init||!1;toggle&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),"undefined"==typeof resizing&&(resizing=!1),/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal($nub):(this.bottom()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top+nub_height+this.settings.$target.outerHeight(),left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}:{top:this.settings.$target.offset().top+nub_height+this.settings.$target.outerHeight(),left:this.settings.$target.offset().left}),this.nub_position($nub,this.settings.tip_settings.nub_position,"top")):this.top()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-nub_height,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}:{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-nub_height,left:this.settings.$target.offset().left}),this.nub_position($nub,this.settings.tip_settings.nub_position,"bottom")):this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.settings.$target.outerWidth()+this.settings.$target.offset().left+nub_width}),this.nub_position($nub,this.settings.tip_settings.nub_position,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-nub_width}),this.nub_position($nub,this.settings.tip_settings.nub_position,"right")),!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length&&($nub.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts],this.settings.attempts++,this.pos_default())),toggle&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(init){var tip_height=this.settings.$next_tip.outerHeight(),target_height=(this.settings.$next_tip.offset(),this.settings.$target.outerHeight()),$nub=$(".joyride-nub",this.settings.$next_tip),nub_height=Math.ceil($nub.outerHeight()/2),toggle=init||!1;$nub.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),toggle&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal($nub):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-tip_height-nub_height}),$nub.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+target_height+nub_height}),$nub.addClass("top")),toggle&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function($nub){this.center(),$nub.hide(),this.show_modal()},show_modal:function(){if(!this.settings.$next_tip.data("closed")){var joyridemodalbg=$(".joyride-modal-bg");joyridemodalbg.length<1&&$("body").append(this.settings.template.modal).show(),/pop/i.test(this.settings.tip_animation)?joyridemodalbg.show():joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed)}},expose:function(){var expose,exposeCover,el,origCSS,origClasses,randId="expose-"+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof $)el=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;el=this.settings.$target}return el.length<1?(window.console&&console.error("element not valid",el),!1):(expose=$(this.settings.template.expose),this.settings.$body.append(expose),expose.css({top:el.offset().top,left:el.offset().left,width:el.outerWidth(!0),height:el.outerHeight(!0)}),exposeCover=$(this.settings.template.expose_cover),origCSS={zIndex:el.css("z-index"),position:el.css("position")},origClasses=null==el.attr("class")?"":el.attr("class"),el.css("z-index",parseInt(expose.css("z-index"))+1),"static"==origCSS.position&&el.css("position","relative"),el.data("expose-css",origCSS),el.data("orig-class",origClasses),el.attr("class",origClasses+" "+this.settings.expose_add_class),exposeCover.css({top:el.offset().top,left:el.offset().left,width:el.outerWidth(!0),height:el.outerHeight(!0)}),this.settings.modal&&this.show_modal(),this.settings.$body.append(exposeCover),expose.addClass(randId),exposeCover.addClass(randId),el.data("expose",randId),this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,el),void this.add_exposed(el))},un_expose:function(){var exposeId,el,expose,origCSS,origClasses,clearAll=!1;if(arguments.length>0&&arguments[0]instanceof $)el=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;el=this.settings.$target}return el.length<1?(window.console&&console.error("element not valid",el),!1):(exposeId=el.data("expose"),expose=$("."+exposeId),arguments.length>1&&(clearAll=arguments[1]),clearAll===!0?$(".joyride-expose-wrapper,.joyride-expose-cover").remove():expose.remove(),origCSS=el.data("expose-css"),"auto"==origCSS.zIndex?el.css("z-index",""):el.css("z-index",origCSS.zIndex),origCSS.position!=el.css("position")&&("static"==origCSS.position?el.css("position",""):el.css("position",origCSS.position)),origClasses=el.data("orig-class"),el.attr("class",origClasses),el.removeData("orig-classes"),el.removeData("expose"),el.removeData("expose-z-index"),void this.remove_exposed(el))},add_exposed:function(el){this.settings.exposed=this.settings.exposed||[],el instanceof $||"object"==typeof el?this.settings.exposed.push(el[0]):"string"==typeof el&&this.settings.exposed.push(el)},remove_exposed:function(el){var search,i;for(el instanceof $?search=el[0]:"string"==typeof el&&(search=el),this.settings.exposed=this.settings.exposed||[],i=this.settings.exposed.length;i--;)if(this.settings.exposed[i]==search)return void this.settings.exposed.splice(i,1)},center:function(){var $w=$(window);return this.settings.$next_tip.css({top:($w.height()-this.settings.$next_tip.outerHeight())/2+$w.scrollTop(),left:($w.width()-this.settings.$next_tip.outerWidth())/2+$w.scrollLeft()}),!0},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location)},top:function(){return/top/i.test(this.settings.tip_settings.tip_location)},right:function(){return/right/i.test(this.settings.tip_settings.tip_location)},left:function(){return/left/i.test(this.settings.tip_settings.tip_location)},corners:function(el){var w=$(window),window_half=w.height()/2,tipOffset=Math.ceil(this.settings.$target.offset().top-window_half+this.settings.$next_tip.outerHeight()),right=w.width()+w.scrollLeft(),offsetBottom=w.height()+tipOffset,bottom=w.height()+w.scrollTop(),top=w.scrollTop();return top>tipOffset&&(top=0>tipOffset?0:tipOffset),offsetBottom>bottom&&(bottom=offsetBottom),[el.offset().top<top,right<el.offset().left+el.outerWidth(),bottom<el.offset().top+el.outerHeight(),w.scrollLeft()>el.offset().left]},visible:function(hidden_corners){for(var i=hidden_corners.length;i--;)if(hidden_corners[i])return!1;return!0},nub_position:function(nub,pos,def){nub.addClass("auto"===pos?def:pos)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide(),this.show(),this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(){this.settings.cookie_monster&&$.cookie(this.settings.cookie_name,"ridden",{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain}),this.settings.timer>0&&clearTimeout(this.settings.automate),this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.$next_tip.data("closed",!0),$(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip),this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip),$(".joyride-tip-guide").remove()},off:function(){$(this.scope).off(".joyride"),$(window).off(".joyride"),$(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride"),$(".joyride-tip-guide, .joyride-modal-bg").remove(),clearTimeout(this.settings.automate),this.settings={}},reflow:function(){}}}(jQuery,this,this.document),function($,window){"use strict";Foundation.libs["magellan-expedition"]={name:"magellan-expedition",version:"5.2.1",settings:{active_class:"active",threshold:0,destination_threshold:20,throttle_delay:30},init:function(scope,method,options){Foundation.inherit(this,"throttle"),this.bindings(method,options)},events:function(){var self=this,S=self.S,settings=self.settings;self.set_expedition_position(),S(self.scope).off(".magellan").on("click.fndtn.magellan","["+self.add_namespace("data-magellan-arrival")+'] a[href^="#"]',function(e){e.preventDefault();var expedition=$(this).closest("["+self.attr_name()+"]"),hash=(expedition.data("magellan-expedition-init"),this.hash.split("#").join("")),target=$("a[name="+hash+"]");0===target.length&&(target=$("#"+hash));var scroll_top=target.offset().top;"fixed"===expedition.css("position")&&(scroll_top-=expedition.outerHeight()),$("html, body").stop().animate({scrollTop:scroll_top},700,"swing",function(){window.location.hash="#"+hash})}).on("scroll.fndtn.magellan",self.throttle(this.check_for_arrivals.bind(this),settings.throttle_delay)),$(window).on("resize.fndtn.magellan",self.throttle(this.set_expedition_position.bind(this),settings.throttle_delay))},check_for_arrivals:function(){var self=this;self.update_arrivals(),self.update_expedition_positions()},set_expedition_position:function(){var self=this;$("["+this.attr_name()+"=fixed]",self.scope).each(function(){var top_offset,expedition=$(this),styles=expedition.attr("styles");expedition.attr("style",""),top_offset=expedition.offset().top,expedition.data(self.data_attr("magellan-top-offset"),top_offset),expedition.attr("style",styles)})},update_expedition_positions:function(){var self=this,window_top_offset=$(window).scrollTop();$("["+this.attr_name()+"=fixed]",self.scope).each(function(){var expedition=$(this),top_offset=expedition.data("magellan-top-offset");if(window_top_offset>=top_offset){var placeholder=expedition.prev("["+self.add_namespace("data-magellan-expedition-clone")+"]");0===placeholder.length&&(placeholder=expedition.clone(),placeholder.removeAttr(self.attr_name()),placeholder.attr(self.add_namespace("data-magellan-expedition-clone"),""),expedition.before(placeholder)),expedition.css({position:"fixed",top:0})}else expedition.prev("["+self.add_namespace("data-magellan-expedition-clone")+"]").remove(),expedition.attr("style","")})},update_arrivals:function(){var self=this,window_top_offset=$(window).scrollTop();$("["+this.attr_name()+"]",self.scope).each(function(){var expedition=$(this),settings=settings=expedition.data(self.attr_name(!0)+"-init"),offsets=self.offsets(expedition,window_top_offset),arrivals=expedition.find("["+self.add_namespace("data-magellan-arrival")+"]"),active_item=!1;offsets.each(function(idx,item){if(item.viewport_offset>=item.top_offset){var arrivals=expedition.find("["+self.add_namespace("data-magellan-arrival")+"]");return arrivals.not(item.arrival).removeClass(settings.active_class),item.arrival.addClass(settings.active_class),active_item=!0,!0}}),active_item||arrivals.removeClass(settings.active_class)})},offsets:function(expedition,window_offset){var self=this,settings=expedition.data(self.attr_name(!0)+"-init"),viewport_offset=window_offset+settings.destination_threshold;return expedition.find("["+self.add_namespace("data-magellan-arrival")+"]").map(function(){var name=$(this).data(self.data_attr("magellan-arrival")),dest=$("["+self.add_namespace("data-magellan-destination")+"="+name+"]");if(dest.length>0){var top_offset=dest.offset().top;return{destination:dest,arrival:$(this),top_offset:top_offset,viewport_offset:viewport_offset}}}).sort(function(a,b){return a.top_offset<b.top_offset?-1:a.top_offset>b.top_offset?1:0})},data_attr:function(str){return this.namespace.length>0?this.namespace+"-"+str:str},off:function(){this.S(this.scope).off(".magellan"),this.S(window).off(".magellan")},reflow:function(){var self=this;$("["+self.add_namespace("data-magellan-expedition-clone")+"]",self.scope).remove()}}}(jQuery,this,this.document),function($,window){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.2.1",settings:{},init:function(){this.events()},events:function(){var S=this.S;S(this.scope).off(".offcanvas").on("click.fndtn.offcanvas",".left-off-canvas-toggle",function(e){e.preventDefault(),S(this).closest(".off-canvas-wrap").toggleClass("move-right")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(e){e.preventDefault(),S(".off-canvas-wrap").removeClass("move-right")}).on("click.fndtn.offcanvas",".left-off-canvas-menu a",function(e){e.preventDefault();var href=$(this).attr("href");S(".off-canvas-wrap").on("transitionend webkitTransitionEnd oTransitionEnd",function(){window.location=href,S(".off-canvas-wrap").off("transitionend webkitTransitionEnd oTransitionEnd")}),S(".off-canvas-wrap").removeClass("move-right")}).on("click.fndtn.offcanvas",".right-off-canvas-toggle",function(e){e.preventDefault(),S(this).closest(".off-canvas-wrap").toggleClass("move-left")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(e){e.preventDefault(),S(".off-canvas-wrap").removeClass("move-left")}).on("click.fndtn.offcanvas",".right-off-canvas-menu a",function(e){e.preventDefault();var href=$(this).attr("href");S(".off-canvas-wrap").on("transitionend webkitTransitionEnd oTransitionEnd",function(){window.location=href,S(".off-canvas-wrap").off("transitionend webkitTransitionEnd oTransitionEnd")}),S(".off-canvas-wrap").removeClass("move-left")})},reflow:function(){}}}(jQuery,this,this.document),function($,window,document){"use strict";var noop=function(){},Orbit=function(el,settings){if(el.hasClass(settings.slides_container_class))return this;var container,number_container,bullets_container,timer_container,animate,self=this,slides_container=el,idx=0;self.cache={},self.slides=function(){return slides_container.children(settings.slide_selector)},self.slides().first().addClass(settings.active_slide_class),self.update_slide_number=function(index){settings.slide_number&&(number_container.find("span:first").text(parseInt(index)+1),number_container.find("span:last").text(self.slides().length)),settings.bullets&&(bullets_container.children().removeClass(settings.bullets_active_class),$(bullets_container.children().get(index)).addClass(settings.bullets_active_class))},self.update_active_link=function(index){var link=$('[data-orbit-link="'+self.slides().eq(index).attr("data-orbit-slide")+'"]');link.siblings().removeClass(settings.bullets_active_class),link.addClass(settings.bullets_active_class)},self.build_markup=function(){slides_container.wrap('<div class="'+settings.container_class+'"></div>'),container=slides_container.parent(),slides_container.addClass(settings.slides_container_class),settings.navigation_arrows&&(container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class)),container.append($('<a href="#"><span></span></a>').addClass(settings.next_class))),settings.timer&&(timer_container=$("<div>").addClass(settings.timer_container_class),timer_container.append("<span>"),timer_container.append($("<div>").addClass(settings.timer_progress_class)),timer_container.addClass(settings.timer_paused_class),container.append(timer_container)),settings.slide_number&&(number_container=$("<div>").addClass(settings.slide_number_class),number_container.append("<span></span> "+settings.slide_number_text+" <span></span>"),container.append(number_container)),settings.bullets&&(bullets_container=$("<ol>").addClass(settings.bullets_container_class),container.append(bullets_container),bullets_container.wrap('<div class="orbit-bullets-container"></div>'),self.slides().each(function(idx){var bullet=$("<li>").attr("data-orbit-slide",idx);bullets_container.append(bullet)})),settings.stack_on_small&&container.addClass(settings.stack_on_small_class)},self._prepare_direction=function(next_idx){var dir="next";idx>=next_idx&&(dir="prev"),"slide"===settings.animation&&setTimeout(function(){slides_container.removeClass("swipe-prev swipe-next"),"next"===dir?slides_container.addClass("swipe-next"):"prev"===dir&&slides_container.addClass("swipe-prev")},0);var slides=self.slides();if(next_idx>=slides.length){if(!settings.circular)return!1;next_idx=0}else if(0>next_idx){if(!settings.circular)return!1;next_idx=slides.length-1}var current=$(slides.get(idx)),next=$(slides.get(next_idx));return[dir,current,next,next_idx]},self._goto=function(next_idx,start_timer){if(null===next_idx)return!1;if(self.cache.animating)return!1;if(next_idx===idx)return!1;"object"==typeof self.cache.timer&&self.cache.timer.restart();var slides=self.slides();self.cache.animating=!0;var res=self._prepare_direction(next_idx),dir=res[0],current=res[1],next=res[2],next_idx=res[3];slides_container.trigger("before-slide-change.fndtn.orbit"),settings.before_slide_change(),idx=next_idx,current.css("transitionDuration",settings.animation_speed+"ms"),next.css("transitionDuration",settings.animation_speed+"ms");var callback=function(){var unlock=function(){start_timer===!0&&self.cache.timer.restart(),self.update_slide_number(idx),next.addClass(settings.active_slide_class),self.update_active_link(next_idx),slides_container.trigger("after-slide-change.fndtn.orbit",[{slide_number:idx,total_slides:slides.length}]),settings.after_slide_change(idx,slides.length),setTimeout(function(){self.cache.animating=!1},100)};slides_container.height()!=next.height()&&settings.variable_height?slides_container.animate({height:next.height()},250,"linear",unlock):unlock()};if(1===slides.length)return callback(),!1;var start_animation=function(){"next"===dir&&animate.next(current,next,callback),"prev"===dir&&animate.prev(current,next,callback)};next.height()>slides_container.height()&&settings.variable_height?slides_container.animate({height:next.height()},250,"linear",start_animation):start_animation()},self.next=function(e){e.stopImmediatePropagation(),e.preventDefault(),self._prepare_direction(idx+1),setTimeout(function(){self._goto(idx+1)},100)},self.prev=function(e){e.stopImmediatePropagation(),e.preventDefault(),self._prepare_direction(idx-1),setTimeout(function(){self._goto(idx-1)},100)},self.link_custom=function(e){e.preventDefault();var link=$(this).attr("data-orbit-link");if("string"==typeof link&&""!=(link=$.trim(link))){var slide=container.find("[data-orbit-slide="+link+"]");-1!=slide.index()&&setTimeout(function(){self._goto(slide.index())},100)}},self.link_bullet=function(){var index=$(this).attr("data-orbit-slide");if("string"==typeof index&&""!=(index=$.trim(index)))if(isNaN(parseInt(index))){var slide=container.find("[data-orbit-slide="+index+"]");-1!=slide.index()&&setTimeout(function(){self._goto(slide.index()+1)},100)}else setTimeout(function(){self._goto(parseInt(index))},100)},self.timer_callback=function(){self._goto(idx+1,!0)},self.compute_dimensions=function(){var current=$(self.slides().get(idx)),h=current.height();settings.variable_height||self.slides().each(function(){$(this).height()>h&&(h=$(this).height())}),slides_container.height(h)},self.create_timer=function(){var t=new Timer(container.find("."+settings.timer_container_class),settings,self.timer_callback);return t},self.stop_timer=function(){"object"==typeof self.cache.timer&&self.cache.timer.stop()},self.toggle_timer=function(){var t=container.find("."+settings.timer_container_class);t.hasClass(settings.timer_paused_class)?("undefined"==typeof self.cache.timer&&(self.cache.timer=self.create_timer()),self.cache.timer.start()):"object"==typeof self.cache.timer&&self.cache.timer.stop()},self.init=function(){self.build_markup(),settings.timer&&(self.cache.timer=self.create_timer(),Foundation.utils.image_loaded(this.slides().children("img"),self.cache.timer.start)),"fade"===settings.animation&&slides_container.addClass("fade"),animate=new CSSAnimation(settings,slides_container),container.on("click","."+settings.next_class,self.next),container.on("click","."+settings.prev_class,self.prev),container.on("click","[data-orbit-slide]",self.link_bullet),container.on("click",self.toggle_timer),settings.swipe&&slides_container.on("touchstart.fndtn.orbit",function(e){self.cache.animating||(e.touches||(e=e.originalEvent),self.cache.start_page_x=e.touches[0].pageX,self.cache.start_page_y=e.touches[0].pageY,self.cache.start_time=(new Date).getTime(),self.cache.delta_x=0,self.cache.is_scrolling=null,self.cache.direction=null,self.stop_timer())}).on("touchmove.fndtn.orbit",function(e){Math.abs(self.cache.delta_x)>5&&(e.preventDefault(),e.stopPropagation()),self.cache.animating||requestAnimationFrame(function(){if(e.touches||(e=e.originalEvent),!(e.touches.length>1||e.scale&&1!==e.scale||(self.cache.delta_x=e.touches[0].pageX-self.cache.start_page_x,null===self.cache.is_scrolling&&(self.cache.is_scrolling=!!(self.cache.is_scrolling||Math.abs(self.cache.delta_x)<Math.abs(e.touches[0].pageY-self.cache.start_page_y))),self.cache.is_scrolling))){var direction=self.cache.delta_x<0?idx+1:idx-1;if(self.cache.direction!==direction){var res=self._prepare_direction(direction);self.cache.direction=direction,self.cache.dir=res[0],self.cache.current=res[1],self.cache.next=res[2]
  }if("slide"===settings.animation){var offset,next_offset;offset=self.cache.delta_x/container.width()*100,next_offset=offset>=0?-(100-offset):100+offset,self.cache.current.css("transform","translate3d("+offset+"%,0,0)"),self.cache.next.css("transform","translate3d("+next_offset+"%,0,0)")}}})}).on("touchend.fndtn.orbit",function(e){self.cache.animating||(e.preventDefault(),e.stopPropagation(),setTimeout(function(){self._goto(self.cache.direction)},50))}),container.on("mouseenter.fndtn.orbit",function(){settings.timer&&settings.pause_on_hover&&self.stop_timer()}).on("mouseleave.fndtn.orbit",function(){settings.timer&&settings.resume_on_mouseout&&self.cache.timer.start()}),$(document).on("click","[data-orbit-link]",self.link_custom),$(window).on("resize",self.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),self.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),function(){container.prev(".preloader").css("display","none"),self.update_slide_number(0),self.update_active_link(0),slides_container.trigger("ready.fndtn.orbit")})},self.init()},Timer=function(el,settings,callback){var start,timeout,self=this,duration=settings.timer_speed,progress=el.find("."+settings.timer_progress_class),left=-1;this.update_progress=function(w){var new_progress=progress.clone();new_progress.attr("style",""),new_progress.css("width",w+"%"),progress.replaceWith(new_progress),progress=new_progress},this.restart=function(){clearTimeout(timeout),el.addClass(settings.timer_paused_class),left=-1,self.update_progress(0),self.start()},this.start=function(){return el.hasClass(settings.timer_paused_class)?(left=-1===left?duration:left,el.removeClass(settings.timer_paused_class),start=(new Date).getTime(),progress.animate({width:"100%"},left,"linear"),timeout=setTimeout(function(){self.restart(),callback()},left),void el.trigger("timer-started.fndtn.orbit")):!0},this.stop=function(){if(el.hasClass(settings.timer_paused_class))return!0;clearTimeout(timeout),el.addClass(settings.timer_paused_class);var end=(new Date).getTime();left-=end-start;var w=100-left/duration*100;self.update_progress(w),el.trigger("timer-stopped.fndtn.orbit")}},CSSAnimation=function(settings,container){var animation_end="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";this.next=function(current,next,callback){next.on(animation_end,function(){next.unbind(animation_end),current.removeClass("active animate-out"),next.removeClass("animate-in"),callback()}),container.children().css({transform:"",transitionDuration:""}),current.addClass("animate-out"),next.addClass("animate-in")},this.prev=function(current,prev,callback){prev.on(animation_end,function(){prev.unbind(animation_end),current.removeClass("active animate-out"),prev.removeClass("animate-in"),callback()}),current.css({transform:"",transitionDuration:""}).addClass("animate-out"),prev.css({transform:"",transitionDuration:""}).addClass("animate-in")}};Foundation.libs=Foundation.libs||{},Foundation.libs.orbit={name:"orbit",version:"5.2.1",settings:{animation:"slide",timer_speed:1e4,pause_on_hover:!0,resume_on_mouseout:!1,animation_speed:500,stack_on_small:!1,navigation_arrows:!0,slide_number:!0,slide_number_text:"of",container_class:"orbit-container",stack_on_small_class:"orbit-stack-on-small",next_class:"orbit-next",prev_class:"orbit-prev",timer_container_class:"orbit-timer",timer_paused_class:"paused",timer_progress_class:"orbit-progress",slides_container_class:"orbit-slides-container",slide_selector:"*",bullets_container_class:"orbit-bullets",bullets_active_class:"active",slide_number_class:"orbit-slide-number",caption_class:"orbit-caption",active_slide_class:"active",orbit_transition_class:"orbit-transitioning",bullets:!0,circular:!0,timer:!0,variable_height:!1,swipe:!0,before_slide_change:noop,after_slide_change:noop},init:function(scope,method,options){this.bindings(method,options)},events:function(instance){var orbit_instance=new Orbit(this.S(instance),this.S(instance).data("orbit-init"));this.S(instance).data(self.name+"-instance",orbit_instance)},reflow:function(){var self=this;if(self.S(self.scope).is("[data-orbit]")){var $el=self.S(self.scope),instance=$el.data(self.name+"-instance");instance.compute_dimensions()}else self.S("[data-orbit]",self.scope).each(function(idx,el){var $el=self.S(el),instance=(self.data_options($el),$el.data(self.name+"-instance"));instance.compute_dimensions()})}}}(jQuery,this,this.document),function($,window,document,undefined){"use strict";function getAnimationData(str){var fade=/fade/i.test(str),pop=/pop/i.test(str);return{animate:fade||pop,pop:pop,fade:fade}}Foundation.libs.reveal={name:"reveal",version:"5.2.1",locked:!1,settings:{animation:"fadeAndPop",animation_speed:250,close_on_background_click:!0,close_on_esc:!0,dismiss_modal_class:"close-reveal-modal",bg_class:"reveal-modal-bg",open:function(){},opened:function(){},close:function(){},closed:function(){},bg:$(".reveal-modal-bg"),css:{open:{opacity:0,visibility:"visible",display:"block"},close:{opacity:1,visibility:"hidden",display:"none"}}},init:function(scope,method,options){$.extend(!0,this.settings,method,options),this.bindings(method,options)},events:function(){var self=this,S=self.S;return S(this.scope).off(".reveal").on("click.fndtn.reveal","["+this.add_namespace("data-reveal-id")+"]",function(e){if(e.preventDefault(),!self.locked){var element=S(this),ajax=element.data(self.data_attr("reveal-ajax"));if(self.locked=!0,"undefined"==typeof ajax)self.open.call(self,element);else{var url=ajax===!0?element.attr("href"):ajax;self.open.call(self,element,{url:url})}}}),S(document).on("touchend.fndtn.reveal click.fndtn.reveal",this.close_targets(),function(e){if(e.preventDefault(),!self.locked){var settings=S("["+self.attr_name()+"].open").data(self.attr_name(!0)+"-init"),bg_clicked=S(e.target)[0]===S("."+settings.bg_class)[0];if(bg_clicked){if(!settings.close_on_background_click)return;e.stopPropagation()}self.locked=!0,self.close.call(self,bg_clicked?S("["+self.attr_name()+"].open"):S(this).closest("["+self.attr_name()+"]"))}}),S("["+self.attr_name()+"]",this.scope).length>0?S(this.scope).on("open.fndtn.reveal",this.settings.open).on("opened.fndtn.reveal",this.settings.opened).on("opened.fndtn.reveal",this.open_video).on("close.fndtn.reveal",this.settings.close).on("closed.fndtn.reveal",this.settings.closed).on("closed.fndtn.reveal",this.close_video):S(this.scope).on("open.fndtn.reveal","["+self.attr_name()+"]",this.settings.open).on("opened.fndtn.reveal","["+self.attr_name()+"]",this.settings.opened).on("opened.fndtn.reveal","["+self.attr_name()+"]",this.open_video).on("close.fndtn.reveal","["+self.attr_name()+"]",this.settings.close).on("closed.fndtn.reveal","["+self.attr_name()+"]",this.settings.closed).on("closed.fndtn.reveal","["+self.attr_name()+"]",this.close_video),!0},key_up_on:function(){var self=this;return self.S("body").off("keyup.fndtn.reveal").on("keyup.fndtn.reveal",function(event){var open_modal=self.S("["+self.attr_name()+"].open"),settings=open_modal.data(self.attr_name(!0)+"-init");settings&&27===event.which&&settings.close_on_esc&&!self.locked&&self.close.call(self,open_modal)}),!0},key_up_off:function(){return this.S("body").off("keyup.fndtn.reveal"),!0},open:function(target,ajax_settings){var self=this;if(target)if("undefined"!=typeof target.selector)var modal=self.S("#"+target.data(self.data_attr("reveal-id")));else{var modal=self.S(this.scope);ajax_settings=target}else var modal=self.S(this.scope);var settings=modal.data(self.attr_name(!0)+"-init");if(!modal.hasClass("open")){var open_modal=self.S("["+self.attr_name()+"].open");if("undefined"==typeof modal.data("css-top")&&modal.data("css-top",parseInt(modal.css("top"),10)).data("offset",this.cache_offset(modal)),this.key_up_on(modal),modal.trigger("open"),open_modal.length<1&&this.toggle_bg(modal),"string"==typeof ajax_settings&&(ajax_settings={url:ajax_settings}),"undefined"!=typeof ajax_settings&&ajax_settings.url){var old_success="undefined"!=typeof ajax_settings.success?ajax_settings.success:null;$.extend(ajax_settings,{success:function(data,textStatus,jqXHR){$.isFunction(old_success)&&old_success(data,textStatus,jqXHR),modal.html(data),self.S(modal).foundation("section","reflow"),open_modal.length>0&&self.hide(open_modal,settings.css.close),self.show(modal,settings.css.open)}}),$.ajax(ajax_settings)}else open_modal.length>0&&this.hide(open_modal,settings.css.close),this.show(modal,settings.css.open)}},close:function(modal){var modal=modal&&modal.length?modal:this.S(this.scope),open_modals=this.S("["+this.attr_name()+"].open"),settings=modal.data(this.attr_name(!0)+"-init");open_modals.length>0&&(this.locked=!0,this.key_up_off(modal),modal.trigger("close"),this.toggle_bg(modal),this.hide(open_modals,settings.css.close,settings))},close_targets:function(){var base="."+this.settings.dismiss_modal_class;return this.settings.close_on_background_click?base+", ."+this.settings.bg_class:base},toggle_bg:function(modal){modal.data(this.attr_name(!0));0===this.S("."+this.settings.bg_class).length&&(this.settings.bg=$("<div />",{"class":this.settings.bg_class}).appendTo("body").hide()),this.settings.bg.filter(":visible").length>0?this.hide(this.settings.bg):this.show(this.settings.bg)},show:function(el,css){if(css){var settings=el.data(this.attr_name(!0)+"-init");if(0===el.parent("body").length){var placeholder=el.wrap('<div style="display: none;" />').parent(),rootElement=this.settings.rootElement||"body";el.on("closed.fndtn.reveal.wrapped",function(){el.detach().appendTo(placeholder),el.unwrap().unbind("closed.fndtn.reveal.wrapped")}),el.detach().appendTo(rootElement)}var animData=getAnimationData(settings.animation);if(animData.animate||(this.locked=!1),animData.pop){css.top=$(window).scrollTop()-el.data("offset")+"px";var end_css={top:$(window).scrollTop()+el.data("css-top")+"px",opacity:1};return setTimeout(function(){return el.css(css).animate(end_css,settings.animation_speed,"linear",function(){this.locked=!1,el.trigger("opened")}.bind(this)).addClass("open")}.bind(this),settings.animation_speed/2)}if(animData.fade){css.top=$(window).scrollTop()+el.data("css-top")+"px";var end_css={opacity:1};return setTimeout(function(){return el.css(css).animate(end_css,settings.animation_speed,"linear",function(){this.locked=!1,el.trigger("opened")}.bind(this)).addClass("open")}.bind(this),settings.animation_speed/2)}return el.css(css).show().css({opacity:1}).addClass("open").trigger("opened")}var settings=this.settings;return getAnimationData(settings.animation).fade?el.fadeIn(settings.animation_speed/2):(this.locked=!1,el.show())},hide:function(el,css){if(css){var settings=el.data(this.attr_name(!0)+"-init"),animData=getAnimationData(settings.animation);if(animData.animate||(this.locked=!1),animData.pop){var end_css={top:-$(window).scrollTop()-el.data("offset")+"px",opacity:0};return setTimeout(function(){return el.animate(end_css,settings.animation_speed,"linear",function(){this.locked=!1,el.css(css).trigger("closed")}.bind(this)).removeClass("open")}.bind(this),settings.animation_speed/2)}if(animData.fade){var end_css={opacity:0};return setTimeout(function(){return el.animate(end_css,settings.animation_speed,"linear",function(){this.locked=!1,el.css(css).trigger("closed")}.bind(this)).removeClass("open")}.bind(this),settings.animation_speed/2)}return el.hide().css(css).removeClass("open").trigger("closed")}var settings=this.settings;return getAnimationData(settings.animation).fade?el.fadeOut(settings.animation_speed/2):el.hide()},close_video:function(e){var video=$(".flex-video",e.target),iframe=$("iframe",video);iframe.length>0&&(iframe.attr("data-src",iframe[0].src),iframe.attr("src","about:blank"),video.hide())},open_video:function(e){var video=$(".flex-video",e.target),iframe=video.find("iframe");if(iframe.length>0){var data_src=iframe.attr("data-src");if("string"==typeof data_src)iframe[0].src=iframe.attr("data-src");else{var src=iframe[0].src;iframe[0].src=undefined,iframe[0].src=src}video.show()}},data_attr:function(str){return this.namespace.length>0?this.namespace+"-"+str:str},cache_offset:function(modal){var offset=modal.show().height()+parseInt(modal.css("top"),10);return modal.hide(),offset},off:function(){$(this.scope).off(".fndtn.reveal")},reflow:function(){}}}(jQuery,this,this.document),function($,window,document,undefined){"use strict";Foundation.libs.tab={name:"tab",version:"5.2.1",settings:{active_class:"active",callback:function(){},deep_linking:!1,scroll_to_content:!0},default_tab_hashes:[],init:function(scope,method,options){var self=this,S=this.S;this.bindings(method,options),this.handle_location_hash_change(),S("["+this.attr_name()+"] > dd.active > a",this.scope).each(function(){self.default_tab_hashes.push(this.hash)})},events:function(){var self=this,S=this.S;S(this.scope).off(".tab").on("click.fndtn.tab","["+this.attr_name()+"] > dd > a",function(e){e.preventDefault(),e.stopPropagation(),self.toggle_active_tab(S(this).parent())}),S(window).on("hashchange.fndtn.tab",function(e){e.preventDefault(),self.handle_location_hash_change()})},handle_location_hash_change:function(){var self=this,S=this.S;S("["+this.attr_name()+"]",this.scope).each(function(){var settings=S(this).data(self.attr_name(!0)+"-init");if(settings.deep_linking){var hash=self.scope.location.hash;if(""!=hash){var hash_element=S(hash);if(hash_element.hasClass("content")&&hash_element.parent().hasClass("tab-content"))self.toggle_active_tab($("["+self.attr_name()+"] > dd > a[href="+hash+"]").parent());else{var hash_tab_container_id=hash_element.closest(".content").attr("id");hash_tab_container_id!=undefined&&self.toggle_active_tab($("["+self.attr_name()+"] > dd > a[href=#"+hash_tab_container_id+"]").parent(),hash)}}else for(var ind in self.default_tab_hashes)self.toggle_active_tab($("["+self.attr_name()+"] > dd > a[href="+self.default_tab_hashes[ind]+"]").parent())}})},toggle_active_tab:function(tab,location_hash){var S=this.S,tabs=tab.closest("["+this.attr_name()+"]"),anchor=tab.children("a").first(),target_hash="#"+anchor.attr("href").split("#")[1],target=S(target_hash),siblings=tab.siblings(),settings=tabs.data(this.attr_name(!0)+"-init");if(S(this).data(this.data_attr("tab-content"))&&(target_hash="#"+S(this).data(this.data_attr("tab-content")).split("#")[1],target=S(target_hash)),settings.deep_linking){var cur_ypos=$("body,html").scrollTop();window.location.hash=location_hash!=undefined?location_hash:target_hash,settings.scroll_to_content?location_hash==undefined||location_hash==target_hash?tab.parent()[0].scrollIntoView():S(target_hash)[0].scrollIntoView():(location_hash==undefined||location_hash==target_hash)&&$("body,html").scrollTop(cur_ypos)}tab.addClass(settings.active_class).triggerHandler("opened"),siblings.removeClass(settings.active_class),target.siblings().removeClass(settings.active_class).end().addClass(settings.active_class),settings.callback(tab),target.triggerHandler("toggled",[tab]),tabs.triggerHandler("toggled",[target])},data_attr:function(str){return this.namespace.length>0?this.namespace+"-"+str:str},off:function(){},reflow:function(){}}}(jQuery,this,this.document),function($,window){"use strict";Foundation.libs.tooltip={name:"tooltip",version:"5.2.1",settings:{additional_inheritable_classes:[],tooltip_class:".tooltip",append_to:"body",touch_close_text:"Tap To Close",disable_for_touch:!1,hover_delay:200,tip_template:function(selector,content){return'<span data-selector="'+selector+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'">'+content+'<span class="nub"></span></span>'}},cache:{},init:function(scope,method,options){Foundation.inherit(this,"random_str"),this.bindings(method,options)},events:function(instance){var self=this,S=self.S;self.create(this.S(instance)),$(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]:not(a)",function(e){var $this=S(this),settings=$.extend({},self.settings,self.data_options($this)),is_touch=!1;if(/mouse/i.test(e.type)&&self.ie_touch(e))return!1;if($this.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)&&e.preventDefault(),self.hide($this);else{if(settings.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type))return;!settings.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)&&(e.preventDefault(),S(settings.tooltip_class+".open").hide(),is_touch=!0),/enter|over/i.test(e.type)?this.timer=setTimeout(function(){self.showTip($this)}.bind(this),self.settings.hover_delay):"mouseout"===e.type||"mouseleave"===e.type?(clearTimeout(this.timer),self.hide($this)):self.showTip($this)}}).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",function(e){return/mouse/i.test(e.type)&&self.ie_touch(e)?!1:void(("touch"!=$(this).data("tooltip-open-event-type")||"mouseleave"!=e.type)&&("mouse"==$(this).data("tooltip-open-event-type")&&/MSPointerDown|touchstart/i.test(e.type)?self.convert_to_touch($(this)):self.hide($(this))))}).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",function(){self.hide(S(this))})},ie_touch:function(){return!1},showTip:function($target){this.getTip($target);return this.show($target)},getTip:function($target){var selector=this.selector($target),settings=$.extend({},this.settings,this.data_options($target)),tip=null;return selector&&(tip=this.S('span[data-selector="'+selector+'"]'+settings.tooltip_class)),"object"==typeof tip?tip:!1},selector:function($target){var id=$target.attr("id"),dataSelector=$target.attr(this.attr_name())||$target.attr("data-selector");return(id&&id.length<1||!id)&&"string"!=typeof dataSelector&&(dataSelector=this.random_str(6),$target.attr("data-selector",dataSelector)),id&&id.length>0?id:dataSelector},create:function($target){var self=this,settings=$.extend({},this.settings,this.data_options($target)),tip_template=this.settings.tip_template;"string"==typeof settings.tip_template&&window.hasOwnProperty(settings.tip_template)&&(tip_template=window[settings.tip_template]);var $tip=$(tip_template(this.selector($target),$("<div></div>").html($target.attr("title")).html())),classes=this.inheritable_classes($target);$tip.addClass(classes).appendTo(settings.append_to),Modernizr.touch&&($tip.append('<span class="tap-to-close">'+settings.touch_close_text+"</span>"),$tip.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip",function(){self.hide($target)})),$target.removeAttr("title").attr("title","")},reposition:function(target,tip,classes){var width,nub,nubHeight,nubWidth,objPos;if(tip.css("visibility","hidden").show(),width=target.data("width"),nub=tip.children(".nub"),nubHeight=nub.outerHeight(),nubWidth=nub.outerHeight(),tip.css(this.small()?{width:"100%"}:{width:width?width:"auto"}),objPos=function(obj,top,right,bottom,left){return obj.css({top:top?top:"auto",bottom:bottom?bottom:"auto",left:left?left:"auto",right:right?right:"auto"}).end()},objPos(tip,target.offset().top+target.outerHeight()+10,"auto","auto",target.offset().left),this.small())objPos(tip,target.offset().top+target.outerHeight()+10,"auto","auto",12.5,$(this.scope).width()),tip.addClass("tip-override"),objPos(nub,-nubHeight,"auto","auto",target.offset().left);else{var left=target.offset().left;Foundation.rtl&&(nub.addClass("rtl"),left=target.offset().left+target.outerWidth()-tip.outerWidth()),objPos(tip,target.offset().top+target.outerHeight()+10,"auto","auto",left),tip.removeClass("tip-override"),classes&&classes.indexOf("tip-top")>-1?(Foundation.rtl&&nub.addClass("rtl"),objPos(tip,target.offset().top-tip.outerHeight(),"auto","auto",left).removeClass("tip-override")):classes&&classes.indexOf("tip-left")>-1?(objPos(tip,target.offset().top+target.outerHeight()/2-tip.outerHeight()/2,"auto","auto",target.offset().left-tip.outerWidth()-nubHeight).removeClass("tip-override"),nub.removeClass("rtl")):classes&&classes.indexOf("tip-right")>-1&&(objPos(tip,target.offset().top+target.outerHeight()/2-tip.outerHeight()/2,"auto","auto",target.offset().left+target.outerWidth()+nubHeight).removeClass("tip-override"),nub.removeClass("rtl"))}tip.css("visibility","visible").hide()},small:function(){return matchMedia(Foundation.media_queries.small).matches},inheritable_classes:function($target){var settings=$.extend({},this.settings,this.data_options($target)),inheritables=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(settings.additional_inheritable_classes),classes=$target.attr("class"),filtered=classes?$.map(classes.split(" "),function(el){return-1!==$.inArray(el,inheritables)?el:void 0}).join(" "):"";return $.trim(filtered)},convert_to_touch:function($target){var self=this,$tip=self.getTip($target),settings=$.extend({},self.settings,self.data_options($target));0===$tip.find(".tap-to-close").length&&($tip.append('<span class="tap-to-close">'+settings.touch_close_text+"</span>"),$tip.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose",function(){self.hide($target)})),$target.data("tooltip-open-event-type","touch")},show:function($target){var $tip=this.getTip($target);"touch"==$target.data("tooltip-open-event-type")&&this.convert_to_touch($target),this.reposition($target,$tip,$target.attr("class")),$target.addClass("open"),$tip.fadeIn(150)},hide:function($target){var $tip=this.getTip($target);$tip.fadeOut(150,function(){$tip.find(".tap-to-close").remove(),$tip.off("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"),$target.removeClass("open")})},off:function(){var self=this;this.S(this.scope).off(".fndtn.tooltip"),this.S(this.settings.tooltip_class).each(function(i){$("["+self.attr_name()+"]").get(i).attr("title",$(this).text())}).remove()},reflow:function(){}}}(jQuery,this,this.document),function($,window,document){"use strict";Foundation.libs.topbar={name:"topbar",version:"5.2.1",settings:{index:0,sticky_class:"sticky",custom_back_text:!0,back_text:"Back",is_hover:!0,mobile_show_parent_link:!1,scrolltop:!0,sticky_on:"all"},init:function(section,method,options){Foundation.inherit(this,"add_custom_rule register_media throttle");var self=this;self.register_media("topbar","foundation-mq-topbar"),this.bindings(method,options),self.S("["+this.attr_name()+"]",this.scope).each(function(){{var topbar=$(this),settings=topbar.data(self.attr_name(!0)+"-init");self.S("section",this),topbar.children().filter("ul").first()}topbar.data("index",0);var topbarContainer=topbar.parent();topbarContainer.hasClass("fixed")||self.is_sticky(topbar,topbarContainer,settings)?(self.settings.sticky_class=settings.sticky_class,self.settings.sticky_topbar=topbar,topbar.data("height",topbarContainer.outerHeight()),topbar.data("stickyoffset",topbarContainer.offset().top)):topbar.data("height",topbar.outerHeight()),settings.assembled||self.assemble(topbar),settings.is_hover?self.S(".has-dropdown",topbar).addClass("not-click"):self.S(".has-dropdown",topbar).removeClass("not-click"),self.add_custom_rule(".f-topbar-fixed { padding-top: "+topbar.data("height")+"px }"),topbarContainer.hasClass("fixed")&&self.S("body").addClass("f-topbar-fixed")})},is_sticky:function(topbar,topbarContainer,settings){var sticky=topbarContainer.hasClass(settings.sticky_class);return sticky&&"all"===settings.sticky_on?!0:sticky&&this.small()&&"small"===settings.sticky_on?!0:sticky&&this.medium()&&"medium"===settings.sticky_on?!0:sticky&&this.large()&&"large"===settings.sticky_on?!0:!1},toggle:function(toggleEl){var self=this;if(toggleEl)var topbar=self.S(toggleEl).closest("["+this.attr_name()+"]");else var topbar=self.S("["+this.attr_name()+"]");var settings=topbar.data(this.attr_name(!0)+"-init"),section=self.S("section, .section",topbar);self.breakpoint()&&(self.rtl?(section.css({right:"0%"}),$(">.name",section).css({right:"100%"})):(section.css({left:"0%"}),$(">.name",section).css({left:"100%"})),self.S("li.moved",section).removeClass("moved"),topbar.data("index",0),topbar.toggleClass("expanded").css("height","")),settings.scrolltop?topbar.hasClass("expanded")?topbar.parent().hasClass("fixed")&&(settings.scrolltop?(topbar.parent().removeClass("fixed"),topbar.addClass("fixed"),self.S("body").removeClass("f-topbar-fixed"),window.scrollTo(0,0)):topbar.parent().removeClass("expanded")):topbar.hasClass("fixed")&&(topbar.parent().addClass("fixed"),topbar.removeClass("fixed"),self.S("body").addClass("f-topbar-fixed")):(self.is_sticky(topbar,topbar.parent(),settings)&&topbar.parent().addClass("fixed"),topbar.parent().hasClass("fixed")&&(topbar.hasClass("expanded")?(topbar.addClass("fixed"),topbar.parent().addClass("expanded"),self.S("body").addClass("f-topbar-fixed")):(topbar.removeClass("fixed"),topbar.parent().removeClass("expanded"),self.update_sticky_positioning())))},timer:null,events:function(){var self=this,S=this.S;S(this.scope).off(".topbar").on("click.fndtn.topbar","["+this.attr_name()+"] .toggle-topbar",function(e){e.preventDefault(),self.toggle(this)}).on("click.fndtn.topbar",'.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(){var li=$(this).closest("li");!self.breakpoint()||li.hasClass("back")||li.hasClass("has-dropdown")||self.toggle()}).on("click.fndtn.topbar","["+this.attr_name()+"] li.has-dropdown",function(e){var li=S(this),target=S(e.target),topbar=li.closest("["+self.attr_name()+"]"),settings=topbar.data(self.attr_name(!0)+"-init");return target.data("revealId")?void self.toggle():void(self.breakpoint()||(!settings.is_hover||Modernizr.touch)&&(e.stopImmediatePropagation(),li.hasClass("hover")?(li.removeClass("hover").find("li").removeClass("hover"),li.parents("li.hover").removeClass("hover")):(li.addClass("hover"),"A"===target[0].nodeName&&target.parent().hasClass("has-dropdown")&&e.preventDefault())))}).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",function(e){if(self.breakpoint()){e.preventDefault();var $this=S(this),topbar=$this.closest("["+self.attr_name()+"]"),section=topbar.find("section, .section"),$selectedLi=($this.next(".dropdown").outerHeight(),$this.closest("li"));topbar.data("index",topbar.data("index")+1),$selectedLi.addClass("moved"),self.rtl?(section.css({right:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({right:100*topbar.data("index")+"%"})):(section.css({left:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({left:100*topbar.data("index")+"%"})),topbar.css("height",$this.siblings("ul").outerHeight(!0)+topbar.data("height"))}}),S(window).off(".topbar").on("resize.fndtn.topbar",self.throttle(function(){self.resize.call(self)},50)).trigger("resize"),S("body").off(".topbar").on("click.fndtn.topbar touchstart.fndtn.topbar",function(e){var parent=S(e.target).closest("li").closest("li.hover");parent.length>0||S("["+self.attr_name()+"] li").removeClass("hover")}),S(this.scope).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown .back",function(e){e.preventDefault();var $this=S(this),topbar=$this.closest("["+self.attr_name()+"]"),section=topbar.find("section, .section"),$movedLi=(topbar.data(self.attr_name(!0)+"-init"),$this.closest("li.moved")),$previousLevelUl=$movedLi.parent();topbar.data("index",topbar.data("index")-1),self.rtl?(section.css({right:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({right:100*topbar.data("index")+"%"})):(section.css({left:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({left:100*topbar.data("index")+"%"})),0===topbar.data("index")?topbar.css("height",""):topbar.css("height",$previousLevelUl.outerHeight(!0)+topbar.data("height")),setTimeout(function(){$movedLi.removeClass("moved")},300)})},resize:function(){var self=this;self.S("["+this.attr_name()+"]").each(function(){var stickyOffset,topbar=self.S(this),settings=topbar.data(self.attr_name(!0)+"-init"),stickyContainer=topbar.parent("."+self.settings.sticky_class);if(!self.breakpoint()){var doToggle=topbar.hasClass("expanded");topbar.css("height","").removeClass("expanded").find("li").removeClass("hover"),doToggle&&self.toggle(topbar)}self.is_sticky(topbar,stickyContainer,settings)&&(stickyContainer.hasClass("fixed")?(stickyContainer.removeClass("fixed"),stickyOffset=stickyContainer.offset().top,self.S(document.body).hasClass("f-topbar-fixed")&&(stickyOffset-=topbar.data("height")),topbar.data("stickyoffset",stickyOffset),stickyContainer.addClass("fixed")):(stickyOffset=stickyContainer.offset().top,topbar.data("stickyoffset",stickyOffset)))})},breakpoint:function(){return!matchMedia(Foundation.media_queries.topbar).matches},small:function(){return matchMedia(Foundation.media_queries.small).matches},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},assemble:function(topbar){{var self=this,settings=topbar.data(this.attr_name(!0)+"-init"),section=self.S("section",topbar);$(this).children().filter("ul").first()}section.detach(),self.S(".has-dropdown>a",section).each(function(){var $link=self.S(this),$dropdown=$link.siblings(".dropdown"),url=$link.attr("href");if(!$dropdown.find(".title.back").length){if(settings.mobile_show_parent_link&&url&&url.length>1)var $titleLi=$('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li><a class="parent-link js-generated" href="'+url+'">'+$link.text()+"</a></li>");else var $titleLi=$('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li>');$("h5>a",$titleLi).html(1==settings.custom_back_text?settings.back_text:"&laquo; "+$link.html()),$dropdown.prepend($titleLi)}}),section.appendTo(topbar),this.sticky(),this.assembled(topbar)},assembled:function(topbar){topbar.data(this.attr_name(!0),$.extend({},topbar.data(this.attr_name(!0)),{assembled:!0}))},height:function(ul){var total=0,self=this;return $("> li",ul).each(function(){total+=self.S(this).outerHeight(!0)}),total},sticky:function(){var self=(this.S(window),this);this.S(window).on("scroll",function(){self.update_sticky_positioning()})},update_sticky_positioning:function(){var klass="."+this.settings.sticky_class,$window=this.S(window),self=this;if(self.settings.sticky_topbar&&self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var distance=this.settings.sticky_topbar.data("stickyoffset");self.S(klass).hasClass("expanded")||($window.scrollTop()>distance?self.S(klass).hasClass("fixed")||(self.S(klass).addClass("fixed"),self.S("body").addClass("f-topbar-fixed")):$window.scrollTop()<=distance&&self.S(klass).hasClass("fixed")&&(self.S(klass).removeClass("fixed"),self.S("body").removeClass("f-topbar-fixed")))}},off:function(){this.S(this.scope).off(".fndtn.topbar"),this.S(window).off(".fndtn.topbar")},reflow:function(){}}}(jQuery,this,this.document),function($,window){"use strict";Foundation.libs.equalizer={name:"equalizer",version:"5.2.1",settings:{use_tallest:!0,before_height_change:$.noop,after_height_change:$.noop},init:function(scope,method,options){this.bindings(method,options),this.reflow()},events:function(){this.S(window).off(".equalizer").on("resize.fndtn.equalizer",function(){this.reflow()}.bind(this))},equalize:function(equalizer){var isStacked=!1,vals=equalizer.find("["+this.attr_name()+"-watch]"),firstTopOffset=vals.first().offset().top,settings=equalizer.data(this.attr_name(!0)+"-init");if(0!==vals.length&&(settings.before_height_change(),equalizer.trigger("before-height-change"),vals.height("inherit"),vals.each(function(){var el=$(this);el.offset().top!==firstTopOffset&&(isStacked=!0)}),!isStacked)){var heights=vals.map(function(){return $(this).outerHeight()}).get();if(settings.use_tallest){var max=Math.max.apply(null,heights);vals.css("height",max)}else{var min=Math.min.apply(null,heights);vals.css("height",min)}settings.after_height_change(),equalizer.trigger("after-height-change")}},reflow:function(){var self=this;this.S("["+this.attr_name()+"]",this.scope).each(function(){self.equalize($(this))})}}}(jQuery,this,this.document),function(window,document,undefined){"use strict";function minErr(module){return function(){var message,i,code=arguments[0],prefix="["+(module?module+":":"")+code+"] ",template=arguments[1],templateArgs=arguments,stringify=function(obj){return"function"==typeof obj?obj.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof obj?"undefined":"string"!=typeof obj?JSON.stringify(obj):obj};for(message=prefix+template.replace(/\{\d+\}/g,function(match){var arg,index=+match.slice(1,-1);return index+2<templateArgs.length?(arg=templateArgs[index+2],"function"==typeof arg?arg.toString().replace(/ ?\{[\s\S]*$/,""):"undefined"==typeof arg?"undefined":"string"!=typeof arg?toJson(arg):arg):match
  }),message=message+"\nhttp://errors.angularjs.org/1.2.15/"+(module?module+"/":"")+code,i=2;i<arguments.length;i++)message=message+(2==i?"?":"&")+"p"+(i-2)+"="+encodeURIComponent(stringify(arguments[i]));return new Error(message)}}function isArrayLike(obj){if(null==obj||isWindow(obj))return!1;var length=obj.length;return 1===obj.nodeType&&length?!0:isString(obj)||isArray(obj)||0===length||"number"==typeof length&&length>0&&length-1 in obj}function forEach(obj,iterator,context){var key;if(obj)if(isFunction(obj))for(key in obj)"prototype"==key||"length"==key||"name"==key||obj.hasOwnProperty&&!obj.hasOwnProperty(key)||iterator.call(context,obj[key],key);else if(obj.forEach&&obj.forEach!==forEach)obj.forEach(iterator,context);else if(isArrayLike(obj))for(key=0;key<obj.length;key++)iterator.call(context,obj[key],key);else for(key in obj)obj.hasOwnProperty(key)&&iterator.call(context,obj[key],key);return obj}function sortedKeys(obj){var keys=[];for(var key in obj)obj.hasOwnProperty(key)&&keys.push(key);return keys.sort()}function forEachSorted(obj,iterator,context){for(var keys=sortedKeys(obj),i=0;i<keys.length;i++)iterator.call(context,obj[keys[i]],keys[i]);return keys}function reverseParams(iteratorFn){return function(value,key){iteratorFn(key,value)}}function nextUid(){for(var digit,index=uid.length;index;){if(index--,digit=uid[index].charCodeAt(0),57==digit)return uid[index]="A",uid.join("");if(90!=digit)return uid[index]=String.fromCharCode(digit+1),uid.join("");uid[index]="0"}return uid.unshift("0"),uid.join("")}function setHashKey(obj,h){h?obj.$$hashKey=h:delete obj.$$hashKey}function extend(dst){var h=dst.$$hashKey;return forEach(arguments,function(obj){obj!==dst&&forEach(obj,function(value,key){dst[key]=value})}),setHashKey(dst,h),dst}function int(str){return parseInt(str,10)}function inherit(parent,extra){return extend(new(extend(function(){},{prototype:parent})),extra)}function noop(){}function identity($){return $}function valueFn(value){return function(){return value}}function isUndefined(value){return"undefined"==typeof value}function isDefined(value){return"undefined"!=typeof value}function isObject(value){return null!=value&&"object"==typeof value}function isString(value){return"string"==typeof value}function isNumber(value){return"number"==typeof value}function isDate(value){return"[object Date]"===toString.call(value)}function isArray(value){return"[object Array]"===toString.call(value)}function isFunction(value){return"function"==typeof value}function isRegExp(value){return"[object RegExp]"===toString.call(value)}function isWindow(obj){return obj&&obj.document&&obj.location&&obj.alert&&obj.setInterval}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch}function isFile(obj){return"[object File]"===toString.call(obj)}function isBlob(obj){return"[object Blob]"===toString.call(obj)}function isElement(node){return!(!node||!(node.nodeName||node.prop&&node.attr&&node.find))}function map(obj,iterator,context){var results=[];return forEach(obj,function(value,index,list){results.push(iterator.call(context,value,index,list))}),results}function includes(array,obj){return-1!=indexOf(array,obj)}function indexOf(array,obj){if(array.indexOf)return array.indexOf(obj);for(var i=0;i<array.length;i++)if(obj===array[i])return i;return-1}function arrayRemove(array,value){var index=indexOf(array,value);return index>=0&&array.splice(index,1),value}function copy(source,destination){if(isWindow(source)||isScope(source))throw ngMinErr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(destination){if(source===destination)throw ngMinErr("cpi","Can't copy! Source and destination are identical.");if(isArray(source)){destination.length=0;for(var i=0;i<source.length;i++)destination.push(copy(source[i]))}else{var h=destination.$$hashKey;forEach(destination,function(value,key){delete destination[key]});for(var key in source)destination[key]=copy(source[key]);setHashKey(destination,h)}}else destination=source,source&&(isArray(source)?destination=copy(source,[]):isDate(source)?destination=new Date(source.getTime()):isRegExp(source)?destination=new RegExp(source.source):isObject(source)&&(destination=copy(source,{})));return destination}function shallowCopy(src,dst){dst=dst||{};for(var key in src)!src.hasOwnProperty(key)||"$"===key.charAt(0)&&"$"===key.charAt(1)||(dst[key]=src[key]);return dst}function equals(o1,o2){if(o1===o2)return!0;if(null===o1||null===o2)return!1;if(o1!==o1&&o2!==o2)return!0;var length,key,keySet,t1=typeof o1,t2=typeof o2;if(t1==t2&&"object"==t1){if(!isArray(o1)){if(isDate(o1))return isDate(o2)&&o1.getTime()==o2.getTime();if(isRegExp(o1)&&isRegExp(o2))return o1.toString()==o2.toString();if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(o2)||isArray(o2))return!1;keySet={};for(key in o1)if("$"!==key.charAt(0)&&!isFunction(o1[key])){if(!equals(o1[key],o2[key]))return!1;keySet[key]=!0}for(key in o2)if(!keySet.hasOwnProperty(key)&&"$"!==key.charAt(0)&&o2[key]!==undefined&&!isFunction(o2[key]))return!1;return!0}if(!isArray(o2))return!1;if((length=o1.length)==o2.length){for(key=0;length>key;key++)if(!equals(o1[key],o2[key]))return!1;return!0}}return!1}function csp(){return document.securityPolicy&&document.securityPolicy.isActive||document.querySelector&&!(!document.querySelector("[ng-csp]")&&!document.querySelector("[data-ng-csp]"))}function concat(array1,array2,index){return array1.concat(slice.call(array2,index))}function sliceArgs(args,startIndex){return slice.call(args,startIndex||0)}function bind(self,fn){var curryArgs=arguments.length>2?sliceArgs(arguments,2):[];return!isFunction(fn)||fn instanceof RegExp?fn:curryArgs.length?function(){return arguments.length?fn.apply(self,curryArgs.concat(slice.call(arguments,0))):fn.apply(self,curryArgs)}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self)}}function toJsonReplacer(key,value){var val=value;return"string"==typeof key&&"$"===key.charAt(0)?val=undefined:isWindow(value)?val="$WINDOW":value&&document===value?val="$DOCUMENT":isScope(value)&&(val="$SCOPE"),val}function toJson(obj,pretty){return"undefined"==typeof obj?undefined:JSON.stringify(obj,toJsonReplacer,pretty?"  ":null)}function fromJson(json){return isString(json)?JSON.parse(json):json}function toBoolean(value){if("function"==typeof value)value=!0;else if(value&&0!==value.length){var v=lowercase(""+value);value=!("f"==v||"0"==v||"false"==v||"no"==v||"n"==v||"[]"==v)}else value=!1;return value}function startingTag(element){element=jqLite(element).clone();try{element.empty()}catch(e){}var TEXT_NODE=3,elemHtml=jqLite("<div>").append(element).html();try{return element[0].nodeType===TEXT_NODE?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,nodeName){return"<"+lowercase(nodeName)})}catch(e){return lowercase(elemHtml)}}function tryDecodeURIComponent(value){try{return decodeURIComponent(value)}catch(e){}}function parseKeyValue(keyValue){var key_value,key,obj={};return forEach((keyValue||"").split("&"),function(keyValue){if(keyValue&&(key_value=keyValue.split("="),key=tryDecodeURIComponent(key_value[0]),isDefined(key))){var val=isDefined(key_value[1])?tryDecodeURIComponent(key_value[1]):!0;obj[key]?isArray(obj[key])?obj[key].push(val):obj[key]=[obj[key],val]:obj[key]=val}}),obj}function toKeyValue(obj){var parts=[];return forEach(obj,function(value,key){isArray(value)?forEach(value,function(arrayValue){parts.push(encodeUriQuery(key,!0)+(arrayValue===!0?"":"="+encodeUriQuery(arrayValue,!0)))}):parts.push(encodeUriQuery(key,!0)+(value===!0?"":"="+encodeUriQuery(value,!0)))}),parts.length?parts.join("&"):""}function encodeUriSegment(val){return encodeUriQuery(val,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,pctEncodeSpaces?"%20":"+")}function angularInit(element,bootstrap){function append(element){element&&elements.push(element)}var appElement,module,elements=[element],names=["ng:app","ng-app","x-ng-app","data-ng-app"],NG_APP_CLASS_REGEXP=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;forEach(names,function(name){names[name]=!0,append(document.getElementById(name)),name=name.replace(":","\\:"),element.querySelectorAll&&(forEach(element.querySelectorAll("."+name),append),forEach(element.querySelectorAll("."+name+"\\:"),append),forEach(element.querySelectorAll("["+name+"]"),append))}),forEach(elements,function(element){if(!appElement){var className=" "+element.className+" ",match=NG_APP_CLASS_REGEXP.exec(className);match?(appElement=element,module=(match[2]||"").replace(/\s+/g,",")):forEach(element.attributes,function(attr){!appElement&&names[attr.name]&&(appElement=element,module=attr.value)})}}),appElement&&bootstrap(appElement,module?[module]:[])}function bootstrap(element,modules){var doBootstrap=function(){if(element=jqLite(element),element.injector()){var tag=element[0]===document?"document":startingTag(element);throw ngMinErr("btstrpd","App Already Bootstrapped with this Element '{0}'",tag)}modules=modules||[],modules.unshift(["$provide",function($provide){$provide.value("$rootElement",element)}]),modules.unshift("ng");var injector=createInjector(modules);return injector.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(scope,element,compile,injector){scope.$apply(function(){element.data("$injector",injector),compile(element)(scope)})}]),injector},NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;return window&&!NG_DEFER_BOOTSTRAP.test(window.name)?doBootstrap():(window.name=window.name.replace(NG_DEFER_BOOTSTRAP,""),void(angular.resumeBootstrap=function(extraModules){forEach(extraModules,function(module){modules.push(module)}),doBootstrap()}))}function snake_case(name,separator){return separator=separator||"_",name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}function bindJQuery(){jQuery=window.jQuery,jQuery?(jqLite=jQuery,extend(jQuery.fn,{scope:JQLitePrototype.scope,isolateScope:JQLitePrototype.isolateScope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData}),jqLitePatchJQueryRemove("remove",!0,!0,!1),jqLitePatchJQueryRemove("empty",!1,!1,!1),jqLitePatchJQueryRemove("html",!1,!1,!0)):jqLite=JQLite,angular.element=jqLite}function assertArg(arg,name,reason){if(!arg)throw ngMinErr("areq","Argument '{0}' is {1}",name||"?",reason||"required");return arg}function assertArgFn(arg,name,acceptArrayAnnotation){return acceptArrayAnnotation&&isArray(arg)&&(arg=arg[arg.length-1]),assertArg(isFunction(arg),name,"not a function, got "+(arg&&"object"==typeof arg?arg.constructor.name||"Object":typeof arg)),arg}function assertNotHasOwnProperty(name,context){if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)}function getter(obj,path,bindFnToScope){if(!path)return obj;for(var key,keys=path.split("."),lastInstance=obj,len=keys.length,i=0;len>i;i++)key=keys[i],obj&&(obj=(lastInstance=obj)[key]);return!bindFnToScope&&isFunction(obj)?bind(lastInstance,obj):obj}function getBlockElements(nodes){var startNode=nodes[0],endNode=nodes[nodes.length-1];if(startNode===endNode)return jqLite(startNode);var element=startNode,elements=[element];do{if(element=element.nextSibling,!element)break;elements.push(element)}while(element!==endNode);return jqLite(elements)}function setupModuleLoader(window){function ensure(obj,name,factory){return obj[name]||(obj[name]=factory())}var $injectorMinErr=minErr("$injector"),ngMinErr=minErr("ng"),angular=ensure(window,"angular",Object);return angular.$$minErr=angular.$$minErr||minErr,ensure(angular,"module",function(){var modules={};return function(name,requires,configFn){var assertNotHasOwnProperty=function(name,context){if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)};return assertNotHasOwnProperty(name,"module"),requires&&modules.hasOwnProperty(name)&&(modules[name]=null),ensure(modules,name,function(){function invokeLater(provider,method,insertMethod){return function(){return invokeQueue[insertMethod||"push"]([provider,method,arguments]),moduleInstance}}if(!requires)throw $injectorMinErr("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",name);var invokeQueue=[],runBlocks=[],config=invokeLater("$injector","invoke"),moduleInstance={_invokeQueue:invokeQueue,_runBlocks:runBlocks,requires:requires,name:name,provider:invokeLater("$provide","provider"),factory:invokeLater("$provide","factory"),service:invokeLater("$provide","service"),value:invokeLater("$provide","value"),constant:invokeLater("$provide","constant","unshift"),animation:invokeLater("$animateProvider","register"),filter:invokeLater("$filterProvider","register"),controller:invokeLater("$controllerProvider","register"),directive:invokeLater("$compileProvider","directive"),config:config,run:function(block){return runBlocks.push(block),this}};return configFn&&config(configFn),moduleInstance})}})}function publishExternalAPI(angular){extend(angular,{bootstrap:bootstrap,copy:copy,extend:extend,equals:equals,element:jqLite,forEach:forEach,injector:createInjector,noop:noop,bind:bind,toJson:toJson,fromJson:fromJson,identity:identity,isUndefined:isUndefined,isDefined:isDefined,isString:isString,isFunction:isFunction,isObject:isObject,isNumber:isNumber,isElement:isElement,isArray:isArray,version:version,isDate:isDate,lowercase:lowercase,uppercase:uppercase,callbacks:{counter:0},$$minErr:minErr,$$csp:csp}),angularModule=setupModuleLoader(window);try{angularModule("ngLocale")}catch(e){angularModule("ngLocale",[]).provider("$locale",$LocaleProvider)}angularModule("ng",["ngLocale"],["$provide",function($provide){$provide.provider({$$sanitizeUri:$$SanitizeUriProvider}),$provide.provider("$compile",$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirective,select:selectDirective,style:styleDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtml:ngBindHtmlDirective,ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,required:requiredDirective,ngRequired:requiredDirective,ngValue:ngValueDirective}).directive({ngInclude:ngIncludeFillContentDirective}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives),$provide.provider({$anchorScroll:$AnchorScrollProvider,$animate:$AnimateProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$interpolate:$InterpolateProvider,$interval:$IntervalProvider,$http:$HttpProvider,$httpBackend:$HttpBackendProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$sce:$SceProvider,$sceDelegate:$SceDelegateProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$timeout:$TimeoutProvider,$window:$WindowProvider,$$rAF:$$RAFProvider,$$asyncCallback:$$AsyncCallbackProvider})}])}function jqNextId(){return++jqId}function camelCase(name){return name.replace(SPECIAL_CHARS_REGEXP,function(_,separator,letter,offset){return offset?letter.toUpperCase():letter}).replace(MOZ_HACK_REGEXP,"Moz$1")}function jqLitePatchJQueryRemove(name,dispatchThis,filterElems,getterIfNoArguments){function removePatch(param){var set,setIndex,setLength,element,childIndex,childLength,children,list=filterElems&&param?[this.filter(param)]:[this],fireEvent=dispatchThis;if(!getterIfNoArguments||null!=param)for(;list.length;)for(set=list.shift(),setIndex=0,setLength=set.length;setLength>setIndex;setIndex++)for(element=jqLite(set[setIndex]),fireEvent?element.triggerHandler("$destroy"):fireEvent=!fireEvent,childIndex=0,childLength=(children=element.children()).length;childLength>childIndex;childIndex++)list.push(jQuery(children[childIndex]));return originalJqFn.apply(this,arguments)}var originalJqFn=jQuery.fn[name];originalJqFn=originalJqFn.$original||originalJqFn,removePatch.$original=originalJqFn,jQuery.fn[name]=removePatch}function JQLite(element){if(element instanceof JQLite)return element;if(isString(element)&&(element=trim(element)),!(this instanceof JQLite)){if(isString(element)&&"<"!=element.charAt(0))throw jqLiteMinErr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new JQLite(element)}if(isString(element)){var div=document.createElement("div");div.innerHTML="<div>&#160;</div>"+element,div.removeChild(div.firstChild),jqLiteAddNodes(this,div.childNodes);var fragment=jqLite(document.createDocumentFragment());fragment.append(this)}else jqLiteAddNodes(this,element)}function jqLiteClone(element){return element.cloneNode(!0)}function jqLiteDealoc(element){jqLiteRemoveData(element);for(var i=0,children=element.childNodes||[];i<children.length;i++)jqLiteDealoc(children[i])}function jqLiteOff(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("offargs","jqLite#off() does not support the `selector` argument");var events=jqLiteExpandoStore(element,"events"),handle=jqLiteExpandoStore(element,"handle");handle&&(isUndefined(type)?forEach(events,function(eventHandler,type){removeEventListenerFn(element,type,eventHandler),delete events[type]}):forEach(type.split(" "),function(type){isUndefined(fn)?(removeEventListenerFn(element,type,events[type]),delete events[type]):arrayRemove(events[type]||[],fn)}))}function jqLiteRemoveData(element,name){var expandoId=element[jqName],expandoStore=jqCache[expandoId];if(expandoStore){if(name)return void delete jqCache[expandoId].data[name];expandoStore.handle&&(expandoStore.events.$destroy&&expandoStore.handle({},"$destroy"),jqLiteOff(element)),delete jqCache[expandoId],element[jqName]=undefined}}function jqLiteExpandoStore(element,key,value){var expandoId=element[jqName],expandoStore=jqCache[expandoId||-1];return isDefined(value)?(expandoStore||(element[jqName]=expandoId=jqNextId(),expandoStore=jqCache[expandoId]={}),void(expandoStore[key]=value)):expandoStore&&expandoStore[key]}function jqLiteData(element,key,value){var data=jqLiteExpandoStore(element,"data"),isSetter=isDefined(value),keyDefined=!isSetter&&isDefined(key),isSimpleGetter=keyDefined&&!isObject(key);if(data||isSimpleGetter||jqLiteExpandoStore(element,"data",data={}),isSetter)data[key]=value;else{if(!keyDefined)return data;if(isSimpleGetter)return data&&data[key];extend(data,key)}}function jqLiteHasClass(element,selector){return element.getAttribute?(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")>-1:!1}function jqLiteRemoveClass(element,cssClasses){cssClasses&&element.setAttribute&&forEach(cssClasses.split(" "),function(cssClass){element.setAttribute("class",trim((" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," ")))})}function jqLiteAddClass(element,cssClasses){if(cssClasses&&element.setAttribute){var existingClasses=(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");forEach(cssClasses.split(" "),function(cssClass){cssClass=trim(cssClass),-1===existingClasses.indexOf(" "+cssClass+" ")&&(existingClasses+=cssClass+" ")}),element.setAttribute("class",trim(existingClasses))}}function jqLiteAddNodes(root,elements){if(elements){elements=elements.nodeName||!isDefined(elements.length)||isWindow(elements)?[elements]:elements;for(var i=0;i<elements.length;i++)root.push(elements[i])}}function jqLiteController(element,name){return jqLiteInheritedData(element,"$"+(name||"ngController")+"Controller")}function jqLiteInheritedData(element,name,value){element=jqLite(element),9==element[0].nodeType&&(element=element.find("html"));for(var names=isArray(name)?name:[name];element.length;){for(var node=element[0],i=0,ii=names.length;ii>i;i++)if((value=element.data(names[i]))!==undefined)return value;element=jqLite(node.parentNode||11===node.nodeType&&node.host)}}function jqLiteEmpty(element){for(var i=0,childNodes=element.childNodes;i<childNodes.length;i++)jqLiteDealoc(childNodes[i]);for(;element.firstChild;)element.removeChild(element.firstChild)}function getBooleanAttrName(element,name){var booleanAttr=BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[element.nodeName]&&booleanAttr}function createEventHandler(element,events){var eventHandler=function(event,type){if(event.preventDefault||(event.preventDefault=function(){event.returnValue=!1}),event.stopPropagation||(event.stopPropagation=function(){event.cancelBubble=!0}),event.target||(event.target=event.srcElement||document),isUndefined(event.defaultPrevented)){var prevent=event.preventDefault;event.preventDefault=function(){event.defaultPrevented=!0,prevent.call(event)},event.defaultPrevented=!1}event.isDefaultPrevented=function(){return event.defaultPrevented||event.returnValue===!1};var eventHandlersCopy=shallowCopy(events[type||event.type]||[]);forEach(eventHandlersCopy,function(fn){fn.call(element,event)}),8>=msie?(event.preventDefault=null,event.stopPropagation=null,event.isDefaultPrevented=null):(delete event.preventDefault,delete event.stopPropagation,delete event.isDefaultPrevented)};return eventHandler.elem=element,eventHandler}function hashKey(obj){var key,objType=typeof obj;return"object"==objType&&null!==obj?"function"==typeof(key=obj.$$hashKey)?key=obj.$$hashKey():key===undefined&&(key=obj.$$hashKey=nextUid()):key=obj,objType+":"+key}function HashMap(array){forEach(array,this.put,this)}function annotate(fn){var $inject,fnText,argDecl,last;return"function"==typeof fn?($inject=fn.$inject)||($inject=[],fn.length&&(fnText=fn.toString().replace(STRIP_COMMENTS,""),argDecl=fnText.match(FN_ARGS),forEach(argDecl[1].split(FN_ARG_SPLIT),function(arg){arg.replace(FN_ARG,function(all,underscore,name){$inject.push(name)})})),fn.$inject=$inject):isArray(fn)?(last=fn.length-1,assertArgFn(fn[last],"fn"),$inject=fn.slice(0,last)):assertArgFn(fn,"fn",!0),$inject}function createInjector(modulesToLoad){function supportObject(delegate){return function(key,value){return isObject(key)?void forEach(key,reverseParams(delegate)):delegate(key,value)}}function provider(name,provider_){if(assertNotHasOwnProperty(name,"service"),(isFunction(provider_)||isArray(provider_))&&(provider_=providerInjector.instantiate(provider_)),!provider_.$get)throw $injectorMinErr("pget","Provider '{0}' must define $get factory method.",name);return providerCache[name+providerSuffix]=provider_}function factory(name,factoryFn){return provider(name,{$get:factoryFn})}function service(name,constructor){return factory(name,["$injector",function($injector){return $injector.instantiate(constructor)}])}function value(name,val){return factory(name,valueFn(val))}function constant(name,value){assertNotHasOwnProperty(name,"constant"),providerCache[name]=value,instanceCache[name]=value}function decorator(serviceName,decorFn){var origProvider=providerInjector.get(serviceName+providerSuffix),orig$get=origProvider.$get;origProvider.$get=function(){var origInstance=instanceInjector.invoke(orig$get,origProvider);return instanceInjector.invoke(decorFn,null,{$delegate:origInstance})}}function loadModules(modulesToLoad){var moduleFn,invokeQueue,i,ii,runBlocks=[];return forEach(modulesToLoad,function(module){if(!loadedModules.get(module)){loadedModules.put(module,!0);try{if(isString(module))for(moduleFn=angularModule(module),runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks),invokeQueue=moduleFn._invokeQueue,i=0,ii=invokeQueue.length;ii>i;i++){var invokeArgs=invokeQueue[i],provider=providerInjector.get(invokeArgs[0]);provider[invokeArgs[1]].apply(provider,invokeArgs[2])}else isFunction(module)?runBlocks.push(providerInjector.invoke(module)):isArray(module)?runBlocks.push(providerInjector.invoke(module)):assertArgFn(module,"module")}catch(e){throw isArray(module)&&(module=module[module.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),$injectorMinErr("modulerr","Failed to instantiate module {0} due to:\n{1}",module,e.stack||e.message||e)}}}),runBlocks}function createInternalInjector(cache,factory){function getService(serviceName){if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING)throw $injectorMinErr("cdep","Circular dependency found: {0}",path.join(" <- "));return cache[serviceName]}try{return path.unshift(serviceName),cache[serviceName]=INSTANTIATING,cache[serviceName]=factory(serviceName)}catch(err){throw cache[serviceName]===INSTANTIATING&&delete cache[serviceName],err}finally{path.shift()}}function invoke(fn,self,locals){var length,i,key,args=[],$inject=annotate(fn);for(i=0,length=$inject.length;length>i;i++){if(key=$inject[i],"string"!=typeof key)throw $injectorMinErr("itkn","Incorrect injection token! Expected service name as string, got {0}",key);args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key))}return fn.$inject||(fn=fn[length]),fn.apply(self,args)}function instantiate(Type,locals){var instance,returnedValue,Constructor=function(){};return Constructor.prototype=(isArray(Type)?Type[Type.length-1]:Type).prototype,instance=new Constructor,returnedValue=invoke(Type,instance,locals),isObject(returnedValue)||isFunction(returnedValue)?returnedValue:instance}return{invoke:invoke,instantiate:instantiate,get:getService,annotate:annotate,has:function(name){return providerCache.hasOwnProperty(name+providerSuffix)||cache.hasOwnProperty(name)}}}var INSTANTIATING={},providerSuffix="Provider",path=[],loadedModules=new HashMap,providerCache={$provide:{provider:supportObject(provider),factory:supportObject(factory),service:supportObject(service),value:supportObject(value),constant:supportObject(constant),decorator:decorator}},providerInjector=providerCache.$injector=createInternalInjector(providerCache,function(){throw $injectorMinErr("unpr","Unknown provider: {0}",path.join(" <- "))}),instanceCache={},instanceInjector=instanceCache.$injector=createInternalInjector(instanceCache,function(servicename){var provider=providerInjector.get(servicename+providerSuffix);return instanceInjector.invoke(provider.$get,provider)});return forEach(loadModules(modulesToLoad),function(fn){instanceInjector.invoke(fn||noop)}),instanceInjector}function $AnchorScrollProvider(){var autoScrollingEnabled=!0;this.disableAutoScrolling=function(){autoScrollingEnabled=!1},this.$get=["$window","$location","$rootScope",function($window,$location,$rootScope){function getFirstAnchor(list){var result=null;return forEach(list,function(element){result||"a"!==lowercase(element.nodeName)||(result=element)}),result}function scroll(){var elm,hash=$location.hash();hash?(elm=document.getElementById(hash))?elm.scrollIntoView():(elm=getFirstAnchor(document.getElementsByName(hash)))?elm.scrollIntoView():"top"===hash&&$window.scrollTo(0,0):$window.scrollTo(0,0)}var document=$window.document;return autoScrollingEnabled&&$rootScope.$watch(function(){return $location.hash()},function(){$rootScope.$evalAsync(scroll)}),scroll}]}function $$AsyncCallbackProvider(){this.$get=["$$rAF","$timeout",function($$rAF,$timeout){return $$rAF.supported?function(fn){return $$rAF(fn)}:function(fn){return $timeout(fn,0,!1)}}]}function Browser(window,document,$log,$sniffer){function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1))}finally{if(outstandingRequestCount--,0===outstandingRequestCount)for(;outstandingRequestCallbacks.length;)try{outstandingRequestCallbacks.pop()()}catch(e){$log.error(e)}}}function startPoller(interval,setTimeout){!function check(){forEach(pollFns,function(pollFn){pollFn()}),pollTimeout=setTimeout(check,interval)}()}function fireUrlChange(){newLocation=null,lastBrowserUrl!=self.url()&&(lastBrowserUrl=self.url(),forEach(urlChangeListeners,function(listener){listener(self.url())}))}var self=this,rawDocument=document[0],location=window.location,history=window.history,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,pendingDeferIds={};self.isMock=!1;var outstandingRequestCount=0,outstandingRequestCallbacks=[];self.$$completeOutstandingRequest=completeOutstandingRequest,self.$$incOutstandingRequestCount=function(){outstandingRequestCount++},self.notifyWhenNoOutstandingRequests=function(callback){forEach(pollFns,function(pollFn){pollFn()}),0===outstandingRequestCount?callback():outstandingRequestCallbacks.push(callback)};var pollTimeout,pollFns=[];self.addPollFn=function(fn){return isUndefined(pollTimeout)&&startPoller(100,setTimeout),pollFns.push(fn),fn};var lastBrowserUrl=location.href,baseElement=document.find("base"),newLocation=null;self.url=function(url,replace){if(location!==window.location&&(location=window.location),history!==window.history&&(history=window.history),url){if(lastBrowserUrl==url)return;return lastBrowserUrl=url,$sniffer.history?replace?history.replaceState(null,"",url):(history.pushState(null,"",url),baseElement.attr("href",baseElement.attr("href"))):(newLocation=url,replace?location.replace(url):location.href=url),self}return newLocation||location.href.replace(/%27/g,"'")};var urlChangeListeners=[],urlChangeInit=!1;self.onUrlChange=function(callback){return urlChangeInit||($sniffer.history&&jqLite(window).on("popstate",fireUrlChange),$sniffer.hashchange?jqLite(window).on("hashchange",fireUrlChange):self.addPollFn(fireUrlChange),urlChangeInit=!0),urlChangeListeners.push(callback),callback},self.baseHref=function(){var href=baseElement.attr("href");return href?href.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var lastCookies={},lastCookieString="",cookiePath=self.baseHref();self.cookies=function(name,value){var cookieLength,cookieArray,cookie,i,index;if(!name){if(rawDocument.cookie!==lastCookieString)for(lastCookieString=rawDocument.cookie,cookieArray=lastCookieString.split("; "),lastCookies={},i=0;i<cookieArray.length;i++)cookie=cookieArray[i],index=cookie.indexOf("="),index>0&&(name=unescape(cookie.substring(0,index)),lastCookies[name]===undefined&&(lastCookies[name]=unescape(cookie.substring(index+1))));return lastCookies}value===undefined?rawDocument.cookie=escape(name)+"=;path="+cookiePath+";expires=Thu, 01 Jan 1970 00:00:00 GMT":isString(value)&&(cookieLength=(rawDocument.cookie=escape(name)+"="+escape(value)+";path="+cookiePath).length+1,cookieLength>4096&&$log.warn("Cookie '"+name+"' possibly not set or overflowed because it was too large ("+cookieLength+" > 4096 bytes)!"))},self.defer=function(fn,delay){var timeoutId;return outstandingRequestCount++,timeoutId=setTimeout(function(){delete pendingDeferIds[timeoutId],completeOutstandingRequest(fn)},delay||0),pendingDeferIds[timeoutId]=!0,timeoutId},self.defer.cancel=function(deferId){return pendingDeferIds[deferId]?(delete pendingDeferIds[deferId],clearTimeout(deferId),completeOutstandingRequest(noop),!0):!1}}function $BrowserProvider(){this.$get=["$window","$log","$sniffer","$document",function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer)}]}function $CacheFactoryProvider(){this.$get=function(){function cacheFactory(cacheId,options){function refresh(entry){entry!=freshEnd&&(staleEnd?staleEnd==entry&&(staleEnd=entry.n):staleEnd=entry,link(entry.n,entry.p),link(entry,freshEnd),freshEnd=entry,freshEnd.n=null)}function link(nextEntry,prevEntry){nextEntry!=prevEntry&&(nextEntry&&(nextEntry.p=prevEntry),prevEntry&&(prevEntry.n=nextEntry))}if(cacheId in caches)throw minErr("$cacheFactory")("iid","CacheId '{0}' is already taken!",cacheId);var size=0,stats=extend({},options,{id:cacheId}),data={},capacity=options&&options.capacity||Number.MAX_VALUE,lruHash={},freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key]||(lruHash[key]={key:key});refresh(lruEntry)}if(!isUndefined(value))return key in data||size++,data[key]=value,size>capacity&&this.remove(staleEnd.key),value
  },get:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;refresh(lruEntry)}return data[key]},remove:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;lruEntry==freshEnd&&(freshEnd=lruEntry.p),lruEntry==staleEnd&&(staleEnd=lruEntry.n),link(lruEntry.n,lruEntry.p),delete lruHash[key]}delete data[key],size--},removeAll:function(){data={},size=0,lruHash={},freshEnd=staleEnd=null},destroy:function(){data=null,stats=null,lruHash=null,delete caches[cacheId]},info:function(){return extend({},stats,{size:size})}}}var caches={};return cacheFactory.info=function(){var info={};return forEach(caches,function(cache,cacheId){info[cacheId]=cache.info()}),info},cacheFactory.get=function(cacheId){return caches[cacheId]},cacheFactory}}function $TemplateCacheProvider(){this.$get=["$cacheFactory",function($cacheFactory){return $cacheFactory("templates")}]}function $CompileProvider($provide,$$sanitizeUriProvider){var hasDirectives={},Suffix="Directive",COMMENT_DIRECTIVE_REGEXP=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,TABLE_CONTENT_REGEXP=/^<\s*(tr|th|td|thead|tbody|tfoot)(\s+[^>]*)?>/i,EVENT_HANDLER_ATTR_REGEXP=/^(on[a-z]+|formaction)$/;this.directive=function registerDirective(name,directiveFactory){return assertNotHasOwnProperty(name,"directive"),isString(name)?(assertArg(directiveFactory,"directiveFactory"),hasDirectives.hasOwnProperty(name)||(hasDirectives[name]=[],$provide.factory(name+Suffix,["$injector","$exceptionHandler",function($injector,$exceptionHandler){var directives=[];return forEach(hasDirectives[name],function(directiveFactory,index){try{var directive=$injector.invoke(directiveFactory);isFunction(directive)?directive={compile:valueFn(directive)}:!directive.compile&&directive.link&&(directive.compile=valueFn(directive.link)),directive.priority=directive.priority||0,directive.index=index,directive.name=directive.name||name,directive.require=directive.require||directive.controller&&directive.name,directive.restrict=directive.restrict||"A",directives.push(directive)}catch(e){$exceptionHandler(e)}}),directives}])),hasDirectives[name].push(directiveFactory)):forEach(name,reverseParams(registerDirective)),this},this.aHrefSanitizationWhitelist=function(regexp){return isDefined(regexp)?($$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(regexp){return isDefined(regexp)?($$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.imgSrcSanitizationWhitelist()},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function($injector,$interpolate,$exceptionHandler,$http,$templateCache,$parse,$controller,$rootScope,$document,$sce,$animate,$$sanitizeUri){function compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext){$compileNodes instanceof jqLite||($compileNodes=jqLite($compileNodes)),forEach($compileNodes,function(node,index){3==node.nodeType&&node.nodeValue.match(/\S+/)&&($compileNodes[index]=node=jqLite(node).wrap("<span></span>").parent()[0])});var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority,ignoreDirective,previousCompileContext);return safeAddClass($compileNodes,"ng-scope"),function(scope,cloneConnectFn,transcludeControllers){assertArg(scope,"scope");var $linkNode=cloneConnectFn?JQLitePrototype.clone.call($compileNodes):$compileNodes;forEach(transcludeControllers,function(instance,name){$linkNode.data("$"+name+"Controller",instance)});for(var i=0,ii=$linkNode.length;ii>i;i++){var node=$linkNode[i],nodeType=node.nodeType;(1===nodeType||9===nodeType)&&$linkNode.eq(i).data("$scope",scope)}return cloneConnectFn&&cloneConnectFn($linkNode,scope),compositeLinkFn&&compositeLinkFn(scope,$linkNode,$linkNode),$linkNode}}function safeAddClass($element,className){try{$element.addClass(className)}catch(e){}}function compileNodes(nodeList,transcludeFn,$rootElement,maxPriority,ignoreDirective,previousCompileContext){function compositeLinkFn(scope,nodeList,$rootElement,boundTranscludeFn){var nodeLinkFn,childLinkFn,node,$node,childScope,childTranscludeFn,i,ii,n,nodeListLength=nodeList.length,stableNodeList=new Array(nodeListLength);for(i=0;nodeListLength>i;i++)stableNodeList[i]=nodeList[i];for(i=0,n=0,ii=linkFns.length;ii>i;n++)node=stableNodeList[n],nodeLinkFn=linkFns[i++],childLinkFn=linkFns[i++],$node=jqLite(node),nodeLinkFn?(nodeLinkFn.scope?(childScope=scope.$new(),$node.data("$scope",childScope)):childScope=scope,childTranscludeFn=nodeLinkFn.transclude,childTranscludeFn||!boundTranscludeFn&&transcludeFn?nodeLinkFn(childLinkFn,childScope,node,$rootElement,createBoundTranscludeFn(scope,childTranscludeFn||transcludeFn)):nodeLinkFn(childLinkFn,childScope,node,$rootElement,boundTranscludeFn)):childLinkFn&&childLinkFn(scope,node.childNodes,undefined,boundTranscludeFn)}for(var attrs,directives,nodeLinkFn,childNodes,childLinkFn,linkFnFound,linkFns=[],i=0;i<nodeList.length;i++)attrs=new Attributes,directives=collectDirectives(nodeList[i],[],attrs,0===i?maxPriority:undefined,ignoreDirective),nodeLinkFn=directives.length?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement,null,[],[],previousCompileContext):null,nodeLinkFn&&nodeLinkFn.scope&&safeAddClass(jqLite(nodeList[i]),"ng-scope"),childLinkFn=nodeLinkFn&&nodeLinkFn.terminal||!(childNodes=nodeList[i].childNodes)||!childNodes.length?null:compileNodes(childNodes,nodeLinkFn?nodeLinkFn.transclude:transcludeFn),linkFns.push(nodeLinkFn,childLinkFn),linkFnFound=linkFnFound||nodeLinkFn||childLinkFn,previousCompileContext=null;return linkFnFound?compositeLinkFn:null}function createBoundTranscludeFn(scope,transcludeFn){return function(transcludedScope,cloneFn,controllers){var scopeCreated=!1;transcludedScope||(transcludedScope=scope.$new(),transcludedScope.$$transcluded=!0,scopeCreated=!0);var clone=transcludeFn(transcludedScope,cloneFn,controllers);return scopeCreated&&clone.on("$destroy",bind(transcludedScope,transcludedScope.$destroy)),clone}}function collectDirectives(node,directives,attrs,maxPriority,ignoreDirective){var match,className,nodeType=node.nodeType,attrsMap=attrs.$attr;switch(nodeType){case 1:addDirective(directives,directiveNormalize(nodeName_(node).toLowerCase()),"E",maxPriority,ignoreDirective);for(var attr,name,nName,ngAttrName,value,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;jj>j;j++){var attrStartName=!1,attrEndName=!1;if(attr=nAttrs[j],!msie||msie>=8||attr.specified){name=attr.name,ngAttrName=directiveNormalize(name),NG_ATTR_BINDING.test(ngAttrName)&&(name=snake_case(ngAttrName.substr(6),"-"));var directiveNName=ngAttrName.replace(/(Start|End)$/,"");ngAttrName===directiveNName+"Start"&&(attrStartName=name,attrEndName=name.substr(0,name.length-5)+"end",name=name.substr(0,name.length-6)),nName=directiveNormalize(name.toLowerCase()),attrsMap[nName]=name,attrs[nName]=value=trim(attr.value),getBooleanAttrName(node,nName)&&(attrs[nName]=!0),addAttrInterpolateDirective(node,directives,value,nName),addDirective(directives,nName,"A",maxPriority,ignoreDirective,attrStartName,attrEndName)}}if(className=node.className,isString(className)&&""!==className)for(;match=CLASS_DIRECTIVE_REGEXP.exec(className);)nName=directiveNormalize(match[2]),addDirective(directives,nName,"C",maxPriority,ignoreDirective)&&(attrs[nName]=trim(match[3])),className=className.substr(match.index+match[0].length);break;case 3:addTextInterpolateDirective(directives,node.nodeValue);break;case 8:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue),match&&(nName=directiveNormalize(match[1]),addDirective(directives,nName,"M",maxPriority,ignoreDirective)&&(attrs[nName]=trim(match[2])))}catch(e){}}return directives.sort(byPriority),directives}function groupScan(node,attrStart,attrEnd){var nodes=[],depth=0;if(attrStart&&node.hasAttribute&&node.hasAttribute(attrStart)){do{if(!node)throw $compileMinErr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",attrStart,attrEnd);1==node.nodeType&&(node.hasAttribute(attrStart)&&depth++,node.hasAttribute(attrEnd)&&depth--),nodes.push(node),node=node.nextSibling}while(depth>0)}else nodes.push(node);return jqLite(nodes)}function groupElementsLinkFnWrapper(linkFn,attrStart,attrEnd){return function(scope,element,attrs,controllers,transcludeFn){return element=groupScan(element[0],attrStart,attrEnd),linkFn(scope,element,attrs,controllers,transcludeFn)}}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection,originalReplaceDirective,preLinkFns,postLinkFns,previousCompileContext){function addLinkFns(pre,post,attrStart,attrEnd){pre&&(attrStart&&(pre=groupElementsLinkFnWrapper(pre,attrStart,attrEnd)),pre.require=directive.require,(newIsolateScopeDirective===directive||directive.$$isolateScope)&&(pre=cloneAndAnnotateFn(pre,{isolateScope:!0})),preLinkFns.push(pre)),post&&(attrStart&&(post=groupElementsLinkFnWrapper(post,attrStart,attrEnd)),post.require=directive.require,(newIsolateScopeDirective===directive||directive.$$isolateScope)&&(post=cloneAndAnnotateFn(post,{isolateScope:!0})),postLinkFns.push(post))}function getControllers(require,$element,elementControllers){var value,retrievalMethod="data",optional=!1;if(isString(require)){for(;"^"==(value=require.charAt(0))||"?"==value;)require=require.substr(1),"^"==value&&(retrievalMethod="inheritedData"),optional=optional||"?"==value;if(value=null,elementControllers&&"data"===retrievalMethod&&(value=elementControllers[require]),value=value||$element[retrievalMethod]("$"+require+"Controller"),!value&&!optional)throw $compileMinErr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",require,directiveName);return value}return isArray(require)&&(value=[],forEach(require,function(require){value.push(getControllers(require,$element,elementControllers))})),value}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){function controllersBoundTransclude(scope,cloneAttachFn){var transcludeControllers;return arguments.length<2&&(cloneAttachFn=scope,scope=undefined),hasElementTranscludeDirective&&(transcludeControllers=elementControllers),boundTranscludeFn(scope,cloneAttachFn,transcludeControllers)}var attrs,$element,i,ii,linkFn,controller,isolateScope,transcludeFn,elementControllers={};if(attrs=compileNode===linkNode?templateAttrs:shallowCopy(templateAttrs,new Attributes(jqLite(linkNode),templateAttrs.$attr)),$element=attrs.$$element,newIsolateScopeDirective){var LOCAL_REGEXP=/^\s*([@=&])(\??)\s*(\w*)\s*$/,$linkNode=jqLite(linkNode);isolateScope=scope.$new(!0),templateDirective&&templateDirective===newIsolateScopeDirective.$$originalDirective?$linkNode.data("$isolateScope",isolateScope):$linkNode.data("$isolateScopeNoTemplate",isolateScope),safeAddClass($linkNode,"ng-isolate-scope"),forEach(newIsolateScopeDirective.scope,function(definition,scopeName){var lastValue,parentGet,parentSet,compare,match=definition.match(LOCAL_REGEXP)||[],attrName=match[3]||scopeName,optional="?"==match[2],mode=match[1];switch(isolateScope.$$isolateBindings[scopeName]=mode+attrName,mode){case"@":attrs.$observe(attrName,function(value){isolateScope[scopeName]=value}),attrs.$$observers[attrName].$$scope=scope,attrs[attrName]&&(isolateScope[scopeName]=$interpolate(attrs[attrName])(scope));break;case"=":if(optional&&!attrs[attrName])return;parentGet=$parse(attrs[attrName]),compare=parentGet.literal?equals:function(a,b){return a===b},parentSet=parentGet.assign||function(){throw lastValue=isolateScope[scopeName]=parentGet(scope),$compileMinErr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",attrs[attrName],newIsolateScopeDirective.name)},lastValue=isolateScope[scopeName]=parentGet(scope),isolateScope.$watch(function(){var parentValue=parentGet(scope);return compare(parentValue,isolateScope[scopeName])||(compare(parentValue,lastValue)?parentSet(scope,parentValue=isolateScope[scopeName]):isolateScope[scopeName]=parentValue),lastValue=parentValue},null,parentGet.literal);break;case"&":parentGet=$parse(attrs[attrName]),isolateScope[scopeName]=function(locals){return parentGet(scope,locals)};break;default:throw $compileMinErr("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",newIsolateScopeDirective.name,scopeName,definition)}})}for(transcludeFn=boundTranscludeFn&&controllersBoundTransclude,controllerDirectives&&forEach(controllerDirectives,function(directive){var controllerInstance,locals={$scope:directive===newIsolateScopeDirective||directive.$$isolateScope?isolateScope:scope,$element:$element,$attrs:attrs,$transclude:transcludeFn};controller=directive.controller,"@"==controller&&(controller=attrs[directive.name]),controllerInstance=$controller(controller,locals),elementControllers[directive.name]=controllerInstance,hasElementTranscludeDirective||$element.data("$"+directive.name+"Controller",controllerInstance),directive.controllerAs&&(locals.$scope[directive.controllerAs]=controllerInstance)}),i=0,ii=preLinkFns.length;ii>i;i++)try{linkFn=preLinkFns[i],linkFn(linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.require,$element,elementControllers),transcludeFn)}catch(e){$exceptionHandler(e,startingTag($element))}var scopeToChild=scope;for(newIsolateScopeDirective&&(newIsolateScopeDirective.template||null===newIsolateScopeDirective.templateUrl)&&(scopeToChild=isolateScope),childLinkFn&&childLinkFn(scopeToChild,linkNode.childNodes,undefined,boundTranscludeFn),i=postLinkFns.length-1;i>=0;i--)try{linkFn=postLinkFns[i],linkFn(linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.require,$element,elementControllers),transcludeFn)}catch(e){$exceptionHandler(e,startingTag($element))}}previousCompileContext=previousCompileContext||{};for(var newScopeDirective,directive,directiveName,$template,linkFn,directiveValue,terminalPriority=-Number.MAX_VALUE,controllerDirectives=previousCompileContext.controllerDirectives,newIsolateScopeDirective=previousCompileContext.newIsolateScopeDirective,templateDirective=previousCompileContext.templateDirective,nonTlbTranscludeDirective=previousCompileContext.nonTlbTranscludeDirective,hasTranscludeDirective=!1,hasElementTranscludeDirective=previousCompileContext.hasElementTranscludeDirective,$compileNode=templateAttrs.$$element=jqLite(compileNode),replaceDirective=originalReplaceDirective,childTranscludeFn=transcludeFn,i=0,ii=directives.length;ii>i;i++){directive=directives[i];var attrStart=directive.$$start,attrEnd=directive.$$end;if(attrStart&&($compileNode=groupScan(compileNode,attrStart,attrEnd)),$template=undefined,terminalPriority>directive.priority)break;if((directiveValue=directive.scope)&&(newScopeDirective=newScopeDirective||directive,directive.templateUrl||(assertNoDuplicate("new/isolated scope",newIsolateScopeDirective,directive,$compileNode),isObject(directiveValue)&&(newIsolateScopeDirective=directive))),directiveName=directive.name,!directive.templateUrl&&directive.controller&&(directiveValue=directive.controller,controllerDirectives=controllerDirectives||{},assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode),controllerDirectives[directiveName]=directive),(directiveValue=directive.transclude)&&(hasTranscludeDirective=!0,directive.$$tlb||(assertNoDuplicate("transclusion",nonTlbTranscludeDirective,directive,$compileNode),nonTlbTranscludeDirective=directive),"element"==directiveValue?(hasElementTranscludeDirective=!0,terminalPriority=directive.priority,$template=groupScan(compileNode,attrStart,attrEnd),$compileNode=templateAttrs.$$element=jqLite(document.createComment(" "+directiveName+": "+templateAttrs[directiveName]+" ")),compileNode=$compileNode[0],replaceWith(jqCollection,jqLite(sliceArgs($template)),compileNode),childTranscludeFn=compile($template,transcludeFn,terminalPriority,replaceDirective&&replaceDirective.name,{nonTlbTranscludeDirective:nonTlbTranscludeDirective})):($template=jqLite(jqLiteClone(compileNode)).contents(),$compileNode.empty(),childTranscludeFn=compile($template,transcludeFn))),directive.template)if(assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,directiveValue=isFunction(directive.template)?directive.template($compileNode,templateAttrs):directive.template,directiveValue=denormalizeTemplate(directiveValue),directive.replace){if(replaceDirective=directive,$template=directiveTemplateContents(directiveValue),compileNode=$template[0],1!=$template.length||1!==compileNode.nodeType)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",directiveName,"");replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}},templateDirectives=collectDirectives(compileNode,[],newTemplateAttrs),unprocessedDirectives=directives.splice(i+1,directives.length-(i+1));newIsolateScopeDirective&&markDirectivesAsIsolate(templateDirectives),directives=directives.concat(templateDirectives).concat(unprocessedDirectives),mergeTemplateAttributes(templateAttrs,newTemplateAttrs),ii=directives.length}else $compileNode.html(directiveValue);if(directive.templateUrl)assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,directive.replace&&(replaceDirective=directive),nodeLinkFn=compileTemplateUrl(directives.splice(i,directives.length-i),$compileNode,templateAttrs,jqCollection,childTranscludeFn,preLinkFns,postLinkFns,{controllerDirectives:controllerDirectives,newIsolateScopeDirective:newIsolateScopeDirective,templateDirective:templateDirective,nonTlbTranscludeDirective:nonTlbTranscludeDirective}),ii=directives.length;else if(directive.compile)try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn),isFunction(linkFn)?addLinkFns(null,linkFn,attrStart,attrEnd):linkFn&&addLinkFns(linkFn.pre,linkFn.post,attrStart,attrEnd)}catch(e){$exceptionHandler(e,startingTag($compileNode))}directive.terminal&&(nodeLinkFn.terminal=!0,terminalPriority=Math.max(terminalPriority,directive.priority))}return nodeLinkFn.scope=newScopeDirective&&newScopeDirective.scope===!0,nodeLinkFn.transclude=hasTranscludeDirective&&childTranscludeFn,previousCompileContext.hasElementTranscludeDirective=hasElementTranscludeDirective,nodeLinkFn}function markDirectivesAsIsolate(directives){for(var j=0,jj=directives.length;jj>j;j++)directives[j]=inherit(directives[j],{$$isolateScope:!0})}function addDirective(tDirectives,name,location,maxPriority,ignoreDirective,startAttrName,endAttrName){if(name===ignoreDirective)return null;var match=null;if(hasDirectives.hasOwnProperty(name))for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;ii>i;i++)try{directive=directives[i],(maxPriority===undefined||maxPriority>directive.priority)&&-1!=directive.restrict.indexOf(location)&&(startAttrName&&(directive=inherit(directive,{$$start:startAttrName,$$end:endAttrName})),tDirectives.push(directive),match=directive)}catch(e){$exceptionHandler(e)}return match}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,function(value,key){"$"!=key.charAt(0)&&(src[key]&&(value+=("style"===key?";":" ")+src[key]),dst.$set(key,value,!0,srcAttr[key]))}),forEach(src,function(value,key){"class"==key?(safeAddClass($element,value),dst["class"]=(dst["class"]?dst["class"]+" ":"")+value):"style"==key?($element.attr("style",$element.attr("style")+";"+value),dst.style=(dst.style?dst.style+";":"")+value):"$"==key.charAt(0)||dst.hasOwnProperty(key)||(dst[key]=value,dstAttr[key]=srcAttr[key])})}function directiveTemplateContents(template){var type;if(template=trim(template),type=TABLE_CONTENT_REGEXP.exec(template)){type=type[1].toLowerCase();var table=jqLite("<table>"+template+"</table>");return/(thead|tbody|tfoot)/.test(type)?table.children(type):(table=table.children("tbody"),"tr"===type?table.children("tr"):table.children("tr").contents())}return jqLite("<div>"+template+"</div>").contents()}function compileTemplateUrl(directives,$compileNode,tAttrs,$rootElement,childTranscludeFn,preLinkFns,postLinkFns,previousCompileContext){var afterTemplateNodeLinkFn,afterTemplateChildLinkFn,linkQueue=[],beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=extend({},origAsyncDirective,{templateUrl:null,transclude:null,replace:null,$$originalDirective:origAsyncDirective}),templateUrl=isFunction(origAsyncDirective.templateUrl)?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl;return $compileNode.empty(),$http.get($sce.getTrustedResourceUrl(templateUrl),{cache:$templateCache}).success(function(content){var compileNode,tempTemplateAttrs,$template,childBoundTranscludeFn;if(content=denormalizeTemplate(content),origAsyncDirective.replace){if($template=directiveTemplateContents(content),compileNode=$template[0],1!=$template.length||1!==compileNode.nodeType)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",origAsyncDirective.name,templateUrl);tempTemplateAttrs={$attr:{}},replaceWith($rootElement,$compileNode,compileNode);var templateDirectives=collectDirectives(compileNode,[],tempTemplateAttrs);isObject(origAsyncDirective.scope)&&markDirectivesAsIsolate(templateDirectives),directives=templateDirectives.concat(directives),mergeTemplateAttributes(tAttrs,tempTemplateAttrs)}else compileNode=beforeTemplateCompileNode,$compileNode.html(content);for(directives.unshift(derivedSyncDirective),afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn,$compileNode,origAsyncDirective,preLinkFns,postLinkFns,previousCompileContext),forEach($rootElement,function(node,i){node==compileNode&&($rootElement[i]=$compileNode[0])}),afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);linkQueue.length;){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),boundTranscludeFn=linkQueue.shift(),linkNode=$compileNode[0];if(beforeTemplateLinkNode!==beforeTemplateCompileNode){var oldClasses=beforeTemplateLinkNode.className;previousCompileContext.hasElementTranscludeDirective&&origAsyncDirective.replace||(linkNode=jqLiteClone(compileNode)),replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode),safeAddClass(jqLite(linkNode),oldClasses)}childBoundTranscludeFn=afterTemplateNodeLinkFn.transclude?createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude):boundTranscludeFn,afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,childBoundTranscludeFn)}linkQueue=null}).error(function(response,code,headers,config){throw $compileMinErr("tpload","Failed to load template: {0}",config.url)}),function(ignoreChildLinkFn,scope,node,rootElement,boundTranscludeFn){linkQueue?(linkQueue.push(scope),linkQueue.push(node),linkQueue.push(rootElement),linkQueue.push(boundTranscludeFn)):afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,boundTranscludeFn)}}function byPriority(a,b){var diff=b.priority-a.priority;return 0!==diff?diff:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function assertNoDuplicate(what,previousDirective,directive,element){if(previousDirective)throw $compileMinErr("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",previousDirective.name,directive.name,what,startingTag(element))}function addTextInterpolateDirective(directives,text){var interpolateFn=$interpolate(text,!0);interpolateFn&&directives.push({priority:0,compile:valueFn(function(scope,node){var parent=node.parent(),bindings=parent.data("$binding")||[];bindings.push(interpolateFn),safeAddClass(parent.data("$binding",bindings),"ng-binding"),scope.$watch(interpolateFn,function(value){node[0].nodeValue=value})})})}function getTrustedContext(node,attrNormalizedName){if("srcdoc"==attrNormalizedName)return $sce.HTML;var tag=nodeName_(node);return"xlinkHref"==attrNormalizedName||"FORM"==tag&&"action"==attrNormalizedName||"IMG"!=tag&&("src"==attrNormalizedName||"ngSrc"==attrNormalizedName)?$sce.RESOURCE_URL:void 0}function addAttrInterpolateDirective(node,directives,value,name){var interpolateFn=$interpolate(value,!0);if(interpolateFn){if("multiple"===name&&"SELECT"===nodeName_(node))throw $compileMinErr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",startingTag(node));directives.push({priority:100,compile:function(){return{pre:function(scope,element,attr){var $$observers=attr.$$observers||(attr.$$observers={});if(EVENT_HANDLER_ATTR_REGEXP.test(name))throw $compileMinErr("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");interpolateFn=$interpolate(attr[name],!0,getTrustedContext(node,name)),interpolateFn&&(attr[name]=interpolateFn(scope),($$observers[name]||($$observers[name]=[])).$$inter=!0,(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function(newValue,oldValue){"class"===name&&newValue!=oldValue?attr.$updateClass(newValue,oldValue):attr.$set(name,newValue)}))}}}})}}function replaceWith($rootElement,elementsToRemove,newNode){var i,ii,firstElementToRemove=elementsToRemove[0],removeCount=elementsToRemove.length,parent=firstElementToRemove.parentNode;if($rootElement)for(i=0,ii=$rootElement.length;ii>i;i++)if($rootElement[i]==firstElementToRemove){$rootElement[i++]=newNode;for(var j=i,j2=j+removeCount-1,jj=$rootElement.length;jj>j;j++,j2++)jj>j2?$rootElement[j]=$rootElement[j2]:delete $rootElement[j];$rootElement.length-=removeCount-1;break}parent&&parent.replaceChild(newNode,firstElementToRemove);var fragment=document.createDocumentFragment();fragment.appendChild(firstElementToRemove),newNode[jqLite.expando]=firstElementToRemove[jqLite.expando];for(var k=1,kk=elementsToRemove.length;kk>k;k++){var element=elementsToRemove[k];jqLite(element).remove(),fragment.appendChild(element),delete elementsToRemove[k]}elementsToRemove[0]=newNode,elementsToRemove.length=1}function cloneAndAnnotateFn(fn,annotation){return extend(function(){return fn.apply(null,arguments)},fn,annotation)}var Attributes=function(element,attr){this.$$element=element,this.$attr=attr||{}};Attributes.prototype={$normalize:directiveNormalize,$addClass:function(classVal){classVal&&classVal.length>0&&$animate.addClass(this.$$element,classVal)},$removeClass:function(classVal){classVal&&classVal.length>0&&$animate.removeClass(this.$$element,classVal)},$updateClass:function(newClasses,oldClasses){var toAdd=tokenDifference(newClasses,oldClasses),toRemove=tokenDifference(oldClasses,newClasses);0===toAdd.length?$animate.removeClass(this.$$element,toRemove):0===toRemove.length?$animate.addClass(this.$$element,toAdd):$animate.setClass(this.$$element,toAdd,toRemove)},$set:function(key,value,writeAttr,attrName){var nodeName,booleanKey=getBooleanAttrName(this.$$element[0],key);booleanKey&&(this.$$element.prop(key,value),attrName=booleanKey),this[key]=value,attrName?this.$attr[key]=attrName:(attrName=this.$attr[key],attrName||(this.$attr[key]=attrName=snake_case(key,"-"))),nodeName=nodeName_(this.$$element),("A"===nodeName&&"href"===key||"IMG"===nodeName&&"src"===key)&&(this[key]=value=$$sanitizeUri(value,"src"===key)),writeAttr!==!1&&(null===value||value===undefined?this.$$element.removeAttr(attrName):this.$$element.attr(attrName,value));var $$observers=this.$$observers;$$observers&&forEach($$observers[key],function(fn){try{fn(value)}catch(e){$exceptionHandler(e)}})},$observe:function(key,fn){var attrs=this,$$observers=attrs.$$observers||(attrs.$$observers={}),listeners=$$observers[key]||($$observers[key]=[]);return listeners.push(fn),$rootScope.$evalAsync(function(){listeners.$$inter||fn(attrs[key])}),fn}};var startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),denormalizeTemplate="{{"==startSymbol||"}}"==endSymbol?identity:function(template){return template.replace(/\{\{/g,startSymbol).replace(/}}/g,endSymbol)},NG_ATTR_BINDING=/^ngAttr[A-Z]/;return compile}]}function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,""))}function tokenDifference(str1,str2){var values="",tokens1=str1.split(/\s+/),tokens2=str2.split(/\s+/);outer:for(var i=0;i<tokens1.length;i++){for(var token=tokens1[i],j=0;j<tokens2.length;j++)if(token==tokens2[j])continue outer;values+=(values.length>0?" ":"")+token}return values}function $ControllerProvider(){var controllers={},CNTRL_REG=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(name,constructor){assertNotHasOwnProperty(name,"controller"),isObject(name)?extend(controllers,name):controllers[name]=constructor},this.$get=["$injector","$window",function($injector,$window){return function(expression,locals){var instance,match,constructor,identifier;if(isString(expression)&&(match=expression.match(CNTRL_REG),constructor=match[1],identifier=match[3],expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,!0)||getter($window,constructor,!0),assertArgFn(expression,constructor,!0)),instance=$injector.instantiate(expression,locals),identifier){if(!locals||"object"!=typeof locals.$scope)throw minErr("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",constructor||expression.name,identifier);locals.$scope[identifier]=instance}return instance}}]}function $DocumentProvider(){this.$get=["$window",function(window){return jqLite(window.document)}]}function $ExceptionHandlerProvider(){this.$get=["$log",function($log){return function(){$log.error.apply($log,arguments)}}]}function parseHeaders(headers){var key,val,i,parsed={};return headers?(forEach(headers.split("\n"),function(line){i=line.indexOf(":"),key=lowercase(trim(line.substr(0,i))),val=trim(line.substr(i+1)),key&&(parsed[key]?parsed[key]+=", "+val:parsed[key]=val)}),parsed):parsed}function headersGetter(headers){var headersObj=isObject(headers)?headers:undefined;return function(name){return headersObj||(headersObj=parseHeaders(headers)),name?headersObj[lowercase(name)]||null:headersObj}}function transformData(data,headers,fns){return isFunction(fns)?fns(data,headers):(forEach(fns,function(fn){data=fn(data,headers)}),data)}function isSuccess(status){return status>=200&&300>status}function $HttpProvider(){var JSON_START=/^\s*(\[|\{[^\{])/,JSON_END=/[\}\]]\s*$/,PROTECTION_PREFIX=/^\)\]\}',?\n/,CONTENT_TYPE_APPLICATION_JSON={"Content-Type":"application/json;charset=utf-8"},defaults=this.defaults={transformResponse:[function(data){return isString(data)&&(data=data.replace(PROTECTION_PREFIX,""),JSON_START.test(data)&&JSON_END.test(data)&&(data=fromJson(data))),data}],transformRequest:[function(d){return!isObject(d)||isFile(d)||isBlob(d)?d:toJson(d)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:copy(CONTENT_TYPE_APPLICATION_JSON),put:copy(CONTENT_TYPE_APPLICATION_JSON),patch:copy(CONTENT_TYPE_APPLICATION_JSON)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},interceptorFactories=this.interceptors=[],responseInterceptorFactories=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function($httpBackend,$browser,$cacheFactory,$rootScope,$q,$injector){function $http(requestConfig){function transformResponse(response){var resp=extend({},response,{data:transformData(response.data,response.headers,config.transformResponse)});return isSuccess(response.status)?resp:$q.reject(resp)}function mergeHeaders(config){function execHeaders(headers){var headerContent;forEach(headers,function(headerFn,header){isFunction(headerFn)&&(headerContent=headerFn(),null!=headerContent?headers[header]=headerContent:delete headers[header])})}var defHeaderName,lowercaseDefHeaderName,reqHeaderName,defHeaders=defaults.headers,reqHeaders=extend({},config.headers);defHeaders=extend({},defHeaders.common,defHeaders[lowercase(config.method)]),execHeaders(defHeaders),execHeaders(reqHeaders);defaultHeadersIteration:for(defHeaderName in defHeaders){lowercaseDefHeaderName=lowercase(defHeaderName);for(reqHeaderName in reqHeaders)if(lowercase(reqHeaderName)===lowercaseDefHeaderName)continue defaultHeadersIteration;reqHeaders[defHeaderName]=defHeaders[defHeaderName]}return reqHeaders}var config={method:"get",transformRequest:defaults.transformRequest,transformResponse:defaults.transformResponse},headers=mergeHeaders(requestConfig);extend(config,requestConfig),config.headers=headers,config.method=uppercase(config.method);
  var xsrfValue=urlIsSameOrigin(config.url)?$browser.cookies()[config.xsrfCookieName||defaults.xsrfCookieName]:undefined;xsrfValue&&(headers[config.xsrfHeaderName||defaults.xsrfHeaderName]=xsrfValue);var serverRequest=function(config){headers=config.headers;var reqData=transformData(config.data,headersGetter(headers),config.transformRequest);return isUndefined(config.data)&&forEach(headers,function(value,header){"content-type"===lowercase(header)&&delete headers[header]}),isUndefined(config.withCredentials)&&!isUndefined(defaults.withCredentials)&&(config.withCredentials=defaults.withCredentials),sendReq(config,reqData,headers).then(transformResponse,transformResponse)},chain=[serverRequest,undefined],promise=$q.when(config);for(forEach(reversedInterceptors,function(interceptor){(interceptor.request||interceptor.requestError)&&chain.unshift(interceptor.request,interceptor.requestError),(interceptor.response||interceptor.responseError)&&chain.push(interceptor.response,interceptor.responseError)});chain.length;){var thenFn=chain.shift(),rejectFn=chain.shift();promise=promise.then(thenFn,rejectFn)}return promise.success=function(fn){return promise.then(function(response){fn(response.data,response.status,response.headers,config)}),promise},promise.error=function(fn){return promise.then(null,function(response){fn(response.data,response.status,response.headers,config)}),promise},promise}function createShortMethods(){forEach(arguments,function(name){$http[name]=function(url,config){return $http(extend(config||{},{method:name,url:url}))}})}function createShortMethodsWithData(){forEach(arguments,function(name){$http[name]=function(url,data,config){return $http(extend(config||{},{method:name,url:url,data:data}))}})}function sendReq(config,reqData,reqHeaders){function done(status,response,headersString){cache&&(isSuccess(status)?cache.put(url,[status,response,parseHeaders(headersString)]):cache.remove(url)),resolvePromise(response,status,headersString),$rootScope.$$phase||$rootScope.$apply()}function resolvePromise(response,status,headers){status=Math.max(status,0),(isSuccess(status)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config})}function removePendingReq(){var idx=indexOf($http.pendingRequests,config);-1!==idx&&$http.pendingRequests.splice(idx,1)}var cache,cachedResp,deferred=$q.defer(),promise=deferred.promise,url=buildUrl(config.url,config.params);if($http.pendingRequests.push(config),promise.then(removePendingReq,removePendingReq),(config.cache||defaults.cache)&&config.cache!==!1&&"GET"==config.method&&(cache=isObject(config.cache)?config.cache:isObject(defaults.cache)?defaults.cache:defaultCache),cache)if(cachedResp=cache.get(url),isDefined(cachedResp)){if(cachedResp.then)return cachedResp.then(removePendingReq,removePendingReq),cachedResp;isArray(cachedResp)?resolvePromise(cachedResp[1],cachedResp[0],copy(cachedResp[2])):resolvePromise(cachedResp,200,{})}else cache.put(url,promise);return isUndefined(cachedResp)&&$httpBackend(config.method,url,reqData,done,reqHeaders,config.timeout,config.withCredentials,config.responseType),promise}function buildUrl(url,params){if(!params)return url;var parts=[];return forEachSorted(params,function(value,key){null===value||isUndefined(value)||(isArray(value)||(value=[value]),forEach(value,function(v){isObject(v)&&(v=toJson(v)),parts.push(encodeUriQuery(key)+"="+encodeUriQuery(v))}))}),parts.length>0&&(url+=(-1==url.indexOf("?")?"?":"&")+parts.join("&")),url}var defaultCache=$cacheFactory("$http"),reversedInterceptors=[];return forEach(interceptorFactories,function(interceptorFactory){reversedInterceptors.unshift(isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory))}),forEach(responseInterceptorFactories,function(interceptorFactory,index){var responseFn=isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory);reversedInterceptors.splice(index,0,{response:function(response){return responseFn($q.when(response))},responseError:function(response){return responseFn($q.reject(response))}})}),$http.pendingRequests=[],createShortMethods("get","delete","head","jsonp"),createShortMethodsWithData("post","put"),$http.defaults=defaults,$http}]}function createXhr(method){if(8>=msie&&(!method.match(/^(get|post|head|put|delete|options)$/i)||!window.XMLHttpRequest))return new window.ActiveXObject("Microsoft.XMLHTTP");if(window.XMLHttpRequest)return new window.XMLHttpRequest;throw minErr("$httpBackend")("noxhr","This browser does not support XMLHttpRequest.")}function $HttpBackendProvider(){this.$get=["$browser","$window","$document",function($browser,$window,$document){return createHttpBackend($browser,createXhr,$browser.defer,$window.angular.callbacks,$document[0])}]}function createHttpBackend($browser,createXhr,$browserDefer,callbacks,rawDocument){function jsonpReq(url,done){var script=rawDocument.createElement("script"),doneWrapper=function(){script.onreadystatechange=script.onload=script.onerror=null,rawDocument.body.removeChild(script),done&&done()};return script.type="text/javascript",script.src=url,msie&&8>=msie?script.onreadystatechange=function(){/loaded|complete/.test(script.readyState)&&doneWrapper()}:script.onload=script.onerror=function(){doneWrapper()},rawDocument.body.appendChild(script),doneWrapper}var ABORTED=-1;return function(method,url,post,callback,headers,timeout,withCredentials,responseType){function timeoutRequest(){status=ABORTED,jsonpDone&&jsonpDone(),xhr&&xhr.abort()}function completeRequest(callback,status,response,headersString){timeoutId&&$browserDefer.cancel(timeoutId),jsonpDone=xhr=null,0===status&&(status=response?200:"file"==urlResolve(url).protocol?404:0),status=1223==status?204:status,callback(status,response,headersString),$browser.$$completeOutstandingRequest(noop)}var status;if($browser.$$incOutstandingRequestCount(),url=url||$browser.url(),"jsonp"==lowercase(method)){var callbackId="_"+(callbacks.counter++).toString(36);callbacks[callbackId]=function(data){callbacks[callbackId].data=data};var jsonpDone=jsonpReq(url.replace("JSON_CALLBACK","angular.callbacks."+callbackId),function(){callbacks[callbackId].data?completeRequest(callback,200,callbacks[callbackId].data):completeRequest(callback,status||-2),callbacks[callbackId]=angular.noop})}else{var xhr=createXhr(method);if(xhr.open(method,url,!0),forEach(headers,function(value,key){isDefined(value)&&xhr.setRequestHeader(key,value)}),xhr.onreadystatechange=function(){if(xhr&&4==xhr.readyState){var responseHeaders=null,response=null;status!==ABORTED&&(responseHeaders=xhr.getAllResponseHeaders(),response="response"in xhr?xhr.response:xhr.responseText),completeRequest(callback,status||xhr.status,response,responseHeaders)}},withCredentials&&(xhr.withCredentials=!0),responseType)try{xhr.responseType=responseType}catch(e){if("json"!==responseType)throw e}xhr.send(post||null)}if(timeout>0)var timeoutId=$browserDefer(timeoutRequest,timeout);else timeout&&timeout.then&&timeout.then(timeoutRequest)}}function $InterpolateProvider(){var startSymbol="{{",endSymbol="}}";this.startSymbol=function(value){return value?(startSymbol=value,this):startSymbol},this.endSymbol=function(value){return value?(endSymbol=value,this):endSymbol},this.$get=["$parse","$exceptionHandler","$sce",function($parse,$exceptionHandler,$sce){function $interpolate(text,mustHaveExpression,trustedContext){for(var startIndex,endIndex,fn,exp,index=0,parts=[],length=text.length,hasInterpolation=!1,concat=[];length>index;)-1!=(startIndex=text.indexOf(startSymbol,index))&&-1!=(endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))?(index!=startIndex&&parts.push(text.substring(index,startIndex)),parts.push(fn=$parse(exp=text.substring(startIndex+startSymbolLength,endIndex))),fn.exp=exp,index=endIndex+endSymbolLength,hasInterpolation=!0):(index!=length&&parts.push(text.substring(index)),index=length);if((length=parts.length)||(parts.push(""),length=1),trustedContext&&parts.length>1)throw $interpolateMinErr("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",text);return!mustHaveExpression||hasInterpolation?(concat.length=length,fn=function(context){try{for(var part,i=0,ii=length;ii>i;i++)"function"==typeof(part=parts[i])&&(part=part(context),part=trustedContext?$sce.getTrusted(trustedContext,part):$sce.valueOf(part),null===part||isUndefined(part)?part="":"string"!=typeof part&&(part=toJson(part))),concat[i]=part;return concat.join("")}catch(err){var newErr=$interpolateMinErr("interr","Can't interpolate: {0}\n{1}",text,err.toString());$exceptionHandler(newErr)}},fn.exp=text,fn.parts=parts,fn):void 0}var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length;return $interpolate.startSymbol=function(){return startSymbol},$interpolate.endSymbol=function(){return endSymbol},$interpolate}]}function $IntervalProvider(){this.$get=["$rootScope","$window","$q",function($rootScope,$window,$q){function interval(fn,delay,count,invokeApply){var setInterval=$window.setInterval,clearInterval=$window.clearInterval,deferred=$q.defer(),promise=deferred.promise,iteration=0,skipApply=isDefined(invokeApply)&&!invokeApply;return count=isDefined(count)?count:0,promise.then(null,null,fn),promise.$$intervalId=setInterval(function(){deferred.notify(iteration++),count>0&&iteration>=count&&(deferred.resolve(iteration),clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId]),skipApply||$rootScope.$apply()},delay),intervals[promise.$$intervalId]=deferred,promise}var intervals={};return interval.cancel=function(promise){return promise&&promise.$$intervalId in intervals?(intervals[promise.$$intervalId].reject("canceled"),clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId],!0):!1},interval}]}function $LocaleProvider(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\xa4",posSuf:"",negPre:"(\xa4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(num){return 1===num?"one":"other"}}}}function encodePath(path){for(var segments=path.split("/"),i=segments.length;i--;)segments[i]=encodeUriSegment(segments[i]);return segments.join("/")}function parseAbsoluteUrl(absoluteUrl,locationObj,appBase){var parsedUrl=urlResolve(absoluteUrl,appBase);locationObj.$$protocol=parsedUrl.protocol,locationObj.$$host=parsedUrl.hostname,locationObj.$$port=int(parsedUrl.port)||DEFAULT_PORTS[parsedUrl.protocol]||null}function parseAppUrl(relativeUrl,locationObj,appBase){var prefixed="/"!==relativeUrl.charAt(0);prefixed&&(relativeUrl="/"+relativeUrl);var match=urlResolve(relativeUrl,appBase);locationObj.$$path=decodeURIComponent(prefixed&&"/"===match.pathname.charAt(0)?match.pathname.substring(1):match.pathname),locationObj.$$search=parseKeyValue(match.search),locationObj.$$hash=decodeURIComponent(match.hash),locationObj.$$path&&"/"!=locationObj.$$path.charAt(0)&&(locationObj.$$path="/"+locationObj.$$path)}function beginsWith(begin,whole){return 0===whole.indexOf(begin)?whole.substr(begin.length):void 0}function stripHash(url){var index=url.indexOf("#");return-1==index?url:url.substr(0,index)}function stripFile(url){return url.substr(0,stripHash(url).lastIndexOf("/")+1)}function serverBase(url){return url.substring(0,url.indexOf("/",url.indexOf("//")+2))}function LocationHtml5Url(appBase,basePrefix){this.$$html5=!0,basePrefix=basePrefix||"";var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this,appBase),this.$$parse=function(url){var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl))throw $locationMinErr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',url,appBaseNoFile);parseAppUrl(pathUrl,this,appBase),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBaseNoFile+this.$$url.substr(1)},this.$$rewrite=function(url){var appUrl,prevAppUrl;return(appUrl=beginsWith(appBase,url))!==undefined?(prevAppUrl=appUrl,(appUrl=beginsWith(basePrefix,appUrl))!==undefined?appBaseNoFile+(beginsWith("/",appUrl)||appUrl):appBase+prevAppUrl):(appUrl=beginsWith(appBaseNoFile,url))!==undefined?appBaseNoFile+appUrl:appBaseNoFile==url+"/"?appBaseNoFile:void 0}}function LocationHashbangUrl(appBase,hashPrefix){var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this,appBase),this.$$parse=function(url){function removeWindowsDriveName(path,url,base){var firstPathSegmentMatch,windowsFilePathExp=/^\/?.*?:(\/.*)/;return 0===url.indexOf(base)&&(url=url.replace(base,"")),windowsFilePathExp.exec(url)?path:(firstPathSegmentMatch=windowsFilePathExp.exec(path),firstPathSegmentMatch?firstPathSegmentMatch[1]:path)}var withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url),withoutHashUrl="#"==withoutBaseUrl.charAt(0)?beginsWith(hashPrefix,withoutBaseUrl):this.$$html5?withoutBaseUrl:"";if(!isString(withoutHashUrl))throw $locationMinErr("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',url,hashPrefix);parseAppUrl(withoutHashUrl,this,appBase),this.$$path=removeWindowsDriveName(this.$$path,withoutHashUrl,appBase),this.$$compose()},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:"")},this.$$rewrite=function(url){return stripHash(appBase)==stripHash(url)?url:void 0}}function LocationHashbangInHtml5Url(appBase,hashPrefix){this.$$html5=!0,LocationHashbangUrl.apply(this,arguments);var appBaseNoFile=stripFile(appBase);this.$$rewrite=function(url){var appUrl;return appBase==stripHash(url)?url:(appUrl=beginsWith(appBaseNoFile,url))?appBase+hashPrefix+appUrl:appBaseNoFile===url+"/"?appBaseNoFile:void 0}}function locationGetter(property){return function(){return this[property]}}function locationGetterSetter(property,preprocess){return function(value){return isUndefined(value)?this[property]:(this[property]=preprocess(value),this.$$compose(),this)}}function $LocationProvider(){var hashPrefix="",html5Mode=!1;this.hashPrefix=function(prefix){return isDefined(prefix)?(hashPrefix=prefix,this):hashPrefix},this.html5Mode=function(mode){return isDefined(mode)?(html5Mode=mode,this):html5Mode},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function($rootScope,$browser,$sniffer,$rootElement){function afterLocationChange(oldUrl){$rootScope.$broadcast("$locationChangeSuccess",$location.absUrl(),oldUrl)}var $location,LocationMode,appBase,baseHref=$browser.baseHref(),initialUrl=$browser.url();html5Mode?(appBase=serverBase(initialUrl)+(baseHref||"/"),LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url):(appBase=stripHash(initialUrl),LocationMode=LocationHashbangUrl),$location=new LocationMode(appBase,"#"+hashPrefix),$location.$$parse($location.$$rewrite(initialUrl)),$rootElement.on("click",function(event){if(!event.ctrlKey&&!event.metaKey&&2!=event.which){for(var elm=jqLite(event.target);"a"!==lowercase(elm[0].nodeName);)if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;var absHref=elm.prop("href");isObject(absHref)&&"[object SVGAnimatedString]"===absHref.toString()&&(absHref=urlResolve(absHref.animVal).href);var rewrittenUrl=$location.$$rewrite(absHref);absHref&&!elm.attr("target")&&rewrittenUrl&&!event.isDefaultPrevented()&&(event.preventDefault(),rewrittenUrl!=$browser.url()&&($location.$$parse(rewrittenUrl),$rootScope.$apply(),window.angular["ff-684208-preventDefault"]=!0))}}),$location.absUrl()!=initialUrl&&$browser.url($location.absUrl(),!0),$browser.onUrlChange(function(newUrl){$location.absUrl()!=newUrl&&($rootScope.$evalAsync(function(){var oldUrl=$location.absUrl();$location.$$parse(newUrl),$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl).defaultPrevented?($location.$$parse(oldUrl),$browser.url(oldUrl)):afterLocationChange(oldUrl)}),$rootScope.$$phase||$rootScope.$digest())});var changeCounter=0;return $rootScope.$watch(function(){var oldUrl=$browser.url(),currentReplace=$location.$$replace;return changeCounter&&oldUrl==$location.absUrl()||(changeCounter++,$rootScope.$evalAsync(function(){$rootScope.$broadcast("$locationChangeStart",$location.absUrl(),oldUrl).defaultPrevented?$location.$$parse(oldUrl):($browser.url($location.absUrl(),currentReplace),afterLocationChange(oldUrl))})),$location.$$replace=!1,changeCounter}),$location}]}function $LogProvider(){var debug=!0,self=this;this.debugEnabled=function(flag){return isDefined(flag)?(debug=flag,this):debug},this.$get=["$window",function($window){function formatError(arg){return arg instanceof Error&&(arg.stack?arg=arg.message&&-1===arg.stack.indexOf(arg.message)?"Error: "+arg.message+"\n"+arg.stack:arg.stack:arg.sourceURL&&(arg=arg.message+"\n"+arg.sourceURL+":"+arg.line)),arg}function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop,hasApply=!1;try{hasApply=!!logFn.apply}catch(e){}return hasApply?function(){var args=[];return forEach(arguments,function(arg){args.push(formatError(arg))}),logFn.apply(console,args)}:function(arg1,arg2){logFn(arg1,null==arg2?"":arg2)}}return{log:consoleLog("log"),info:consoleLog("info"),warn:consoleLog("warn"),error:consoleLog("error"),debug:function(){var fn=consoleLog("debug");return function(){debug&&fn.apply(self,arguments)}}()}}]}function ensureSafeMemberName(name,fullExpression){if("constructor"===name)throw $parseMinErr("isecfld",'Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}',fullExpression);return name}function ensureSafeObject(obj,fullExpression){if(obj){if(obj.constructor===obj)throw $parseMinErr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj.document&&obj.location&&obj.alert&&obj.setInterval)throw $parseMinErr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj.children&&(obj.nodeName||obj.prop&&obj.attr&&obj.find))throw $parseMinErr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",fullExpression)}return obj}function setter(obj,path,setValue,fullExp,options){options=options||{};for(var key,element=path.split("."),i=0;element.length>1;i++){key=ensureSafeMemberName(element.shift(),fullExp);var propertyObj=obj[key];propertyObj||(propertyObj={},obj[key]=propertyObj),obj=propertyObj,obj.then&&options.unwrapPromises&&(promiseWarning(fullExp),"$$v"in obj||!function(promise){promise.then(function(val){promise.$$v=val})}(obj),obj.$$v===undefined&&(obj.$$v={}),obj=obj.$$v)}return key=ensureSafeMemberName(element.shift(),fullExp),obj[key]=setValue,setValue}function cspSafeGetterFn(key0,key1,key2,key3,key4,fullExp,options){return ensureSafeMemberName(key0,fullExp),ensureSafeMemberName(key1,fullExp),ensureSafeMemberName(key2,fullExp),ensureSafeMemberName(key3,fullExp),ensureSafeMemberName(key4,fullExp),options.unwrapPromises?function(scope,locals){var promise,pathVal=locals&&locals.hasOwnProperty(key0)?locals:scope;return null==pathVal?pathVal:(pathVal=pathVal[key0],pathVal&&pathVal.then&&(promiseWarning(fullExp),"$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key1?null==pathVal?undefined:(pathVal=pathVal[key1],pathVal&&pathVal.then&&(promiseWarning(fullExp),"$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key2?null==pathVal?undefined:(pathVal=pathVal[key2],pathVal&&pathVal.then&&(promiseWarning(fullExp),"$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key3?null==pathVal?undefined:(pathVal=pathVal[key3],pathVal&&pathVal.then&&(promiseWarning(fullExp),"$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key4?null==pathVal?undefined:(pathVal=pathVal[key4],pathVal&&pathVal.then&&(promiseWarning(fullExp),"$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),pathVal):pathVal):pathVal):pathVal):pathVal)}:function(scope,locals){var pathVal=locals&&locals.hasOwnProperty(key0)?locals:scope;return null==pathVal?pathVal:(pathVal=pathVal[key0],key1?null==pathVal?undefined:(pathVal=pathVal[key1],key2?null==pathVal?undefined:(pathVal=pathVal[key2],key3?null==pathVal?undefined:(pathVal=pathVal[key3],key4?null==pathVal?undefined:pathVal=pathVal[key4]:pathVal):pathVal):pathVal):pathVal)}}function simpleGetterFn1(key0,fullExp){return ensureSafeMemberName(key0,fullExp),function(scope,locals){return null==scope?undefined:(locals&&locals.hasOwnProperty(key0)?locals:scope)[key0]}}function simpleGetterFn2(key0,key1,fullExp){return ensureSafeMemberName(key0,fullExp),ensureSafeMemberName(key1,fullExp),function(scope,locals){return null==scope?undefined:(scope=(locals&&locals.hasOwnProperty(key0)?locals:scope)[key0],null==scope?undefined:scope[key1])}}function getterFn(path,options,fullExp){if(getterFnCache.hasOwnProperty(path))return getterFnCache[path];var fn,pathKeys=path.split("."),pathKeysLength=pathKeys.length;if(options.unwrapPromises||1!==pathKeysLength)if(options.unwrapPromises||2!==pathKeysLength)if(options.csp)fn=6>pathKeysLength?cspSafeGetterFn(pathKeys[0],pathKeys[1],pathKeys[2],pathKeys[3],pathKeys[4],fullExp,options):function(scope,locals){var val,i=0;do val=cspSafeGetterFn(pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],fullExp,options)(scope,locals),locals=undefined,scope=val;while(pathKeysLength>i);return val};else{var code="var p;\n";forEach(pathKeys,function(key,index){ensureSafeMemberName(key,fullExp),code+="if(s == null) return undefined;\ns="+(index?"s":'((k&&k.hasOwnProperty("'+key+'"))?k:s)')+'["'+key+'"];\n'+(options.unwrapPromises?'if (s && s.then) {\n pw("'+fullExp.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")}),code+="return s;";var evaledFnGetter=new Function("s","k","pw",code);evaledFnGetter.toString=valueFn(code),fn=options.unwrapPromises?function(scope,locals){return evaledFnGetter(scope,locals,promiseWarning)}:evaledFnGetter}else fn=simpleGetterFn2(pathKeys[0],pathKeys[1],fullExp);else fn=simpleGetterFn1(pathKeys[0],fullExp);return"hasOwnProperty"!==path&&(getterFnCache[path]=fn),fn}function $ParseProvider(){var cache={},$parseOptions={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(value){return isDefined(value)?($parseOptions.unwrapPromises=!!value,this):$parseOptions.unwrapPromises},this.logPromiseWarnings=function(value){return isDefined(value)?($parseOptions.logPromiseWarnings=value,this):$parseOptions.logPromiseWarnings},this.$get=["$filter","$sniffer","$log",function($filter,$sniffer,$log){return $parseOptions.csp=$sniffer.csp,promiseWarning=function(fullExp){$parseOptions.logPromiseWarnings&&!promiseWarningCache.hasOwnProperty(fullExp)&&(promiseWarningCache[fullExp]=!0,$log.warn("[$parse] Promise found in the expression `"+fullExp+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))},function(exp){var parsedExpression;switch(typeof exp){case"string":if(cache.hasOwnProperty(exp))return cache[exp];var lexer=new Lexer($parseOptions),parser=new Parser(lexer,$filter,$parseOptions);return parsedExpression=parser.parse(exp,!1),"hasOwnProperty"!==exp&&(cache[exp]=parsedExpression),parsedExpression;case"function":return exp;default:return noop}}}]}function $QProvider(){this.$get=["$rootScope","$exceptionHandler",function($rootScope,$exceptionHandler){return qFactory(function(callback){$rootScope.$evalAsync(callback)},$exceptionHandler)}]}function qFactory(nextTick,exceptionHandler){function defaultCallback(value){return value}function defaultErrback(reason){return reject(reason)}function all(promises){var deferred=defer(),counter=0,results=isArray(promises)?[]:{};return forEach(promises,function(promise,key){counter++,ref(promise).then(function(value){results.hasOwnProperty(key)||(results[key]=value,--counter||deferred.resolve(results))},function(reason){results.hasOwnProperty(key)||deferred.reject(reason)})}),0===counter&&deferred.resolve(results),deferred.promise}var defer=function(){var value,deferred,pending=[];return deferred={resolve:function(val){if(pending){var callbacks=pending;pending=undefined,value=ref(val),callbacks.length&&nextTick(function(){for(var callback,i=0,ii=callbacks.length;ii>i;i++)callback=callbacks[i],value.then(callback[0],callback[1],callback[2])})}},reject:function(reason){deferred.resolve(createInternalRejectedPromise(reason))},notify:function(progress){if(pending){var callbacks=pending;pending.length&&nextTick(function(){for(var callback,i=0,ii=callbacks.length;ii>i;i++)callback=callbacks[i],callback[2](progress)})}},promise:{then:function(callback,errback,progressback){var result=defer(),wrappedCallback=function(value){try{result.resolve((isFunction(callback)?callback:defaultCallback)(value))}catch(e){result.reject(e),exceptionHandler(e)}},wrappedErrback=function(reason){try{result.resolve((isFunction(errback)?errback:defaultErrback)(reason))}catch(e){result.reject(e),exceptionHandler(e)}},wrappedProgressback=function(progress){try{result.notify((isFunction(progressback)?progressback:defaultCallback)(progress))}catch(e){exceptionHandler(e)}};return pending?pending.push([wrappedCallback,wrappedErrback,wrappedProgressback]):value.then(wrappedCallback,wrappedErrback,wrappedProgressback),result.promise},"catch":function(callback){return this.then(null,callback)},"finally":function(callback){function makePromise(value,resolved){var result=defer();return resolved?result.resolve(value):result.reject(value),result.promise}function handleCallback(value,isResolved){var callbackOutput=null;try{callbackOutput=(callback||defaultCallback)()}catch(e){return makePromise(e,!1)}return callbackOutput&&isFunction(callbackOutput.then)?callbackOutput.then(function(){return makePromise(value,isResolved)},function(error){return makePromise(error,!1)}):makePromise(value,isResolved)}return this.then(function(value){return handleCallback(value,!0)},function(error){return handleCallback(error,!1)})}}}},ref=function(value){return value&&isFunction(value.then)?value:{then:function(callback){var result=defer();return nextTick(function(){result.resolve(callback(value))}),result.promise}}},reject=function(reason){var result=defer();return result.reject(reason),result.promise},createInternalRejectedPromise=function(reason){return{then:function(callback,errback){var result=defer();return nextTick(function(){try{result.resolve((isFunction(errback)?errback:defaultErrback)(reason))}catch(e){result.reject(e),exceptionHandler(e)}}),result.promise}}},when=function(value,callback,errback,progressback){var done,result=defer(),wrappedCallback=function(value){try{return(isFunction(callback)?callback:defaultCallback)(value)}catch(e){return exceptionHandler(e),reject(e)}},wrappedErrback=function(reason){try{return(isFunction(errback)?errback:defaultErrback)(reason)}catch(e){return exceptionHandler(e),reject(e)}},wrappedProgressback=function(progress){try{return(isFunction(progressback)?progressback:defaultCallback)(progress)}catch(e){exceptionHandler(e)}};return nextTick(function(){ref(value).then(function(value){done||(done=!0,result.resolve(ref(value).then(wrappedCallback,wrappedErrback,wrappedProgressback)))},function(reason){done||(done=!0,result.resolve(wrappedErrback(reason)))},function(progress){done||result.notify(wrappedProgressback(progress))})}),result.promise};return{defer:defer,reject:reject,when:when,all:all}}function $$RAFProvider(){this.$get=["$window","$timeout",function($window,$timeout){var requestAnimationFrame=$window.requestAnimationFrame||$window.webkitRequestAnimationFrame||$window.mozRequestAnimationFrame,cancelAnimationFrame=$window.cancelAnimationFrame||$window.webkitCancelAnimationFrame||$window.mozCancelAnimationFrame||$window.webkitCancelRequestAnimationFrame,rafSupported=!!requestAnimationFrame,raf=rafSupported?function(fn){var id=requestAnimationFrame(fn);return function(){cancelAnimationFrame(id)}}:function(fn){var timer=$timeout(fn,16.66,!1);return function(){$timeout.cancel(timer)}};return raf.supported=rafSupported,raf}]}function $RootScopeProvider(){var TTL=10,$rootScopeMinErr=minErr("$rootScope"),lastDirtyWatch=null;this.digestTtl=function(value){return arguments.length&&(TTL=value),TTL},this.$get=["$injector","$exceptionHandler","$parse","$browser",function($injector,$exceptionHandler,$parse,$browser){function Scope(){this.$id=nextUid(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$postDigestQueue=[],this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings={}}function beginPhase(phase){if($rootScope.$$phase)throw $rootScopeMinErr("inprog","{0} already in progress",$rootScope.$$phase);$rootScope.$$phase=phase}function clearPhase(){$rootScope.$$phase=null}function compileToFn(exp,name){var fn=$parse(exp);return assertArgFn(fn,name),fn}function decrementListenerCount(current,count,name){do current.$$listenerCount[name]-=count,0===current.$$listenerCount[name]&&delete current.$$listenerCount[name];while(current=current.$parent)}function initWatchVal(){}Scope.prototype={constructor:Scope,$new:function(isolate){var ChildScope,child;return isolate?(child=new Scope,child.$root=this.$root,child.$$asyncQueue=this.$$asyncQueue,child.$$postDigestQueue=this.$$postDigestQueue):(ChildScope=function(){},ChildScope.prototype=this,child=new ChildScope,child.$id=nextUid()),child["this"]=child,child.$$listeners={},child.$$listenerCount={},child.$parent=this,child.$$watchers=child.$$nextSibling=child.$$childHead=child.$$childTail=null,child.$$prevSibling=this.$$childTail,this.$$childHead?(this.$$childTail.$$nextSibling=child,this.$$childTail=child):this.$$childHead=this.$$childTail=child,child},$watch:function(watchExp,listener,objectEquality){var scope=this,get=compileToFn(watchExp,"watch"),array=scope.$$watchers,watcher={fn:listener,last:initWatchVal,get:get,exp:watchExp,eq:!!objectEquality};if(lastDirtyWatch=null,!isFunction(listener)){var listenFn=compileToFn(listener||noop,"listener");watcher.fn=function(newVal,oldVal,scope){listenFn(scope)}}if("string"==typeof watchExp&&get.constant){var originalFn=watcher.fn;watcher.fn=function(newVal,oldVal,scope){originalFn.call(this,newVal,oldVal,scope),arrayRemove(array,watcher)}}return array||(array=scope.$$watchers=[]),array.unshift(watcher),function(){arrayRemove(array,watcher),lastDirtyWatch=null}},$watchCollection:function(obj,listener){function $watchCollectionWatch(){newValue=objGetter(self);var newLength,key;if(isObject(newValue))if(isArrayLike(newValue)){oldValue!==internalArray&&(oldValue=internalArray,oldLength=oldValue.length=0,changeDetected++),newLength=newValue.length,oldLength!==newLength&&(changeDetected++,oldValue.length=oldLength=newLength);for(var i=0;newLength>i;i++){var bothNaN=oldValue[i]!==oldValue[i]&&newValue[i]!==newValue[i];bothNaN||oldValue[i]===newValue[i]||(changeDetected++,oldValue[i]=newValue[i])}}else{oldValue!==internalObject&&(oldValue=internalObject={},oldLength=0,changeDetected++),newLength=0;for(key in newValue)newValue.hasOwnProperty(key)&&(newLength++,oldValue.hasOwnProperty(key)?oldValue[key]!==newValue[key]&&(changeDetected++,oldValue[key]=newValue[key]):(oldLength++,oldValue[key]=newValue[key],changeDetected++));if(oldLength>newLength){changeDetected++;for(key in oldValue)oldValue.hasOwnProperty(key)&&!newValue.hasOwnProperty(key)&&(oldLength--,delete oldValue[key])
  }}else oldValue!==newValue&&(oldValue=newValue,changeDetected++);return changeDetected}function $watchCollectionAction(){if(initRun?(initRun=!1,listener(newValue,newValue,self)):listener(newValue,veryOldValue,self),trackVeryOldValue)if(isObject(newValue))if(isArrayLike(newValue)){veryOldValue=new Array(newValue.length);for(var i=0;i<newValue.length;i++)veryOldValue[i]=newValue[i]}else{veryOldValue={};for(var key in newValue)hasOwnProperty.call(newValue,key)&&(veryOldValue[key]=newValue[key])}else veryOldValue=newValue}var newValue,oldValue,veryOldValue,self=this,trackVeryOldValue=listener.length>1,changeDetected=0,objGetter=$parse(obj),internalArray=[],internalObject={},initRun=!0,oldLength=0;return this.$watch($watchCollectionWatch,$watchCollectionAction)},$digest:function(){var watch,value,last,watchers,length,dirty,next,current,logIdx,logMsg,asyncTask,asyncQueue=this.$$asyncQueue,postDigestQueue=this.$$postDigestQueue,ttl=TTL,target=this,watchLog=[];beginPhase("$digest"),lastDirtyWatch=null;do{for(dirty=!1,current=target;asyncQueue.length;){try{asyncTask=asyncQueue.shift(),asyncTask.scope.$eval(asyncTask.expression)}catch(e){clearPhase(),$exceptionHandler(e)}lastDirtyWatch=null}traverseScopesLoop:do{if(watchers=current.$$watchers)for(length=watchers.length;length--;)try{if(watch=watchers[length])if((value=watch.get(current))===(last=watch.last)||(watch.eq?equals(value,last):"number"==typeof value&&"number"==typeof last&&isNaN(value)&&isNaN(last))){if(watch===lastDirtyWatch){dirty=!1;break traverseScopesLoop}}else dirty=!0,lastDirtyWatch=watch,watch.last=watch.eq?copy(value):value,watch.fn(value,last===initWatchVal?value:last,current),5>ttl&&(logIdx=4-ttl,watchLog[logIdx]||(watchLog[logIdx]=[]),logMsg=isFunction(watch.exp)?"fn: "+(watch.exp.name||watch.exp.toString()):watch.exp,logMsg+="; newVal: "+toJson(value)+"; oldVal: "+toJson(last),watchLog[logIdx].push(logMsg))}catch(e){clearPhase(),$exceptionHandler(e)}if(!(next=current.$$childHead||current!==target&&current.$$nextSibling))for(;current!==target&&!(next=current.$$nextSibling);)current=current.$parent}while(current=next);if((dirty||asyncQueue.length)&&!ttl--)throw clearPhase(),$rootScopeMinErr("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",TTL,toJson(watchLog))}while(dirty||asyncQueue.length);for(clearPhase();postDigestQueue.length;)try{postDigestQueue.shift()()}catch(e){$exceptionHandler(e)}},$destroy:function(){if(!this.$$destroyed){var parent=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this!==$rootScope&&(forEach(this.$$listenerCount,bind(null,decrementListenerCount,this)),parent.$$childHead==this&&(parent.$$childHead=this.$$nextSibling),parent.$$childTail==this&&(parent.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null)}},$eval:function(expr,locals){return $parse(expr)(this,locals)},$evalAsync:function(expr){$rootScope.$$phase||$rootScope.$$asyncQueue.length||$browser.defer(function(){$rootScope.$$asyncQueue.length&&$rootScope.$digest()}),this.$$asyncQueue.push({scope:this,expression:expr})},$$postDigest:function(fn){this.$$postDigestQueue.push(fn)},$apply:function(expr){try{return beginPhase("$apply"),this.$eval(expr)}catch(e){$exceptionHandler(e)}finally{clearPhase();try{$rootScope.$digest()}catch(e){throw $exceptionHandler(e),e}}},$on:function(name,listener){var namedListeners=this.$$listeners[name];namedListeners||(this.$$listeners[name]=namedListeners=[]),namedListeners.push(listener);var current=this;do current.$$listenerCount[name]||(current.$$listenerCount[name]=0),current.$$listenerCount[name]++;while(current=current.$parent);var self=this;return function(){namedListeners[indexOf(namedListeners,listener)]=null,decrementListenerCount(self,1,name)}},$emit:function(name){var namedListeners,i,length,empty=[],scope=this,stopPropagation=!1,event={name:name,targetScope:scope,stopPropagation:function(){stopPropagation=!0},preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1},listenerArgs=concat([event],arguments,1);do{for(namedListeners=scope.$$listeners[name]||empty,event.currentScope=scope,i=0,length=namedListeners.length;length>i;i++)if(namedListeners[i])try{namedListeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else namedListeners.splice(i,1),i--,length--;if(stopPropagation)return event;scope=scope.$parent}while(scope);return event},$broadcast:function(name){for(var listeners,i,length,target=this,current=target,next=target,event={name:name,targetScope:target,preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1},listenerArgs=concat([event],arguments,1);current=next;){for(event.currentScope=current,listeners=current.$$listeners[name]||[],i=0,length=listeners.length;length>i;i++)if(listeners[i])try{listeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else listeners.splice(i,1),i--,length--;if(!(next=current.$$listenerCount[name]&&current.$$childHead||current!==target&&current.$$nextSibling))for(;current!==target&&!(next=current.$$nextSibling);)current=current.$parent}return event}};var $rootScope=new Scope;return $rootScope}]}function $$SanitizeUriProvider(){var aHrefSanitizationWhitelist=/^\s*(https?|ftp|mailto|tel|file):/,imgSrcSanitizationWhitelist=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(regexp){return isDefined(regexp)?(aHrefSanitizationWhitelist=regexp,this):aHrefSanitizationWhitelist},this.imgSrcSanitizationWhitelist=function(regexp){return isDefined(regexp)?(imgSrcSanitizationWhitelist=regexp,this):imgSrcSanitizationWhitelist},this.$get=function(){return function(uri,isImage){var normalizedVal,regex=isImage?imgSrcSanitizationWhitelist:aHrefSanitizationWhitelist;return msie&&!(msie>=8)||(normalizedVal=urlResolve(uri).href,""===normalizedVal||normalizedVal.match(regex))?uri:"unsafe:"+normalizedVal}}}function escapeForRegexp(s){return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}function adjustMatcher(matcher){if("self"===matcher)return matcher;if(isString(matcher)){if(matcher.indexOf("***")>-1)throw $sceMinErr("iwcard","Illegal sequence *** in string matcher.  String: {0}",matcher);return matcher=escapeForRegexp(matcher).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+matcher+"$")}if(isRegExp(matcher))return new RegExp("^"+matcher.source+"$");throw $sceMinErr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function adjustMatchers(matchers){var adjustedMatchers=[];return isDefined(matchers)&&forEach(matchers,function(matcher){adjustedMatchers.push(adjustMatcher(matcher))}),adjustedMatchers}function $SceDelegateProvider(){this.SCE_CONTEXTS=SCE_CONTEXTS;var resourceUrlWhitelist=["self"],resourceUrlBlacklist=[];this.resourceUrlWhitelist=function(value){return arguments.length&&(resourceUrlWhitelist=adjustMatchers(value)),resourceUrlWhitelist},this.resourceUrlBlacklist=function(value){return arguments.length&&(resourceUrlBlacklist=adjustMatchers(value)),resourceUrlBlacklist},this.$get=["$injector",function($injector){function matchUrl(matcher,parsedUrl){return"self"===matcher?urlIsSameOrigin(parsedUrl):!!matcher.exec(parsedUrl.href)}function isResourceUrlAllowedByPolicy(url){var i,n,parsedUrl=urlResolve(url.toString()),allowed=!1;for(i=0,n=resourceUrlWhitelist.length;n>i;i++)if(matchUrl(resourceUrlWhitelist[i],parsedUrl)){allowed=!0;break}if(allowed)for(i=0,n=resourceUrlBlacklist.length;n>i;i++)if(matchUrl(resourceUrlBlacklist[i],parsedUrl)){allowed=!1;break}return allowed}function generateHolderType(Base){var holderType=function(trustedValue){this.$$unwrapTrustedValue=function(){return trustedValue}};return Base&&(holderType.prototype=new Base),holderType.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},holderType.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},holderType}function trustAs(type,trustedValue){var Constructor=byType.hasOwnProperty(type)?byType[type]:null;if(!Constructor)throw $sceMinErr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",type,trustedValue);if(null===trustedValue||trustedValue===undefined||""===trustedValue)return trustedValue;if("string"!=typeof trustedValue)throw $sceMinErr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",type);return new Constructor(trustedValue)}function valueOf(maybeTrusted){return maybeTrusted instanceof trustedValueHolderBase?maybeTrusted.$$unwrapTrustedValue():maybeTrusted}function getTrusted(type,maybeTrusted){if(null===maybeTrusted||maybeTrusted===undefined||""===maybeTrusted)return maybeTrusted;var constructor=byType.hasOwnProperty(type)?byType[type]:null;if(constructor&&maybeTrusted instanceof constructor)return maybeTrusted.$$unwrapTrustedValue();if(type===SCE_CONTEXTS.RESOURCE_URL){if(isResourceUrlAllowedByPolicy(maybeTrusted))return maybeTrusted;throw $sceMinErr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",maybeTrusted.toString())}if(type===SCE_CONTEXTS.HTML)return htmlSanitizer(maybeTrusted);throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")}var htmlSanitizer=function(){throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")};$injector.has("$sanitize")&&(htmlSanitizer=$injector.get("$sanitize"));var trustedValueHolderBase=generateHolderType(),byType={};return byType[SCE_CONTEXTS.HTML]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.CSS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.URL]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.JS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.RESOURCE_URL]=generateHolderType(byType[SCE_CONTEXTS.URL]),{trustAs:trustAs,getTrusted:getTrusted,valueOf:valueOf}}]}function $SceProvider(){var enabled=!0;this.enabled=function(value){return arguments.length&&(enabled=!!value),enabled},this.$get=["$parse","$sniffer","$sceDelegate",function($parse,$sniffer,$sceDelegate){if(enabled&&$sniffer.msie&&$sniffer.msieDocumentMode<8)throw $sceMinErr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var sce=copy(SCE_CONTEXTS);sce.isEnabled=function(){return enabled},sce.trustAs=$sceDelegate.trustAs,sce.getTrusted=$sceDelegate.getTrusted,sce.valueOf=$sceDelegate.valueOf,enabled||(sce.trustAs=sce.getTrusted=function(type,value){return value},sce.valueOf=identity),sce.parseAs=function(type,expr){var parsed=$parse(expr);return parsed.literal&&parsed.constant?parsed:function(self,locals){return sce.getTrusted(type,parsed(self,locals))}};var parse=sce.parseAs,getTrusted=sce.getTrusted,trustAs=sce.trustAs;return forEach(SCE_CONTEXTS,function(enumValue,name){var lName=lowercase(name);sce[camelCase("parse_as_"+lName)]=function(expr){return parse(enumValue,expr)},sce[camelCase("get_trusted_"+lName)]=function(value){return getTrusted(enumValue,value)},sce[camelCase("trust_as_"+lName)]=function(value){return trustAs(enumValue,value)}}),sce}]}function $SnifferProvider(){this.$get=["$window","$document",function($window,$document){var vendorPrefix,match,eventSupport={},android=int((/android (\d+)/.exec(lowercase(($window.navigator||{}).userAgent))||[])[1]),boxee=/Boxee/i.test(($window.navigator||{}).userAgent),document=$document[0]||{},documentMode=document.documentMode,vendorRegex=/^(Moz|webkit|O|ms)(?=[A-Z])/,bodyStyle=document.body&&document.body.style,transitions=!1,animations=!1;if(bodyStyle){for(var prop in bodyStyle)if(match=vendorRegex.exec(prop)){vendorPrefix=match[0],vendorPrefix=vendorPrefix.substr(0,1).toUpperCase()+vendorPrefix.substr(1);break}vendorPrefix||(vendorPrefix="WebkitOpacity"in bodyStyle&&"webkit"),transitions=!!("transition"in bodyStyle||vendorPrefix+"Transition"in bodyStyle),animations=!!("animation"in bodyStyle||vendorPrefix+"Animation"in bodyStyle),!android||transitions&&animations||(transitions=isString(document.body.style.webkitTransition),animations=isString(document.body.style.webkitAnimation))}return{history:!(!$window.history||!$window.history.pushState||4>android||boxee),hashchange:"onhashchange"in $window&&(!documentMode||documentMode>7),hasEvent:function(event){if("input"==event&&9==msie)return!1;if(isUndefined(eventSupport[event])){var divElm=document.createElement("div");eventSupport[event]="on"+event in divElm}return eventSupport[event]},csp:csp(),vendorPrefix:vendorPrefix,transitions:transitions,animations:animations,android:android,msie:msie,msieDocumentMode:documentMode}}]}function $TimeoutProvider(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function($rootScope,$browser,$q,$exceptionHandler){function timeout(fn,delay,invokeApply){var timeoutId,deferred=$q.defer(),promise=deferred.promise,skipApply=isDefined(invokeApply)&&!invokeApply;return timeoutId=$browser.defer(function(){try{deferred.resolve(fn())}catch(e){deferred.reject(e),$exceptionHandler(e)}finally{delete deferreds[promise.$$timeoutId]}skipApply||$rootScope.$apply()},delay),promise.$$timeoutId=timeoutId,deferreds[timeoutId]=deferred,promise}var deferreds={};return timeout.cancel=function(promise){return promise&&promise.$$timeoutId in deferreds?(deferreds[promise.$$timeoutId].reject("canceled"),delete deferreds[promise.$$timeoutId],$browser.defer.cancel(promise.$$timeoutId)):!1},timeout}]}function urlResolve(url){var href=url;return msie&&(urlParsingNode.setAttribute("href",href),href=urlParsingNode.href),urlParsingNode.setAttribute("href",href),{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:"/"===urlParsingNode.pathname.charAt(0)?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}function urlIsSameOrigin(requestUrl){var parsed=isString(requestUrl)?urlResolve(requestUrl):requestUrl;return parsed.protocol===originUrl.protocol&&parsed.host===originUrl.host}function $WindowProvider(){this.$get=valueFn(window)}function $FilterProvider($provide){function register(name,factory){if(isObject(name)){var filters={};return forEach(name,function(filter,key){filters[key]=register(key,filter)}),filters}return $provide.factory(name+suffix,factory)}var suffix="Filter";this.register=register,this.$get=["$injector",function($injector){return function(name){return $injector.get(name+suffix)}}],register("currency",currencyFilter),register("date",dateFilter),register("filter",filterFilter),register("json",jsonFilter),register("limitTo",limitToFilter),register("lowercase",lowercaseFilter),register("number",numberFilter),register("orderBy",orderByFilter),register("uppercase",uppercaseFilter)}function filterFilter(){return function(array,expression,comparator){if(!isArray(array))return array;var comparatorType=typeof comparator,predicates=[];predicates.check=function(value){for(var j=0;j<predicates.length;j++)if(!predicates[j](value))return!1;return!0},"function"!==comparatorType&&(comparator="boolean"===comparatorType&&comparator?function(obj,text){return angular.equals(obj,text)}:function(obj,text){if(obj&&text&&"object"==typeof obj&&"object"==typeof text){for(var objKey in obj)if("$"!==objKey.charAt(0)&&hasOwnProperty.call(obj,objKey)&&comparator(obj[objKey],text[objKey]))return!0;return!1}return text=(""+text).toLowerCase(),(""+obj).toLowerCase().indexOf(text)>-1});var search=function(obj,text){if("string"==typeof text&&"!"===text.charAt(0))return!search(obj,text.substr(1));switch(typeof obj){case"boolean":case"number":case"string":return comparator(obj,text);case"object":switch(typeof text){case"object":return comparator(obj,text);default:for(var objKey in obj)if("$"!==objKey.charAt(0)&&search(obj[objKey],text))return!0}return!1;case"array":for(var i=0;i<obj.length;i++)if(search(obj[i],text))return!0;return!1;default:return!1}};switch(typeof expression){case"boolean":case"number":case"string":expression={$:expression};case"object":for(var key in expression)!function(path){"undefined"!=typeof expression[path]&&predicates.push(function(value){return search("$"==path?value:value&&value[path],expression[path])})}(key);break;case"function":predicates.push(expression);break;default:return array}for(var filtered=[],j=0;j<array.length;j++){var value=array[j];predicates.check(value)&&filtered.push(value)}return filtered}}function currencyFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(amount,currencySymbol){return isUndefined(currencySymbol)&&(currencySymbol=formats.CURRENCY_SYM),formatNumber(amount,formats.PATTERNS[1],formats.GROUP_SEP,formats.DECIMAL_SEP,2).replace(/\u00A4/g,currencySymbol)}}function numberFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(number,fractionSize){return formatNumber(number,formats.PATTERNS[0],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize)}}function formatNumber(number,pattern,groupSep,decimalSep,fractionSize){if(null==number||!isFinite(number)||isObject(number))return"";var isNegative=0>number;number=Math.abs(number);var numStr=number+"",formatedText="",parts=[],hasExponent=!1;if(-1!==numStr.indexOf("e")){var match=numStr.match(/([\d\.]+)e(-?)(\d+)/);match&&"-"==match[2]&&match[3]>fractionSize+1?numStr="0":(formatedText=numStr,hasExponent=!0)}if(hasExponent)fractionSize>0&&number>-1&&1>number&&(formatedText=number.toFixed(fractionSize));else{var fractionLen=(numStr.split(DECIMAL_SEP)[1]||"").length;isUndefined(fractionSize)&&(fractionSize=Math.min(Math.max(pattern.minFrac,fractionLen),pattern.maxFrac));var pow=Math.pow(10,fractionSize);number=Math.round(number*pow)/pow;var fraction=(""+number).split(DECIMAL_SEP),whole=fraction[0];fraction=fraction[1]||"";var i,pos=0,lgroup=pattern.lgSize,group=pattern.gSize;if(whole.length>=lgroup+group)for(pos=whole.length-lgroup,i=0;pos>i;i++)(pos-i)%group===0&&0!==i&&(formatedText+=groupSep),formatedText+=whole.charAt(i);for(i=pos;i<whole.length;i++)(whole.length-i)%lgroup===0&&0!==i&&(formatedText+=groupSep),formatedText+=whole.charAt(i);for(;fraction.length<fractionSize;)fraction+="0";fractionSize&&"0"!==fractionSize&&(formatedText+=decimalSep+fraction.substr(0,fractionSize))}return parts.push(isNegative?pattern.negPre:pattern.posPre),parts.push(formatedText),parts.push(isNegative?pattern.negSuf:pattern.posSuf),parts.join("")}function padNumber(num,digits,trim){var neg="";for(0>num&&(neg="-",num=-num),num=""+num;num.length<digits;)num="0"+num;return trim&&(num=num.substr(num.length-digits)),neg+num}function dateGetter(name,size,offset,trim){return offset=offset||0,function(date){var value=date["get"+name]();return(offset>0||value>-offset)&&(value+=offset),0===value&&-12==offset&&(value=12),padNumber(value,size,trim)}}function dateStrGetter(name,shortForm){return function(date,formats){var value=date["get"+name](),get=uppercase(shortForm?"SHORT"+name:name);return formats[get][value]}}function timeZoneGetter(date){var zone=-1*date.getTimezoneOffset(),paddedZone=zone>=0?"+":"";return paddedZone+=padNumber(Math[zone>0?"floor":"ceil"](zone/60),2)+padNumber(Math.abs(zone%60),2)}function ampmGetter(date,formats){return date.getHours()<12?formats.AMPMS[0]:formats.AMPMS[1]}function dateFilter($locale){function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;match[9]&&(tzHour=int(match[9]+match[10]),tzMin=int(match[9]+match[11])),dateSetter.call(date,int(match[1]),int(match[2])-1,int(match[3]));var h=int(match[4]||0)-tzHour,m=int(match[5]||0)-tzMin,s=int(match[6]||0),ms=Math.round(1e3*parseFloat("0."+(match[7]||0)));return timeSetter.call(date,h,m,s,ms),date}return string}var R_ISO8601_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(date,format){var fn,match,text="",parts=[];if(format=format||"mediumDate",format=$locale.DATETIME_FORMATS[format]||format,isString(date)&&(date=NUMBER_STRING.test(date)?int(date):jsonStringToDate(date)),isNumber(date)&&(date=new Date(date)),!isDate(date))return date;for(;format;)match=DATE_FORMATS_SPLIT.exec(format),match?(parts=concat(parts,match,1),format=parts.pop()):(parts.push(format),format=null);return forEach(parts,function(value){fn=DATE_FORMATS[value],text+=fn?fn(date,$locale.DATETIME_FORMATS):value.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),text}}function jsonFilter(){return function(object){return toJson(object,!0)}}function limitToFilter(){return function(input,limit){if(!isArray(input)&&!isString(input))return input;if(limit=int(limit),isString(input))return limit?limit>=0?input.slice(0,limit):input.slice(limit,input.length):"";var i,n,out=[];for(limit>input.length?limit=input.length:limit<-input.length&&(limit=-input.length),limit>0?(i=0,n=limit):(i=input.length+limit,n=input.length);n>i;i++)out.push(input[i]);return out}}function orderByFilter($parse){return function(array,sortPredicate,reverseOrder){function comparator(o1,o2){for(var i=0;i<sortPredicate.length;i++){var comp=sortPredicate[i](o1,o2);if(0!==comp)return comp}return 0}function reverseComparator(comp,descending){return toBoolean(descending)?function(a,b){return comp(b,a)}:comp}function compare(v1,v2){var t1=typeof v1,t2=typeof v2;return t1==t2?("string"==t1&&(v1=v1.toLowerCase(),v2=v2.toLowerCase()),v1===v2?0:v2>v1?-1:1):t2>t1?-1:1}if(!isArray(array))return array;if(!sortPredicate)return array;sortPredicate=isArray(sortPredicate)?sortPredicate:[sortPredicate],sortPredicate=map(sortPredicate,function(predicate){var descending=!1,get=predicate||identity;if(isString(predicate)&&(("+"==predicate.charAt(0)||"-"==predicate.charAt(0))&&(descending="-"==predicate.charAt(0),predicate=predicate.substring(1)),get=$parse(predicate),get.constant)){var key=get();return reverseComparator(function(a,b){return compare(a[key],b[key])},descending)}return reverseComparator(function(a,b){return compare(get(a),get(b))},descending)});for(var arrayCopy=[],i=0;i<array.length;i++)arrayCopy.push(array[i]);return arrayCopy.sort(reverseComparator(comparator,reverseOrder))}}function ngDirective(directive){return isFunction(directive)&&(directive={link:directive}),directive.restrict=directive.restrict||"AC",valueFn(directive)}function FormController(element,attrs,$scope,$animate){function toggleValidCss(isValid,validationErrorKey){validationErrorKey=validationErrorKey?"-"+snake_case(validationErrorKey,"-"):"",$animate.removeClass(element,(isValid?INVALID_CLASS:VALID_CLASS)+validationErrorKey),$animate.addClass(element,(isValid?VALID_CLASS:INVALID_CLASS)+validationErrorKey)}var form=this,parentForm=element.parent().controller("form")||nullFormCtrl,invalidCount=0,errors=form.$error={},controls=[];form.$name=attrs.name||attrs.ngForm,form.$dirty=!1,form.$pristine=!0,form.$valid=!0,form.$invalid=!1,parentForm.$addControl(form),element.addClass(PRISTINE_CLASS),toggleValidCss(!0),form.$addControl=function(control){assertNotHasOwnProperty(control.$name,"input"),controls.push(control),control.$name&&(form[control.$name]=control)},form.$removeControl=function(control){control.$name&&form[control.$name]===control&&delete form[control.$name],forEach(errors,function(queue,validationToken){form.$setValidity(validationToken,!0,control)}),arrayRemove(controls,control)},form.$setValidity=function(validationToken,isValid,control){var queue=errors[validationToken];if(isValid)queue&&(arrayRemove(queue,control),queue.length||(invalidCount--,invalidCount||(toggleValidCss(isValid),form.$valid=!0,form.$invalid=!1),errors[validationToken]=!1,toggleValidCss(!0,validationToken),parentForm.$setValidity(validationToken,!0,form)));else{if(invalidCount||toggleValidCss(isValid),queue){if(includes(queue,control))return}else errors[validationToken]=queue=[],invalidCount++,toggleValidCss(!1,validationToken),parentForm.$setValidity(validationToken,!1,form);queue.push(control),form.$valid=!1,form.$invalid=!0}},form.$setDirty=function(){$animate.removeClass(element,PRISTINE_CLASS),$animate.addClass(element,DIRTY_CLASS),form.$dirty=!0,form.$pristine=!1,parentForm.$setDirty()},form.$setPristine=function(){$animate.removeClass(element,DIRTY_CLASS),$animate.addClass(element,PRISTINE_CLASS),form.$dirty=!1,form.$pristine=!0,forEach(controls,function(control){control.$setPristine()})}}function validate(ctrl,validatorName,validity,value){return ctrl.$setValidity(validatorName,validity),validity?value:undefined}function addNativeHtml5Validators(ctrl,validatorName,element){var validity=element.prop("validity");if(isObject(validity)){var validator=function(value){return ctrl.$error[validatorName]||!(validity.badInput||validity.customError||validity.typeMismatch)||validity.valueMissing?value:void ctrl.$setValidity(validatorName,!1)};ctrl.$parsers.push(validator),ctrl.$formatters.push(validator)}}function textInputType(scope,element,attr,ctrl,$sniffer,$browser){var validity=element.prop("validity");if(!$sniffer.android){var composing=!1;element.on("compositionstart",function(){composing=!0}),element.on("compositionend",function(){composing=!1,listener()})}var listener=function(){if(!composing){var value=element.val();toBoolean(attr.ngTrim||"T")&&(value=trim(value)),(ctrl.$viewValue!==value||validity&&""===value&&!validity.valueMissing)&&(scope.$$phase?ctrl.$setViewValue(value):scope.$apply(function(){ctrl.$setViewValue(value)}))}};if($sniffer.hasEvent("input"))element.on("input",listener);else{var timeout,deferListener=function(){timeout||(timeout=$browser.defer(function(){listener(),timeout=null}))};element.on("keydown",function(event){var key=event.keyCode;91===key||key>15&&19>key||key>=37&&40>=key||deferListener()}),$sniffer.hasEvent("paste")&&element.on("paste cut",deferListener)}element.on("change",listener),ctrl.$render=function(){element.val(ctrl.$isEmpty(ctrl.$viewValue)?"":ctrl.$viewValue)};var patternValidator,match,pattern=attr.ngPattern;if(pattern){var validateRegex=function(regexp,value){return validate(ctrl,"pattern",ctrl.$isEmpty(value)||regexp.test(value),value)};match=pattern.match(/^\/(.*)\/([gim]*)$/),match?(pattern=new RegExp(match[1],match[2]),patternValidator=function(value){return validateRegex(pattern,value)}):patternValidator=function(value){var patternObj=scope.$eval(pattern);if(!patternObj||!patternObj.test)throw minErr("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",pattern,patternObj,startingTag(element));return validateRegex(patternObj,value)},ctrl.$formatters.push(patternValidator),ctrl.$parsers.push(patternValidator)}if(attr.ngMinlength){var minlength=int(attr.ngMinlength),minLengthValidator=function(value){return validate(ctrl,"minlength",ctrl.$isEmpty(value)||value.length>=minlength,value)};ctrl.$parsers.push(minLengthValidator),ctrl.$formatters.push(minLengthValidator)}if(attr.ngMaxlength){var maxlength=int(attr.ngMaxlength),maxLengthValidator=function(value){return validate(ctrl,"maxlength",ctrl.$isEmpty(value)||value.length<=maxlength,value)};ctrl.$parsers.push(maxLengthValidator),ctrl.$formatters.push(maxLengthValidator)}}function numberInputType(scope,element,attr,ctrl,$sniffer,$browser){if(textInputType(scope,element,attr,ctrl,$sniffer,$browser),ctrl.$parsers.push(function(value){var empty=ctrl.$isEmpty(value);return empty||NUMBER_REGEXP.test(value)?(ctrl.$setValidity("number",!0),""===value?null:empty?value:parseFloat(value)):(ctrl.$setValidity("number",!1),undefined)}),addNativeHtml5Validators(ctrl,"number",element),ctrl.$formatters.push(function(value){return ctrl.$isEmpty(value)?"":""+value}),attr.min){var minValidator=function(value){var min=parseFloat(attr.min);return validate(ctrl,"min",ctrl.$isEmpty(value)||value>=min,value)};ctrl.$parsers.push(minValidator),ctrl.$formatters.push(minValidator)}if(attr.max){var maxValidator=function(value){var max=parseFloat(attr.max);return validate(ctrl,"max",ctrl.$isEmpty(value)||max>=value,value)};ctrl.$parsers.push(maxValidator),ctrl.$formatters.push(maxValidator)}ctrl.$formatters.push(function(value){return validate(ctrl,"number",ctrl.$isEmpty(value)||isNumber(value),value)})}function urlInputType(scope,element,attr,ctrl,$sniffer,$browser){textInputType(scope,element,attr,ctrl,$sniffer,$browser);var urlValidator=function(value){return validate(ctrl,"url",ctrl.$isEmpty(value)||URL_REGEXP.test(value),value)};ctrl.$formatters.push(urlValidator),ctrl.$parsers.push(urlValidator)}function emailInputType(scope,element,attr,ctrl,$sniffer,$browser){textInputType(scope,element,attr,ctrl,$sniffer,$browser);var emailValidator=function(value){return validate(ctrl,"email",ctrl.$isEmpty(value)||EMAIL_REGEXP.test(value),value)};ctrl.$formatters.push(emailValidator),ctrl.$parsers.push(emailValidator)}function radioInputType(scope,element,attr,ctrl){isUndefined(attr.name)&&element.attr("name",nextUid()),element.on("click",function(){element[0].checked&&scope.$apply(function(){ctrl.$setViewValue(attr.value)})}),ctrl.$render=function(){var value=attr.value;element[0].checked=value==ctrl.$viewValue},attr.$observe("value",ctrl.$render)}function checkboxInputType(scope,element,attr,ctrl){var trueValue=attr.ngTrueValue,falseValue=attr.ngFalseValue;isString(trueValue)||(trueValue=!0),isString(falseValue)||(falseValue=!1),element.on("click",function(){scope.$apply(function(){ctrl.$setViewValue(element[0].checked)})}),ctrl.$render=function(){element[0].checked=ctrl.$viewValue},ctrl.$isEmpty=function(value){return value!==trueValue},ctrl.$formatters.push(function(value){return value===trueValue}),ctrl.$parsers.push(function(value){return value?trueValue:falseValue})}function classDirective(name,selector){return name="ngClass"+name,function(){return{restrict:"AC",link:function(scope,element,attr){function ngClassWatchAction(newVal){if(selector===!0||scope.$index%2===selector){var newClasses=flattenClasses(newVal||"");oldVal?equals(newVal,oldVal)||attr.$updateClass(newClasses,flattenClasses(oldVal)):attr.$addClass(newClasses)}oldVal=copy(newVal)}function flattenClasses(classVal){if(isArray(classVal))return classVal.join(" ");if(isObject(classVal)){var classes=[];return forEach(classVal,function(v,k){v&&classes.push(k)}),classes.join(" ")}return classVal}var oldVal;scope.$watch(attr[name],ngClassWatchAction,!0),attr.$observe("class",function(){ngClassWatchAction(scope.$eval(attr[name]))}),"ngClass"!==name&&scope.$watch("$index",function($index,old$index){var mod=1&$index;if(mod!==old$index&1){var classes=flattenClasses(scope.$eval(attr[name]));mod===selector?attr.$addClass(classes):attr.$removeClass(classes)}})}}}}var lowercase=function(string){return isString(string)?string.toLowerCase():string},hasOwnProperty=Object.prototype.hasOwnProperty,uppercase=function(string){return isString(string)?string.toUpperCase():string},manualLowercase=function(s){return isString(s)?s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(32|ch.charCodeAt(0))}):s},manualUppercase=function(s){return isString(s)?s.replace(/[a-z]/g,function(ch){return String.fromCharCode(-33&ch.charCodeAt(0))}):s};"i"!=="I".toLowerCase()&&(lowercase=manualLowercase,uppercase=manualUppercase);var msie,jqLite,jQuery,angularModule,nodeName_,slice=[].slice,push=[].push,toString=Object.prototype.toString,ngMinErr=minErr("ng"),angular=(window.angular,window.angular||(window.angular={})),uid=["0","0","0"];msie=int((/msie (\d+)/.exec(lowercase(navigator.userAgent))||[])[1]),isNaN(msie)&&(msie=int((/trident\/.*; rv:(\d+)/.exec(lowercase(navigator.userAgent))||[])[1])),noop.$inject=[],identity.$inject=[];var trim=function(){return String.prototype.trim?function(value){return isString(value)?value.trim():value}:function(value){return isString(value)?value.replace(/^\s\s*/,"").replace(/\s\s*$/,""):value}}();nodeName_=9>msie?function(element){return element=element.nodeName?element:element[0],element.scopeName&&"HTML"!=element.scopeName?uppercase(element.scopeName+":"+element.nodeName):element.nodeName}:function(element){return element.nodeName?element.nodeName:element[0].nodeName};var SNAKE_CASE_REGEXP=/[A-Z]/g,version={full:"1.2.15",major:1,minor:2,dot:15,codeName:"beer-underestimating"},jqCache=JQLite.cache={},jqName=JQLite.expando="ng-"+(new Date).getTime(),jqId=1,addEventListenerFn=window.document.addEventListener?function(element,type,fn){element.addEventListener(type,fn,!1)
  }:function(element,type,fn){element.attachEvent("on"+type,fn)},removeEventListenerFn=window.document.removeEventListener?function(element,type,fn){element.removeEventListener(type,fn,!1)}:function(element,type,fn){element.detachEvent("on"+type,fn)},SPECIAL_CHARS_REGEXP=(JQLite._data=function(node){return this.cache[node[this.expando]]||{}},/([\:\-\_]+(.))/g),MOZ_HACK_REGEXP=/^moz([A-Z])/,jqLiteMinErr=minErr("jqLite"),JQLitePrototype=JQLite.prototype={ready:function(fn){function trigger(){fired||(fired=!0,fn())}var fired=!1;"complete"===document.readyState?setTimeout(trigger):(this.on("DOMContentLoaded",trigger),JQLite(window).on("load",trigger))},toString:function(){var value=[];return forEach(this,function(e){value.push(""+e)}),"["+value.join(", ")+"]"},eq:function(index){return jqLite(index>=0?this[index]:this[this.length+index])},length:0,push:push,sort:[].sort,splice:[].splice},BOOLEAN_ATTR={};forEach("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(value){BOOLEAN_ATTR[lowercase(value)]=value});var BOOLEAN_ELEMENTS={};forEach("input,select,option,textarea,button,form,details".split(","),function(value){BOOLEAN_ELEMENTS[uppercase(value)]=!0}),forEach({data:jqLiteData,inheritedData:jqLiteInheritedData,scope:function(element){return jqLite(element).data("$scope")||jqLiteInheritedData(element.parentNode||element,["$isolateScope","$scope"])},isolateScope:function(element){return jqLite(element).data("$isolateScope")||jqLite(element).data("$isolateScopeNoTemplate")},controller:jqLiteController,injector:function(element){return jqLiteInheritedData(element,"$injector")},removeAttr:function(element,name){element.removeAttribute(name)},hasClass:jqLiteHasClass,css:function(element,name,value){if(name=camelCase(name),!isDefined(value)){var val;return 8>=msie&&(val=element.currentStyle&&element.currentStyle[name],""===val&&(val="auto")),val=val||element.style[name],8>=msie&&(val=""===val?undefined:val),val}element.style[name]=value},attr:function(element,name,value){var lowercasedName=lowercase(name);if(BOOLEAN_ATTR[lowercasedName]){if(!isDefined(value))return element[name]||(element.attributes.getNamedItem(name)||noop).specified?lowercasedName:undefined;value?(element[name]=!0,element.setAttribute(name,lowercasedName)):(element[name]=!1,element.removeAttribute(lowercasedName))}else if(isDefined(value))element.setAttribute(name,value);else if(element.getAttribute){var ret=element.getAttribute(name,2);return null===ret?undefined:ret}},prop:function(element,name,value){return isDefined(value)?void(element[name]=value):element[name]},text:function(){function getText(element,value){var textProp=NODE_TYPE_TEXT_PROPERTY[element.nodeType];return isUndefined(value)?textProp?element[textProp]:"":void(element[textProp]=value)}var NODE_TYPE_TEXT_PROPERTY=[];return 9>msie?(NODE_TYPE_TEXT_PROPERTY[1]="innerText",NODE_TYPE_TEXT_PROPERTY[3]="nodeValue"):NODE_TYPE_TEXT_PROPERTY[1]=NODE_TYPE_TEXT_PROPERTY[3]="textContent",getText.$dv="",getText}(),val:function(element,value){if(isUndefined(value)){if("SELECT"===nodeName_(element)&&element.multiple){var result=[];return forEach(element.options,function(option){option.selected&&result.push(option.value||option.text)}),0===result.length?null:result}return element.value}element.value=value},html:function(element,value){if(isUndefined(value))return element.innerHTML;for(var i=0,childNodes=element.childNodes;i<childNodes.length;i++)jqLiteDealoc(childNodes[i]);element.innerHTML=value},empty:jqLiteEmpty},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key;if(fn!==jqLiteEmpty&&(2==fn.length&&fn!==jqLiteHasClass&&fn!==jqLiteController?arg1:arg2)===undefined){if(isObject(arg1)){for(i=0;i<this.length;i++)if(fn===jqLiteData)fn(this[i],arg1);else for(key in arg1)fn(this[i],key,arg1[key]);return this}for(var value=fn.$dv,jj=value===undefined?Math.min(this.length,1):this.length,j=0;jj>j;j++){var nodeValue=fn(this[j],arg1,arg2);value=value?value+nodeValue:nodeValue}return value}for(i=0;i<this.length;i++)fn(this[i],arg1,arg2);return this}}),forEach({removeData:jqLiteRemoveData,dealoc:jqLiteDealoc,on:function onFn(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");var events=jqLiteExpandoStore(element,"events"),handle=jqLiteExpandoStore(element,"handle");events||jqLiteExpandoStore(element,"events",events={}),handle||jqLiteExpandoStore(element,"handle",handle=createEventHandler(element,events)),forEach(type.split(" "),function(type){var eventFns=events[type];if(!eventFns){if("mouseenter"==type||"mouseleave"==type){var contains=document.body.contains||document.body.compareDocumentPosition?function(a,b){var adown=9===a.nodeType?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!(!bup||1!==bup.nodeType||!(adown.contains?adown.contains(bup):a.compareDocumentPosition&&16&a.compareDocumentPosition(bup)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};events[type]=[];var eventmap={mouseleave:"mouseout",mouseenter:"mouseover"};onFn(element,eventmap[type],function(event){var target=this,related=event.relatedTarget;(!related||related!==target&&!contains(target,related))&&handle(event,type)})}else addEventListenerFn(element,type,handle),events[type]=[];eventFns=events[type]}eventFns.push(fn)})},off:jqLiteOff,one:function(element,type,fn){element=jqLite(element),element.on(type,function onFn(){element.off(type,fn),element.off(type,onFn)}),element.on(type,fn)},replaceWith:function(element,replaceNode){var index,parent=element.parentNode;jqLiteDealoc(element),forEach(new JQLite(replaceNode),function(node){index?parent.insertBefore(node,index.nextSibling):parent.replaceChild(node,element),index=node})},children:function(element){var children=[];return forEach(element.childNodes,function(element){1===element.nodeType&&children.push(element)}),children},contents:function(element){return element.contentDocument||element.childNodes||[]},append:function(element,node){forEach(new JQLite(node),function(child){(1===element.nodeType||11===element.nodeType)&&element.appendChild(child)})},prepend:function(element,node){if(1===element.nodeType){var index=element.firstChild;forEach(new JQLite(node),function(child){element.insertBefore(child,index)})}},wrap:function(element,wrapNode){wrapNode=jqLite(wrapNode)[0];var parent=element.parentNode;parent&&parent.replaceChild(wrapNode,element),wrapNode.appendChild(element)},remove:function(element){jqLiteDealoc(element);var parent=element.parentNode;parent&&parent.removeChild(element)},after:function(element,newElement){var index=element,parent=element.parentNode;forEach(new JQLite(newElement),function(node){parent.insertBefore(node,index.nextSibling),index=node})},addClass:jqLiteAddClass,removeClass:jqLiteRemoveClass,toggleClass:function(element,selector,condition){selector&&forEach(selector.split(" "),function(className){var classCondition=condition;isUndefined(classCondition)&&(classCondition=!jqLiteHasClass(element,className)),(classCondition?jqLiteAddClass:jqLiteRemoveClass)(element,className)})},parent:function(element){var parent=element.parentNode;return parent&&11!==parent.nodeType?parent:null},next:function(element){if(element.nextElementSibling)return element.nextElementSibling;for(var elm=element.nextSibling;null!=elm&&1!==elm.nodeType;)elm=elm.nextSibling;return elm},find:function(element,selector){return element.getElementsByTagName?element.getElementsByTagName(selector):[]},clone:jqLiteClone,triggerHandler:function(element,eventName,eventData){var eventFns=(jqLiteExpandoStore(element,"events")||{})[eventName];eventData=eventData||[];var event=[{preventDefault:noop,stopPropagation:noop}];forEach(eventFns,function(fn){fn.apply(element,event.concat(eventData))})}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2,arg3){for(var value,i=0;i<this.length;i++)isUndefined(value)?(value=fn(this[i],arg1,arg2,arg3),isDefined(value)&&(value=jqLite(value))):jqLiteAddNodes(value,fn(this[i],arg1,arg2,arg3));return isDefined(value)?value:this},JQLite.prototype.bind=JQLite.prototype.on,JQLite.prototype.unbind=JQLite.prototype.off}),HashMap.prototype={put:function(key,value){this[hashKey(key)]=value},get:function(key){return this[hashKey(key)]},remove:function(key){var value=this[key=hashKey(key)];return delete this[key],value}};var FN_ARGS=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,FN_ARG_SPLIT=/,/,FN_ARG=/^\s*(_?)(\S+?)\1\s*$/,STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,$injectorMinErr=minErr("$injector"),$animateMinErr=minErr("$animate"),$AnimateProvider=["$provide",function($provide){this.$$selectors={},this.register=function(name,factory){var key=name+"-animation";if(name&&"."!=name.charAt(0))throw $animateMinErr("notcsel","Expecting class selector starting with '.' got '{0}'.",name);this.$$selectors[name.substr(1)]=key,$provide.factory(key,factory)},this.classNameFilter=function(expression){return 1===arguments.length&&(this.$$classNameFilter=expression instanceof RegExp?expression:null),this.$$classNameFilter},this.$get=["$timeout","$$asyncCallback",function($timeout,$$asyncCallback){function async(fn){fn&&$$asyncCallback(fn)}return{enter:function(element,parent,after,done){after?after.after(element):(parent&&parent[0]||(parent=after.parent()),parent.append(element)),async(done)},leave:function(element,done){element.remove(),async(done)},move:function(element,parent,after,done){this.enter(element,parent,after,done)},addClass:function(element,className,done){className=isString(className)?className:isArray(className)?className.join(" "):"",forEach(element,function(element){jqLiteAddClass(element,className)}),async(done)},removeClass:function(element,className,done){className=isString(className)?className:isArray(className)?className.join(" "):"",forEach(element,function(element){jqLiteRemoveClass(element,className)}),async(done)},setClass:function(element,add,remove,done){forEach(element,function(element){jqLiteAddClass(element,add),jqLiteRemoveClass(element,remove)}),async(done)},enabled:noop}}]}],$compileMinErr=minErr("$compile");$CompileProvider.$inject=["$provide","$$sanitizeUriProvider"];var PREFIX_REGEXP=/^(x[\:\-_]|data[\:\-_])/i,$interpolateMinErr=minErr("$interpolate"),PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={http:80,https:443,ftp:21},$locationMinErr=minErr("$location");LocationHashbangInHtml5Url.prototype=LocationHashbangUrl.prototype=LocationHtml5Url.prototype={$$html5:!1,$$replace:!1,absUrl:locationGetter("$$absUrl"),url:function(url,replace){if(isUndefined(url))return this.$$url;var match=PATH_MATCH.exec(url);return match[1]&&this.path(decodeURIComponent(match[1])),(match[2]||match[1])&&this.search(match[3]||""),this.hash(match[5]||"",replace),this},protocol:locationGetter("$$protocol"),host:locationGetter("$$host"),port:locationGetter("$$port"),path:locationGetterSetter("$$path",function(path){return"/"==path.charAt(0)?path:"/"+path}),search:function(search,paramValue){switch(arguments.length){case 0:return this.$$search;case 1:if(isString(search))this.$$search=parseKeyValue(search);else{if(!isObject(search))throw $locationMinErr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");this.$$search=search}break;default:isUndefined(paramValue)||null===paramValue?delete this.$$search[search]:this.$$search[search]=paramValue}return this.$$compose(),this},hash:locationGetterSetter("$$hash",identity),replace:function(){return this.$$replace=!0,this}};var promiseWarning,$parseMinErr=minErr("$parse"),promiseWarningCache={},OPERATORS={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:noop,"+":function(self,locals,a,b){return a=a(self,locals),b=b(self,locals),isDefined(a)?isDefined(b)?a+b:a:isDefined(b)?b:undefined},"-":function(self,locals,a,b){return a=a(self,locals),b=b(self,locals),(isDefined(a)?a:0)-(isDefined(b)?b:0)},"*":function(self,locals,a,b){return a(self,locals)*b(self,locals)},"/":function(self,locals,a,b){return a(self,locals)/b(self,locals)},"%":function(self,locals,a,b){return a(self,locals)%b(self,locals)},"^":function(self,locals,a,b){return a(self,locals)^b(self,locals)},"=":noop,"===":function(self,locals,a,b){return a(self,locals)===b(self,locals)},"!==":function(self,locals,a,b){return a(self,locals)!==b(self,locals)},"==":function(self,locals,a,b){return a(self,locals)==b(self,locals)},"!=":function(self,locals,a,b){return a(self,locals)!=b(self,locals)},"<":function(self,locals,a,b){return a(self,locals)<b(self,locals)},">":function(self,locals,a,b){return a(self,locals)>b(self,locals)},"<=":function(self,locals,a,b){return a(self,locals)<=b(self,locals)},">=":function(self,locals,a,b){return a(self,locals)>=b(self,locals)},"&&":function(self,locals,a,b){return a(self,locals)&&b(self,locals)},"||":function(self,locals,a,b){return a(self,locals)||b(self,locals)},"&":function(self,locals,a,b){return a(self,locals)&b(self,locals)},"|":function(self,locals,a,b){return b(self,locals)(self,locals,a(self,locals))},"!":function(self,locals,a){return!a(self,locals)}},ESCAPE={n:"\n",f:"\f",r:"\r",t:"	",v:"","'":"'",'"':'"'},Lexer=function(options){this.options=options};Lexer.prototype={constructor:Lexer,lex:function(text){this.text=text,this.index=0,this.ch=undefined,this.lastCh=":",this.tokens=[];for(var token,json=[];this.index<this.text.length;){if(this.ch=this.text.charAt(this.index),this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&"{"===json[0]&&(token=this.tokens[this.tokens.length-1])&&(token.json=-1===token.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&json.unshift(this.ch),this.is("}]")&&json.shift(),this.index++;else{if(this.isWhitespace(this.ch)){this.index++;continue}var ch2=this.ch+this.peek(),ch3=ch2+this.peek(2),fn=OPERATORS[this.ch],fn2=OPERATORS[ch2],fn3=OPERATORS[ch3];fn3?(this.tokens.push({index:this.index,text:ch3,fn:fn3}),this.index+=3):fn2?(this.tokens.push({index:this.index,text:ch2,fn:fn2}),this.index+=2):fn?(this.tokens.push({index:this.index,text:this.ch,fn:fn,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(chars){return-1!==chars.indexOf(this.ch)},was:function(chars){return-1!==chars.indexOf(this.lastCh)},peek:function(i){var num=i||1;return this.index+num<this.text.length?this.text.charAt(this.index+num):!1},isNumber:function(ch){return ch>="0"&&"9">=ch},isWhitespace:function(ch){return" "===ch||"\r"===ch||"	"===ch||"\n"===ch||""===ch||"\xa0"===ch},isIdent:function(ch){return ch>="a"&&"z">=ch||ch>="A"&&"Z">=ch||"_"===ch||"$"===ch},isExpOperator:function(ch){return"-"===ch||"+"===ch||this.isNumber(ch)},throwError:function(error,start,end){end=end||this.index;var colStr=isDefined(start)?"s "+start+"-"+this.index+" ["+this.text.substring(start,end)+"]":" "+end;throw $parseMinErr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",error,colStr,this.text)},readNumber:function(){for(var number="",start=this.index;this.index<this.text.length;){var ch=lowercase(this.text.charAt(this.index));if("."==ch||this.isNumber(ch))number+=ch;else{var peekCh=this.peek();if("e"==ch&&this.isExpOperator(peekCh))number+=ch;else if(this.isExpOperator(ch)&&peekCh&&this.isNumber(peekCh)&&"e"==number.charAt(number.length-1))number+=ch;else{if(!this.isExpOperator(ch)||peekCh&&this.isNumber(peekCh)||"e"!=number.charAt(number.length-1))break;this.throwError("Invalid exponent")}}this.index++}number=1*number,this.tokens.push({index:start,text:number,json:!0,fn:function(){return number}})},readIdent:function(){for(var lastDot,peekIndex,methodName,ch,parser=this,ident="",start=this.index;this.index<this.text.length&&(ch=this.text.charAt(this.index),"."===ch||this.isIdent(ch)||this.isNumber(ch));)"."===ch&&(lastDot=this.index),ident+=ch,this.index++;if(lastDot)for(peekIndex=this.index;peekIndex<this.text.length;){if(ch=this.text.charAt(peekIndex),"("===ch){methodName=ident.substr(lastDot-start+1),ident=ident.substr(0,lastDot-start),this.index=peekIndex;break}if(!this.isWhitespace(ch))break;peekIndex++}var token={index:start,text:ident};if(OPERATORS.hasOwnProperty(ident))token.fn=OPERATORS[ident],token.json=OPERATORS[ident];else{var getter=getterFn(ident,this.options,this.text);token.fn=extend(function(self,locals){return getter(self,locals)},{assign:function(self,value){return setter(self,ident,value,parser.text,parser.options)}})}this.tokens.push(token),methodName&&(this.tokens.push({index:lastDot,text:".",json:!1}),this.tokens.push({index:lastDot+1,text:methodName,json:!1}))},readString:function(quote){var start=this.index;this.index++;for(var string="",rawString=quote,escape=!1;this.index<this.text.length;){var ch=this.text.charAt(this.index);if(rawString+=ch,escape){if("u"===ch){var hex=this.text.substring(this.index+1,this.index+5);hex.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+hex+"]"),this.index+=4,string+=String.fromCharCode(parseInt(hex,16))}else{var rep=ESCAPE[ch];string+=rep?rep:ch}escape=!1}else if("\\"===ch)escape=!0;else{if(ch===quote)return this.index++,void this.tokens.push({index:start,text:rawString,string:string,json:!0,fn:function(){return string}});string+=ch}this.index++}this.throwError("Unterminated quote",start)}};var Parser=function(lexer,$filter,options){this.lexer=lexer,this.$filter=$filter,this.options=options};Parser.ZERO=function(){return 0},Parser.prototype={constructor:Parser,parse:function(text,json){this.text=text,this.json=json,this.tokens=this.lexer.lex(text),json&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:text,index:0})});var value=json?this.primary():this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),value.literal=!!value.literal,value.constant=!!value.constant,value},primary:function(){var primary;if(this.expect("("))primary=this.filterChain(),this.consume(")");else if(this.expect("["))primary=this.arrayDeclaration();else if(this.expect("{"))primary=this.object();else{var token=this.expect();primary=token.fn,primary||this.throwError("not a primary expression",token),token.json&&(primary.constant=!0,primary.literal=!0)}for(var next,context;next=this.expect("(","[",".");)"("===next.text?(primary=this.functionCall(primary,context),context=null):"["===next.text?(context=primary,primary=this.objectIndex(primary)):"."===next.text?(context=primary,primary=this.fieldAccess(primary)):this.throwError("IMPOSSIBLE");return primary},throwError:function(msg,token){throw $parseMinErr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",token.text,msg,token.index+1,this.text,this.text.substring(token.index))},peekToken:function(){if(0===this.tokens.length)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e1,e2,e3,e4){if(this.tokens.length>0){var token=this.tokens[0],t=token.text;if(t===e1||t===e2||t===e3||t===e4||!e1&&!e2&&!e3&&!e4)return token}return!1},expect:function(e1,e2,e3,e4){var token=this.peek(e1,e2,e3,e4);return token?(this.json&&!token.json&&this.throwError("is not valid json",token),this.tokens.shift(),token):!1},consume:function(e1){this.expect(e1)||this.throwError("is unexpected, expecting ["+e1+"]",this.peek())},unaryFn:function(fn,right){return extend(function(self,locals){return fn(self,locals,right)},{constant:right.constant})},ternaryFn:function(left,middle,right){return extend(function(self,locals){return left(self,locals)?middle(self,locals):right(self,locals)},{constant:left.constant&&middle.constant&&right.constant})},binaryFn:function(left,fn,right){return extend(function(self,locals){return fn(self,locals,left,right)},{constant:left.constant&&right.constant})},statements:function(){for(var statements=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&statements.push(this.filterChain()),!this.expect(";"))return 1===statements.length?statements[0]:function(self,locals){for(var value,i=0;i<statements.length;i++){var statement=statements[i];statement&&(value=statement(self,locals))}return value}},filterChain:function(){for(var token,left=this.expression();;){if(!(token=this.expect("|")))return left;left=this.binaryFn(left,token.fn,this.filter())}},filter:function(){for(var token=this.expect(),fn=this.$filter(token.text),argsFn=[];;){if(!(token=this.expect(":"))){var fnInvoke=function(self,locals,input){for(var args=[input],i=0;i<argsFn.length;i++)args.push(argsFn[i](self,locals));return fn.apply(self,args)};return function(){return fnInvoke}}argsFn.push(this.expression())}},expression:function(){return this.assignment()},assignment:function(){var right,token,left=this.ternary();return(token=this.expect("="))?(left.assign||this.throwError("implies assignment but ["+this.text.substring(0,token.index)+"] can not be assigned to",token),right=this.ternary(),function(scope,locals){return left.assign(scope,right(scope,locals),locals)}):left},ternary:function(){var middle,token,left=this.logicalOR();return(token=this.expect("?"))?(middle=this.ternary(),(token=this.expect(":"))?this.ternaryFn(left,middle,this.ternary()):void this.throwError("expected :",token)):left},logicalOR:function(){for(var token,left=this.logicalAND();;){if(!(token=this.expect("||")))return left;left=this.binaryFn(left,token.fn,this.logicalAND())}},logicalAND:function(){var token,left=this.equality();return(token=this.expect("&&"))&&(left=this.binaryFn(left,token.fn,this.logicalAND())),left},equality:function(){var token,left=this.relational();return(token=this.expect("==","!=","===","!=="))&&(left=this.binaryFn(left,token.fn,this.equality())),left},relational:function(){var token,left=this.additive();return(token=this.expect("<",">","<=",">="))&&(left=this.binaryFn(left,token.fn,this.relational())),left},additive:function(){for(var token,left=this.multiplicative();token=this.expect("+","-");)left=this.binaryFn(left,token.fn,this.multiplicative());return left},multiplicative:function(){for(var token,left=this.unary();token=this.expect("*","/","%");)left=this.binaryFn(left,token.fn,this.unary());return left},unary:function(){var token;return this.expect("+")?this.primary():(token=this.expect("-"))?this.binaryFn(Parser.ZERO,token.fn,this.unary()):(token=this.expect("!"))?this.unaryFn(token.fn,this.unary()):this.primary()},fieldAccess:function(object){var parser=this,field=this.expect().text,getter=getterFn(field,this.options,this.text);return extend(function(scope,locals,self){return getter(self||object(scope,locals))},{assign:function(scope,value,locals){return setter(object(scope,locals),field,value,parser.text,parser.options)}})},objectIndex:function(obj){var parser=this,indexFn=this.expression();return this.consume("]"),extend(function(self,locals){var v,p,o=obj(self,locals),i=indexFn(self,locals);return o?(v=ensureSafeObject(o[i],parser.text),v&&v.then&&parser.options.unwrapPromises&&(p=v,"$$v"in v||(p.$$v=undefined,p.then(function(val){p.$$v=val})),v=v.$$v),v):undefined},{assign:function(self,value,locals){var key=indexFn(self,locals),safe=ensureSafeObject(obj(self,locals),parser.text);return safe[key]=value}})},functionCall:function(fn,contextGetter){var argsFn=[];if(")"!==this.peekToken().text)do argsFn.push(this.expression());while(this.expect(","));this.consume(")");var parser=this;return function(scope,locals){for(var args=[],context=contextGetter?contextGetter(scope,locals):scope,i=0;i<argsFn.length;i++)args.push(argsFn[i](scope,locals));var fnPtr=fn(scope,locals,context)||noop;ensureSafeObject(context,parser.text),ensureSafeObject(fnPtr,parser.text);var v=fnPtr.apply?fnPtr.apply(context,args):fnPtr(args[0],args[1],args[2],args[3],args[4]);return ensureSafeObject(v,parser.text)}},arrayDeclaration:function(){var elementFns=[],allConstant=!0;if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var elementFn=this.expression();elementFns.push(elementFn),elementFn.constant||(allConstant=!1)}while(this.expect(","));return this.consume("]"),extend(function(self,locals){for(var array=[],i=0;i<elementFns.length;i++)array.push(elementFns[i](self,locals));return array},{literal:!0,constant:allConstant})},object:function(){var keyValues=[],allConstant=!0;if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var token=this.expect(),key=token.string||token.text;this.consume(":");var value=this.expression();keyValues.push({key:key,value:value}),value.constant||(allConstant=!1)}while(this.expect(","));return this.consume("}"),extend(function(self,locals){for(var object={},i=0;i<keyValues.length;i++){var keyValue=keyValues[i];object[keyValue.key]=keyValue.value(self,locals)}return object},{literal:!0,constant:allConstant})}};var getterFnCache={},$sceMinErr=minErr("$sce"),SCE_CONTEXTS={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},urlParsingNode=document.createElement("a"),originUrl=urlResolve(window.location.href,!0);$FilterProvider.$inject=["$provide"],currencyFilter.$inject=["$locale"],numberFilter.$inject=["$locale"];var DECIMAL_SEP=".",DATE_FORMATS={yyyy:dateGetter("FullYear",4),yy:dateGetter("FullYear",2,0,!0),y:dateGetter("FullYear",1),MMMM:dateStrGetter("Month"),MMM:dateStrGetter("Month",!0),MM:dateGetter("Month",2,1),M:dateGetter("Month",1,1),dd:dateGetter("Date",2),d:dateGetter("Date",1),HH:dateGetter("Hours",2),H:dateGetter("Hours",1),hh:dateGetter("Hours",2,-12),h:dateGetter("Hours",1,-12),mm:dateGetter("Minutes",2),m:dateGetter("Minutes",1),ss:dateGetter("Seconds",2),s:dateGetter("Seconds",1),sss:dateGetter("Milliseconds",3),EEEE:dateStrGetter("Day"),EEE:dateStrGetter("Day",!0),a:ampmGetter,Z:timeZoneGetter},DATE_FORMATS_SPLIT=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,NUMBER_STRING=/^\-?\d+$/;dateFilter.$inject=["$locale"];var lowercaseFilter=valueFn(lowercase),uppercaseFilter=valueFn(uppercase);orderByFilter.$inject=["$parse"];var htmlAnchorDirective=valueFn({restrict:"E",compile:function(element,attr){return 8>=msie&&(attr.href||attr.name||attr.$set("href",""),element.append(document.createComment("IE fix"))),attr.href||attr.xlinkHref||attr.name?void 0:function(scope,element){var href="[object SVGAnimatedString]"===toString.call(element.prop("href"))?"xlink:href":"href";element.on("click",function(event){element.attr(href)||event.preventDefault()})}}}),ngAttributeAliasDirectives={};forEach(BOOLEAN_ATTR,function(propName,attrName){if("multiple"!=propName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:100,link:function(scope,element,attr){scope.$watch(attr[normalized],function(value){attr.$set(attrName,!!value)})}}}}}),forEach(["src","srcset","href"],function(attrName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:99,link:function(scope,element,attr){var propName=attrName,name=attrName;"href"===attrName&&"[object SVGAnimatedString]"===toString.call(element.prop("href"))&&(name="xlinkHref",attr.$attr[name]="xlink:href",propName=null),attr.$observe(normalized,function(value){value&&(attr.$set(name,value),msie&&propName&&element.prop(propName,attr[name]))})}}}});var nullFormCtrl={$addControl:noop,$removeControl:noop,$setValidity:noop,$setDirty:noop,$setPristine:noop};FormController.$inject=["$element","$attrs","$scope","$animate"];var formDirectiveFactory=function(isNgForm){return["$timeout",function($timeout){var formDirective={name:"form",restrict:isNgForm?"EAC":"E",controller:FormController,compile:function(){return{pre:function(scope,formElement,attr,controller){if(!attr.action){var preventDefaultListener=function(event){event.preventDefault?event.preventDefault():event.returnValue=!1};addEventListenerFn(formElement[0],"submit",preventDefaultListener),formElement.on("$destroy",function(){$timeout(function(){removeEventListenerFn(formElement[0],"submit",preventDefaultListener)},0,!1)})}var parentFormCtrl=formElement.parent().controller("form"),alias=attr.name||attr.ngForm;alias&&setter(scope,alias,controller,alias),parentFormCtrl&&formElement.on("$destroy",function(){parentFormCtrl.$removeControl(controller),alias&&setter(scope,alias,undefined,alias),extend(controller,nullFormCtrl)})}}}};return formDirective}]},formDirective=formDirectiveFactory(),ngFormDirective=formDirectiveFactory(!0),URL_REGEXP=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,EMAIL_REGEXP=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,NUMBER_REGEXP=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,inputType={text:textInputType,number:numberInputType,url:urlInputType,email:emailInputType,radio:radioInputType,checkbox:checkboxInputType,hidden:noop,button:noop,submit:noop,reset:noop,file:noop},inputDirective=["$browser","$sniffer",function($browser,$sniffer){return{restrict:"E",require:"?ngModel",link:function(scope,element,attr,ctrl){ctrl&&(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrl,$sniffer,$browser)}}}],VALID_CLASS="ng-valid",INVALID_CLASS="ng-invalid",PRISTINE_CLASS="ng-pristine",DIRTY_CLASS="ng-dirty",NgModelController=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate",function($scope,$exceptionHandler,$attr,$element,$parse,$animate){function toggleValidCss(isValid,validationErrorKey){validationErrorKey=validationErrorKey?"-"+snake_case(validationErrorKey,"-"):"",$animate.removeClass($element,(isValid?INVALID_CLASS:VALID_CLASS)+validationErrorKey),$animate.addClass($element,(isValid?VALID_CLASS:INVALID_CLASS)+validationErrorKey)}this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=$attr.name;var ngModelGet=$parse($attr.ngModel),ngModelSet=ngModelGet.assign;if(!ngModelSet)throw minErr("ngModel")("nonassign","Expression '{0}' is non-assignable. Element: {1}",$attr.ngModel,startingTag($element));this.$render=noop,this.$isEmpty=function(value){return isUndefined(value)||""===value||null===value||value!==value};var parentForm=$element.inheritedData("$formController")||nullFormCtrl,invalidCount=0,$error=this.$error={};$element.addClass(PRISTINE_CLASS),toggleValidCss(!0),this.$setValidity=function(validationErrorKey,isValid){$error[validationErrorKey]!==!isValid&&(isValid?($error[validationErrorKey]&&invalidCount--,invalidCount||(toggleValidCss(!0),this.$valid=!0,this.$invalid=!1)):(toggleValidCss(!1),this.$invalid=!0,this.$valid=!1,invalidCount++),$error[validationErrorKey]=!isValid,toggleValidCss(isValid,validationErrorKey),parentForm.$setValidity(validationErrorKey,isValid,this))},this.$setPristine=function(){this.$dirty=!1,this.$pristine=!0,$animate.removeClass($element,DIRTY_CLASS),$animate.addClass($element,PRISTINE_CLASS)},this.$setViewValue=function(value){this.$viewValue=value,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,$animate.removeClass($element,PRISTINE_CLASS),$animate.addClass($element,DIRTY_CLASS),parentForm.$setDirty()),forEach(this.$parsers,function(fn){value=fn(value)}),this.$modelValue!==value&&(this.$modelValue=value,ngModelSet($scope,value),forEach(this.$viewChangeListeners,function(listener){try{listener()}catch(e){$exceptionHandler(e)}}))};var ctrl=this;$scope.$watch(function(){var value=ngModelGet($scope);if(ctrl.$modelValue!==value){var formatters=ctrl.$formatters,idx=formatters.length;for(ctrl.$modelValue=value;idx--;)value=formatters[idx](value);ctrl.$viewValue!==value&&(ctrl.$viewValue=value,ctrl.$render())}return value})}],ngModelDirective=function(){return{require:["ngModel","^?form"],controller:NgModelController,link:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||nullFormCtrl;formCtrl.$addControl(modelCtrl),scope.$on("$destroy",function(){formCtrl.$removeControl(modelCtrl)})}}},ngChangeDirective=valueFn({require:"ngModel",link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange)})}}),requiredDirective=function(){return{require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){attr.required=!0;var validator=function(value){return attr.required&&ctrl.$isEmpty(value)?void ctrl.$setValidity("required",!1):(ctrl.$setValidity("required",!0),value)};ctrl.$formatters.push(validator),ctrl.$parsers.unshift(validator),attr.$observe("required",function(){validator(ctrl.$viewValue)
  })}}}},ngListDirective=function(){return{require:"ngModel",link:function(scope,element,attr,ctrl){var match=/\/(.*)\//.exec(attr.ngList),separator=match&&new RegExp(match[1])||attr.ngList||",",parse=function(viewValue){if(!isUndefined(viewValue)){var list=[];return viewValue&&forEach(viewValue.split(separator),function(value){value&&list.push(trim(value))}),list}};ctrl.$parsers.push(parse),ctrl.$formatters.push(function(value){return isArray(value)?value.join(", "):undefined}),ctrl.$isEmpty=function(value){return!value||!value.length}}}},CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/,ngValueDirective=function(){return{priority:100,compile:function(tpl,tplAttr){return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)?function(scope,elm,attr){attr.$set("value",scope.$eval(attr.ngValue))}:function(scope,elm,attr){scope.$watch(attr.ngValue,function(value){attr.$set("value",value)})}}}},ngBindDirective=ngDirective(function(scope,element,attr){element.addClass("ng-binding").data("$binding",attr.ngBind),scope.$watch(attr.ngBind,function(value){element.text(value==undefined?"":value)})}),ngBindTemplateDirective=["$interpolate",function($interpolate){return function(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));element.addClass("ng-binding").data("$binding",interpolateFn),attr.$observe("ngBindTemplate",function(value){element.text(value)})}}],ngBindHtmlDirective=["$sce","$parse",function($sce,$parse){return function(scope,element,attr){function getStringValue(){return(parsed(scope)||"").toString()}element.addClass("ng-binding").data("$binding",attr.ngBindHtml);var parsed=$parse(attr.ngBindHtml);scope.$watch(getStringValue,function(){element.html($sce.getTrustedHtml(parsed(scope))||"")})}}],ngClassDirective=classDirective("",!0),ngClassOddDirective=classDirective("Odd",0),ngClassEvenDirective=classDirective("Even",1),ngCloakDirective=ngDirective({compile:function(element,attr){attr.$set("ngCloak",undefined),element.removeClass("ng-cloak")}}),ngControllerDirective=[function(){return{scope:!0,controller:"@",priority:500}}],ngEventDirectives={};forEach("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(name){var directiveName=directiveNormalize("ng-"+name);ngEventDirectives[directiveName]=["$parse",function($parse){return{compile:function($element,attr){var fn=$parse(attr[directiveName]);return function(scope,element){element.on(lowercase(name),function(event){scope.$apply(function(){fn(scope,{$event:event})})})}}}}]});var ngIfDirective=["$animate",function($animate){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function($scope,$element,$attr,ctrl,$transclude){var block,childScope,previousElements;$scope.$watch($attr.ngIf,function(value){toBoolean(value)?childScope||(childScope=$scope.$new(),$transclude(childScope,function(clone){clone[clone.length++]=document.createComment(" end ngIf: "+$attr.ngIf+" "),block={clone:clone},$animate.enter(clone,$element.parent(),$element)})):(previousElements&&(previousElements.remove(),previousElements=null),childScope&&(childScope.$destroy(),childScope=null),block&&(previousElements=getBlockElements(block.clone),$animate.leave(previousElements,function(){previousElements=null}),block=null))})}}}],ngIncludeDirective=["$http","$templateCache","$anchorScroll","$animate","$sce",function($http,$templateCache,$anchorScroll,$animate,$sce){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:angular.noop,compile:function(element,attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||"",autoScrollExp=attr.autoscroll;return function(scope,$element,$attr,ctrl,$transclude){var currentScope,previousElement,currentElement,changeCounter=0,cleanupLastIncludeContent=function(){previousElement&&(previousElement.remove(),previousElement=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&($animate.leave(currentElement,function(){previousElement=null}),previousElement=currentElement,currentElement=null)};scope.$watch($sce.parseAsResourceUrl(srcExp),function(src){var afterAnimation=function(){!isDefined(autoScrollExp)||autoScrollExp&&!scope.$eval(autoScrollExp)||$anchorScroll()},thisChangeId=++changeCounter;src?($http.get(src,{cache:$templateCache}).success(function(response){if(thisChangeId===changeCounter){var newScope=scope.$new();ctrl.template=response;var clone=$transclude(newScope,function(clone){cleanupLastIncludeContent(),$animate.enter(clone,null,$element,afterAnimation)});currentScope=newScope,currentElement=clone,currentScope.$emit("$includeContentLoaded"),scope.$eval(onloadExp)}}).error(function(){thisChangeId===changeCounter&&cleanupLastIncludeContent()}),scope.$emit("$includeContentRequested")):(cleanupLastIncludeContent(),ctrl.template=null)})}}}}],ngIncludeFillContentDirective=["$compile",function($compile){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(scope,$element,$attr,ctrl){$element.html(ctrl.template),$compile($element.contents())(scope)}}}],ngInitDirective=ngDirective({priority:450,compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit)}}}}),ngNonBindableDirective=ngDirective({terminal:!0,priority:1e3}),ngPluralizeDirective=["$locale","$interpolate",function($locale,$interpolate){var BRACE=/{}/g;return{restrict:"EA",link:function(scope,element,attr){var numberExp=attr.count,whenExp=attr.$attr.when&&element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp)||{},whensExpFns={},startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),isWhen=/^when(Minus)?(.+)$/;forEach(attr,function(expression,attributeName){isWhen.test(attributeName)&&(whens[lowercase(attributeName.replace("when","").replace("Minus","-"))]=element.attr(attr.$attr[attributeName]))}),forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,startSymbol+numberExp+"-"+offset+endSymbol))}),scope.$watch(function(){var value=parseFloat(scope.$eval(numberExp));return isNaN(value)?"":(value in whens||(value=$locale.pluralCat(value-offset)),whensExpFns[value](scope,element,!0))},function(newVal){element.text(newVal)})}}}],ngRepeatDirective=["$parse","$animate",function($parse,$animate){function getBlockStart(block){return block.clone[0]}function getBlockEnd(block){return block.clone[block.clone.length-1]}var NG_REMOVED="$$NG_REMOVED",ngRepeatMinErr=minErr("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,link:function($scope,$element,$attr,ctrl,$transclude){var trackByExp,trackByExpGetter,trackByIdExpFn,trackByIdArrayFn,trackByIdObjFn,lhs,rhs,valueIdentifier,keyIdentifier,expression=$attr.ngRepeat,match=expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),hashFnLocals={$id:hashKey};if(!match)throw ngRepeatMinErr("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);if(lhs=match[1],rhs=match[2],trackByExp=match[3],trackByExp?(trackByExpGetter=$parse(trackByExp),trackByIdExpFn=function(key,value,index){return keyIdentifier&&(hashFnLocals[keyIdentifier]=key),hashFnLocals[valueIdentifier]=value,hashFnLocals.$index=index,trackByExpGetter($scope,hashFnLocals)}):(trackByIdArrayFn=function(key,value){return hashKey(value)},trackByIdObjFn=function(key){return key}),match=lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!match)throw ngRepeatMinErr("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",lhs);valueIdentifier=match[3]||match[1],keyIdentifier=match[2];var lastBlockMap={};$scope.$watchCollection(rhs,function(collection){var index,length,nextNode,arrayLength,childScope,key,value,trackById,trackByIdFn,collectionKeys,block,elementsToRemove,previousNode=$element[0],nextBlockMap={},nextBlockOrder=[];if(isArrayLike(collection))collectionKeys=collection,trackByIdFn=trackByIdExpFn||trackByIdArrayFn;else{trackByIdFn=trackByIdExpFn||trackByIdObjFn,collectionKeys=[];for(key in collection)collection.hasOwnProperty(key)&&"$"!=key.charAt(0)&&collectionKeys.push(key);collectionKeys.sort()}for(arrayLength=collectionKeys.length,length=nextBlockOrder.length=collectionKeys.length,index=0;length>index;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],trackById=trackByIdFn(key,value,index),assertNotHasOwnProperty(trackById,"`track by` id"),lastBlockMap.hasOwnProperty(trackById))block=lastBlockMap[trackById],delete lastBlockMap[trackById],nextBlockMap[trackById]=block,nextBlockOrder[index]=block;else{if(nextBlockMap.hasOwnProperty(trackById))throw forEach(nextBlockOrder,function(block){block&&block.scope&&(lastBlockMap[block.id]=block)}),ngRepeatMinErr("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",expression,trackById);nextBlockOrder[index]={id:trackById},nextBlockMap[trackById]=!1}for(key in lastBlockMap)lastBlockMap.hasOwnProperty(key)&&(block=lastBlockMap[key],elementsToRemove=getBlockElements(block.clone),$animate.leave(elementsToRemove),forEach(elementsToRemove,function(element){element[NG_REMOVED]=!0}),block.scope.$destroy());for(index=0,length=collectionKeys.length;length>index;index++){if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],block=nextBlockOrder[index],nextBlockOrder[index-1]&&(previousNode=getBlockEnd(nextBlockOrder[index-1])),block.scope){childScope=block.scope,nextNode=previousNode;do nextNode=nextNode.nextSibling;while(nextNode&&nextNode[NG_REMOVED]);getBlockStart(block)!=nextNode&&$animate.move(getBlockElements(block.clone),null,jqLite(previousNode)),previousNode=getBlockEnd(block)}else childScope=$scope.$new();childScope[valueIdentifier]=value,keyIdentifier&&(childScope[keyIdentifier]=key),childScope.$index=index,childScope.$first=0===index,childScope.$last=index===arrayLength-1,childScope.$middle=!(childScope.$first||childScope.$last),childScope.$odd=!(childScope.$even=0===(1&index)),block.scope||$transclude(childScope,function(clone){clone[clone.length++]=document.createComment(" end ngRepeat: "+expression+" "),$animate.enter(clone,null,jqLite(previousNode)),previousNode=clone,block.scope=childScope,block.clone=clone,nextBlockMap[block.id]=block})}lastBlockMap=nextBlockMap})}}}],ngShowDirective=["$animate",function($animate){return function(scope,element,attr){scope.$watch(attr.ngShow,function(value){$animate[toBoolean(value)?"removeClass":"addClass"](element,"ng-hide")})}}],ngHideDirective=["$animate",function($animate){return function(scope,element,attr){scope.$watch(attr.ngHide,function(value){$animate[toBoolean(value)?"addClass":"removeClass"](element,"ng-hide")})}}],ngStyleDirective=ngDirective(function(scope,element,attr){scope.$watch(attr.ngStyle,function(newStyles,oldStyles){oldStyles&&newStyles!==oldStyles&&forEach(oldStyles,function(val,style){element.css(style,"")}),newStyles&&element.css(newStyles)},!0)}),ngSwitchDirective=["$animate",function($animate){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(scope,element,attr,ngSwitchController){var selectedTranscludes,selectedElements,previousElements,watchExpr=attr.ngSwitch||attr.on,selectedScopes=[];scope.$watch(watchExpr,function(value){var i,ii=selectedScopes.length;if(ii>0){if(previousElements){for(i=0;ii>i;i++)previousElements[i].remove();previousElements=null}for(previousElements=[],i=0;ii>i;i++){var selected=selectedElements[i];selectedScopes[i].$destroy(),previousElements[i]=selected,$animate.leave(selected,function(){previousElements.splice(i,1),0===previousElements.length&&(previousElements=null)})}}selectedElements=[],selectedScopes=[],(selectedTranscludes=ngSwitchController.cases["!"+value]||ngSwitchController.cases["?"])&&(scope.$eval(attr.change),forEach(selectedTranscludes,function(selectedTransclude){var selectedScope=scope.$new();selectedScopes.push(selectedScope),selectedTransclude.transclude(selectedScope,function(caseElement){var anchor=selectedTransclude.element;selectedElements.push(caseElement),$animate.enter(caseElement,anchor.parent(),anchor)})}))})}}}],ngSwitchWhenDirective=ngDirective({transclude:"element",priority:800,require:"^ngSwitch",link:function(scope,element,attrs,ctrl,$transclude){ctrl.cases["!"+attrs.ngSwitchWhen]=ctrl.cases["!"+attrs.ngSwitchWhen]||[],ctrl.cases["!"+attrs.ngSwitchWhen].push({transclude:$transclude,element:element})}}),ngSwitchDefaultDirective=ngDirective({transclude:"element",priority:800,require:"^ngSwitch",link:function(scope,element,attr,ctrl,$transclude){ctrl.cases["?"]=ctrl.cases["?"]||[],ctrl.cases["?"].push({transclude:$transclude,element:element})}}),ngTranscludeDirective=ngDirective({link:function($scope,$element,$attrs,controller,$transclude){if(!$transclude)throw minErr("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",startingTag($element));$transclude(function(clone){$element.empty(),$element.append(clone)})}}),scriptDirective=["$templateCache",function($templateCache){return{restrict:"E",terminal:!0,compile:function(element,attr){if("text/ng-template"==attr.type){var templateUrl=attr.id,text=element[0].text;$templateCache.put(templateUrl,text)}}}}],ngOptionsMinErr=minErr("ngOptions"),ngOptionsDirective=valueFn({terminal:!0}),selectDirective=["$compile","$parse",function($compile,$parse){var NG_OPTIONS_REGEXP=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,nullModelCtrl={$setViewValue:noop};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function($element,$scope,$attrs){var nullOption,unknownOption,self=this,optionsMap={},ngModelCtrl=nullModelCtrl;self.databound=$attrs.ngModel,self.init=function(ngModelCtrl_,nullOption_,unknownOption_){ngModelCtrl=ngModelCtrl_,nullOption=nullOption_,unknownOption=unknownOption_},self.addOption=function(value){assertNotHasOwnProperty(value,'"option value"'),optionsMap[value]=!0,ngModelCtrl.$viewValue==value&&($element.val(value),unknownOption.parent()&&unknownOption.remove())},self.removeOption=function(value){this.hasOption(value)&&(delete optionsMap[value],ngModelCtrl.$viewValue==value&&this.renderUnknownOption(value))},self.renderUnknownOption=function(val){var unknownVal="? "+hashKey(val)+" ?";unknownOption.val(unknownVal),$element.prepend(unknownOption),$element.val(unknownVal),unknownOption.prop("selected",!0)},self.hasOption=function(value){return optionsMap.hasOwnProperty(value)},$scope.$on("$destroy",function(){self.renderUnknownOption=noop})}],link:function(scope,element,attr,ctrls){function setupAsSingle(scope,selectElement,ngModelCtrl,selectCtrl){ngModelCtrl.$render=function(){var viewValue=ngModelCtrl.$viewValue;selectCtrl.hasOption(viewValue)?(unknownOption.parent()&&unknownOption.remove(),selectElement.val(viewValue),""===viewValue&&emptyOption.prop("selected",!0)):isUndefined(viewValue)&&emptyOption?selectElement.val(""):selectCtrl.renderUnknownOption(viewValue)},selectElement.on("change",function(){scope.$apply(function(){unknownOption.parent()&&unknownOption.remove(),ngModelCtrl.$setViewValue(selectElement.val())})})}function setupAsMultiple(scope,selectElement,ctrl){var lastView;ctrl.$render=function(){var items=new HashMap(ctrl.$viewValue);forEach(selectElement.find("option"),function(option){option.selected=isDefined(items.get(option.value))})},scope.$watch(function(){equals(lastView,ctrl.$viewValue)||(lastView=copy(ctrl.$viewValue),ctrl.$render())}),selectElement.on("change",function(){scope.$apply(function(){var array=[];forEach(selectElement.find("option"),function(option){option.selected&&array.push(option.value)}),ctrl.$setViewValue(array)})})}function setupAsOptions(scope,selectElement,ctrl){function render(){var optionGroupName,optionGroup,option,existingParent,existingOptions,existingOption,key,groupLength,length,groupIndex,index,selected,lastElement,element,label,optionGroups={"":[]},optionGroupNames=[""],modelValue=ctrl.$modelValue,values=valuesFn(scope)||[],keys=keyName?sortedKeys(values):values,locals={},selectedSet=!1;if(multiple)if(trackFn&&isArray(modelValue)){selectedSet=new HashMap([]);for(var trackIndex=0;trackIndex<modelValue.length;trackIndex++)locals[valueName]=modelValue[trackIndex],selectedSet.put(trackFn(scope,locals),modelValue[trackIndex])}else selectedSet=new HashMap(modelValue);for(index=0;length=keys.length,length>index;index++){if(key=index,keyName){if(key=keys[index],"$"===key.charAt(0))continue;locals[keyName]=key}if(locals[valueName]=values[key],optionGroupName=groupByFn(scope,locals)||"",(optionGroup=optionGroups[optionGroupName])||(optionGroup=optionGroups[optionGroupName]=[],optionGroupNames.push(optionGroupName)),multiple)selected=isDefined(selectedSet.remove(trackFn?trackFn(scope,locals):valueFn(scope,locals)));else{if(trackFn){var modelCast={};modelCast[valueName]=modelValue,selected=trackFn(scope,modelCast)===trackFn(scope,locals)}else selected=modelValue===valueFn(scope,locals);selectedSet=selectedSet||selected}label=displayFn(scope,locals),label=isDefined(label)?label:"",optionGroup.push({id:trackFn?trackFn(scope,locals):keyName?keys[index]:index,label:label,selected:selected})}for(multiple||(nullOption||null===modelValue?optionGroups[""].unshift({id:"",label:"",selected:!selectedSet}):selectedSet||optionGroups[""].unshift({id:"?",label:"",selected:!0})),groupIndex=0,groupLength=optionGroupNames.length;groupLength>groupIndex;groupIndex++){for(optionGroupName=optionGroupNames[groupIndex],optionGroup=optionGroups[optionGroupName],optionGroupsCache.length<=groupIndex?(existingParent={element:optGroupTemplate.clone().attr("label",optionGroupName),label:optionGroup.label},existingOptions=[existingParent],optionGroupsCache.push(existingOptions),selectElement.append(existingParent.element)):(existingOptions=optionGroupsCache[groupIndex],existingParent=existingOptions[0],existingParent.label!=optionGroupName&&existingParent.element.attr("label",existingParent.label=optionGroupName)),lastElement=null,index=0,length=optionGroup.length;length>index;index++)option=optionGroup[index],(existingOption=existingOptions[index+1])?(lastElement=existingOption.element,existingOption.label!==option.label&&lastElement.text(existingOption.label=option.label),existingOption.id!==option.id&&lastElement.val(existingOption.id=option.id),existingOption.selected!==option.selected&&lastElement.prop("selected",existingOption.selected=option.selected)):(""===option.id&&nullOption?element=nullOption:(element=optionTemplate.clone()).val(option.id).attr("selected",option.selected).text(option.label),existingOptions.push(existingOption={element:element,label:option.label,id:option.id,selected:option.selected}),lastElement?lastElement.after(element):existingParent.element.append(element),lastElement=element);for(index++;existingOptions.length>index;)existingOptions.pop().element.remove()}for(;optionGroupsCache.length>groupIndex;)optionGroupsCache.pop()[0].element.remove()}var match;if(!(match=optionsExp.match(NG_OPTIONS_REGEXP)))throw ngOptionsMinErr("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",optionsExp,startingTag(selectElement));var displayFn=$parse(match[2]||match[1]),valueName=match[4]||match[6],keyName=match[5],groupByFn=$parse(match[3]||""),valueFn=$parse(match[2]?match[1]:valueName),valuesFn=$parse(match[7]),track=match[8],trackFn=track?$parse(match[8]):null,optionGroupsCache=[[{element:selectElement,label:""}]];nullOption&&($compile(nullOption)(scope),nullOption.removeClass("ng-scope"),nullOption.remove()),selectElement.empty(),selectElement.on("change",function(){scope.$apply(function(){var optionGroup,key,value,optionElement,index,groupIndex,length,groupLength,trackIndex,collection=valuesFn(scope)||[],locals={};if(multiple){for(value=[],groupIndex=0,groupLength=optionGroupsCache.length;groupLength>groupIndex;groupIndex++)for(optionGroup=optionGroupsCache[groupIndex],index=1,length=optionGroup.length;length>index;index++)if((optionElement=optionGroup[index].element)[0].selected){if(key=optionElement.val(),keyName&&(locals[keyName]=key),trackFn)for(trackIndex=0;trackIndex<collection.length&&(locals[valueName]=collection[trackIndex],trackFn(scope,locals)!=key);trackIndex++);else locals[valueName]=collection[key];value.push(valueFn(scope,locals))}}else{if(key=selectElement.val(),"?"==key)value=undefined;else if(""===key)value=null;else if(trackFn){for(trackIndex=0;trackIndex<collection.length;trackIndex++)if(locals[valueName]=collection[trackIndex],trackFn(scope,locals)==key){value=valueFn(scope,locals);break}}else locals[valueName]=collection[key],keyName&&(locals[keyName]=key),value=valueFn(scope,locals);optionGroupsCache[0].length>1&&optionGroupsCache[0][1].id!==key&&(optionGroupsCache[0][1].selected=!1)}ctrl.$setViewValue(value)})}),ctrl.$render=render,scope.$watch(render)}if(ctrls[1]){for(var emptyOption,selectCtrl=ctrls[0],ngModelCtrl=ctrls[1],multiple=attr.multiple,optionsExp=attr.ngOptions,nullOption=!1,optionTemplate=jqLite(document.createElement("option")),optGroupTemplate=jqLite(document.createElement("optgroup")),unknownOption=optionTemplate.clone(),i=0,children=element.children(),ii=children.length;ii>i;i++)if(""===children[i].value){emptyOption=nullOption=children.eq(i);break}selectCtrl.init(ngModelCtrl,nullOption,unknownOption),multiple&&(ngModelCtrl.$isEmpty=function(value){return!value||0===value.length}),optionsExp?setupAsOptions(scope,element,ngModelCtrl):multiple?setupAsMultiple(scope,element,ngModelCtrl):setupAsSingle(scope,element,ngModelCtrl,selectCtrl)}}}}],optionDirective=["$interpolate",function($interpolate){var nullSelectCtrl={addOption:noop,removeOption:noop};return{restrict:"E",priority:100,compile:function(element,attr){if(isUndefined(attr.value)){var interpolateFn=$interpolate(element.text(),!0);interpolateFn||attr.$set("value",element.text())}return function(scope,element,attr){var selectCtrlName="$selectController",parent=element.parent(),selectCtrl=parent.data(selectCtrlName)||parent.parent().data(selectCtrlName);selectCtrl&&selectCtrl.databound?element.prop("selected",!1):selectCtrl=nullSelectCtrl,interpolateFn?scope.$watch(interpolateFn,function(newVal,oldVal){attr.$set("value",newVal),newVal!==oldVal&&selectCtrl.removeOption(oldVal),selectCtrl.addOption(newVal)}):selectCtrl.addOption(attr.value),element.on("$destroy",function(){selectCtrl.removeOption(attr.value)})}}}}],styleDirective=valueFn({restrict:"E",terminal:!0});return window.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(bindJQuery(),publishExternalAPI(angular),void jqLite(document).ready(function(){angularInit(document,bootstrap)}))}(window,document),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}</style>');var ltubApp=angular.module("ltubApp",[]);ltubApp.controller("DemoCtrl",["$scope",function($scope){$scope.showDemo=function(){$("#show-demo").fadeOut("slow",function(){$("div.sStart").height("100%"),$("#show-demo").replaceWith($("#demo-content").fadeIn("slow")),updateSizes(),moveTo("#demo-content"),$("#transference-demo").addClass("available")})}}]),ltubApp.controller("TransactionCtrl",["$scope",function($scope){$scope.total_bitcoins=2,$scope.disabled=!1,$scope.transactionDemo=function(){$scope.disabled||$("#demo-transaction-form").parsley().validate()&&($("#demo-transaction-send-button").addClass("disabled").qtip("destroy",!0),$("#demo-transaction-send-button").removeAttr("title"),$("#demo-pay-to-address-input").attr("disabled",""),$("#demo-input-amount").attr("disabled",""),$("#demo-remaining-bitcoins").text($scope.remainingBitcoins()+" bitcoins available"),$scope.disabled=!0,isMediumScreen()&&!$("#demo-transaction-details").isScrolledIntoView()&&moveTo("#demo-transaction-details"),setTimeout(function(){$("#demo-transaction-details").replaceWith($("#ok-purchase").fadeIn("slow")),$("#confirmation-sound")[0].play(),setTimeout(function(){$("#congratulations-demo-modal").foundation("reveal","open")},1800)},1e3))},$scope.remainingBitcoinsFormattedText=function(){var result=$scope.remainingBitcoins();return result!=$scope.total_bitcoins?result+" out of "+$scope.total_bitcoins+" bitcoins available":$scope.total_bitcoins+" bitcoins available"},$scope.remainingBitcoins=function(){var result=$scope.total_bitcoins,parsed=parseFloat($scope.input_amount);return parsed>0&&(result=$scope.total_bitcoins-parsed),result.toFixed(8).replace(/(\.[0-9]*?)0+$/,"$1").replace(/([0-9]*)\.$/,"$1")},$scope.copyAddress=function(){isMediumScreen()&&!$("#demo-pay-to-address-input").isBottomScrolledIntoView()&&moveTo("#demo-pay-to-address-input"),$("#demo-pay-to-address-input").val($("#demo-pay-to-address").text()),$("#demo-transaction-form").parsley().validate()},$scope.showBlockchainSection=function(){$("#show-blockchain-section").replaceWith($("#demo-section-blockchain").fadeIn("slow"))},$scope.discardDemoModal=function(){$("#congratulations-demo-modal").foundation("reveal","close"),moveTo("#show-blockchain-section")}}]),/*! jQuery UI - v1.10.3 - 2013-05-03
  * http://jqueryui.com
  * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
  * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
  function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})}(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,this.each(r?function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+a+"'")}:function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_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}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",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||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return 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"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.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()}}return{top:0,left:0}},_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 e,i,s,n=this.options;return n.containment?"window"===n.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===n.containment?void(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],void(s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i))):void(this.containment=null)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))
  },_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",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},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s&&(!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n))?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),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"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_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,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){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()}}return{top:0,left:0}},_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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.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).removeClass("ui-sortable-helper")}else this.currentItem.show();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(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(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,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[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:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{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]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={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"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.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],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.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"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),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}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{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;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e)))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()
  },refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(s,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}})):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",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},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault());if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.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=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(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()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},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):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__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.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(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e):void 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())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" 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.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var e=a.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,void a.document.one("mouseup",function(){e=null}))}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?void(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){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},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,a="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.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;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))
  }},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o++)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;a=this._getDaysInMonth(m,v-1),!(a>=_);)v++,_-=a;if(h=this._daylightSavingAdjust(new Date(m,v-1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},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:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_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,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){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(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.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){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,E,N,W,O,F,R,L=new Date,j=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:j,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=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>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(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'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++){if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[M]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X&&this.maxRows>A?this.maxRows:A,this.maxRows=H,E=this._daylightSavingAdjust(new Date(te,Z,1-z)),N=0;H>N;N++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[E]):[!0,""],F=E.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>E||J&&E>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(E.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===E.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(E.getTime()===$.getTime()?" "+this._currentClass:"")+(E.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===j.getTime()?" ui-state-highlight":"")+(E.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_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){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_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),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,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);var n=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"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()
  }})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},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().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_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(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},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 ").children(".ui-menu-item").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;this.active&&(s="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.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?void(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,s,n;return this.active?void(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),x={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"
  },_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void e(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),void(this.options[e]=i)):(this._super(e,i),void("content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),void(i&&this._open(e,t,i)))},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return void a.find(".ui-tooltip-content").html(n);s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery),/*
   * qTip2 - Pretty powerful tooltips - v2.2.0
   * http://qtip2.com
   *
   * Copyright (c) 2013 Craig Michael Thompson
   * Released under the MIT, GPL licenses
   * http://jquery.org/license
   *
   * Date: Thu Nov 21 2013 08:34 GMT+0000
   * Plugins: tips modal viewport svg imagemap ie6
   * Styles: basic css3
   */
  function(window,document,undefined){!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):jQuery&&!jQuery.fn.qtip&&factory(jQuery)}(function($){"use strict";function QTip(target,options,id,attr){this.id=id,this.target=target,this.tooltip=NULL,this.elements={target:target},this._id=NAMESPACE+"-"+id,this.timers={img:{}},this.options=options,this.plugins={},this.cache={event:{},target:$(),disabled:FALSE,attr:attr,onTooltip:FALSE,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=FALSE}function invalidOpt(a){return a===NULL||"object"!==$.type(a)}function invalidContent(c){return!($.isFunction(c)||c&&c.attr||c.length||"object"===$.type(c)&&(c.jquery||c.then))}function sanitizeOptions(opts){var content,text,ajax,once;return invalidOpt(opts)?FALSE:(invalidOpt(opts.metadata)&&(opts.metadata={type:opts.metadata}),"content"in opts&&(content=opts.content,invalidOpt(content)||content.jquery||content.done?content=opts.content={text:text=invalidContent(content)?FALSE:content}:text=content.text,"ajax"in content&&(ajax=content.ajax,once=ajax&&ajax.once!==FALSE,delete content.ajax,content.text=function(event,api){var loading=text||$(this).attr(api.options.content.attr)||"Loading...",deferred=$.ajax($.extend({},ajax,{context:api})).then(ajax.success,NULL,ajax.error).then(function(content){return content&&once&&api.set("content.text",content),content},function(xhr,status,error){api.destroyed||0===xhr.status||api.set("content.text",status+": "+error)});return once?loading:(api.set("content.text",loading),deferred)}),"title"in content&&(invalidOpt(content.title)||(content.button=content.title.button,content.title=content.title.text),invalidContent(content.title||FALSE)&&(content.title=FALSE))),"position"in opts&&invalidOpt(opts.position)&&(opts.position={my:opts.position,at:opts.position}),"show"in opts&&invalidOpt(opts.show)&&(opts.show=opts.show.jquery?{target:opts.show}:opts.show===TRUE?{ready:TRUE}:{event:opts.show}),"hide"in opts&&invalidOpt(opts.hide)&&(opts.hide=opts.hide.jquery?{target:opts.hide}:{event:opts.hide}),"style"in opts&&invalidOpt(opts.style)&&(opts.style={classes:opts.style}),$.each(PLUGINS,function(){this.sanitize&&this.sanitize(opts)}),opts)}function convertNotation(options,notation){for(var obj,i=0,option=options,levels=notation.split(".");option=option[levels[i++]];)i<levels.length&&(obj=option);return[obj||options,levels.pop()]}function setCallback(notation,args){var category,rule,match;for(category in this.checks)for(rule in this.checks[category])(match=new RegExp(rule,"i").exec(notation))&&(args.push(match),("builtin"===category||this.plugins[category])&&this.checks[category][rule].apply(this.plugins[category]||this,args))}function createWidgetClass(cls){return WIDGET.concat("").join(cls?"-"+cls+" ":" ")}function cloneEvent(event){return event&&{type:event.type,pageX:event.pageX,pageY:event.pageY,target:event.target,relatedTarget:event.relatedTarget,scrollX:event.scrollX||window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft,scrollY:event.scrollY||window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop}||{}}function delay(callback,duration){return duration>0?setTimeout($.proxy(callback,this),duration):void callback.call(this)}function showMethod(event){return this.tooltip.hasClass(CLASS_DISABLED)?FALSE:(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),void(this.timers.show=delay.call(this,function(){this.toggle(TRUE,event)},this.options.show.delay)))}function hideMethod(event){if(this.tooltip.hasClass(CLASS_DISABLED))return FALSE;var relatedTarget=$(event.relatedTarget),ontoTooltip=relatedTarget.closest(SELECTOR)[0]===this.tooltip[0],ontoTarget=relatedTarget[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==relatedTarget[0]&&"mouse"===this.options.position.target&&ontoTooltip||this.options.hide.fixed&&/mouse(out|leave|move)/.test(event.type)&&(ontoTooltip||ontoTarget))try{event.preventDefault(),event.stopImmediatePropagation()}catch(e){}else this.timers.hide=delay.call(this,function(){this.toggle(FALSE,event)},this.options.hide.delay,this)}function inactiveMethod(event){return this.tooltip.hasClass(CLASS_DISABLED)||!this.options.hide.inactive?FALSE:(clearTimeout(this.timers.inactive),void(this.timers.inactive=delay.call(this,function(){this.hide(event)},this.options.hide.inactive)))}function repositionMethod(event){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(event)}function delegate(selector,events,method){$(document.body).delegate(selector,(events.split?events:events.join(ns+" "))+ns,function(){var api=QTIP.api[$.attr(this,ATTR_ID)];api&&!api.disabled&&method.apply(api,arguments)})}function init(elem,id,opts){var obj,posOptions,attr,config,title,docBody=$(document.body),newTarget=elem[0]===document?docBody:elem,metadata=elem.metadata?elem.metadata(opts.metadata):NULL,metadata5="html5"===opts.metadata.type&&metadata?metadata[opts.metadata.name]:NULL,html5=elem.data(opts.metadata.name||"qtipopts");try{html5="string"==typeof html5?$.parseJSON(html5):html5}catch(e){}if(config=$.extend(TRUE,{},QTIP.defaults,opts,"object"==typeof html5?sanitizeOptions(html5):NULL,sanitizeOptions(metadata5||metadata)),posOptions=config.position,config.id=id,"boolean"==typeof config.content.text){if(attr=elem.attr(config.content.attr),config.content.attr===FALSE||!attr)return FALSE;config.content.text=attr}if(posOptions.container.length||(posOptions.container=docBody),posOptions.target===FALSE&&(posOptions.target=newTarget),config.show.target===FALSE&&(config.show.target=newTarget),config.show.solo===TRUE&&(config.show.solo=posOptions.container.closest("body")),config.hide.target===FALSE&&(config.hide.target=newTarget),config.position.viewport===TRUE&&(config.position.viewport=posOptions.container),posOptions.container=posOptions.container.eq(0),posOptions.at=new CORNER(posOptions.at,TRUE),posOptions.my=new CORNER(posOptions.my),elem.data(NAMESPACE))if(config.overwrite)elem.qtip("destroy",!0);else if(config.overwrite===FALSE)return FALSE;return elem.attr(ATTR_HAS,id),config.suppress&&(title=elem.attr("title"))&&elem.removeAttr("title").attr(oldtitle,title).attr("title",""),obj=new QTip(elem,config,id,!!attr),elem.data(NAMESPACE,obj),elem.one("remove.qtip-"+id+" removeqtip.qtip-"+id,function(){var api;(api=$(this).data(NAMESPACE))&&api.destroy(!0)}),obj}function camel(s){return s.charAt(0).toUpperCase()+s.slice(1)}function vendorCss(elem,prop){var cur,val,ucProp=prop.charAt(0).toUpperCase()+prop.slice(1),props=(prop+" "+cssPrefixes.join(ucProp+" ")+ucProp).split(" "),i=0;if(cssProps[prop])return elem.css(cssProps[prop]);for(;cur=props[i++];)if((val=elem.css(cur))!==undefined)return cssProps[prop]=cur,val}function intCss(elem,prop){return Math.ceil(parseFloat(vendorCss(elem,prop)))}function Tip(qtip,options){this._ns="tip",this.options=options,this.offset=options.offset,this.size=[options.width,options.height],this.init(this.qtip=qtip)}function Modal(api,options){this.options=options,this._ns="-modal",this.init(this.qtip=api)}function Ie6(api){this._ns="ie6",this.init(this.qtip=api)}var QTIP,PROTOTYPE,CORNER,CHECKS,trackingBound,TRUE=!0,FALSE=!1,NULL=null,X="x",Y="y",WIDTH="width",HEIGHT="height",TOP="top",LEFT="left",BOTTOM="bottom",RIGHT="right",CENTER="center",FLIPINVERT="flipinvert",SHIFT="shift",PLUGINS={},NAMESPACE="qtip",ATTR_HAS="data-hasqtip",ATTR_ID="data-qtip-id",WIDGET=["ui-widget","ui-tooltip"],SELECTOR="."+NAMESPACE,INACTIVE_EVENTS="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),CLASS_FIXED=NAMESPACE+"-fixed",CLASS_DEFAULT=NAMESPACE+"-default",CLASS_FOCUS=NAMESPACE+"-focus",CLASS_HOVER=NAMESPACE+"-hover",CLASS_DISABLED=NAMESPACE+"-disabled",replaceSuffix="_replacedByqTip",oldtitle="oldtitle",BROWSER={ie:function(){for(var v=3,div=document.createElement("div");(div.innerHTML="<!--[if gt IE "+ ++v+"]><i></i><![endif]-->")&&div.getElementsByTagName("i")[0];);return v>4?v:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||FALSE};PROTOTYPE=QTip.prototype,PROTOTYPE._when=function(deferreds){return $.when.apply($,deferreds)},PROTOTYPE.render=function(show){if(this.rendered||this.destroyed)return this;var tooltip,self=this,options=this.options,cache=this.cache,elements=this.elements,text=options.content.text,title=options.content.title,button=options.content.button,posOptions=options.position,deferreds=("."+this._id+" ",[]);return $.attr(this.target[0],"aria-describedby",this._id),this.tooltip=elements.tooltip=tooltip=$("<div/>",{id:this._id,"class":[NAMESPACE,CLASS_DEFAULT,options.style.classes,NAMESPACE+"-pos-"+options.position.my.abbrev()].join(" "),width:options.style.width||"",height:options.style.height||"",tracking:"mouse"===posOptions.target&&posOptions.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":FALSE,"aria-describedby":this._id+"-content","aria-hidden":TRUE}).toggleClass(CLASS_DISABLED,this.disabled).attr(ATTR_ID,this.id).data(NAMESPACE,this).appendTo(posOptions.container).append(elements.content=$("<div />",{"class":NAMESPACE+"-content",id:this._id+"-content","aria-atomic":TRUE})),this.rendered=-1,this.positioning=TRUE,title&&(this._createTitle(),$.isFunction(title)||deferreds.push(this._updateTitle(title,FALSE))),button&&this._createButton(),$.isFunction(text)||deferreds.push(this._updateContent(text,FALSE)),this.rendered=TRUE,this._setWidget(),$.each(PLUGINS,function(name){var instance;"render"===this.initialize&&(instance=this(self))&&(self.plugins[name]=instance)}),this._unassignEvents(),this._assignEvents(),this._when(deferreds).then(function(){self._trigger("render"),self.positioning=FALSE,self.hiddenDuringWait||!options.show.ready&&!show||self.toggle(TRUE,cache.event,FALSE),self.hiddenDuringWait=FALSE}),QTIP.api[this.id]=this,this},PROTOTYPE.destroy=function(immediate){function process(){if(!this.destroyed){this.destroyed=TRUE;var target=this.target,title=target.attr(oldtitle);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),$.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),target.removeData(NAMESPACE).removeAttr(ATTR_ID).removeAttr(ATTR_HAS).removeAttr("aria-describedby"),this.options.suppress&&title&&target.attr("title",title).removeAttr(oldtitle),this._unbind(target),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=NULL,delete QTIP.api[this.id]}}return this.destroyed?this.target:(immediate===TRUE&&"hide"!==this.triggering||!this.rendered?process.call(this):(this.tooltip.one("tooltiphidden",$.proxy(process,this)),!this.triggering&&this.hide()),this.target)},CHECKS=PROTOTYPE.checks={builtin:{"^id$":function(obj,o,v,prev){var id=v===TRUE?QTIP.nextid:v,new_id=NAMESPACE+"-"+id;id!==FALSE&&id.length>0&&!$("#"+new_id).length?(this._id=new_id,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):obj[o]=prev},"^prerender":function(obj,o,v){v&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(obj,o,v){this._updateContent(v)},"^content.attr$":function(obj,o,v,prev){this.options.content.text===this.target.attr(prev)&&this._updateContent(this.target.attr(v))},"^content.title$":function(obj,o,v){return v?(v&&!this.elements.title&&this._createTitle(),void this._updateTitle(v)):this._removeTitle()},"^content.button$":function(obj,o,v){this._updateButton(v)},"^content.title.(text|button)$":function(obj,o,v){this.set("content."+o,v)},"^position.(my|at)$":function(obj,o,v){"string"==typeof v&&(obj[o]=new CORNER(v,"at"===o))},"^position.container$":function(obj,o,v){this.rendered&&this.tooltip.appendTo(v)},"^show.ready$":function(obj,o,v){v&&(!this.rendered&&this.render(TRUE)||this.toggle(TRUE))},"^style.classes$":function(obj,o,v,p){this.rendered&&this.tooltip.removeClass(p).addClass(v)},"^style.(width|height)":function(obj,o,v){this.rendered&&this.tooltip.css(o,v)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(obj,o,v){this.rendered&&this.tooltip.toggleClass(CLASS_DEFAULT,!!v)},"^events.(render|show|move|hide|focus|blur)$":function(obj,o,v){this.rendered&&this.tooltip[($.isFunction(v)?"":"un")+"bind"]("tooltip"+o,v)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var posOptions=this.options.position;this.tooltip.attr("tracking","mouse"===posOptions.target&&posOptions.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},PROTOTYPE.get=function(notation){if(this.destroyed)return this;var o=convertNotation(this.options,notation.toLowerCase()),result=o[0][o[1]];return result.precedance?result.string():result};var rmove=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,rrender=/^prerender|show\.ready/i;PROTOTYPE.set=function(option,value){if(this.destroyed)return this;{var name,rendered=this.rendered,reposition=FALSE,options=this.options;this.checks}return"string"==typeof option?(name=option,option={},option[name]=value):option=$.extend({},option),$.each(option,function(notation,value){if(rendered&&rrender.test(notation))return void delete option[notation];var previous,obj=convertNotation(options,notation.toLowerCase());previous=obj[0][obj[1]],obj[0][obj[1]]=value&&value.nodeType?$(value):value,reposition=rmove.test(notation)||reposition,option[notation]=[obj[0],obj[1],value,previous]}),sanitizeOptions(options),this.positioning=TRUE,$.each(option,$.proxy(setCallback,this)),this.positioning=FALSE,this.rendered&&this.tooltip[0].offsetWidth>0&&reposition&&this.reposition("mouse"===options.position.target?NULL:this.cache.event),this},PROTOTYPE._update=function(content,element){var self=this,cache=this.cache;return this.rendered&&content?($.isFunction(content)&&(content=content.call(this.elements.target,cache.event,this)||""),$.isFunction(content.then)?(cache.waiting=TRUE,content.then(function(c){return cache.waiting=FALSE,self._update(c,element)},NULL,function(e){return self._update(e,element)})):content===FALSE||!content&&""!==content?FALSE:(content.jquery&&content.length>0?element.empty().append(content.css({display:"block",visibility:"visible"})):element.html(content),this._waitForContent(element).then(function(images){images.images&&images.images.length&&self.rendered&&self.tooltip[0].offsetWidth>0&&self.reposition(cache.event,!images.length)}))):FALSE},PROTOTYPE._waitForContent=function(element){var cache=this.cache;return cache.waiting=TRUE,($.fn.imagesLoaded?element.imagesLoaded():$.Deferred().resolve([])).done(function(){cache.waiting=FALSE}).promise()},PROTOTYPE._updateContent=function(content,reposition){this._update(content,this.elements.content,reposition)},PROTOTYPE._updateTitle=function(content,reposition){this._update(content,this.elements.title,reposition)===FALSE&&this._removeTitle(FALSE)},PROTOTYPE._createTitle=function(){var elements=this.elements,id=this._id+"-title";elements.titlebar&&this._removeTitle(),elements.titlebar=$("<div />",{"class":NAMESPACE+"-titlebar "+(this.options.style.widget?createWidgetClass("header"):"")}).append(elements.title=$("<div />",{id:id,"class":NAMESPACE+"-title","aria-atomic":TRUE})).insertBefore(elements.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(event){$(this).toggleClass("ui-state-active ui-state-focus","down"===event.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(event){$(this).toggleClass("ui-state-hover","mouseover"===event.type)}),this.options.content.button&&this._createButton()},PROTOTYPE._removeTitle=function(reposition){var elements=this.elements;elements.title&&(elements.titlebar.remove(),elements.titlebar=elements.title=elements.button=NULL,reposition!==FALSE&&this.reposition())},PROTOTYPE.reposition=function(event,effect){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=TRUE;var pluginCalculations,offset,cache=this.cache,tooltip=this.tooltip,posOptions=this.options.position,target=posOptions.target,my=posOptions.my,at=posOptions.at,viewport=posOptions.viewport,container=posOptions.container,adjust=posOptions.adjust,method=adjust.method.split(" "),tooltipWidth=tooltip.outerWidth(FALSE),tooltipHeight=tooltip.outerHeight(FALSE),targetWidth=0,targetHeight=0,type=tooltip.css("position"),position={left:0,top:0},visible=tooltip[0].offsetWidth>0,isScroll=event&&"scroll"===event.type,win=$(window),doc=container[0].ownerDocument,mouse=this.mouse;if($.isArray(target)&&2===target.length)at={x:LEFT,y:TOP},position={left:target[0],top:target[1]};else if("mouse"===target)at={x:LEFT,y:TOP},!mouse||!mouse.pageX||!adjust.mouse&&event&&event.pageX?event&&event.pageX||((!adjust.mouse||this.options.show.distance)&&cache.origin&&cache.origin.pageX?event=cache.origin:(!event||event&&("resize"===event.type||"scroll"===event.type))&&(event=cache.event)):event=mouse,"static"!==type&&(position=container.offset()),doc.body.offsetWidth!==(window.innerWidth||doc.documentElement.clientWidth)&&(offset=$(document.body).offset()),position={left:event.pageX-position.left+(offset&&offset.left||0),top:event.pageY-position.top+(offset&&offset.top||0)},adjust.mouse&&isScroll&&mouse&&(position.left-=(mouse.scrollX||0)-win.scrollLeft(),position.top-=(mouse.scrollY||0)-win.scrollTop());else{if("event"===target?event&&event.target&&"scroll"!==event.type&&"resize"!==event.type?cache.target=$(event.target):event.target||(cache.target=this.elements.target):"event"!==target&&(cache.target=$(target.jquery?target:this.elements.target)),target=cache.target,target=$(target).eq(0),0===target.length)return this;target[0]===document||target[0]===window?(targetWidth=BROWSER.iOS?window.innerWidth:target.width(),targetHeight=BROWSER.iOS?window.innerHeight:target.height(),target[0]===window&&(position={top:(viewport||target).scrollTop(),left:(viewport||target).scrollLeft()})):PLUGINS.imagemap&&target.is("area")?pluginCalculations=PLUGINS.imagemap(this,target,at,PLUGINS.viewport?method:FALSE):PLUGINS.svg&&target&&target[0].ownerSVGElement?pluginCalculations=PLUGINS.svg(this,target,at,PLUGINS.viewport?method:FALSE):(targetWidth=target.outerWidth(FALSE),targetHeight=target.outerHeight(FALSE),position=target.offset()),pluginCalculations&&(targetWidth=pluginCalculations.width,targetHeight=pluginCalculations.height,offset=pluginCalculations.offset,position=pluginCalculations.position),position=this.reposition.offset(target,position,container),(BROWSER.iOS>3.1&&BROWSER.iOS<4.1||BROWSER.iOS>=4.3&&BROWSER.iOS<4.33||!BROWSER.iOS&&"fixed"===type)&&(position.left-=win.scrollLeft(),position.top-=win.scrollTop()),(!pluginCalculations||pluginCalculations&&pluginCalculations.adjustable!==FALSE)&&(position.left+=at.x===RIGHT?targetWidth:at.x===CENTER?targetWidth/2:0,position.top+=at.y===BOTTOM?targetHeight:at.y===CENTER?targetHeight/2:0)}return position.left+=adjust.x+(my.x===RIGHT?-tooltipWidth:my.x===CENTER?-tooltipWidth/2:0),position.top+=adjust.y+(my.y===BOTTOM?-tooltipHeight:my.y===CENTER?-tooltipHeight/2:0),PLUGINS.viewport?(position.adjusted=PLUGINS.viewport(this,position,posOptions,targetWidth,targetHeight,tooltipWidth,tooltipHeight),offset&&position.adjusted.left&&(position.left+=offset.left),offset&&position.adjusted.top&&(position.top+=offset.top)):position.adjusted={left:0,top:0},this._trigger("move",[position,viewport.elem||viewport],event)?(delete position.adjusted,effect===FALSE||!visible||isNaN(position.left)||isNaN(position.top)||"mouse"===target||!$.isFunction(posOptions.effect)?tooltip.css(position):$.isFunction(posOptions.effect)&&(posOptions.effect.call(tooltip,this,$.extend({},position)),tooltip.queue(function(next){$(this).css({opacity:"",height:""}),BROWSER.ie&&this.style.removeAttribute("filter"),next()})),this.positioning=FALSE,this):this},PROTOTYPE.reposition.offset=function(elem,pos,container){function scroll(e,i){pos.left+=i*e.scrollLeft(),pos.top+=i*e.scrollTop()}if(!container[0])return pos;var scrolled,position,parentOffset,overflow,ownerDocument=$(elem[0].ownerDocument),quirks=!!BROWSER.ie&&"CSS1Compat"!==document.compatMode,parent=container[0];do"static"!==(position=$.css(parent,"position"))&&("fixed"===position?(parentOffset=parent.getBoundingClientRect(),scroll(ownerDocument,-1)):(parentOffset=$(parent).position(),parentOffset.left+=parseFloat($.css(parent,"borderLeftWidth"))||0,parentOffset.top+=parseFloat($.css(parent,"borderTopWidth"))||0),pos.left-=parentOffset.left+(parseFloat($.css(parent,"marginLeft"))||0),pos.top-=parentOffset.top+(parseFloat($.css(parent,"marginTop"))||0),scrolled||"hidden"===(overflow=$.css(parent,"overflow"))||"visible"===overflow||(scrolled=$(parent)));while(parent=parent.offsetParent);return scrolled&&(scrolled[0]!==ownerDocument[0]||quirks)&&scroll(scrolled,1),pos};var C=(CORNER=PROTOTYPE.reposition.Corner=function(corner,forceY){corner=(""+corner).replace(/([A-Z])/," $1").replace(/middle/gi,CENTER).toLowerCase(),this.x=(corner.match(/left|right/i)||corner.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(corner.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!forceY;var f=corner.charAt(0);this.precedance="t"===f||"b"===f?Y:X}).prototype;C.invert=function(z,center){this[z]=this[z]===LEFT?RIGHT:this[z]===RIGHT?LEFT:center||this[z]},C.string=function(){var x=this.x,y=this.y;return x===y?x:this.precedance===Y||this.forceY&&"center"!==y?y+" "+x:x+" "+y},C.abbrev=function(){var result=this.string().split(" ");return result[0].charAt(0)+(result[1]&&result[1].charAt(0)||"")},C.clone=function(){return new CORNER(this.string(),this.forceY)},PROTOTYPE.toggle=function(state,event){var cache=this.cache,options=this.options,tooltip=this.tooltip;if(event){if(/over|enter/.test(event.type)&&/out|leave/.test(cache.event.type)&&options.show.target.add(event.target).length===options.show.target.length&&tooltip.has(event.relatedTarget).length)return this;cache.event=cloneEvent(event)}if(this.waiting&&!state&&(this.hiddenDuringWait=TRUE),!this.rendered)return state?this.render(1):this;if(this.destroyed||this.disabled)return this;var identicalState,allow,after,type=state?"show":"hide",opts=this.options[type],posOptions=(this.options[state?"hide":"show"],this.options.position),contentOptions=this.options.content,width=this.tooltip.css("width"),visible=this.tooltip.is(":visible"),animate=state||1===opts.target.length,sameTarget=!event||opts.target.length<2||cache.target[0]===event.target;return(typeof state).search("boolean|number")&&(state=!visible),identicalState=!tooltip.is(":animated")&&visible===state&&sameTarget,allow=identicalState?NULL:!!this._trigger(type,[90]),this.destroyed?this:(allow!==FALSE&&state&&this.focus(event),!allow||identicalState?this:($.attr(tooltip[0],"aria-hidden",!state),state?(cache.origin=cloneEvent(this.mouse),$.isFunction(contentOptions.text)&&this._updateContent(contentOptions.text,FALSE),$.isFunction(contentOptions.title)&&this._updateTitle(contentOptions.title,FALSE),!trackingBound&&"mouse"===posOptions.target&&posOptions.adjust.mouse&&($(document).bind("mousemove."+NAMESPACE,this._storeMouse),trackingBound=TRUE),width||tooltip.css("width",tooltip.outerWidth(FALSE)),this.reposition(event,arguments[2]),width||tooltip.css("width",""),opts.solo&&("string"==typeof opts.solo?$(opts.solo):$(SELECTOR,opts.solo)).not(tooltip).not(opts.target).qtip("hide",$.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete cache.origin,trackingBound&&!$(SELECTOR+'[tracking="true"]:visible',opts.solo).not(tooltip).length&&($(document).unbind("mousemove."+NAMESPACE),trackingBound=FALSE),this.blur(event)),after=$.proxy(function(){state?(BROWSER.ie&&tooltip[0].style.removeAttribute("filter"),tooltip.css("overflow",""),"string"==typeof opts.autofocus&&$(this.options.show.autofocus,tooltip).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):tooltip.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(state?"visible":"hidden")},this),opts.effect===FALSE||animate===FALSE?(tooltip[type](),after()):$.isFunction(opts.effect)?(tooltip.stop(1,1),opts.effect.call(tooltip,this),tooltip.queue("fx",function(n){after(),n()})):tooltip.fadeTo(90,state?1:0,after),state&&opts.target.trigger("qtip-"+this.id+"-inactive"),this))},PROTOTYPE.show=function(event){return this.toggle(TRUE,event)},PROTOTYPE.hide=function(event){return this.toggle(FALSE,event)},PROTOTYPE.focus=function(event){if(!this.rendered||this.destroyed)return this;var qtips=$(SELECTOR),tooltip=this.tooltip,curIndex=parseInt(tooltip[0].style.zIndex,10),newIndex=QTIP.zindex+qtips.length;return tooltip.hasClass(CLASS_FOCUS)||this._trigger("focus",[newIndex],event)&&(curIndex!==newIndex&&(qtips.each(function(){this.style.zIndex>curIndex&&(this.style.zIndex=this.style.zIndex-1)}),qtips.filter("."+CLASS_FOCUS).qtip("blur",event)),tooltip.addClass(CLASS_FOCUS)[0].style.zIndex=newIndex),this},PROTOTYPE.blur=function(event){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(CLASS_FOCUS),this._trigger("blur",[this.tooltip.css("zIndex")],event),this)},PROTOTYPE.disable=function(state){return this.destroyed?this:("toggle"===state?state=!(this.rendered?this.tooltip.hasClass(CLASS_DISABLED):this.disabled):"boolean"!=typeof state&&(state=TRUE),this.rendered&&this.tooltip.toggleClass(CLASS_DISABLED,state).attr("aria-disabled",state),this.disabled=!!state,this)},PROTOTYPE.enable=function(){return this.disable(FALSE)},PROTOTYPE._createButton=function(){var self=this,elements=this.elements,tooltip=elements.tooltip,button=this.options.content.button,isString="string"==typeof button,close=isString?button:"Close tooltip";elements.button&&elements.button.remove(),elements.button=button.jquery?button:$("<a />",{"class":"qtip-close "+(this.options.style.widget?"":NAMESPACE+"-icon"),title:close,"aria-label":close}).prepend($("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),elements.button.appendTo(elements.titlebar||tooltip).attr("role","button").click(function(event){return tooltip.hasClass(CLASS_DISABLED)||self.hide(event),FALSE})},PROTOTYPE._updateButton=function(button){if(!this.rendered)return FALSE;var elem=this.elements.button;button?this._createButton():elem.remove()},PROTOTYPE._setWidget=function(){var on=this.options.style.widget,elements=this.elements,tooltip=elements.tooltip,disabled=tooltip.hasClass(CLASS_DISABLED);tooltip.removeClass(CLASS_DISABLED),CLASS_DISABLED=on?"ui-state-disabled":"qtip-disabled",tooltip.toggleClass(CLASS_DISABLED,disabled),tooltip.toggleClass("ui-helper-reset "+createWidgetClass(),on).toggleClass(CLASS_DEFAULT,this.options.style.def&&!on),elements.content&&elements.content.toggleClass(createWidgetClass("content"),on),elements.titlebar&&elements.titlebar.toggleClass(createWidgetClass("header"),on),elements.button&&elements.button.toggleClass(NAMESPACE+"-icon",!on)},PROTOTYPE._storeMouse=function(event){(this.mouse=cloneEvent(event)).type="mousemove"},PROTOTYPE._bind=function(targets,events,method,suffix,context){var ns="."+this._id+(suffix?"-"+suffix:"");events.length&&$(targets).bind((events.split?events:events.join(ns+" "))+ns,$.proxy(method,context||this))},PROTOTYPE._unbind=function(targets,suffix){$(targets).unbind("."+this._id+(suffix?"-"+suffix:""))};var ns="."+NAMESPACE;$(function(){delegate(SELECTOR,["mouseenter","mouseleave"],function(event){var state="mouseenter"===event.type,tooltip=$(event.currentTarget),target=$(event.relatedTarget||event.target),options=this.options;state?(this.focus(event),tooltip.hasClass(CLASS_FIXED)&&!tooltip.hasClass(CLASS_DISABLED)&&clearTimeout(this.timers.hide)):"mouse"===options.position.target&&options.hide.event&&options.show.target&&!target.closest(options.show.target[0]).length&&this.hide(event),tooltip.toggleClass(CLASS_HOVER,state)}),delegate("["+ATTR_ID+"]",INACTIVE_EVENTS,inactiveMethod)}),PROTOTYPE._trigger=function(type,args,event){var callback=$.Event("tooltip"+type);return callback.originalEvent=event&&$.extend({},event)||this.cache.event||NULL,this.triggering=type,this.tooltip.trigger(callback,[this].concat(args||[])),this.triggering=FALSE,!callback.isDefaultPrevented()},PROTOTYPE._bindEvents=function(showEvents,hideEvents,showTarget,hideTarget,showMethod,hideMethod){if(hideTarget.add(showTarget).length===hideTarget.length){var toggleEvents=[];hideEvents=$.map(hideEvents,function(type){var showIndex=$.inArray(type,showEvents);return showIndex>-1?void toggleEvents.push(showEvents.splice(showIndex,1)[0]):type}),toggleEvents.length&&this._bind(showTarget,toggleEvents,function(event){var state=this.rendered?this.tooltip[0].offsetWidth>0:!1;(state?hideMethod:showMethod).call(this,event)})}this._bind(showTarget,showEvents,showMethod),this._bind(hideTarget,hideEvents,hideMethod)},PROTOTYPE._assignInitialEvents=function(event){function hoverIntent(event){return this.disabled||this.destroyed?FALSE:(this.cache.event=cloneEvent(event),this.cache.target=event?$(event.target):[undefined],clearTimeout(this.timers.show),void(this.timers.show=delay.call(this,function(){this.render("object"==typeof event||options.show.ready)},options.show.delay)))}var options=this.options,showTarget=options.show.target,hideTarget=options.hide.target,showEvents=options.show.event?$.trim(""+options.show.event).split(" "):[],hideEvents=options.hide.event?$.trim(""+options.hide.event).split(" "):[];/mouse(over|enter)/i.test(options.show.event)&&!/mouse(out|leave)/i.test(options.hide.event)&&hideEvents.push("mouseleave"),this._bind(showTarget,"mousemove",function(event){this._storeMouse(event),this.cache.onTarget=TRUE}),this._bindEvents(showEvents,hideEvents,showTarget,hideTarget,hoverIntent,function(){clearTimeout(this.timers.show)}),(options.show.ready||options.prerender)&&hoverIntent.call(this,event)},PROTOTYPE._assignEvents=function(){var self=this,options=this.options,posOptions=options.position,tooltip=this.tooltip,showTarget=options.show.target,hideTarget=options.hide.target,containerTarget=posOptions.container,viewportTarget=posOptions.viewport,documentTarget=$(document),windowTarget=($(document.body),$(window)),showEvents=options.show.event?$.trim(""+options.show.event).split(" "):[],hideEvents=options.hide.event?$.trim(""+options.hide.event).split(" "):[];$.each(options.events,function(name,callback){self._bind(tooltip,"toggle"===name?["tooltipshow","tooltiphide"]:["tooltip"+name],callback,null,tooltip)}),/mouse(out|leave)/i.test(options.hide.event)&&"window"===options.hide.leave&&this._bind(documentTarget,["mouseout","blur"],function(event){/select|option/.test(event.target.nodeName)||event.relatedTarget||this.hide(event)}),options.hide.fixed?hideTarget=hideTarget.add(tooltip.addClass(CLASS_FIXED)):/mouse(over|enter)/i.test(options.show.event)&&this._bind(hideTarget,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+options.hide.event).indexOf("unfocus")>-1&&this._bind(containerTarget.closest("html"),["mousedown","touchstart"],function(event){var elem=$(event.target),enabled=this.rendered&&!this.tooltip.hasClass(CLASS_DISABLED)&&this.tooltip[0].offsetWidth>0,isAncestor=elem.parents(SELECTOR).filter(this.tooltip[0]).length>0;elem[0]===this.target[0]||elem[0]===this.tooltip[0]||isAncestor||this.target.has(elem[0]).length||!enabled||this.hide(event)}),"number"==typeof options.hide.inactive&&(this._bind(showTarget,"qtip-"+this.id+"-inactive",inactiveMethod),this._bind(hideTarget.add(tooltip),QTIP.inactiveEvents,inactiveMethod,"-inactive")),this._bindEvents(showEvents,hideEvents,showTarget,hideTarget,showMethod,hideMethod),this._bind(showTarget.add(tooltip),"mousemove",function(event){if("number"==typeof options.hide.distance){var origin=this.cache.origin||{},limit=this.options.hide.distance,abs=Math.abs;(abs(event.pageX-origin.pageX)>=limit||abs(event.pageY-origin.pageY)>=limit)&&this.hide(event)}this._storeMouse(event)}),"mouse"===posOptions.target&&posOptions.adjust.mouse&&(options.hide.event&&this._bind(showTarget,["mouseenter","mouseleave"],function(event){this.cache.onTarget="mouseenter"===event.type}),this._bind(documentTarget,"mousemove",function(event){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(CLASS_DISABLED)&&this.tooltip[0].offsetWidth>0&&this.reposition(event)})),(posOptions.adjust.resize||viewportTarget.length)&&this._bind($.event.special.resize?viewportTarget:windowTarget,"resize",repositionMethod),posOptions.adjust.scroll&&this._bind(windowTarget.add(posOptions.container),"scroll",repositionMethod)
  },PROTOTYPE._unassignEvents=function(){var targets=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],window,document];this._unbind($([]).pushStack($.grep(targets,function(i){return"object"==typeof i})))},QTIP=$.fn.qtip=function(options,notation,newValue){var command=(""+options).toLowerCase(),returned=NULL,args=$.makeArray(arguments).slice(1),event=args[args.length-1],opts=this[0]?$.data(this[0],NAMESPACE):NULL;return!arguments.length&&opts||"api"===command?opts:"string"==typeof options?(this.each(function(){var api=$.data(this,NAMESPACE);if(!api)return TRUE;if(event&&event.timeStamp&&(api.cache.event=event),!notation||"option"!==command&&"options"!==command)api[command]&&api[command].apply(api,args);else{if(newValue===undefined&&!$.isPlainObject(notation))return returned=api.get(notation),FALSE;api.set(notation,newValue)}}),returned!==NULL?returned:this):"object"!=typeof options&&arguments.length?void 0:(opts=sanitizeOptions($.extend(TRUE,{},options)),this.each(function(i){var api,id;return id=$.isArray(opts.id)?opts.id[i]:opts.id,id=!id||id===FALSE||id.length<1||QTIP.api[id]?QTIP.nextid++:id,api=init($(this),id,opts),api===FALSE?TRUE:(QTIP.api[id]=api,$.each(PLUGINS,function(){"initialize"===this.initialize&&this(api)}),void api._assignInitialEvents(event))}))},$.qtip=QTip,QTIP.api={},$.each({attr:function(attr,val){if(this.length){var self=this[0],title="title",api=$.data(self,"qtip");if(attr===title&&api&&"object"==typeof api&&api.options.suppress)return arguments.length<2?$.attr(self,oldtitle):(api&&api.options.content.attr===title&&api.cache.attr&&api.set("content.text",val),this.attr(oldtitle,val))}return $.fn["attr"+replaceSuffix].apply(this,arguments)},clone:function(keepData){var elems=($([]),$.fn["clone"+replaceSuffix].apply(this,arguments));return keepData||elems.filter("["+oldtitle+"]").attr("title",function(){return $.attr(this,oldtitle)}).removeAttr(oldtitle),elems}},function(name,func){if(!func||$.fn[name+replaceSuffix])return TRUE;var old=$.fn[name+replaceSuffix]=$.fn[name];$.fn[name]=function(){return func.apply(this,arguments)||old.apply(this,arguments)}}),$.ui||($["cleanData"+replaceSuffix]=$.cleanData,$.cleanData=function(elems){for(var elem,i=0;(elem=$(elems[i])).length;i++)if(elem.attr(ATTR_HAS))try{elem.triggerHandler("removeqtip")}catch(e){}$["cleanData"+replaceSuffix].apply(this,arguments)}),QTIP.version="2.2.0",QTIP.nextid=0,QTIP.inactiveEvents=INACTIVE_EVENTS,QTIP.zindex=15e3,QTIP.defaults={prerender:FALSE,id:FALSE,overwrite:TRUE,suppress:TRUE,content:{text:TRUE,attr:"title",title:FALSE,button:FALSE},position:{my:"top left",at:"bottom right",target:FALSE,container:FALSE,viewport:FALSE,adjust:{x:0,y:0,mouse:TRUE,scroll:TRUE,resize:TRUE,method:"flipinvert flipinvert"},effect:function(api,pos){$(this).animate(pos,{duration:200,queue:FALSE})}},show:{target:FALSE,event:"mouseenter",effect:TRUE,delay:90,solo:FALSE,ready:FALSE,autofocus:FALSE},hide:{target:FALSE,event:"mouseleave",effect:TRUE,delay:0,fixed:FALSE,inactive:FALSE,leave:"window",distance:FALSE},style:{classes:"",widget:FALSE,width:FALSE,height:FALSE,def:TRUE},events:{render:NULL,move:NULL,show:NULL,hide:NULL,toggle:NULL,visible:NULL,hidden:NULL,focus:NULL,blur:NULL}};var TIP,MARGIN="margin",BORDER="border",COLOR="color",BG_COLOR="background-color",TRANSPARENT="transparent",IMPORTANT=" !important",HASCANVAS=!!document.createElement("canvas").getContext,INVALID=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,cssProps={},cssPrefixes=["Webkit","O","Moz","ms"];if(HASCANVAS)var PIXEL_RATIO=window.devicePixelRatio||1,BACKING_STORE_RATIO=function(){var context=document.createElement("canvas").getContext("2d");return context.backingStorePixelRatio||context.webkitBackingStorePixelRatio||context.mozBackingStorePixelRatio||context.msBackingStorePixelRatio||context.oBackingStorePixelRatio||1}(),SCALE=PIXEL_RATIO/BACKING_STORE_RATIO;else var createVML=function(tag,props,style){return"<qtipvml:"+tag+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(props||"")+' style="behavior: url(#default#VML); '+(style||"")+'" />'};$.extend(Tip.prototype,{init:function(qtip){var context,tip;tip=this.element=qtip.elements.tip=$("<div />",{"class":NAMESPACE+"-tip"}).prependTo(qtip.tooltip),HASCANVAS?(context=$("<canvas />").appendTo(this.element)[0].getContext("2d"),context.lineJoin="miter",context.miterLimit=1e5,context.save()):(context=createVML("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(context+context),qtip._bind($("*",tip).add(tip),["click","mousedown"],function(event){event.stopPropagation()},this._ns)),qtip._bind(qtip.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(corner){var titlebar=this.qtip.elements.titlebar;return titlebar&&(corner.y===TOP||corner.y===CENTER&&this.element.position().top+this.size[1]/2+this.options.offset<titlebar.outerHeight(TRUE))},_parseCorner:function(corner){var my=this.qtip.options.position.my;return corner===FALSE||my===FALSE?corner=FALSE:corner===TRUE?corner=new CORNER(my.string()):corner.string||(corner=new CORNER(corner),corner.fixed=TRUE),corner},_parseWidth:function(corner,side,use){var elements=this.qtip.elements,prop=BORDER+camel(side)+"Width";return(use?intCss(use,prop):intCss(elements.content,prop)||intCss(this._useTitle(corner)&&elements.titlebar||elements.content,prop)||intCss(elements.tooltip,prop))||0},_parseRadius:function(corner){var elements=this.qtip.elements,prop=BORDER+camel(corner.y)+camel(corner.x)+"Radius";return BROWSER.ie<9?0:intCss(this._useTitle(corner)&&elements.titlebar||elements.content,prop)||intCss(elements.tooltip,prop)||0},_invalidColour:function(elem,prop,compare){var val=elem.css(prop);return!val||compare&&val===elem.css(compare)||INVALID.test(val)?FALSE:val},_parseColours:function(corner){var elements=this.qtip.elements,tip=this.element.css("cssText",""),borderSide=BORDER+camel(corner[corner.precedance])+camel(COLOR),colorElem=this._useTitle(corner)&&elements.titlebar||elements.content,css=this._invalidColour,color=[];return color[0]=css(tip,BG_COLOR)||css(colorElem,BG_COLOR)||css(elements.content,BG_COLOR)||css(elements.tooltip,BG_COLOR)||tip.css(BG_COLOR),color[1]=css(tip,borderSide,COLOR)||css(colorElem,borderSide,COLOR)||css(elements.content,borderSide,COLOR)||css(elements.tooltip,borderSide,COLOR)||elements.tooltip.css(borderSide),$("*",tip).add(tip).css("cssText",BG_COLOR+":"+TRANSPARENT+IMPORTANT+";"+BORDER+":0"+IMPORTANT+";"),color},_calculateSize:function(corner){var bigHyp,ratio,result,y=corner.precedance===Y,width=this.options.width,height=this.options.height,isCenter="c"===corner.abbrev(),base=(y?width:height)*(isCenter?.5:1),pow=Math.pow,round=Math.round,smallHyp=Math.sqrt(pow(base,2)+pow(height,2)),hyp=[this.border/base*smallHyp,this.border/height*smallHyp];return hyp[2]=Math.sqrt(pow(hyp[0],2)-pow(this.border,2)),hyp[3]=Math.sqrt(pow(hyp[1],2)-pow(this.border,2)),bigHyp=smallHyp+hyp[2]+hyp[3]+(isCenter?0:hyp[0]),ratio=bigHyp/smallHyp,result=[round(ratio*width),round(ratio*height)],y?result:result.reverse()},_calculateTip:function(corner,size,scale){scale=scale||1,size=size||this.size;var width=size[0]*scale,height=size[1]*scale,width2=Math.ceil(width/2),height2=Math.ceil(height/2),tips={br:[0,0,width,height,width,0],bl:[0,0,width,0,0,height],tr:[0,height,width,0,width,height],tl:[0,0,0,height,width,height],tc:[0,height,width2,0,width,height],bc:[0,0,width,0,width2,height],rc:[0,0,width,height2,0,height],lc:[width,0,width,height,0,height2]};return tips.lt=tips.br,tips.rt=tips.bl,tips.lb=tips.tr,tips.rb=tips.tl,tips[corner.abbrev()]},_drawCoords:function(context,coords){context.beginPath(),context.moveTo(coords[0],coords[1]),context.lineTo(coords[2],coords[3]),context.lineTo(coords[4],coords[5]),context.closePath()},create:function(){var c=this.corner=(HASCANVAS||BROWSER.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=c.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(corner,position){if(!this.enabled)return this;var color,precedance,context,coords,bigCoords,translate,newSize,border,elements=this.qtip.elements,tip=this.element,inner=tip.children(),options=this.options,curSize=this.size,mimic=options.mimic,round=Math.round;corner||(corner=this.qtip.cache.corner||this.corner),mimic===FALSE?mimic=corner:(mimic=new CORNER(mimic),mimic.precedance=corner.precedance,"inherit"===mimic.x?mimic.x=corner.x:"inherit"===mimic.y?mimic.y=corner.y:mimic.x===mimic.y&&(mimic[corner.precedance]=corner[corner.precedance])),precedance=mimic.precedance,corner.precedance===X?this._swapDimensions():this._resetDimensions(),color=this.color=this._parseColours(corner),color[1]!==TRANSPARENT?(border=this.border=this._parseWidth(corner,corner[corner.precedance]),options.border&&1>border&&!INVALID.test(color[1])&&(color[0]=color[1]),this.border=border=options.border!==TRUE?options.border:border):this.border=border=0,newSize=this.size=this._calculateSize(corner),tip.css({width:newSize[0],height:newSize[1],lineHeight:newSize[1]+"px"}),translate=corner.precedance===Y?[round(mimic.x===LEFT?border:mimic.x===RIGHT?newSize[0]-curSize[0]-border:(newSize[0]-curSize[0])/2),round(mimic.y===TOP?newSize[1]-curSize[1]:0)]:[round(mimic.x===LEFT?newSize[0]-curSize[0]:0),round(mimic.y===TOP?border:mimic.y===BOTTOM?newSize[1]-curSize[1]-border:(newSize[1]-curSize[1])/2)],HASCANVAS?(context=inner[0].getContext("2d"),context.restore(),context.save(),context.clearRect(0,0,6e3,6e3),coords=this._calculateTip(mimic,curSize,SCALE),bigCoords=this._calculateTip(mimic,this.size,SCALE),inner.attr(WIDTH,newSize[0]*SCALE).attr(HEIGHT,newSize[1]*SCALE),inner.css(WIDTH,newSize[0]).css(HEIGHT,newSize[1]),this._drawCoords(context,bigCoords),context.fillStyle=color[1],context.fill(),context.translate(translate[0]*SCALE,translate[1]*SCALE),this._drawCoords(context,coords),context.fillStyle=color[0],context.fill()):(coords=this._calculateTip(mimic),coords="m"+coords[0]+","+coords[1]+" l"+coords[2]+","+coords[3]+" "+coords[4]+","+coords[5]+" xe",translate[2]=border&&/^(r|b)/i.test(corner.string())?8===BROWSER.ie?2:1:0,inner.css({coordsize:newSize[0]+border+" "+(newSize[1]+border),antialias:""+(mimic.string().indexOf(CENTER)>-1),left:translate[0]-translate[2]*Number(precedance===X),top:translate[1]-translate[2]*Number(precedance===Y),width:newSize[0]+border,height:newSize[1]+border}).each(function(i){var $this=$(this);$this[$this.prop?"prop":"attr"]({coordsize:newSize[0]+border+" "+(newSize[1]+border),path:coords,fillcolor:color[0],filled:!!i,stroked:!i}).toggle(!(!border&&!i)),!i&&$this.html(createVML("stroke",'weight="'+2*border+'px" color="'+color[1]+'" miterlimit="1000" joinstyle="miter"'))})),window.opera&&setTimeout(function(){elements.tip.css({display:"inline-block",visibility:"visible"})},1),position!==FALSE&&this.calculate(corner,newSize)},calculate:function(corner,size){if(!this.enabled)return FALSE;var precedance,corners,self=this,elements=this.qtip.elements,tip=this.element,userOffset=this.options.offset,position=(elements.tooltip.hasClass("ui-widget"),{});return corner=corner||this.corner,precedance=corner.precedance,size=size||this._calculateSize(corner),corners=[corner.x,corner.y],precedance===X&&corners.reverse(),$.each(corners,function(i,side){var b,bc,br;side===CENTER?(b=precedance===Y?LEFT:TOP,position[b]="50%",position[MARGIN+"-"+b]=-Math.round(size[precedance===Y?0:1]/2)+userOffset):(b=self._parseWidth(corner,side,elements.tooltip),bc=self._parseWidth(corner,side,elements.content),br=self._parseRadius(corner),position[side]=Math.max(-self.border,i?bc:userOffset+(br>b?br:-b)))}),position[corner[precedance]]-=size[precedance===X?0:1],tip.css({margin:"",top:"",bottom:"",left:"",right:""}).css(position),position},reposition:function(event,api,pos){function shiftflip(direction,precedance,popposite,side,opposite){direction===SHIFT&&newCorner.precedance===precedance&&adjust[side]&&newCorner[popposite]!==CENTER?newCorner.precedance=newCorner.precedance===X?Y:X:direction!==SHIFT&&adjust[side]&&(newCorner[precedance]=newCorner[precedance]===CENTER?adjust[side]>0?side:opposite:newCorner[precedance]===side?opposite:side)}function shiftonly(xy,side,opposite){newCorner[xy]===CENTER?css[MARGIN+"-"+side]=shift[xy]=offset[MARGIN+"-"+side]-adjust[side]:(props=offset[opposite]!==undefined?[adjust[side],-offset[side]]:[-adjust[side],offset[side]],(shift[xy]=Math.max(props[0],props[1]))>props[0]&&(pos[side]-=adjust[side],shift[side]=FALSE),css[offset[opposite]!==undefined?opposite:side]=shift[xy])}if(this.enabled){var offset,props,cache=api.cache,newCorner=this.corner.clone(),adjust=pos.adjusted,method=api.options.position.adjust.method.split(" "),horizontal=method[0],vertical=method[1]||method[0],shift={left:FALSE,top:FALSE,x:0,y:0},css={};this.corner.fixed!==TRUE&&(shiftflip(horizontal,X,Y,LEFT,RIGHT),shiftflip(vertical,Y,X,TOP,BOTTOM),newCorner.string()===cache.corner.string()||cache.cornerTop===adjust.top&&cache.cornerLeft===adjust.left||this.update(newCorner,FALSE)),offset=this.calculate(newCorner),offset.right!==undefined&&(offset.left=-offset.right),offset.bottom!==undefined&&(offset.top=-offset.bottom),offset.user=this.offset,(shift.left=horizontal===SHIFT&&!!adjust.left)&&shiftonly(X,LEFT,RIGHT),(shift.top=vertical===SHIFT&&!!adjust.top)&&shiftonly(Y,TOP,BOTTOM),this.element.css(css).toggle(!(shift.x&&shift.y||newCorner.x===CENTER&&shift.y||newCorner.y===CENTER&&shift.x)),pos.left-=offset.left.charAt?offset.user:horizontal!==SHIFT||shift.top||!shift.left&&!shift.top?offset.left+this.border:0,pos.top-=offset.top.charAt?offset.user:vertical!==SHIFT||shift.left||!shift.left&&!shift.top?offset.top+this.border:0,cache.cornerLeft=adjust.left,cache.cornerTop=adjust.top,cache.corner=newCorner.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),TIP=PLUGINS.tip=function(api){return new Tip(api,api.options.style.tip)},TIP.initialize="render",TIP.sanitize=function(options){if(options.style&&"tip"in options.style){var opts=options.style.tip;"object"!=typeof opts&&(opts=options.style.tip={corner:opts}),/string|boolean/i.test(typeof opts.corner)||(opts.corner=TRUE)}},CHECKS.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(obj){this.size=[obj.width,obj.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},$.extend(TRUE,QTIP.defaults,{style:{tip:{corner:TRUE,mimic:FALSE,width:6,height:6,border:TRUE,offset:0}}});var MODAL,OVERLAY,MODALCLASS="qtip-modal",MODALSELECTOR="."+MODALCLASS;OVERLAY=function(){function focusable(element){if($.expr[":"].focusable)return $.expr[":"].focusable;var map,mapName,img,isTabIndexNotNaN=!isNaN($.attr(element,"tabindex")),nodeName=element.nodeName&&element.nodeName.toLowerCase();return"area"===nodeName?(map=element.parentNode,mapName=map.name,element.href&&mapName&&"map"===map.nodeName.toLowerCase()?(img=$("img[usemap=#"+mapName+"]")[0],!!img&&img.is(":visible")):!1):/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"===nodeName?element.href||isTabIndexNotNaN:isTabIndexNotNaN}function focusInputs(blurElems){focusableElems.length<1&&blurElems.length?blurElems.not("body").blur():focusableElems.first().focus()}function stealFocus(event){if(elem.is(":visible")){var targetOnTop,target=$(event.target),tooltip=current.tooltip,container=target.closest(SELECTOR);targetOnTop=container.length<1?FALSE:parseInt(container[0].style.zIndex,10)>parseInt(tooltip[0].style.zIndex,10),targetOnTop||target.closest(SELECTOR)[0]===tooltip[0]||focusInputs(target),onLast=event.target===focusableElems[focusableElems.length-1]}}var current,onLast,prevState,elem,self=this,focusableElems={};$.extend(self,{init:function(){return elem=self.elem=$("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return FALSE}}).hide(),$(document.body).bind("focusin"+MODALSELECTOR,stealFocus),$(document).bind("keydown"+MODALSELECTOR,function(event){current&&current.options.show.modal.escape&&27===event.keyCode&&current.hide(event)}),elem.bind("click"+MODALSELECTOR,function(event){current&&current.options.show.modal.blur&&current.hide(event)}),self},update:function(api){current=api,focusableElems=api.options.show.modal.stealfocus!==FALSE?api.tooltip.find("*").filter(function(){return focusable(this)}):[]},toggle:function(api,state,duration){var tooltip=($(document.body),api.tooltip),options=api.options.show.modal,effect=options.effect,type=state?"show":"hide",visible=elem.is(":visible"),visibleModals=$(MODALSELECTOR).filter(":visible:not(:animated)").not(tooltip);return self.update(api),state&&options.stealfocus!==FALSE&&focusInputs($(":focus")),elem.toggleClass("blurs",options.blur),state&&elem.appendTo(document.body),elem.is(":animated")&&visible===state&&prevState!==FALSE||!state&&visibleModals.length?self:(elem.stop(TRUE,FALSE),$.isFunction(effect)?effect.call(elem,state):effect===FALSE?elem[type]():elem.fadeTo(parseInt(duration,10)||90,state?1:0,function(){state||elem.hide()}),state||elem.queue(function(next){elem.css({left:"",top:""}),$(MODALSELECTOR).length||elem.detach(),next()}),prevState=state,current.destroyed&&(current=NULL),self)}}),self.init()},OVERLAY=new OVERLAY,$.extend(Modal.prototype,{init:function(qtip){var tooltip=qtip.tooltip;return this.options.on?(qtip.elements.overlay=OVERLAY.elem,tooltip.addClass(MODALCLASS).css("z-index",QTIP.modal_zindex+$(MODALSELECTOR).length),qtip._bind(tooltip,["tooltipshow","tooltiphide"],function(event,api,duration){var oEvent=event.originalEvent;if(event.target===tooltip[0])if(oEvent&&"tooltiphide"===event.type&&/mouse(leave|enter)/.test(oEvent.type)&&$(oEvent.relatedTarget).closest(OVERLAY.elem[0]).length)try{event.preventDefault()}catch(e){}else(!oEvent||oEvent&&"tooltipsolo"!==oEvent.type)&&this.toggle(event,"tooltipshow"===event.type,duration)},this._ns,this),qtip._bind(tooltip,"tooltipfocus",function(event,api){if(!event.isDefaultPrevented()&&event.target===tooltip[0]){var qtips=$(MODALSELECTOR),newIndex=QTIP.modal_zindex+qtips.length,curIndex=parseInt(tooltip[0].style.zIndex,10);OVERLAY.elem[0].style.zIndex=newIndex-1,qtips.each(function(){this.style.zIndex>curIndex&&(this.style.zIndex-=1)}),qtips.filter("."+CLASS_FOCUS).qtip("blur",event.originalEvent),tooltip.addClass(CLASS_FOCUS)[0].style.zIndex=newIndex,OVERLAY.update(api);try{event.preventDefault()}catch(e){}}},this._ns,this),void qtip._bind(tooltip,"tooltiphide",function(event){event.target===tooltip[0]&&$(MODALSELECTOR).filter(":visible").not(tooltip).last().qtip("focus",event)},this._ns,this)):this},toggle:function(event,state,duration){return event&&event.isDefaultPrevented()?this:void OVERLAY.toggle(this.qtip,!!state,duration)},destroy:function(){this.qtip.tooltip.removeClass(MODALCLASS),this.qtip._unbind(this.qtip.tooltip,this._ns),OVERLAY.toggle(this.qtip,FALSE),delete this.qtip.elements.overlay}}),MODAL=PLUGINS.modal=function(api){return new Modal(api,api.options.show.modal)},MODAL.sanitize=function(opts){opts.show&&("object"!=typeof opts.show.modal?opts.show.modal={on:!!opts.show.modal}:"undefined"==typeof opts.show.modal.on&&(opts.show.modal.on=TRUE))},QTIP.modal_zindex=QTIP.zindex-200,MODAL.initialize="render",CHECKS.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},$.extend(TRUE,QTIP.defaults,{show:{modal:{on:FALSE,effect:TRUE,blur:TRUE,stealfocus:TRUE,escape:TRUE}}}),PLUGINS.viewport=function(api,position,posOptions,targetWidth,targetHeight,elemWidth,elemHeight){function calculate(side,otherSide,type,adjust,side1,side2,lengthName,targetLength,elemLength){var initialPos=position[side1],mySide=my[side],atSide=at[side],isShift=type===SHIFT,myLength=mySide===side1?elemLength:mySide===side2?-elemLength:-elemLength/2,atLength=atSide===side1?targetLength:atSide===side2?-targetLength:-targetLength/2,sideOffset=viewportScroll[side1]+viewportOffset[side1]-(containerStatic?0:containerOffset[side1]),overflow1=sideOffset-initialPos,overflow2=initialPos+elemLength-(lengthName===WIDTH?viewportWidth:viewportHeight)-sideOffset,offset=myLength-(my.precedance===side||mySide===my[otherSide]?atLength:0)-(atSide===CENTER?targetLength/2:0);return isShift?(offset=(mySide===side1?1:-1)*myLength,position[side1]+=overflow1>0?overflow1:overflow2>0?-overflow2:0,position[side1]=Math.max(-containerOffset[side1]+viewportOffset[side1],initialPos-offset,Math.min(Math.max(-containerOffset[side1]+viewportOffset[side1]+(lengthName===WIDTH?viewportWidth:viewportHeight),initialPos+offset),position[side1],"center"===mySide?initialPos-myLength:1e9))):(adjust*=type===FLIPINVERT?2:0,overflow1>0&&(mySide!==side1||overflow2>0)?(position[side1]-=offset+adjust,newMy.invert(side,side1)):overflow2>0&&(mySide!==side2||overflow1>0)&&(position[side1]-=(mySide===CENTER?-offset:offset)+adjust,newMy.invert(side,side2)),position[side1]<viewportScroll&&-position[side1]>overflow2&&(position[side1]=initialPos,newMy=my.clone())),position[side1]-initialPos}var fixed,newMy,newClass,containerOffset,containerStatic,viewportWidth,viewportHeight,viewportScroll,viewportOffset,target=posOptions.target,tooltip=api.elements.tooltip,my=posOptions.my,at=posOptions.at,adjust=posOptions.adjust,method=adjust.method.split(" "),methodX=method[0],methodY=method[1]||method[0],viewport=posOptions.viewport,container=posOptions.container,cache=api.cache,adjusted={left:0,top:0};return viewport.jquery&&target[0]!==window&&target[0]!==document.body&&"none"!==adjust.method?(containerOffset=container.offset()||adjusted,containerStatic="static"===container.css("position"),fixed="fixed"===tooltip.css("position"),viewportWidth=viewport[0]===window?viewport.width():viewport.outerWidth(FALSE),viewportHeight=viewport[0]===window?viewport.height():viewport.outerHeight(FALSE),viewportScroll={left:fixed?0:viewport.scrollLeft(),top:fixed?0:viewport.scrollTop()},viewportOffset=viewport.offset()||adjusted,("shift"!==methodX||"shift"!==methodY)&&(newMy=my.clone()),adjusted={left:"none"!==methodX?calculate(X,Y,methodX,adjust.x,LEFT,RIGHT,WIDTH,targetWidth,elemWidth):0,top:"none"!==methodY?calculate(Y,X,methodY,adjust.y,TOP,BOTTOM,HEIGHT,targetHeight,elemHeight):0},newMy&&cache.lastClass!==(newClass=NAMESPACE+"-pos-"+newMy.abbrev())&&tooltip.removeClass(api.cache.lastClass).addClass(api.cache.lastClass=newClass),adjusted):adjusted},PLUGINS.polys={polygon:function(baseCoords,corner){var next,newWidth,newHeight,result={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:FALSE},i=0,coords=[],compareX=1,compareY=1,realX=0,realY=0;for(i=baseCoords.length;i--;)next=[parseInt(baseCoords[--i],10),parseInt(baseCoords[i+1],10)],next[0]>result.position.right&&(result.position.right=next[0]),next[0]<result.position.left&&(result.position.left=next[0]),next[1]>result.position.bottom&&(result.position.bottom=next[1]),next[1]<result.position.top&&(result.position.top=next[1]),coords.push(next);if(newWidth=result.width=Math.abs(result.position.right-result.position.left),newHeight=result.height=Math.abs(result.position.bottom-result.position.top),"c"===corner.abbrev())result.position={left:result.position.left+result.width/2,top:result.position.top+result.height/2};else{for(;newWidth>0&&newHeight>0&&compareX>0&&compareY>0;)for(newWidth=Math.floor(newWidth/2),newHeight=Math.floor(newHeight/2),corner.x===LEFT?compareX=newWidth:corner.x===RIGHT?compareX=result.width-newWidth:compareX+=Math.floor(newWidth/2),corner.y===TOP?compareY=newHeight:corner.y===BOTTOM?compareY=result.height-newHeight:compareY+=Math.floor(newHeight/2),i=coords.length;i--&&!(coords.length<2);)realX=coords[i][0]-result.position.left,realY=coords[i][1]-result.position.top,(corner.x===LEFT&&realX>=compareX||corner.x===RIGHT&&compareX>=realX||corner.x===CENTER&&(compareX>realX||realX>result.width-compareX)||corner.y===TOP&&realY>=compareY||corner.y===BOTTOM&&compareY>=realY||corner.y===CENTER&&(compareY>realY||realY>result.height-compareY))&&coords.splice(i,1);result.position={left:coords[0][0],top:coords[0][1]}}return result},rect:function(ax,ay,bx,by){return{width:Math.abs(bx-ax),height:Math.abs(by-ay),position:{left:Math.min(ax,bx),top:Math.min(ay,by)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(cx,cy,rx,ry,corner){var c=PLUGINS.polys._angles[corner.abbrev()],rxc=0===c?0:rx*Math.cos(c*Math.PI),rys=ry*Math.sin(c*Math.PI);return{width:2*rx-Math.abs(rxc),height:2*ry-Math.abs(rys),position:{left:cx+rxc,top:cy+rys},adjustable:FALSE}},circle:function(cx,cy,r,corner){return PLUGINS.polys.ellipse(cx,cy,r,r,corner)}},PLUGINS.svg=function(api,svg,corner){for(var rootWidth,rootHeight,mtx,transformed,viewBox,len,next,i,points,result,position,doc=$(document),elem=svg[0],root=$(elem.ownerSVGElement),xScale=1,yScale=1,complex=!0;!elem.getBBox;)elem=elem.parentNode;if(!elem.getBBox||!elem.parentNode)return FALSE;rootWidth=root.attr("width")||root.width()||parseInt(root.css("width"),10),rootHeight=root.attr("height")||root.height()||parseInt(root.css("height"),10);var strokeWidth2=(parseInt(svg.css("stroke-width"),10)||0)/2;switch(strokeWidth2&&(xScale+=strokeWidth2/rootWidth,yScale+=strokeWidth2/rootHeight),elem.nodeName){case"ellipse":case"circle":result=PLUGINS.polys.ellipse(elem.cx.baseVal.value,elem.cy.baseVal.value,(elem.rx||elem.r).baseVal.value+strokeWidth2,(elem.ry||elem.r).baseVal.value+strokeWidth2,corner);break;case"line":case"polygon":case"polyline":for(points=elem.points||[{x:elem.x1.baseVal.value,y:elem.y1.baseVal.value},{x:elem.x2.baseVal.value,y:elem.y2.baseVal.value}],result=[],i=-1,len=points.numberOfItems||points.length;++i<len;)next=points.getItem?points.getItem(i):points[i],result.push.apply(result,[next.x,next.y]);result=PLUGINS.polys.polygon(result,corner);break;default:result=elem.getBoundingClientRect(),result={width:result.width,height:result.height,position:{left:result.left,top:result.top}},complex=!1}return position=result.position,root=root[0],complex&&(root.createSVGPoint&&(mtx=elem.getScreenCTM(),points=root.createSVGPoint(),points.x=position.left,points.y=position.top,transformed=points.matrixTransform(mtx),position.left=transformed.x,position.top=transformed.y),root.viewBox&&(viewBox=root.viewBox.baseVal)&&viewBox.width&&viewBox.height&&(xScale*=rootWidth/viewBox.width,yScale*=rootHeight/viewBox.height)),position.left+=doc.scrollLeft(),position.top+=doc.scrollTop(),result},PLUGINS.imagemap=function(api,area,corner){area.jquery||(area=$(area));var imageOffset,coords,i,result,len,shape=area.attr("shape").toLowerCase().replace("poly","polygon"),image=$('img[usemap="#'+area.parent("map").attr("name")+'"]'),coordsString=$.trim(area.attr("coords")),coordsArray=coordsString.replace(/,$/,"").split(",");if(!image.length)return FALSE;if("polygon"===shape)result=PLUGINS.polys.polygon(coordsArray,corner);else{if(!PLUGINS.polys[shape])return FALSE;for(i=-1,len=coordsArray.length,coords=[];++i<len;)coords.push(parseInt(coordsArray[i],10));result=PLUGINS.polys[shape].apply(this,coords.concat(corner))}return imageOffset=image.offset(),imageOffset.left+=Math.ceil((image.outerWidth(FALSE)-image.width())/2),imageOffset.top+=Math.ceil((image.outerHeight(FALSE)-image.height())/2),result.position.left+=imageOffset.left,result.position.top+=imageOffset.top,result};var IE6,BGIFRAME='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>';$.extend(Ie6.prototype,{_scroll:function(){var overlay=this.qtip.elements.overlay;overlay&&(overlay[0].style.top=$(window).scrollTop()+"px")},init:function(qtip){var tooltip=qtip.tooltip;$("select, object").length<1&&(this.bgiframe=qtip.elements.bgiframe=$(BGIFRAME).appendTo(tooltip),qtip._bind(tooltip,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=$("<div/>",{id:NAMESPACE+"-rcontainer"}).appendTo(document.body),qtip.elements.overlay&&qtip.elements.overlay.addClass("qtipmodal-ie6fix")&&(qtip._bind(window,["scroll","resize"],this._scroll,this._ns,this),qtip._bind(tooltip,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var tipAdjust,offset,tooltip=this.qtip.tooltip,dimensions={height:tooltip.outerHeight(FALSE),width:tooltip.outerWidth(FALSE)},plugin=this.qtip.plugins.tip,tip=this.qtip.elements.tip;offset=parseInt(tooltip.css("borderLeftWidth"),10)||0,offset={left:-offset,top:-offset},plugin&&tip&&(tipAdjust="x"===plugin.corner.precedance?[WIDTH,LEFT]:[HEIGHT,TOP],offset[tipAdjust[1]]-=tip[tipAdjust[0]]()),this.bgiframe.css(offset).css(dimensions)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var perc,width,max,min,tooltip=this.qtip.tooltip,style=this.qtip.options.style,container=this.qtip.options.position.container;return this.qtip.drawing=1,style.height&&tooltip.css(HEIGHT,style.height),style.width?tooltip.css(WIDTH,style.width):(tooltip.css(WIDTH,"").appendTo(this.redrawContainer),width=tooltip.width(),1>width%2&&(width+=1),max=tooltip.css("maxWidth")||"",min=tooltip.css("minWidth")||"",perc=(max+min).indexOf("%")>-1?container.width()/100:0,max=(max.indexOf("%")>-1?perc:1)*parseInt(max,10)||width,min=(min.indexOf("%")>-1?perc:1)*parseInt(min,10)||0,width=max+min?Math.min(Math.max(width,min),max):width,tooltip.css(WIDTH,Math.round(width)).appendTo(container)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([window,this.qtip.tooltip],this._ns)}}),IE6=PLUGINS.ie6=function(api){return 6===BROWSER.ie?new Ie6(api):FALSE},IE6.initialize="render",CHECKS.ie6={"^content|style$":function(){this.redraw()}}})}(window,document),window.ParsleyConfig=window.ParsleyConfig||{},function($){window.ParsleyConfig=$.extend(!0,{},window.ParsleyConfig,{validators:{equal:{fn:function(value,elem){return value==elem}}},i18n:{en:{equal:"Use the Bitcoin address the shop provided"},es:{equal:"Usa la direcci\xf3n de Bitcoin que la tienda proporciona"}}})}(window.jQuery),!function($){var ParsleyUtils={attr:function($element,namespace,checkAttr){var attribute,obj={},regex=new RegExp("^"+namespace,"i");if("undefined"==typeof $element||"undefined"==typeof $element[0])return{};for(var i in $element[0].attributes)if(attribute=$element[0].attributes[i],"undefined"!=typeof attribute&&null!==attribute&&attribute.specified&&regex.test(attribute.name)){if("undefined"!=typeof checkAttr&&new RegExp(checkAttr+"$","i").test(attribute.name))return!0;obj[this.camelize(attribute.name.replace(namespace,""))]=this.deserializeValue(attribute.value)}return"undefined"==typeof checkAttr?obj:!1},setAttr:function($element,namespace,attr,value){$element[0].setAttribute(this.dasherize(namespace+attr),String(value))},get:function(obj,path){for(var i=0,paths=(path||"").split(".");this.isObject(obj)||this.isArray(obj);)if(obj=obj[paths[i++]],i===paths.length)return obj;return void 0},hash:function(length){return String(Math.random()).substring(2,length?length+2:9)},isArray:function(mixed){return"[object Array]"===Object.prototype.toString.call(mixed)},isObject:function(mixed){return mixed===Object(mixed)},deserializeValue:function(value){var num;try{return value?"true"==value||("false"==value?!1:"null"==value?null:isNaN(num=Number(value))?/^[\[\{]/.test(value)?$.parseJSON(value):value:num):value}catch(e){return value}},camelize:function(str){return str.replace(/-+(.)?/g,function(match,chr){return chr?chr.toUpperCase():""})},dasherize:function(str){return str.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}},ParsleyDefaults={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset]",priorityEnabled:!0,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(){},errorsContainer:function(){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},ParsleyAbstract=function(){};ParsleyAbstract.prototype={asyncSupport:!1,actualizeOptions:function(){return this.options=this.parsleyInstance.OptionsFactory.get(this),this
  },validateThroughValidator:function(value,constraints,priority){return window.ParsleyValidator.validate.apply(window.ParsleyValidator,[value,constraints,priority])},subscribe:function(name,fn){return $.listenTo(this,name.toLowerCase(),fn),this},unsubscribe:function(name){return $.unsubscribeTo(this,name.toLowerCase()),this},reset:function(){if("ParsleyForm"!==this.__class__)return $.emit("parsley:field:reset",this);for(var i=0;i<this.fields.length;i++)$.emit("parsley:field:reset",this.fields[i]);$.emit("parsley:form:reset",this)},destroy:function(){if("ParsleyForm"!==this.__class__)return $.emit("parsley:field:destroy",this),void this.$element.removeData("Parsley");for(var i=0;i<this.fields.length;i++)this.fields[i].destroy();$.emit("parsley:form:destroy",this),this.$element.removeData("Parsley")}},function(exports){var Validator=function(options){return this.__class__="Validator",this.__version__="0.5.5",this.options=options||{},this.bindingKey=this.options.bindingKey||"_validatorjsConstraint",this};Validator.prototype={constructor:Validator,validate:function(objectOrString,AssertsOrConstraintOrGroup,group){if("string"!=typeof objectOrString&&"object"!=typeof objectOrString)throw new Error("You must validate an object or a string");return"string"==typeof objectOrString||_isArray(objectOrString)?this._validateString(objectOrString,AssertsOrConstraintOrGroup,group):this.isBinded(objectOrString)?this._validateBindedObject(objectOrString,AssertsOrConstraintOrGroup):this._validateObject(objectOrString,AssertsOrConstraintOrGroup,group)},bind:function(object,constraint){if("object"!=typeof object)throw new Error("Must bind a Constraint to an object");return object[this.bindingKey]=new Constraint(constraint),this},unbind:function(object){return"undefined"==typeof object._validatorjsConstraint?this:(delete object[this.bindingKey],this)},isBinded:function(object){return"undefined"!=typeof object[this.bindingKey]},getBinded:function(object){return this.isBinded(object)?object[this.bindingKey]:null},_validateString:function(string,assert,group){var result,failures=[];_isArray(assert)||(assert=[assert]);for(var i=0;i<assert.length;i++){if(!(assert[i]instanceof Assert))throw new Error("You must give an Assert or an Asserts array to validate a string");result=assert[i].check(string,group),result instanceof Violation&&failures.push(result)}return failures.length?failures:!0},_validateObject:function(object,constraint,group){if("object"!=typeof constraint)throw new Error("You must give a constraint to validate an object");return constraint instanceof Constraint?constraint.check(object,group):new Constraint(constraint).check(object,group)},_validateBindedObject:function(object,group){return object[this.bindingKey].check(object,group)}},Validator.errorCode={must_be_a_string:"must_be_a_string",must_be_an_array:"must_be_an_array",must_be_a_number:"must_be_a_number",must_be_a_string_or_array:"must_be_a_string_or_array"};var Constraint=function(data,options){if(this.__class__="Constraint",this.options=options||{},this.nodes={},data)try{this._bootstrap(data)}catch(err){throw new Error("Should give a valid mapping object to Constraint",err,data)}return this};Constraint.prototype={constructor:Constraint,check:function(object,group){var result,failures={};for(var property in this.options.strict?this.nodes:object)if(this.options.strict?this.has(property,object):this.has(property))result=this._check(property,object[property],group),(_isArray(result)&&result.length>0||!_isArray(result)&&!_isEmptyObject(result))&&(failures[property]=result);else if(this.options.strict)try{(new Assert).HaveProperty(property).validate(object)}catch(violation){failures[property]=violation}return _isEmptyObject(failures)?!0:failures},add:function(node,object){if(object instanceof Assert||_isArray(object)&&object[0]instanceof Assert)return this.nodes[node]=object,this;if("object"==typeof object&&!_isArray(object))return this.nodes[node]=object instanceof Constraint?object:new Constraint(object),this;throw new Error("Should give an Assert, an Asserts array, a Constraint",object)},has:function(node,nodes){var nodes="undefined"!=typeof nodes?nodes:this.nodes;return"undefined"!=typeof nodes[node]},get:function(node,placeholder){return this.has(node)?this.nodes[node]:placeholder||null},remove:function(node){var _nodes=[];for(var i in this.nodes)i!==node&&(_nodes[i]=this.nodes[i]);return this.nodes=_nodes,this},_bootstrap:function(data){if(data instanceof Constraint)return this.nodes=data.nodes;for(var node in data)this.add(node,data[node])},_check:function(node,value,group){if(this.nodes[node]instanceof Assert)return this._checkAsserts(value,[this.nodes[node]],group);if(_isArray(this.nodes[node]))return this._checkAsserts(value,this.nodes[node],group);if(this.nodes[node]instanceof Constraint)return this.nodes[node].check(value,group);throw new Error("Invalid node",this.nodes[node])},_checkAsserts:function(value,asserts,group){for(var result,failures=[],i=0;i<asserts.length;i++)result=asserts[i].check(value,group),"undefined"!=typeof result&&!0!==result&&failures.push(result);return failures}};var Violation=function(assert,value,violation){if(this.__class__="Violation",!(assert instanceof Assert))throw new Error("Should give an assertion implementing the Assert interface");this.assert=assert,this.value=value,"undefined"!=typeof violation&&(this.violation=violation)};Violation.prototype={show:function(){var show={assert:this.assert.__class__,value:this.value};return this.violation&&(show.violation=this.violation),show},__toString:function(){if("undefined"!=typeof this.violation)var violation='", '+this.getViolation().constraint+" expected was "+this.getViolation().expected;return this.assert.__class__+' assert failed for "'+this.value+violation||""},getViolation:function(){var constraint,expected;for(constraint in this.violation)expected=this.violation[constraint];return{constraint:constraint,expected:expected}}};var Assert=function(group){return this.__class__="Assert",this.__parentClass__=this.__class__,this.groups=[],"undefined"!=typeof group&&this.addGroup(group),this};Assert.prototype={construct:Assert,check:function(value,group){if(!(group&&!this.hasGroup(group)||!group&&this.hasGroups()))try{return this.validate(value,group)}catch(violation){return violation}},hasGroup:function(group){return _isArray(group)?this.hasOneOf(group):"Any"===group?!0:this.hasGroups()?-1!==this.groups.indexOf(group):"Default"===group},hasOneOf:function(groups){for(var i=0;i<groups.length;i++)if(this.hasGroup(groups[i]))return!0;return!1},hasGroups:function(){return this.groups.length>0},addGroup:function(group){return _isArray(group)?this.addGroups(group):(this.hasGroup(group)||this.groups.push(group),this)},removeGroup:function(group){for(var _groups=[],i=0;i<this.groups.length;i++)group!==this.groups[i]&&_groups.push(this.groups[i]);return this.groups=_groups,this},addGroups:function(groups){for(var i=0;i<groups.length;i++)this.addGroup(groups[i]);return this},HaveProperty:function(node){return this.__class__="HaveProperty",this.node=node,this.validate=function(object){if("undefined"==typeof object[this.node])throw new Violation(this,object,{value:this.node});return!0},this},Blank:function(){return this.__class__="Blank",this.validate=function(value){if("string"!=typeof value)throw new Violation(this,value,{value:Validator.errorCode.must_be_a_string});if(""!==value.replace(/^\s+/g,"").replace(/\s+$/g,""))throw new Violation(this,value);return!0},this},Callback:function(fn){if(this.__class__="Callback",this.arguments=Array.prototype.slice.call(arguments),1===this.arguments.length?this.arguments=[]:this.arguments.splice(0,1),"function"!=typeof fn)throw new Error("Callback must be instanciated with a function");return this.fn=fn,this.validate=function(value){var arguments=[value].concat(this.arguments),result=this.fn.apply(this,arguments);if(!0!==result)throw new Violation(this,value,{result:result});return!0},this},Choice:function(list){if(this.__class__="Choice",!_isArray(list)&&"function"!=typeof list)throw new Error("Choice must be instanciated with an array or a function");return this.list=list,this.validate=function(value){for(var list="function"==typeof this.list?this.list():this.list,i=0;i<list.length;i++)if(value===list[i])return!0;throw new Violation(this,value,{choices:list})},this},Collection:function(constraint){return this.__class__="Collection",this.constraint="undefined"!=typeof constraint?new Constraint(constraint):!1,this.validate=function(collection,group){var result,validator=new Validator,count=0,failures={},groups=this.groups.length?this.groups:group;if(!_isArray(collection))throw new Violation(this,array,{value:Validator.errorCode.must_be_an_array});for(var i=0;i<collection.length;i++)result=this.constraint?validator.validate(collection[i],this.constraint,groups):validator.validate(collection[i],groups),_isEmptyObject(result)||(failures[count]=result),count++;return _isEmptyObject(failures)?!0:failures},this},Count:function(count){return this.__class__="Count",this.count=count,this.validate=function(array){if(!_isArray(array))throw new Violation(this,array,{value:Validator.errorCode.must_be_an_array});var count="function"==typeof this.count?this.count(array):this.count;if(isNaN(Number(count)))throw new Error("Count must be a valid interger",count);if(count!==array.length)throw new Violation(this,array,{count:count});return!0},this},Email:function(){return this.__class__="Email",this.validate=function(value){var regExp=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;if("string"!=typeof value)throw new Violation(this,value,{value:Validator.errorCode.must_be_a_string});if(!regExp.test(value))throw new Violation(this,value);return!0},this},Eql:function(eql){if(this.__class__="Eql","undefined"==typeof eql)throw new Error("Equal must be instanciated with an Array or an Object");return this.eql=eql,this.validate=function(value){var eql="function"==typeof this.eql?this.eql(value):this.eql;if(!expect.eql(eql,value))throw new Violation(this,value,{eql:eql});return!0},this},EqualTo:function(reference){if(this.__class__="EqualTo","undefined"==typeof reference)throw new Error("EqualTo must be instanciated with a value or a function");return this.reference=reference,this.validate=function(value){var reference="function"==typeof this.reference?this.reference(value):this.reference;if(reference!==value)throw new Violation(this,value,{value:reference});return!0},this},GreaterThan:function(threshold){if(this.__class__="GreaterThan","undefined"==typeof threshold)throw new Error("Should give a threshold value");return this.threshold=threshold,this.validate=function(value){if(""===value||isNaN(Number(value)))throw new Violation(this,value,{value:Validator.errorCode.must_be_a_number});if(this.threshold>=value)throw new Violation(this,value,{threshold:this.threshold});return!0},this},GreaterThanOrEqual:function(threshold){if(this.__class__="GreaterThanOrEqual","undefined"==typeof threshold)throw new Error("Should give a threshold value");return this.threshold=threshold,this.validate=function(value){if(""===value||isNaN(Number(value)))throw new Violation(this,value,{value:Validator.errorCode.must_be_a_number});if(this.threshold>value)throw new Violation(this,value,{threshold:this.threshold});return!0},this},InstanceOf:function(classRef){if(this.__class__="InstanceOf","undefined"==typeof classRef)throw new Error("InstanceOf must be instanciated with a value");return this.classRef=classRef,this.validate=function(value){if(!0!=value instanceof this.classRef)throw new Violation(this,value,{classRef:this.classRef});return!0},this},IPv4:function(){return this.__class__="IPv4",this.validate=function(value){var regExp=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;if("string"!=typeof value)throw new Violation(this,value,{value:Validator.errorCode.must_be_a_string});if(!regExp.test(value))throw new Violation(this,value);return!0},this},Length:function(boundaries){if(this.__class__="Length",!boundaries.min&&!boundaries.max)throw new Error("Lenth assert must be instanciated with a { min: x, max: y } object");return this.min=boundaries.min,this.max=boundaries.max,this.validate=function(value){if("string"!=typeof value&&!_isArray(value))throw new Violation(this,value,{value:Validator.errorCode.must_be_a_string_or_array});if("undefined"!=typeof this.min&&this.min===this.max&&value.length!==this.min)throw new Violation(this,value,{min:this.min,max:this.max});if("undefined"!=typeof this.max&&value.length>this.max)throw new Violation(this,value,{max:this.max});if("undefined"!=typeof this.min&&value.length<this.min)throw new Violation(this,value,{min:this.min});return!0},this},LessThan:function(threshold){if(this.__class__="LessThan","undefined"==typeof threshold)throw new Error("Should give a threshold value");return this.threshold=threshold,this.validate=function(value){if(""===value||isNaN(Number(value)))throw new Violation(this,value,{value:Validator.errorCode.must_be_a_number});if(this.threshold<=value)throw new Violation(this,value,{threshold:this.threshold});return!0},this},LessThanOrEqual:function(threshold){if(this.__class__="LessThanOrEqual","undefined"==typeof threshold)throw new Error("Should give a threshold value");return this.threshold=threshold,this.validate=function(value){if(""===value||isNaN(Number(value)))throw new Violation(this,value,{value:Validator.errorCode.must_be_a_number});if(this.threshold<value)throw new Violation(this,value,{threshold:this.threshold});return!0},this},Mac:function(){return this.__class__="Mac",this.validate=function(value){var regExp=/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i;if("string"!=typeof value)throw new Violation(this,value,{value:Validator.errorCode.must_be_a_string});if(!regExp.test(value))throw new Violation(this,value);return!0},this},NotNull:function(){return this.__class__="NotNull",this.validate=function(value){if(null===value||"undefined"==typeof value)throw new Violation(this,value);return!0},this},NotBlank:function(){return this.__class__="NotBlank",this.validate=function(value){if("string"!=typeof value)throw new Violation(this,value,{value:Validator.errorCode.must_be_a_string});if(""===value.replace(/^\s+/g,"").replace(/\s+$/g,""))throw new Violation(this,value);return!0},this},Null:function(){return this.__class__="Null",this.validate=function(value){if(null!==value)throw new Violation(this,value);return!0},this},Range:function(min,max){if(this.__class__="Range",!min||!max)throw new Error("Range assert expects min and max values");return this.min=min,this.max=max,this.validate=function(value){try{return"string"==typeof value&&isNaN(Number(value))||_isArray(value)?(new Assert).Length({min:this.min,max:this.max}).validate(value):(new Assert).GreaterThanOrEqual(this.min).validate(value)&&(new Assert).LessThanOrEqual(this.max).validate(value),!0}catch(violation){throw new Violation(this,value,violation.violation)}return!0},this},Regexp:function(regexp,flag){if(this.__class__="Regexp","undefined"==typeof regexp)throw new Error("You must give a regexp");return this.regexp=regexp,this.flag=flag||"",this.validate=function(value){if("string"!=typeof value)throw new Violation(this,value,{value:Validator.errorCode.must_be_a_string});if(!new RegExp(this.regexp).test(value,this.flag))throw new Violation(this,value,{regexp:this.regexp,flag:this.flag});return!0},this},Required:function(){return this.__class__="Required",this.validate=function(value){if("undefined"==typeof value)throw new Violation(this,value);if("string"==typeof value)try{(new Assert).NotNull().validate(value)&&(new Assert).NotBlank().validate(value)}catch(violation){throw new Violation(this,value)}return!0},this},Unique:function(object){return this.__class__="Unique","object"==typeof object&&(this.key=object.key),this.validate=function(array){var value,store=[];if(!_isArray(array))throw new Violation(this,array,{value:Validator.errorCode.must_be_an_array});for(var i=0;i<array.length;i++)if(value="object"==typeof array[i]?array[i][this.key]:array[i],"undefined"!=typeof value){if(-1!==store.indexOf(value))throw new Violation(this,array,{value:value});store.push(value)}return!0},this}},exports.Assert=Assert,exports.Validator=Validator,exports.Violation=Violation,exports.Constraint=Constraint,Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){if(null==this)throw new TypeError;var t=Object(this),len=t.length>>>0;if(0===len)return-1;var n=0;if(arguments.length>1&&(n=Number(arguments[1]),n!=n?n=0:0!=n&&1/0!=n&&n!=-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len)return-1;for(var k=n>=0?n:Math.max(len-Math.abs(n),0);len>k;k++)if(k in t&&t[k]===searchElement)return k;return-1});var _isEmptyObject=function(obj){for(var property in obj)return!1;return!0},_isArray=function(obj){return"[object Array]"===Object.prototype.toString.call(obj)},expect={eql:function(actual,expected){if(actual===expected)return!0;if("undefined"!=typeof Buffer&&Buffer.isBuffer(actual)&&Buffer.isBuffer(expected)){if(actual.length!==expected.length)return!1;for(var i=0;i<actual.length;i++)if(actual[i]!==expected[i])return!1;return!0}return actual instanceof Date&&expected instanceof Date?actual.getTime()===expected.getTime():"object"!=typeof actual&&"object"!=typeof expected?actual==expected:this.objEquiv(actual,expected)},isUndefinedOrNull:function(value){return null===value||"undefined"==typeof value},isArguments:function(object){return"[object Arguments]"==Object.prototype.toString.call(object)},keys:function(obj){if(Object.keys)return Object.keys(obj);var keys=[];for(var i in obj)Object.prototype.hasOwnProperty.call(obj,i)&&keys.push(i);return keys},objEquiv:function(a,b){if(this.isUndefinedOrNull(a)||this.isUndefinedOrNull(b))return!1;if(a.prototype!==b.prototype)return!1;if(this.isArguments(a))return this.isArguments(b)?eql(pSlice.call(a),pSlice.call(b)):!1;try{var key,i,ka=this.keys(a),kb=this.keys(b)}catch(e){return!1}if(ka.length!==kb.length)return!1;for(ka.sort(),kb.sort(),i=ka.length-1;i>=0;i--)if(ka[i]!=kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!this.eql(a[key],b[key]))return!1;return!0}};"function"==typeof define&&define.amd&&define("validator",[],function(){return exports})}("undefined"==typeof exports?this["undefined"!=typeof validatorjs_ns?validatorjs_ns:"Validator"]={}:exports);var ParsleyValidator=function(validators,catalog){this.__class__="ParsleyValidator",this.Validator=Validator,this.locale="en",this.init(validators||{},catalog||{})};ParsleyValidator.prototype={init:function(validators,catalog){this.catalog=catalog;for(var name in validators)this.addValidator(name,validators[name].fn,validators[name].priority);$.emit("parsley:validator:init")},setLocale:function(locale){if("undefined"==typeof this.catalog[locale])throw new Error(locale+" is not available in the catalog");return this.locale=locale,this},addCatalog:function(locale,messages,set){return"object"==typeof messages&&(this.catalog[locale]=messages),!0===set?this.setLocale(locale):this},addMessage:function(locale,name,message){void 0===typeof this.catalog[locale]&&(this.catalog[locale]={}),this.catalog[locale][name]=message},validate:function(){return(new this.Validator.Validator).validate.apply(new Validator.Validator,arguments)},addValidator:function(name,fn,priority){return this.validators[name]=function(requirements){return $.extend((new Validator.Assert).Callback(fn,requirements),{priority:priority})},this},updateValidator:function(name,fn,priority){return addValidator(name,fn,priority)},removeValidator:function(name){return delete this.validators[name],this},getErrorMessage:function(constraint){var message;return message="type"===constraint.name?window.ParsleyConfig.i18n[this.locale][constraint.name][constraint.requirements]:this.formatMesssage(window.ParsleyConfig.i18n[this.locale][constraint.name],constraint.requirements),""!==message?message:window.ParsleyConfig.i18n[this.locale].defaultMessage},formatMesssage:function(string,parameters){if("object"==typeof parameters){for(var i in parameters)string=this.formatMesssage(string,parameters[i]);return string}return"string"==typeof string?string.replace(new RegExp("%s","i"),parameters):""},validators:{notblank:function(){return $.extend((new Validator.Assert).NotBlank(),{priority:2})},required:function(){return $.extend((new Validator.Assert).Required(),{priority:512})},type:function(type){var assert;switch(type){case"email":assert=(new Validator.Assert).Email();break;case"number":assert=(new Validator.Assert).Regexp("^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$");break;case"integer":assert=(new Validator.Assert).Regexp("^-?\\d+$");break;case"digits":assert=(new Validator.Assert).Regexp("^\\d+$");break;case"alphanum":assert=(new Validator.Assert).Regexp("^\\w+$","i");break;case"url":assert=(new Validator.Assert).Regexp("(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,4}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)","i");break;default:throw new Error("validator type `"+type+"` is not supported")}return $.extend(assert,{priority:256})},pattern:function(regexp){var flags="";return/^\/.*\/(?:[gimy]*)$/.test(regexp)&&(flags=regexp.replace(/.*\/([gimy]*)$/,"$1"),regexp=regexp.replace(new RegExp("^/(.*?)/"+flags+"$"),"$1")),$.extend((new Validator.Assert).Regexp(regexp,flags),{priority:64})},minlength:function(value){return $.extend((new Validator.Assert).Length({min:value}),{priority:30,requirementsTransformer:function(){return"string"!=typeof value||isNaN(value)?value:parseInt(value,10)}})},maxlength:function(value){return $.extend((new Validator.Assert).Length({max:value}),{priority:30,requirementsTransformer:function(){return"string"!=typeof value||isNaN(value)?value:parseInt(value,10)}})},length:function(array){return $.extend((new Validator.Assert).Length({min:array[0],max:array[1]}),{priority:32})},mincheck:function(length){return this.minlength(length)},maxcheck:function(length){return this.maxlength(length)},check:function(array){return this.length(array)},min:function(value){return $.extend((new Validator.Assert).GreaterThanOrEqual(value),{priority:30,requirementsTransformer:function(){return"string"!=typeof value||isNaN(value)?value:parseInt(value,10)}})},max:function(value){return $.extend((new Validator.Assert).LessThanOrEqual(value),{priority:30,requirementsTransformer:function(){return"string"!=typeof value||isNaN(value)?value:parseInt(value,10)}})},range:function(array){return $.extend((new Validator.Assert).Range(array[0],array[1]),{priority:32,requirementsTransformer:function(){for(var i=0;i<array.length;i++)array[i]="string"!=typeof array[i]||isNaN(array[i])?array[i]:parseInt(array[i],10);return array}})},equalto:function(value){return $.extend((new Validator.Assert).EqualTo(value),{priority:256,requirementsTransformer:function(){return $(value).length?$(value).val():value}})}}};var ParsleyUI=function(){this.__class__="ParsleyUI"};ParsleyUI.prototype={listen:function(){return $.listen("parsley:form:init",this,this.setupForm),$.listen("parsley:field:init",this,this.setupField),$.listen("parsley:field:validated",this,this.reflow),$.listen("parsley:form:validated",this,this.focus),$.listen("parsley:field:reset",this,this.reset),$.listen("parsley:form:destroy",this,this.destroy),$.listen("parsley:field:destroy",this,this.destroy),this},reflow:function(fieldInstance){if("undefined"!=typeof fieldInstance._ui&&!1!==fieldInstance._ui.active){var diff=this._diff(fieldInstance.validationResult,fieldInstance._ui.lastValidationResult);fieldInstance._ui.lastValidationResult=fieldInstance.validationResult,fieldInstance._ui.validatedOnce=!0,this.manageStatusClass(fieldInstance),this.manageErrorsMessages(fieldInstance,diff),this.actualizeTriggers(fieldInstance),(diff.kept.length||diff.added.length)&&"undefined"==typeof fieldInstance._ui.failedOnce&&this.manageFailingFieldTrigger(fieldInstance)}},manageStatusClass:function(fieldInstance){!0===fieldInstance.validationResult?this._successClass(fieldInstance):fieldInstance.validationResult.length>0?this._errorClass(fieldInstance):this._resetClass(fieldInstance)},manageErrorsMessages:function(fieldInstance,diff){if("undefined"==typeof fieldInstance.options.errorsMessagesDisabled){if("undefined"!=typeof fieldInstance.options.errorMessage)return void(diff.added.length||diff.kept.length?(0===fieldInstance._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&fieldInstance._ui.$errorsWrapper.append($(fieldInstance.options.errorTemplate).addClass("parsley-custom-error-message")),fieldInstance._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(fieldInstance.options.errorMessage)):fieldInstance._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove());for(var i=0;i<diff.removed.length;i++)this.removeError(fieldInstance,diff.removed[i].assert.name,!0);for(i=0;i<diff.added.length;i++)this.addError(fieldInstance,diff.added[i].assert.name,void 0,diff.added[i].assert,!0);for(i=0;i<diff.kept.length;i++)this.updateError(fieldInstance,diff.kept[i].assert.name,void 0,diff.kept[i].assert,!0)}},addError:function(fieldInstance,name,message,assert,doNotUpdateClass){fieldInstance._ui.$errorsWrapper.addClass("filled").append($(fieldInstance.options.errorTemplate).addClass("parsley-"+name).html(message||this._getErrorMessage(fieldInstance,assert))),!0!==doNotUpdateClass&&this._errorClass(fieldInstance)},updateError:function(fieldInstance,name,message,assert,doNotUpdateClass){fieldInstance._ui.$errorsWrapper.addClass("filled").find(".parsley-"+name).html(message||this._getErrorMessage(fieldInstance,assert)),!0!==doNotUpdateClass&&this._errorClass(fieldInstance)},removeError:function(fieldInstance,name,doNotUpdateClass){fieldInstance._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+name).remove(),!0!==doNotUpdateClass&&this.manageStatusClass(fieldInstance)},focus:function(formInstance){if(!0===formInstance.validationResult||"none"===formInstance.options.focus)return formInstance._focusedField=null;formInstance._focusedField=null;for(var i=0;i<formInstance.fields.length;i++)if(!0!==formInstance.fields[i].validationResult&&formInstance.fields[i].validationResult.length>0&&"undefined"==typeof formInstance.fields[i].options.noFocus){if("first"===formInstance.options.focus)return formInstance._focusedField=formInstance.fields[i].$element,formInstance._focusedField.focus();formInstance._focusedField=formInstance.fields[i].$element}return null===formInstance._focusedField?null:formInstance._focusedField.focus()},_getErrorMessage:function(fieldInstance,constraint){var customConstraintErrorMessage=constraint.name+"Message";return"undefined"!=typeof fieldInstance.options[customConstraintErrorMessage]?fieldInstance.options[customConstraintErrorMessage]:window.ParsleyValidator.getErrorMessage(constraint)},_diff:function(newResult,oldResult,deep){for(var added=[],kept=[],i=0;i<newResult.length;i++){for(var found=!1,j=0;j<oldResult.length;j++)if(newResult[i].assert.name===oldResult[j].assert.name){found=!0;break}found?kept.push(newResult[i]):added.push(newResult[i])}return{kept:kept,added:added,removed:deep?[]:this._diff(oldResult,newResult,!0).added}},setupForm:function(formInstance){formInstance.$element.on("submit.Parsley",!1,$.proxy(formInstance.onSubmitValidate,formInstance)),!1!==formInstance.options.uiEnabled&&formInstance.$element.attr("novalidate","")},setupField:function(fieldInstance){var _ui={active:!1};!1!==fieldInstance.options.uiEnabled&&(_ui.active=!0,fieldInstance.$element.attr(fieldInstance.options.namespace+"id",fieldInstance.__id__),_ui.$errorClassHandler=this._manageClassHandler(fieldInstance),_ui.errorsWrapperId="parsley-id-"+("undefined"!=typeof fieldInstance.options.multiple?"multiple-"+fieldInstance.options.multiple:fieldInstance.__id__),_ui.$errorsWrapper=$(fieldInstance.options.errorsWrapper).attr("id",_ui.errorsWrapperId),_ui.lastValidationResult=[],_ui.validatedOnce=!1,_ui.validationInformationVisible=!1,fieldInstance._ui=_ui,this._insertErrorWrapper(fieldInstance),this.actualizeTriggers(fieldInstance))},_manageClassHandler:function(fieldInstance){if("string"==typeof fieldInstance.options.classHandler&&$(fieldInstance.options.classHandler).length)return $(fieldInstance.options.classHandler);var $handler=fieldInstance.options.classHandler(fieldInstance);return"undefined"!=typeof $handler&&$handler.length?$handler:"undefined"==typeof fieldInstance.options.multiple||fieldInstance.$element.is("select")?fieldInstance.$element:fieldInstance.$element.parent()},_insertErrorWrapper:function(fieldInstance){var $errorsContainer;if("string"==typeof fieldInstance.options.errorsContainer){if($(fieldInstance.options.errorsContainer+"").length)return $(fieldInstance.options.errorsContainer).append(fieldInstance._ui.$errorsWrapper);window.console&&window.console.warn&&window.console.warn("The errors container `"+fieldInstance.options.errorsContainer+"` does not exist in DOM")}return"function"==typeof fieldInstance.options.errorsContainer&&($errorsContainer=fieldInstance.options.errorsContainer(fieldInstance)),"undefined"!=typeof $errorsContainer&&$errorsContainer.length?$errorsContainer.append(fieldInstance._ui.$errorsWrapper):"undefined"==typeof fieldInstance.options.multiple?fieldInstance.$element.after(fieldInstance._ui.$errorsWrapper):fieldInstance.$element.parent().after(fieldInstance._ui.$errorsWrapper)},actualizeTriggers:function(fieldInstance){var that=this;if(fieldInstance.options.multiple?$("["+fieldInstance.options.namespace+'multiple="'+fieldInstance.options.multiple+'"]').each(function(){$(this).off(".Parsley")}):fieldInstance.$element.off(".Parsley"),!1!==fieldInstance.options.trigger){var triggers=fieldInstance.options.trigger.replace(/^\s+/g,"").replace(/\s+$/g,"");""!==triggers&&(fieldInstance.options.multiple?$("["+fieldInstance.options.namespace+'multiple="'+fieldInstance.options.multiple+'"]').each(function(){$(this).on(triggers.split(" ").join(".Parsley ")+".Parsley",!1,$.proxy("function"==typeof fieldInstance.eventValidate?fieldInstance.eventValidate:that.eventValidate,fieldInstance))}):fieldInstance.$element.on(triggers.split(" ").join(".Parsley ")+".Parsley",!1,$.proxy("function"==typeof fieldInstance.eventValidate?fieldInstance.eventValidate:this.eventValidate,fieldInstance)))}},eventValidate:function(event){new RegExp("key").test(event.type)&&!this._ui.validationInformationVisible&&this.getValue().length<=this.options.validationThreshold||(this._ui.validatedOnce=!0,this.validate())},manageFailingFieldTrigger:function(fieldInstance){return fieldInstance._ui.failedOnce=!0,fieldInstance.options.multiple&&$("["+fieldInstance.options.namespace+'multiple="'+fieldInstance.options.multiple+'"]').each(function(){return new RegExp("change","i").test($(this).parsley().options.trigger||"")?void 0:$(this).on("change.ParsleyFailedOnce",!1,$.proxy(fieldInstance.validate,fieldInstance))}),fieldInstance.$element.is("select")&&!new RegExp("change","i").test(fieldInstance.options.trigger||"")?fieldInstance.$element.on("change.ParsleyFailedOnce",!1,$.proxy(fieldInstance.validate,fieldInstance)):new RegExp("keyup","i").test(fieldInstance.options.trigger||"")?void 0:fieldInstance.$element.on("keyup.ParsleyFailedOnce",!1,$.proxy(fieldInstance.validate,fieldInstance))},reset:function(parsleyInstance){"undefined"!=typeof parsleyInstance._ui&&(parsleyInstance.$element.off(".Parsley"),parsleyInstance.$element.off(".ParsleyFailedOnce"),"ParsleyForm"!==parsleyInstance.__class__&&(parsleyInstance._ui.$errorsWrapper.children().each(function(){$(this).remove()}),this._resetClass(parsleyInstance),parsleyInstance._ui.validatedOnce=!1,parsleyInstance._ui.lastValidationResult=[],parsleyInstance._ui.validationInformationVisible=!1))},destroy:function(parsleyInstance){"undefined"!=typeof parsleyInstance._ui&&(this.reset(parsleyInstance),"ParsleyForm"!==parsleyInstance.__class__&&(parsleyInstance._ui.$errorsWrapper.remove(),delete parsleyInstance._ui))
  },_successClass:function(fieldInstance){fieldInstance._ui.validationInformationVisible=!0,fieldInstance._ui.$errorClassHandler.removeClass(fieldInstance.options.errorClass).addClass(fieldInstance.options.successClass)},_errorClass:function(fieldInstance){fieldInstance._ui.validationInformationVisible=!0,fieldInstance._ui.$errorClassHandler.removeClass(fieldInstance.options.successClass).addClass(fieldInstance.options.errorClass)},_resetClass:function(fieldInstance){fieldInstance._ui.$errorClassHandler.removeClass(fieldInstance.options.successClass).removeClass(fieldInstance.options.errorClass)}};var ParsleyOptionsFactory=function(defaultOptions,globalOptions,userOptions,namespace){this.__class__="OptionsFactory",this.__id__=ParsleyUtils.hash(4),this.formOptions=null,this.fieldOptions=null,this.staticOptions=$.extend(!0,{},defaultOptions,globalOptions,userOptions,{namespace:namespace})};ParsleyOptionsFactory.prototype={get:function(parsleyInstance){if("undefined"==typeof parsleyInstance.__class__)throw new Error("Parsley Instance expected");switch(parsleyInstance.__class__){case"Parsley":return this.staticOptions;case"ParsleyForm":return this.getFormOptions(parsleyInstance);case"ParsleyField":case"ParsleyFieldMultiple":return this.getFieldOptions(parsleyInstance);default:throw new Error("Instance "+parsleyInstance.__class__+" is not supported")}},getFormOptions:function(formInstance){return this.formOptions=ParsleyUtils.attr(formInstance.$element,this.staticOptions.namespace),$.extend({},this.staticOptions,this.formOptions)},getFieldOptions:function(fieldInstance){return this.fieldOptions=ParsleyUtils.attr(fieldInstance.$element,this.staticOptions.namespace),null===this.formOptions&&"ParsleyForm"===fieldInstance.parsleyInstance.__proxy__&&(this.formOptions=getFormOptions(fieldInstance.parsleyInstance)),$.extend({},this.staticOptions,this.formOptions,this.fieldOptions)}};var ParsleyForm=function(element,parsleyInstance){if(this.__class__="ParsleyForm",this.__id__=ParsleyUtils.hash(4),"Parsley"!==ParsleyUtils.get(parsleyInstance,"__class__"))throw new Error("You must give a Parsley instance");this.parsleyInstance=parsleyInstance,this.$element=$(element)};ParsleyForm.prototype={init:function(){return this.validationResult=null,this.options=this.parsleyInstance.OptionsFactory.get(this),this._bindFields(),this},onSubmitValidate:function(event){return this.validate(void 0,void 0,event),!1===this.validationResult&&event instanceof $.Event&&event.preventDefault(),this},validate:function(group,force,event){this.submitEvent=event,this.validationResult=!0;var fieldValidationResult=[];this._refreshFields(),$.emit("parsley:form:validate",this);for(var i=0;i<this.fields.length;i++)group&&group!==this.fields[i].options.group||(fieldValidationResult=this.fields[i].validate(force),!0!==fieldValidationResult&&fieldValidationResult.length>0&&this.validationResult&&(this.validationResult=!1));return $.emit("parsley:form:validated",this),this.validationResult},isValid:function(group,force){this._refreshFields();for(var i=0;i<this.fields.length;i++)if((!group||group===this.fields[i].options.group)&&!1===this.fields[i].isValid(force))return!1;return!0},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var self=this;return this.fields=[],this.fieldsMappedById={},this.$element.find(this.options.inputs).each(function(){var fieldInstance=new window.Parsley(this,{},self.parsleyInstance);"ParsleyField"!==fieldInstance.__class__&&"ParsleyFieldMultiple"!==fieldInstance.__class__||fieldInstance.$element.is(fieldInstance.options.excluded)||"undefined"==typeof self.fieldsMappedById[fieldInstance.__class__+"-"+fieldInstance.__id__]&&(self.fieldsMappedById[fieldInstance.__class__+"-"+fieldInstance.__id__]=fieldInstance,self.fields.push(fieldInstance))}),this}};var ConstraintFactory=function(parsleyField,name,requirements,priority,isDomConstraint){if(!new RegExp("ParsleyField").test(ParsleyUtils.get(parsleyField,"__class__")))throw new Error("ParsleyField or ParsleyFieldMultiple instance expected");if("function"!=typeof window.ParsleyValidator.validators[name]&&"Assert"!==window.ParsleyValidator.validators[name](requirements).__parentClass__)throw new Error("Valid validator expected");var getPriority=function(parsleyField,name){return"undefined"!=typeof parsleyField.options[name+"Priority"]?parsleyField.options[name+"Priority"]:ParsleyUtils.get(window.ParsleyValidator.validators[name](requirements),"priority")||2};return priority=priority||getPriority(parsleyField,name),"function"==typeof window.ParsleyValidator.validators[name](requirements).requirementsTransformer&&(requirements=window.ParsleyValidator.validators[name](requirements).requirementsTransformer()),$.extend(window.ParsleyValidator.validators[name](requirements),{name:name,requirements:requirements,priority:priority,groups:[priority],isDomConstraint:isDomConstraint||ParsleyUtils.attr(parsleyField.$element,parsleyField.options.namespace,name)})},ParsleyField=function(field,parsleyInstance){if(this.__class__="ParsleyField",this.__id__=ParsleyUtils.hash(4),"Parsley"!==ParsleyUtils.get(parsleyInstance,"__class__"))throw new Error("You must give a Parsley instance");this.parsleyInstance=parsleyInstance,this.$element=$(field),this.options=this.parsleyInstance.OptionsFactory.get(this)};ParsleyField.prototype={init:function(){return this.constraints=[],this.validationResult=[],this.bindConstraints(),this},validate:function(force){return this.value=this.getValue(),$.emit("parsley:field:validate",this),$.emit("parsley:field:"+(this.isValid(force,this.value)?"success":"error"),this),$.emit("parsley:field:validated",this),this.validationResult},getConstraintsSortedPriorities:function(){for(var priorities=[],i=0;i<this.constraints.length;i++)-1===priorities.indexOf(this.constraints[i].priority)&&priorities.push(this.constraints[i].priority);return priorities.sort(function(a,b){return b-a}),priorities},isValid:function(force,value){this.refreshConstraints();var priorities=this.getConstraintsSortedPriorities();if(value=value||this.getValue(),0===value.length&&!this.isRequired()&&"undefined"==typeof this.options.validateIfEmpty&&"undefined"==typeof force)return this.validationResult=[];if(!1===this.options.priorityEnabled)return!0===(this.validationResult=this.validateThroughValidator(value,this.constraints,"Any"));for(var i=0;i<priorities.length;i++)if(!0!==(this.validationResult=this.validateThroughValidator(value,this.constraints,priorities[i])))return!1;return!0},isRequired:function(){var constraintIndex=this._constraintIndex("required");return!(-1===constraintIndex||-1!==constraintIndex&&!1===this.constraints[constraintIndex].requirements)},getValue:function(){var value;return value="undefined"!=typeof this.options.value?this.options.value:this.$element.val(),!0===this.options.trimValue?value.replace(/^\s+|\s+$/g,""):value},refreshConstraints:function(){return this.actualizeOptions().bindConstraints(),this},bindConstraints:function(){for(var constraints=[],i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&constraints.push(this.constraints[i]);this.constraints=constraints;for(var name in this.options)this.addConstraint(name,this.options[name]);return this.bindHtml5Constraints()},bindHtml5Constraints:function(){(this.$element.hasClass("required")||this.$element.attr("required"))&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"undefined"!=typeof this.$element.attr("min")&&"undefined"!=typeof this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"undefined"!=typeof this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"undefined"!=typeof this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0);var type=this.$element.attr("type");return"undefined"==typeof type?this:"number"===type?this.addConstraint("type","integer",void 0,!0):new RegExp(type,"i").test("email url range")?this.addConstraint("type",type,void 0,!0):void 0},addConstraint:function(name,requirements,priority,isDomConstraint){if(name=name.toLowerCase(),"function"==typeof window.ParsleyValidator.validators[name]){var constraint=new ConstraintFactory(this,name,requirements,priority,isDomConstraint);-1!==this._constraintIndex(constraint.name)&&this.removeConstraint(constraint.name),this.constraints.push(constraint)}return this},removeConstraint:function(name){for(var i=0;i<this.constraints.length;i++)if(name===this.constraints[i].name){this.constraints.splice(i,1);break}return this},updateConstraint:function(name,parameters,priority){return this.removeConstraint(name).addConstraint(name,parameters,priority)},_constraintIndex:function(name){for(var i=0;i<this.constraints.length;i++)if(name===this.constraints[i].name)return i;return-1}};var ParsleyMultiple=function(){this.__class__="ParsleyFieldMultiple"};ParsleyMultiple.prototype={init:function(multiple){return this.$elements=[this.$element],this.options.multiple=multiple,this},addElement:function($element){return this.$elements.push($element),this},refreshConstraints:function(){if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions().bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)this.constraints=this.constraints.concat(this.$elements[i].data("ParsleyFieldMultiple").refreshConstraints().constraints);return this},getValue:function(){if("undefined"!=typeof this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return $("["+this.options.namespace+'multiple="'+this.options.multiple+'"]:checked').val()||"";if(this.$element.is("input[type=checkbox]")){var values=[];return $("["+this.options.namespace+'multiple="'+this.options.multiple+'"]:checked').each(function(){values.push($(this).val())}),values.length?values:[]}return this.$element.is("select")?null===this.$element.val()?[]:this.$element.val():void 0}};var o=$({}),subscribed={};$.listen=function(name){if("undefined"==typeof subscribed[name]&&(subscribed[name]=[]),"function"==typeof arguments[1])return subscribed[name].push({fn:arguments[1]});if("object"==typeof arguments[1]&&"function"==typeof arguments[2])return subscribed[name].push({fn:arguments[2],ctxt:arguments[1]});throw new Error("Wrong parameters")},$.listenTo=function(instance,name,fn){if("undefined"==typeof subscribed[name]&&(subscribed[name]=[]),!(instance instanceof ParsleyField||instance instanceof ParsleyForm))throw new Error("Must give Parsley instance");if("string"!=typeof name||"function"!=typeof fn)throw new Error("Wrong parameters");subscribed[name].push({instance:instance,fn:fn})},$.unsubscribe=function(name,fn){if("undefined"!=typeof subscribed[name]){if("string"!=typeof name||"function"!=typeof fn)throw new Error("Wrong arguments");for(var i=0;i<subscribed[name].length;i++)if(subscribed[name][i].fn===fn)return subscribed[name].splice(i,1)}},$.unsubscribeTo=function(instance,name){if("undefined"!=typeof subscribed[name]){if(!(instance instanceof ParsleyField||instance instanceof ParsleyForm))throw new Error("Must give Parsley instance");for(var i=0;i<subscribed[name].length;i++)if("undefined"!=typeof subscribed[name][i].instance&&subscribed[name][i].instance.__id__===instance.__id__)return subscribed[name].splice(i,1)}},$.unsubscribeAll=function(name){"undefined"!=typeof subscribed[name]&&delete subscribed[name]},$.emit=function(name,instance){if("undefined"!=typeof subscribed[name])for(var i=0;i<subscribed[name].length;i++)if("undefined"!=typeof subscribed[name][i].instance){if(instance instanceof ParsleyField||instance instanceof ParsleyForm)if(subscribed[name][i].instance.__id__!==instance.__id__){if(subscribed[name][i].instance instanceof ParsleyForm&&instance instanceof ParsleyField)for(var j=0;j<subscribed[name][i].instance.fields.length;j++)if(subscribed[name][i].instance.fields[j].__id__===instance.__id__){subscribed[name][i].fn.apply(o,Array.prototype.slice.call(arguments,1));continue}}else subscribed[name][i].fn.apply(o,Array.prototype.slice.call(arguments,1))}else subscribed[name][i].fn.apply("undefined"!=typeof subscribed[name][i].ctxt?subscribed[name][i].ctxt:o,Array.prototype.slice.call(arguments,1))},$.subscribed=function(){return subscribed},window.ParsleyConfig=window.ParsleyConfig||{},window.ParsleyConfig.i18n=window.ParsleyConfig.i18n||{},window.ParsleyConfig.i18n.en=$.extend(window.ParsleyConfig.i18n.en||{},{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or less.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or less.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),"undefined"!=typeof window.ParsleyValidator&&window.ParsleyValidator.addCatalog("en",window.ParsleyConfig.i18n.en,!0);var Parsley=function(element,options,parsleyInstance){if(this.__class__="Parsley",this.__version__="2.0.0-rc4",this.__id__=ParsleyUtils.hash(4),"undefined"==typeof element)throw new Error("You must give an element");return this.init($(element),options,parsleyInstance)};Parsley.prototype={init:function($element,options,parsleyInstance){if(!$element.length)throw new Error("You must bind Parsley on an existing element.");if(this.$element=$element,this.$element.data("Parsley")){var savedParsleyInstance=this.$element.data("Parsley");return"undefined"!=typeof parsleyInstance&&"ParsleyField"===savedParsleyInstance.parsleyInstance.__proxy__&&(savedParsleyInstance.parsleyInstance=parsleyInstance),savedParsleyInstance}return this.OptionsFactory=new ParsleyOptionsFactory(ParsleyDefaults,ParsleyUtils.get(window,"ParsleyConfig")||{},options,this.getNamespace(options)),this.options=this.OptionsFactory.get(this),this.$element.is("form")||ParsleyUtils.attr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm",parsleyInstance):this.$element.is(this.options.inputs)&&!this.$element.is(this.options.excluded)?this.isMultiple()?this.handleMultiple(parsleyInstance):this.bind("parsleyField",parsleyInstance):this},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")&&"undefined"==typeof this.options.multiple||this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple")},handleMultiple:function(parsleyInstance){var name,multiple,parsleyMultipleInstance,that=this;if(this.options=$.extend(this.options,ParsleyUtils.attr(this.$element,this.options.namespace)),this.options.multiple?multiple=this.options.multiple:"undefined"!=typeof this.$element.attr("name")&&this.$element.attr("name").length?multiple=name=this.$element.attr("name"):"undefined"!=typeof this.$element.attr("id")&&this.$element.attr("id").length&&(multiple=this.$element.attr("id")),this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple"))return this.bind("parsleyFieldMultiple",parsleyInstance,multiple||this.__id__);if("undefined"==typeof multiple)return window.console&&window.console.warn&&window.console.warn("To be binded by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;if(multiple=multiple.replace(/(:|\.|\[|\]|\$)/g,""),"undefined"!=typeof name&&$('input[name="'+name+'"]').each(function(){$(this).attr(that.options.namespace+"multiple",multiple)}),$("["+this.options.namespace+"multiple="+multiple+"]").length)for(var i=0;i<$("["+this.options.namespace+"multiple="+multiple+"]").length;i++)if("undefined"!=typeof $($("["+this.options.namespace+"multiple="+multiple+"]").get(i)).data("Parsley")){parsleyMultipleInstance=$($("["+this.options.namespace+"multiple="+multiple+"]").get(i)).data("Parsley"),this.$element.data("ParsleyFieldMultiple")||(parsleyMultipleInstance.addElement(this.$element),this.$element.attr(this.options.namespace+"id",parsleyMultipleInstance.__id__));break}return this.bind("parsleyField",parsleyInstance,multiple,!0),parsleyMultipleInstance||this.bind("parsleyFieldMultiple",parsleyInstance,multiple)},getNamespace:function(options){return"undefined"!=typeof this.$element.data("parsleyNamespace")?this.$element.data("parsleyNamespace"):"undefined"!=typeof ParsleyUtils.get(options,"namespace")?options.namespace:"undefined"!=typeof ParsleyUtils.get(window,"ParsleyConfig.namespace")?window.ParsleyConfig.namespace:ParsleyDefaults.namespace},bind:function(type,parentParsleyInstance,multiple,doNotStore){var parsleyInstance;switch(type){case"parsleyForm":parsleyInstance=$.extend(new ParsleyForm(this.$element,parentParsleyInstance||this),new ParsleyAbstract,window.ParsleyExtend).init();break;case"parsleyField":parsleyInstance=$.extend(new ParsleyField(this.$element,parentParsleyInstance||this),new ParsleyAbstract,window.ParsleyExtend).init();break;case"parsleyFieldMultiple":parsleyInstance=$.extend(new ParsleyField(this.$element,parentParsleyInstance||this).init(),new ParsleyAbstract,new ParsleyMultiple,window.ParsleyExtend).init(multiple);break;default:throw new Error(type+"is not a supported Parsley type")}return"undefined"!=typeof multiple&&ParsleyUtils.setAttr(this.$element,this.options.namespace,"multiple",multiple),"undefined"!=typeof doNotStore?(this.$element.data("ParsleyFieldMultiple",parsleyInstance),parsleyInstance):(new RegExp("ParsleyF","i").test(parsleyInstance.__class__)&&(this.$element.data("Parsley",parsleyInstance),this.__proxy__=parsleyInstance.__class__,$.emit("parsley:"+("parsleyForm"===type?"form":"field")+":init",parsleyInstance)),parsleyInstance)}},$.fn.parsley=$.fn.psly=function(options){if(this.length>1){var instances=[];return this.each(function(){instances.push($(this).parsley(options))}),instances}return $(this).length?new Parsley(this,options):void(window.console&&window.console.warn&&window.console.warn("You must bind Parsley on an existing element."))},window.ParsleyUI="function"==typeof ParsleyUtils.get(window,"ParsleyConfig.ParsleyUI")?(new window.ParsleyConfig.ParsleyUI).listen():(new ParsleyUI).listen(),"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),"undefined"==typeof window.ParsleyConfig&&(window.ParsleyConfig={}),window.Parsley=window.psly=Parsley,window.ParsleyUtils=ParsleyUtils,window.ParsleyValidator=new ParsleyValidator(window.ParsleyConfig.validators,window.ParsleyConfig.i18n),!1!==ParsleyUtils.get(window,"ParsleyConfig.autoBind")&&$(document).ready(function(){$("[data-parsley-validate]").length&&$("[data-parsley-validate]").parsley()})}(window.jQuery);var SMALL_WIDTH=640,MEDIUM_WIDTH=1024;$.fn.isBottomScrolledIntoView=function(){var items=getScrolledItems(this),docViewTop=items[0],docViewBottom=items[1],elemBottom=(items[2],items[3]);return elemBottom>=docViewTop&&docViewBottom>=elemBottom},$.fn.isScrolledIntoView=function(){var items=getScrolledItems(this),docViewTop=items[0],docViewBottom=items[1],elemTop=items[2],elemBottom=items[3];return docViewBottom>=elemBottom&&elemTop>=docViewTop||elemTop>=docViewTop&&docViewBottom>=elemTop||elemBottom>=docViewTop&&docViewBottom>=elemBottom||docViewTop>=elemTop&&elemBottom>=docViewBottom};var windowResize={height:0,width:0,update:function(){this.width=$(window).width(),this.height=$(window).height()},checkResize:function(callback){(this.width!=$(window).width()||this.height!=$(window).height())&&(this.update(),callback.apply())}};windowResize.update(),$(document).ready(function(){setupActiveJavaScript(),scrollFading(),setupAutoScroll(),setupScrollHintAnimation(),setupScrollFadingAndResize(),updateSizes(),updateToolTips(),$(window).on({scroll:scrollFading,resize:function(){windowResize.checkResize(resizeWindow)}}),setTimeout(function(){loadDemoContent()},2e3)}),function(){}.call(this),function(){}.call(this),$(function(){$(document).foundation()});