|
|
/* * # Semantic UI * git://github.com/Semantic-Org/Semantic-UI.git#1.0
* * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT
* */ !function(e,t,n,i){"use strict";e.fn.accordion=function(n){{var o,a=e(this),r=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)}}return a.each(function(){var t,d,m=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),f=m.className,g=m.namespace,p=m.selector,v=(m.error,"."+g),h="module-"+g,b=a.selector||"",y=e(this),x=y.find(p.title),w=y.find(p.content),C=this,T=y.data(h);d={initialize:function(){d.debug("Initializing accordion with bound events",y),y.on("click"+v,p.title,d.event.click),d.observeChanges(),d.instantiate()},instantiate:function(){T=d,y.data(h,d)},destroy:function(){d.debug("Destroying previous accordion for",y),y.removeData(h),x.off(v)},refresh:function(){x=y.find(p.title),w=y.find(p.content)},observeChanges:function(){MutationObserver!==i&&(t=new MutationObserver(function(){d.debug("DOM tree modified, updating selector cache"),d.refresh()}),t.observe(C,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",t))},event:{click:function(){e.proxy(d.toggle,this)()}},toggle:function(t){var n=t!==i?"number"==typeof t?x.eq(t):e(t):e(this),o=n.next(w),a=o.is(":visible");d.debug("Toggling visibility of content",n),a?m.collapsible?e.proxy(d.close,n)():d.debug("Cannot close accordion content collapsing is disabled"):e.proxy(d.open,n)()},open:function(t){var n=t!==i?"number"==typeof t?x.eq(t):e(t):e(this),o=n.next(w),a=o.is(":animated"),r=o.hasClass(f.active);a||r||(d.debug("Opening accordion content",n),m.exclusive&&e.proxy(d.closeOthers,n)(),n.addClass(f.active),o.stop().children().stop().animate({opacity:1},m.duration,d.reset.display).end().slideDown(m.duration,m.easing,function(){o.addClass(f.active),e.proxy(d.reset.display,this)(),e.proxy(m.onOpen,this)(),e.proxy(m.onChange,this)()}))},close:function(t){var n=t!==i?"number"==typeof t?x.eq(t):e(t):e(this),o=n.next(w),a=o.hasClass(f.active);a&&(d.debug("Closing accordion content",o),n.removeClass(f.active),o.removeClass(f.active).show().stop().children().stop().animate({opacity:0},m.duration,d.reset.opacity).end().slideUp(m.duration,m.easing,function(){e.proxy(d.reset.display,this)(),e.proxy(m.onClose,this)(),e.proxy(m.onChange,this)()}))},closeOthers:function(t){var n,o,a,r=t!==i?x.eq(t):e(this),s=r.parents(p.content).prev(p.title),c=r.closest(p.accordion),l=p.title+"."+f.active+":visible",u=p.content+"."+f.active+":visible";m.closeNested?(n=c.find(l).not(s),a=n.next(w)):(n=c.find(l).not(s),o=c.find(u).find(l).not(s),n=n.not(o),a=n.next(w)),n.size()>0&&(d.debug("Exclusive enabled, closing other content",n),n.removeClass(f.active),a.stop().children().stop().animate({opacity:0},m.duration,d.resetOpacity).end().slideUp(m.duration,m.easing,function(){e(this).removeClass(f.active),e.proxy(d.reset.display,this)()}))},reset:{display:function(){d.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){d.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(t,n){if(d.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},internal:function(t,n){return d.debug("Changing internal",t,n),n===i?d[t]:void(e.isPlainObject(t)?e.extend(!0,d,t):d[t]=n)},debug:function(){m.debug&&(m.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,m.name+":"),d.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),d.verbose.apply(console,arguments)))},error:function(){d.error=Function.prototype.bind.call(console.error,console,m.name+":"),d.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;m.p }),this},e.fn.colorize.settings={name:"Image Colorizer",debug:!0,namespace:"colorize",onDraw:function(){},async:!0,colors:{},metadata:{image:"image",name:"name"},error:{noImage:"No tracing image specified",undefinedColors:"No default colors specified.",missingColor:"Attempted to change color that does not exist",missingPlugin:"Blend onto plug-in must be included",undefinedHeight:"The width or height of image canvas could not be automatically determined. Please specify a height."}}}(jQuery,window,document),function(e,t,n,i){e.fn.dimmer=function(t){var o,a=e(this),r=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);return a.each(function(){var d,m,f,g=e.isPlainObject(t)?e.extend(!0,{},e.fn.dimmer.settings,t):e.extend({},e.fn.dimmer.settings),p=g.selector,v=g.namespace,h=g.className,b=(g.error,"."+v),y="module-"+v,x=a.selector||"",w="ontouchstart"in n.documentElement?"touchstart":"click",C=e(this),T=this,k=C.data(y);f={preinitialize:function(){f.is.dimmer()?(m=C.parent(),d=C):(m=C,d=f.has.dimmer()?g.dimmerName?m.children(p.dimmer).filter("."+g.dimmerName):m.children(p.dimmer):f.create())},initialize:function(){f.debug("Initializing dimmer",g),"hover"==g.on?m.on("mouseenter"+b,f.show).on("mouseleave"+b,f.hide):"click"==g.on&&m.on(w+b,f.toggle),f.is.page()&&(f.debug("Setting as a page dimmer",m),f.set.pageDimmer()),f.is.closable()&&(f.verbose("Adding dimmer close event",d),d.on(w+b,f.event.click)),f.set.dimmable(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),k=f,C.data(y,k)},destroy:function(){f.verbose("Destroying previous module",d),C.removeData(y),m.off(b),d.off(b)},event:{click:function(t){f.verbose("Determining if event occured on dimmer",t),(0===d.find(t.target).size()||e(t.target).is(p.content))&&(f.hide(),t.stopImmediatePropagation())}},addContent:function(t){var n=e(t);f.debug("Add content to dimmer",n),n.parent()[0]!==d[0]&&n.detach().appendTo(d)},create:function(){var t=e(g.template.dimmer());return g.variation&&(f.debug("Creating dimmer with variation",g.variation),t.addClass(h.variation)),g.dimmerName&&(f.debug("Creating named dimmer",g.dimmerName),t.addClass(g.dimmerName)),t.appendTo(m),t},show:function(t){t=e.isFunction(t)?t:function(){},f.debug("Showing dimmer",d,g),f.is.dimmed()&&!f.is.animating()||!f.is.enabled()?f.debug("Dimmer is already shown or disabled"):(f.animate.show(t),e.proxy(g.onShow,T)(),e.proxy(g.onChange,T)())},hide:function(t){t=e.isFunction(t)?t:function(){},f.is.dimmed()||f.is.animating()?(f.debug("Hiding dimmer",d),f.animate.hide(t),e.proxy(g.onHide,T)(),e.proxy(g.onChange,T)()):f.debug("Dimmer is not visible")},toggle:function(){f.verbose("Toggling dimmer visibility",d),f.is.dimmed()?f.hide():f.show()},animate:{show:function(t){t=e.isFunction(t)?t:function(){},g.useCSS&&e.fn.transition!==i&&d.transition("is supported")?d.transition({animation:g.transition+" in",queue:!1,duration:f.get.duration(),start:function(){f.set.dimmed()},complete:function(){f.set.active(),t()}}):(f.verbose("Showing dimmer animation with javascript"),f.set.dimmed(),d.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(f.get.duration(),1,function(){d.removeAttr("style"),f.set.active(),t()}))},hide:function(t){t=e.isFunction(t)?t:function(){},g.useCSS&&e.fn.transition!==i&&d.transition("is supported")?(f.verbose("Hiding dimmer with css"),d.transition({animation:g.transition+" out",queue:!1,duration:f.get.duration(),start:function(){f.remove.dimmed()},complete:function(){f.remove.active(),t()}})):(f.verbose("Hiding dimmer with javascript"),f.remove.dimmed(),d.stop().fadeOut(f.get.duration(),function(){f.remove.active(),d.removeAttr("style"),t()}))}},get:{dimmer:function(){return d},duration:function(){return"object"==typeof g.duration?f.is.active()?g.duration.hide:g.duration.show:g.duration}},has:{dimmer:function(){return g.dimmerName?C.children(p.dimmer).filter("."+g.dimmerName).size()>0:C.children(p.dimmer).size()>0}},is:{active:function(){return d.hasClass(h.active)},animating:function(){return d.is(":animated")||d.hasClass(h.animati },onFailure:function(){return!1},metadata:{validate:"validate"},selector:{message:".error.message",field:"input, textarea, select",group:".field",checkbox:'input[type="checkbox"], input[type="radio"]',input:"input",prompt:".prompt",submit:".submit"},className:{error:"error",success:"success",down:"down",label:"ui label prompt"},error:{method:"The method you called is not defined."},templates:{error:function(t){var n='<ul class="list">';return e.each(t,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>",e(n)},prompt:function(t){return e("<div/>").addClass("ui red pointing prompt label").html(t[0])}},rules:{checked:function(){return e(this).filter(":checked").size()>0},empty:function(e){return!(e===i||""===e)},email:function(e){var t=new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?","i");return t.test(e)},length:function(e,t){return e!==i?e.length>=t:!1},not:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==e.search(t)},is:function(e,t){return e==t},maxLength:function(e,t){return e!==i?e.length<=t:!1},match:function(t,n){var o,a=e(this);return a.find("#"+n).size()>0?o=a.find("#"+n).val():a.find("[name="+n+"]").size()>0?o=a.find("[name="+n+"]").val():a.find('[data-validate="'+n+'"]').size()>0&&(o=a.find('[data-validate="'+n+'"]').val()),o!==i?t.toString()==o.toString():!1},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},integer:function(e,t){var n,o,a,r=/^\-?\d+$/;return t===i||""===t||".."===t||(-1==t.indexOf("..")?r.test(t)&&(n=o=t-0):(a=t.split("..",2),r.test(a[0])&&(n=a[0]-0),r.test(a[1])&&(o=a[1]-0))),r.test(e)&&(n===i||e>=n)&&(o===i||o>=e)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.modal=function(o){var a,r=e(this),s=e(t),c=e(n),l=e("body"),u=r.selector||"",d=(new Date).getTime(),m=[],f=arguments[0],g="string"==typeof f,p=[].slice.call(arguments,1),v=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return r.each(function(){var r,h,b,y,x,w,C=e.isPlainObject(o)?e.extend(!0,{},e.fn.modal.settings,o):e.extend({},e.fn.modal.settings),T=C.selector,k=C.className,P=C.namespace,S=C.error,z="."+P,A="module-"+P,E=e(this),F=e(C.context),D=E.find(T.close),O=this,j=E.data(A);w={initialize:function(){return w.verbose("Initializing dimmer",F),e.fn.dimmer===i?void w.error(S.dimmer):(y=F.dimmer({debug:C.debug,dimmerName:"modals",closable:!1,useCSS:!0,duration:{show:.9*C.duration,hide:1.1*C.duration}}),C.detachable&&y.dimmer("add content",E),x=y.dimmer("get dimmer"),h=E.siblings(T.modal),r=h.add(E),w.verbose("Attaching close events",D),D.on("click"+z,w.event.close),s.on("resize"+z,w.event.resize),void w.instantiate())},instantiate:function(){w.verbose("Storing instance of modal"),j=w,E.data(A,j)},destroy:function(){w.verbose("Destroying previous modal"),E.removeData(A).off(z),D.off(z),F.dimmer("destroy")},refresh:function(){w.remove.scrolling(),w.cacheSizes(),w.set.screenHeight(),w.set.type(),w.set.position()},attachEvents:function(t,n){var i=e(t);n=e.isFunction(w[n])?w[n]:w.toggle,i.size()>0?(w.debug("Attaching modal events to element",t,n),i.off(z).on("click"+z,n)):w.error(S.notFound,t)},event:{close:function(){w.verbose("Closing element pressed"),e(this).is(T.approve)?e.proxy(C.onApprove,O)()!==!1?w.hide():w.verbose("Approve callback returned false cancelling hide"):e(this).is(T.deny)?e.proxy(C.onDeny,O)()!==!1?w.hide():w.verbose("Deny callback returned false cancelling hide"):w.hide()},click:function(t){0===e(t.target).closest(T.modal).size()&&(w.debug("Dimmer clicked, hiding all modals"),C.allowMultiple?w.hide():w.hideAll(),t.stopImmediatePropagation())},debounce:function(e,t){clearTimeout(w.timer),w.timer=setTimeout(e,t)},keyboard:function(e){var t=e.which,n=27;t==n&&(C.closable?(w.debug("Escape key pressed hiding modal"),w.hide()):w.debug("Escape key pressed, but closable is set to f },percent:function(t){t="string"==typeof t?+t.replace("%",""):t,t>0&&1>t&&(n.verbose("Module percentage passed as decimal, converting"),t=100*t),t=Math.round(0===a.precision?t:10*t*a.precision/(10*a.precision)),n.percent=t,n.total&&(n.value=Math.round(t/100*n.total)),n.set.barWidth(t),n.set.barLabel(),100===t?!a.autoSuccess||n.is.warning()||n.is.error()?n.remove.active():(n.set.success(),n.debug("Automatically triggering success at 100%")):n.set.active(),e.proxy(a.onChange,C)(t,n.value,n.total)},label:function(e){e=e||"",e&&(e=n.get.text(e),n.debug("Setting label to text",e),w.text(e))},barLabel:function(e){e!==i?x.text(n.get.text(e)):"ratio"==a.label&&n.total?(n.debug("Adding ratio to bar label"),x.text(n.get.text(a.text.ratio))):"percent"==a.label&&(n.debug("Adding percentage to bar label"),x.text(n.get.text(a.text.percent)))},active:function(e){e=e||a.text.active,n.debug("Setting active state"),a.showActivity&&b.addClass(m.active),n.remove.warning(),n.remove.error(),n.remove.success(),e&&n.set.label(e)},success:function(e){e=e||a.text.success,n.debug("Setting success state"),b.addClass(m.success),n.remove.active(),n.remove.warning(),n.remove.error(),n.complete(),e&&n.set.label(e)},warning:function(e){e=e||a.text.warning,n.debug("Setting warning state"),b.addClass(m.warning),n.remove.active(),n.remove.success(),n.remove.error(),n.complete(),e&&n.set.label(e)},error:function(e){e=e||a.text.error,n.debug("Setting error state"),b.addClass(m.error),n.remove.active(),n.remove.success(),n.remove.warning(),n.complete(),e&&n.set.label(e)},total:function(e){n.total=e},progress:function(e){var t,i="string"==typeof e?""!==e.replace(/[^\d.]/g,"")?+e.replace(/[^\d.]/g,""):!1:e;i||n.error(v.nonNumeric),n.total?(n.value=i,t=i/n.total*100,n.debug("Calculating percent complete from total",t),n.set.percent(t)):(t=i,n.debug("Setting value to exact percentage value",t),n.set.percent(t))}},setting:function(t,o){if(n.debug("Changing setting",t,o),e.isPlainObject(t))e.extend(!0,a,t);else{if(o===i)return a[t];a[t]=o}},internal:function(t,o){if(e.isPlainObject(t))e.extend(!0,n,t);else{if(o===i)return n[t];n[t]=o}},debug:function(){a.debug&&(a.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,a.name+":"),n.debug.apply(console,arguments)))},verbose:function(){a.verbose&&a.debug&&(a.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),n.verbose.apply(console,arguments)))},error:function(){n.error=Function.prototype.bind.call(console.error,console,a.name+":"),n.error.apply(console,arguments)},performance:{log:function(e){var t,i,o;a.performance&&(t=(new Date).getTime(),o=s||t,i=t-o,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":i})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,100)},display:function(){var t=a.name+":",o=0;s=!1,clearTimeout(n.performance.timer),e.each(c,function(e,t){o+=t["Execution Time"]}),t+=" "+o+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,a,r){var s,c,l,u=T;return a=a||d,r=C||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(o,a){var r=o!=s?a+t[o+1].charAt(0).toUpperCase()+t[o+1].slice(1):t;if(e.isPlainObject(u[r])&&o!=s)u=u[r];else{if(u[r]!==i)return c=u[r],!1;if(!e.isPlainObject(u[a])||o==s)return u[a]!==i?(c=u[a],!1):(n.error(v.method,t),!1);u=u[a]}})),e.isFunction(c)?l=c.apply(r,a):c!==i&&(l=c),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),c}},u?(T===i&&n.initialize(),n.invoke(l)):(T!==i&&n.destroy(),n.initialize())}),o!==i?o:this},e.fn.progress.settings={name:"Progress",namespace:"progress",debug:!1,verbose:!0,performance:!0,random:{min:2,max:5},autoSuccess:!0,showActivity:!0,label:"percent",precision:1,percent:!1,total:!1,value:!1,onChange:function(){},error:{method:"The method you called is not n=e.isFunction(n)?n:function(){},i=function(){p.remove.outward(),p.set.visible(),p.set.transition(),p.set.direction(),f(function(){p.set.inward(),p.set.pushed()})},a.off(g+w).on(g+w,function(t){t.target==a[0]&&(a.off(g+w),p.remove.inward(),p.bind.clickaway(),p.set.active(),e.proxy(n,F)())}),p.verbose("Adding context push state",k),"overlay"===o?f(i):(("scale down"==v.transition||p.is.mobile())&&(T.scrollTop(0),r=e(t).scrollTop(),t.scrollTo(0,0)),p.remove.allVisible(),f(i))},pullPage:function(n){var i=p.get.transition(),o="safe"==i?k:"overlay"==i?T:z;n=e.isFunction(n)?n:function(){},p.verbose("Removing context push state",p.get.direction()),p.unbind.clickaway(),o.off(g+w).on(g+w,function(a){a.target==o[0]&&(o.off(g+w),p.remove.transition(),p.remove.direction(),p.remove.outward(),p.remove.visible(),("scale down"==i||v.returnScroll&&"overlay"!==i&&p.is.mobile())&&t.scrollTo(0,r),e.proxy(n,F)())}),f(function(){p.remove.inward(),p.set.outward(),p.remove.active(),p.remove.pushed()})},legacyPushPage:function(t){var n=T.width(),i=p.get.direction(),o={};n=n||T.width(),t=e.isFunction(t)?t:function(){},o[i]=n,p.debug("Using javascript to push context",o),p.set.visible(),p.set.transition(),p.set.direction(),p.set.inward(),p.set.pushed(),k.animate(o,v.duration,v.easing,function(){p.remove.inward(),p.bind.clickaway(),p.set.active(),e.proxy(t,p)()})},legacyPullPage:function(t){var n=0,i=p.get.direction(),o={};n=n||T.width(),t=e.isFunction(t)?t:function(){},o[i]="0px",p.debug("Using javascript to pull context",o),p.unbind.clickaway(),p.set.outward(),p.remove.active(),p.remove.pushed(),k.animate(o,v.duration,v.easing,function(){p.remove.transition(),p.remove.direction(),p.remove.outward(),p.remove.visible(),e.proxy(t,p)()})},set:{active:function(){k.addClass(b.active)},direction:function(e){e=e||p.get.direction(),k.addClass(b[e])},visible:function(){T.addClass(b.visible)},transition:function(e){e=e||p.get.transition(),k.addClass(e)},inward:function(){k.addClass(b.inward)},outward:function(){k.addClass(b.outward)},pushed:function(){v.dimPage&&A.addClass(b.dimmed),k.addClass(b.pushed)}},remove:{active:function(){k.removeClass(b.active)},visible:function(){T.removeClass(b.visible)},allVisible:function(){S.hasClass(b.visible)&&(p.debug("Other sidebars visible, hiding"),S.removeClass(b.visible))},transition:function(e){e=e||p.get.transition(),k.removeClass(e)},pushed:function(){v.dimPage&&A.removeClass(b.dimmed),k.removeClass(b.pushed)},inward:function(){k.removeClass(b.inward)},outward:function(){k.removeClass(b.outward)},direction:function(e){e=e||p.get.direction(),k.removeClass(b[e])}},get:{direction:function(){return T.hasClass(b.top)?b.top:T.hasClass(b.right)?b.right:T.hasClass(b.bottom)?b.bottom:b.left},transition:function(){var e=p.get.direction();return p.is.mobile()?"auto"==v.mobileTransition?v.defaultTransition.mobile[e]:v.mobileTransition:"auto"==v.transition?v.defaultTransition.computer[e]:v.transition},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]}},is:{legacy:function(){var e,o=n.createElement("div"),a={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(o,null);for(var r in a)o.style[r]!==i&&(o.style[r]="translate3d(1px,1px,1px)",e=t.getComputedStyle(o).getPropertyValue(a[r]));return n.body.removeChild(o),!(e!==i&&e.length>0&&"none"!==e)},mobile:function(){var e=navigator.userAgent,t=/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,n=t.test(e);return n?(p.verbose("Browser was found to be mobile",e),!0):(p.verbose("Browser is not mobile, using regular transition",e),!1)},closed:function(){return!p.is.visible()},visible:function(){return T.hasClass(b.visible)},vertical:function(){return T.hasClass(b.top)},inward:function(){re },event:{click:function(t){var n=e(this).data(b.tab);n!==i?(s.history?(o.verbose("Updating page state",t),e.address.value(n)):(o.verbose("Changing tab",t),o.changeTab(n)),t.preventDefault()):o.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||o.get.initialPath(),a=s.templates.determineTitle(n)||!1;o.performance.display(),o.debug("History change event",n,t),v=t,n!==i&&o.changeTab(n),a&&e.address.title(a)}}},refresh:function(){g&&(o.debug("Refreshing tab",g),o.changeTab(g))},cache:{read:function(e){return e!==i?P[e]:!1},add:function(e,t){e=e||g,o.debug("Adding cached content for",e),P[e]=t},remove:function(e){e=e||g,o.debug("Removing cached content for",e),delete P[e]}},set:{state:function(t){e.address.value(t)}},changeTab:function(n){var i=t.history&&t.history.pushState,a=i&&s.ignoreFirstLoad&&S,r=s.auto||e.isPlainObject(s.apiSettings),c=r&&!a?o.utilities.pathToArray(n):o.get.defaultPathArray(n);n=o.utilities.arrayToPath(c),e.each(c,function(t,i){var l,u,d,m,f=c.slice(0,t+1),h=o.utilities.arrayToPath(f),b=o.is.tab(h),y=t+1==c.length,w=o.get.tabElement(h);return o.verbose("Looking for tab",i),b?(o.verbose("Tab was found",i),g=h,p=o.utilities.filterArray(c,f),y?m=!0:(u=c.slice(0,t+2),d=o.utilities.arrayToPath(u),m=!o.is.tab(d),m&&o.verbose("Tab parameters found",u)),m&&r?(a?(o.debug("Ignoring remote content on first tab load",h),S=!1,o.cache.add(n,w.html()),o.activate.all(h),e.proxy(s.onTabInit,w)(h,p,v),e.proxy(s.onTabLoad,w)(h,p,v)):(o.activate.navigation(h),o.content.fetch(h,n)),!1):(o.debug("Opened local tab",h),o.activate.all(h),o.cache.read(h)||(o.cache.add(h,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(h,p,v)),e.proxy(s.onTabLoad,w)(h,p,v),void 0)):(l=e("#"+n+', a[name="'+n+'"]'),h=l.closest("[data-tab]").data("tab"),w=o.get.tabElement(h),l.size()>0&&h?(o.debug("No tab found, but deep anchor link present, opening parent tab"),o.activate.all(h),o.cache.read(h)||(o.cache.add(h,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(h,p,v))):o.error(x.missingTab,T,h),!1)})},content:{fetch:function(t,n){var a,r,c=o.get.tabElement(t),l={dataType:"html",stateContext:c,onSuccess:function(i){o.cache.add(n,i),o.content.update(t,i),t==g?(o.debug("Content loaded",t),o.activate.tab(t)):o.debug("Content loaded in background",t),e.proxy(s.onTabInit,c)(t,p,v),e.proxy(s.onTabLoad,c)(t,p,v)},urlData:{tab:n}},u=c.data(b.promise)||!1,d=u&&"pending"===u.state();n=n||t,r=o.cache.read(n),s.cache&&r?(o.debug("Showing existing content",n),o.content.update(t,r),o.activate.tab(t),e.proxy(s.onTabLoad,c)(t,p,v)):d?(o.debug("Content is already loading",n),c.addClass(h.loading)):e.api!==i?(a=e.extend(!0,{headers:{"X-Remote":!0}},s.apiSettings,l),o.debug("Retrieving remote content",n,a),e.api(a)):o.error(x.api)},update:function(e,t){o.debug("Updating html for",e);var n=o.get.tabElement(e);n.html(t)}},activate:{all:function(e){o.activate.tab(e),o.activate.navigation(e)},tab:function(e){var t=o.get.tabElement(e);o.verbose("Showing tab content for",t),t.addClass(h.active).siblings(k).removeClass(h.active+" "+h.loading)},navigation:function(e){var t=o.get.navElement(e);o.verbose("Activating tab navigation for",t,e),t.addClass(h.active).siblings(r).removeClass(h.active+" "+h.loading)}},deactivate:{all:function(){o.deactivate.navigation(),o.deactivate.tabs()},navigation:function(){r.removeClass(h.active)},tabs:function(){k.removeClass(h.active+" "+h.loading)}},is:{tab:function(e){return e!==i?o.get.tabElement(e).size()>0:!1}},get:{initialPath:function(){return r.eq(0).data(b.tab)||k.eq(0).data(b.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return o.utilities.pathToArray(o.get.defaultPath(e))},defaultPath:function(e){var t=r.filter("[data-"+b.tab+'^="'+e+'/"]').eq(0),n=t.data(b.tab)||!1;if(n){if(o.debug("Found default tab",n),z<s.maxDepth)return z++,o.get.defaultPath(n);o.error(x.recursion)}else o.debug("No default tabs found for",e,k);return z=0,e},navElement:function(e){return e=e||g,r.filter("[data-"+b.tab+'="'+e+'"]')},tabElement:fu },position:function(){r.save.screenSize(),r.save.elementPosition()}},get:{pixelsPassed:function(e){var t=r.get.elementCalculations();return e.search("%")>-1?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return r.cache.occurred!==i?r.cache.occurred[e]||!1:!1},direction:function(){return r.cache.direction===i&&r.save.direction(),r.cache.direction},elementPosition:function(){return r.cache.element===i&&r.save.elementPosition(),r.cache.element},elementCalculations:function(){return r.cache.element===i&&r.save.elementCalculations(),r.cache.element},screenCalculations:function(){return r.cache.screen===i&&r.save.screenCalculations(),r.cache.screen},screenSize:function(){return r.cache.screen===i&&r.save.screenSize(),r.cache.screen},scroll:function(){return r.cache.scroll===i&&r.save.scroll(),r.cache.scroll},lastScroll:function(){return r.cache.screen===i?(r.debug("First scroll event, no last scroll could be found"),!1):r.cache.screen.top}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,r,t);else{if(n===i)return r[t];r[t]=n}},debug:function(){f.debug&&(f.performance?r.performance.log(arguments):(r.debug=Function.prototype.bind.call(console.info,console,f.name+":"),r.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?r.performance.log(arguments):(r.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),r.verbose.apply(console,arguments)))},error:function(){r.error=Function.prototype.bind.call(console.error,console,f.name+":"),r.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=c||t,n=t-i,c=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":n})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,100)},display:function(){var t=f.name+":",n=0;c=!1,clearTimeout(r.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,o){var r,s,c,l=x;return n=n||m,o=C||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(a)?a.push(c):a!==i?a=[a,c]:c!==i&&(a=c),s}},d?(x===i&&r.initialize(),r.invoke(u)):(x!==i&&r.destroy(),r.initialize())}),a!==i?a:this},e.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,offset:0,includeMargin:!1,context:t,throttle:!1,type:!1,transition:"fade in",duration:500,onPassed:{},onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,once:!0,continuous:!1,onRefresh:function(){},onScroll:function(){},error:{method:"The method you called is not defined."}}}(jQuery,window,document),function(e,t,n,i){e.visit=e.fn.visit=function(n){var o,a=e(e.isFunction(this)?t:this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var m,f=e.extend(!0,{},e.fn.visit.settings,n),g=f.error,p=f.namespace,v=p+"-module",h=e(this),b=e(),y=this,x=h.data(v);m={initialize:function(){f.count?m.store(f.key.count,f.count):f.id?m.add.id(f.id):f.increment&&"increment"!==u&&m.increment(),m.add.display(h),m.instantiate()},instantiate:function(){m.verbose("Storing instance of visit module",m),x=m,h.data(v,m)},destroy:function(){m.verbose("Destroying instance"),h.removeData(v)},increment:function(e){var t=m.get.count(),n=+t+1;e?m.a
|