1/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 2"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window}
2,"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var Q,A,R=!1,C=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return R=!0,e=r.apply(this,arguments),R=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in R||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(A={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(A,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=A):A=s.cssNumber,Q=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,C.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||A[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))},"css-number");var S,P,k,H,E=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&E.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return E.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&E.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):E.apply(this,arguments)},"data-camelCase"),s.fx&&(k=s.Tween.prototype.run,H=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=H),k.apply(this,arguments)},"easing-one-arg"),S=s.fx.interval,P="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",P),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){u("fx-interval",P),S=e}}));var M=s.fn.load,q=s.event.add,O=s.event.fix;s.event.props=[],s.event.fixHooks={}
2,r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=O.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),q.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?M.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s}); 3; 4(function(e){e.extend(e.easing,{def:"easeOutQuad",easeOutCubic:function(e,t,n,s,o){return s*((t=t/o-1)*t*t+1)+n}});var n=!1,o=!1,t={isUrl:function(e){var t=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return!!t.test(e)},loadContent:function(e,t){e.html(t)}
4,addPrefix:function(e){var n=e.attr("id"),t=e.attr("class");typeof n=="string"&&""!==n&&e.attr("id",n.replace(/([A-Za-z0-9_.-]+)/g,"sidr-id-$1")),typeof t=="string"&&""!==t&&"sidr-inner"!==t&&e.attr("class",t.replace(/([A-Za-z0-9_.-]+)/g,"sidr-class-$1")),e.removeAttr("style")},execute:function(t,i,a){typeof i=="function"?(a=i,i="sidr"):i||(i="sidr");var c,l,f,r=e("#"+i),d=e(r.data("body")),u=e("html"),h=r.outerWidth(!0),m=r.data("speed"),p=r.data("side");if("open"===t||"toogle"===t&&!r.is(":visible")){if(r.is(":visible")||n)return;if(o!==!1){s.close(o,function(){s.open(i)});return}n=!0,p==="left"?(c={left:h+"px"},l={left:"0px"}):(c={right:h+"px"},l={right:"0px"}),f=u.scrollTop(),u.css("overflow-x","hidden").scrollTop(f),d.css({width:d.width(),position:"absolute"}).animate(c,m,"easeOutCubic"),r.css("display","block").animate(l,m,"easeOutCubic",function(){n=!1,o=i,typeof a=="function"&&a(i)})}else{if(!r.is(":visible")||n)return;n=!0,p==="left"?(c={left:0},l={left:"-"+h+"px"}):(c={right:0},l={right:"-"+h+"px"}),f=u.scrollTop(),u.removeAttr("style").scrollTop(f),d.animate(c,m,"easeOutCubic"),r.animate(l,m,"easeOutCubic",function(){r.removeAttr("style"),d.removeAttr("style"),e("html").removeAttr("style"),n=!1,o=!1,typeof a=="function"&&a(i)})}}},s={open:function(e,n){t.execute("open",e,n)},close:function(e,n){t.execute("close",e,n)},toogle:function(e,n){t.execute("toogle",e,n)}};e.sidr=function(t){if(s[t])return s[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="function"||typeof t=="string"||!t)return s.toogle.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.sidr")},e.fn.sidr=function(n){var r,c,l,d,o=e.extend({name:"sidr",speed:200,side:"left",source:null,renaming:!0,body:"body"},n),a=o.name,i=e("#"+a);return i.length===0&&(i=e("<div />").attr("id",a).appendTo(e("body"))),i.addClass("sidr").addClass(o.side).data({speed:o.speed,side:o.side,body:o.body}),typeof o.source=="function"?(l=o.source(a),t.loadContent(i,l)):typeof o.source=="string"&&t.isUrl(o.source)?e.get(o.source,function(e){t.loadContent(i,e)}):typeof o.source=="string"?(r="",d=o.source.split(","),e.each(d,function(t,n){r+='<div class="sidr-inner">'+e(n).html()+"</div>"}),o.renaming&&(c=e("<div />").html(r),c.find("*").each(function(n,s){var o=e(s);t.addPrefix(o)}),r=c.html()),t.loadContent(i,r)):o.source!==null&&e.error("Invalid Sidr Source"),this.each(function(){var t=e(this),n=t.data("sidr");n||(t.data("sidr",a),t.click(function(e){e.preventDefault(),s.toogle(a)}))})}})(jQuery); 5/*! 6 7 * jQuery Validation Plugin v1.19.1 8 9 * 10 11 * https://jqueryvalidation.org/ 12 13 * 14 15 * Copyright (c) 2019 Jörn Zaefferer 16 17 * Released under the MIT license 18 19 */(function(e){typeof define=="function"&&define.amd?define(["jquery"],e):typeof module=="object"&&module.exports?module.exports=e(require("jquery")):e(jQuery)})(function(e){e.extend(e.fn,{validate:function(t){if(!this.length){t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.");return}var n=e.data(this[0],"validator");return n||(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.on("click.validate",":submit",function(t){n.submitButton=t.currentTarget,e(this).hasClass("cancel")&&(n.cancelSubmit=!0),e(this).attr("formnovalidate")!==0[0]&&(n.cancelSubmit=!0)}),this.on("submit.validate",function(t){n.settings.debug&&t.preventDefault();function s(){var s,o;return n.submitButton&&(n.settings.submitHandler||n.formSubmitted)&&(s=e("<input type='hidden'/>").attr("name",n.submitButton.name).val(e(n.submitButton).val()).appendTo(n.currentForm)),!n.settings.submitHandler||!!n.settings.debug||(o=n.settings.submitHandler.call(n,n.currentForm,t),s&&s.remove(),o!==0[0]&&o)}return n.cancelSubmit?(n.cancelSubmit=!1,s()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):s():(n.focusInvalid(),!1)})),n)},valid:function(){var t,n,s;return e(this[0]).is("form")?t=this.validate().form():(s=[],t=!0,n=e(this[0].form).validate(),this.each(function(){t=n.element(this)&&t,t||(s=s.concat(n.errorList))}),n.errorList=s),t},rules:function(t,n){var o,i,a,r,c,l,s=this[0],d=typeof this.attr("contenteditable")!="undefined"&&this.attr("contenteditable")!=="false";if(s==null)return;if(!s.form&&d&&(s.form=this.closest("form")[0],s.name=this.attr("name")),s.form==null)return;if(t)switch(a=e.data(s.form,"validator").settings,c=a.rules,i=e.validator.staticRules(s),t){case"add":e.extend(i,e.validator.normalizeRule(n)),delete i.messages,c[s.name]=i,n.messages&&(a.messages[s.name]=e.extend(a.messages[s.name],n.messages));break;case"remove":return n?(l={},e.each(n.split(/\s/),function(e,t){l[t]=i[t],delete i[t]}),l):(delete c[s.name],i)}return o=e.validator.normalizeRules(e.extend({},e.validator.classRules(s),e.validator.attributeRules(s),e.validator.dataRules(s),e.validator.staticRules(s)),s),o.required&&(r=o.required,delete o.required,o=e.extend({required:r},o)),o.remote&&(r=o.remote,delete o.remote,o=e.extend(o,{remote:r})),o}}),e.extend(e.expr.pseudos||e.expr[":"],{blank:function(t){return!e.trim(""+e(t).val())},filled:function(t){var n=e(t).val();return n!==null&&!!e.trim(""+n)},unchecked:function(t){return!e(t).prop("checked")}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return arguments.length===1?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:n===0[0]?t:(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return n})}),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.val
19idClass),this.hideThese(this.errorsFor(e)))},onfocusout:function(e){!this.checkable(e)&&(e.name in this.submitted||!this.optional(e))&&this.element(e)},onkeyup:function(t,n){var s=[16,17,18,20,35,36,37,38,39,40,45,144,225];if(n.which===9&&this.elementValue(t)===""||e.inArray(n.keyCode,s)!==-1)return;(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,s){t.type==="radio"?this.findByName(t.name).addClass(n).removeClass(s):e(t).addClass(n).removeClass(s)},unhighlight:function(t,n,s){t.type==="radio"?this.findByName(t.name).removeClass(n).addClass(s):e(t).removeClass(n).addClass(s)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}."),step:e.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var t,s=this.currentForm,o=this.groups={};e.each(this.settings.groups,function(t,n){typeof n=="string"&&(n=n.split(/\s/)),e.each(n,function(e,n){o[n]=t})}),t=this.settings.rules,e.each(t,function(n,s){t[n]=e.validator.normalizeRule(s)});function n(t){if(o=typeof e(this).attr("contenteditable")!="undefined"&&e(this).attr("contenteditable")!=="false",!this.form&&o&&(this.form=e(this).closest("form")[0],this.name=e(this).attr("name")),s!==this.form)return;var o,i=e.data(this.form,"validator"),a="on"+t.type.replace(/^validate/,""),n=i.settings;n[a]&&!e(this).is(n.ignore)&&n[a].call(i,this,t)}e(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",n).on("click.validate","select, option, [type='radio'], [type='checkbox']",n),this.settings.invalidHandler&&e(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){var a,r,s=this.clean(t),n=this.validationTargetFor(s),o=this,i=!0;return n===0[0]?delete this.invalid[s.name]:(this.prepareElement(n),this.currentElements=e(n),r=this.groups[n.name],r&&e.each(this.groups,function(e,t){t===r&&e!==n.name&&(s=o.validationTargetFor(o.clean(o.findByName(e))),s&&s.name in o.invalid&&(o.currentElements.push(s),i=o.check(s)&&i))}),a=this.check(n)!==!1,i=i&&a,a?this.invalid[n.name]=!1:this.invalid[n.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers
19)),this.showErrors(),e(t).attr("aria-invalid",!a)),i},showErrors:function(t){if(t){var n=this;e.extend(this.errorMap,t),this.errorList=e.map(this.errorMap,function(e,t){return{message:e,element:n.findByName(t)[0]}}),this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(e){var t;if(this.settings.unhighlight)for(t=0;e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,""),this.findByName(e[t].name).removeClass(this.settings.validClass);else e.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t,n=0;for(t in e)e[t]!==0[0]&&e[t]!==null&&e[t]!==!1&&n++;return n},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(e){e.not(this.containers).text(""),this.addWrapper(e).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch{}},findLastActive:function(){var t=this.lastActive;return t&&e.grep(this.errorList,function(e){return e.element.name===t.name}).length===1&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var s=this.name||e(this).attr("name"),o=typeof e(this).attr("contenteditable")!="undefined"&&e(this).attr("contenteditable")!=="false";return!s&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),o&&(this.form=e(this).closest("form")[0],this.name=s),this.form===t.currentForm&&!(s in n||!t.objectLength(e(this).rules()))&&(n[s]=!0,!0)})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return e(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([])},reset:function(){this.resetInternals(),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n,s,o=e(t),i=t.type,a=typeof o.attr("contenteditable")!="undefined"&&o.attr("contenteditable")!=="false";return i==="radio"||i==="checkbox"?this.findByName(t.name).filter(":checked").val():i==="number"&&typeof t.validity!="undefined"?t.validity.badInput?"NaN":o.val():(a?n=o.text():n=o.val(),i==="file"?n.substr(0,12)==="C:\\fakepath\\"?n.substr(12):(s=n.lastIndexOf("/"),s>=0?n.substr(s+1):(s=n.lastIndexOf("\\"),s>=0?n.substr(s+1):n)):typeof n=="string"?n.replace(/\r/g,""):n)},check:function(t){t=this.validationTargetFor(this.clean(t));var s,o,i,a,n=e(t).rules(),l=e.map(n,function(e,t){return t}).length,r=!1,c=this.elementValue(t);typeof n.normalizer=="function"?a=n.normalizer:typeof this.settings.normalizer=="function"&&(a=this.settings.normalizer),a&&(c=a.call(t,c),delete n.normalizer);for(i in n){s={method:i,parameters:n[i]};try{if(o=e.validator.methods[i].call(this,c,t,s.parameters),o==="dependency-mismatch"&&l===1){r=!0;continue}if(r=!1,o==="pending"){this.toHide=this.toHide.not(this.errorsFor(t));return}if(!o)return this.formatAndAdd(t,s),!1}catch(e){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+s.method+"' method.",e),e instanceof TypeError&&(e.message+=". Exception occurred when checking element "+t.id+", check the '"+s.method+"' method."),e}}if(r)return;return this.objectLength(n)&&this.successList.push(t),!0},customDataMessage:function(t,n){return e(t).data("msg"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase())||e(t).data("msg")},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==0[0])return arguments[e]},defaultMessage:function(t,n){typeof n=="string"&&(n={method:n});var s=this.findDefined(this.customMessage(t.name,n.method),this.customDataMessage(t,n.method),!this.settings.ignoreTitle&&t.title||0[0],e.validator.messages[n.method],"<strong>Warning: No message defined for "+t.name+"</strong>"),o=/\$?\{(\d+)\}/g;return typeof s=="function"?s=s.call(this,n.parameters,t):o.test(s)&&(s=e.validator.format(s.replace(o,"{$1}"),n.parameters)),s},formatAndAdd:function(e,t){var n=this.defaultMessage(e,t);this.errorList.push({message:n,element:e,method:t.method}),this.errorMap[e.name]=n,this.submitted[e.name]=n},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t,n;for(e=0;this.errorList[e];e++)t=this.errorList[e],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.val
19idClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,n=this.validElements();n[e];e++)this.settings.unhighlight.call(this,n[e],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var o,a,r,c,s=this.errorsFor(t),l=this.idOrName(t),i=e(t).attr("aria-describedby");s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(n)):(s=e("<"+this.settings.errorElement+">").attr("id",l+"-error").addClass(this.settings.errorClass).html(n||""),o=s,this.settings.wrapper&&(o=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(o):this.settings.errorPlacement?this.settings.errorPlacement.call(this,o,e(t)):o.insertAfter(t),s.is("label")?s.attr("for",l):s.parents("label[for='"+this.escapeCssMeta(l)+"']").length===0&&(a=s.attr("id"),i?i.match(new RegExp("\\b"+this.escapeCssMeta(a)+"\\b"))||(i+=" "+a):i=a,e(t).attr("aria-describedby",i),c=this.groups[t.name],c&&(r=this,e.each(r.groups,function(t,n){n===c&&e("[name='"+r.escapeCssMeta(t)+"']",r.currentForm).attr("aria-describedby",s.attr("id"))})))),!n&&this.settings.success&&(s.text(""),typeof this.settings.success=="string"?s.addClass(this.settings.success):this.settings.success(s,t)),this.toShow=this.toShow.add(s)},errorsFor:function(t){var s=this.escapeCssMeta(this.idOrName(t)),o=e(t).attr("aria-describedby"),n="label[for='"+s+"'], label[for='"+s+"'] *";return o&&(n=n+", #"+this.escapeCssMeta(o).replace(/\s+/g,", #")),this.errors().filter(n)},escapeCssMeta:function(e){return e.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name)),e(t).not(this.settings.ignore)[0]},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+this.escapeCssMeta(t)+"']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return!this.dependTypes[typeof e]||this.dependTypes[typeof e](e,t)},dependTypes:{boolean:function(e){return e},string:function(t,n){return!!e(t,n.form).length},function:function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,e(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],e(t).removeClass(this.settings.pendingClass),n&&this.pendingRequest===0&&this.formSubmitted&&this.form()?(e(this.currentForm).submit(),this.submitButton&&e("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!n&&this.pendingRequest===0&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t,n){return n=typeof n=="string"&&n||"remote",e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:n})})},destroy:function(){this.resetForm(),e(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("val
19idate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},s=e(t).attr("class");return s&&e.each(s.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])}),n},normalizeAttributeRule:function(e,t,n,s){/min|max|step/.test(n)&&(t===null||/number|range|text/.test(t))&&(s=Number(s),isNaN(s)&&(s=0[0])),s||s===0?e[n]=s:t===n&&t!=="range"&&(e[n]=!0)},attributeRules:function(t){var n,o,s={},i=e(t),a=t.getAttribute("type");for(o in e.validator.methods)o==="required"?(n=t.getAttribute(o),n===""&&(n=!0),n=!!n):n=i.attr(o),this.normalizeAttributeRule(s,a,o,n);return s.maxlength&&/-1|2147483647|524288/.test(s.maxlength)&&delete s.maxlength,s},dataRules:function(t){var n,s,o={},i=e(t),a=t.getAttribute("type");for(n in e.validator.methods)s=i.data("rule"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase()),s===""&&(s=!0),this.normalizeAttributeRule(o,a,n,s);return o},staticRules:function(t){var n={},s=e.data(t.form,"validator");return s.settings.rules&&(n=e.validator.normalizeRule(s.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,function(s,o){if(o===!1){delete t[s];return}if(o.param||o.depends){var i=!0;switch(typeof o.depends){case"string":i=!!e(o.depends,n.form).length;break;case"function":i=o.depends.call(n,n);break}i?t[s]=o.param===0[0]||o.param:(e.data(n.form,"validator").resetElements(e(n)),delete t[s])}}),e.each(t,function(s,o){t[s]=e.isFunction(o)&&s!=="normalizer"?o(n):o}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength","range"],function(){var n;t[this]&&(e.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:typeof t[this]=="string"&&(n=t[this].replace(/[[\]]/g,"").split(/[\s,]+/),t[this]=[Number(n[0]),Number(n[1])]))}),e.validator.autoCreateRanges&&(t.min!=null&&t.max!=null&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength!=null&&t.maxlength!=null&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if(typeof t=="string"){var n={};e.each(t.split(/\s/),function(){n[this]=!0}),t=n}return t},addMethod:function(t,n,s){e.validator.methods[t]=n,e.validator.messages[t]=s!==0[0]?s:e.validator.messages[t],n.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,s){if(!this.depend(s,n))return"dependency-mismatch";if(n.nodeName.toLowerCase()==="select"){var o=e(n).val();return o&&o.length>0}return this.checkable(n)?this.getLength(t,n)>0:t!=null&&t.length>0},email:function(e,t){return this.optional(t)||/^[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])?)*$/.test(e)},url:function(e,t){return this.optional(t)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)},date:function(){var e=!1;return function(t,n){return e||(e=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(n)||!/Invalid|NaN/.test(new Date(t).toString())}}(),dateISO:function(e,t){return this.optional(t)||/^\d{4}[/-](0?[1-9]|1[012])[/-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},number:function(e,t){return this.optional(t)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},minlength:function(t,n,s){var o=e.isArray(t)?t.length:this.getLength(t,n);return this.optional(n)||o>=s},maxlength:function(t,n,s){var o=e.isArray(t)?t.length:this.getLength(t,n);return this.optional(n)||o<=s},rangelength:function(t,n,s){var o=e.isArray(t)?t.length:this.getLength(t,n);return this.optional(n)||o>=s[0]&&o<=s[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||e<=n},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},step:function(t,n,s){var i,o=e(n).attr("type"),l="Step attribute on input type "+o+" is not supported.",d=["text","number","range"],u=new RegExp("\\b"+o+"\\b"),h=o&&!u.test(d.join()),a=function(e){var t=(""+e).match(/(?:\.(\d+))?$/);return t?t[1]?t[1].length:0:0},r=function(e){return Math.round(e*10**i)},c=!0;if(h)throw new Error(l);return i=a(s),(a(t)>i||r(t)%r(s)!==0)&&(c=!1),this.optional(n)||c},equalTo:function(t,n,s){var o=e(s);return this.settings.onfocusout&&o.not(".validate-equalTo-blur").length&&o.addClass("val
19idate-equalTo-blur").on("blur.validate-equalTo",function(){e(n).valid()}),t===o.val()},remote:function(t,n,s,o){if(this.optional(n))return"dependency-mismatch";o=typeof o=="string"&&o||"remote";var i,r,c,a=this.previousValue(n,o);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),a.originalMessage=a.originalMessage||this.settings.messages[n.name][o],this.settings.messages[n.name][o]=a.message,s=typeof s=="string"&&{url:s}||s,c=e.param(e.extend({data:t},s.data)),a.old===c?a.valid:(a.old=c,i=this,this.startRequest(n),r={},r[n.name]=t,e.ajax(e.extend(!0,{mode:"abort",port:"validate"+n.name,dataType:"json",data:r,context:i.currentForm,success:function(e){var r,c,l,s=e===!0||e==="true";i.settings.messages[n.name][o]=a.originalMessage,s?(l=i.formSubmitted,i.resetInternals(),i.toHide=i.errorsFor(n),i.formSubmitted=l,i.successList.push(n),i.invalid[n.name]=!1,i.showErrors()):(r={},c=e||i.defaultMessage(n,{method:o,parameters:t}),r[n.name]=a.message=c,i.invalid[n.name]=!0,i.showErrors(r)),a.valid=s,i.stopRequest(n,s)}},s)),"pending")}}});var n,t={};return e.ajaxPrefilter?e.ajaxPrefilter(function(e,n,s){var o=e.port;e.mode==="abort"&&(t[o]&&t[o].abort(),t[o]=s)}):(n=e.ajax,e.ajax=function(s){var i=("mode"in s?s:e.ajaxSettings).mode,o=("port"in s?s:e.ajaxSettings).port;return i==="abort"?(t[o]&&t[o].abort(),t[o]=n.apply(this,arguments),t[o]):n.apply(this,arguments)}),e}); 20(function(e){e().ready(function(){var n=e("#auth_token").val();e.ajax({url:"https://leadmanagersystem.com/inc/getFormData.php",type:"POST",dataType:"JSON",data:{auth_token:n},success:function(t){t&&(e("#lms_form").attr("form-name")=="lms_form"&&(e("#gender").val()==null&&t.default_gender&&setTimeout(function(){e("#gender option[value="+t.default_gender+"]").attr("selected","selected")},300),e("#age").attr("min").length==0&&e("#age").attr("max").length!=0&&t.from_age?(e("#age").attr("min",t.from_age),e("#ageError").text("Ages: "+t.from_age+"-"+e("#age").attr("max")+"yrs")):e("#age").attr("min").length!=0&&e("#age").attr("max").length==0&&t.to_age?(e("#age").attr("max",t.to_age),e("#ageError").text("Ages: "+e("#age").attr("min")+"-"+t.to_age+"yrs")):e("#age").attr("min").length==0&&e("#age").attr("max").length==0&&(e("#age").attr("min",t.from_age),e("#age").attr("max",t.to_age),e("#ageError").text("Ages: "+t.from_age+"-"+t.to_age+"yrs"))),(e("#thankyoupage").val()==null||e("#thankyoupage").val().length==0&&t.redirect_url)&&e("#thankyoupage").val(t.redirect_url))}}),e(".phone_format").mask("(999)999-9999"),e(".phone_format").keypress(function(e){if(e.which!=8&&e.which!=0&&(e.which<48||e.which>57))return!1}),e.validator.addMethod("validate_email",function(e){return!!/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)},"Please enter a valid Email."),e("#lms_form").validate({ignore:"",rules:{firstname:"required",lastname:"required",email:{required:!0,email:!0,validate_email:!0},primary_phone:{required:{depends:function(){return e(this).val(e.trim(e(this).val())),e(this).val(e(this).val().replace(/^0+/,"")),!0}},minlength:13}},messages:{firstname:"Field is required",lastname:"Field is required",email:"Valid email is required",primary_phone:"Valid Phone number is required"},submitHandler:function(){t(1)}}),e("#lms_sidebar_form").validate({ignore:"",rules:{firstname:"required",lastname:"required",email:{required:!0,email:!0,validate_email:!0},primary_phone:{required:{depends:function(){return e(this).val(e.trim(e(this).val())),e(this).val(e(this).val().replace(/^0+/,"")),!0}},minlength:13}},messages:{firstname:"Field is required",lastname:"Field is required",email:"Valid email is required",primary_phone:"Valid Phone number is required"},submitHandler:function(){t(2)}})});function t(t){localStorage.lmsemail=e("#email").val();var r,i=e("#lms_form"),a=e("#lms_submitDiv"),s=e("#lms_spinnerDisplay"),o=e("#lms_alertDisplay");t==2?(i=e("#lms_sidebar_form"),r=i.serialize(),a=e("#lms_submitDiv2"),s=e("#lms_spinnerDisplay2"),o=e("#lms_alertDisplay2")):r=i.serialize(),a.hide(),s.fadeIn("slow"),e.ajax({url:"https://leadmanagersystem.com/inc/formSubmit.php",type:"POST",dataType:"JSON",data:r,success:function(r){if(r.status=="error")if(r.msg=="invalid_token"){var c,d,l='<div class="lms-alert-danger"><strong>Invald Token!</strong> Authorization Failed. Please refresh the page</div>';s.fadeOut(),o.html(l),o.fadeIn("slow")}else d=r.msg,s.fadeOut(),a.show();else n(t),i.trigger("reset"),c="Your inquiry has been submitted. Please watch for an email.",r.thankyou_message&&(c=r.thankyou_message,c=c.replace(/\n/g,"<br>")),r.inq_conv_iframe_script&&e("body").append(r.inq_conv_iframe_script),r.saleconv_script&&e("body").append(r.saleconv_script),r.redirect_url!=""?top.window.location.href=r.redirect_url:(s.fadeOut("slow"),l='<div class="lms-alert-success"><strong>Thank You!</strong> '+c+"</div>",o.html(l),o.fadeIn("slow"),setTimeout(function(){a.show()},1500))}})}function n(t){var s,o,n="";return t==2?n=e("#lms_sidebar_form").find("#thankyoupage").val():n=e("#lms_form").find("#thankyoupage").val(),n!=""&&(s=n.search("https://"),o=n.search("http://"),s!=-1||o!=-1?top.window.location.href=n:top.window.location.href="http://"+n),!0}})(jQuery); 21// jQuery Mask Plugin v1.14.15 22 23// github.com/igorescobar/jQuery-Mask-Plugin 24 25var $jscomp={scope:{},findInternal:function(a,l,d){a instanceof String&&(a=String(a));for(var p=a.length,h=0;h<p;h++){var b=a[h];if(l.call(d,b,h,a))return{i:h,v:b}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,l,d){if(d.get||d.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[l]=d.value)}; 26 27$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,l,d,p){if(l){d=$jscomp.global;a=a.split(".");for(p=0;p<a.length-1;p++){var h=a[p];h in d||(d[h]={});d=d[h]}a=a[a.length-1];p=d[a];l=l(p);l!=p&&null!=l&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:l})}}; 28 29$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6-impl","es3"); 30 31(function(a,l,d){"function"===typeof define&&define.amd?define(["jquery"],a):"object"===typeof exports?module.exports=a(require("jquery")):a(l||d)})(function(a){var l=function(b,e,f){var c={invalid:[],getCaret:function(){try{var a,r=0,g=b.get(0),e=document.selection,f=g.selectionStart;if(e&&-1===navigator.appVersion.indexOf("MSIE 10"))a=e.createRange(),a.moveStart("character",-c.val().length),r=a.text.length;else if(f||"0"===f)r=f;return r}catch(C){}},setCaret:function(a){try{if(b.is(":focus")){var c, 32 33g=b.get(0);g.setSelectionRange?g.setSelectionRange(a,a):(c=g.createTextRange(),c.collapse(!0),c.moveEnd("character",a),c.moveStart("character",a),c.select())}}catch(B){}}
vendor: 3,404 bytes, lines 33-47
33,events:function(){b.on("keydown.mask",function(a){b.data("mask-keycode",a.keyCode||a.which);b.data("mask-previus-value",b.val());b.data("mask-previus-caret-pos",c.getCaret());c.maskDigitPosMapOld=c.maskDigitPosMap}).on(a.jMaskGlobals.useInput?"input.mask":"keyup.mask",c.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){b.keydown().keyup()}, 34 35100)}).on("change.mask",function(){b.data("changed",!0)}).on("blur.mask",function(){d===c.val()||b.data("changed")||b.trigger("change");b.data("changed",!1)}).on("blur.mask",function(){d=c.val()}).on("focus.mask",function(b){!0===f.selectOnFocus&&a(b.target).select()}).on("focusout.mask",function(){f.clearIfNotMatch&&!h.test(c.val())&&c.val("")})},getRegexMask:function(){for(var a=[],b,c,f,n,d=0;d<e.length;d++)(b=m.translation[e.charAt(d)])?(c=b.pattern.toString().replace(/.{1}$|^.{1}/g,""),f=b.optional, 36 37(b=b.recursive)?(a.push(e.charAt(d)),n={digit:e.charAt(d),pattern:c}):a.push(f||b?c+"?":c)):a.push(e.charAt(d).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));a=a.join("");n&&(a=a.replace(new RegExp("("+n.digit+"(.*"+n.digit+")?)"),"($1)?").replace(new RegExp(n.digit,"g"),n.pattern));return new RegExp(a)},destroyEvents:function(){b.off("input keydown keyup paste drop blur focusout ".split(" ").join(".mask "))},val:function(a){var c=b.is("input")?"val":"text";if(0<arguments.length){if(b[c]()!==a)b[c](a); 38 39c=b}else c=b[c]();return c},calculateCaretPosition:function(){var a=b.data("mask-previus-value")||"",e=c.getMasked(),g=c.getCaret();if(a!==e){var f=b.data("mask-previus-caret-pos")||0,e=e.length,d=a.length,m=a=0,h=0,l=0,k;for(k=g;k<e&&c.maskDigitPosMap[k];k++)m++;for(k=g-1;0<=k&&c.maskDigitPosMap[k];k--)a++;for(k=g-1;0<=k;k--)c.maskDigitPosMap[k]&&h++;for(k=f-1;0<=k;k--)c.maskDigitPosMapOld[k]&&l++;g>d?g=10*e:f>=g&&f!==d?c.maskDigitPosMapOld[g]||(f=g,g=g-(l-h)-a,c.maskDigitPosMap[g]&&(g=f)):g>f&& 40 41(g=g+(h-l)+m)}return g},behaviour:function(f){f=f||window.event;c.invalid=[];var e=b.data("mask-keycode");if(-1===a.inArray(e,m.byPassKeys)){var e=c.getMasked(),g=c.getCaret();setTimeout(function(){c.setCaret(c.calculateCaretPosition())},a.jMaskGlobals.keyStrokeCompensation);c.val(e);c.setCaret(g);return c.callbacks(f)}},getMasked:function(a,b){var g=[],d=void 0===b?c.val():b+"",n=0,h=e.length,q=0,l=d.length,k=1,r="push",p=-1,t=0,y=[],v,z;f.reverse?(r="unshift",k=-1,v=0,n=h-1,q=l-1,z=function(){return-1< 42 43n&&-1<q}):(v=h-1,z=function(){return n<h&&q<l});for(var A;z();){var x=e.charAt(n),w=d.charAt(q),u=m.translation[x];if(u)w.match(u.pattern)?(g[r](w),u.recursive&&(-1===p?p=n:n===v&&n!==p&&(n=p-k),v===p&&(n-=k)),n+=k):w===A?(t--,A=void 0):u.optional?(n+=k,q-=k):u.fallback?(g[r](u.fallback),n+=k,q-=k):c.invalid.push({p:q,v:w,e:u.pattern}),q+=k;else{if(!a)g[r](x);w===x?(y.push(q),q+=k):(A=x,y.push(q+t),t++);n+=k}}d=e.charAt(v);h!==l+1||m.translation[d]||g.push(d);g=g.join("");c.mapMaskdigitPositions(g, 44 45y,l);return g},mapMaskdigitPositions:function(a,b,e){a=f.reverse?a.length-e:0;c.maskDigitPosMap={};for(e=0;e<b.length;e++)c.maskDigitPosMap[b[e]+a]=1},callbacks:function(a){var h=c.val(),g=h!==d,m=[h,a,b,f],q=function(a,b,c){"function"===typeof f[a]&&b&&f[a].apply(this,c)};q("onChange",!0===g,m);q("onKeyPress",!0===g,m);q("onComplete",h.length===e.length,m);q("onInvalid",0<c.invalid.length,[h,a,b,c.invalid,f])}};b=a(b);var m=this,d=c.val(),h;e="function"===typeof e?e(c.val(),void 0,b,f):e;m.mask= 46 47e;
47m.options=f;m.remove=function(){var a=c.getCaret();m.options.placeholder&&b.removeAttr("placeholder");b.data("mask-maxlength")&&b.removeAttr("maxlength");c.destroyEvents();c.val(m.getCleanVal());c.setCaret(a);return b};m.getCleanVal=function(){return c.getMasked(!0)};m.getMaskedVal=function(a){return c.getMasked(!1,a)};m.init=function(d){d=d||!1;f=f||{};m.clearIfNotMatch=a.jMaskGlobals.clearIfNotMatch;m.byPassKeys=a.jMaskGlobals.byPassKeys;m.translation=a.extend({},a.jMaskGlobals.translation,f.translation); 48 49m=a.extend(!0,{},m,f);h=c.getRegexMask();if(d)c.events(),c.val(c.getMasked());else{f.placeholder&&b.attr("placeholder",f.placeholder);b.data("mask")&&b.attr("autocomplete","off");d=0;for(var l=!0;d<e.length;d++){var g=m.translation[e.charAt(d)];if(g&&g.recursive){l=!1;break}}l&&b.attr("maxlength",e.length).data("mask-maxlength",!0);c.destroyEvents();c.events();d=c.getCaret();c.val(c.getMasked());c.setCaret(d)}};m.init(!b.is("input"))};a.maskWatchers={};var d=function(){var b=a(this),e={},f=b.attr("data-mask"); 50 51b.attr("data-mask-reverse")&&(e.reverse=!0);b.attr("data-mask-clearifnotmatch")&&(e.clearIfNotMatch=!0);"true"===b.attr("data-mask-selectonfocus")&&(e.selectOnFocus=!0);if(p(b,f,e))return b.data("mask",new l(this,f,e))},p=function(b,e,f){f=f||{};var c=a(b).data("mask"),d=JSON.stringify;b=a(b).val()||a(b).text();try{return"function"===typeof e&&(e=e(b)),"object"!==typeof c||d(c.options)!==d(f)||c.mask!==e}catch(t){}},h=function(a){var b=document.createElement("div"),d;a="on"+a;d=a in b;d||(b.setAttribute(a, 52 53"return;"),d="function"===typeof b[a]);return d};a.fn.mask=function(b,d){d=d||{};var e=this.selector,c=a.jMaskGlobals,h=c.watchInterval,c=d.watchInputs||c.watchInputs,t=function(){if(p(this,b,d))return a(this).data("mask",new l(this,b,d))};a(this).each(t);e&&""!==e&&c&&(clearInterval(a.maskWatchers[e]),a.maskWatchers[e]=setInterval(function(){a(document).find(e).each(t)},h));return this};a.fn.masked=function(a){return this.data("mask").getMaskedVal(a)};a.fn.unmask=function(){clearInterval(a.maskWatchers[this.selector]); 54 55delete a.maskWatchers[this.selector];return this.each(function(){var b=a(this).data("mask");b&&b.remove().removeData("mask")})};a.fn.cleanVal=function(){return this.data("mask").getCleanVal()};a.applyDataMask=function(b){b=b||a.jMaskGlobals.maskElements;(b instanceof a?b:a(b)).filter(a.jMaskGlobals.dataMaskAttr).each(d)};h={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&& 56 57h("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};a.jMaskGlobals=a.jMaskGlobals||{};h=a.jMaskGlobals=a.extend(!0,{},h,a.jMaskGlobals);h.dataMask&&a.applyDataMask();setInterval(function(){a.jMaskGlobals.watchDataMask&&a.applyDataMask()},h.watchInterval)},window.jQuery,window.Zepto);; 58!(function(){"use strict";var g=function(i,o){for(var a=0;a<i.length;a++)o(i[a])},b=Object.assign||function(i){for(var o,a=1,u=arguments.length;a<u;a++){o=arguments[a];for(var v in o)Object.prototype.hasOwnProperty.call(o,v)&&(i[v]=o[v])}return i},s=window.document.currentScript,y=s.getAttribute("data-instance")||"AhrefsAnalytics";if(window[y]!==void 0){console.warn("".concat(y," script is already initialized, exiting... Did you install it twice? Please fix."));return}var E=s.getAttribute("data-api")||new URL(s.src).origin+"/api/event",_=s.getAttribute("data-error")||new URL(s.src).origin+"/api/error",V=s.getAttribute("data-track-visibility")!=null,z=s.getAttribute("data-no-pageview-on-load")!=null,F=s.getAttribute("data-no-pageview-auto")!=null,S=window.location;function J(){try{var i=s.getAttribute("data-page-location");return i==null||i===""?S:i.startsWith("/")?new URL(i,S.origin):new URL(i)}catch(o){}return S}function K(i,o,a){var u=new XMLHttpRequest;u.open("POST",i,!0),u.setRequestHeader("Content-Type","text/plain"),u.send(o),u.onreadystatechange=function(){u.readyState===4&&a!=null&&a()}}function f(i){try{i()}catch(a){if(a instanceof Error)K(_,JSON.stringify({message:a.message,stack:a.stack}));else{var o="cannot-stringify-error";try{o=String(a)}catch(u){}K(_,JSON.stringify({message:o,stack:null}))}throw a}}function G(i){document.readyState==="loading"?window.addEventListener("DOMContentLoaded",function(){f(function(){return i()})}):i()}f(function(){function i(t,e){t&&console.warn("Ignoring Event: "+t),e&&e.callback&&e.callback()}function o(t,e){var n=J();if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(n.hostname)||n.protocol==="file:")return i("localhost",e);if((window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)&&!window.__web_analytics)return i(null,e);var r=s.getAttribute("data-key"),c=s.getAttribute("data-domain");if(r==null&&c==null)return i("missing data-key",e);var d;try{d=window.navigator.languages||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage||window.navigator.systemLanguage}catch(m){}var p={},X=!1;try{for(var C=0;C<s.attributes.length;C++){var R=s.attributes[C];if(R.name.startsWith("data-prop-")){var I=R.name.substring(10),$=R.value;I&&$&&(p[I]=$,X=!0)}}}catch(m){}var N=null;try{N=document.title}catch(m){}var l={};l.n=t,l.u=n.href,d!=null&&(l.l=d),c!=null&&(l.d=c),r!=null&&(l.k=r),l.r=window.document.referrer||null,e&&e.meta&&(l.m=JSON.stringify(e.meta)),(e&&e.props||X)&&(l.p=JSON.stringify(b({},p,e==null?void 0:e.props)));var M;try{M=window.screen.width}catch(m){}M!=null&&(l.sw=M);var H;try{H=window.screen.height}catch(m){}H!=null&&(l.sh=H);var T;try{T=window.devicePixelRatio}catch(m){}return T!=null&&(l.sr=T),N!=null&&(l.t=N),l}function a(t,e){var n=o(t,e);if(n!=null){var r=new XMLHttpRequest;r.open("POST",E,!0),r.setRequestHeader("Content-Type","text/plain"),r.send(JSON.stringify(n)),r.onreadystatechange=function(){r.readyState===4&&e&&e.callback&&e.callback({status:r.status})}}}function u(t,e){var n=navigator.sendBeacon!=null,r=o(t,e);if(r!=null){var c=JSON.stringify(r);
58if(n){var d=new Blob([c],{type:"text/plain"});navigator.sendBeacon(E,d)}else{var p=new XMLHttpRequest;p.open("POST",E,!0),p.setRequestHeader("Content-Type","text/plain"),p.send(c)}}}window[y]={sendEvent:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];f(function(){a.apply(void 0,t)})}};var v;function h(){f(function(){var t=J();v!==t.href&&(v=t.href,a("pageview"))})}if(!F){var A=window.history;if(A.pushState){var Q=A.pushState;A.pushState=function(){Q.apply(this,arguments),h()},window.addEventListener("popstate",h)}z||(window.document.visibilityState==="prerender"?window.document.addEventListener("visibilitychange",function(){v||window.document.visibilityState!=="visible"||h()}):h())}V&&(document.addEventListener("visibilitychange",function(){f(function(){if(v==null){var t=document.visibilityState;t==="hidden"?u("x-visibilitychange-hidden"):t==="visible"&&u("x-visibilitychange-visible")}})}),document.addEventListener("pagehide",function(){f(function(){return u("x-pagehide")})}));var U=/\bAhrefsAnalytics\-prop\-([^\s\-]+)\-([^\s]+)/g;function L(t){if(t){var e=t.className;if(e){var n={};U.lastIndex=0;for(var r=null;r=U.exec(e);){var c=r[1],d=r[2];!c||!d||(n[c]=d)}if(Object.keys(n).length!==0)return n}}}function Y(t,e){if(!(e!=null&&e.defaultPrevented)&&!(e!=null&&e.type==="auxclick"&&e.button!==1)&&t&&t.href&&!(t.protocol==="data:"||t.protocol==="blob:"||t.protocol==="javascript:")){var n=L(t);u("x-link-click",{props:b({},n,{href:t.href}),meta:{metaKey:String(!!(e!=null&&e.metaKey)),ctrlKey:String(!!(e!=null&&e.ctrlKey)),shiftKey:String(!!(e!=null&&e.shiftKey))}})}}function Z(t){return!!t&&t instanceof HTMLAnchorElement&&!!t.href}function tt(t,e){if(!(e!=null&&e.defaultPrevented)&&t&&t.action){var n=L(t);u("x-form-submit",{props:b({},n,{action:t.action})})}}function j(t){return!!t&&t instanceof HTMLFormElement&&!!t.action}function B(t,e){var n=L(e);u(t,{props:n})}var W='*[class^="AhrefsAnalytics-event-"]',D=/\bAhrefsAnalytics\-event\-([^\s]+)/g;function k(t){if(!t||!(t instanceof HTMLElement)||!t.className)return[];var e=null,n=[];for(D.lastIndex=0;e=D.exec(t.className);){var r=e[1];r&&n.push(r)}return n}function et(t){return k(t).length>0}if(window.MutationObserver!=null){var O=function(t){if(!t.ahrefsAnalytics_click_tracked){t.ahrefsWebAnalytics_click_tracked=!0;var e=function(n){return f(function(){return Y(t,n)})};t.addEventListener("click",e),t.addEventListener("auxclick",e)}},x=function(t){if(!t.ahrefsAnalytics_submit_tracked){t.ahrefsWebAnalytics_submit_tracked=!0;var e=function(n){return f(function(){tt(t,n);for(var r=0,c=k(t);r<c.length;r++){var d=c[r];B(d,t)}})};t.addEventListener("submit",e)}},P=function(t){if(!j(t)&&!t.ahrefsAnalytics_event_tracked){t.ahrefsWebAnalytics_event_tracked=!0;var e=function(){f(function(){for(var n=0,r=k(t);n<r.length;n++){var c=r[n];B(c,t)}})};t.addEventListener("click",e)}},nt=new MutationObserver(function(t){f(function(){t.forEach(function(e){e.type==="childList"&&g(e.addedNodes,function(n){n.nodeType===Node.ELEMENT_NODE&&(Z(n)?O(n):n.querySelectorAll!=null&&g(n.querySelectorAll("a"),O),j(n)?x(n):n.querySelectorAll!=null&&g(n.querySelectorAll("form"),x),et(n)?P(n):n.querySelectorAll!=null&&g(n.querySelectorAll(W),P))})})})});G(function(){g(document.querySelectorAll("a"),O),g(document.querySelectorAll("form"),x),g(document.querySelectorAll(W),P),nt.observe(document.body,{childList:!0,subtree:!0})})}{var w=void 0,q=y+"-ready";typeof CustomEvent=="function"?w=new CustomEvent(q,{detail:null,bubbles:!0,cancelable:!0}):typeof document!="undefined"&&document.createEvent&&(w=document.createEvent("CustomEvent"),w.initCustomEvent(q,!0,!0,null)),w!=null&&typeof document!="undefined"&&(document.dispatchEvent?document.dispatchEvent(w):"fireEvent"in document&&document.fireEvent("on"+q,w))}})})(); 59; 60/*! 61 * Chart.js 62 * http://chartjs.org/ 63 * Version: 1.0.2 64 * 65 * Copyright 2015 Nick Downie 66 * Released under the MIT license 67 * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md 68 */ 69(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;var i=function(t,i){return t["offset"+i]?t["offset"+i]:document.defaultView.getComputedStyle(t).getPropertyValue(i)},e=this.width=i(t.canvas,"Width"),n=this.height=i(t.canvas,"Height");t.canvas.width=e,t.canvas.height=n;var e=this.width=t.canvas.width,n=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>
69",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n<t.length;n++)i.apply(e,[t[n],n].concat(s))}else for(var o in t)i.apply(e,[t[o],o].concat(s))},o=s.clone=function(t){var i={};return n(t,function(e,s){t.hasOwnProperty(s)&&(i[s]=e)}),i},a=s.extend=function(t){return n(Array.prototype.slice.call(arguments,1),function(i){n(i,function(e,s){i.hasOwnProperty(s)&&(t[s]=e)})}),t},h=s.merge=function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift({}),a.apply(null,t)},l=s.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},r=(s.where=function(t,i){var e=[];return s.each(t,function(t){i(t)&&e.push(t)}),e},s.findNextWhere=function(t,i,e){e||(e=-1);for(var s=e+1;s<t.length;s++){var n=t[s];if(i(n))return n}},s.findPreviousWhere=function(t,i,e){e||(e=t.length);for(var s=e-1;s>=0;s--){var n=t[s];if(i(n))return n}},s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e}),c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof define&&define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),S=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),y=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),C=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=y(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),S=Math.round(f/v);(S>a||a>2*S)&&!h;)if(S>a)v*=2,S=Math.round(f/v),S%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,S=Math.round(f/v)}else v/=2,S=Math.round(f/v);return h&&(S=o,v=f/S),{steps:S,stepValue:v,min:p,max:p+S*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}if(t instanceof Function)return t(i);var s={};return e(t,i)}),w=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=C(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),-(s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)))},easeOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),s*Math.pow(2,-10*t)*Math.sin(2*(1*t-i)*Math.PI/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:2==(t/=.5)?1:(e||(e=.3*1.5),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),1>t?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-w.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*w.easeInBounce(2*t):.5*w.easeOutBounce(2*t-1)+.5}}),b=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),L=(s.animationLoop=function(t,i,e,s,n,o){var a=0,h=w[e]||w.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=b(l):n.apply(o)};b(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),k=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},F=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},L(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){k(t.chart.canvas,e,i)})}),R=s.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},T=s.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))}),M=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},W=s.fontString=function(t,i,e){return i+" "+t+"px "+e},z=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},B=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e
69+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return M(this.chart),this},stop:function(){return P(this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=R(this.chart.canvas),s=this.options.maintainAspectRatio?e/this.chart.aspectRatio:T(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=s,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return C(this.options.legendTemplate,this)},destroy:function(){this.clear(),F(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,t[h]&&t[h].hasValue()&&a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:C(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,i){var e=s.getAngleFromPoint(this,{x:t,y:i}),n=e.angle>=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,
69i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}B(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=W(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=z(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{B(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?z(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),t<this.yLabelWidth&&this.calculateXLabelRotation()}
69,calculateXLabelRotation:function(){this.ctx.font=this.font;var t,i,e=this.ctx.measureText(this.xLabels[0]).width,s=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=s/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=z(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(S(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(S(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a),l=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),0!==o||l||(l=!0),l&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),l&&(t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+x(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==e||a||(a=!0),a&&t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*S(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;i<this.valuesCount;i++)t=this.getPointPosition(i,d),e=this.ctx.measureText(C(this.templateString,{value:this.labels[i]})).width+5,0===i||i===this.valuesCount/2?(s=e/2,t.x+s>p&&(p=t.x+s,n=i),t.x-s<g&&(g=t.x-s,a=i)):i<this.valuesCount/2?t.x+e>p&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e<g&&(g=t.x-e,a=i);l=g,r=Math.ceil(p-this.width),o=this.getIndexAngle(n),h=this.getIndexAngle(a),c=r/Math.sin(o+Math.PI/2),u=l/Math.sin(h+Math.PI/2),c=f(c)?c:0,u=f(u)?u:0,this.drawingArea=d-(u+c)/2,this.setCenterPoint(u,c)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,s=t+this.drawingArea;this.xCenter=(s+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=2*Math.PI/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(n(this.yLabels,function(i,e){if(e>0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)s=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(s.x,s.y):t.lineTo(s.x,s.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=t.measureText(i).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-h/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(i,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.bars.push(new this.BarClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)}
69,this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<this.datasets.length;a++)for(i=0;i<this.datasets[a].bars.length;i++)if(this.datasets[a].bars[i].inRange(n.x,n.y))return e.each(this.datasets,o),s;return s},buildScale:function(t){var i=this,s=function(){var t=[];return i.eachBars(function(i){t.push(i.value)}),t},n={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(s(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(n,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(n)},addData:function(t,i){e.each(t,function(t,e){this.datasets[e].bars.push(new this.BarClass({value:t,label:i,x:this.scale.calculateBarX(this.datasets.length,e,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[e].strokeColor,fillColor:this.datasets[e].fillColor})) 70},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t,s){e.each(t.bars,function(t,e){t.hasValue()&&(t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,s,e),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)},i).draw())},this)},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.get
70SegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle)},this)}}),i.types.Doughnut.extend({name:"Pie",defaults:e.merge(s,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,i){e.extend(t,{x:this.scale.calculateX(i),y:this.scale.endPoint}),t.save()},this)},this),this.render()}
70,update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.datasets,function(t){e.each(t.points,function(t){t.inRange(s.x,s.y)&&i.push(t)})},this),i},buildScale:function(t){var s=this,n=function(){var t=[];return s.eachPoints(function(i){t.push(i.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(n(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(o,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new i.Scale(o)},addData:function(t,i){e.each(t,function(t,e){this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();var s=this.chart.ctx,n=function(t){return null!==t.value},o=function(t,i,s){return e.findNextWhere(i,n,s)||t},a=function(t,i,s){return e.findPreviousWhere(i,n,s)||t};this.scale.draw(i),e.each(this.datasets,function(t){var h=e.where(t.points,n);e.each(t.points,function(t,e){t.hasValue()&&t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(e)},i)},this),this.options.bezierCurve&&e.each(h,function(t,i){var s=i>0&&i<h.length-1?this.options.bezierCurveTension:0;t.controlPoints=e.splineCurve(a(t,h,i),t,o(t,h,i),s),t.controlPoints.outer.y>this.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.y<this.scale.startPoint&&(t.controlPoints.outer.y=this.scale.startPoint),t.controlPoints.inner.y>this.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y<this.scale.startPoint&&(t.controlPoints.inner.y=this.scale.startPoint)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(h,function(t,i){if(0===i)s.moveTo(t.x,t.y);else if(this.options.bezierCurve){var e=a(t,h,i);s.bezierCurveTo(e.controlPoints.outer.x,e.controlPoints.outer.y,t.controlPoints.inner.x,t.controlPoints.inner.y,t.x,t.y)}else s.lineTo(t.x,t.y)},this),s.stroke(),this.options.datasetFill&&h.length>0&&(s.lineTo(h[h.length-1].x,this.scale.endPoint),s.lineTo(h[0].x,this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(h,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}
70),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers;i.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){var o;this.scale.animation||(o=this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e))),s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,e){var s=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:s.x,y:s.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this);; 71/* 72 * jQuery OwlCarousel v1.31 73 * 74 * Copyright (c) 2013 Bartosz Wojciechowski 75 * http://www.owlgraphic.com/owlcarousel/ 76 * 77 * Licensed under MIT 78 * 79 */ 80 81if ( typeof Object.create !== "function" ) { 82 Object.create = function( obj ) { 83 function F() {}; 84 F.prototype = obj; 85 return new F(); 86 }; 87} 88(function( $, window, document, undefined ) { 89 90 var Carousel = { 91 init :function(options, el){ 92 var base = this; 93 94 base.$elem = $(el); 95 96 // options passed via js override options passed via data attributes 97 base.options = $.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options); 98 99 base.userOptions = options; 100 base.loadContent(); 101 }, 102 103 loadContent : function(){ 104 var base = this; 105 106 if (typeof base.options.beforeInit === "function") { 107 base.options.beforeInit.apply(this,[base.$elem]); 108 } 109 110 if (typeof base.options.jsonPath === "string") { 111 var url = base.options.jsonPath; 112 113 function getData(data) { 114 if (typeof base.options.jsonSuccess === "function") { 115 base.options.jsonSuccess.apply(this,[data]); 116 } else { 117 var content = ""; 118 for(var i in data["owl"]){ 119 content += data["owl"][i]["item"]; 120 } 121 base.$elem.html(content); 122 } 123 base.logIn(); 124 } 125 $.getJSON(url,getData); 126 } else { 127 base.logIn(); 128 } 129 }, 130 131 logIn : function(action){ 132 var base = this; 133 134 base.$elem.data("owl-originalStyles", base.$elem.attr("style")) 135 .data("owl-originalClasses", base.$elem.attr("class")); 136 137 base.$elem.css({opacity: 0}); 138 base.orignalItems = base.options.items; 139 base.checkBrowser();
140 base.wrapperWidth = 0; 141 base.checkVisible; 142 base.setVars(); 143 }, 144 145 setVars : function(){ 146 var base = this; 147 if(base.$elem.children().length === 0){return false} 148 base.baseClass(); 149 base.eventTypes(); 150 base.$userItems = base.$elem.children(); 151 base.itemsAmount = base.$userItems.length; 152 base.wrapItems(); 153 base.$owlItems = base.$elem.find(".owl-item"); 154 base.$owlWrapper = base.$elem.find(".owl-wrapper"); 155 base.playDirection = "next"; 156 base.prevItem = 0; 157 base.prevArr = [0]; 158 base.currentItem = 0; 159 base.customEvents(); 160 base.onStartup(); 161 }, 162 163 onStartup : function(){ 164 var base = this; 165 base.updateItems(); 166 base.calculateAll(); 167 base.buildControls(); 168 base.updateControls(); 169 base.response(); 170 base.moveEvents(); 171 base.stopOnHover(); 172 base.owlStatus(); 173 174 if(base.options.transitionStyle !== false){ 175 base.transitionTypes(base.options.transitionStyle); 176 } 177 if(base.options.autoPlay === true){ 178 base.options.autoPlay = 5000; 179 } 180 base.play(); 181 182 base.$elem.find(".owl-wrapper").css("display","block") 183 184 if(!base.$elem.is(":visible")){ 185 base.watchVisibility(); 186 } else { 187 base.$elem.css("opacity",1); 188 } 189 base.onstartup = false; 190 base.eachMoveUpdate(); 191 if (typeof base.options.afterInit === "function") { 192 base.options.afterInit.apply(this,[base.$elem]); 193 } 194 }, 195 196 eachMoveUpdate : function(){ 197 var base = this; 198 199 if(base.options.lazyLoad === true){ 200 base.lazyLoad(); 201 } 202 if(base.options.autoHeight === true){ 203 base.autoHeight(); 204 } 205 base.onVisibleItems(); 206 207 if (typeof base.options.afterAction === "function") { 208 base.options.afterAction.apply(this,[base.$elem]); 209 } 210 }, 211 212 updateVars : function(){ 213 var base = this; 214 if(typeof base.options.beforeUpdate === "function") { 215 base.options.beforeUpdate.apply(this,[base.$elem]); 216 } 217 base.watchVisibility(); 218 base.updateItems(); 219 base.calculateAll(); 220 base.updatePosition(); 221 base.updateControls(); 222 base.eachMoveUpdate(); 223 if(typeof base.options.afterUpdate === "function") { 224 base.options.afterUpdate.apply(this,[base.$elem]); 225 } 226 }, 227 228 reload : function(elements){ 229 var base = this; 230 setTimeout(function(){ 231 base.updateVars(); 232 },0) 233 }, 234 235 watchVisibility : function(){ 236 var base = this; 237 238 if(base.$elem.is(":visible") === false){ 239 base.$elem.css({opacity: 0}); 240 clearInterval(base.autoPlayInterval); 241 clearInterval(base.checkVisible); 242 } else { 243 return false; 244 } 245 base.checkVisible = setInterval(function(){ 246 if (base.$elem.is(":visible")) { 247 base.reload(); 248 base.$elem.animate({opacity: 1},200); 249 clearInterval(base.checkVisible); 250 } 251 }, 500); 252 }, 253 254 wrapItems : function(){ 255 var base = this; 256 base.$userItems.wrapAll("<div class=\"owl-wrapper\">").wrap("<div class=\"owl-item\"></div>"); 257 base.$elem.find(".owl-wrapper").wrap("<div class=\"owl-wrapper-outer\">"); 258 base.wrapperOuter = base.$elem.find(".owl-wrapper-outer"); 259 base.$elem.css("display","block"); 260 }, 261 262 baseClass : function(){ 263 var base = this; 264 var hasBaseClass = base.$elem.hasClass(base.options.baseClass); 265 var hasThemeClass = base.$elem.hasClass(base.options.theme); 266 267 if(!hasBaseClass){ 268 base.$elem.addClass(base.options.baseClass); 269 } 270 271 if(!hasThemeClass){ 272 base.$elem.addClass(base.options.theme); 273 } 274 }, 275 276 updateItems : function(){ 277 var base = this; 278 279 if(base.options.responsive === false){ 280 return false; 281 } 282 if(base.options.singleItem === true){ 283 base.options.items = base.orignalItems = 1; 284 base.options.itemsCustom = false; 285 base.options.itemsDesktop = false; 286 base.options.itemsDesktopSmall = false; 287 base.options.itemsTablet = false; 288 base.options.itemsTabletSmall = false; 289 base.options.itemsMobile = false; 290 return false; 291 } 292 293 var width = $(base.options.responsiveBaseWidth).width(); 294 295 if(width > (base.options.itemsDesktop[0] || base.orignalItems) ){ 296 base.options.items = base.orignalItems; 297 } 298 299 if(typeof(base.options.itemsCustom) !== 'undefined' && base.options.itemsCustom !== false){ 300 //Reorder array by screen size 301 base.options.itemsCustom.sort(function(a,b){return a[0]-b[0];}); 302 for(var i in base.options.itemsCustom){ 303 if(typeof(base.options.itemsCustom[i]) !== 'undefined' && base.options.itemsCustom[i][0] <= width){ 304 base.options.items = base.options.itemsCustom[i][1]; 305 } 306 } 307 } else { 308 309 if(width <= base.options.itemsDesktop[0] && base.options.itemsDesktop !== false){ 310 base.options.items = base.options.itemsDesktop[1]; 311 } 312 313 if(width <= base.options.itemsDesktopSmall[0] && base.options.itemsDesktopSmall !== false){ 314 base.options.items = base.options.itemsDesktopSmall[1]; 315 } 316 317 if(width <= base.options.itemsTablet[0] && base.options.itemsTablet !== false){ 318 base.options.items = base.options.itemsTablet[1]; 319 } 320 321 if(width <= base.options.itemsTabletSmall[0] && base.options.itemsTabletSmall !== false){ 322 base.options.items = base.options.itemsTabletSmall[1]; 323 } 324 325 if(width <= base.options.itemsMobile[0] && base.options.itemsMobile !== false){ 326 base.options.items = base.options.itemsMobile[1]; 327 } 328 } 329 330 //if number of items is less than declared 331 if(base.options.items > base.itemsAmount && base.options.itemsScaleUp === true){ 332 base.options.items = base.itemsAmount; 333 } 334 }, 335 336 response : function(){ 337 var base = this, 338 smallDelay; 339 if(base.options.responsive !== true){ 340 return false 341 } 342 var lastWindowWidth = $(window).width(); 343 344 base.resizer = function(){ 345 if($(window).width() !== lastWindowWidth){ 346 if(base.options.autoPlay !== false){ 347 clearInterval(base.autoPlayInterval); 348 } 349 clearTimeout(smallDelay);
350 smallDelay = setTimeout(function(){ 351 lastWindowWidth = $(window).width(); 352 base.updateVars(); 353 },base.options.responsiveRefreshRate); 354 } 355 } 356 $(window).resize(base.resizer) 357 }, 358 359 updatePosition : function(){ 360 var base = this; 361 base.jumpTo(base.currentItem); 362 if(base.options.autoPlay !== false){ 363 base.checkAp(); 364 } 365 }, 366 367 appendItemsSizes : function(){ 368 var base = this; 369 370 var roundPages = 0; 371 var lastItem = base.itemsAmount - base.options.items; 372 373 base.$owlItems.each(function(index){ 374 var $this = $(this); 375 $this 376 .css({"width": base.itemWidth}) 377 .data("owl-item",Number(index)); 378 379 if(index % base.options.items === 0 || index === lastItem){ 380 if(!(index > lastItem)){ 381 roundPages +=1; 382 } 383 } 384 $this.data("owl-roundPages",roundPages) 385 }); 386 }, 387 388 appendWrapperSizes : function(){ 389 var base = this; 390 var width = 0; 391 392 var width = base.$owlItems.length * base.itemWidth; 393 394 base.$owlWrapper.css({ 395 "width": width*2, 396 "left": 0 397 }); 398 base.appendItemsSizes(); 399 }, 400 401 calculateAll : function(){ 402 var base = this; 403 base.calculateWidth(); 404 base.appendWrapperSizes(); 405 base.loops(); 406 base.max(); 407 }, 408 409 calculateWidth : function(){ 410 var base = this; 411 base.itemWidth = Math.round(base.$elem.width()/base.options.items) 412 }, 413 414 max : function(){ 415 var base = this; 416 var maximum = ((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1; 417 if(base.options.items > base.itemsAmount){ 418 base.maximumItem = 0; 419 maximum = 0 420 base.maximumPixels = 0; 421 } else { 422 base.maximumItem = base.itemsAmount - base.options.items; 423 base.maximumPixels = maximum; 424 } 425 return maximum; 426 }, 427 428 min : function(){ 429 return 0; 430 }, 431 432 loops : function(){ 433 var base = this; 434 435 base.positionsInArray = [0]; 436 base.pagesInArray = []; 437 var prev = 0; 438 var elWidth = 0; 439 440 for(var i = 0; i<base.itemsAmount; i++){ 441 elWidth += base.itemWidth; 442 base.positionsInArray.push(-elWidth); 443 444 if(base.options.scrollPerPage === true){ 445 var item = $(base.$owlItems[i]); 446 var roundPageNum = item.data("owl-roundPages"); 447 if(roundPageNum !== prev){ 448 base.pagesInArray[prev] = base.positionsInArray[i]; 449 prev = roundPageNum; 450 } 451 } 452 } 453 }, 454 455 buildControls : function(){ 456 var base = this; 457 if(base.options.navigation === true || base.options.pagination === true){ 458 base.owlControls = $("<div class=\"owl-controls\"/>").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem); 459 } 460 if(base.options.pagination === true){ 461 base.buildPagination(); 462 } 463 if(base.options.navigation === true){ 464 base.buildButtons(); 465 } 466 }, 467 468 buildButtons : function(){ 469 var base = this; 470 var buttonsWrapper = $("<div class=\"owl-buttons\"/>") 471 base.owlControls.append(buttonsWrapper); 472 473 base.buttonPrev = $("<div/>",{ 474 "class" : "owl-prev", 475 "html" : base.options.navigationText[0] || "" 476 }); 477 478 base.buttonNext = $("<div/>",{ 479 "class" : "owl-next", 480 "html" : base.options.navigationText[1] || "" 481 }); 482 483 buttonsWrapper 484 .append(base.buttonPrev) 485 .append(base.buttonNext); 486 487 buttonsWrapper.on("touchstart.owlControls mousedown.owlControls", "div[class^=\"owl\"]", function(event){ 488 event.preventDefault(); 489 }) 490 491 buttonsWrapper.on("touchend.owlControls mouseup.owlControls", "div[class^=\"owl\"]", function(event){ 492 event.preventDefault(); 493 if($(this).hasClass("owl-next")){ 494 base.next(); 495 } else{ 496 base.prev(); 497 } 498 }) 499 }, 500 501 buildPagination : function(){ 502 var base = this; 503 504 base.paginationWrapper = $("<div class=\"owl-pagination\"/>"); 505 base.owlControls.append(base.paginationWrapper); 506 507 base.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function(event){ 508 event.preventDefault(); 509 if(Number($(this).data("owl-page")) !== base.currentItem){ 510 base.goTo( Number($(this).data("owl-page")), true); 511 } 512 }); 513 }, 514 515 updatePagination : function(){ 516 var base = this; 517 if(base.options.pagination === false){ 518 return false;
519 } 520 521 base.paginationWrapper.html(""); 522 523 var counter = 0; 524 var lastPage = base.itemsAmount - base.itemsAmount % base.options.items; 525 526 for(var i = 0; i<base.itemsAmount; i++){ 527 if(i % base.options.items === 0){ 528 counter +=1; 529 if(lastPage === i){ 530 var lastItem = base.itemsAmount - base.options.items; 531 } 532 var paginationButton = $("<div/>",{ 533 "class" : "owl-page" 534 }); 535 var paginationButtonInner = $("<span></span>",{ 536 "text": base.options.paginationNumbers === true ? counter : "", 537 "class": base.options.paginationNumbers === true ? "owl-numbers" : "" 538 }); 539 paginationButton.append(paginationButtonInner); 540 541 paginationButton.data("owl-page",lastPage === i ? lastItem : i); 542 paginationButton.data("owl-roundPages",counter); 543 544 base.paginationWrapper.append(paginationButton); 545 } 546 } 547 base.checkPagination(); 548 }, 549 checkPagination : function(){ 550 var base = this; 551 if(base.options.pagination === false){ 552 return false; 553 } 554 base.paginationWrapper.find(".owl-page").each(function(i,v){ 555 if($(this).data("owl-roundPages") === $(base.$owlItems[base.currentItem]).data("owl-roundPages") ){ 556 base.paginationWrapper 557 .find(".owl-page") 558 .removeClass("active"); 559 $(this).addClass("active"); 560 } 561 }); 562 }, 563 564 checkNavigation : function(){ 565 var base = this; 566 567 if(base.options.navigation === false){ 568 return false; 569 } 570 if(base.options.rewindNav === false){ 571 if(base.currentItem === 0 && base.maximumItem === 0){ 572 base.buttonPrev.addClass("disabled"); 573 base.buttonNext.addClass("disabled"); 574 } else if(base.currentItem === 0 && base.maximumItem !== 0){ 575 base.buttonPrev.addClass("disabled"); 576 base.buttonNext.removeClass("disabled"); 577 } else if (base.currentItem === base.maximumItem){ 578 base.buttonPrev.removeClass("disabled"); 579 base.buttonNext.addClass("disabled"); 580 } else if(base.currentItem !== 0 && base.currentItem !== base.maximumItem){ 581 base.buttonPrev.removeClass("disabled"); 582 base.buttonNext.removeClass("disabled"); 583 } 584 } 585 }, 586 587 updateControls : function(){ 588 var base = this; 589 base.updatePagination(); 590 base.checkNavigation(); 591 if(base.owlControls){ 592 if(base.options.items >= base.itemsAmount){ 593 base.owlControls.hide(); 594 } else { 595 base.owlControls.show(); 596 } 597 } 598 }, 599 600 destroyControls : function(){ 601 var base = this; 602 if(base.owlControls){ 603 base.owlControls.remove(); 604 } 605 }, 606 607 next : function(speed){ 608 var base = this; 609 610 if(base.isTransition){ 611 return false; 612 } 613 614 base.currentItem += base.options.scrollPerPage === true ? base.options.items : 1; 615 if(base.currentItem > base.maximumItem + (base.options.scrollPerPage == true ? (base.options.items - 1) : 0)){ 616 if(base.options.rewindNav === true){ 617 base.currentItem = 0; 618 speed = "rewind"; 619 } else { 620 base.currentItem = base.maximumItem; 621 return false; 622 } 623 } 624 base.goTo(base.currentItem,speed); 625 }, 626 627 prev : function(speed){ 628 var base = this; 629 630 if(base.isTransition){ 631 return false; 632 } 633 634 if(base.options.scrollPerPage === true && base.currentItem > 0 && base.currentItem < base.options.items){ 635 base.currentItem = 0 636 } else { 637 base.currentItem -= base.options.scrollPerPage === true ? base.options.items : 1; 638 } 639 if(base.currentItem < 0){ 640 if(base.options.rewindNav === true){ 641 base.currentItem = base.maximumItem; 642 speed = "rewind" 643 } else { 644 base.currentItem =0; 645 return false; 646 } 647 } 648 base.goTo(base.currentItem,speed); 649 }, 650 651 goTo : function(position,speed,drag){ 652 var base = this; 653 654 if(base.isTransition){ 655 return false; 656 } 657 if(typeof base.options.beforeMove === "function") { 658 base.options.beforeMove.apply(this,[base.$elem]); 659 } 660 if(position >= base.maximumItem){ 661 position = base.maximumItem; 662 } 663 else if( position <= 0 ){ 664 position = 0; 665 } 666 667 base.currentItem = base.owl.currentItem = position; 668 if( base.options.transitionStyle !== false && drag !== "drag" && base.options.items === 1 && base.browser.support3d === true){ 669 base.swapSpeed(0) 670 if(base.browser.support3d === true){ 671 base.transition3d(base.positionsInArray[position]); 672 } else { 673 base.css2slide(base.positionsInArray[position],1); 674 } 675 base.afterGo(); 676 base.singleItemTransition(); 677 678 return false;
679 } 680 var goToPixel = base.positionsInArray[position]; 681 682 if(base.browser.support3d === true){ 683 base.isCss3Finish = false; 684 685 if(speed === true){ 686 base.swapSpeed("paginationSpeed"); 687 setTimeout(function() { 688 base.isCss3Finish = true; 689 }, base.options.paginationSpeed); 690 691 } else if(speed === "rewind" ){ 692 base.swapSpeed(base.options.rewindSpeed); 693 setTimeout(function() { 694 base.isCss3Finish = true; 695 }, base.options.rewindSpeed); 696 697 } else { 698 base.swapSpeed("slideSpeed"); 699 setTimeout(function() { 700 base.isCss3Finish = true; 701 }, base.options.slideSpeed); 702 } 703 base.transition3d(goToPixel); 704 } else { 705 if(speed === true){ 706 base.css2slide(goToPixel, base.options.paginationSpeed); 707 } else if(speed === "rewind" ){ 708 base.css2slide(goToPixel, base.options.rewindSpeed); 709 } else { 710 base.css2slide(goToPixel, base.options.slideSpeed); 711 } 712 } 713 base.afterGo(); 714 }, 715 716 jumpTo : function(position){ 717 var base = this; 718 if(typeof base.options.beforeMove === "function") { 719 base.options.beforeMove.apply(this,[base.$elem]); 720 } 721 if(position >= base.maximumItem || position === -1){ 722 position = base.maximumItem; 723 } 724 else if( position <= 0 ){ 725 position = 0; 726 } 727 base.swapSpeed(0) 728 if(base.browser.support3d === true){ 729 base.transition3d(base.positionsInArray[position]); 730 } else { 731 base.css2slide(base.positionsInArray[position],1); 732 } 733 base.currentItem = base.owl.currentItem = position; 734 base.afterGo(); 735 }, 736 737 afterGo : function(){ 738 var base = this; 739 740 base.prevArr.push(base.currentItem); 741 base.prevItem = base.owl.prevItem = base.prevArr[base.prevArr.length -2]; 742 base.prevArr.shift(0) 743 744 if(base.prevItem !== base.currentItem){ 745 base.checkPagination(); 746 base.checkNavigation(); 747 base.eachMoveUpdate(); 748 749 if(base.options.autoPlay !== false){ 750 base.checkAp(); 751 } 752 } 753 if(typeof base.options.afterMove === "function" && base.prevItem !== base.currentItem) { 754 base.options.afterMove.apply(this,[base.$elem]); 755 } 756 }, 757 758 stop : function(){ 759 var base = this; 760 base.apStatus = "stop"; 761 clearInterval(base.autoPlayInterval); 762 }, 763 764 checkAp : function(){ 765 var base = this; 766 if(base.apStatus !== "stop"){ 767 base.play(); 768 } 769 }, 770 771 play : function(){ 772 var base = this; 773 base.apStatus = "play"; 774 if(base.options.autoPlay === false){ 775 return false; 776 } 777 clearInterval(base.autoPlayInterval); 778 base.autoPlayInterval = setInterval(function(){ 779 base.next(true); 780 },base.options.autoPlay); 781 }, 782 783 swapSpeed : function(action){ 784 var base = this; 785 if(action === "slideSpeed"){ 786 base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed)); 787 } else if(action === "paginationSpeed" ){ 788 base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed)); 789 } else if(typeof action !== "string"){ 790 base.$owlWrapper.css(base.addCssSpeed(action)); 791 } 792 }, 793 794 addCssSpeed : function(speed){ 795 var base = this; 796 return { 797 "-webkit-transition": "all "+ speed +"ms ease", 798 "-moz-transition": "all "+ speed +"ms ease", 799 "-o-transition": "all "+ speed +"ms ease", 800 "transition": "all "+ speed +"ms ease" 801 }; 802 }, 803 804 removeTransition : function(){ 805 return { 806 "-webkit-transition": "", 807 "-moz-transition": "", 808 "-o-transition": "", 809 "transition": "" 810 }; 811 }, 812 813 doTranslate : function(pixels){ 814 return { 815 "-webkit-transform": "translate3d("+pixels+"px, 0px, 0px)", 816 "-moz-transform": "translate3d("+pixels+"px, 0px, 0px)", 817 "-o-transform": "translate3d("+pixels+"px, 0px, 0px)", 818 "-ms-transform": "translate3d("+pixels+"px, 0px, 0px)", 819 "transform": "translate3d("+pixels+"px, 0px,0px)" 820 }; 821 }, 822 823 transition3d : function(value){ 824 var base = this; 825 base.$owlWrapper.css(base.doTranslate(value)); 826 }, 827 828 css2move : function(value){ 829 var base = this; 830 base.$owlWrapper.css({"left" : value}) 831 }, 832 833 css2slide : function(value,speed){ 834 var base = this; 835 836 base.isCssFinish = false; 837 base.$owlWrapper.stop(true,true).animate({ 838 "left" : value 839 }, { 840 duration : speed || base.options.slideSpeed , 841 complete : function(){ 842 base.isCssFinish = true; 843 } 844 }); 845 }, 846 847 checkBrowser : function(){ 848 var base = this; 849 850 //Check 3d support 851 var translate3D = "translate3d(0px, 0px, 0px)", 852 tempElem = document.createElement("div"); 853 854 tempElem.style.cssText= " -moz-transform:" + translate3D + 855 "; -ms-transform:" + translate3D + 856 "; -o-transform:" + translate3D + 857 "; -webkit-transform:" + translate3D + 858 "; transform:" + translate3D; 859 var regex = /translate3d\(0px, 0px, 0px\)/g, 860 asSupport = tempElem.style.cssText.match(regex), 861 support3d = (asSupport !== null && asSupport.length === 1); 862 863 var isTouch = "ontouchstart" in window || navigator.msMaxTouchPoints; 864 865 base.browser = { 866 "support3d" : support3d, 867 "isTouch" : isTouch 868 } 869 }, 870 871 moveEvents : function(){ 872 var base = this; 873 if(base.options.mouseDrag !== false || base.options.touchDrag !== false){ 874 base.gestures(); 875 base.disabledEvents(); 876 } 877 }, 878 879 eventTypes : function(){ 880 var base = this; 881 var types = ["s","e","x"]; 882 883 base.ev_types = {}; 884 885 if(base.options.mouseDrag === true && base.options.touchDrag === true){ 886 types = [ 887 "touchstart.owl mousedown.owl", 888 "touchmove.owl mousemove.owl", 889 "touchend.owl touchcancel.owl mouseup.owl" 890 ]; 891 } else if(base.options.mouseDrag === false && base.options.touchDrag === true){ 892 types = [ 893 "touchstart.owl", 894 "touchmove.owl", 895 "touchend.owl touchcancel.owl" 896 ]; 897 } else if(base.options.mouseDrag === true && base.options.touchDrag === false){ 898 types = [ 899 "mousedown.owl", 900 "mousemove.owl", 901 "mouseup.owl" 902 ]; 903 } 904 905 base.ev_types["start"] = types[0]; 906 base.ev_types["move"] = types[1]; 907 base.ev_types["end"] = types[2]; 908 }, 909 910 disabledEvents : function(){ 911 var base = this; 912 base.$elem.on("dragstart.owl", function(event) { event.preventDefault();}); 913 base.$elem.on("mousedown.disableTextSelect", function(e) { 914 return $(e.target).is('input, textarea, select, option'); 915 }); 916 }, 917 918 gestures : function(){ 919 var base = this; 920 921 var locals = { 922 offsetX : 0, 923 offsetY : 0, 924 baseElWidth : 0, 925 relativePos : 0, 926 position: null, 927 minSwipe : null, 928 maxSwipe: null, 929 sliding : null, 930 dargging: null, 931 targetElement : null 932 } 933 934 base.isCssFinish = true; 935 936 function getTouches(event){ 937 if(event.touches){ 938 return { 939 x : event.touches[0].pageX, 940 y : event.touches[0].pageY 941 } 942 } else { 943 if(event.pageX !== undefined){ 944 return { 945 x : event.pageX, 946 y : event.pageY 947 } 948 } else { 949 return { 950 x : event.clientX, 951 y : event.clientY 952 } 953 } 954 } 955 } 956 957 function swapEvents(type){ 958 if(type === "on"){ 959 $(document).on(base.ev_types["move"], dragMove); 960 $(document).on(base.ev_types["end"], dragEnd); 961 } else if(type === "off"){ 962 $(document).off(base.ev_types["move"]); 963 $(document).off(base.ev_types["end"]); 964 } 965 } 966 967 function dragStart(event) { 968 var event = event.originalEvent || event || window.event; 969 970 if (event.which === 3) { 971 return false;
972 } 973 if(base.itemsAmount <= base.options.items){ 974 return; 975 } 976 if(base.isCssFinish === false && !base.options.dragBeforeAnimFinish ){ 977 return false; 978 } 979 if(base.isCss3Finish === false && !base.options.dragBeforeAnimFinish ){ 980 return false; 981 } 982 983 if(base.options.autoPlay !== false){ 984 clearInterval(base.autoPlayInterval); 985 } 986 987 if(base.browser.isTouch !== true && !base.$owlWrapper.hasClass("grabbing")){ 988 base.$owlWrapper.addClass("grabbing") 989 } 990 991 base.newPosX = 0; 992 base.newRelativeX = 0; 993 994 $(this).css(base.removeTransition()); 995 996 var position = $(this).position(); 997 locals.relativePos = position.left; 998 999 locals.offsetX = getTouches(event).x - position.left; 1000 locals.offsetY = getTouches(event).y - position.top; 1001 1002 swapEvents("on"); 1003 1004 locals.sliding = false; 1005 locals.targetElement = event.target || event.srcElement; 1006 } 1007 1008 function dragMove(event){ 1009 var event = event.originalEvent || event || window.event; 1010 1011 base.newPosX = getTouches(event).x- locals.offsetX; 1012 base.newPosY = getTouches(event).y - locals.offsetY; 1013 base.newRelativeX = base.newPosX - locals.relativePos; 1014 1015 if (typeof base.options.startDragging === "function" && locals.dragging !== true && base.newRelativeX !== 0) { 1016 locals.dragging = true; 1017 base.options.startDragging.apply(base,[base.$elem]); 1018 } 1019 1020 if(base.newRelativeX > 8 || base.newRelativeX < -8 && base.browser.isTouch === true){ 1021 event.preventDefault ? event.preventDefault() : event.returnValue = false; 1022 locals.sliding = true; 1023 } 1024 1025 if((base.newPosY > 10 || base.newPosY < -10) && locals.sliding === false){ 1026 $(document).off("touchmove.owl"); 1027 } 1028 1029 var minSwipe = function(){ 1030 return base.newRelativeX / 5; 1031 } 1032 var maxSwipe = function(){ 1033 return base.maximumPixels + base.newRelativeX / 5; 1034 } 1035 1036 base.newPosX = Math.max(Math.min( base.newPosX, minSwipe() ), maxSwipe() ); 1037 if(base.browser.support3d === true){ 1038 base.transition3d(base.newPosX); 1039 } else { 1040 base.css2move(base.newPosX); 1041 } 1042 } 1043 1044 function dragEnd(event){ 1045 var event = event.originalEvent || event || window.event; 1046 event.target = event.target || event.srcElement; 1047 1048 locals.dragging = false; 1049 1050 if(base.browser.isTouch !== true){ 1051 base.$owlWrapper.removeClass("grabbing"); 1052 } 1053 1054 if(base.newRelativeX<0){ 1055 base.dragDirection = base.owl.dragDirection = "left" 1056 } else { 1057 base.dragDirection = base.owl.dragDirection = "right" 1058 } 1059 1060 if(base.newRelativeX !== 0){ 1061 var newPosition = base.getNewPosition(); 1062 base.goTo(newPosition,false,"drag"); 1063 if(locals.targetElement === event.target && base.browser.isTouch !== true){ 1064 $(event.target).on("click.disable", function(ev){ 1065 ev.stopImmediatePropagation(); 1066 ev.stopPropagation(); 1067 ev.preventDefault(); 1068 $(event.target).off("click.disable"); 1069 }); 1070 var handlers = $._data(event.target, "events")["click"]; 1071 var owlStopEvent = handlers.pop(); 1072 handlers.splice(0, 0, owlStopEvent); 1073 } 1074 } 1075 swapEvents("off"); 1076 } 1077 base.$elem.on(base.ev_types["start"], ".owl-wrapper", dragStart); 1078 }, 1079 1080 getNewPosition : function(){ 1081 var base = this, 1082 newPosition; 1083 1084 newPosition = base.closestItem(); 1085 1086 if(newPosition>base.maximumItem){ 1087 base.currentItem = base.maximumItem; 1088 newPosition = base.maximumItem; 1089 } else if( base.newPosX >=0 ){ 1090 newPosition = 0; 1091 base.currentItem = 0; 1092 } 1093 return newPosition; 1094 }, 1095 closestItem : function(){ 1096 var base = this, 1097 array = base.options.scrollPerPage === true ? base.pagesInArray : base.positionsInArray, 1098 goal = base.newPosX, 1099 closest = null; 1100 1101 $.each(array, function(i,v){ 1102 if( goal - (base.itemWidth/20) > array[i+1] && goal - (base.itemWidth/20)< v && base.moveDirection() === "left") { 1103 closest = v; 1104 if(base.options.scrollPerPage === true){ 1105 base.currentItem = $.inArray(closest, base.positionsInArray); 1106 } else { 1107 base.currentItem = i; 1108 } 1109 } 1110 else if (goal + (base.itemWidth/20) < v && goal + (base.itemWidth/20) > (array[i+1] || array[i]-base.itemWidth) && base.moveDirection() === "right"){ 1111 if(base.options.scrollPerPage === true){ 1112 closest = array[i+1] || array[array.length-1]; 1113 base.currentItem = $.inArray(closest, base.positionsInArray); 1114 } else { 1115 closest = array[i+1]; 1116 base.currentItem = i+1; 1117 } 1118 } 1119 }); 1120 return base.currentItem; 1121 }, 1122 1123 moveDirection : function(){ 1124 var base = this, 1125 direction; 1126 if(base.newRelativeX < 0 ){ 1127 direction = "right" 1128 base.playDirection = "next" 1129 } else { 1130 direction = "left" 1131 base.playDirection = "prev" 1132 } 1133 return direction 1134 }, 1135 1136 customEvents : function(){ 1137 var base = this; 1138 base.$elem.on("owl.next",function(){ 1139 base.next(); 1140 }); 1141 base.$elem.on("owl.prev",function(){ 1142 base.prev(); 1143 }); 1144 base.$elem.on("owl.play",function(event,speed){ 1145 base.options.autoPlay = speed; 1146 base.play(); 1147 base.hoverStatus = "play"; 1148 }); 1149 base.$elem.on("owl.stop",function(){ 1150 base.stop(); 1151 base.hoverStatus = "stop"; 1152 });
1153 base.$elem.on("owl.goTo",function(event,item){ 1154 base.goTo(item) 1155 }); 1156 base.$elem.on("owl.jumpTo",function(event,item){ 1157 base.jumpTo(item) 1158 }); 1159 }, 1160 1161 stopOnHover : function(){ 1162 var base = this; 1163 if(base.options.stopOnHover === true && base.browser.isTouch !== true && base.options.autoPlay !== false){ 1164 base.$elem.on("mouseover", function(){ 1165 base.stop(); 1166 }); 1167 base.$elem.on("mouseout", function(){ 1168 if(base.hoverStatus !== "stop"){ 1169 base.play(); 1170 } 1171 }); 1172 } 1173 }, 1174 1175 lazyLoad : function(){ 1176 var base = this; 1177 1178 if(base.options.lazyLoad === false){ 1179 return false; 1180 } 1181 for(var i=0; i<base.itemsAmount; i++){ 1182 var $item = $(base.$owlItems[i]); 1183 1184 if($item.data("owl-loaded") === "loaded"){ 1185 continue; 1186 } 1187 1188 var itemNumber = $item.data("owl-item"), 1189 $lazyImg = $item.find(".lazyOwl"), 1190 follow; 1191 1192 if( typeof $lazyImg.data("src") !== "string"){ 1193 $item.data("owl-loaded","loaded"); 1194 continue; 1195 } 1196 if($item.data("owl-loaded") === undefined){ 1197 $lazyImg.hide(); 1198 $item.addClass("loading").data("owl-loaded","checked"); 1199 } 1200 if(base.options.lazyFollow === true){ 1201 follow = itemNumber >= base.currentItem; 1202 } else { 1203 follow = true; 1204 } 1205 if(follow && itemNumber < base.currentItem + base.options.items && $lazyImg.length){ 1206 base.lazyPreload($item,$lazyImg); 1207 } 1208 } 1209 }, 1210 1211 lazyPreload : function($item,$lazyImg){ 1212 var base = this, 1213 iterations = 0; 1214 if ($lazyImg.prop("tagName") === "DIV") { 1215 $lazyImg.css("background-image", "url(" + $lazyImg.data("src")+ ")" ); 1216 var isBackgroundImg=true; 1217 } else { 1218 $lazyImg[0].src = $lazyImg.data("src"); 1219 } 1220 checkLazyImage(); 1221 1222 function checkLazyImage(){ 1223 iterations += 1; 1224 if (base.completeImg($lazyImg.get(0)) || isBackgroundImg === true) { 1225 showImage(); 1226 } else if(iterations <= 100){//if image loads in less than 10 seconds 1227 setTimeout(checkLazyImage,100); 1228 } else { 1229 showImage(); 1230 } 1231 } 1232 function showImage(){ 1233 $item.data("owl-loaded", "loaded").removeClass("loading"); 1234 $lazyImg.removeAttr("data-src"); 1235 base.options.lazyEffect === "fade" ? $lazyImg.fadeIn(400) : $lazyImg.show(); 1236 if(typeof base.options.afterLazyLoad === "function") { 1237 base.options.afterLazyLoad.apply(this,[base.$elem]); 1238 } 1239 } 1240 }, 1241 1242 autoHeight : function(){ 1243 var base = this; 1244 var $currentimg = $(base.$owlItems[base.currentItem]).find("img"); 1245 1246 if($currentimg.get(0) !== undefined ){ 1247 var iterations = 0; 1248 checkImage(); 1249 } else { 1250 addHeight(); 1251 } 1252 function checkImage(){ 1253 iterations += 1; 1254 if ( base.completeImg($currentimg.get(0)) ) { 1255 addHeight(); 1256 } else if(iterations <= 100){ //if image loads in less than 10 seconds 1257 setTimeout(checkImage,100); 1258 } else { 1259 base.wrapperOuter.css("height", ""); //Else remove height attribute 1260 } 1261 } 1262 1263 function addHeight(){ 1264 var $currentItem = $(base.$owlItems[base.currentItem]).height(); 1265 base.wrapperOuter.css("height",$currentItem+"px"); 1266 if(!base.wrapperOuter.hasClass("autoHeight")){ 1267 setTimeout(function(){ 1268 base.wrapperOuter.addClass("autoHeight"); 1269 },0); 1270 } 1271 } 1272 }, 1273 1274 completeImg : function(img) { 1275 if (!img.complete) { 1276 return false; 1277 } 1278 if (typeof img.naturalWidth !== "undefined" && img.naturalWidth == 0) { 1279 return false; 1280 } 1281 return true; 1282 }, 1283 1284 onVisibleItems : function(){ 1285 var base = this; 1286 1287 if(base.options.addClassActive === true){ 1288 base.$owlItems.removeClass("active"); 1289 } 1290 base.visibleItems = []; 1291 for(var i=base.currentItem; i<base.currentItem + base.options.items; i++){ 1292 base.visibleItems.push(i); 1293 1294 if(base.options.addClassActive === true){ 1295 $(base.$owlItems[i]).addClass("active"); 1296 } 1297 } 1298 base.owl.visibleItems = base.visibleItems; 1299 }, 1300 1301 transitionTypes : function(className){ 1302 var base = this; 1303 //Currently available: "fade","backSlide","goDown","fadeUp" 1304 base.outClass = "owl-"+className+"-out"; 1305 base.inClass = "owl-"+className+"-in"; 1306 }, 1307 1308 singleItemTransition : function(){ 1309 var base = this; 1310 base.isTransition = true; 1311 1312 var outClass = base.outClass, 1313 inClass = base.inClass, 1314 $currentItem = base.$owlItems.eq(base.currentItem), 1315 $prevItem = base.$owlItems.eq(base.prevItem),
1316 prevPos = Math.abs(base.positionsInArray[base.currentItem]) + base.positionsInArray[base.prevItem], 1317 origin = Math.abs(base.positionsInArray[base.currentItem])+base.itemWidth/2; 1318 1319 base.$owlWrapper 1320 .addClass('owl-origin') 1321 .css({ 1322 "-webkit-transform-origin" : origin+"px", 1323 "-moz-perspective-origin" : origin+"px", 1324 "perspective-origin" : origin+"px" 1325 }); 1326 function transStyles(prevPos,zindex){ 1327 return { 1328 "position" : "relative", 1329 "left" : prevPos+"px" 1330 }; 1331 } 1332 1333 var animEnd = 'webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend'; 1334 1335 $prevItem 1336 .css(transStyles(prevPos,10)) 1337 .addClass(outClass) 1338 .on(animEnd, function() { 1339 base.endPrev = true; 1340 $prevItem.off(animEnd); 1341 base.clearTransStyle($prevItem,outClass); 1342 }); 1343 1344 $currentItem 1345 .addClass(inClass) 1346 .on(animEnd, function() { 1347 base.endCurrent = true; 1348 $currentItem.off(animEnd); 1349 base.clearTransStyle($currentItem,inClass); 1350 }); 1351 }, 1352 1353 clearTransStyle : function(item,classToRemove){ 1354 var base = this; 1355 item.css({ 1356 "position" : "", 1357 "left" : "" 1358 }) 1359 .removeClass(classToRemove); 1360 if(base.endPrev && base.endCurrent){ 1361 base.$owlWrapper.removeClass('owl-origin'); 1362 base.endPrev = false; 1363 base.endCurrent = false; 1364 base.isTransition = false; 1365 } 1366 }, 1367 1368 owlStatus : function(){ 1369 var base = this; 1370 base.owl = { 1371 "userOptions" : base.userOptions, 1372 "baseElement" : base.$elem, 1373 "userItems" : base.$userItems, 1374 "owlItems" : base.$owlItems, 1375 "currentItem" : base.currentItem, 1376 "prevItem" : base.prevItem, 1377 "visibleItems" : base.visibleItems, 1378 "isTouch" : base.browser.isTouch, 1379 "browser" : base.browser, 1380 "dragDirection" : base.dragDirection 1381 } 1382 }, 1383 1384 clearEvents : function(){ 1385 var base = this; 1386 base.$elem.off(".owl owl mousedown.disableTextSelect"); 1387 $(document).off(".owl owl"); 1388 $(window).off("resize", base.resizer); 1389 }, 1390 1391 unWrap : function(){ 1392 var base = this; 1393 if(base.$elem.children().length !== 0){ 1394 base.$owlWrapper.unwrap(); 1395 base.$userItems.unwrap().unwrap(); 1396 if(base.owlControls){ 1397 base.owlControls.remove(); 1398 } 1399 } 1400 base.clearEvents(); 1401 base.$elem 1402 .attr("style", base.$elem.data("owl-originalStyles") || "") 1403 .attr("class", base.$elem.data("owl-originalClasses")); 1404 }, 1405 1406 destroy : function(){ 1407 var base = this; 1408 base.stop(); 1409 clearInterval(base.checkVisible); 1410 base.unWrap(); 1411 base.$elem.removeData(); 1412 }, 1413 1414 reinit : function(newOptions){ 1415 var base = this; 1416 var options = $.extend({}, base.userOptions, newOptions); 1417 base.unWrap(); 1418 base.init(options,base.$elem); 1419 }, 1420 1421 addItem : function(htmlString,targetPosition){ 1422 var base = this, 1423 position; 1424 1425 if(!htmlString){return false} 1426 1427 if(base.$elem.children().length === 0){ 1428 base.$elem.append(htmlString); 1429 base.setVars(); 1430 return false; 1431 } 1432 base.unWrap(); 1433 if(targetPosition === undefined || targetPosition === -1){ 1434 position = -1; 1435 } else { 1436 position = targetPosition; 1437 } 1438 if(position >= base.$userItems.length || position === -1){ 1439 base.$userItems.eq(-1).after(htmlString) 1440 } else { 1441 base.$userItems.eq(position).before(htmlString) 1442 } 1443 1444 base.setVars(); 1445 }, 1446 1447 removeItem : function(targetPosition){ 1448 var base = this, 1449 position; 1450 1451 if(base.$elem.children().length === 0){return false} 1452 1453 if(targetPosition === undefined || targetPosition === -1){ 1454 position = -1; 1455 } else { 1456 position = targetPosition; 1457 } 1458 1459 base.unWrap(); 1460 base.$userItems.eq(position).remove(); 1461 base.setVars(); 1462 } 1463 1464 }; 1465 1466 $.fn.owlCarousel = function( options ){ 1467 return this.each(function() { 1468 if($(this).data("owl-init") === true){ 1469 return false; 1470 } 1471 $(this).data("owl-init", true); 1472 var carousel = Object.create( Carousel ); 1473 carousel.init( options, this ); 1474 $.data( this, "owlCarousel", carousel ); 1475 }); 1476 }; 1477 1478 $.fn.owlCarousel.options = { 1479 1480 items : 5, 1481 itemsCustom : false, 1482 itemsDesktop : [1199,4], 1483 itemsDesktopSmall : [979,3], 1484 itemsTablet : [768,2], 1485 itemsTabletSmall : false, 1486 itemsMobile : [479,1], 1487 singleItem : false, 1488 itemsScaleUp : false, 1489 1490 slideSpeed : 200, 1491 paginationSpeed : 800, 1492 rewindSpeed : 1000, 1493 1494 autoPlay : false, 1495 stopOnHover : false, 1496 1497 navigation : false, 1498 navigationText : ["prev","next"], 1499 rewindNav : true, 1500 scrollPerPage : false, 1501 1502 pagination : true, 1503 paginationNumbers : false, 1504 1505 responsive : true, 1506 responsiveRefreshRate : 200, 1507 responsiveBaseWidth : window, 1508 1509 1510 baseClass : "owl-carousel", 1511 theme : "owl-theme", 1512 1513 lazyLoad : false, 1514 lazyFollow : true, 1515 lazyEffect : "fade", 1516 1517 autoHeight : false, 1518 1519 jsonPath : false, 1520 jsonSuccess : false, 1521 1522 dragBeforeAnimFinish : true, 1523 mouseDrag : true, 1524 touchDrag : true, 1525 1526 addClassActive : false, 1527 transitionStyle : false, 1528 1529 beforeUpdate : false, 1530 afterUpdate : false, 1531 beforeInit : false, 1532 afterInit : false, 1533 beforeMove : false, 1534 afterMove : false, 1535 afterAction : false, 1536 startDragging : false, 1537 afterLazyLoad: false 1538 1539 }; 1540})( jQuery, window, document ); 1541; 1542jQuery("document").ready(function () { 1543 if (jQuery(window).width() > 991) { 1544 jQuery(window).scroll(function () { 1545 if (jQuery(this).scrollTop() > 0) { 1546 jQuery('.header-sec').addClass("fixed-header"); 1547 } else { 1548 jQuery('.header-sec').removeClass("fixed-header"); 1549 } 1550 }); 1551 } 1552 });; 1553jQuery(document).ready(function () { 1554 jQuery("#schools").owlCarousel({
1555 autoPlay: false, //Set AutoPlay to 3 seconds 1556 itemsCustom: [ 1557 [0, 1], 1558 [450, 1], 1559 [600, 1], 1560 [700, 1], 1561 [1000, 1], 1562 [1200, 1], 1563 [1400, 1], 1564 [1600, 1] 1565 ], 1566 navigation: true 1567 }); 1568 });; 1569jQuery(document).ready(function () { 1570 var sync1 = jQuery("#sync1"); 1571 var sync2 = jQuery("#sync2"); 1572 1573 sync1.owlCarousel({ 1574 singleItem: true, 1575 slideSpeed: 1000, 1576 navigation: false, 1577 pagination: false, 1578 afterAction: syncPosition, 1579 responsiveRefreshRate: 200, 1580 }); 1581 1582 sync2.owlCarousel({ 1583 items: 5, 1584 itemsCustom: [ 1585 [0, 2], 1586 [450, 3], 1587 [600, 3], 1588 [700, 4], 1589 [1000, 4], 1590 [1200, 5], 1591 [1400, 5], 1592 [1600, 5] 1593 ], 1594 pagination: false, 1595 responsiveRefreshRate: 100, 1596 afterInit: function (el) { 1597 el.find(".owl-item").eq(0).addClass("synced"); 1598 } 1599 }); 1600 1601 function syncPosition(el) { 1602 var current = this.currentItem; 1603 jQuery("#sync2") 1604 .find(".owl-item") 1605 .removeClass("synced") 1606 .eq(current) 1607 .addClass("synced") 1608 if (jQuery("#sync2").data("owlCarousel") !== undefined) { 1609 center(current) 1610 } 1611 } 1612 1613 jQuery("#sync2").on("click", ".owl-item", function (e) { 1614 e.preventDefault(); 1615 var number = jQuery(this).data("owlItem"); 1616 sync1.trigger("owl.goTo", number); 1617 }); 1618 1619 function center(number) { 1620 var sync2visible = sync2.data("owlCarousel").owl.visibleItems; 1621 var num = number; 1622 var found = false; 1623 for (var i in sync2visible) { 1624 if (num === sync2visible[i]) { 1625 var found = true; 1626 } 1627 } 1628 1629 if (found === false) { 1630 if (num > sync2visible[sync2visible.length - 1]) { 1631 sync2.trigger("owl.goTo", num - sync2visible.length + 2) 1632 } else { 1633 if (num - 1 === -1) { 1634 num = 0; 1635 } 1636 sync2.trigger("owl.goTo", num); 1637 } 1638 } else if (num === sync2visible[sync2visible.length - 1]) { 1639 sync2.trigger("owl.goTo", sync2visible[1]) 1640 } else if (num === sync2visible[0]) { 1641 sync2.trigger("owl.goTo", num - 1) 1642 } 1643 1644 } 1645 1646 });; 1647jQuery(document).ready(function () { 1648 1649 jQuery('#menu-locations > li .sub-menu').slideUp(); 1650 jQuery('#menu-locations > li').addClass('close'); 1651 jQuery('#menu-locations > li > a').mouseenter(function () { 1652 if (jQuery(this).parent().hasClass('open')) { 1653 return false; 1654 } 1655 jQuery('#menu-locations > li').removeClass('open').addClass('close'); 1656 jQuery('#menu-locations > li.close .sub-menu').slideUp(); 1657 jQuery(this).parent().addClass('open').removeClass('close'); 1658 jQuery('#menu-locations > li.open .sub-menu').slideDown(); 1659 }); 1660 1661 1662 var getUrlParameter = function getUrlParameter(sParam) { 1663 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 1664 sURLVariables = sPageURL.split('&'), 1665 sParameterName, 1666 i; 1667 1668 for (i = 0; i < sURLVariables.length; i++) { 1669 sParameterName = sURLVariables[i].split('='); 1670 1671 if (sParameterName[0] === sParam) { 1672 return sParameterName[1] === undefined ? true : sParameterName[1]; 1673 } 1674 } 1675 }; 1676 1677 1678 if (typeof getUrlParameter('school_type') == 'undefined') { 1679 jQuery('.custom_search_form').slideUp(); 1680 } else { 1681 jQuery('.custom_search_form').slideDown(); 1682 } 1683 1684 jQuery('.sidebar-form h3').click(function () { 1685 jQuery('.custom_search_form').slideToggle(); 1686 }); 1687 1688 jQuery('.map_int').click(function() { 1689 jQuery(this).hide(); 1690 }); 1691 1692 });; 1693/*! 1694 * jQuery Transit - CSS3 transitions and transformations 1695 * (c) 2011-2012 Rico Sta. Cruz <[email protected]> 1696 * MIT Licensed. 1697 * 1698 * http://ricostacruz.com/jquery.transit 1699 * http://github.com/rstacruz/jquery.transit 1700 */ 1701(function(k){k.transit={version:"0.9.9",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var d=document.createElement("div");var q={};function b(v){if(v in d.style){return v}var u=["Moz","Webkit","O","ms"];var r=v.charAt(0).toUpperCase()+v.substr(1);if(v in d.style){return v}for(var t=0;t<u.length;++t){var s=u[t]+r;if(s in d.style){return s}}}function e(){d.style[q.transform]="";d.style[q.transform]="rotateY(90deg)";return d.style[q.transform]!==""}var a=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;q.transition=b("transition");q.transitionDelay=b("transitionDelay");q.transform=b("transform");q.transformOrigin=b("transformOrigin");q.transform3d=e();var i={transition:"transitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var f=q.transitionEnd=i[q.transition]||null;for(var p in q){if(q.hasOwnProperty(p)&&typeof k.support[p]==="undefined"){k.support[p]=q[p]}}d=null;k.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1
1701)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};k.cssHooks["transit:transform"]={get:function(r){return k(r).data("transform")||new j()},set:function(s,r){var t=r;if(!(t instanceof j)){t=new j(t)}if(q.transform==="WebkitTransform"&&!a){s.style[q.transform]=t.toString(true)}else{s.style[q.transform]=t.toString()}k(s).data("transform",t)}};k.cssHooks.transform={set:k.cssHooks["transit:transform"].set};if(k.fn.jquery<"1.8"){k.cssHooks.transformOrigin={get:function(r){return r.style[q.transformOrigin]},set:function(r,s){r.style[q.transformOrigin]=s}};k.cssHooks.transition={get:function(r){return r.style[q.transition]},set:function(r,s){r.style[q.transition]=s}}}n("scale");n("translate");n("rotate");n("rotateX");n("rotateY");n("rotate3d");n("perspective");n("skewX");n("skewY");n("x",true);n("y",true);function j(r){if(typeof r==="string"){this.parse(r)}return this}j.prototype={setFromString:function(t,s){var r=(typeof s==="string")?s.split(","):(s.constructor===Array)?s:[s];r.unshift(t);j.prototype.set.apply(this,r)},set:function(s){var r=Array.prototype.slice.apply(arguments,[1]);if(this.setter[s]){this.setter[s].apply(this,r)}else{this[s]=r.join(",")}},get:function(r){if(this.getter[r]){return this.getter[r].apply(this)}else{return this[r]||0}},setter:{rotate:function(r){this.rotate=o(r,"deg")},rotateX:function(r){this.rotateX=o(r,"deg")},rotateY:function(r){this.rotateY=o(r,"deg")},scale:function(r,s){if(s===undefined){s=r}this.scale=r+","+s},skewX:function(r){this.skewX=o(r,"deg")},skewY:function(r){this.skewY=o(r,"deg")},perspective:function(r){this.perspective=o(r,"px")},x:function(r){this.set("translate",r,null)},y:function(r){this.set("translate",null,r)},translate:function(r,s){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(r!==null&&r!==undefined){this._translateX=o(r,"px")}if(s!==null&&s!==undefined){this._translateY=o(s,"px")}
1701this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var r=(this.scale||"1,1").split(",");if(r[0]){r[0]=parseFloat(r[0])}if(r[1]){r[1]=parseFloat(r[1])}return(r[0]===r[1])?r[0]:r},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var r=0;r<=3;++r){if(t[r]){t[r]=parseFloat(t[r])}}if(t[3]){t[3]=o(t[3],"deg")}return t}},parse:function(s){var r=this;s.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,v,u){r.setFromString(v,u)})},toString:function(t){var s=[];for(var r in this){if(this.hasOwnProperty(r)){if((!q.transform3d)&&((r==="rotateX")||(r==="rotateY")||(r==="perspective")||(r==="transformOrigin"))){continue}if(r[0]!=="_"){if(t&&(r==="scale")){s.push(r+"3d("+this[r]+",1)")}else{if(t&&(r==="translate")){s.push(r+"3d("+this[r]+",0)")}else{s.push(r+"("+this[r]+")")}}}}}return s.join(" ")}};function m(s,r,t){if(r===true){s.queue(t)}else{if(r){s.queue(r,t)}else{t()}}}function h(s){var r=[];k.each(s,function(t){t=k.camelCase(t);t=k.transit.propertyMap[t]||k.cssProps[t]||t;t=c(t);if(k.inArray(t,r)===-1){r.push(t)}});return r}function g(s,v,x,r){var t=h(s);if(k.cssEase[x]){x=k.cssEase[x]}var w=""+l(v)+" "+x;if(parseInt(r,10)>0){w+=" "+l(r)}var u=[];k.each(t,function(z,y){u.push(y+" "+w)});return u.join(", ")}k.fn.transition=k.fn.transit=function(z,s,y,C){var D=this;var u=0;var w=true;if(typeof s==="function"){C=s;s=undefined}if(typeof y==="function"){C=y;y=undefined}if(typeof z.easing!=="undefined"){y=z.easing;delete z.easing}if(typeof z.duration!=="undefined"){s=z.duration;delete z.duration}if(typeof z.complete!=="undefined"){C=z.complete;delete z.complete}if(typeof z.queue!=="undefined"){w=z.queue;delete z.queue}if(typeof z.delay!=="undefined"){u=z.delay;delete z.delay}if(typeof s==="undefined"){s=k.fx.speeds._default}if(typeof y==="undefined"){y=k.cssEase._default}s=l(s);var E=g(z,s,y,u);var B=k.transit.enabled&&q.transition;var t=B?(parseInt(s,10)+parseInt(u,10)):0;if(t===0){var A=function(F){D.css(z);if(C){C.apply(D)}if(F){F()}};m(D,w,A);return D}var x={};var r=function(H){var G=false;var F=function(){if(G){D.unbind(f,F)}if(t>0){D.each(function(){this.style[q.transition]=(x[this]||null)})}if(typeof C==="function"){C.apply(D)}if(typeof H==="function"){H()}};if((t>0)&&(f)&&(k.transit.useTransitionEnd)){G=true;D.bind(f,F)}else{window.setTimeout(F,t)}D.each(function(){if(t>0){this.style[q.transition]=E}k(this).css(z)})};var v=function(F){this.offsetWidth;r(F)};m(D,w,v);return this};function n(s,r){if(!r){k.cssNumber[s]=true}k.transit.propertyMap[s]=q.transform;k.cssHooks[s]={get:function(v){var u=k(v).css("transit:transform");return u.get(s)},set:function(v,w){var u=k(v).css("transit:transform");u.setFromString(s,w);k(v).css({"transit:transform":u})}}}function c(r){return r.replace(/([A-Z])/g,function(s){return"-"+s.toLowerCase()})}function o(s,r){if((typeof s==="string")&&(!s.match(/^[\-0-9\.]+$/))){return s}else{return""+s+r}}function l(s){var r=s;if(k.fx.speeds[r]){r=k.fx.speeds[r]}return o(r,"ms")}k.transit.getTransitionValue=g})(jQuery);; 1702/** 1703 * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!) 1704 * Common usage: wipe images (left and right to show the previous or next image) 1705 * 1706 * MIT License 1707 * 1708 * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de) 1709 * @version 1.1.1 (9th December 2010) - fix bug (older IE's had problems) 1710 * @version 1.1 (1st September 2010) - support wipe up and wipe down 1711 * @version 1.0 (15th July 2010) 1712 */ 1713(function($){$.fn.touchwipe=function(settings){var config={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(settings)$.extend(config,settings);this.each(function(){var startX;var startY;var isMoving=false;function cancelTouch(){this.removeEventListener('touchmove',onTouchMove);startX=null;isMoving=false}function onTouchMove(e){if(config.preventDefaultEvents){e.preventDefault()}if(isMoving){var x=e.touches[0].pageX;var y=e.touches[0].pageY;var dx=startX-x;var dy=startY-y;if(Math.abs(dx)>=config.min_move_x){cancelTouch();if(dx>0){config.wipeLeft()}else{config.wipeRight()}}else if(Math.abs(dy)>=config.min_move_y){cancelTouch();if(dy>0){config.wipeDown()}else{config.wipeUp()}}}}function onTouchStart(e){if(e.touches.length==1){startX=e.touches[0].pageX;startY=e.touches[0].pageY;isMoving=true;this.addEventListener('touchmove',onTouchMove,false)}}if('ontouchstart'in document.documentElement){this.addEventListener('touchstart',onTouchStart,false)}});return this}})(jQuery);; 1714document.body.className.match("sdrn_open_sans_yes")&&(WebFontConfig={google:{families:["Open+Sans::latin"]}},function(){var t,e=document.createElement("script");e.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",e.type="text/javascript",e.async="true",t=document.getElementsByTagName("script")[0],t.parentNode.insertBefore(e,t)}()),jQuery(document).ready(function(e){var a,r,p,y,F,s=e("#sdrn_bar"),D=s.outerHeight(!0),C=s.attr("data-from_width"),t=e("#sdrn_menu"),d=e("#sdrn_menu_ul"),w=t.find("a"),n=e("body"),M=e("html"),c=300,z=e("#wpadminbar"),T=s.length>0&&t.length>0,f=t.width(),g=t.attr("data-expand_sub_with_parent"),k=window.innerHeight<n.height()?n.height():window.innerHeight,l=window.innerWidth<n.width()?n.width():window.innerWidth,m=[],v=!1,h=!1,j=navigator.userAgent,S=!1,_=!1;j.indexOf("Chrome")!=-1&&(S=!0),j.indexOf("Firefox")!=-1&&(_=!0),M.addClass("sdrn_"+Detect({useUA:!0})),e("html").hasClass("sdrn-device-Nokia")&&d.find(".menu-item-has-children").attr("aria-haspopup","true");function o(e){return e.css("display")!="none"}if(T){d.find("li").first().css({"border-top":"none"}),e(document).mouseup(function(a){!t.is(a.target)&&t.has(a.target).length===0&&o(t)&&(t.hasClass("sdrn_jquery")&&(i(),e.sidr("close","sdrn_menu"),s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened")),t.hasClass("sdrn_css3")&&(i(),s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened"),e(".fixed_animation").removeClass("fixed_animation_moved")))}),t.find("ul.sub-menu").each(function(){var i,s=e(this),n=s.prev("a"),o=n.parent("li").first();n.addClass("sdrn_parent_item"),o.addClass("sdrn_parent_item_li"),i=n.before('<span class="sdrn_icon sdrn_icon_par icon_default '+t.attr("data-custom_icon")+'"></span> ').find(".sdrn_icon_par"),s.hide()}),t.hasClass("sdrn_custom_icons")&&e("#sdrn_menu span.sdrn_icon").removeClass("icon_default"),t.find("#sdrn_menu_ul a[data-cii=1]").each(function(){var n=e(this),o=n.attr("data-fa_icon"),i=n.attr("data-icon_color"),t=n.find("div").first(),s=n.attr("data-icon_src");s||(t.addClass("sdrn_item_custom_icon"),t.addClass("sdrn_item_custom_icon_fa"),t.addClass(o),t.css({color:i})),s&&(t.addClass("sdrn_item_custom_icon"),t.html('<img src="'+s+'" width="23" height="23" alt="cii">'))});function A(){e(".sdrn_parent_item_li").each(function(){var n=e(this),s=0,i=n.find(".sdrn_icon_par").first(),o=n.find("a.sdrn_parent_item").first();t.hasClass("top")?s=window.innerWidth:s=d.innerWidth(),n.find(".sdrn_clear").length==0&&o.after('<br class="sdrn_clear"/>')})}A(),e(".sdrn_icon_par").on("click",function(n){n.preventDefault();var s=e(this),o=s.parent("li").find("ul.sub-menu").first();o.slideToggle(300),s.toggleClass("sdrn_par_opened"),t.attr("data-custom_icon")!=""&&(s.toggleClass(t.attr("data-custom_icon_open")),t.attr("data-custom_icon_open")!=""&&s.toggleClass(t.attr("data-custom_icon"))),s.parent("li").first().toggleClass("sdrn_no_border_bottom")});function i(){t.find("ul.sub-menu").each(function(){var n=e(this),s=n.parent("li").find(".sdrn_icon_par"),i=n.parent("li");o(n)&&n.slideUp(300),s.removeClass("sdrn_par_opened"),s.removeClass(t.attr("data-custom_icon_open")),s.addClass(t.attr("data-custom_icon")),i.removeClass("sdrn_no_border_bottom")})}r=e("meta[name=viewport]"),r=r.length?r:e('<meta name="viewport" />').appendTo("head"),t.attr("data-zooming")=="no"?r.attr("content","user-scalable=no, width=device-width, maximum-scale=1, minimum-scale=1"):r.attr("content","user-scalable=yes, width=device-width, initial-scale=1.0, minimum-scale=1"),_?screen.addEventListener("orientationchange",function(){E()}):window.addEventListener("orientationchange",E,!1);function E(){window.scrollBy(1,1),window.scrollBy(-1,-1),f=t.width(),k=window.innerHeight<n.height()?n.height():window.innerHeight,l=window.innerWidth<n.width()?n.width():window.innerWidth,n.hasClass("menu_is_opened")&&(t.hasClass("sdrn_jquery")&&(i(),n.hasClass("sdrn_left")&&(n.css({left:f}),n.scrollLeft(0)),e.sidr("close","sdrn_menu"),s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened")),t.hasClass("sdrn_css3")&&(i(),s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened")))}function b(t){t.length>0&&e.each(t,function(t,n){if(v==!1){var a=parseInt(n.css("top"),0)>=0?parseInt(n.css("top"),0):0,i=e("#wpadminbar");o(i)&&o(s)&&n.css({top:a+42+i.height()}),o(i)&&!o(s)&&n.css({top:a+i.height()}),!o(i)&&o(s)&&n.css({top:a+42}),!o(i)&&!o(s)&&n.css({top:a}),n.css({"z-index":900}),n.addClass("fixed_animation")}}),v=!0}function u(){var t=e("#wpadminbar");o(t)&&(e("#sdrn_menu.left ul#sdrn_menu_ul, #sdrn_menu.right ul#sdrn_menu_ul").css({"padding-top":42+t.height()}),e("#sdrn_bar").css({top:t.height()}))}e(".bar_logo").on("click",function(){var t=e(this).attr("data-url");t!=""&&(window.location.href=t,h=!0)}),t.hasClass("left")||t.hasClass("right")?(t.hasClass("sdrn_jquery")&&(y=t.hasClass("left")?"left":"right",s.sidr({name:"sdrn_menu",side:y,speed:c})),u(),t.hasClass("sdrn_css3")&&(t.show(),a=n.wrapInner('<div id="sdrn_wrapper">').find("#sdrn_wrapper"),p=a.wrapInner('<div id="sdrn_wrapper_inner">').find("#sdrn_wrapper_inner"),t.insertBefore(a),s.insertBefore(a),z.insertBefore(a),F=p.find("> *").filter(function(){return e(this).css("position")==="fixed"}).each(function(){var t=e(this);n.append(t),m.push(t)}),b(m),n.height()<e(window).height()&&(n.height(e(window).height()),a.height(e(window).height())),n.css("background")==""||n.css("background-color").indexOf("0)")>=0?a.css({background:"#fff"}):a.css({background:n.css("background")})),s.on("click",function(){if(h)return;s.toggleClass("_opened_"),s.hasClass("_opened_")?(s.addClass("menu_is_opened"),n.addClass("menu_is_opened"),e(".fixed_animation").addClass("fixed_animation_moved")):(s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened"),e(".fixed_animation").removeClass("fixed_animation_moved"))}
1714),w.on("click",function(o){if(o.preventDefault(),g=="yes"&&e(this).parent().hasClass("sdrn_parent_item_li")){e(this).prev("span.sdrn_icon").trigger("click");return}var a=e(this).attr("href");t.hasClass("sdrn_jquery")&&e.sidr("close","sdrn_menu"),t.hasClass("sdrn_css3")&&(i(),e(".fixed_animation").removeClass("fixed_animation_moved")),s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened"),setTimeout(function(){window.location.href=a},c)}),t.attr("data-swipe_actions")=="yes"&&e(window).touchwipe({wipeLeft:function(){t.hasClass("left")&&O(),t.hasClass("right")&&x()},wipeRight:function(){t.hasClass("left")&&x(),t.hasClass("right")&&O()},preventDefaultEvents:!1}),e(window).resize(function(){l=window.innerWidth<n.width()?n.width():window.innerWidth,l>C&&o(t)&&(i(),t.hasClass("sdrn_jquery")&&e.sidr("close","sdrn_menu"),t.hasClass("sdrn_css3")&&(s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened"),e(".fixed_animation").removeClass("fixed_animation_moved"))),u(),b(m)})):t.hasClass("top")&&(n.prepend(t),u(),s.on("click",function(){if(h)return;e("html, body").animate({scrollTop:0},c),s.toggleClass("_opened_"),s.hasClass("_opened_")?(s.addClass("menu_is_opened"),n.addClass("menu_is_opened")):(s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened")),i(),t.stop(!0,!1).slideToggle(c)}),w.on("click",function(n){if(n.preventDefault(),g=="yes"&&e(this).parent().hasClass("sdrn_parent_item_li")){e(this).prev("span.sdrn_icon_par").trigger("click");return}var s=e(this).attr("href");t.slideUp(c,function(){window.location.href=s})}),e(window).resize(function(){l=window.innerWidth<n.width()?n.width():window.innerWidth,l>C&&o(t)&&(i(),t.slideUp(c,function(){}))}));function O(){t.hasClass("sdrn_jquery")&&(e.sidr("close","sdrn_menu"),s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened")),t.hasClass("sdrn_css3")&&(i(),s.removeClass("menu_is_opened"),n.removeClass("menu_is_opened"),e(".fixed_animation").removeClass("fixed_animation_moved"))}function x(){t.hasClass("sdrn_jquery")&&(e.sidr("open","sdrn_menu"),s.addClass("menu_is_opened"),n.addClass("menu_is_opened")),t.hasClass("sdrn_css3")&&(s.addClass("menu_is_opened"),n.addClass("menu_is_opened"),e(".fixed_animation").addClass("fixed_animation_moved"))}}});var Detect=function(e){e===0[0]&&(e={}),this.init=function(){return this.mm=window.matchMedia,this.mm&&!e.useUA?(this.method="media queries",this.type=o()):(this.method="user agent strings",this.type=a()),e.verbose?[this.type,this.method]:this.type};var o=function(){return n(320)&&s(480)?"smartphone":n(768)&&s(1024)?"tablet":"desktop"},t=function(e,t){return window.matchMedia("screen and ("+e+"-device-width: "+t+"px)").matches},n=function(e){return t("min",e)},s=function(e){return t("max",e)},a=function(){var e,t=navigator.userAgent;tablets=[/Android 3/i,/iPad/i];for(i=0,l=tablets.length;i<l;i++)if(t.match(tablets[i]))return"tablet";smartphones=[/Mobile/i,/Android/i,/iPhone/i,/BlackBerry/i,/Windows Phone/i,/Windows Mobile/i,/Maemo/i,/PalmSource/i,/SymbianOS/i,/SymbOS/i,/Nokia/i,/MOT-/i,/JDME/i,/Series 60/i,/S60/i,/SonyEricsson/i];for(i=0,l=smartphones.length;i<l;i++)if(t.match(smartphones[i]))return e=smartphones[i],e=String(e).replace(/\/i/gi,""),e=String(e).replace(/\//gi,""),"smartphone sdrn-device-"+e;return"desktop"};return this.init()}; 1715jQuery(document).ready(function() { 1716 1717 if(jQuery('#seo-bottom .textwidget h2').text() == '') { 1718 jQuery('#seo-bottom .textwidget h2').text(jQuery('meta[name="description"]').attr('content')); 1719 } 1720 if(jQuery('#seo-top .textwidget small').text() == '') { 1721 jQuery('#seo-top .textwidget small').text(jQuery('meta[name="description"]').attr('content')); 1722 } 1723 1724 });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.